var EB=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var aje=EB((_a,Fa)=>{function PB(e,t){for(var n=0;nr[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 we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Go(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var l_={exports:{}},Dv={},s_={exports:{}},ht={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ap=Symbol.for("react.element"),kB=Symbol.for("react.portal"),$B=Symbol.for("react.fragment"),IB=Symbol.for("react.strict_mode"),OB=Symbol.for("react.profiler"),MB=Symbol.for("react.provider"),RB=Symbol.for("react.context"),TB=Symbol.for("react.forward_ref"),_B=Symbol.for("react.suspense"),FB=Symbol.for("react.memo"),AB=Symbol.for("react.lazy"),r$=Symbol.iterator;function LB(e){return e===null||typeof e!="object"?null:(e=r$&&e[r$]||e["@@iterator"],typeof e=="function"?e:null)}var u_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c_=Object.assign,d_={};function ld(e,t,n){this.props=e,this.context=t,this.refs=d_,this.updater=n||u_}ld.prototype.isReactComponent={};ld.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ld.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f_(){}f_.prototype=ld.prototype;function $C(e,t,n){this.props=e,this.context=t,this.refs=d_,this.updater=n||u_}var IC=$C.prototype=new f_;IC.constructor=$C;c_(IC,ld.prototype);IC.isPureReactComponent=!0;var o$=Array.isArray,p_=Object.prototype.hasOwnProperty,OC={current:null},m_={key:!0,ref:!0,__self:!0,__source:!0};function h_(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)p_.call(t,r)&&!m_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,H=L[A];if(0>>1;Ao(G,B))Yo(re,G)?(L[A]=re,L[Y]=B,A=Y):(L[A]=G,L[U]=B,A=U);else if(Yo(re,B))L[A]=re,L[Y]=B,A=Y;else break e}}return z}function o(L,z){var B=L.sortIndex-z.sortIndex;return B!==0?B:L.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,d=null,f=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(L){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=L)r(u),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(u)}}function w(L){if(h=!1,x(L),!p)if(n(s)!==null)p=!0,j(P);else{var z=n(u);z!==null&&$(w,z.startTime-L)}}function P(L,z){p=!1,h&&(h=!1,b(S),S=-1),m=!0;var B=f;try{for(x(z),d=n(s);d!==null&&(!(d.expirationTime>z)||L&&!R());){var A=d.callback;if(typeof A=="function"){d.callback=null,f=d.priorityLevel;var H=A(d.expirationTime<=z);z=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(s)&&r(s),x(z)}else r(s);d=n(s)}if(d!==null)var q=!0;else{var U=n(u);U!==null&&$(w,U.startTime-z),q=!1}return q}finally{d=null,f=B,m=!1}}var C=!1,E=null,S=-1,M=5,O=-1;function R(){return!(e.unstable_now()-OL||125A?(L.sortIndex=B,t(u,L),n(s)===null&&L===n(u)&&(h?(b(S),S=-1):h=!0,$(w,B-A))):(L.sortIndex=H,t(s,L),p||m||(p=!0,j(P))),L},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(L){var z=f;return function(){var B=f;f=z;try{return L.apply(this,arguments)}finally{f=B}}}})(b_);y_.exports=b_;var qB=y_.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var x_=v,co=qB;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ux=Object.prototype.hasOwnProperty,KB=/^[: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]*$/,a$={},l$={};function QB(e){return ux.call(l$,e)?!0:ux.call(a$,e)?!1:KB.test(e)?l$[e]=!0:(a$[e]=!0,!1)}function YB(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function XB(e,t,n,r){if(t===null||typeof t>"u"||YB(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mr(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new Mr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new Mr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new Mr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new Mr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rr[e]=new Mr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new Mr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new Mr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new Mr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new Mr(e,5,!1,e.toLowerCase(),null,!1,!1)});var RC=/[\-:]([a-z])/g;function TC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(RC,TC);rr[t]=new Mr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(RC,TC);rr[t]=new Mr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(RC,TC);rr[t]=new Mr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new Mr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new Mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new Mr(e,1,!1,e.toLowerCase(),null,!0,!0)});function _C(e,t,n,r){var o=rr.hasOwnProperty(t)?rr[t]:null;(o!==null?o.type!==0:r||!(2l||o[a]!==i[l]){var s=` `+o[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{ob=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pf(e):""}function ZB(e){switch(e.tag){case 5:return pf(e.type);case 16:return pf("Lazy");case 13:return pf("Suspense");case 19:return pf("SuspenseList");case 0:case 2:case 15:return e=ib(e.type,!1),e;case 11:return e=ib(e.type.render,!1),e;case 1:return e=ib(e.type,!0),e;default:return""}}function px(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oc:return"Fragment";case rc:return"Portal";case cx:return"Profiler";case FC:return"StrictMode";case dx:return"Suspense";case fx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S_:return(e.displayName||"Context")+".Consumer";case C_:return(e._context.displayName||"Context")+".Provider";case AC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case LC:return t=e.displayName||null,t!==null?t:px(e.type)||"Memo";case wl:t=e._payload,e=e._init;try{return px(e(t))}catch{}}return null}function JB(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return px(t);case 8:return t===FC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function P_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e6(e){var t=P_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nm(e){e._valueTracker||(e._valueTracker=e6(e))}function k_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=P_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mx(e,t){var n=t.checked;return cn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function u$(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $_(e,t){t=t.checked,t!=null&&_C(e,"checked",t,!1)}function hx(e,t){$_(e,t);var n=Jl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gx(e,t.type,n):t.hasOwnProperty("defaultValue")&&gx(e,t.type,Jl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function c$(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gx(e,t,n){(t!=="number"||bg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mf=Array.isArray;function xc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=jm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},t6=["Webkit","ms","Moz","O"];Object.keys(Cf).forEach(function(e){t6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cf[t]=Cf[e]})});function R_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cf.hasOwnProperty(e)&&Cf[e]?(""+t).trim():t+"px"}function T_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=R_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var n6=cn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bx(e,t){if(t){if(n6[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function xx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wx=null;function DC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cx=null,wc=null,Cc=null;function p$(e){if(e=Np(e)){if(typeof Cx!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=Hv(t),Cx(e.stateNode,e.type,t))}}function __(e){wc?Cc?Cc.push(e):Cc=[e]:wc=e}function F_(){if(wc){var e=wc,t=Cc;if(Cc=wc=null,p$(e),t)for(e=0;e>>=0,e===0?32:31-(p6(e)/m6|0)|0}var zm=64,Bm=4194304;function hf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=hf(l):(i&=a,i!==0&&(r=hf(i)))}else a=n&~o,a!==0?r=hf(a):i!==0&&(r=hf(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Lp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hi(t),e[t]=n}function y6(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ef),C$=String.fromCharCode(32),S$=!1;function eF(e,t){switch(e){case"keyup":return G6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tF(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ic=!1;function K6(e,t){switch(e){case"compositionend":return tF(t);case"keypress":return t.which!==32?null:(S$=!0,C$);case"textInput":return e=t.data,e===C$&&S$?null:e;default:return null}}function Q6(e,t){if(ic)return e==="compositionend"||!WC&&eF(e,t)?(e=Z_(),Bh=HC=Tl=null,ic=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$$(n)}}function iF(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iF(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function aF(){for(var e=window,t=bg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bg(e.document)}return t}function GC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function oH(e){var t=aF(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&iF(n.ownerDocument.documentElement,n)){if(r!==null&&GC(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=I$(n,i);var a=I$(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ac=null,Ix=null,kf=null,Ox=!1;function O$(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ox||ac==null||ac!==bg(r)||(r=ac,"selectionStart"in r&&GC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kf&&tp(kf,r)||(kf=r,r=kg(Ix,"onSelect"),0uc||(e.current=Ax[uc],Ax[uc]=null,uc--)}function Ut(e,t){uc++,Ax[uc]=e.current,e.current=t}var es={},fr=as(es),jr=as(!1),Js=es;function Lc(e,t){var n=e.type.contextTypes;if(!n)return es;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function zr(e){return e=e.childContextTypes,e!=null}function Ig(){Zt(jr),Zt(fr)}function L$(e,t,n){if(fr.current!==es)throw Error(Me(168));Ut(fr,t),Ut(jr,n)}function hF(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Me(108,JB(e)||"Unknown",o));return cn({},n,r)}function Og(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||es,Js=fr.current,Ut(fr,e),Ut(jr,jr.current),!0}function D$(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=hF(e,t,Js),r.__reactInternalMemoizedMergedChildContext=e,Zt(jr),Zt(fr),Ut(fr,e)):Zt(jr),Ut(jr,n)}var $a=null,Vv=!1,bb=!1;function gF(e){$a===null?$a=[e]:$a.push(e)}function gH(e){Vv=!0,gF(e)}function ls(){if(!bb&&$a!==null){bb=!0;var e=0,t=Ft;try{var n=$a;for(Ft=1;e>=a,o-=a,Oa=1<<32-hi(t)+o|n<S?(M=E,E=null):M=E.sibling;var O=f(b,E,x[S],w);if(O===null){E===null&&(E=M);break}e&&E&&O.alternate===null&&t(b,E),g=i(O,g,S),C===null?P=O:C.sibling=O,C=O,E=M}if(S===x.length)return n(b,E),on&&Ss(b,S),P;if(E===null){for(;SS?(M=E,E=null):M=E.sibling;var R=f(b,E,O.value,w);if(R===null){E===null&&(E=M);break}e&&E&&R.alternate===null&&t(b,E),g=i(R,g,S),C===null?P=R:C.sibling=R,C=R,E=M}if(O.done)return n(b,E),on&&Ss(b,S),P;if(E===null){for(;!O.done;S++,O=x.next())O=d(b,O.value,w),O!==null&&(g=i(O,g,S),C===null?P=O:C.sibling=O,C=O);return on&&Ss(b,S),P}for(E=r(b,E);!O.done;S++,O=x.next())O=m(E,b,S,O.value,w),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?S:O.key),g=i(O,g,S),C===null?P=O:C.sibling=O,C=O);return e&&E.forEach(function(_){return t(b,_)}),on&&Ss(b,S),P}function y(b,g,x,w){if(typeof x=="object"&&x!==null&&x.type===oc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Dm:e:{for(var P=x.key,C=g;C!==null;){if(C.key===P){if(P=x.type,P===oc){if(C.tag===7){n(b,C.sibling),g=o(C,x.props.children),g.return=b,b=g;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===wl&&U$(P)===C.type){n(b,C.sibling),g=o(C,x.props),g.ref=Bd(b,C,x),g.return=b,b=g;break e}n(b,C);break}else t(b,C);C=C.sibling}x.type===oc?(g=Vs(x.props.children,b.mode,w,x.key),g.return=b,b=g):(w=Qh(x.type,x.key,x.props,null,b.mode,w),w.ref=Bd(b,g,x),w.return=b,b=w)}return a(b);case rc:e:{for(C=x.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(b,g.sibling),g=o(g,x.children||[]),g.return=b,b=g;break e}else{n(b,g);break}else t(b,g);g=g.sibling}g=$b(x,b.mode,w),g.return=b,b=g}return a(b);case wl:return C=x._init,y(b,g,C(x._payload),w)}if(mf(x))return p(b,g,x,w);if(Ld(x))return h(b,g,x,w);Km(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(b,g.sibling),g=o(g,x),g.return=b,b=g):(n(b,g),g=kb(x,b.mode,w),g.return=b,b=g),a(b)):n(b,g)}return y}var Nc=EF(!0),PF=EF(!1),jp={},Ui=as(jp),ip=as(jp),ap=as(jp);function Ls(e){if(e===jp)throw Error(Me(174));return e}function tS(e,t){switch(Ut(ap,t),Ut(ip,e),Ut(Ui,jp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yx(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yx(t,e)}Zt(Ui),Ut(Ui,t)}function jc(){Zt(Ui),Zt(ip),Zt(ap)}function kF(e){Ls(ap.current);var t=Ls(Ui.current),n=yx(t,e.type);t!==n&&(Ut(ip,e),Ut(Ui,n))}function nS(e){ip.current===e&&(Zt(Ui),Zt(ip))}var ln=as(0);function Ag(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xb=[];function rS(){for(var e=0;en?n:4,e(!0);var r=wb.transition;wb.transition={};try{e(!1),t()}finally{Ft=n,wb.transition=r}}function HF(){return Bo().memoizedState}function xH(e,t,n){var r=Gl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},VF(e))UF(t,n);else if(n=xF(e,t,n,r),n!==null){var o=$r();gi(n,e,r,o),WF(n,t,r)}}function wH(e,t,n){var r=Gl(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(VF(e))UF(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,bi(l,a)){var s=t.interleaved;s===null?(o.next=o,JC(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=xF(e,t,o,r),n!==null&&(o=$r(),gi(n,e,r,o),WF(n,t,r))}}function VF(e){var t=e.alternate;return e===sn||t!==null&&t===sn}function UF(e,t){$f=Lg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function WF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jC(e,n)}}var Dg={readContext:zo,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},CH={readContext:zo,useCallback:function(e,t){return Ti().memoizedState=[e,t===void 0?null:t],e},useContext:zo,useEffect:G$,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wh(4194308,4,DF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wh(4,2,e,t)},useMemo:function(e,t){var n=Ti();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ti();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xH.bind(null,sn,e),[r.memoizedState,e]},useRef:function(e){var t=Ti();return e={current:e},t.memoizedState=e},useState:W$,useDebugValue:sS,useDeferredValue:function(e){return Ti().memoizedState=e},useTransition:function(){var e=W$(!1),t=e[0];return e=bH.bind(null,e[1]),Ti().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sn,o=Ti();if(on){if(n===void 0)throw Error(Me(407));n=n()}else{if(n=t(),Wn===null)throw Error(Me(349));tu&30||OF(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,G$(RF.bind(null,r,i,e),[e]),r.flags|=2048,up(9,MF.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ti(),t=Wn.identifierPrefix;if(on){var n=Ma,r=Oa;n=(r&~(1<<32-hi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ji]=t,e[op]=r,eA(e,t,!1,!1),t.stateNode=e;e:{switch(a=xx(n,r),n){case"dialog":Kt("cancel",e),Kt("close",e),o=r;break;case"iframe":case"object":case"embed":Kt("load",e),o=r;break;case"video":case"audio":for(o=0;oBc&&(t.flags|=128,r=!0,Hd(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ag(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!on)return ar(t),null}else 2*bn()-i.renderingStartTime>Bc&&n!==1073741824&&(t.flags|=128,r=!0,Hd(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=bn(),t.sibling=null,n=ln.current,Ut(ln,r?n&1|2:n&1),t):(ar(t),null);case 22:case 23:return mS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?eo&1073741824&&(ar(t),t.subtreeFlags&6&&(t.flags|=8192)):ar(t),null;case 24:return null;case 25:return null}throw Error(Me(156,t.tag))}function MH(e,t){switch(KC(t),t.tag){case 1:return zr(t.type)&&Ig(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jc(),Zt(jr),Zt(fr),rS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nS(t),null;case 13:if(Zt(ln),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Me(340));Dc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zt(ln),null;case 4:return jc(),null;case 10:return ZC(t.type._context),null;case 22:case 23:return mS(),null;case 24:return null;default:return null}}var Ym=!1,cr=!1,RH=typeof WeakSet=="function"?WeakSet:Set,ze=null;function pc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){mn(e,t,r)}else n.current=null}function qx(e,t,n){try{n()}catch(r){mn(e,t,r)}}var tI=!1;function TH(e,t){if(Mx=Eg,e=aF(),GC(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var m;d!==n||o!==0&&d.nodeType!==3||(l=a+o),d!==i||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=a),f===i&&++c===r&&(s=a),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rx={focusedElem:e,selectionRange:n},Eg=!1,ze=t;ze!==null;)if(t=ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ze=e;else for(;ze!==null;){t=ze;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,b=t.stateNode,g=b.getSnapshotBeforeUpdate(t.elementType===t.type?h:ai(t.type,h),y);b.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(w){mn(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ze=e;break}ze=t.return}return p=tI,tI=!1,p}function If(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&qx(t,n,i)}o=o.next}while(o!==r)}}function Gv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Kx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rA(e){var t=e.alternate;t!==null&&(e.alternate=null,rA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ji],delete t[op],delete t[Fx],delete t[mH],delete t[hH])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function oA(e){return e.tag===5||e.tag===3||e.tag===4}function nI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$g));else if(r!==4&&(e=e.child,e!==null))for(Qx(e,t,n),e=e.sibling;e!==null;)Qx(e,t,n),e=e.sibling}function Yx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Yx(e,t,n),e=e.sibling;e!==null;)Yx(e,t,n),e=e.sibling}var Yn=null,si=!1;function ml(e,t,n){for(n=n.child;n!==null;)iA(e,t,n),n=n.sibling}function iA(e,t,n){if(Vi&&typeof Vi.onCommitFiberUnmount=="function")try{Vi.onCommitFiberUnmount(Nv,n)}catch{}switch(n.tag){case 5:cr||pc(n,t);case 6:var r=Yn,o=si;Yn=null,ml(e,t,n),Yn=r,si=o,Yn!==null&&(si?(e=Yn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Yn.removeChild(n.stateNode));break;case 18:Yn!==null&&(si?(e=Yn,n=n.stateNode,e.nodeType===8?yb(e.parentNode,n):e.nodeType===1&&yb(e,n),Jf(e)):yb(Yn,n.stateNode));break;case 4:r=Yn,o=si,Yn=n.stateNode.containerInfo,si=!0,ml(e,t,n),Yn=r,si=o;break;case 0:case 11:case 14:case 15:if(!cr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&qx(n,t,a),o=o.next}while(o!==r)}ml(e,t,n);break;case 1:if(!cr&&(pc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){mn(n,t,l)}ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:n.mode&1?(cr=(r=cr)||n.memoizedState!==null,ml(e,t,n),cr=r):ml(e,t,n);break;default:ml(e,t,n)}}function rI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new RH),t.forEach(function(r){var o=BH.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function oi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=bn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FH(r/1960))-r,10e?16:e,_l===null)var r=!1;else{if(e=_l,_l=null,zg=0,Ct&6)throw Error(Me(331));var o=Ct;for(Ct|=4,ze=e.current;ze!==null;){var i=ze,a=i.child;if(ze.flags&16){var l=i.deletions;if(l!==null){for(var s=0;sbn()-fS?Hs(e,0):dS|=n),Br(e,t)}function pA(e,t){t===0&&(e.mode&1?(t=Bm,Bm<<=1,!(Bm&130023424)&&(Bm=4194304)):t=1);var n=$r();e=Va(e,t),e!==null&&(Lp(e,t,n),Br(e,n))}function zH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pA(e,n)}function BH(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Me(314))}r!==null&&r.delete(t),pA(e,n)}var mA;mA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jr.current)Nr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Nr=!1,IH(e,t,n);Nr=!!(e.flags&131072)}else Nr=!1,on&&t.flags&1048576&&vF(t,Rg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Gh(e,t),e=t.pendingProps;var o=Lc(t,fr.current);Ec(t,n),o=iS(null,t,r,e,o,n);var i=aS();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zr(r)?(i=!0,Og(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,eS(t),o.updater=Uv,t.stateNode=o,o._reactInternals=t,zx(t,r,e,n),t=Vx(null,t,r,!0,i,n)):(t.tag=0,on&&i&&qC(t),xr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Gh(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=VH(r),e=ai(r,e),o){case 0:t=Hx(null,t,r,e,n);break e;case 1:t=Z$(null,t,r,e,n);break e;case 11:t=Y$(null,t,r,e,n);break e;case 14:t=X$(null,t,r,ai(r.type,e),n);break e}throw Error(Me(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ai(r,o),Hx(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ai(r,o),Z$(e,t,r,o,n);case 3:e:{if(XF(t),e===null)throw Error(Me(387));r=t.pendingProps,i=t.memoizedState,o=i.element,wF(e,t),Fg(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=zc(Error(Me(423)),t),t=J$(e,t,r,n,o);break e}else if(r!==o){o=zc(Error(Me(424)),t),t=J$(e,t,r,n,o);break e}else for(ao=Vl(t.stateNode.containerInfo.firstChild),lo=t,on=!0,ci=null,n=PF(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Dc(),r===o){t=Ua(e,t,n);break e}xr(e,t,r,n)}t=t.child}return t;case 5:return kF(t),e===null&&Dx(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Tx(r,o)?a=null:i!==null&&Tx(r,i)&&(t.flags|=32),YF(e,t),xr(e,t,a,n),t.child;case 6:return e===null&&Dx(t),null;case 13:return ZF(e,t,n);case 4:return tS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nc(t,null,r,n):xr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ai(r,o),Y$(e,t,r,o,n);case 7:return xr(e,t,t.pendingProps,n),t.child;case 8:return xr(e,t,t.pendingProps.children,n),t.child;case 12:return xr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Ut(Tg,r._currentValue),r._currentValue=a,i!==null)if(bi(i.value,a)){if(i.children===o.children&&!jr.current){t=Ua(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Aa(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Nx(i.return,n,t),l.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Me(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Nx(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}xr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ec(t,n),o=zo(o),r=r(o),t.flags|=1,xr(e,t,r,n),t.child;case 14:return r=t.type,o=ai(r,t.pendingProps),o=ai(r.type,o),X$(e,t,r,o,n);case 15:return KF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ai(r,o),Gh(e,t),t.tag=1,zr(r)?(e=!0,Og(t)):e=!1,Ec(t,n),SF(t,r,o),zx(t,r,o,n),Vx(null,t,r,!0,e,n);case 19:return JF(e,t,n);case 22:return QF(e,t,n)}throw Error(Me(156,t.tag))};function hA(e,t){return B_(e,t)}function HH(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fo(e,t,n,r){return new HH(e,t,n,r)}function gS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function VH(e){if(typeof e=="function")return gS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===AC)return 11;if(e===LC)return 14}return 2}function ql(e,t){var n=e.alternate;return n===null?(n=Fo(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qh(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")gS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case oc:return Vs(n.children,o,i,t);case FC:a=8,o|=8;break;case cx:return e=Fo(12,n,t,o|2),e.elementType=cx,e.lanes=i,e;case dx:return e=Fo(13,n,t,o),e.elementType=dx,e.lanes=i,e;case fx:return e=Fo(19,n,t,o),e.elementType=fx,e.lanes=i,e;case E_:return Kv(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C_:a=10;break e;case S_:a=9;break e;case AC:a=11;break e;case LC:a=14;break e;case wl:a=16,r=null;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=Fo(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Vs(e,t,n,r){return e=Fo(7,e,r,t),e.lanes=n,e}function Kv(e,t,n,r){return e=Fo(22,e,r,t),e.elementType=E_,e.lanes=n,e.stateNode={isHidden:!1},e}function kb(e,t,n){return e=Fo(6,e,null,t),e.lanes=n,e}function $b(e,t,n){return t=Fo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function UH(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lb(0),this.expirationTimes=lb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lb(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function vS(e,t,n,r,o,i,a,l,s){return e=new UH(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Fo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eS(i),e}function WH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bA)}catch(e){console.error(e)}}bA(),v_.exports=mo;var ss=v_.exports;const Jm=ra(ss);var xA,dI=ss;xA=dI.createRoot,dI.hydrateRoot;class cd{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const dp=typeof window>"u"||"Deno"in window;function Co(){}function YH(e,t){return typeof e=="function"?e(t):e}function tw(e){return typeof e=="number"&&e>=0&&e!==1/0}function wA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function hc(e,t,n){return zp(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function XH(e,t,n){return zp(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Sl(e,t,n){return zp(e)?[{...t,queryKey:e},n]:[e||{},t]}function fI(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(zp(a)){if(r){if(t.queryHash!==wS(a,t.options))return!1}else if(!Vg(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function pI(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(zp(i)){if(!t.options.mutationKey)return!1;if(n){if(Ds(t.options.mutationKey)!==Ds(i))return!1}else if(!Vg(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function wS(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ds)(e)}function Ds(e){return JSON.stringify(e,(t,n)=>nw(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Vg(e,t){return CA(e,t)}function CA(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!CA(e[n],t[n])):!1}function SA(e,t){if(e===t)return e;const n=mI(e)&&mI(t);if(n||nw(e)&&nw(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let l=0;for(let s=0;s"u")return!0;const n=t.prototype;return!(!hI(n)||!n.hasOwnProperty("isPrototypeOf"))}function hI(e){return Object.prototype.toString.call(e)==="[object Object]"}function zp(e){return Array.isArray(e)}function EA(e){return new Promise(t=>{setTimeout(t,e)})}function gI(e){EA(0).then(e)}function ZH(){if(typeof AbortController=="function")return new AbortController}function rw(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?SA(e,t):t}class JH extends cd{constructor(){super(),this.setup=t=>{if(!dp&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Wg=new JH,vI=["online","offline"];class eV extends cd{constructor(){super(),this.setup=t=>{if(!dp&&window.addEventListener){const n=()=>t();return vI.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{vI.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Gg=new eV;function tV(e){return Math.min(1e3*2**e,3e4)}function Jv(e){return(e??"online")==="online"?Gg.isOnline():!0}class PA{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Yh(e){return e instanceof PA}function kA(e){let t=!1,n=0,r=!1,o,i,a;const l=new Promise((y,b)=>{i=y,a=b}),s=y=>{r||(m(new PA(y)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},d=()=>!Wg.isFocused()||e.networkMode!=="always"&&!Gg.isOnline(),f=y=>{r||(r=!0,e.onSuccess==null||e.onSuccess(y),o==null||o(),i(y))},m=y=>{r||(r=!0,e.onError==null||e.onError(y),o==null||o(),a(y))},p=()=>new Promise(y=>{o=b=>{const g=r||!d();return g&&y(b),g},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),h=()=>{if(r)return;let y;try{y=e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(f).catch(b=>{var g,x;if(r)return;const w=(g=e.retry)!=null?g:3,P=(x=e.retryDelay)!=null?x:tV,C=typeof P=="function"?P(n,b):P,E=w===!0||typeof w=="number"&&n{if(d())return p()}).then(()=>{t?m(b):h()})})};return Jv(e.networkMode)?h():p().then(h),{promise:l,cancel:s,continue:()=>(o==null?void 0:o())?l:Promise.resolve(),cancelRetry:u,continueRetry:c}}const CS=console;function nV(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},i=c=>{t?e.push(c):gI(()=>{n(c)})},a=c=>(...d)=>{i(()=>{c(...d)})},l=()=>{const c=e;e=[],c.length&&gI(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const gn=nV();class $A{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tw(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(dp?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class rV extends $A{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||CS,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||oV(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=rw(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Co).catch(Co):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!wA(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const a=ZH(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},s=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};s(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(s(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=m=>{if(Yh(m)&&m.silent||this.dispatch({type:"error",error:m}),!Yh(m)){var p,h,y,b;(p=(h=this.cache.config).onError)==null||p.call(h,m,this),(y=(b=this.cache.config).onSettled)==null||y.call(b,this.state.data,m,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=kA({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var p,h,y,b;if(typeof m>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(p=(h=this.cache.config).onSuccess)==null||p.call(h,m,this),(y=(b=this.cache.config).onSettled)==null||y.call(b,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(m,p)=>{this.dispatch({type:"failed",failureCount:m,error:p})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;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,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Jv(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Yh(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),gn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function oV(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",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":"loading",fetchStatus:"idle"}}class iV extends cd{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,a=(o=n.queryHash)!=null?o:wS(i,n);let l=this.get(a);return l||(l=new rV({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){gn.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Sl(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>fI(r,o))}findAll(t,n){const[r]=Sl(t,n);return Object.keys(r).length>0?this.queries.filter(o=>fI(r,o)):this.queries}notify(t){gn.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){gn.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){gn.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class aV extends $A{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||CS,this.observers=[],this.state=t.state||IA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var E;return this.retryer=kA({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,M)=>{this.dispatch({type:"failed",failureCount:S,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(E=this.options.retry)!=null?E:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,a,l,s,u,c;if(!n){var d,f,m,p;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const S=await((m=(p=this.options).onMutate)==null?void 0:m.call(p,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const E=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,E,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,E,this.state.variables,this.state.context)),await((l=(s=this.mutationCache.config).onSettled)==null?void 0:l.call(s,E,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,E,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:E}),E}catch(E){try{var h,y,b,g,x,w,P,C;throw await((h=(y=this.mutationCache.config).onError)==null?void 0:h.call(y,E,this.state.variables,this.state.context,this)),await((b=(g=this.options).onError)==null?void 0:b.call(g,E,this.state.variables,this.state.context)),await((x=(w=this.mutationCache.config).onSettled)==null?void 0:x.call(w,void 0,E,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,E,this.state.variables,this.state.context)),E}finally{this.dispatch({type:"error",error:E})}}}dispatch(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"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Jv(this.options.networkMode),status:"loading",variables:t.variables};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"};case"setState":return{...r,...t.state}}};this.state=n(this.state),gn.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function IA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class lV extends cd{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new aV({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){gn.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>pI(t,n))}findAll(t){return this.mutations.filter(n=>pI(t,n))}notify(t){gn.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return gn.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(Co)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ow(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,s=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=s==null?void 0:s.pageParam,c=(s==null?void 0:s.direction)==="forward",d=(s==null?void 0:s.direction)==="backward",f=((i=e.state.data)==null?void 0:i.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[];let p=m,h=!1;const y=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>{var E;if((E=e.signal)!=null&&E.aborted)h=!0;else{var S;(S=e.signal)==null||S.addEventListener("abort",()=>{h=!0})}return e.signal}})},b=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),g=(C,E,S,M)=>(p=M?[E,...p]:[...p,E],M?[S,...C]:[...C,S]),x=(C,E,S,M)=>{if(h)return Promise.reject("Cancelled");if(typeof S>"u"&&!E&&C.length)return Promise.resolve(C);const O={queryKey:e.queryKey,pageParam:S,meta:e.options.meta};y(O);const R=b(O);return Promise.resolve(R).then(D=>g(C,S,D,M))};let w;if(!f.length)w=x([]);else if(c){const C=typeof u<"u",E=C?u:iw(e.options,f);w=x(f,C,E)}else if(d){const C=typeof u<"u",E=C?u:OA(e.options,f);w=x(f,C,E,!0)}else{p=[];const C=typeof e.options.getNextPageParam>"u";w=(l&&f[0]?l(f[0],0,f):!0)?x([],C,m[0]):Promise.resolve(g([],m[0],f[0]));for(let S=1;S{if(l&&f[S]?l(f[S],S,f):!0){const R=C?m[S]:iw(e.options,M);return x(M,C,R)}return Promise.resolve(g(M,m[S],f[S]))})}return w.then(C=>({pages:C,pageParams:p}))}}}}function iw(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function OA(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}function sV(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=iw(e,t);return typeof n<"u"&&n!==null&&n!==!1}}function uV(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=OA(e,t);return typeof n<"u"&&n!==null&&n!==!1}}class yI{constructor(t={}){this.queryCache=t.queryCache||new iV,this.mutationCache=t.mutationCache||new lV,this.logger=t.logger||CS,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Wg.subscribe(()=>{Wg.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Gg.subscribe(()=>{Gg.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Sl(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=hc(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=YH(n,i);if(typeof a>"u")return;const l=hc(t),s=this.defaultQueryOptions(l);return this.queryCache.build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return gn.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Sl(t,n),o=this.queryCache;gn.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=Sl(t,n,r),a=this.queryCache,l={type:"active",...o};return gn.batch(()=>(a.findAll(o).forEach(s=>{s.reset()}),this.refetchQueries(l,i)))}cancelQueries(t,n,r){const[o,i={}]=Sl(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=gn.batch(()=>this.queryCache.findAll(o).map(l=>l.cancel(i)));return Promise.all(a).then(Co).catch(Co)}invalidateQueries(t,n,r){const[o,i]=Sl(t,n,r);return gn.batch(()=>{var a,l;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const s={...o,type:(a=(l=o.refetchType)!=null?l:o.type)!=null?a:"active"};return this.refetchQueries(s,i)})}refetchQueries(t,n,r){const[o,i]=Sl(t,n,r),a=gn.batch(()=>this.queryCache.findAll(o).filter(s=>!s.isDisabled()).map(s=>{var u;return s.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let l=Promise.all(a).then(Co);return i!=null&&i.throwOnError||(l=l.catch(Co)),l}fetchQuery(t,n,r){const o=hc(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Co).catch(Co)}fetchInfiniteQuery(t,n,r){const o=hc(t,n,r);return o.behavior=ow(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Co).catch(Co)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Ds(t)===Ds(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Vg(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Ds(t)===Ds(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Vg(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=wS(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class MA extends cd{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),bI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return aw(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return aw(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Ug(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&xI(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return dV(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Co)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),dp||this.currentResult.isStale||!tw(this.options.staleTime))return;const n=wA(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(dp||this.options.enabled===!1||!tw(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Wg.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,s=t!==r,u=s?t.state:this.currentQueryInitialState,c=s?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:f,error:m,errorUpdatedAt:p,fetchStatus:h,status:y}=d,b=!1,g=!1,x;if(n._optimisticResults){const S=this.hasListeners(),M=!S&&bI(t,n),O=S&&xI(t,r,n,o);(M||O)&&(h=Jv(t.options.networkMode)?"fetching":"paused",f||(y="loading")),n._optimisticResults==="isRestoring"&&(h="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&y!=="error")x=c.data,f=c.dataUpdatedAt,y=c.status,b=!0;else if(n.select&&typeof d.data<"u")if(i&&d.data===(a==null?void 0:a.data)&&n.select===this.selectFn)x=this.selectResult;else try{this.selectFn=n.select,x=n.select(d.data),x=rw(i==null?void 0:i.data,x,n),this.selectResult=x,this.selectError=null}catch(S){this.selectError=S}else x=d.data;if(typeof n.placeholderData<"u"&&typeof x>"u"&&y==="loading"){let S;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))S=i.data;else if(S=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof S<"u")try{S=n.select(S),this.selectError=null}catch(M){this.selectError=M}typeof S<"u"&&(y="success",x=rw(i==null?void 0:i.data,S,n),g=!0)}this.selectError&&(m=this.selectError,x=this.selectResult,p=Date.now(),y="error");const w=h==="fetching",P=y==="loading",C=y==="error";return{status:y,fetchStatus:h,isLoading:P,isSuccess:y==="success",isError:C,isInitialLoading:P&&w,data:x,dataUpdatedAt:f,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!P,isLoadingError:C&&d.dataUpdatedAt===0,isPaused:h==="paused",isPlaceholderData:g,isPreviousData:b,isRefetchError:C&&d.dataUpdatedAt!==0,isStale:SS(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Ug(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.trackedProps.size)return!0;const s=new Set(l??this.trackedProps);return this.options.useErrorBoundary&&s.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&s.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!Yh(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){gn.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var a,l,s,u;(a=(l=this.options).onError)==null||a.call(l,this.currentResult.error),(s=(u=this.options).onSettled)==null||s.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function cV(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function bI(e,t){return cV(e,t)||e.state.dataUpdatedAt>0&&aw(e,t,t.refetchOnMount)}function aw(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&SS(e,t)}return!1}function xI(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&SS(e,n)}function SS(e,t){return e.isStaleByTime(t.staleTime)}function dV(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!Ug(e.getCurrentResult(),t)}class fV extends MA{constructor(t,n){super(t,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,n){super.setOptions({...t,behavior:ow()},n)}getOptimisticResult(t){return t.behavior=ow(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,n){var r,o,i,a,l,s;const{state:u}=t,c=super.createResult(t,n),{isFetching:d,isRefetching:f}=c,m=d&&((r=u.fetchMeta)==null||(o=r.fetchMore)==null?void 0:o.direction)==="forward",p=d&&((i=u.fetchMeta)==null||(a=i.fetchMore)==null?void 0:a.direction)==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:sV(n,(l=u.data)==null?void 0:l.pages),hasPreviousPage:uV(n,(s=u.data)==null?void 0:s.pages),isFetchingNextPage:m,isFetchingPreviousPage:p,isRefetching:f&&!m&&!p}}}let pV=class extends cd{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),Ug(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:IA(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){gn.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,o,i;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(o=(i=this.mutateOptions).onSettled)==null||o.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var a,l,s,u;(a=(l=this.mutateOptions).onError)==null||a.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(s=(u=this.mutateOptions).onSettled)==null||s.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)})})}};var RA={exports:{}},TA={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Hc=v;function mV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hV=typeof Object.is=="function"?Object.is:mV,gV=Hc.useState,vV=Hc.useEffect,yV=Hc.useLayoutEffect,bV=Hc.useDebugValue;function xV(e,t){var n=t(),r=gV({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return yV(function(){o.value=n,o.getSnapshot=t,Ib(o)&&i({inst:o})},[e,n,t]),vV(function(){return Ib(o)&&i({inst:o}),e(function(){Ib(o)&&i({inst:o})})},[e]),bV(n),n}function Ib(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hV(e,n)}catch{return!0}}function wV(e,t){return t()}var CV=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wV:xV;TA.useSyncExternalStore=Hc.useSyncExternalStore!==void 0?Hc.useSyncExternalStore:CV;RA.exports=TA;var SV=RA.exports;const _A=SV.useSyncExternalStore,wI=v.createContext(void 0),FA=v.createContext(!1);function AA(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=wI),window.ReactQueryClientContext):wI)}const oa=({context:e}={})=>{const t=v.useContext(AA(e,v.useContext(FA)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},EV=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=AA(n,r);return v.createElement(FA.Provider,{value:!n&&r},v.createElement(o.Provider,{value:e},t))},LA=v.createContext(!1),PV=()=>v.useContext(LA);LA.Provider;function kV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const $V=v.createContext(kV()),IV=()=>v.useContext($V);function DA(e,t){return typeof e=="function"?e(...t):!!e}const OV=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},MV=e=>{v.useEffect(()=>{e.clearReset()},[e])},RV=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&DA(n,[e.error,r]),TV=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},_V=(e,t)=>e.isLoading&&e.isFetching&&!t,FV=(e,t,n)=>(e==null?void 0:e.suspense)&&_V(t,n),AV=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function NA(e,t){const n=oa({context:e.context}),r=PV(),o=IV(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=gn.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=gn.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=gn.batchCalls(i.onSettled)),TV(i),OV(i,o),MV(o);const[a]=v.useState(()=>new t(n,i)),l=a.getOptimisticResult(i);if(_A(v.useCallback(s=>{const u=r?()=>{}:a.subscribe(gn.batchCalls(s));return a.updateResult(),u},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),v.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),FV(i,l,r))throw AV(i,a,o);if(RV({result:l,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return i.notifyOnChangeProps?l:a.trackResult(l)}function Ho(e,t,n){const r=hc(e,t,n);return NA(r,MA)}function wn(e,t,n){const r=XH(e,t,n),o=oa({context:r.context}),[i]=v.useState(()=>new pV(o,r));v.useEffect(()=>{i.setOptions(r)},[i,r]);const a=_A(v.useCallback(s=>i.subscribe(gn.batchCalls(s)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=v.useCallback((s,u)=>{i.mutate(s,u).catch(LV)},[i]);if(a.error&&DA(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function LV(){}function DV(e,t,n){const r=hc(e,t,n);return NA(r,fV)}var NV={exports:{}},Ob={exports:{}},CI;function jV(){return CI||(CI=1,function(e,t){(function(n,r){e.exports=r()})(we,function(){function n(h){return!isNaN(parseFloat(h))&&isFinite(h)}function r(h){return h.charAt(0).toUpperCase()+h.substring(1)}function o(h){return function(){return this[h]}}var i=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],l=["fileName","functionName","source"],s=["args"],u=["evalOrigin"],c=i.concat(a,l,s,u);function d(h){if(h)for(var y=0;y-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var d=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),f=d.match(/ (\(.+\)$)/);d=f?d.replace(f[0],""):d;var m=this.extractLocation(f?f[1]:d),p=f&&d||void 0,h=["eval",""].indexOf(m[0])>-1?void 0:m[0];return new r({functionName:p,fileName:h,lineNumber:m[1],columnNumber:m[2],source:c})},this)},parseFFOrSafari:function(s){var u=s.stack.split(` `).filter(function(c){return!c.match(a)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new r({functionName:c});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=c.match(d),m=f&&f[1]?f[1]:void 0,p=this.extractLocation(c.replace(d,""));return new r({functionName:m,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(s){return!s.stacktrace||s.message.indexOf(` `)>-1&&s.message.split(` `).length>s.stacktrace.split(` `).length?this.parseOpera9(s):s.stack?this.parseOpera11(s):this.parseOpera10(s)},parseOpera9:function(s){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=s.message.split(` `),d=[],f=2,m=c.length;f/,"$2").replace(/\([^)]*\)/g,"")||void 0,h;m.match(/\(([^)]*)\)/)&&(h=m.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var y=h===void 0||h==="[arguments not available]"?void 0:h.split(",");return new r({functionName:p,args:y,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:c})},this)}}})})(NV);function xt(e,t){return{hookName:"",trace:[],resourcePath:null,legacyKey:!1}}var zV=Error,BV=EvalError,HV=RangeError,VV=ReferenceError,jA=SyntaxError,Bp=TypeError,UV=URIError,WV=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},SI=typeof Symbol<"u"&&Symbol,GV=WV,qV=function(){return typeof SI!="function"||typeof Symbol!="function"||typeof SI("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:GV()},Mb={__proto__:null,foo:{}},KV=Object,QV=function(){return{__proto__:Mb}.foo===Mb.foo&&!(Mb instanceof KV)},YV="Function.prototype.bind called on incompatible ",XV=Object.prototype.toString,ZV=Math.max,JV="[object Function]",EI=function(t,n){for(var r=[],o=0;o"u"||!Vn?mt:Vn(Uint8Array),Ws={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":Mu&&Vn?Vn([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":Qu,"%AsyncGenerator%":Qu,"%AsyncGeneratorFunction%":Qu,"%AsyncIteratorPrototype%":Qu,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sU,"%eval%":eval,"%EvalError%":uU,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":zA,"%GeneratorFunction%":Qu,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mu&&Vn?Vn(Vn([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mu||!Vn?mt:Vn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":cU,"%ReferenceError%":dU,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mu||!Vn?mt:Vn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mu&&Vn?Vn(""[Symbol.iterator]()):mt,"%Symbol%":Mu?Symbol:mt,"%SyntaxError%":Vc,"%ThrowTypeError%":pU,"%TypedArray%":hU,"%TypeError%":kc,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":fU,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet};if(Vn)try{null.error}catch(e){var gU=Vn(Vn(e));Ws["%Error.prototype%"]=gU}var vU=function e(t){var n;if(t==="%AsyncFunction%")n=Rb("async function () {}");else if(t==="%GeneratorFunction%")n=Rb("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Rb("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Vn&&(n=Vn(o.prototype))}return Ws[t]=n,n},PI={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Hp=ES,qg=lU,yU=Hp.call(Function.call,Array.prototype.concat),bU=Hp.call(Function.apply,Array.prototype.splice),kI=Hp.call(Function.call,String.prototype.replace),Kg=Hp.call(Function.call,String.prototype.slice),xU=Hp.call(Function.call,RegExp.prototype.exec),wU=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,CU=/\\(\\)?/g,SU=function(t){var n=Kg(t,0,1),r=Kg(t,-1);if(n==="%"&&r!=="%")throw new Vc("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Vc("invalid intrinsic syntax, expected opening `%`");var o=[];return kI(t,wU,function(i,a,l,s){o[o.length]=l?kI(s,CU,"$1"):a||i}),o},EU=function(t,n){var r=t,o;if(qg(PI,r)&&(o=PI[r],r="%"+o[0]+"%"),qg(Ws,r)){var i=Ws[r];if(i===Qu&&(i=vU(r)),typeof i>"u"&&!n)throw new kc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Vc("intrinsic "+t+" does not exist!")},dd=function(t,n){if(typeof t!="string"||t.length===0)throw new kc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new kc('"allowMissing" argument must be a boolean');if(xU(/^%?[^%]*%?$/,t)===null)throw new Vc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=SU(t),o=r.length>0?r[0]:"",i=EU("%"+o+"%",n),a=i.name,l=i.value,s=!1,u=i.alias;u&&(o=u[0],bU(r,yU([0,1],u)));for(var c=1,d=!0;c=r.length){var h=Us(l,f);d=!!h,d&&"get"in h&&!("originalValue"in h.get)?l=h.get:l=l[f]}else d=qg(l,f),l=l[f];d&&!s&&(Ws[a]=l)}}return l},BA={exports:{}},_b,$I;function PS(){if($I)return _b;$I=1;var e=dd,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return _b=t,_b}var PU=dd,Xh=PU("%Object.getOwnPropertyDescriptor%",!0);if(Xh)try{Xh([],"length")}catch{Xh=null}var HA=Xh,II=PS(),kU=jA,Ru=Bp,OI=HA,$U=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ru("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ru("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ru("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ru("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ru("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ru("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!OI&&OI(t,n);if(II)II(t,n,{configurable:a===null&&s?s.configurable:!a,enumerable:o===null&&s?s.enumerable:!o,value:r,writable:i===null&&s?s.writable:!i});else if(l||!o&&!i&&!a)t[n]=r;else throw new kU("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},lw=PS(),VA=function(){return!!lw};VA.hasArrayLengthDefineBug=function(){if(!lw)return null;try{return lw([],"length",{value:1}).length!==1}catch{return!0}};var IU=VA,OU=dd,MI=$U,MU=IU(),RI=HA,TI=Bp,RU=OU("%Math.floor%"),TU=function(t,n){if(typeof t!="function")throw new TI("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||RU(n)!==n)throw new TI("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&RI){var a=RI(t,"length");a&&!a.configurable&&(o=!1),a&&!a.writable&&(i=!1)}return(o||i||!r)&&(MU?MI(t,"length",n,!0,!0):MI(t,"length",n)),t};(function(e){var t=ES,n=dd,r=TU,o=Bp,i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||t.call(a,i),s=PS(),u=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var m=l(t,a,arguments);return r(m,1+u(0,f.length-(arguments.length-1)),!0)};var c=function(){return l(t,i,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(BA);var _U=BA.exports,UA=dd,WA=_U,FU=WA(UA("String.prototype.indexOf")),AU=function(t,n){var r=UA(t,!!n);return typeof r=="function"&&FU(t,".prototype.")>-1?WA(r):r};const LU={},DU=Object.freeze(Object.defineProperty({__proto__:null,default:LU},Symbol.toStringTag,{value:"Module"})),NU=Go(DU);var kS=typeof Map=="function"&&Map.prototype,Fb=Object.getOwnPropertyDescriptor&&kS?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Qg=kS&&Fb&&typeof Fb.get=="function"?Fb.get:null,_I=kS&&Map.prototype.forEach,$S=typeof Set=="function"&&Set.prototype,Ab=Object.getOwnPropertyDescriptor&&$S?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Yg=$S&&Ab&&typeof Ab.get=="function"?Ab.get:null,FI=$S&&Set.prototype.forEach,jU=typeof WeakMap=="function"&&WeakMap.prototype,Rf=jU?WeakMap.prototype.has:null,zU=typeof WeakSet=="function"&&WeakSet.prototype,Tf=zU?WeakSet.prototype.has:null,BU=typeof WeakRef=="function"&&WeakRef.prototype,AI=BU?WeakRef.prototype.deref:null,HU=Boolean.prototype.valueOf,VU=Object.prototype.toString,UU=Function.prototype.toString,WU=String.prototype.match,IS=String.prototype.slice,Fl=String.prototype.replace,GU=String.prototype.toUpperCase,LI=String.prototype.toLowerCase,GA=RegExp.prototype.test,DI=Array.prototype.concat,Ai=Array.prototype.join,qU=Array.prototype.slice,NI=Math.floor,sw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Lb=Object.getOwnPropertySymbols,uw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Uc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Uc||"symbol")?Symbol.toStringTag:null,qA=Object.prototype.propertyIsEnumerable,jI=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function zI(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||GA.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-NI(-e):NI(e);if(r!==e){var o=String(r),i=IS.call(t,o.length+1);return Fl.call(o,n,"$&_")+"."+Fl.call(Fl.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Fl.call(t,n,"$&_")}var cw=NU,BI=cw.custom,HI=QA(BI)?BI:null,KU=function e(t,n,r,o){var i=n||{};if(El(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(El(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=El(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(El(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(El(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return XA(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return l?zI(t,s):s}if(typeof t=="bigint"){var u=String(t)+"n";return l?zI(t,u):u}var c=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return dw(t)?"[Array]":"[Object]";var d=f8(i,r);if(typeof o>"u")o=[];else if(YA(o,t)>=0)return"[Circular]";function f(D,T,F){if(T&&(o=qU.call(o),o.push(T)),F){var j={depth:i.depth};return El(i,"quoteStyle")&&(j.quoteStyle=i.quoteStyle),e(D,j,r+1,o)}return e(D,i,r+1,o)}if(typeof t=="function"&&!VI(t)){var m=r8(t),p=eh(t,f);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(p.length>0?" { "+Ai.call(p,", ")+" }":"")}if(QA(t)){var h=Uc?Fl.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):uw.call(t);return typeof t=="object"&&!Uc?Ud(h):h}if(u8(t)){for(var y="<"+LI.call(String(t.nodeName)),b=t.attributes||[],g=0;g",y}if(dw(t)){if(t.length===0)return"[]";var x=eh(t,f);return d&&!d8(x)?"["+fw(x,d)+"]":"[ "+Ai.call(x,", ")+" ]"}if(XU(t)){var w=eh(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!qA.call(t,"cause")?"{ ["+String(t)+"] "+Ai.call(DI.call("[cause]: "+f(t.cause),w),", ")+" }":w.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ai.call(w,", ")+" }"}if(typeof t=="object"&&a){if(HI&&typeof t[HI]=="function"&&cw)return cw(t,{depth:c-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(o8(t)){var P=[];return _I&&_I.call(t,function(D,T){P.push(f(T,t,!0)+" => "+f(D,t))}),UI("Map",Qg.call(t),P,d)}if(l8(t)){var C=[];return FI&&FI.call(t,function(D){C.push(f(D,t))}),UI("Set",Yg.call(t),C,d)}if(i8(t))return Db("WeakMap");if(s8(t))return Db("WeakSet");if(a8(t))return Db("WeakRef");if(JU(t))return Ud(f(Number(t)));if(t8(t))return Ud(f(sw.call(t)));if(e8(t))return Ud(HU.call(t));if(ZU(t))return Ud(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===we)return"{ [object globalThis] }";if(!YU(t)&&!VI(t)){var E=eh(t,f),S=jI?jI(t)===Object.prototype:t instanceof Object||t.constructor===Object,M=t instanceof Object?"":"null prototype",O=!S&&pr&&Object(t)===t&&pr in t?IS.call(us(t),8,-1):M?"Object":"",R=S||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=R+(O||M?"["+Ai.call(DI.call([],O||[],M||[]),": ")+"] ":"");return E.length===0?_+"{}":d?_+"{"+fw(E,d)+"}":_+"{ "+Ai.call(E,", ")+" }"}return String(t)};function KA(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function QU(e){return Fl.call(String(e),/"/g,""")}function dw(e){return us(e)==="[object Array]"&&(!pr||!(typeof e=="object"&&pr in e))}function YU(e){return us(e)==="[object Date]"&&(!pr||!(typeof e=="object"&&pr in e))}function VI(e){return us(e)==="[object RegExp]"&&(!pr||!(typeof e=="object"&&pr in e))}function XU(e){return us(e)==="[object Error]"&&(!pr||!(typeof e=="object"&&pr in e))}function ZU(e){return us(e)==="[object String]"&&(!pr||!(typeof e=="object"&&pr in e))}function JU(e){return us(e)==="[object Number]"&&(!pr||!(typeof e=="object"&&pr in e))}function e8(e){return us(e)==="[object Boolean]"&&(!pr||!(typeof e=="object"&&pr in e))}function QA(e){if(Uc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!uw)return!1;try{return uw.call(e),!0}catch{}return!1}function t8(e){if(!e||typeof e!="object"||!sw)return!1;try{return sw.call(e),!0}catch{}return!1}var n8=Object.prototype.hasOwnProperty||function(e){return e in this};function El(e,t){return n8.call(e,t)}function us(e){return VU.call(e)}function r8(e){if(e.name)return e.name;var t=WU.call(UU.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function YA(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return XA(IS.call(e,0,t.maxStringLength),t)+r}var o=Fl.call(Fl.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,c8);return KA(o,"single",t)}function c8(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+GU.call(t.toString(16))}function Ud(e){return"Object("+e+")"}function Db(e){return e+" { ? }"}function UI(e,t,n,r){var o=r?fw(n,r):Ai.call(n,", ");return e+" ("+t+") {"+o+"}"}function d8(e){for(var t=0;t=0)return!1;return!0}function f8(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ai.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ai.call(Array(t+1),n)}}function fw(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Ai.call(e,","+n)+` `+t.prev}function eh(e,t){var n=dw(e),r=[];if(n){r.length=e.length;for(var o=0;o1;){var n=t.pop(),r=n.obj[n.prop];if(Ms(r)){for(var o=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===$8.RFC1738&&(u===40||u===41)){l+=a.charAt(s);continue}if(u<128){l=l+Ii[u];continue}if(u<2048){l=l+(Ii[192|u>>6]+Ii[128|u&63]);continue}if(u<55296||u>=57344){l=l+(Ii[224|u>>12]+Ii[128|u>>6&63]+Ii[128|u&63]);continue}s+=1,u=65536+((u&1023)<<10|a.charCodeAt(s)&1023),l+=Ii[240|u>>18]+Ii[128|u>>12&63]+Ii[128|u>>6&63]+Ii[128|u&63]}return l},_8=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o"u"&&(P=0)}if(typeof c=="function"?x=c(n,x):x instanceof Date?x=m(x):r==="comma"&&Fi(x)&&(x=Zh.maybeMap(x,function(B){return B instanceof Date?m(B):B})),x===null){if(a)return u&&!y?u(n,An.encoder,b,"key",p):n;x=""}if(B8(x)||Zh.isBuffer(x)){if(u){var S=y?n:u(n,An.encoder,b,"key",p);return[h(S)+"="+h(u(x,An.encoder,b,"value",p))]}return[h(n)+"="+h(String(x))]}var M=[];if(typeof x>"u")return M;var O;if(r==="comma"&&Fi(x))y&&u&&(x=Zh.maybeMap(x,u)),O=[{value:x.length>0?x.join(",")||null:void 0}];else if(Fi(c))O=c;else{var R=Object.keys(x);O=d?R.sort(d):R}var _=s?n.replace(/\./g,"%2E"):n,D=o&&Fi(x)&&x.length===1?_+"[]":_;if(i&&Fi(x)&&x.length===0)return D+"[]";for(var T=0;T"u"?t.encodeDotInKeys===!0?!0:An.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:An.addQueryPrefix,allowDots:l,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:An.allowEmptyArrays,arrayFormat:a,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:An.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?An.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:An.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:An.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:An.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:An.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:An.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:An.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:An.strictNullHandling}},U8=function(e,t){var n=e,r=V8(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Fi(r.filter)&&(i=r.filter,o=i);var a=[];if(typeof n!="object"||n===null)return"";var l=nL[r.arrayFormat],s=l==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=tL(),c=0;c0?m+f:""},Wc=eL,pw=Object.prototype.hasOwnProperty,W8=Array.isArray,yn={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!0,decoder:Wc.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},G8=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},oL=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},q8="utf8=%26%2310003%3B",K8="utf8=%E2%9C%93",Q8=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,i),l=-1,s,u=n.charset;if(n.charsetSentinel)for(s=0;s-1&&(p=W8(p)?[p]:p);var h=pw.call(r,m);h&&n.duplicates==="combine"?r[m]=Wc.combine(r[m],p):(!h||n.duplicates==="last")&&(r[m]=p)}return r},Y8=function(e,t,n,r){for(var o=r?t:oL(t,n),i=e.length-1;i>=0;--i){var a,l=e[i];if(l==="[]"&&n.parseArrays)a=n.allowEmptyArrays&&o===""?[]:[].concat(o);else{a=n.plainObjects?Object.create(null):{};var s=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,u=n.decodeDotInKeys?s.replace(/%2E/g,"."):s,c=parseInt(u,10);!n.parseArrays&&u===""?a={0:o}:!isNaN(c)&&l!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=o):u!=="__proto__"&&(a[u]=o)}o=a}return o},X8=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,s=r.depth>0&&a.exec(i),u=s?i.slice(0,s.index):i,c=[];if(u){if(!r.plainObjects&&pw.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var d=0;r.depth>0&&(s=l.exec(i))!==null&&d"u"?yn.charset:t.charset,r=typeof t.duplicates>"u"?yn.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:yn.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:yn.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:yn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:yn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:yn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:yn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:yn.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:yn.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:yn.decoder,delimiter:typeof t.delimiter=="string"||Wc.isRegExp(t.delimiter)?t.delimiter:yn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:yn.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:yn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:yn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:yn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:yn.strictNullHandling}},J8=function(e,t){var n=Z8(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Q8(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a0&&n(l)?t>1?TS(l,t-1,n,r,o):iL(o,l):r||(o[o.length]=l)}return o}function _S(e){return e}function w9(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var QI=Math.max;function C9(e,t,n){return t=QI(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=QI(r.length-t,0),a=Array(i);++o0){if(++t>=U9)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var K9=q9(V9);const Q9=K9;function FS(e,t){return Q9(C9(e,t,_S),e+"")}var Y9=bu(Object,"create");const fp=Y9;function X9(){this.__data__=fp?fp(null):{},this.size=0}function Z9(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var J9="__lodash_hash_undefined__",eW=Object.prototype,tW=eW.hasOwnProperty;function nW(e){var t=this.__data__;if(fp){var n=t[e];return n===J9?void 0:n}return tW.call(t,e)?t[e]:void 0}var rW=Object.prototype,oW=rW.hasOwnProperty;function iW(e){var t=this.__data__;return fp?t[e]!==void 0:oW.call(t,e)}var aW="__lodash_hash_undefined__";function lW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fp&&t===void 0?aW:t,this}function lu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}function mW(e,t){var n=this.__data__,r=ey(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Za(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}function dL(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=FW){var u=t?null:_W(e);if(u)return DS(u);a=!1,o=LS,s=new Gc}else s=t?[]:l;e:for(;++r-1&&e%1==0&&e<=AW}function jS(e){return e!=null&&NS(e.length)&&!uL(e)}function Ff(e){return iu(e)&&jS(e)}function pL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var LW=FS(function(e){var t=pL(e);return t=typeof t=="function"?t:void 0,fL(TS(e,1,Ff,!0),void 0,t)});const zS=LW;function BS(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n=DW&&(i=LS,a=!1,t=new Gc(t));e:for(;++ol))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,m=n&r7?new Gc:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e=this._config.preview;if(i)r.postMessage({results:D,workerId:s.WORKER_ID,finished:F});else if(E(this._config.chunk)&&!O){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);D=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!F||!E(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(M){E(this._config.error)?this._config.error(M):i&&this._config.error&&r.postMessage({workerId:s.WORKER_ID,error:M,finished:!1})}}function d(S){var M;(S=S||{}).chunkSize||(S.chunkSize=s.RemoteChunkSize),c.call(this,S),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(O){this._input=O,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(M=new XMLHttpRequest,this._config.withCredentials&&(M.withCredentials=this._config.withCredentials),o||(M.onload=C(this._chunkLoaded,this),M.onerror=C(this._chunkError,this)),M.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var O=this._config.downloadRequestHeaders;for(var R in O)M.setRequestHeader(R,O[R])}if(this._config.chunkSize){var _=this._start+this._config.chunkSize-1;M.setRequestHeader("Range","bytes="+this._start+"-"+_)}try{M.send(this._config.downloadRequestBody)}catch(D){this._chunkError(D.message)}o&&M.status===0&&this._chunkError()}},this._chunkLoaded=function(){M.readyState===4&&(M.status<200||400<=M.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:M.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(O){var R=O.getResponseHeader("Content-Range");return R===null?-1:parseInt(R.substring(R.lastIndexOf("/")+1))}(M),this.parseChunk(M.responseText)))},this._chunkError=function(O){var R=M.statusText||O;this._sendError(new Error(R))}}function f(S){var M,O;(S=S||{}).chunkSize||(S.chunkSize=s.LocalChunkSize),c.call(this,S);var R=typeof FileReader<"u";this.stream=function(_){this._input=_,O=_.slice||_.webkitSlice||_.mozSlice,R?((M=new FileReader).onload=C(this._chunkLoaded,this),M.onerror=C(this._chunkError,this)):M=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(_.target.result)},this._chunkError=function(){this._sendError(M.error)}}function m(S){var M;c.call(this,S=S||{}),this.stream=function(O){return M=O,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var O,R=this._config.chunkSize;return R?(O=M.substring(0,R),M=M.substring(R)):(O=M,M=""),this._finished=!M,this.parseChunk(O)}}}function p(S){c.call(this,S=S||{});var M=[],O=!0,R=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(_){this._input=_,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){R&&M.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),M.length?this.parseChunk(M.shift()):O=!0},this._streamData=C(function(_){try{M.push(typeof _=="string"?_:_.toString(this._config.encoding)),O&&(O=!1,this._checkIsFinished(),this.parseChunk(M.shift()))}catch(D){this._streamError(D)}},this),this._streamError=C(function(_){this._streamCleanUp(),this._sendError(_)},this),this._streamEnd=C(function(){this._streamCleanUp(),R=!0,this._streamData("")},this),this._streamCleanUp=C(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(S){var M,O,R,_=Math.pow(2,53),D=-_,T=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,F=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,j=this,$=0,L=0,z=!1,B=!1,A=[],H={data:[],errors:[],meta:{}};if(E(S.step)){var q=S.step;S.step=function(J){if(H=J,Y())G();else{if(G(),H.data.length===0)return;$+=J.data.length,S.preview&&$>S.preview?O.abort():(H.data=H.data[0],q(H,j))}}}function U(J){return S.skipEmptyLines==="greedy"?J.join("").trim()==="":J.length===1&&J[0].length===0}function G(){return H&&R&&(le("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),R=!1),S.skipEmptyLines&&(H.data=H.data.filter(function(J){return!U(J)})),Y()&&function(){if(!H)return;function J(ce,ve){E(S.transformHeader)&&(ce=S.transformHeader(ce,ve)),A.push(ce)}if(Array.isArray(H.data[0])){for(var oe=0;Y()&&oe=A.length?"__parsed_extra":A[me]),S.transform&&(ie=S.transform(ie,be)),ie=re(be,ie),be==="__parsed_extra"?(ke[be]=ke[be]||[],ke[be].push(ie)):ke[be]=ie}return S.header&&(me>A.length?le("FieldMismatch","TooManyFields","Too many fields: expected "+A.length+" fields but parsed "+me,L+ve):me=V.length/2?`\r `:"\r"}(J,ve)),R=!1,S.delimiter)E(S.delimiter)&&(S.delimiter=S.delimiter(J),H.meta.delimiter=S.delimiter);else{var me=function(be,ie,ye,V,Q){var Z,ae,te,K;Q=Q||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var ee=0;ee=T)return Te(!0)}else for(se=$,$++;;){if((se=z.indexOf(M,se+1))===-1)return A||le.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:re.length,index:$}),Ee();if(se===H-1)return Ee(z.substring($,se).replace(ee,M));if(M!==j||z[se+1]!==j){if(M===j||se===0||z[se-1]!==j){te!==-1&&te=T)return Te(!0);break}le.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:re.length,index:$}),se++}}else se++}return Ee();function $e(Re){re.push(Re),oe=$}function X(Re){var Ge=0;if(Re!==-1){var at=z.substring(se+1,Re);at&&at.trim()===""&&(Ge=at.length)}return Ge}function Ee(Re){return A||(Re===void 0&&(Re=z.substring($)),J.push(Re),$=H,$e(J),Y&&Pe()),Te()}function De(Re){$=Re,$e(J),J=[],K=z.indexOf(R,$)}function Te(Re){return{data:re,errors:le,meta:{delimiter:O,linebreak:R,aborted:L,truncated:!!Re,cursor:oe+(B||0)}}}function Pe(){D(Te()),re=[],le=[]}},this.abort=function(){L=!0},this.getCharIndex=function(){return $}}function g(S){var M=S.data,O=a[M.workerId],R=!1;if(M.error)O.userError(M.error,M.file);else if(M.results&&M.results.data){var _={abort:function(){R=!0,x(M.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:w,resume:w};if(E(O.userStep)){for(var D=0;D=t||E<0||d&&S>=i}function b(){var C=Ub();if(y(C))return g(C);l=setTimeout(b,h(C))}function g(C){return l=void 0,f&&r?m(C):(r=o=void 0,a)}function x(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0}function w(){return l===void 0?a:g(Ub())}function P(){var C=Ub(),E=y(C);if(r=arguments,o=this,s=C,E){if(l===void 0)return p(s);if(d)return clearTimeout(l),l=setTimeout(b,t),m(s)}return l===void 0&&(l=setTimeout(b,t)),a}return P.cancel=x,P.flush=w,P}function GG(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++rkq(e,"name",{value:t,configurable:!0}),Wb=W(e=>e/1e3,"userFriendlySecond"),$q=W((e,t=n=>n)=>{let[n,...r]=e;return r.map(o=>GW(WW(n,o))).map((o,i,a)=>t.call(void 0,o,i,a))},"importCSVMapper"),Iq=W((e="",t)=>{let n=GL(e);return t==="singular"?Xg.singular(n):Xg.plural(n)},"userFriendlyResourceName");W((e={})=>e!=null&&e.id?{...e,id:decodeURIComponent(e.id)}:e,"handleUseParams");var Ae=W((...e)=>e.find(t=>typeof t<"u"),"pickNotDeprecated");function Ri(e,t){return e.findIndex((n,r)=>r<=e.length-t.length&&t.every((o,i)=>e[r+i]===o))}W(Ri,"arrayFindIndex");function _L(e){if(e[0]==="data"){let t=e.slice(1);if(t[2]==="many")t[2]="getMany";else if(t[2]==="infinite")t[2]="list";else if(t[2]==="one")t[2]="detail";else if(t[1]==="custom"){let n={...t[2]};return delete n.method,delete n.url,[t[0],t[1],t[2].method,t[2].url,n]}return t}if(e[0]==="audit"&&e[2]==="list")return["logList",e[1],e[3]];if(e[0]==="access"&&e.length===4)return["useCan",{resource:e[1],action:e[2],...e[3]}];if(e[0]==="auth"){if(Ri(e,["auth","login"])!==-1)return["useLogin"];if(Ri(e,["auth","logout"])!==-1)return["useLogout"];if(Ri(e,["auth","identity"])!==-1)return["getUserIdentity"];if(Ri(e,["auth","register"])!==-1)return["useRegister"];if(Ri(e,["auth","forgotPassword"])!==-1)return["useForgotPassword"];if(Ri(e,["auth","check"])!==-1)return["useAuthenticated",e[2]];if(Ri(e,["auth","onError"])!==-1)return["useCheckError"];if(Ri(e,["auth","permissions"])!==-1)return["usePermissions"];if(Ri(e,["auth","updatePassword"])!==-1)return["useUpdatePassword"]}return e}W(_L,"convertToLegacy");var fo=class{constructor(e=[]){this.segments=[],this.segments=e}key(){return this.segments}legacy(){return _L(this.segments)}get(e){return e?this.legacy():this.segments}};W(fo,"BaseKeyBuilder");var el=class extends fo{params(e){return new fo([...this.segments,e])}};W(el,"ParamsKeyBuilder");var FL=class extends fo{id(e){return new el([...this.segments,e?String(e):void 0])}};W(FL,"DataIdRequiringKeyBuilder");var AL=class extends fo{ids(...e){return new el([...this.segments,...e.length?[e.map(t=>String(t))]:[]])}};W(AL,"DataIdsRequiringKeyBuilder");var LL=class extends fo{action(e){if(e==="one")return new FL([...this.segments,e]);if(e==="many")return new AL([...this.segments,e]);if(["list","infinite"].includes(e))return new el([...this.segments,e]);throw new Error("Invalid action type")}};W(LL,"DataResourceKeyBuilder");var DL=class extends fo{resource(e){return new LL([...this.segments,e])}mutation(e){return new el([...e==="custom"?this.segments:[this.segments[0]],e])}};W(DL,"DataKeyBuilder");var NL=class extends fo{action(t){return new el([...this.segments,t])}};W(NL,"AuthKeyBuilder");var jL=class extends fo{action(t){return new el([...this.segments,t])}};W(jL,"AccessResourceKeyBuilder");var zL=class extends fo{resource(e){return new jL([...this.segments,e])}};W(zL,"AccessKeyBuilder");var BL=class extends fo{action(e){return new el([...this.segments,e])}};W(BL,"AuditActionKeyBuilder");var HL=class extends fo{resource(e){return new BL([...this.segments,e])}action(e){return new el([...this.segments,e])}};W(HL,"AuditKeyBuilder");var VL=class extends fo{data(e){return new DL(["data",e||"default"])}auth(){return new NL(["auth"])}access(){return new zL(["access"])}audit(){return new HL(["audit"])}};W(VL,"KeyBuilder");var ks=W(()=>new VL([]),"keys"),Oq=W((e,t,n,r)=>{let o=t||"default",i={all:[o],resourceAll:[o,e||""],list:a=>[...i.resourceAll,"list",{...a,...Ae(n,r)||{}}],many:a=>[...i.resourceAll,"getMany",a==null?void 0:a.map(String),{...Ae(n,r)||{}}].filter(l=>l!==void 0),detail:a=>[...i.resourceAll,"detail",a==null?void 0:a.toString(),{...Ae(n,r)||{}}],logList:a=>["logList",e,a,r].filter(l=>l!==void 0)};return i},"queryKeys"),iy=W(e=>(t,n,r,o)=>{let i=n||"default";return{all:ks().data(i).get(e),resourceAll:ks().data(n).resource(t??"").get(e),list:a=>ks().data(n).resource(t??"").action("list").params({...a,...Ae(r,o)||{}}).get(e),many:a=>ks().data(n).resource(t??"").action("many").ids(...a??[]).params({...Ae(r,o)||{}}).get(e),detail:a=>ks().data(n).resource(t??"").action("one").id(a??"").params({...Ae(r,o)||{}}).get(e),logList:a=>[...ks().audit().resource(t).action("list").params(a).get(e),o].filter(l=>l!==void 0)}},"queryKeysReplacement"),Mq=W((e,t)=>!e||!t?!1:!!e.find(n=>n===t),"hasPermission"),WS=W(e=>e.startsWith(":"),"isParameter"),qc=W(e=>e.split("/").filter(t=>t!==""),"splitToSegments"),Rq=W((e,t)=>{let n=qc(e),r=qc(t);return n.length===r.length},"isSegmentCountsSame"),Wa=W(e=>e.replace(/^\/|\/$/g,""),"removeLeadingTrailingSlashes"),Tq=W((e,t)=>{let n=Wa(e),r=Wa(t);if(!Rq(n,r))return!1;let o=qc(n);return qc(r).every((i,a)=>WS(i)||i===o[a])},"checkBySegments"),_q=W((e,t,n)=>{let r=Wa(n||""),o=`${r}${r?"/":""}${e}`;return t==="list"?o=`${o}`:t==="create"?o=`${o}/create`:t==="edit"?o=`${o}/edit/:id`:t==="show"?o=`${o}/show/:id`:t==="clone"&&(o=`${o}/clone/:id`),`/${o.replace(/^\//,"")}`},"getDefaultActionPath"),ts=W((e,t)=>{var n,r;let o=Ae((n=e.meta)==null?void 0:n.parent,(r=e.options)==null?void 0:r.parent,e.parentName);return o?t.find(i=>(i.identifier??i.name)===o)??{name:o}:void 0},"getParentResource"),UL=W((e,t,n)=>{let r=[],o=ts(e,t);for(;o;)r.push(o),o=ts(o,t);if(r.length!==0)return`/${r.reverse().map(i=>{var a;let l=n?((a=i.options)==null?void 0:a.route)??i.name:i.name;return Wa(l)}).join("/")}`},"getParentPrefixForResource"),Jr=W((e,t,n)=>{let r=[],o=["list","show","edit","create","clone"],i=UL(e,t,n);return o.forEach(a=>{var l,s;let u=n&&a==="clone"?e.create:e[a],c;typeof u=="function"||n?c=_q(n?((l=e.meta)==null?void 0:l.route)??((s=e.options)==null?void 0:s.route)??e.name:e.name,a,n?i:void 0):typeof u=="string"?c=u:typeof u=="object"&&(c=u.path),c&&r.push({action:a,resource:e,route:`/${c.replace(/^\//,"")}`})}),r},"getActionRoutesFromResource"),Fq=W(e=>{var t;if(e.length===0)return;if(e.length===1)return e[0];let n=e.map(i=>({...i,splitted:qc(Wa(i.route))})),r=((t=n[0])==null?void 0:t.splitted.length)??0,o=[...n];for(let i=0;i!WS(l.splitted[i]));if(a.length!==0){if(a.length===1){o=a;break}o=a}}return o[0]},"pickMatchedRoute"),WL=W((e,t)=>{let n=t.flatMap(o=>Jr(o,t)).filter(o=>Tq(e,o.route)),r=Fq(n);return{found:!!r,resource:r==null?void 0:r.resource,action:r==null?void 0:r.action,matchedRoute:r==null?void 0:r.route}},"matchResourceFromRoute"),Aq=W((e,t)=>{var n;let r,o=UL(e,t,!0);if(o){let i=Ae(e.meta,e.options);r=`${o}/${(i==null?void 0:i.route)??e.name}`}else r=((n=e.options)==null?void 0:n.route)??e.name;return`/${r.replace(/^\//,"")}`},"routeGenerator");W(e=>{var t;let n=[],r={},o={},i,a;for(let l=0;l(e=e.replace(/([a-z]{1})([A-Z]{1})/g,"$1-$2"),e=e.replace(/([A-Z]{1})([A-Z]{1})([a-z]{1})/g,"$1-$2$3"),e=e.toLowerCase().replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim(),e=e.charAt(0).toUpperCase()+e.slice(1),e),"humanizeString"),qL=W(({children:e})=>k.createElement("div",null,e),"DefaultLayout"),Ar={mutationMode:"pessimistic",syncWithLocation:!1,undoableTimeout:5e3,warnWhenUnsavedChanges:!1,liveMode:"off",redirect:{afterCreate:"list",afterClone:"list",afterEdit:"list"},overtime:{interval:1e3},textTransformers:{humanize:GL,plural:Xg.plural,singular:Xg.singular},disableServerSideValidation:!1},cs=k.createContext({hasDashboard:!1,mutationMode:"pessimistic",warnWhenUnsavedChanges:!1,syncWithLocation:!1,undoableTimeout:5e3,Title:void 0,Sider:void 0,Header:void 0,Footer:void 0,Layout:qL,OffLayoutArea:void 0,liveMode:"off",onLiveEvent:void 0,options:Ar}),Lq=W(({hasDashboard:e,mutationMode:t,warnWhenUnsavedChanges:n,syncWithLocation:r,undoableTimeout:o,children:i,DashboardPage:a,Title:l,Layout:s=qL,Header:u,Sider:c,Footer:d,OffLayoutArea:f,LoginPage:m=MK,catchAll:p,liveMode:h="off",onLiveEvent:y,options:b})=>k.createElement(cs.Provider,{value:{__initialized:!0,hasDashboard:e,mutationMode:t,warnWhenUnsavedChanges:n,syncWithLocation:r,Title:l,undoableTimeout:o,Layout:s,Header:u,Sider:c,Footer:d,OffLayoutArea:f,DashboardPage:a,LoginPage:m,catchAll:p,liveMode:h,onLiveEvent:y,options:b}},i),"RefineContextProvider"),Dq=W(({options:e,disableTelemetry:t,liveMode:n,mutationMode:r,reactQueryClientConfig:o,reactQueryDevtoolConfig:i,syncWithLocation:a,undoableTimeout:l,warnWhenUnsavedChanges:s}={})=>{var u,c,d,f,m,p,h,y;let b={breadcrumb:e==null?void 0:e.breadcrumb,mutationMode:(e==null?void 0:e.mutationMode)??r??Ar.mutationMode,undoableTimeout:(e==null?void 0:e.undoableTimeout)??l??Ar.undoableTimeout,syncWithLocation:(e==null?void 0:e.syncWithLocation)??a??Ar.syncWithLocation,warnWhenUnsavedChanges:(e==null?void 0:e.warnWhenUnsavedChanges)??s??Ar.warnWhenUnsavedChanges,liveMode:(e==null?void 0:e.liveMode)??n??Ar.liveMode,redirect:{afterCreate:((u=e==null?void 0:e.redirect)==null?void 0:u.afterCreate)??Ar.redirect.afterCreate,afterClone:((c=e==null?void 0:e.redirect)==null?void 0:c.afterClone)??Ar.redirect.afterClone,afterEdit:((d=e==null?void 0:e.redirect)==null?void 0:d.afterEdit)??Ar.redirect.afterEdit},overtime:(e==null?void 0:e.overtime)??Ar.overtime,textTransformers:{humanize:((f=e==null?void 0:e.textTransformers)==null?void 0:f.humanize)??Ar.textTransformers.humanize,plural:((m=e==null?void 0:e.textTransformers)==null?void 0:m.plural)??Ar.textTransformers.plural,singular:((p=e==null?void 0:e.textTransformers)==null?void 0:p.singular)??Ar.textTransformers.singular},disableServerSideValidation:(e==null?void 0:e.disableServerSideValidation)??Ar.disableServerSideValidation,projectId:e==null?void 0:e.projectId,useNewQueryKeys:e==null?void 0:e.useNewQueryKeys},g=(e==null?void 0:e.disableTelemetry)??t??!1,x={clientConfig:((h=e==null?void 0:e.reactQuery)==null?void 0:h.clientConfig)??o??{},devtoolConfig:((y=e==null?void 0:e.reactQuery)==null?void 0:y.devtoolConfig)??i??{}};return{optionsWithDefaults:b,disableTelemetryWithDefault:g,reactQueryWithDefaults:x}},"handleRefineOptions"),Nq=W(({redirectFromProps:e,action:t,redirectOptions:n})=>{if(e||e===!1)return e;switch(t){case"clone":return n.afterClone;case"create":return n.afterCreate;case"edit":return n.afterEdit;default:return!1}},"redirectPage"),bO=W(async(e,t,n)=>{let r=[];for(let[o,i]of e.entries())try{let a=await i();r.push(t(a,o))}catch(a){r.push(n(a,o))}return r},"sequentialPromises"),ur=W((e,t=[],n=!1)=>{if(!e)return;if(n)return t.find(i=>Wa(i.route??"")===Wa(e))||t.find(i=>i.name===e);let r=t.find(o=>o.identifier===e);return r||(r=t.find(o=>o.name===e)),r},"pickResource"),bt=W((e,t,n)=>{if(t)return t;let r=ur(e,n),o=Ae(r==null?void 0:r.meta,r==null?void 0:r.options);return o!=null&&o.dataProviderName?o.dataProviderName:"default"},"pickDataProvider"),ay=W(async e=>({data:(await Promise.all(e)).map(t=>t.data)}),"handleMultiple"),jq=W(e=>{let{pagination:t,cursor:n}=e;if(n!=null&&n.next)return n.next;let r=(t==null?void 0:t.current)||1,o=(t==null?void 0:t.pageSize)||10,i=Math.ceil((e.total||0)/o);return r{let{pagination:t,cursor:n}=e;if(n!=null&&n.prev)return n.prev;let r=(t==null?void 0:t.current)||1;return r===1?void 0:r-1},"getPreviousPageParam"),Bq=W(e=>{let t=[];return e.forEach(n=>{var r,o;t.push({...n,label:((r=n.meta)==null?void 0:r.label)??((o=n.options)==null?void 0:o.label),route:Aq(n,e),canCreate:!!n.create,canEdit:!!n.edit,canShow:!!n.show,canDelete:n.canDelete})}),t},"legacyResourceTransform"),Hq=W(e=>qc(Wa(e)).flatMap(t=>WS(t)?[t.slice(1)]:[]),"pickRouteParams"),Vq=W((e,t={})=>e.reduce((n,r)=>{let o=t[r];return typeof o<"u"&&(n[r]=o),n},{}),"prepareRouteParams"),wo=W((e,t={},n={},r={})=>{let o=Hq(e),i=Vq(o,{...t,...typeof(n==null?void 0:n.id)<"u"?{id:n.id}:{},...typeof(n==null?void 0:n.action)<"u"?{action:n.action}:{},...typeof(n==null?void 0:n.resource)<"u"?{resource:n.resource}:{},...n==null?void 0:n.params,...r});return e.replace(/:([^\/]+)/g,(a,l)=>{let s=i[l];return typeof s<"u"?`${s}`:a})},"composeRoute"),KL=k.createContext({}),Uq=W(({children:e,isProvided:t,...n})=>{let{replace:r}=Cn(),o=W(async s=>{var u;try{return await((u=n.login)==null?void 0:u.call(n,s))}catch(c){return Promise.reject(c)}},"loginFunc"),i=W(async s=>{var u;try{return await((u=n.register)==null?void 0:u.call(n,s))}catch(c){return Promise.reject(c)}},"registerFunc"),a=W(async s=>{var u;try{return await((u=n.logout)==null?void 0:u.call(n,s))}catch(c){return Promise.reject(c)}},"logoutFunc"),l=W(async s=>{var u;try{return await((u=n.checkAuth)==null?void 0:u.call(n,s)),Promise.resolve()}catch(c){return c!=null&&c.redirectPath&&r(c.redirectPath),Promise.reject(c)}},"checkAuthFunc");return k.createElement(KL.Provider,{value:{...n,login:o,logout:a,checkAuth:l,register:i,isProvided:t}},e)},"LegacyAuthContextProvider"),QL=k.createContext({}),Wq=W(({children:e,isProvided:t,...n})=>{let r=W(async u=>{var c;try{return await((c=n.login)==null?void 0:c.call(n,u))}catch(d){return console.warn("Unhandled Error in login: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleLogin"),o=W(async u=>{var c;try{return await((c=n.register)==null?void 0:c.call(n,u))}catch(d){return console.warn("Unhandled Error in register: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleRegister"),i=W(async u=>{var c;try{return await((c=n.logout)==null?void 0:c.call(n,u))}catch(d){return console.warn("Unhandled Error in logout: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleLogout"),a=W(async u=>{var c;try{let d=await((c=n.check)==null?void 0:c.call(n,u));return Promise.resolve(d)}catch(d){return console.warn("Unhandled Error in check: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleCheck"),l=W(async u=>{var c;try{let d=await((c=n.forgotPassword)==null?void 0:c.call(n,u));return Promise.resolve(d)}catch(d){return console.warn("Unhandled Error in forgotPassword: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleForgotPassword"),s=W(async u=>{var c;try{let d=await((c=n.updatePassword)==null?void 0:c.call(n,u));return Promise.resolve(d)}catch(d){return console.warn("Unhandled Error in updatePassword: refine always expects a resolved promise.",d),Promise.reject(d)}},"handleUpdatePassword");return k.createElement(QL.Provider,{value:{...n,login:r,logout:i,check:a,register:o,forgotPassword:l,updatePassword:s,isProvided:t}},e)},"AuthBindingsContextProvider"),qo=W(()=>k.useContext(KL),"useLegacyAuthContext"),wi=W(()=>k.useContext(QL),"useAuthBindingsContext"),zt=W(()=>{let e=qo(),t=wi();return t.isProvided?{isLegacy:!1,...t}:e.isProvided?{isLegacy:!0,...e,check:e.checkAuth,onError:e.checkError,getIdentity:e.getUserIdentity}:null},"useActiveAuthProvider"),YL=W(({hasPagination:e,pagination:t,configPagination:n}={})=>{let r=e===!1?"off":"server",o=(t==null?void 0:t.mode)??r,i=Ae(t==null?void 0:t.current,n==null?void 0:n.current)??1,a=Ae(t==null?void 0:t.pageSize,n==null?void 0:n.pageSize)??10;return{current:i,pageSize:a,mode:o}},"handlePaginationParams"),xO=W(e=>{let[t,n]=v.useState(!1);return v.useEffect(()=>{let r=window.matchMedia(e);r.matches!==t&&n(r.matches);let o=W(()=>n(r.matches),"listener");return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t},"useMediaQuery"),Gb=W((e,t,n,r)=>{let o=r?e(t,r,n):e(t,n);return o===t||typeof o>"u"?n??t:o},"safeTranslate");function XL(e,t,n,r,o){var i;let a={create:"Create new ",clone:`#${r??""} Clone `,edit:`#${r??""} Edit `,show:`#${r??""} Show `,list:""},l=(t==null?void 0:t.identifier)??(t==null?void 0:t.name),s=(t==null?void 0:t.label)??((i=t==null?void 0:t.meta)==null?void 0:i.label)??Iq(l,n==="list"?"plural":"singular"),u=o??s,c=Gb(e,"documentTitle.default","refine"),d=Gb(e,"documentTitle.suffix"," | refine"),f=c;return n&&l&&(f=Gb(e,`documentTitle.${l}.${n}`,`${a[n]??""}${u}${d}`,{id:r})),f}W(XL,"generateDefaultDocumentTitle");var xu=W(()=>{let{mutationMode:e,undoableTimeout:t}=v.useContext(cs);return{mutationMode:e,undoableTimeout:t}},"useMutationMode"),ZL=k.createContext({}),Gq=W(({children:e})=>{let[t,n]=v.useState(!1);return k.createElement(ZL.Provider,{value:{warnWhen:t,setWarnWhen:n}},e)},"UnsavedWarnContextProvider"),tl=W(()=>{let{warnWhenUnsavedChanges:e}=v.useContext(cs),{warnWhen:t,setWarnWhen:n}=v.useContext(ZL);return{warnWhenUnsavedChanges:e,warnWhen:!!t,setWarnWhen:n??(()=>{})}},"useWarnAboutChange"),qq=W(()=>{let{syncWithLocation:e}=v.useContext(cs);return{syncWithLocation:e}},"useSyncWithLocation"),GS=W(()=>{let{Title:e}=v.useContext(cs);return e},"useTitle"),dn=W(()=>{let{Footer:e,Header:t,Layout:n,OffLayoutArea:r,Sider:o,Title:i,hasDashboard:a,mutationMode:l,syncWithLocation:s,undoableTimeout:u,warnWhenUnsavedChanges:c,DashboardPage:d,LoginPage:f,catchAll:m,options:p,__initialized:h}=v.useContext(cs);return{__initialized:h,Footer:e,Header:t,Layout:n,OffLayoutArea:r,Sider:o,Title:i,hasDashboard:a,mutationMode:l,syncWithLocation:s,undoableTimeout:u,warnWhenUnsavedChanges:c,DashboardPage:d,LoginPage:f,catchAll:m,options:p}},"useRefineContext"),aa=W(()=>{let{options:{textTransformers:e}}=dn();return W((t="",n)=>{let r=e.humanize(t);return n==="singular"?e.singular(r):e.plural(r)},"getFriendlyName")},"useUserFriendlyName"),wO=W(e=>typeof e=="object"&&e!==null,"isNested"),Kq=W(e=>Array.isArray(e),"isArray"),Jg=W((e,t="")=>wO(e)?Object.keys(e).reduce((n,r)=>{let o=t.length?`${t}.`:"";return wO(e[r])&&Object.keys(e[r]).length&&(Kq(e[r])&&e[r].length?e[r].forEach((i,a)=>{Object.assign(n,Jg(i,`${o+r}.${a}`))}):Object.assign(n,Jg(e[r],o+r))),n[o+r]=e[r],n},{}):{[t]:e},"flattenObjectKeys");W(e=>e.split(".").map(t=>Number.isNaN(Number(t))?t:Number(t)),"propertyPathToArray");var Qq=W((e,t,n)=>{if(typeof window>"u")return;let r=new Blob([t],{type:n}),o=document.createElement("a");o.setAttribute("visibility","hidden"),o.download=e;let i=URL.createObjectURL(r);o.href=i,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>{URL.revokeObjectURL(i)})},"downloadInBrowser"),JL=W(e=>{let{current:t,pageSize:n,sorter:r,sorters:o,filters:i}=ou.parse(e.substring(1));return{parsedCurrent:t&&Number(t),parsedPageSize:n&&Number(n),parsedSorter:Ae(o,r)??[],parsedFilters:i??[]}},"parseTableParams");W(e=>{let t=ou.stringify(e);return JL(`/${t}`)},"parseTableParamsFromQuery");var CO=W(e=>{let t={skipNulls:!0,arrayFormat:"indices",encode:!1},{pagination:n,sorter:r,sorters:o,filters:i,...a}=e;return ou.stringify({...a,...n||{},sorters:Ae(o,r),filters:i},t)},"stringifyTableParams"),eD=W((e,t)=>e.operator!=="and"&&e.operator!=="or"&&t.operator!=="and"&&t.operator!=="or"?("field"in e?e.field:void 0)===("field"in t?t.field:void 0)&&e.operator===t.operator:("key"in e?e.key:void 0)===("key"in t?t.key:void 0)&&e.operator===t.operator,"compareFilters"),tD=W((e,t)=>e.field===t.field,"compareSorters"),oh=W((e,t,n=[])=>(t.filter(r=>(r.operator==="or"||r.operator==="and")&&!r.key).length>1&&su(!0,`[conditionalFilters]: You have created multiple Conditional Filters at the top level, this requires the key parameter. For more information, see https://refine.dev/docs/advanced-tutorials/data-provider/handling-filters/#top-level-multiple-conditional-filters-usage`),zS(e,t,n,eD).filter(r=>r.value!==void 0&&r.value!==null&&(r.operator!=="or"||r.operator==="or"&&r.value.length!==0)&&(r.operator!=="and"||r.operator==="and"&&r.value.length!==0))),"unionFilters"),SO=W((e,t)=>zS(e,t,tD).filter(n=>n.order!==void 0&&n.order!==null),"unionSorters"),EO=W((e,t)=>[...Al(t,e,eD),...e],"setInitialFilters"),PO=W((e,t)=>[...Al(t,e,tD),...e],"setInitialSorters");W((e,t)=>{if(!t)return;let n=t.find(r=>r.field===e);if(n)return n.order},"getDefaultSortOrder");W((e,t,n="eq")=>{let r=t==null?void 0:t.find(o=>{if(o.operator!=="or"&&o.operator!=="and"&&"field"in o){let{operator:i,field:a}=o;return a===e&&i===n}});if(r)return r.value||[]},"getDefaultFilter");W(e=>new Promise((t,n)=>{let r=new FileReader,o=W(()=>{r.result&&(r.removeEventListener("load",o,!1),t(r.result))},"resultHandler");r.addEventListener("load",o,!1),r.readAsDataURL(e.originFileObj),r.onerror=i=>(r.removeEventListener("load",o,!1),n(i))}),"file2Base64");var Wt=W(()=>{let{options:{useNewQueryKeys:e}}=dn();return{keys:ks,preferLegacyKeys:!e}},"useKeys");function Yq({v3LegacyAuthProviderCompatible:e=!1,options:t,params:n}={}){let{getPermissions:r}=qo(),{getPermissions:o}=wi(),{keys:i,preferLegacyKeys:a}=Wt(),l=Ho({queryKey:i().auth().action("permissions").get(a),queryFn:o?()=>o(n):()=>Promise.resolve(void 0),enabled:!e&&!!o,...e?{}:t,meta:{...e?{}:t==null?void 0:t.meta,...xt()}}),s=Ho({queryKey:[...i().auth().action("permissions").get(a),"v3LegacyAuthProviderCompatible"],queryFn:r?()=>r(n):()=>Promise.resolve(void 0),enabled:e&&!!r,...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?s:l}W(Yq,"usePermissions");function md({v3LegacyAuthProviderCompatible:e=!1,queryOptions:t}={}){let{getUserIdentity:n}=qo(),{getIdentity:r}=wi(),{keys:o,preferLegacyKeys:i}=Wt(),a=Ho({queryKey:o().auth().action("identity").get(i),queryFn:r??(()=>Promise.resolve({})),enabled:!e&&!!r,retry:!1,...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),l=Ho({queryKey:[...o().auth().action("identity").get(i),"v3LegacyAuthProviderCompatible"],queryFn:n??(()=>Promise.resolve({})),enabled:e&&!!n,retry:!1,...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?l:a}W(md,"useGetIdentity");var qS=W(()=>{let e=oa(),{keys:t,preferLegacyKeys:n}=Wt();return W(async()=>{await Promise.all(["check","identity","permissions"].map(r=>e.invalidateQueries(t().auth().action(r).get(n))))},"invalidate")},"useInvalidateAuthStore");function Kc({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=qS(),r=st(),o=hr(),{push:i}=Cn(),{open:a,close:l}=wu(),{logout:s}=qo(),{logout:u}=wi(),{keys:c,preferLegacyKeys:d}=Wt(),f=wn({mutationKey:c().auth().action("logout").get(d),mutationFn:u,onSuccess:async(p,h)=>{let{success:y,error:b,redirectTo:g,successNotification:x}=p,{redirectPath:w}=h??{},P=w??g;y&&(l==null||l("useLogout-error"),x&&(a==null||a(Xq(x)))),(b||!y)&&(a==null||a(qb(b))),P!==!1&&(r==="legacy"?i(P??"/login"):P&&o({to:P})),await n()},onError:p=>{a==null||a(qb(p))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),m=wn({mutationKey:[...c().auth().action("logout").get(d),"v3LegacyAuthProviderCompatible"],mutationFn:s,onSuccess:async(p,h)=>{let y=(h==null?void 0:h.redirectPath)??p;if(y!==!1){if(y){r==="legacy"?i(y):o({to:y});return}r==="legacy"?i("/login"):o({to:"/login"}),await n()}},onError:p=>{a==null||a(qb(p))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?m:f}W(Kc,"useLogout");var qb=W(e=>({key:"useLogout-error",type:"error",message:(e==null?void 0:e.name)||"Logout Error",description:(e==null?void 0:e.message)||"Something went wrong during logout"}),"buildNotification"),Xq=W(e=>({message:e.message,description:e.description,key:"logout-success",type:"success"}),"buildSuccessNotification");function Vp({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=qS(),r=st(),o=hr(),{replace:i}=Cn(),a=Qo(),{useLocation:l}=Bt(),{search:s}=l(),{close:u,open:c}=wu(),{login:d}=qo(),{login:f}=wi(),{keys:m,preferLegacyKeys:p}=Wt(),h=k.useMemo(()=>{var g;return r==="legacy"?ou.parse(s,{ignoreQueryPrefix:!0}).to:(g=a.params)==null?void 0:g.to},[r,a.params,s]),y=wn({mutationKey:m().auth().action("login").get(p),mutationFn:f,onSuccess:async({success:g,redirectTo:x,error:w,successNotification:P})=>{g&&(u==null||u("login-error"),P&&(c==null||c(Zq(P)))),(w||!g)&&(c==null||c(Kb(w))),h&&g?r==="legacy"?i(h):o({to:h,type:"replace"}):x?r==="legacy"?i(x):o({to:x,type:"replace"}):r==="legacy"&&i("/"),await n()},onError:g=>{c==null||c(Kb(g))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),b=wn({mutationKey:[...m().auth().action("login").get(p),"v3LegacyAuthProviderCompatible"],mutationFn:d,onSuccess:async g=>{h&&i(h),g!==!1&&!h&&(typeof g=="string"?r==="legacy"?i(g):o({to:g,type:"replace"}):r==="legacy"?i("/"):o({to:"/",type:"replace"})),await n(),u==null||u("login-error")},onError:g=>{c==null||c(Kb(g))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?b:y}W(Vp,"useLogin");var Kb=W(e=>({message:(e==null?void 0:e.name)||"Login Error",description:(e==null?void 0:e.message)||"Invalid credentials",key:"login-error",type:"error"}),"buildNotification"),Zq=W(e=>({message:e.message,description:e.description,key:"login-success",type:"success"}),"buildSuccessNotification");function KS({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=qS(),r=st(),o=hr(),{replace:i}=Cn(),{register:a}=qo(),{register:l}=wi(),{close:s,open:u}=wu(),{keys:c,preferLegacyKeys:d}=Wt(),f=wn({mutationKey:c().auth().action("register").get(d),mutationFn:l,onSuccess:async({success:p,redirectTo:h,error:y,successNotification:b})=>{p&&(s==null||s("register-error"),b&&(u==null||u(Jq(b)))),(y||!p)&&(u==null||u(Qb(y))),h?r==="legacy"?i(h):o({to:h,type:"replace"}):r==="legacy"&&i("/"),await n()},onError:p=>{u==null||u(Qb(p))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),m=wn({mutationKey:[...c().auth().action("register").get(d),"v3LegacyAuthProviderCompatible"],mutationFn:a,onSuccess:async p=>{p!==!1&&(p?r==="legacy"?i(p):o({to:p,type:"replace"}):r==="legacy"?i("/"):o({to:"/",type:"replace"}),await n(),s==null||s("register-error"))},onError:p=>{u==null||u(Qb(p))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?m:f}W(KS,"useRegister");var Qb=W(e=>({message:(e==null?void 0:e.name)||"Register Error",description:(e==null?void 0:e.message)||"Error while registering",key:"register-error",type:"error"}),"buildNotification"),Jq=W(e=>({message:e.message,description:e.description,key:"register-success",type:"success"}),"buildSuccessNotification");function QS({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=st(),r=hr(),{replace:o}=Cn(),{forgotPassword:i}=qo(),{forgotPassword:a}=wi(),{close:l,open:s}=wu(),{keys:u,preferLegacyKeys:c}=Wt(),d=wn({mutationKey:u().auth().action("forgotPassword").get(c),mutationFn:a,onSuccess:({success:m,redirectTo:p,error:h,successNotification:y})=>{m&&(l==null||l("forgot-password-error"),y&&(s==null||s(eK(y)))),(h||!m)&&(s==null||s(Yb(h))),p&&(n==="legacy"?o(p):r({to:p,type:"replace"}))},onError:m=>{s==null||s(Yb(m))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),f=wn({mutationKey:[...u().auth().action("forgotPassword").get(c),"v3LegacyAuthProviderCompatible"],mutationFn:i,onSuccess:m=>{m!==!1&&m&&(n==="legacy"?o(m):r({to:m,type:"replace"})),l==null||l("forgot-password-error")},onError:m=>{s==null||s(Yb(m))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?f:d}W(QS,"useForgotPassword");var Yb=W(e=>({message:(e==null?void 0:e.name)||"Forgot Password Error",description:(e==null?void 0:e.message)||"Error while resetting password",key:"forgot-password-error",type:"error"}),"buildNotification"),eK=W(e=>({message:e.message,description:e.description,key:"forgot-password-success",type:"success"}),"buildSuccessNotification");function YS({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=st(),r=hr(),{replace:o}=Cn(),{updatePassword:i}=qo(),{updatePassword:a}=wi(),{close:l,open:s}=wu(),{keys:u,preferLegacyKeys:c}=Wt(),d=Qo(),{useLocation:f}=Bt(),{search:m}=f(),p=k.useMemo(()=>n==="legacy"?ou.parse(m,{ignoreQueryPrefix:!0})??{}:d.params??{},[m,d,n]),h=wn({mutationKey:u().auth().action("updatePassword").get(c),mutationFn:async b=>a==null?void 0:a({...p,...b}),onSuccess:({success:b,redirectTo:g,error:x,successNotification:w})=>{b&&(l==null||l("update-password-error"),w&&(s==null||s(tK(w)))),(x||!b)&&(s==null||s(Xb(x))),g&&(n==="legacy"?o(g):r({to:g,type:"replace"}))},onError:b=>{s==null||s(Xb(b))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...xt()}}),y=wn({mutationKey:[...u().auth().action("updatePassword").get(c),"v3LegacyAuthProviderCompatible"],mutationFn:async b=>i==null?void 0:i({...p,...b}),onSuccess:b=>{b!==!1&&b&&(n==="legacy"?o(b):r({to:b,type:"replace"})),l==null||l("update-password-error")},onError:b=>{s==null||s(Xb(b))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...xt()}});return e?y:h}W(YS,"useUpdatePassword");var Xb=W(e=>({message:(e==null?void 0:e.name)||"Update Password Error",description:(e==null?void 0:e.message)||"Error while updating password",key:"update-password-error",type:"error"}),"buildNotification"),tK=W(e=>({message:e.message,description:e.description,key:"update-password-success",type:"success"}),"buildSuccessNotification");function nD({v3LegacyAuthProviderCompatible:e=!1,params:t}={}){let{checkAuth:n}=qo(),{check:r}=wi(),{keys:o,preferLegacyKeys:i}=Wt(),a=Ho({queryKey:o().auth().action("check").params(t).get(i),queryFn:async()=>await(r==null?void 0:r(t))??{},retry:!1,enabled:!e,meta:{...xt()}}),l=Ho({queryKey:[...o().auth().action("check").params(t).get(i),"v3LegacyAuthProviderCompatible"],queryFn:async()=>await(n==null?void 0:n(t))??{},retry:!1,enabled:e,meta:{...xt()}});return e?l:a}W(nD,"useIsAuthenticated");function Ko({v3LegacyAuthProviderCompatible:e=!1}={}){let t=st(),n=hr(),{replace:r}=Cn(),{checkError:o}=qo(),{onError:i}=wi(),{keys:a,preferLegacyKeys:l}=Wt(),{mutate:s}=Kc({v3LegacyAuthProviderCompatible:!!e}),{mutate:u}=Kc({v3LegacyAuthProviderCompatible:!!e}),c=wn({mutationKey:a().auth().action("onError").get(l),mutationFn:i,onSuccess:({logout:f,redirectTo:m})=>{if(f){u({redirectPath:m});return}if(m){t==="legacy"?r(m):n({to:m,type:"replace"});return}},meta:{...xt()}}),d=wn({mutationKey:[...a().auth().action("onError").get(l),"v3LegacyAuthProviderCompatible"],mutationFn:o,onError:f=>{s({redirectPath:f})},meta:{...xt()}});return e?d:c}W(Ko,"useOnError");var ly=W(()=>{let{isProvided:e}=qo(),{isProvided:t}=wi();return!!(t||e)},"useIsExistAuthentication"),mr=W(({isLoading:e,interval:t,onInterval:n})=>{let[r,o]=v.useState(void 0),{options:i}=dn(),{overtime:a}=i,l=t??a.interval,s=n??(a==null?void 0:a.onInterval);return v.useEffect(()=>{let u;return e&&(u=setInterval(()=>{o(c=>c===void 0?l:c+l)},l)),()=>{clearInterval(u),o(void 0)}},[e,l]),v.useEffect(()=>{s&&r&&s(r)},[r]),{elapsedTime:r}},"useLoadingOvertime"),rD=W(({resource:e,config:t,filters:n,hasPagination:r,pagination:o,sorters:i,queryOptions:a,successNotification:l,errorNotification:s,meta:u,metaData:c,liveMode:d,onLiveEvent:f,liveParams:m,dataProviderName:p,overtimeOptions:h}={})=>{let{resources:y,resource:b,identifier:g}=Je(e),x=qr(),w=Qe(),P=zt(),{mutate:C}=Ko({v3LegacyAuthProviderCompatible:!!(P!=null&&P.isLegacy)}),E=Yo(),S=qn(),{keys:M,preferLegacyKeys:O}=Wt(),R=bt(g,p,y),_=Ae(u,c),D=Ae(n,t==null?void 0:t.filters),T=Ae(i,t==null?void 0:t.sort),F=Ae(r,t==null?void 0:t.hasPagination),j=YL({pagination:o,configPagination:t==null?void 0:t.pagination,hasPagination:F}),$=j.mode==="server",L=S({resource:b,meta:_}),z={meta:L,metaData:L,filters:D,hasPagination:$,pagination:j,sorters:T,config:{...t,sort:T}},B=(a==null?void 0:a.enabled)===void 0||(a==null?void 0:a.enabled)===!0,{getList:A}=x(R);sy({resource:g,types:["*"],params:{meta:L,metaData:L,pagination:j,hasPagination:$,sort:T,sorters:T,filters:D,subscriptionType:"useList",...m},channel:`resources/${b==null?void 0:b.name}`,enabled:B,liveMode:d,onLiveEvent:f,dataProviderName:R,meta:{...u,dataProviderName:p}});let H=Ho({queryKey:M().data(R).resource(g??"").action("list").params({..._||{},filters:D,hasPagination:$,...$&&{pagination:j},...i&&{sorters:i},...(t==null?void 0:t.sort)&&{sort:t==null?void 0:t.sort}}).get(O),queryFn:({queryKey:U,pageParam:G,signal:Y})=>A({resource:(b==null?void 0:b.name)??"",pagination:j,hasPagination:$,filters:D,sort:T,sorters:T,meta:{...L,queryContext:{queryKey:U,pageParam:G,signal:Y}},metaData:{...L,queryContext:{queryKey:U,pageParam:G,signal:Y}}}),...a,enabled:typeof(a==null?void 0:a.enabled)<"u"?a==null?void 0:a.enabled:!!(b!=null&&b.name),select:U=>{var G;let Y=U,{current:re,mode:le,pageSize:J}=j;return le==="client"&&(Y={...Y,data:Y.data.slice((re-1)*J,re*J),total:Y.total}),a!=null&&a.select?(G=a==null?void 0:a.select)==null?void 0:G.call(a,Y):Y},onSuccess:U=>{var G;(G=a==null?void 0:a.onSuccess)==null||G.call(a,U);let Y=typeof l=="function"?l(U,z,g):l;E(Y)},onError:U=>{var G;C(U),(G=a==null?void 0:a.onError)==null||G.call(a,U);let Y=typeof s=="function"?s(U,z,g):s;E(Y,{key:`${g}-useList-notification`,message:w("notifications.error",{statusCode:U.statusCode},`Error (status code: ${U.statusCode})`),description:U.message,type:"error"})},meta:{...a==null?void 0:a.meta,...xt()}}),{elapsedTime:q}=mr({isLoading:H.isFetching,interval:h==null?void 0:h.interval,onInterval:h==null?void 0:h.onInterval});return{...H,overtime:{elapsedTime:q}}},"useList"),oD=W(({resource:e,id:t,queryOptions:n,successNotification:r,errorNotification:o,meta:i,metaData:a,liveMode:l,onLiveEvent:s,liveParams:u,dataProviderName:c,overtimeOptions:d})=>{let{resources:f,resource:m,identifier:p}=Je(e),h=qr(),y=Qe(),b=zt(),{mutate:g}=Ko({v3LegacyAuthProviderCompatible:!!(b!=null&&b.isLegacy)}),x=Yo(),w=qn(),{keys:P,preferLegacyKeys:C}=Wt(),E=Ae(i,a),S=bt(p,c,f),{getOne:M}=h(S),O=w({resource:m,meta:E});sy({resource:p,types:["*"],channel:`resources/${m==null?void 0:m.name}`,params:{ids:t?[t]:[],id:t,meta:O,metaData:O,subscriptionType:"useOne",...u},enabled:typeof(n==null?void 0:n.enabled)<"u"?n==null?void 0:n.enabled:typeof(m==null?void 0:m.name)<"u"&&typeof t<"u",liveMode:l,onLiveEvent:s,dataProviderName:S,meta:{...i,dataProviderName:c}});let R=Ho({queryKey:P().data(S).resource(p??"").action("one").id(t??"").params({...E||{}}).get(C),queryFn:({queryKey:D,pageParam:T,signal:F})=>M({resource:(m==null?void 0:m.name)??"",id:t,meta:{...O,queryContext:{queryKey:D,pageParam:T,signal:F}},metaData:{...O,queryContext:{queryKey:D,pageParam:T,signal:F}}}),...n,enabled:typeof(n==null?void 0:n.enabled)<"u"?n==null?void 0:n.enabled:typeof t<"u",onSuccess:D=>{var T;(T=n==null?void 0:n.onSuccess)==null||T.call(n,D);let F=typeof r=="function"?r(D,{id:t,...O},p):r;x(F)},onError:D=>{var T;g(D),(T=n==null?void 0:n.onError)==null||T.call(n,D);let F=typeof o=="function"?o(D,{id:t,...O},p):o;x(F,{key:`${t}-${p}-getOne-notification`,message:y("notifications.error",{statusCode:D.statusCode},`Error (status code: ${D.statusCode})`),description:D.message,type:"error"})},meta:{...n==null?void 0:n.meta,...xt()}}),{elapsedTime:_}=mr({isLoading:R.isFetching,interval:d==null?void 0:d.interval,onInterval:d==null?void 0:d.onInterval});return{...R,overtime:{elapsedTime:_}}},"useOne"),nK=W(({resource:e,ids:t,queryOptions:n,successNotification:r,errorNotification:o,meta:i,metaData:a,liveMode:l,onLiveEvent:s,liveParams:u,dataProviderName:c,overtimeOptions:d})=>{let{resources:f,resource:m,identifier:p}=Je(e),h=qr(),y=Qe(),b=zt(),{mutate:g}=Ko({v3LegacyAuthProviderCompatible:!!(b!=null&&b.isLegacy)}),x=Yo(),w=qn(),{keys:P,preferLegacyKeys:C}=Wt(),E=Ae(i,a),S=bt(p,c,f),M=(n==null?void 0:n.enabled)===void 0||(n==null?void 0:n.enabled)===!0,{getMany:O,getOne:R}=h(S),_=w({resource:m,meta:E});sy({resource:p,types:["*"],params:{ids:t,meta:_,metaData:_,subscriptionType:"useMany",...u},channel:`resources/${m.name}`,enabled:M,liveMode:l,onLiveEvent:s,dataProviderName:S,meta:{...i,dataProviderName:c}});let D=Ho({queryKey:P().data(S).resource(p).action("many").ids(...t).params({...E||{}}).get(C),queryFn:({queryKey:F,pageParam:j,signal:$})=>O?O({resource:m==null?void 0:m.name,ids:t,meta:{..._,queryContext:{queryKey:F,pageParam:j,signal:$}},metaData:{..._,queryContext:{queryKey:F,pageParam:j,signal:$}}}):ay(t.map(L=>R({resource:m==null?void 0:m.name,id:L,meta:{..._,queryContext:{queryKey:F,pageParam:j,signal:$}},metaData:{..._,queryContext:{queryKey:F,pageParam:j,signal:$}}}))),...n,onSuccess:F=>{var j;(j=n==null?void 0:n.onSuccess)==null||j.call(n,F);let $=typeof r=="function"?r(F,t,p):r;x($)},onError:F=>{var j;g(F),(j=n==null?void 0:n.onError)==null||j.call(n,F);let $=typeof o=="function"?o(F,t,p):o;x($,{key:`${t[0]}-${p}-getMany-notification`,message:y("notifications.error",{statusCode:F.statusCode},`Error (status code: ${F.statusCode})`),description:F.message,type:"error"})},meta:{...n==null?void 0:n.meta,...xt()}}),{elapsedTime:T}=mr({isLoading:D.isFetching,interval:d==null?void 0:d.interval,onInterval:d==null?void 0:d.onInterval});return{...D,overtime:{elapsedTime:T}}},"useMany"),iD=k.createContext({notifications:[],notificationDispatch:()=>!1}),rK=[],oK=W((e,t)=>{switch(t.type){case"ADD":return[...e.filter(n=>!(Ao(n.id,t.payload.id)&&n.resource===t.payload.resource)),{...t.payload,isRunning:!0}];case"REMOVE":return e.filter(n=>!(Ao(n.id,t.payload.id)&&n.resource===t.payload.resource));case"DECREASE_NOTIFICATION_SECOND":return e.map(n=>Ao(n.id,t.payload.id)&&n.resource===t.payload.resource?{...n,seconds:t.payload.seconds-1e3}:n);default:return e}},"undoableQueueReducer"),iK=W(({children:e})=>{let[t,n]=v.useReducer(oK,rK),r={notifications:t,notificationDispatch:n};return k.createElement(iD.Provider,{value:r},e,typeof window<"u"&&t.map(o=>k.createElement(eQ,{key:`${o.id}-${o.resource}-queue`,notification:o})))},"UndoableQueueContextProvider"),ev=W(({mutationOptions:e,overtimeOptions:t}={})=>{let{resources:n,select:r}=Je(),o=oa(),i=qr(),{mutationMode:a,undoableTimeout:l}=xu(),s=Qe(),u=zt(),{mutate:c}=Ko({v3LegacyAuthProviderCompatible:!!(u!=null&&u.isLegacy)}),d=hd(),{log:f}=vd(),{notificationDispatch:m}=qp(),p=Yo(),h=la(),y=qn(),{options:{textTransformers:b}}=dn(),{keys:g,preferLegacyKeys:x}=Wt(),w=wn({mutationFn:({id:C,values:E,resource:S,mutationMode:M,undoableTimeout:O,onCancel:R,meta:_,metaData:D,dataProviderName:T})=>{let{resource:F,identifier:j}=r(S),$=y({resource:F,meta:Ae(_,D)}),L=M??a,z=O??l;return L!=="undoable"?i(bt(j,T,n)).update({resource:F.name,id:C,variables:E,meta:$,metaData:$}):new Promise((B,A)=>{let H=W(()=>{i(bt(j,T,n)).update({resource:F.name,id:C,variables:E,meta:$,metaData:$}).then(U=>B(U)).catch(U=>A(U))},"doMutation"),q=W(()=>{A({message:"mutationCancelled"})},"cancelMutation");R&&R(q),m({type:"ADD",payload:{id:C,resource:j,cancelMutation:q,doMutation:H,seconds:z,isSilent:!!R}})})},onMutate:async({resource:C,id:E,mutationMode:S,values:M,dataProviderName:O,meta:R,metaData:_,optimisticUpdateMap:D={list:!0,many:!0,detail:!0}})=>{let{identifier:T}=r(C),{gqlMutation:F,gqlQuery:j,...$}=Ae(R,_)??{},L=iy(x)(T,bt(T,O,n),$),z=g().data(bt(T,O,n)).resource(T),B=o.getQueriesData(z.get(x)),A=S??a;return await o.cancelQueries(z.get(x),void 0,{silent:!0}),A!=="pessimistic"&&(D.list&&o.setQueriesData(z.action("list").params($??{}).get(x),H=>{if(typeof D.list=="function")return D.list(H,M,E);if(!H)return null;let q=H.data.map(U=>{var G;return((G=U.id)==null?void 0:G.toString())===(E==null?void 0:E.toString())?{id:E,...U,...M}:U});return{...H,data:q}}),D.many&&o.setQueriesData(z.action("many").get(x),H=>{if(typeof D.many=="function")return D.many(H,M,E);if(!H)return null;let q=H.data.map(U=>{var G;return((G=U.id)==null?void 0:G.toString())===(E==null?void 0:E.toString())&&(U={id:E,...U,...M}),U});return{...H,data:q}}),D.detail&&o.setQueriesData(z.action("one").id(E).params($??{}).get(x),H=>typeof D.detail=="function"?D.detail(H,M,E):H?{...H,data:{...H.data,...M}}:null)),{previousQueries:B,queryKey:L}},onSettled:(C,E,{id:S,resource:M,dataProviderName:O,invalidates:R=["list","many","detail"]})=>{let{identifier:_}=r(M);h({resource:_,dataProviderName:bt(_,O,n),invalidates:R,id:S}),m({type:"REMOVE",payload:{id:S,resource:_}})},onSuccess:(C,{id:E,resource:S,successNotification:M,dataProviderName:O,values:R,meta:_,metaData:D},T)=>{var F;let{resource:j,identifier:$}=r(S),L=b.singular($),z=bt($,O,n),B=y({resource:j,meta:Ae(_,D)}),A=typeof M=="function"?M(C,{id:E,values:R},$):M;p(A,{key:`${E}-${$}-notification`,description:s("notifications.success","Successful"),message:s("notifications.editSuccess",{resource:s(`${$}.${$}`,L)},`Successfully updated ${L}`),type:"success"}),d==null||d({channel:`resources/${j.name}`,type:"updated",payload:{ids:(F=C.data)!=null&&F.id?[C.data.id]:void 0},date:new Date,meta:{...B,dataProviderName:z}});let H;if(T){let re=o.getQueryData(T.queryKey.detail(E));H=Object.keys(R||{}).reduce((le,J)=>{var oe;return le[J]=(oe=re==null?void 0:re.data)==null?void 0:oe[J],le},{})}let{fields:q,operation:U,variables:G,...Y}=B||{};f==null||f.mutate({action:"update",resource:j.name,data:R,previousData:H,meta:{id:E,dataProviderName:z,...Y}})},onError:(C,{id:E,resource:S,errorNotification:M,values:O},R)=>{let{identifier:_}=r(S);if(R)for(let D of R.previousQueries)o.setQueryData(D[0],D[1]);if(C.message!=="mutationCancelled"){c==null||c(C);let D=b.singular(_),T=typeof M=="function"?M(C,{id:E,values:O},_):M;p(T,{key:`${E}-${_}-notification`,message:s("notifications.editError",{resource:s(`${_}.${_}`,D),statusCode:C.statusCode},`Error when updating ${D} (status code: ${C.statusCode})`),description:C.message,type:"error"})}},mutationKey:g().data().mutation("update").get(x),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:P}=mr({isLoading:w.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...w,overtime:{elapsedTime:P}}},"useUpdate"),aD=W(({mutationOptions:e,overtimeOptions:t}={})=>{let n=zt(),{mutate:r}=Ko({v3LegacyAuthProviderCompatible:!!(n!=null&&n.isLegacy)}),o=qr(),i=la(),{resources:a,select:l}=Je(),s=Qe(),u=hd(),{log:c}=vd(),d=Yo(),f=qn(),{options:{textTransformers:m}}=dn(),{keys:p,preferLegacyKeys:h}=Wt(),y=wn({mutationFn:({resource:g,values:x,meta:w,metaData:P,dataProviderName:C})=>{let{resource:E,identifier:S}=l(g),M=f({resource:E,meta:Ae(w,P)});return o(bt(S,C,a)).create({resource:E.name,variables:x,meta:M,metaData:M})},onSuccess:(g,{resource:x,successNotification:w,dataProviderName:P,invalidates:C=["list","many"],values:E,meta:S,metaData:M})=>{var O,R;let{resource:_,identifier:D}=l(x),T=m.singular(D),F=bt(D,P,a),j=f({resource:_,meta:Ae(S,M)}),$=typeof w=="function"?w(g,E,D):w;d($,{key:`create-${D}-notification`,message:s("notifications.createSuccess",{resource:s(`${D}.${D}`,T)},`Successfully created ${T}`),description:s("notifications.success","Success"),type:"success"}),i({resource:D,dataProviderName:F,invalidates:C}),u==null||u({channel:`resources/${_.name}`,type:"created",payload:{ids:(O=g==null?void 0:g.data)!=null&&O.id?[g.data.id]:void 0},date:new Date,meta:{...j,dataProviderName:F}});let{fields:L,operation:z,variables:B,...A}=j||{};c==null||c.mutate({action:"create",resource:_.name,data:E,meta:{dataProviderName:F,id:((R=g==null?void 0:g.data)==null?void 0:R.id)??void 0,...A}})},onError:(g,{resource:x,errorNotification:w,values:P})=>{r(g);let{identifier:C}=l(x),E=m.singular(C),S=typeof w=="function"?w(g,P,C):w;d(S,{key:`create-${C}-notification`,description:g.message,message:s("notifications.createError",{resource:s(`${C}.${C}`,E),statusCode:g.statusCode},`There was an error creating ${E} (status code: ${g.statusCode})`),type:"error"})},mutationKey:p().data().mutation("create").get(h),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:b}=mr({isLoading:y.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...y,overtime:{elapsedTime:b}}},"useCreate"),lD=W(({mutationOptions:e,overtimeOptions:t}={})=>{let n=zt(),{mutate:r}=Ko({v3LegacyAuthProviderCompatible:!!(n!=null&&n.isLegacy)}),o=qr(),{resources:i,select:a}=Je(),l=oa(),{mutationMode:s,undoableTimeout:u}=xu(),{notificationDispatch:c}=qp(),d=Qe(),f=hd(),{log:m}=vd(),p=Yo(),h=la(),y=qn(),{options:{textTransformers:b}}=dn(),{keys:g,preferLegacyKeys:x}=Wt(),w=wn({mutationFn:({id:C,mutationMode:E,undoableTimeout:S,resource:M,onCancel:O,meta:R,metaData:_,dataProviderName:D,values:T})=>{let{resource:F,identifier:j}=a(M),$=y({resource:F,meta:Ae(R,_)}),L=E??s,z=S??u;return L!=="undoable"?o(bt(j,D,i)).deleteOne({resource:F.name,id:C,meta:$,metaData:$,variables:T}):new Promise((B,A)=>{let H=W(()=>{o(bt(j,D,i)).deleteOne({resource:F.name,id:C,meta:$,metaData:$,variables:T}).then(U=>B(U)).catch(U=>A(U))},"doMutation"),q=W(()=>{A({message:"mutationCancelled"})},"cancelMutation");O&&O(q),c({type:"ADD",payload:{id:C,resource:j,cancelMutation:q,doMutation:H,seconds:z,isSilent:!!O}})})},onMutate:async({id:C,resource:E,mutationMode:S,dataProviderName:M,meta:O,metaData:R})=>{let{identifier:_}=a(E),{gqlMutation:D,gqlQuery:T,...F}=Ae(O,R)??{},j=iy(x)(_,bt(_,M,i),F),$=g().data(bt(_,M,i)).resource(_),L=S??s;await l.cancelQueries($.get(x),void 0,{silent:!0});let z=l.getQueriesData($.get(x));return L!=="pessimistic"&&(l.setQueriesData($.action("list").params(F??{}).get(x),B=>B?{data:B.data.filter(A=>{var H;return((H=A.id)==null?void 0:H.toString())!==C.toString()}),total:B.total-1}:null),l.setQueriesData($.action("many").get(x),B=>{if(!B)return null;let A=B.data.filter(H=>{var q;return((q=H.id)==null?void 0:q.toString())!==(C==null?void 0:C.toString())});return{...B,data:A}})),{previousQueries:z,queryKey:j}},onSettled:(C,E,{id:S,resource:M,dataProviderName:O,invalidates:R=["list","many"]})=>{let{identifier:_}=a(M);h({resource:_,dataProviderName:bt(_,O,i),invalidates:R}),c({type:"REMOVE",payload:{id:S,resource:_}})},onSuccess:(C,{id:E,resource:S,successNotification:M,dataProviderName:O,meta:R,metaData:_},D)=>{let{resource:T,identifier:F}=a(S),j=b.singular(F),$=bt(F,O,i),L=y({resource:T,meta:Ae(R,_)});l.removeQueries(D==null?void 0:D.queryKey.detail(E));let z=typeof M=="function"?M(C,E,F):M;p(z,{key:`${E}-${F}-notification`,description:d("notifications.success","Success"),message:d("notifications.deleteSuccess",{resource:d(`${F}.${F}`,j)},`Successfully deleted a ${j}`),type:"success"}),f==null||f({channel:`resources/${T.name}`,type:"deleted",payload:{ids:[E]},date:new Date,meta:{...L,dataProviderName:$}});let{fields:B,operation:A,variables:H,...q}=L||{};m==null||m.mutate({action:"delete",resource:T.name,meta:{id:E,dataProviderName:$,...q}}),l.removeQueries(D==null?void 0:D.queryKey.detail(E))},onError:(C,{id:E,resource:S,errorNotification:M},O)=>{let{identifier:R}=a(S);if(O)for(let _ of O.previousQueries)l.setQueryData(_[0],_[1]);if(C.message!=="mutationCancelled"){r(C);let _=b.singular(R),D=typeof M=="function"?M(C,E,R):M;p(D,{key:`${E}-${R}-notification`,message:d("notifications.deleteError",{resource:_,statusCode:C.statusCode},`Error (status code: ${C.statusCode})`),description:C.message,type:"error"})}},mutationKey:g().data().mutation("delete").get(x),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:P}=mr({isLoading:w.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...w,overtime:{elapsedTime:P}}},"useDelete"),aK=W(({mutationOptions:e,overtimeOptions:t}={})=>{let n=qr(),{resources:r,select:o}=Je(),i=Qe(),a=hd(),l=Yo(),s=la(),{log:u}=vd(),c=qn(),{options:{textTransformers:d}}=dn(),{keys:f,preferLegacyKeys:m}=Wt(),p=wn({mutationFn:({resource:y,values:b,meta:g,metaData:x,dataProviderName:w})=>{let{resource:P,identifier:C}=o(y),E=c({resource:P,meta:Ae(g,x)}),S=n(bt(C,w,r));return S.createMany?S.createMany({resource:P.name,variables:b,meta:E,metaData:E}):ay(b.map(M=>S.create({resource:P.name,variables:M,meta:E,metaData:E})))},onSuccess:(y,{resource:b,successNotification:g,dataProviderName:x,invalidates:w=["list","many"],values:P,meta:C,metaData:E})=>{let{resource:S,identifier:M}=o(b),O=d.plural(M),R=bt(M,x,r),_=c({resource:S,meta:Ae(C,E)}),D=typeof g=="function"?g(y,P,M):g;l(D,{key:`createMany-${M}-notification`,message:i("notifications.createSuccess",{resource:i(`${M}.${M}`,M)},`Successfully created ${O}`),description:i("notifications.success","Success"),type:"success"}),s({resource:M,dataProviderName:R,invalidates:w});let T=y==null?void 0:y.data.filter(z=>(z==null?void 0:z.id)!==void 0).map(z=>z.id);a==null||a({channel:`resources/${S.name}`,type:"created",payload:{ids:T},date:new Date,meta:{..._,dataProviderName:R}});let{fields:F,operation:j,variables:$,...L}=_||{};u==null||u.mutate({action:"createMany",resource:S.name,data:P,meta:{dataProviderName:R,ids:T,...L}})},onError:(y,{resource:b,errorNotification:g,values:x})=>{let{identifier:w}=o(b),P=typeof g=="function"?g(y,x,w):g;l(P,{key:`createMany-${w}-notification`,description:y.message,message:i("notifications.createError",{resource:i(`${w}.${w}`,w),statusCode:y.statusCode},`There was an error creating ${w} (status code: ${y.statusCode}`),type:"error"})},mutationKey:f().data().mutation("createMany").get(m),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:h}=mr({isLoading:p.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...p,overtime:{elapsedTime:h}}},"useCreateMany");W(({mutationOptions:e,overtimeOptions:t}={})=>{let{resources:n,select:r}=Je(),o=oa(),i=qr(),a=Qe(),{mutationMode:l,undoableTimeout:s}=xu(),u=zt(),{mutate:c}=Ko({v3LegacyAuthProviderCompatible:!!(u!=null&&u.isLegacy)}),{notificationDispatch:d}=qp(),f=hd(),m=Yo(),p=la(),{log:h}=vd(),y=qn(),{options:{textTransformers:b}}=dn(),{keys:g,preferLegacyKeys:x}=Wt(),w=wn({mutationFn:({ids:C,values:E,resource:S,onCancel:M,mutationMode:O,undoableTimeout:R,meta:_,metaData:D,dataProviderName:T})=>{let{resource:F,identifier:j}=r(S),$=y({resource:F,meta:Ae(_,D)}),L=O??l,z=R??s,B=i(bt(j,T,n)),A=W(()=>B.updateMany?B.updateMany({resource:F.name,ids:C,variables:E,meta:$,metaData:$}):ay(C.map(H=>B.update({resource:F.name,id:H,variables:E,meta:$,metaData:$}))),"mutationFn");return L!=="undoable"?A():new Promise((H,q)=>{let U=W(()=>{A().then(Y=>H(Y)).catch(Y=>q(Y))},"doMutation"),G=W(()=>{q({message:"mutationCancelled"})},"cancelMutation");M&&M(G),d({type:"ADD",payload:{id:C,resource:j,cancelMutation:G,doMutation:U,seconds:z,isSilent:!!M}})})},onMutate:async({resource:C,ids:E,values:S,mutationMode:M,dataProviderName:O,meta:R,metaData:_,optimisticUpdateMap:D={list:!0,many:!0,detail:!0}})=>{let{identifier:T}=r(C),{gqlMutation:F,gqlQuery:j,...$}=Ae(R,_)??{},L=iy(x)(T,bt(T,O,n),$),z=g().data(bt(T,O,n)).resource(T),B=M??l;await o.cancelQueries(z.get(x),void 0,{silent:!0});let A=o.getQueriesData(z.get(x));if(B!=="pessimistic"&&(D.list&&o.setQueriesData(z.action("list").params($??{}).get(x),H=>{if(typeof D.list=="function")return D.list(H,S,E);if(!H)return null;let q=H.data.map(U=>U.id!==void 0&&E.filter(G=>G!==void 0).map(String).includes(U.id.toString())?{...U,...S}:U);return{...H,data:q}}),D.many&&o.setQueriesData(z.action("many").get(x),H=>{if(typeof D.many=="function")return D.many(H,S,E);if(!H)return null;let q=H.data.map(U=>U.id!==void 0&&E.filter(G=>G!==void 0).map(String).includes(U.id.toString())?{...U,...S}:U);return{...H,data:q}}),D.detail))for(let H of E)o.setQueriesData(z.action("one").id(H).params($??{}).get(x),q=>{if(typeof D.detail=="function")return D.detail(q,S,H);if(!q)return null;let U={...q.data,...S};return{...q,data:U}});return{previousQueries:A,queryKey:L}},onSettled:(C,E,{ids:S,resource:M,dataProviderName:O})=>{let{identifier:R}=r(M);p({resource:R,invalidates:["list","many"],dataProviderName:bt(R,O,n)}),S.forEach(_=>p({resource:R,invalidates:["detail"],dataProviderName:bt(R,O,n),id:_})),d({type:"REMOVE",payload:{id:S,resource:R}})},onSuccess:(C,{ids:E,resource:S,meta:M,metaData:O,dataProviderName:R,successNotification:_,values:D},T)=>{let{resource:F,identifier:j}=r(S),$=b.singular(j),L=bt(j,R,n),z=y({resource:F,meta:Ae(M,O)}),B=typeof _=="function"?_(C,{ids:E,values:D},j):_;m(B,{key:`${E}-${j}-notification`,description:a("notifications.success","Successful"),message:a("notifications.editSuccess",{resource:a(`${j}.${j}`,j)},`Successfully updated ${$}`),type:"success"}),f==null||f({channel:`resources/${F.name}`,type:"updated",payload:{ids:E.map(String)},date:new Date,meta:{...z,dataProviderName:L}});let A=[];T&&E.forEach(Y=>{let re=o.getQueryData(T.queryKey.detail(Y));A.push(Object.keys(D||{}).reduce((le,J)=>{var oe;return le[J]=(oe=re==null?void 0:re.data)==null?void 0:oe[J],le},{}))});let{fields:H,operation:q,variables:U,...G}=z||{};h==null||h.mutate({action:"updateMany",resource:F.name,data:D,previousData:A,meta:{ids:E,dataProviderName:L,...G}})},onError:(C,{ids:E,resource:S,errorNotification:M,values:O},R)=>{let{identifier:_}=r(S);if(R)for(let D of R.previousQueries)o.setQueryData(D[0],D[1]);if(C.message!=="mutationCancelled"){c==null||c(C);let D=b.singular(_),T=typeof M=="function"?M(C,{ids:E,values:O},_):M;m(T,{key:`${E}-${_}-updateMany-error-notification`,message:a("notifications.editError",{resource:D,statusCode:C.statusCode},`Error when updating ${D} (status code: ${C.statusCode})`),description:C.message,type:"error"})}},mutationKey:g().data().mutation("updateMany").get(x),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:P}=mr({isLoading:w.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...w,overtime:{elapsedTime:P}}},"useUpdateMany");W(({mutationOptions:e,overtimeOptions:t}={})=>{let n=zt(),{mutate:r}=Ko({v3LegacyAuthProviderCompatible:!!(n!=null&&n.isLegacy)}),{mutationMode:o,undoableTimeout:i}=xu(),a=qr(),{notificationDispatch:l}=qp(),s=Qe(),u=hd(),c=Yo(),d=la(),{log:f}=vd(),{resources:m,select:p}=Je(),h=oa(),y=qn(),{options:{textTransformers:b}}=dn(),{keys:g,preferLegacyKeys:x}=Wt(),w=wn({mutationFn:({resource:C,ids:E,mutationMode:S,undoableTimeout:M,onCancel:O,meta:R,metaData:_,dataProviderName:D,values:T})=>{let{resource:F,identifier:j}=p(C),$=y({resource:F,meta:Ae(R,_)}),L=S??o,z=M??i,B=a(bt(j,D,m)),A=W(()=>B.deleteMany?B.deleteMany({resource:F.name,ids:E,meta:$,metaData:$,variables:T}):ay(E.map(H=>B.deleteOne({resource:F.name,id:H,meta:$,metaData:$,variables:T}))),"mutationFn");return L!=="undoable"?A():new Promise((H,q)=>{let U=W(()=>{A().then(Y=>H(Y)).catch(Y=>q(Y))},"doMutation"),G=W(()=>{q({message:"mutationCancelled"})},"cancelMutation");O&&O(G),l({type:"ADD",payload:{id:E,resource:j,cancelMutation:G,doMutation:U,seconds:z,isSilent:!!O}})})},onMutate:async({ids:C,resource:E,mutationMode:S,dataProviderName:M,meta:O,metaData:R})=>{let{identifier:_}=p(E),{gqlMutation:D,gqlQuery:T,...F}=Ae(O,R)??{},j=iy(x)(_,bt(_,M,m),F),$=g().data(bt(_,M,m)).resource(_),L=S??o;await h.cancelQueries($.get(x),void 0,{silent:!0});let z=h.getQueriesData($.get(x));if(L!=="pessimistic"){h.setQueriesData($.action("list").params(F??{}).get(x),B=>B?{data:B.data.filter(A=>A.id&&!C.map(String).includes(A.id.toString())),total:B.total-1}:null),h.setQueriesData($.action("many").get(x),B=>{if(!B)return null;let A=B.data.filter(H=>H.id?!C.map(String).includes(H.id.toString()):!1);return{...B,data:A}});for(let B of C)h.setQueriesData($.action("one").id(B).params(F).get(x),A=>!A||A.data.id===B?null:{...A})}return{previousQueries:z,queryKey:j}},onSettled:(C,E,{resource:S,ids:M,dataProviderName:O,invalidates:R=["list","many"]})=>{let{identifier:_}=p(S);d({resource:_,dataProviderName:bt(_,O,m),invalidates:R}),l({type:"REMOVE",payload:{id:M,resource:_}})},onSuccess:(C,{ids:E,resource:S,meta:M,metaData:O,dataProviderName:R,successNotification:_},D)=>{let{resource:T,identifier:F}=p(S),j=bt(F,R,m),$=y({resource:T,meta:Ae(M,O)});E.forEach(q=>h.removeQueries(D==null?void 0:D.queryKey.detail(q)));let L=typeof _=="function"?_(C,E,F):_;c(L,{key:`${E}-${F}-notification`,description:s("notifications.success","Success"),message:s("notifications.deleteSuccess",{resource:s(`${F}.${F}`,F)},`Successfully deleted ${F}`),type:"success"}),u==null||u({channel:`resources/${T.name}`,type:"deleted",payload:{ids:E},date:new Date,meta:{...$,dataProviderName:j}});let{fields:z,operation:B,variables:A,...H}=$||{};f==null||f.mutate({action:"deleteMany",resource:T.name,meta:{ids:E,dataProviderName:j,...H}}),E.forEach(q=>h.removeQueries(D==null?void 0:D.queryKey.detail(q)))},onError:(C,{ids:E,resource:S,errorNotification:M},O)=>{let{identifier:R}=p(S);if(O)for(let _ of O.previousQueries)h.setQueryData(_[0],_[1]);if(C.message!=="mutationCancelled"){r(C);let _=b.singular(R),D=typeof M=="function"?M(C,E,R):M;c(D,{key:`${E}-${R}-notification`,message:s("notifications.deleteError",{resource:_,statusCode:C.statusCode},`Error (status code: ${C.statusCode})`),description:C.message,type:"error"})}},mutationKey:g().data().mutation("deleteMany").get(x),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:P}=mr({isLoading:w.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...w,overtime:{elapsedTime:P}}},"useDeleteMany");var sD=W(e=>{var t;let n=qr(),{resource:r}=Je(),{getApiUrl:o}=n(e??((t=Ae(r==null?void 0:r.meta,r==null?void 0:r.options))==null?void 0:t.dataProviderName));return o()},"useApiUrl"),uD=W(({url:e,method:t,config:n,queryOptions:r,successNotification:o,errorNotification:i,meta:a,metaData:l,dataProviderName:s,overtimeOptions:u})=>{let c=qr(),d=zt(),{mutate:f}=Ko({v3LegacyAuthProviderCompatible:!!(d!=null&&d.isLegacy)}),m=Qe(),p=Yo(),h=qn(),{keys:y,preferLegacyKeys:b}=Wt(),g=Ae(a,l),{custom:x}=c(s),w=h({meta:g});if(x){let P=Ho({queryKey:y().data(s).mutation("custom").params({method:t,url:e,...n,...g||{}}).get(b),queryFn:({queryKey:E,pageParam:S,signal:M})=>x({url:e,method:t,...n,meta:{...w,queryContext:{queryKey:E,pageParam:S,signal:M}},metaData:{...w,queryContext:{queryKey:E,pageParam:S,signal:M}}}),...r,onSuccess:E=>{var S;(S=r==null?void 0:r.onSuccess)==null||S.call(r,E);let M=typeof o=="function"?o(E,{...n,...w}):o;p(M)},onError:E=>{var S;f(E),(S=r==null?void 0:r.onError)==null||S.call(r,E);let M=typeof i=="function"?i(E,{...n,...w}):i;p(M,{key:`${t}-notification`,message:m("notifications.error",{statusCode:E.statusCode},`Error (status code: ${E.statusCode})`),description:E.message,type:"error"})},meta:{...r==null?void 0:r.meta,...xt()}}),{elapsedTime:C}=mr({isLoading:P.isFetching,interval:u==null?void 0:u.interval,onInterval:u==null?void 0:u.onInterval});return{...P,overtime:{elapsedTime:C}}}throw Error("Not implemented custom on data provider.")},"useCustom");W(({mutationOptions:e,overtimeOptions:t}={})=>{let n=zt(),{mutate:r}=Ko({v3LegacyAuthProviderCompatible:!!(n!=null&&n.isLegacy)}),o=Yo(),i=qr(),a=Qe(),l=qn(),{keys:s,preferLegacyKeys:u}=Wt(),c=wn(({url:f,method:m,values:p,meta:h,metaData:y,dataProviderName:b,config:g})=>{let x=l({meta:Ae(h,y)}),{custom:w}=i(b);if(w)return w({url:f,method:m,payload:p,meta:x,metaData:x,headers:{...g==null?void 0:g.headers}});throw Error("Not implemented custom on data provider.")},{onSuccess:(f,{successNotification:m,config:p,meta:h,metaData:y})=>{let b=typeof m=="function"?m(f,{...p,...Ae(h,y)||{}}):m;o(b)},onError:(f,{errorNotification:m,method:p,config:h,meta:y,metaData:b})=>{r(f);let g=typeof m=="function"?m(f,{...h,...Ae(y,b)||{}}):m;o(g,{key:`${p}-notification`,message:a("notifications.error",{statusCode:f.statusCode},`Error (status code: ${f.statusCode})`),description:f.message,type:"error"})},mutationKey:s().data().mutation("customMutation").get(u),...e,meta:{...e==null?void 0:e.meta,...xt()}}),{elapsedTime:d}=mr({isLoading:c.isLoading,interval:t==null?void 0:t.interval,onInterval:t==null?void 0:t.onInterval});return{...c,overtime:{elapsedTime:d}}},"useCustomMutation");var lK=W(()=>({}),"defaultDataProvider"),XS=k.createContext(lK()),sK=W(({children:e,...t})=>{let n;return!t.getList||!t.getOne?n=t:n={default:t},k.createElement(XS.Provider,{value:n},e)},"DataContextProvider"),qr=W(()=>{let e=v.useContext(XS);return v.useCallback(t=>{if(t){if(!(e!=null&&e[t]))throw new Error(`"${t}" Data provider not found`);return e[t]}if(e.default)return e.default;throw new Error('There is no "default" data provider. Please pass dataProviderName.')},[e])},"useDataProvider");W(({resource:e,config:t,filters:n,hasPagination:r,pagination:o,sorters:i,queryOptions:a,successNotification:l,errorNotification:s,meta:u,metaData:c,liveMode:d,onLiveEvent:f,liveParams:m,dataProviderName:p,overtimeOptions:h})=>{let{resources:y,resource:b,identifier:g}=Je(e),x=qr(),w=Qe(),P=zt(),{mutate:C}=Ko({v3LegacyAuthProviderCompatible:!!(P!=null&&P.isLegacy)}),E=Yo(),S=qn(),{keys:M,preferLegacyKeys:O}=Wt(),R=bt(g,p,y),_=Ae(u,c),D=Ae(n,t==null?void 0:t.filters),T=Ae(i,t==null?void 0:t.sort),F=Ae(r,t==null?void 0:t.hasPagination),j=YL({pagination:o,configPagination:t==null?void 0:t.pagination,hasPagination:F}),$=j.mode==="server",L={meta:_,metaData:_,filters:D,hasPagination:$,pagination:j,sorters:T,config:{...t,sort:T}},z=(a==null?void 0:a.enabled)===void 0||(a==null?void 0:a.enabled)===!0,B=S({resource:b,meta:_}),{getList:A}=x(R);sy({resource:g,types:["*"],params:{meta:B,metaData:B,pagination:j,hasPagination:$,sort:T,sorters:T,filters:D,subscriptionType:"useList",...m},channel:`resources/${b.name}`,enabled:z,liveMode:d,onLiveEvent:f,dataProviderName:R,meta:{...B,dataProviderName:p}});let H=DV({queryKey:M().data(R).resource(g).action("infinite").params({..._||{},filters:D,hasPagination:$,...$&&{pagination:j},...i&&{sorters:i},...(t==null?void 0:t.sort)&&{sort:t==null?void 0:t.sort}}).get(O),queryFn:({queryKey:U,pageParam:G,signal:Y})=>{let re={...j,current:G};return A({resource:b.name,pagination:re,hasPagination:$,filters:D,sort:T,sorters:T,meta:{...B,queryContext:{queryKey:U,pageParam:G,signal:Y}},metaData:{...B,queryContext:{queryKey:U,pageParam:G,signal:Y}}}).then(({data:le,total:J,...oe})=>({data:le,total:J,pagination:re,...oe}))},getNextPageParam:U=>jq(U),getPreviousPageParam:U=>zq(U),...a,onSuccess:U=>{var G;(G=a==null?void 0:a.onSuccess)==null||G.call(a,U);let Y=typeof l=="function"?l(U,L,g):l;E(Y)},onError:U=>{var G;C(U),(G=a==null?void 0:a.onError)==null||G.call(a,U);let Y=typeof s=="function"?s(U,L,g):s;E(Y,{key:`${g}-useInfiniteList-notification`,message:w("notifications.error",{statusCode:U.statusCode},`Error (status code: ${U.statusCode})`),description:U.message,type:"error"})},meta:{...a==null?void 0:a.meta,...xt()}}),{elapsedTime:q}=mr({isLoading:H.isFetching,interval:h==null?void 0:h.interval,onInterval:h==null?void 0:h.onInterval});return{...H,overtime:{elapsedTime:q}}},"useInfiniteList");var Up=k.createContext(void 0),uK=W(({liveProvider:e,children:t})=>k.createElement(Up.Provider,{value:e},t),"LiveContextProvider"),cK=W(e=>{let t=v.useRef(e);return Ao(t.current,e)||(t.current=e),t.current},"useMemoized"),cD=W((e,t)=>{let n=cK(t);return v.useMemo(e,n)},"useDeepMemo"),Wp=k.createContext({resources:[]}),dK=W(({resources:e,children:t})=>{let n=cD(()=>Bq(e??[]),[e]);return k.createElement(Wp.Provider,{value:{resources:n}},t)},"ResourceContextProvider"),dD=k.createContext("new"),fK=dD.Provider,st=W(()=>k.useContext(dD),"useRouterType"),fD={},Gp=v.createContext(fD),pK=W(({children:e,router:t})=>k.createElement(Gp.Provider,{value:t??fD},e),"RouterBindingsProvider"),mK=W(()=>{let e=v.useContext(Gp);return k.useMemo(()=>(e==null?void 0:e.parse)??(()=>()=>({})),[e==null?void 0:e.parse])()},"useParse"),Qo=W(()=>{let e=mK();return k.useMemo(()=>e(),[e])},"useParsed");function Je(e){let{resources:t}=v.useContext(Wp),n=st(),r=Qo(),o={resourceName:e&&typeof e!="string"?e.resourceName:e,resourceNameOrRouteName:e&&typeof e!="string"?e.resourceNameOrRouteName:e,recordItemId:e&&typeof e!="string"?e.recordItemId:void 0},i=W((d,f=!0)=>{let m=ur(d,t,n==="legacy");if(m)return{resource:m,identifier:m.identifier??m.name};if(f){let p={name:d,identifier:d},h=p.identifier??p.name;return{resource:p,identifier:h}}},"select"),a=hK(),{useParams:l}=Bt(),s=l();if(n==="legacy"){let d=o.resourceNameOrRouteName?o.resourceNameOrRouteName:s.resource,f=d?a(d):void 0,m=(o==null?void 0:o.recordItemId)??s.id,p=s.action,h=(o==null?void 0:o.resourceName)??(f==null?void 0:f.name),y=(f==null?void 0:f.identifier)??(f==null?void 0:f.name);return{resources:t,resource:f,resourceName:h,id:m,action:p,select:i,identifier:y}}let u,c=typeof e=="string"?e:o==null?void 0:o.resourceNameOrRouteName;if(c){let d=ur(c,t);d?u=d:u={name:c}}else r!=null&&r.resource&&(u=r.resource);return{resources:t,resource:u,resourceName:u==null?void 0:u.name,id:r.id,action:r.action,select:i,identifier:(u==null?void 0:u.identifier)??(u==null?void 0:u.name)}}W(Je,"useResource");var hK=W(()=>{let{resources:e}=v.useContext(Wp);return v.useCallback(t=>ur(t,e,!0)||{name:t,route:t},[e])},"useResourceWithRoute"),la=W(()=>{let{resources:e}=Je(),t=oa(),{keys:n,preferLegacyKeys:r}=Wt();return v.useCallback(async({resource:o,dataProviderName:i,invalidates:a,id:l,invalidationFilters:s={type:"all",refetchType:"active"},invalidationOptions:u={cancelRefetch:!1}})=>{if(a===!1)return;let c=bt(o,i,e),d=n().data(c).resource(o??"");await Promise.all(a.map(f=>{switch(f){case"all":return t.invalidateQueries(n().data(c).get(r),s,u);case"list":return t.invalidateQueries(d.action("list").get(r),s,u);case"many":return t.invalidateQueries(d.action("many").get(r),s,u);case"resourceAll":return t.invalidateQueries(d.get(r),s,u);case"detail":return t.invalidateQueries(d.action("one").id(l||"").get(r),s,u);default:return}}))},[])},"useInvalidate"),sy=W(({resource:e,params:t,channel:n,types:r,enabled:o=!0,liveMode:i,onLiveEvent:a,dataProviderName:l,meta:s})=>{var u;let{resource:c,identifier:d}=Je(e),f=v.useContext(Up),{liveMode:m,onLiveEvent:p}=v.useContext(cs),h=i??m,y=la(),b=l??(s==null?void 0:s.dataProviderName)??((u=c==null?void 0:c.meta)==null?void 0:u.dataProviderName);v.useEffect(()=>{let g,x=W(w=>{h==="auto"&&y({resource:d,dataProviderName:b,invalidates:["resourceAll"],invalidationFilters:{type:"active",refetchType:"active"},invalidationOptions:{cancelRefetch:!1}}),a==null||a(w),p==null||p(w)},"callback");return h&&h!=="off"&&o&&(g=f==null?void 0:f.subscribe({channel:n,params:{resource:c==null?void 0:c.name,...t},types:r,callback:x,dataProviderName:b,meta:{...s,dataProviderName:b}})),()=>{g&&(f==null||f.unsubscribe(g))}},[o])},"useResourceSubscription"),pD=W(e=>{let{liveMode:t}=v.useContext(cs);return e??t},"useLiveMode");W(({params:e,channel:t,types:n=["*"],enabled:r=!0,onLiveEvent:o,dataProviderName:i="default",meta:a})=>{let l=v.useContext(Up);v.useEffect(()=>{let s;return r&&(s=l==null?void 0:l.subscribe({channel:t,params:e,types:n,callback:o,dataProviderName:i,meta:{...a,dataProviderName:i}})),()=>{s&&(l==null||l.unsubscribe(s))}},[r])},"useSubscription");var hd=W(()=>{let e=v.useContext(Up);return e==null?void 0:e.publish},"usePublish"),qp=W(()=>{let{notifications:e,notificationDispatch:t}=v.useContext(iD);return{notifications:e,notificationDispatch:t}},"useCancelNotification"),ZS=v.createContext({}),gK=W(({open:e,close:t,children:n})=>k.createElement(ZS.Provider,{value:{open:e,close:t}},n),"NotificationContextProvider"),wu=W(()=>{let{open:e,close:t}=v.useContext(ZS);return{open:e,close:t}},"useNotification"),Yo=W(()=>{let{open:e}=wu();return v.useCallback((t,n)=>{t!==!1&&(t?e==null||e(t):n&&(e==null||e(n)))},[])},"useHandleNotification"),gd=k.createContext({}),vK=W(({children:e,i18nProvider:t})=>k.createElement(gd.Provider,{value:{i18nProvider:t}},e),"TranslationContextProvider");W(()=>{let{i18nProvider:e}=v.useContext(gd);return v.useCallback(t=>e==null?void 0:e.changeLocale(t),[])},"useSetLocale");var Qe=W(()=>{let{i18nProvider:e}=v.useContext(gd);return v.useMemo(()=>{function t(n,r,o){return(e==null?void 0:e.translate(n,r,o))??o??(typeof r=="string"&&typeof o>"u"?r:n)}return W(t,"translate"),t},[e])},"useTranslate");W(()=>{let{i18nProvider:e}=v.useContext(gd);return v.useCallback(()=>e==null?void 0:e.getLocale(),[])},"useGetLocale");W(({resourceName:e,resource:t,sorter:n,sorters:r,filters:o,maxItemCount:i,pageSize:a=20,mapData:l=W(h=>h,"mapData"),exportOptions:s,unparseConfig:u,meta:c,metaData:d,dataProviderName:f,onError:m,download:p}={})=>{let[h,y]=v.useState(!1),b=qr(),g=qn(),{resource:x,resources:w,identifier:P}=Je(Ae(t,e)),C=`${aa()(P,"plural")}-${new Date().toLocaleString()}`,{getList:E}=b(bt(P,f,w)),S=g({resource:x,meta:Ae(c,d)});return{isLoading:h,triggerExport:W(async()=>{y(!0);let M=[],O=1,R=!0;for(;R;)try{let{data:F,total:j}=await E({resource:(x==null?void 0:x.name)??"",filters:o,sort:Ae(r,n),sorters:Ae(r,n),pagination:{current:O,pageSize:a,mode:"server"},meta:S,metaData:S});O++,M.push(...F),i&&M.length>=i&&(M=M.slice(0,i),R=!1),j===M.length&&(R=!1)}catch(F){y(!1),R=!1,m==null||m(F);return}let _=typeof u<"u"&&u!==null;su(_&&typeof s<"u"&&s!==null,`[useExport]: resource: "${P}" Both \`unparseConfig\` and \`exportOptions\` are set, \`unparseConfig\` will take precedence`);let D={filename:C,useKeysAsHeaders:!0,useBom:!0,title:"My Generated Report",quoteStrings:'"',...s};su((s==null?void 0:s.decimalSeparator)!==void 0,`[useExport]: resource: "${P}" Use of \`decimalSeparator\` no longer supported, please use \`mapData\` instead. See https://refine.dev/docs/api-reference/core/hooks/import-export/useExport/`),_?u={quotes:!0,...u}:u={columns:D.useKeysAsHeaders?void 0:D.headers,delimiter:D.fieldSeparator,header:D.showLabels||D.useKeysAsHeaders,quoteChar:D.quoteStrings,quotes:!0};let T=PL.unparse(M.map(l),u);if(D.showTitle&&(T=`${D.title}\r ${T}`),typeof window<"u"&&T.length>0&&(p??!0)){let F=D.useTextFile?".txt":".csv",j=`text/${D.useTextFile?"plain":"csv"};charset=utf8;`,$=`${(D.filename??"download").replace(/ /g,"_")}${F}`;Qq($,`${D!=null&&D.useBom?"\uFEFF":""}${T}`,j)}return y(!1),T},"triggerExport")}},"useExport");var yK=W(({resource:e,action:t,id:n,onMutationSuccess:r,onMutationError:o,redirect:i,successNotification:a,errorNotification:l,meta:s,metaData:u,queryMeta:c,mutationMeta:d,mutationMode:f,liveMode:m,onLiveEvent:p,liveParams:h,undoableTimeout:y,dataProviderName:b,invalidates:g,queryOptions:x,createMutationOptions:w,updateMutationOptions:P,overtimeOptions:C,autoSave:E,optimisticUpdateMap:S}={})=>{let M=la(),{options:O}=dn(),R=qn(),{resource:_,id:D,action:T,identifier:F}=Je(e),{identifier:j}=Je(),$=W(()=>e&&e!==j?n:n??D,"getDefaultId")(),[L,z]=k.useState($);k.useEffect(()=>{z($)},[$]);let B=W(()=>t||(T==="edit"||T==="clone"?T:"create"),"getAction")(),A=R({resource:_,meta:Ae(s,u)}),{mutationMode:H}=xu(),q=f??H,U=B==="create",G=B==="edit",Y=B==="clone";su((Y||G)&&!!e&&!n&&(x==null?void 0:x.enabled)!==!1,`[useForm]: action: "${B}", resource: "${F}", id: ${L} If you don't use the \`setId\` method to set the \`id\`, you should pass the \`id\` prop to \`useForm\`. Otherwise, \`useForm\` will not be able to infer the \`id\` from the current URL. See https://refine.dev/docs/api-reference/core/hooks/useForm/#resource`);let re=Nq({redirectFromProps:i,action:B,redirectOptions:O.redirect}),le=oD({resource:F,id:L??"",queryOptions:{enabled:L!==void 0&&(G||Y),...x},liveMode:m,onLiveEvent:p,liveParams:h,meta:{...A,...c},metaData:{...A,...c},dataProviderName:b}),{isFetching:J}=le,oe=aD({mutationOptions:w}),{mutate:ce,isLoading:ve}=oe,me=ev({mutationOptions:P}),{mutate:ke,isLoading:be}=me,ie=ev({}),{setWarnWhen:ye}=tl(),V=bK(),Q=W(async ee=>{ye(!1);let se=W(Ce=>{V({redirect:re,resource:_,id:Ce,meta:Ae(s,u)})},"onSuccess");return q!=="pessimistic"&&setTimeout(()=>{se()}),new Promise((Ce,_e)=>{if(q!=="pessimistic"&&Ce(),!!_)return ce({values:ee,resource:F??_.name,successNotification:a,errorNotification:l,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:g},{onSuccess:($e,X,Ee)=>{var De;r&&r($e,ee,Ee);let Te=(De=$e==null?void 0:$e.data)==null?void 0:De.id;se(Te),Ce($e)},onError:($e,X,Ee)=>{if(o)return o($e,ee,Ee);_e()}})})},"onFinishCreate");k.useEffect(()=>()=>{E!=null&&E.invalidateOnUnmount&&ie.status==="success"&&M({id:L,invalidates:g||["list","many","detail"],dataProviderName:b,resource:F})},[E==null?void 0:E.invalidateOnUnmount,ie.status]);let Z=W(ee=>{if(!_||!G)return;let se={id:L??"",values:ee,resource:F??_.name,successNotification:!1,errorNotification:!1,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:[],mutationMode:"pessimistic"};return ie.mutate(se,{onSuccess:(Ce,_e,$e)=>{r&&r(Ce,ee,$e,!0)},onError:(Ce,_e,$e)=>{if(o)return o(Ce,ee,$e,!0)}})},"onFinishAutoSaveMutation"),ae=kL(ee=>Z(ee),(E==null?void 0:E.debounce)||1e3),te=U||Y?{formLoading:J||ve,mutationResult:oe,onFinish:Q}:{formLoading:J||be,mutationResult:me,onFinish:W(async ee=>{if(ye(!1),!_)return;let se={id:L??"",values:ee,resource:F??_.name,mutationMode:q,undoableTimeout:y,successNotification:a,errorNotification:l,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:g,optimisticUpdateMap:S},Ce=W(()=>{V({redirect:re,resource:_,id:L,meta:Ae(s,u)})},"onSuccess");return q!=="pessimistic"&&setTimeout(()=>{Ce()}),new Promise((_e,$e)=>(q!=="pessimistic"&&_e(),setTimeout(()=>{ke(se,{onSuccess:(X,Ee,De)=>{r&&r(X,ee,De),q==="pessimistic"&&Ce(),_e(X)},onError:(X,Ee,De)=>{if(o)return o(X,ee,De);$e()}})})))},"onFinishUpdate")},{elapsedTime:K}=mr({isLoading:te.mutationResult.isLoading||le.isFetching,interval:C==null?void 0:C.interval,onInterval:C==null?void 0:C.onInterval});return{...te,queryResult:le,onFinishAutoSave:ae,autoSaveProps:{status:ie.status,data:ie.data,error:ie.error},id:L,setId:z,redirect:(ee,se)=>{V({redirect:ee!==void 0?ee:G?"list":"edit",resource:_,id:se??L,meta:Ae(s,u)})},overtime:{elapsedTime:K}}},"useForm"),bK=W(()=>{let{show:e,edit:t,list:n,create:r}=Cn();return v.useCallback(({redirect:o,resource:i,id:a,meta:l={}})=>{if(o&&i)return i.show&&o==="show"&&a?e(i,a,void 0,l):i.edit&&o==="edit"&&a?t(i,a,void 0,l):i.create&&o==="create"?r(i,void 0,l):n(i,"push",l)},[])},"useRedirectionAfterSubmission"),Kp=W(()=>{let e=st(),{resource:t,resources:n}=Je(),r=Qo();return k.useCallback(({resource:o,action:i,meta:a})=>{var l;let s=o||t;if(!s)return;let u=(l=Jr(s,n,e==="legacy").find(c=>c.action===i))==null?void 0:l.route;return u?wo(u,s==null?void 0:s.meta,r,a):void 0},[n,t,r])},"useGetToPath"),hr=W(()=>{let e=v.useContext(Gp),{select:t}=Je(),n=Kp(),r=k.useMemo(()=>(e==null?void 0:e.go)??(()=>()=>{}),[e==null?void 0:e.go])();return v.useCallback(o=>{if(typeof o.to!="object")return r({...o,to:o.to});let{resource:i}=t(o.to.resource);xK(o.to,i);let a=n({resource:i,action:o.to.action,meta:{id:o.to.id,...o.to.meta}});return r({...o,to:a})},[t,r])},"useGo"),xK=W((e,t)=>{if(!(e!=null&&e.action)||!(e!=null&&e.resource))throw new Error('[useGo]: "action" or "resource" is required.');if(["edit","show","clone"].includes(e==null?void 0:e.action)&&!e.id)throw new Error(`[useGo]: [action: ${e.action}] requires an "id" for resource [resource: ${e.resource}]`);if(!t[e.action])throw new Error(`[useGo]: [action: ${e.action}] is not defined for [resource: ${e.resource}]`)},"handleResourceErrors"),uy=W(()=>{let e=v.useContext(Gp);return k.useMemo(()=>(e==null?void 0:e.back)??(()=>()=>{}),[e==null?void 0:e.back])()},"useBack"),Cn=W(()=>{let{resources:e}=Je(),t=st(),{useHistory:n}=Bt(),r=n(),o=Qo(),i=hr(),a=uy(),l=W((m,p="push")=>{t==="legacy"?r[p](m):i({to:m,type:p})},"handleUrl"),s=W((m,p={})=>{var h;if(t==="legacy"){let g=typeof m=="string"?ur(m,e,!0)??{name:m,route:m}:m,x=Jr(g,e,!0).find(w=>w.action==="create");return x?wo(x.route,g==null?void 0:g.meta,o,p):""}let y=typeof m=="string"?ur(m,e)??{name:m}:m,b=(h=Jr(y,e).find(g=>g.action==="create"))==null?void 0:h.route;return b?i({to:wo(b,y==null?void 0:y.meta,o,p),type:"path"}):""},"createUrl"),u=W((m,p,h={})=>{var y;let b=encodeURIComponent(p);if(t==="legacy"){let w=typeof m=="string"?ur(m,e,!0)??{name:m,route:m}:m,P=Jr(w,e,!0).find(C=>C.action==="edit");return P?wo(P.route,w==null?void 0:w.meta,o,{...h,id:b}):""}let g=typeof m=="string"?ur(m,e)??{name:m}:m,x=(y=Jr(g,e).find(w=>w.action==="edit"))==null?void 0:y.route;return x?i({to:wo(x,g==null?void 0:g.meta,o,{...h,id:b}),type:"path"}):""},"editUrl"),c=W((m,p,h={})=>{var y;let b=encodeURIComponent(p);if(t==="legacy"){let w=typeof m=="string"?ur(m,e,!0)??{name:m,route:m}:m,P=Jr(w,e,!0).find(C=>C.action==="clone");return P?wo(P.route,w==null?void 0:w.meta,o,{...h,id:b}):""}let g=typeof m=="string"?ur(m,e)??{name:m}:m,x=(y=Jr(g,e).find(w=>w.action==="clone"))==null?void 0:y.route;return x?i({to:wo(x,g==null?void 0:g.meta,o,{...h,id:b}),type:"path"}):""},"cloneUrl"),d=W((m,p,h={})=>{var y;let b=encodeURIComponent(p);if(t==="legacy"){let w=typeof m=="string"?ur(m,e,!0)??{name:m,route:m}:m,P=Jr(w,e,!0).find(C=>C.action==="show");return P?wo(P.route,w==null?void 0:w.meta,o,{...h,id:b}):""}let g=typeof m=="string"?ur(m,e)??{name:m}:m,x=(y=Jr(g,e).find(w=>w.action==="show"))==null?void 0:y.route;return x?i({to:wo(x,g==null?void 0:g.meta,o,{...h,id:b}),type:"path"}):""},"showUrl"),f=W((m,p={})=>{var h;if(t==="legacy"){let g=typeof m=="string"?ur(m,e,!0)??{name:m,route:m}:m,x=Jr(g,e,!0).find(w=>w.action==="list");return x?wo(x.route,g==null?void 0:g.meta,o,p):""}let y=typeof m=="string"?ur(m,e)??{name:m}:m,b=(h=Jr(y,e).find(g=>g.action==="list"))==null?void 0:h.route;return b?i({to:wo(b,y==null?void 0:y.meta,o,p),type:"path"}):""},"listUrl");return{create:W((m,p="push",h={})=>{l(s(m,h),p)},"create"),createUrl:s,edit:W((m,p,h="push",y={})=>{l(u(m,p,y),h)},"edit"),editUrl:u,clone:W((m,p,h="push",y={})=>{l(c(m,p,y),h)},"clone"),cloneUrl:c,show:W((m,p,h="push",y={})=>{l(d(m,p,y),h)},"show"),showUrl:d,list:W((m,p="push",h={})=>{l(f(m,h),p)},"list"),listUrl:f,push:W((m,...p)=>{t==="legacy"?r.push(m,...p):i({to:m,type:"push"})},"push"),replace:W((m,...p)=>{t==="legacy"?r.replace(m,...p):i({to:m,type:"replace"})},"replace"),goBack:W(()=>{t==="legacy"?r.goBack():a()},"goBack")}},"useNavigation");W(({resource:e,id:t,successNotification:n,errorNotification:r,meta:o,metaData:i,liveMode:a,onLiveEvent:l,dataProviderName:s,queryOptions:u,overtimeOptions:c}={})=>{let{resource:d,id:f,identifier:m}=Je(e),{identifier:p}=Je(),h=qn(),y=W(()=>e&&e!==p?t:t??f,"getDefaultId")(),[b,g]=v.useState(y);k.useEffect(()=>{g(y)},[y]);let x=h({resource:d,meta:Ae(o,i)});su(!!e&&!t,`[useShow]: resource: "${m}", id: ${t} If you don't use the \`setShowId\` method to set the \`showId\`, you should pass the \`id\` prop to \`useShow\`. Otherwise, \`useShow\` will not be able to infer the \`id\` from the current URL. See https://refine.dev/docs/api-reference/core/hooks/show/useShow/#resource`);let w=oD({resource:m,id:b??"",queryOptions:{enabled:b!==void 0,...u},successNotification:n,errorNotification:r,meta:x,metaData:x,liveMode:a,onLiveEvent:l,dataProviderName:s}),{elapsedTime:P}=mr({isLoading:w.isFetching,interval:c==null?void 0:c.interval,onInterval:c==null?void 0:c.onInterval});return{queryResult:w,showId:b,setShowId:g,overtime:{elapsedTime:P}}},"useShow");W(({resourceName:e,resource:t,mapData:n=W(c=>c,"mapData"),paparseOptions:r,batchSize:o=Number.MAX_SAFE_INTEGER,onFinish:i,meta:a,metaData:l,onProgress:s,dataProviderName:u}={})=>{let[c,d]=v.useState(0),[f,m]=v.useState(0),[p,h]=v.useState(!1),{resource:y,identifier:b}=Je(t??e),g=qn(),x=aK(),w=aD(),P=g({resource:y,meta:Ae(a,l)}),C;o===1?C=w:C=x;let E=W(()=>{m(0),d(0),h(!1)},"handleCleanup"),S=W(O=>{let R={succeeded:O.filter(_=>_.type==="success"),errored:O.filter(_=>_.type==="error")};i==null||i(R),h(!1)},"handleFinish");v.useEffect(()=>{s==null||s({totalAmount:f,processedAmount:c})},[f,c]);let M=W(({file:O})=>(E(),new Promise(R=>{h(!0),PL.parse(O,{complete:async({data:_})=>{let D=$q(_,n);if(m(D.length),o===1){let T=D.map(j=>W(async()=>({response:await w.mutateAsync({resource:b??"",values:j,successNotification:!1,errorNotification:!1,dataProviderName:u,meta:P,metaData:P}),value:j}),"fn")),F=await bO(T,({response:j,value:$})=>(d(L=>L+1),{response:[j.data],type:"success",request:[$]}),(j,$)=>({response:[j],type:"error",request:[D[$]]}));R(F)}else{let T=JG(D,o),F=T.map($=>W(async()=>({response:await x.mutateAsync({resource:b??"",values:$,successNotification:!1,errorNotification:!1,dataProviderName:u,meta:P,metaData:P}),value:$,currentBatchLength:$.length}),"fn")),j=await bO(F,({response:$,currentBatchLength:L,value:z})=>(d(B=>B+L),{response:$.data,type:"success",request:z}),($,L)=>({response:[$],type:"error",request:T[L]}));R(j)}},...r})}).then(R=>(S(R),R))),"handleChange");return{inputProps:{type:"file",accept:".csv",onChange:O=>{O.target.files&&O.target.files.length>0&&M({file:O.target.files[0]})}},mutationResult:C,isLoading:p,handleChange:M}},"useImport");var wK=W(({defaultVisible:e=!1}={})=>{let[t,n]=v.useState(e),r=v.useCallback(()=>n(!0),[t]),o=v.useCallback(()=>n(!1),[t]);return{visible:t,show:r,close:o}},"useModal"),mD=W(({resource:e,action:t,meta:n,legacy:r})=>Kp()({resource:e,action:t,meta:n,legacy:r}),"useToPath"),Gn=W(()=>{let e=v.useContext(Gp);return e!=null&&e.Link?e.Link:W(({to:t,...n})=>k.createElement("a",{href:t,...n}),"FallbackLink")},"useLink"),Pl={useHistory:()=>!1,useLocation:()=>!1,useParams:()=>({}),Prompt:()=>null,Link:()=>null},CK=k.createContext(Pl),JS=CK,SK=W(({children:e,useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a})=>k.createElement(JS.Provider,{value:{useHistory:t??Pl.useHistory,useLocation:n??Pl.useLocation,useParams:r??Pl.useParams,Prompt:o??Pl.Prompt,Link:i??Pl.Link,routes:a??Pl.routes}},e),"LegacyRouterContextProvider"),Bt=W(()=>{let e=v.useContext(JS),{useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a}=e??Pl;return{useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a}},"useRouterContext"),sa=k.createContext({options:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1}}}),EK=W(({can:e,children:t,options:n})=>k.createElement(sa.Provider,{value:{can:e,options:n?{...n,buttons:{enableAccessControl:!0,hideIfUnauthorized:!1,...n.buttons}}:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1},queryOptions:void 0}}},t),"AccessControlContextProvider"),eE=W(e=>{if(!e)return;let{icon:t,list:n,edit:r,create:o,show:i,clone:a,children:l,meta:s,options:u,...c}=e,{icon:d,...f}=s??{},{icon:m,...p}=u??{};return{...c,...s?{meta:f}:{},...u?{options:p}:{}}},"sanitizeResource"),Cu=W(({action:e,resource:t,params:n,queryOptions:r})=>{let{can:o,options:i}=v.useContext(sa),{keys:a,preferLegacyKeys:l}=Wt(),{queryOptions:s}=i||{},u={...s,...r},{resource:c,...d}=n??{},f=eE(c),m=Ho({queryKey:a().access().resource(t).action(e).params({params:{...d,resource:f},enabled:u==null?void 0:u.enabled}).get(l),queryFn:()=>(o==null?void 0:o({action:e,resource:t,params:{...d,resource:f}}))??Promise.resolve({can:!0}),enabled:typeof o<"u",...u,meta:{...u==null?void 0:u.meta,...xt()},retry:!1});return typeof o>"u"?{data:{can:!0}}:m},"useCan"),PK=W(()=>{let{can:e}=k.useContext(sa);return{can:k.useMemo(()=>e?W(async({params:t,...n})=>{let r=t!=null&&t.resource?eE(t.resource):void 0;return e({...n,...t?{params:{...t,resource:r}}:{}})},"canWithSanitizedResource"):void 0,[e])}},"useCanWithoutCache"),kK=W(e=>{let[t,n]=v.useState([]),[r,o]=v.useState([]),[i,a]=v.useState([]),{resource:l,sort:s,sorters:u,filters:c=[],optionLabel:d="title",optionValue:f="id",searchField:m=typeof d=="string"?d:"title",debounce:p=300,successNotification:h,errorNotification:y,defaultValueQueryOptions:b,queryOptions:g,fetchSize:x,pagination:w,hasPagination:P=!1,liveMode:C,defaultValue:E=[],onLiveEvent:S,onSearch:M,liveParams:O,meta:R,metaData:_,dataProviderName:D,overtimeOptions:T}=e,F=v.useCallback(J=>typeof d=="string"?Zg(J,d):d(J),[d]),j=v.useCallback(J=>typeof f=="string"?Zg(J,f):f(J),[f]),{resource:$,identifier:L}=Je(l),z=qn()({resource:$,meta:Ae(R,_)}),B=Array.isArray(E)?E:[E],A=v.useCallback(J=>{a(J.data.map(oe=>({label:F(oe),value:j(oe)})))},[d,f]),H=b??g,q=nK({resource:L,ids:B,queryOptions:{...H,enabled:B.length>0&&((H==null?void 0:H.enabled)??!0),onSuccess:J=>{var oe;A(J),(oe=H==null?void 0:H.onSuccess)==null||oe.call(H,J)}},meta:z,metaData:z,liveMode:"off",dataProviderName:D}),U=v.useCallback(J=>{o(J.data.map(oe=>({label:F(oe),value:j(oe)})))},[d,f]),G=rD({resource:L,sorters:Ae(u,s),filters:c.concat(t),pagination:{current:w==null?void 0:w.current,pageSize:(w==null?void 0:w.pageSize)??x,mode:w==null?void 0:w.mode},hasPagination:P,queryOptions:{...g,onSuccess:J=>{var oe;U(J),(oe=g==null?void 0:g.onSuccess)==null||oe.call(g,J)}},successNotification:h,errorNotification:y,meta:z,metaData:z,liveMode:C,liveParams:O,onLiveEvent:S,dataProviderName:D}),Y=W(J=>{if(M){n(M(J));return}if(!J){n([]);return}n([{field:m,operator:"contains",value:J}])},"onSearch"),{elapsedTime:re}=mr({isLoading:G.isFetching||q.isFetching,interval:T==null?void 0:T.interval,onInterval:T==null?void 0:T.onInterval}),le=v.useMemo(()=>Pq([...r,...i],"value"),[r,i]);return{queryResult:G,defaultValueQueryResult:q,options:le,onSearch:kL(Y,p),overtime:{elapsedTime:re}}},"useSelect"),kO=[],$O=[];function hD({initialCurrent:e,initialPageSize:t,hasPagination:n=!0,pagination:r,initialSorter:o,permanentSorter:i=$O,defaultSetFilterBehavior:a,initialFilter:l,permanentFilter:s=kO,filters:u,sorters:c,syncWithLocation:d,resource:f,successNotification:m,errorNotification:p,queryOptions:h,liveMode:y,onLiveEvent:b,liveParams:g,meta:x,metaData:w,dataProviderName:P,overtimeOptions:C}={}){var E,S,M,O,R;let{syncWithLocation:_}=qq(),D=d??_,T=pD(y),F=st(),{useLocation:j}=Bt(),{search:$,pathname:L}=j(),z=qn(),B=Qo(),A=((u==null?void 0:u.mode)||"server")==="server",H=((c==null?void 0:c.mode)||"server")==="server",q=n===!1?"off":"server",U=((r==null?void 0:r.mode)??q)!=="off",G=Ae(r==null?void 0:r.current,e),Y=Ae(r==null?void 0:r.pageSize,t),re=Ae(x,w),{parsedCurrent:le,parsedPageSize:J,parsedSorter:oe,parsedFilters:ce}=JL($??"?"),ve=Ae(u==null?void 0:u.initial,l),me=Ae(u==null?void 0:u.permanent,s)??kO,ke=Ae(c==null?void 0:c.initial,o),be=Ae(c==null?void 0:c.permanent,i)??$O,ie=Ae(u==null?void 0:u.defaultBehavior,a)??"merge",ye,V,Q,Z;D?(ye=((E=B==null?void 0:B.params)==null?void 0:E.current)||le||G||1,V=((S=B==null?void 0:B.params)==null?void 0:S.pageSize)||J||Y||10,Q=((M=B==null?void 0:B.params)==null?void 0:M.sorters)||(oe.length?oe:ke),Z=((O=B==null?void 0:B.params)==null?void 0:O.filters)||(ce.length?ce:ve)):(ye=G||1,V=Y||10,Q=ke,Z=ve);let{replace:ae}=Cn(),te=hr(),{resource:K,identifier:ee}=Je(f),se=z({resource:K,meta:re});k.useEffect(()=>{su(typeof ee>"u","useTable: `resource` is not defined.")},[ee]);let[Ce,_e]=v.useState(PO(be,Q??[])),[$e,X]=v.useState(EO(me,Z??[])),[Ee,De]=v.useState(ye),[Te,Pe]=v.useState(V),Re=W(()=>{if(F==="new"){let{sorters:ha,filters:Yr,pageSize:an,current:Dt,...kn}=(B==null?void 0:B.params)??{};return kn}let{sorter:St,filters:ut,pageSize:Et,current:Qr,...ni}=ou.parse($,{ignoreQueryPrefix:!0});return ni},"getCurrentQueryParams"),Ge=W(({pagination:{current:St,pageSize:ut},sorter:Et,filters:Qr})=>{if(F==="new")return te({type:"path",options:{keepHash:!0,keepQuery:!0},query:{...U?{current:St,pageSize:ut}:{},sorters:Et,filters:Qr,...Re()}})??"";let ni=ou.parse($==null?void 0:$.substring(1)),ha=CO({pagination:{pageSize:ut,current:St},sorters:Ce??Et,filters:Qr,...ni});return`${L??""}?${ha??""}`},"createLinkForSyncWithLocation");v.useEffect(()=>{$===""&&(De(ye),Pe(V),_e(PO(be,Q??[])),X(EO(me,Z??[])))},[$]),v.useEffect(()=>{if(D){let St=Re();if(F==="new")te({type:"replace",options:{keepQuery:!0},query:{...U?{pageSize:Te,current:Ee}:{},sorters:Al(Ce,be,Ao),filters:Al($e,me,Ao)}});else{let ut=CO({...U?{pagination:{pageSize:Te,current:Ee}}:{},sorters:Al(Ce,be,Ao),filters:Al($e,me,Ao),...St});return ae==null?void 0:ae(`${L}?${ut}`,void 0,{shallow:!0})}}},[D,Ee,Te,Ce,$e]);let at=rD({resource:ee,hasPagination:n,pagination:{current:Ee,pageSize:Te,mode:r==null?void 0:r.mode},filters:A?oh(me,$e):void 0,sorters:H?SO(be,Ce):void 0,queryOptions:h,successNotification:m,errorNotification:p,meta:se,metaData:se,liveMode:T,liveParams:g,onLiveEvent:b,dataProviderName:P}),It=W(St=>{X(ut=>oh(me,St,ut))},"setFiltersAsMerge"),Gt=W(St=>{X(oh(me,St))},"setFiltersAsReplace"),ot=W(St=>{X(ut=>oh(me,St(ut)))},"setFiltersWithSetter"),Pn=W((St,ut=ie)=>{typeof St=="function"?ot(St):ut==="replace"?Gt(St):It(St)},"setFiltersFn"),tn=W(St=>{_e(()=>SO(be,St))},"setSortWithUnion"),{elapsedTime:Tr}=mr({isLoading:at.isFetching,interval:C==null?void 0:C.interval,onInterval:C==null?void 0:C.onInterval});return{tableQueryResult:at,sorters:Ce,setSorters:tn,sorter:Ce,setSorter:tn,filters:$e,setFilters:Pn,current:Ee,setCurrent:De,pageSize:Te,setPageSize:Pe,pageCount:Te?Math.ceil((((R=at.data)==null?void 0:R.total)??0)/Te):1,createLinkForSyncWithLocation:Ge,overtime:{elapsedTime:Tr}}}W(hD,"useTable");var cy=k.createContext({}),$K=W(({create:e,get:t,update:n,children:r})=>k.createElement(cy.Provider,{value:{create:e,get:t,update:n}},r),"AuditLogContextProvider"),vd=W(({logMutationOptions:e,renameMutationOptions:t}={})=>{let n=oa(),r=v.useContext(cy),{keys:o,preferLegacyKeys:i}=Wt(),a=zt(),{resources:l}=v.useContext(Wp),{data:s,refetch:u,isLoading:c}=md({v3LegacyAuthProviderCompatible:!!(a!=null&&a.isLegacy),queryOptions:{enabled:!!(r!=null&&r.create)}}),d=wn(async m=>{var p,h,y,b,g;let x=ur(m.resource,l),w=Ae((p=x==null?void 0:x.meta)==null?void 0:p.audit,(h=x==null?void 0:x.options)==null?void 0:h.audit,(b=(y=x==null?void 0:x.options)==null?void 0:y.auditLog)==null?void 0:b.permissions);if(w&&!Mq(w,m.action))return;let P;return c&&r!=null&&r.create&&(P=await u()),await((g=r.create)==null?void 0:g.call(r,{...m,author:s??(P==null?void 0:P.data)}))},{mutationKey:o().audit().action("log").get(),...e,meta:{...e==null?void 0:e.meta,...xt()}}),f=wn(async m=>{var p;return await((p=r.update)==null?void 0:p.call(r,m))},{onSuccess:m=>{m!=null&&m.resource&&n.invalidateQueries(o().audit().resource((m==null?void 0:m.resource)??"").action("list").get(i))},mutationKey:o().audit().action("rename").get(),...t,meta:{...t==null?void 0:t.meta,...xt()}});return{log:d,rename:f}},"useLog");W(({resource:e,action:t,meta:n,author:r,metaData:o,queryOptions:i})=>{let{get:a}=v.useContext(cy),{keys:l,preferLegacyKeys:s}=Wt();return Ho({queryKey:l().audit().resource(e).action("list").params(n).get(s),queryFn:()=>(a==null?void 0:a({resource:e,action:t,author:r,meta:n,metaData:o}))??Promise.resolve([]),enabled:typeof a<"u",...i,retry:!1,meta:{...i==null?void 0:i.meta,...xt()}})},"useLogList");var IK=W(({meta:e={}}={})=>{let t=st(),{i18nProvider:n}=v.useContext(gd),r=Qo(),o=Qe(),{resources:i,resource:a,action:l}=Je(),{options:{textTransformers:s}}=dn(),u=[];if(!(a!=null&&a.name))return{breadcrumbs:u};let c=W(d=>{var f,m,p,h,y,b;let g=typeof d=="string"?ur(d,i,t==="legacy")??{name:d}:d;if(g){let x=Ae((f=g==null?void 0:g.meta)==null?void 0:f.parent,g==null?void 0:g.parentName);x&&c(x);let w=Jr(g,i,t==="legacy").find(E=>E.action==="list"),P=(m=w==null?void 0:w.resource)!=null&&m.list?w==null?void 0:w.route:void 0,C=P?t==="legacy"?P:wo(P,g==null?void 0:g.meta,r,e):void 0;u.push({label:Ae((p=g.meta)==null?void 0:p.label,(h=g.options)==null?void 0:h.label)??o(`${g.name}.${g.name}`,s.humanize(g.name)),href:C,icon:Ae((y=g.meta)==null?void 0:y.icon,(b=g.options)==null?void 0:b.icon,g.icon)})}},"addBreadcrumb");if(c(a),l&&l!=="list"){let d=`actions.${l}`,f=o(d);typeof n<"u"&&f===d?(su(!0,`[useBreadcrumb]: Breadcrumb missing translate key for the "${l}" action. Please add "actions.${l}" key to your translation file. For more information, see https://refine.dev/docs/api-reference/core/hooks/useBreadcrumb/#i18n-support`),u.push({label:o(`buttons.${l}`,s.humanize(l))})):u.push({label:o(d,s.humanize(l))})}return{breadcrumbs:u}},"useBreadcrumb"),eg=W((e,t,n=!1)=>{let r=[],o=ts(e,t);for(;o;)r.push(o),o=ts(o,t);return r.reverse(),`/${[...r,e].map(i=>Wa((n?i.route:void 0)??i.identifier??i.name)).join("/").replace(/^\//,"")}`},"createResourceKey"),OK=W((e,t=!1)=>{let n={item:{name:"__root__"},children:{}};e.forEach(o=>{let i=[],a=ts(o,e);for(;a;)i.push(a),a=ts(a,e);i.reverse();let l=n;i.forEach(u=>{let c=(t?u.route:void 0)??u.identifier??u.name;l.children[c]||(l.children[c]={item:u,children:{}}),l=l.children[c]});let s=(t?o.route:void 0)??o.identifier??o.name;l.children[s]||(l.children[s]={item:o,children:{}})});let r=W(o=>{let i=[];return Object.keys(o.children).forEach(a=>{let l=eg(o.children[a].item,e,t),s={...o.children[a].item,key:l,children:r(o.children[a])};i.push(s)}),i},"flatten");return r(n)},"createTree"),IO=W(e=>e.split("?")[0].split("#")[0].replace(/(.+)(\/$)/,"$1"),"getCleanPath"),tE=W(({meta:e,hideOnMissingParameter:t}={hideOnMissingParameter:!0})=>{let n=Qe(),r=Kp(),o=st(),{resource:i,resources:a}=Je(),{pathname:l}=Qo(),{useLocation:s}=Bt(),{pathname:u}=s(),c=aa(),d=`/${((o==="legacy"?IO(u):l?IO(l):void 0)??"").replace(/^\//,"")}`,f=i?eg(i,a,o==="legacy"):d??"",m=k.useMemo(()=>{if(!i)return[];let y=ts(i,a),b=[eg(i,a)];for(;y;)b.push(eg(y,a)),y=ts(y,a);return b},[]),p=k.useCallback(y=>{var b,g,x,w,P,C;if((((b=y==null?void 0:y.meta)==null?void 0:b.hide)??((g=y==null?void 0:y.options)==null?void 0:g.hide))||!(y!=null&&y.list)&&y.children.length===0)return;let E=y.list?r({resource:y,action:"list",legacy:o==="legacy",meta:e}):void 0;if(!(t&&E&&E.match(/(\/|^):(.+?)(\/|$){1}/)))return{...y,route:E,icon:Ae((x=y.meta)==null?void 0:x.icon,(w=y.options)==null?void 0:w.icon,y.icon),label:Ae((P=y==null?void 0:y.meta)==null?void 0:P.label,(C=y==null?void 0:y.options)==null?void 0:C.label)??n(`${y.name}.${y.name}`,c(y.name,"plural"))}},[o,e,r,n,t]),h=k.useMemo(()=>{let y=OK(a,o==="legacy"),b=W(g=>g.flatMap(x=>{let w=b(x.children),P=p({...x,children:w});return P?[P]:[]}),"prepare");return b(y)},[a,o,p]);return{defaultOpenKeys:m,selectedKey:f,menuItems:h}},"useMenu"),qn=W(()=>{let{params:e}=Qo();return W(({resource:t,meta:n}={})=>{let{meta:r}=eE(t)??{meta:{}},{filters:o,sorters:i,current:a,pageSize:l,...s}=e??{};return{...r,...s,...n}},"getMetaFn")},"useMeta");W(()=>{let[e,t]=v.useState(),n=Qe(),{push:r}=Cn(),o=hr(),i=st(),{resource:a,action:l}=Je();return v.useEffect(()=>{a&&l&&t(n("pages.error.info",{action:l,resource:a.name},`You may have forgotten to add the "${l}" component to "${a.name}" resource.`))},[a,l]),k.createElement(k.Fragment,null,k.createElement("h1",null,n("pages.error.404",void 0,"Sorry, the page you visited does not exist.")),e&&k.createElement("p",null,e),k.createElement("button",{onClick:()=>{i==="legacy"?r("/"):o({to:"/"})}},n("pages.error.backHome",void 0,"Back Home")))},"ErrorComponent");var MK=W(()=>{let[e,t]=v.useState(""),[n,r]=v.useState(""),o=Qe(),i=zt(),{mutate:a}=Vp({v3LegacyAuthProviderCompatible:!!(i!=null&&i.isLegacy)});return k.createElement(k.Fragment,null,k.createElement("h1",null,o("pages.login.title","Sign in your account")),k.createElement("form",{onSubmit:l=>{l.preventDefault(),a({username:e,password:n})}},k.createElement("table",null,k.createElement("tbody",null,k.createElement("tr",null,k.createElement("td",null,o("pages.login.username",void 0,"username"),":"),k.createElement("td",null,k.createElement("input",{type:"text",size:20,autoCorrect:"off",spellCheck:!1,autoCapitalize:"off",autoFocus:!0,required:!0,value:e,onChange:l=>t(l.target.value)}))),k.createElement("tr",null,k.createElement("td",null,o("pages.login.password",void 0,"password"),":"),k.createElement("td",null,k.createElement("input",{type:"password",required:!0,size:20,value:n,onChange:l=>r(l.target.value)}))))),k.createElement("br",null),k.createElement("input",{type:"submit",value:"login"})))},"LoginPage"),RK=W(({providers:e,registerLink:t,forgotPasswordLink:n,rememberMe:r,contentProps:o,wrapperProps:i,renderContent:a,formProps:l,title:s=void 0,hideForm:u})=>{let c=st(),d=Gn(),{Link:f}=Bt(),m=c==="legacy"?f:d,[p,h]=v.useState(""),[y,b]=v.useState(""),[g,x]=v.useState(!1),w=Qe(),P=zt(),{mutate:C}=Vp({v3LegacyAuthProviderCompatible:!!(P!=null&&P.isLegacy)}),E=W((O,R)=>k.createElement(m,{to:O},R),"renderLink"),S=W(()=>e?e.map(O=>k.createElement("div",{key:O.name,style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"1rem"}},k.createElement("button",{onClick:()=>C({providerName:O.name}),style:{display:"flex",alignItems:"center"}},O==null?void 0:O.icon,O.label??k.createElement("label",null,O.label)))):null,"renderProviders"),M=k.createElement("div",{...o},k.createElement("h1",{style:{textAlign:"center"}},w("pages.login.title","Sign in to your account")),S(),!u&&k.createElement(k.Fragment,null,k.createElement("hr",null),k.createElement("form",{onSubmit:O=>{O.preventDefault(),C({email:p,password:y,remember:g})},...l},k.createElement("div",{style:{display:"flex",flexDirection:"column",padding:25}},k.createElement("label",{htmlFor:"email-input"},w("pages.login.fields.email","Email")),k.createElement("input",{id:"email-input",name:"email",type:"text",size:20,autoCorrect:"off",spellCheck:!1,autoCapitalize:"off",required:!0,value:p,onChange:O=>h(O.target.value)}),k.createElement("label",{htmlFor:"password-input"},w("pages.login.fields.password","Password")),k.createElement("input",{id:"password-input",type:"password",name:"password",required:!0,size:20,value:y,onChange:O=>b(O.target.value)}),r??k.createElement(k.Fragment,null,k.createElement("label",{htmlFor:"remember-me-input"},w("pages.login.buttons.rememberMe","Remember me"),k.createElement("input",{id:"remember-me-input",name:"remember",type:"checkbox",size:20,checked:g,value:g.toString(),onChange:()=>{x(!g)}}))),k.createElement("br",null),n??E("/forgot-password",w("pages.login.buttons.forgotPassword","Forgot password?")),k.createElement("input",{type:"submit",value:w("pages.login.signin","Sign in")}),t??k.createElement("span",null,w("pages.login.buttons.noAccount","Don’t have an account?")," ",E("/register",w("pages.login.register","Sign up")))))),t!==!1&&u&&k.createElement("div",{style:{textAlign:"center"}},w("pages.login.buttons.noAccount","Don’t have an account?")," ",E("/register",w("pages.login.register","Sign up"))));return k.createElement("div",{...i},a?a(M,s):M)},"LoginPage"),TK=W(({providers:e,loginLink:t,wrapperProps:n,contentProps:r,renderContent:o,formProps:i,title:a=void 0,hideForm:l})=>{let s=st(),u=Gn(),{Link:c}=Bt(),d=s==="legacy"?c:u,[f,m]=v.useState(""),[p,h]=v.useState(""),y=Qe(),b=zt(),{mutate:g,isLoading:x}=KS({v3LegacyAuthProviderCompatible:!!(b!=null&&b.isLegacy)}),w=W((E,S)=>k.createElement(d,{to:E},S),"renderLink"),P=W(()=>e?e.map(E=>k.createElement("div",{key:E.name,style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"1rem"}},k.createElement("button",{onClick:()=>g({providerName:E.name}),style:{display:"flex",alignItems:"center"}},E==null?void 0:E.icon,E.label??k.createElement("label",null,E.label)))):null,"renderProviders"),C=k.createElement("div",{...r},k.createElement("h1",{style:{textAlign:"center"}},y("pages.register.title","Sign up for your account")),P(),!l&&k.createElement(k.Fragment,null,k.createElement("hr",null),k.createElement("form",{onSubmit:E=>{E.preventDefault(),g({email:f,password:p})},...i},k.createElement("div",{style:{display:"flex",flexDirection:"column",padding:25}},k.createElement("label",{htmlFor:"email-input"},y("pages.register.fields.email","Email")),k.createElement("input",{id:"email-input",name:"email",type:"email",size:20,autoCorrect:"off",spellCheck:!1,autoCapitalize:"off",required:!0,value:f,onChange:E=>m(E.target.value)}),k.createElement("label",{htmlFor:"password-input"},y("pages.register.fields.password","Password")),k.createElement("input",{id:"password-input",name:"password",type:"password",required:!0,size:20,value:p,onChange:E=>h(E.target.value)}),k.createElement("input",{type:"submit",value:y("pages.register.buttons.submit","Sign up"),disabled:x}),t??k.createElement(k.Fragment,null,k.createElement("span",null,y("pages.login.buttons.haveAccount","Have an account?")," ",w("/login",y("pages.login.signin","Sign in"))))))),t!==!1&&l&&k.createElement("div",{style:{textAlign:"center"}},y("pages.login.buttons.haveAccount","Have an account?")," ",w("/login",y("pages.login.signin","Sign in"))));return k.createElement("div",{...n},o?o(C,a):C)},"RegisterPage"),_K=W(({loginLink:e,wrapperProps:t,contentProps:n,renderContent:r,formProps:o,title:i=void 0})=>{let a=Qe(),l=st(),s=Gn(),{Link:u}=Bt(),c=l==="legacy"?u:s,[d,f]=v.useState(""),{mutate:m,isLoading:p}=QS(),h=W((b,g)=>k.createElement(c,{to:b},g),"renderLink"),y=k.createElement("div",{...n},k.createElement("h1",{style:{textAlign:"center"}},a("pages.forgotPassword.title","Forgot your password?")),k.createElement("hr",null),k.createElement("form",{onSubmit:b=>{b.preventDefault(),m({email:d})},...o},k.createElement("div",{style:{display:"flex",flexDirection:"column",padding:25}},k.createElement("label",{htmlFor:"email-input"},a("pages.forgotPassword.fields.email","Email")),k.createElement("input",{id:"email-input",name:"email",type:"mail",autoCorrect:"off",spellCheck:!1,autoCapitalize:"off",required:!0,value:d,onChange:b=>f(b.target.value)}),k.createElement("input",{type:"submit",disabled:p,value:a("pages.forgotPassword.buttons.submit","Send reset instructions")}),k.createElement("br",null),e??k.createElement("span",null,a("pages.register.buttons.haveAccount","Have an account? ")," ",h("/login",a("pages.login.signin","Sign in"))))));return k.createElement("div",{...t},r?r(y,i):y)},"ForgotPasswordPage"),FK=W(({wrapperProps:e,contentProps:t,renderContent:n,formProps:r,title:o=void 0})=>{let i=Qe(),a=zt(),{mutate:l,isLoading:s}=YS({v3LegacyAuthProviderCompatible:!!(a!=null&&a.isLegacy)}),[u,c]=v.useState(""),[d,f]=v.useState(""),m=k.createElement("div",{...t},k.createElement("h1",{style:{textAlign:"center"}},i("pages.updatePassword.title","Update Password")),k.createElement("hr",null),k.createElement("form",{onSubmit:p=>{p.preventDefault(),l({password:u,confirmPassword:d})},...r},k.createElement("div",{style:{display:"flex",flexDirection:"column",padding:25}},k.createElement("label",{htmlFor:"password-input"},i("pages.updatePassword.fields.password","New Password")),k.createElement("input",{id:"password-input",name:"password",type:"password",required:!0,size:20,value:u,onChange:p=>c(p.target.value)}),k.createElement("label",{htmlFor:"confirm-password-input"},i("pages.updatePassword.fields.confirmPassword","Confirm New Password")),k.createElement("input",{id:"confirm-password-input",name:"confirmPassword",type:"password",required:!0,size:20,value:d,onChange:p=>f(p.target.value)}),k.createElement("input",{type:"submit",disabled:s,value:i("pages.updatePassword.buttons.submit","Update")}))));return k.createElement("div",{...e},n?n(m,o):m)},"UpdatePasswordPage");W(e=>{let{type:t}=e;return k.createElement(k.Fragment,null,W(()=>{switch(t){case"register":return k.createElement(TK,{...e});case"forgotPassword":return k.createElement(_K,{...e});case"updatePassword":return k.createElement(FK,{...e});default:return k.createElement(RK,{...e})}},"renderView")())},"AuthPage");var AK=W(()=>k.createElement(k.Fragment,null,k.createElement("h1",null,"Welcome on board"),k.createElement("p",null,"Your configuration is completed."),k.createElement("p",null,"Now you can get started by adding your resources to the"," ",k.createElement("code",null,"`resources`")," property of ",k.createElement("code",null,"``")),k.createElement("div",{style:{display:"flex",gap:8}},k.createElement("a",{href:"https://refine.dev",target:"_blank",rel:"noreferrer"},k.createElement("button",null,"Documentation")),k.createElement("a",{href:"https://refine.dev/examples",target:"_blank",rel:"noreferrer"},k.createElement("button",null,"Examples")),k.createElement("a",{href:"https://discord.gg/refine",target:"_blank",rel:"noreferrer"},k.createElement("button",null,"Community")))),"ReadyPage"),LK=[{title:"Documentation",description:"Learn about the technical details of using Refine in your projects.",link:"https://refine.dev/docs",iconUrl:"https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/book.svg"},{title:"Tutorial",description:"Learn how to use Refine by building a fully-functioning CRUD app, from scratch to full launch.",link:"https://refine.dev/tutorial",iconUrl:"https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/hat.svg"},{title:"Templates",description:"Explore a range of pre-built templates, perfect everything from admin panels to dashboards and CRMs.",link:"https://refine.dev/templates",iconUrl:"https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/application.svg"},{title:"Community",description:"Join our Discord community and keep up with the latest news.",link:"https://discord.gg/refine",iconUrl:"https://refine.ams3.cdn.digitaloceanspaces.com/welcome-page/discord.svg"}],DK=W(()=>{let e=xO("(max-width: 1010px)"),t=xO("(max-width: 650px)"),n=W(()=>t?"1, 280px":e?"2, 280px":"4, 1fr","getGridTemplateColumns"),r=W(()=>t?"32px":e?"40px":"48px","getHeaderFontSize"),o=W(()=>t?"16px":e?"20px":"24px","getSubHeaderFontSize");return k.createElement("div",{style:{position:"fixed",zIndex:10,inset:0,overflow:"auto",width:"100dvw",height:"100dvh"}},k.createElement("div",{style:{overflow:"hidden",position:"relative",backgroundSize:"cover",backgroundRepeat:"no-repeat",background:t?"url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(88.89% 50% at 50% 100%, rgba(38, 217, 127, 0.10) 0%, rgba(38, 217, 127, 0.00) 100%), radial-gradient(88.89% 50% at 50% 0%, rgba(71, 235, 235, 0.15) 0%, rgba(71, 235, 235, 0.00) 100%), #1D1E30":e?"url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(66.67% 50% at 50% 100%, rgba(38, 217, 127, 0.10) 0%, rgba(38, 217, 127, 0.00) 100%), radial-gradient(66.67% 50% at 50% 0%, rgba(71, 235, 235, 0.15) 0%, rgba(71, 235, 235, 0.00) 100%), #1D1E30":"url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/landing-noise.webp), radial-gradient(35.56% 50% at 50% 100%, rgba(38, 217, 127, 0.12) 0%, rgba(38, 217, 127, 0) 100%), radial-gradient(35.56% 50% at 50% 0%, rgba(71, 235, 235, 0.18) 0%, rgba(71, 235, 235, 0) 100%), #1D1E30",minHeight:"100%",minWidth:"100%",fontFamily:"Arial",color:"#FFFFFF"}},k.createElement("div",{style:{zIndex:2,position:"absolute",width:t?"400px":"800px",height:"552px",opacity:"0.5",background:"url(https://refine.ams3.cdn.digitaloceanspaces.com/assets/welcome-page-hexagon.png)",backgroundRepeat:"no-repeat",backgroundSize:"contain",top:"0",left:"50%",transform:"translateX(-50%)"}}),k.createElement("div",{style:{height:t?"40px":"80px"}}),k.createElement("div",{style:{display:"flex",justifyContent:"center"}},k.createElement("div",{style:{backgroundRepeat:"no-repeat",backgroundSize:t?"112px 58px":"224px 116px",backgroundImage:"url(https://refine.ams3.cdn.digitaloceanspaces.com/assets/refine-logo.svg)",width:t?112:224,height:t?58:116}})),k.createElement("div",{style:{height:t?"120px":e?"200px":"30vh",minHeight:t?"120px":"200px"}}),k.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px",textAlign:"center"}},k.createElement("h1",{style:{fontSize:r(),fontWeight:700,margin:"0px"}},"Welcome Aboard!"),k.createElement("h4",{style:{fontSize:o(),fontWeight:400,margin:"0px"}},"Your configuration is completed.")),k.createElement("div",{style:{height:"64px"}}),k.createElement("div",{style:{display:"grid",gridTemplateColumns:`repeat(${n()})`,justifyContent:"center",gap:"48px",paddingRight:"16px",paddingLeft:"16px",paddingBottom:"32px",maxWidth:"976px",margin:"auto"}},LK.map(i=>k.createElement(NK,{key:`welcome-page-${i.title}`,card:i})))))},"ConfigSuccessPage"),NK=W(({card:e})=>{let{title:t,description:n,iconUrl:r,link:o}=e,[i,a]=v.useState(!1);return k.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},k.createElement("div",{style:{display:"flex",alignItems:"center"}},k.createElement("a",{onPointerEnter:()=>a(!0),onPointerLeave:()=>a(!1),style:{display:"flex",alignItems:"center",color:"#fff",textDecoration:"none"},href:o},k.createElement("div",{style:{width:"16px",height:"16px",backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundImage:`url(${r})`}}),k.createElement("span",{style:{fontSize:"16px",fontWeight:700,marginLeft:"13px",marginRight:"14px"}},t),k.createElement("svg",{style:{transition:"transform 0.5s ease-in-out, opacity 0.2s ease-in-out",...i&&{transform:"translateX(4px)",opacity:1}},width:"12",height:"8",fill:"none",opacity:"0.5",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.293.293a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L8.586 5H1a1 1 0 0 1 0-2h7.586L7.293 1.707a1 1 0 0 1 0-1.414Z",fill:"#fff"})))),k.createElement("span",{style:{fontSize:"12px",opacity:.5,lineHeight:"16px"}},n))},"Card"),jK=W(()=>k.createElement("div",{style:{position:"fixed",zIndex:11,inset:0,overflow:"auto",width:"100dvw",height:"100dvh"}},k.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",padding:"24px",background:"#14141FBF",backdropFilter:"blur(3px)"}},k.createElement("div",{style:{maxWidth:"640px",width:"100%",background:"#1D1E30",borderRadius:"16px",border:"1px solid #303450",boxShadow:"0px 0px 120px -24px #000000"}},k.createElement("div",{style:{padding:"16px 20px",borderBottom:"1px solid #303450",display:"flex",alignItems:"center",gap:"8px",position:"relative"}},k.createElement(BK,{style:{position:"absolute",left:0,top:0}}),k.createElement("div",{style:{lineHeight:"24px",fontSize:"16px",color:"#FFFFFF",display:"flex",alignItems:"center",gap:"16px"}},k.createElement(HK,null),k.createElement("span",{style:{fontWeight:400}},"Configuration Error"))),k.createElement("div",{style:{padding:"20px",color:"#A3ADC2",lineHeight:"20px",fontSize:"14px",display:"flex",flexDirection:"column",gap:"20px"}},k.createElement("p",{style:{margin:0,padding:0,lineHeight:"28px",fontSize:"16px"}},k.createElement("code",{style:{display:"inline-block",background:"#30345080",padding:"0 4px",lineHeight:"24px",fontSize:"16px",borderRadius:"4px",color:"#FFFFFF"}},"")," ","is not initialized. Please make sure you have it mounted in your app and placed your components inside it."),k.createElement("div",null,k.createElement(zK,null)))))),"ConfigErrorPage"),zK=W(()=>k.createElement("pre",{style:{display:"block",overflowX:"auto",borderRadius:"8px",fontSize:"14px",lineHeight:"24px",backgroundColor:"#14141F",color:"#E5ECF2",padding:"16px",margin:"0",maxHeight:"400px",overflow:"auto"}},k.createElement("span",{style:{color:"#FF7B72"}},"import")," ","{"," Refine, WelcomePage"," ","}"," ",k.createElement("span",{style:{color:"#FF7B72"}},"from")," ",k.createElement("span",{style:{color:"#A5D6FF"}},'"@refinedev/core"'),";",` `,` `,k.createElement("span",{style:{color:"#FF7B72"}},"export")," ",k.createElement("span",{style:{color:"#FF7B72"}},"default")," ",k.createElement("span",null,k.createElement("span",{style:{color:"#FF7B72"}},"function")," ",k.createElement("span",{style:{color:"#FFA657"}},"App"),"(",k.createElement("span",{style:{color:"rgb(222, 147, 95)"}}),")"," "),"{",` `," ",k.createElement("span",{style:{color:"#FF7B72"}},"return")," (",` `," ",k.createElement("span",null,k.createElement("span",{style:{color:"#79C0FF"}},"<",k.createElement("span",{style:{color:"#79C0FF"}},"Refine"),` `," ",k.createElement("span",{style:{color:"#E5ECF2",opacity:.6}},"// ",k.createElement("span",null,"...")),` `," ",">"),` `," ",k.createElement("span",{style:{opacity:.6}},"{","/* ... */","}"),` `," ",k.createElement("span",{style:{color:"#79C0FF"}},"<",k.createElement("span",{style:{color:"#79C0FF"}},"WelcomePage")," />"),` `," ",k.createElement("span",{style:{opacity:.6}},"{","/* ... */","}"),` `," ",k.createElement("span",{style:{color:"#79C0FF"}},"")),` `," ",");",` `,"}"),"ExampleImplementation"),BK=W(e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:204,height:56,viewBox:"0 0 204 56",fill:"none",...e},k.createElement("path",{fill:"url(#welcome-page-error-gradient-a)",d:"M12 0H0v12L12 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-b)",d:"M28 0h-8L0 20v8L28 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-c)",d:"M36 0h8L0 44v-8L36 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-d)",d:"M60 0h-8L0 52v4h4L60 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-e)",d:"M68 0h8L20 56h-8L68 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-f)",d:"M92 0h-8L28 56h8L92 0Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-g)",d:"M100 0h8L52 56h-8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-h)",d:"M124 0h-8L60 56h8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-i)",d:"M140 0h-8L76 56h8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-j)",d:"M132 0h8L84 56h-8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-k)",d:"M156 0h-8L92 56h8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-l)",d:"M164 0h8l-56 56h-8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-m)",d:"M188 0h-8l-56 56h8l56-56Z"}),k.createElement("path",{fill:"url(#welcome-page-error-gradient-n)",d:"M204 0h-8l-56 56h8l56-56Z"}),k.createElement("defs",null,k.createElement("radialGradient",{id:"welcome-page-error-gradient-a",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-b",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-c",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-d",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-e",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-f",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-g",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-h",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-i",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-j",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-k",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-l",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-m",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),k.createElement("radialGradient",{id:"welcome-page-error-gradient-n",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),k.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})))),"ErrorGradient"),HK=W(e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},k.createElement("path",{fill:"#FF4C4D",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Z",clipRule:"evenodd"}),k.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M7 8a1 1 0 1 0 2 0V5a1 1 0 1 0-2 0v3Zm0 3a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z",clipRule:"evenodd"})),"ErrorIcon"),VK=W(()=>{let{__initialized:e}=dn();return k.createElement(k.Fragment,null,k.createElement(DK,null),!e&&k.createElement(jK,null))},"WelcomePage"),UK="4.48.0",WK=W(()=>{var e;let t=ly(),n=v.useContext(cy),r=v.useContext(Up),o=v.useContext(JS),i=v.useContext(XS),{i18nProvider:a}=v.useContext(gd),l=v.useContext(ZS),s=v.useContext(sa),{resources:u}=Je(),c=dn(),d=!!n.create||!!n.get||!!n.update,f=!!(r!=null&&r.publish)||!!(r!=null&&r.subscribe)||!!(r!=null&&r.unsubscribe),m=!!o.useHistory||!!o.Link||!!o.Prompt||!!o.useLocation||!!o.useParams,p=!!i,h=!!(a!=null&&a.changeLocale)||!!(a!=null&&a.getLocale)||!!(a!=null&&a.translate),y=!!l.close||!!l.open,b=!!s.can,g=(e=c==null?void 0:c.options)==null?void 0:e.projectId;return{providers:{auth:t,auditLog:d,live:f,router:m,data:p,i18n:h,notification:y,accessControl:b},version:UK,resourceCount:u.length,projectId:g}},"useTelemetryData"),GK=W(e=>{try{let t=JSON.stringify(e||{});return typeof btoa<"u"?btoa(t):Buffer.from(t).toString("base64")}catch{return}},"encode"),qK=W(e=>{let t=new Image;t.src=e},"throughImage"),KK=W(e=>{fetch(e)},"throughFetch"),QK=W(e=>{typeof Image<"u"?qK(e):typeof fetch<"u"&&KK(e)},"transport"),YK=W(()=>{let e=WK(),t=k.useRef(!1);return k.useEffect(()=>{if(t.current)return;let n=GK(e);n&&(QK(`https://telemetry.refine.dev/telemetry?payload=${n}`),t.current=!0)},[]),null},"Telemetry"),XK=W(e=>{let t=["go","parse","back","Link"],n=Object.keys(e).filter(r=>!t.includes(r));return n.length>0?(console.warn(`Unsupported properties are found in \`routerProvider\` prop. You provided \`${n.join(", ")}\`. Supported properties are \`${t.join(", ")}\`. You may wanted to use \`legacyRouterProvider\` prop instead.`),!0):!1},"checkRouterPropMisuse"),ZK=W(e=>{let t=k.useRef(!1);k.useEffect(()=>{t.current===!1&&e&&XK(e)&&(t.current=!0)},[e])},"useRouterMisuseWarning"),JK=W(({legacyAuthProvider:e,authProvider:t,dataProvider:n,legacyRouterProvider:r,routerProvider:o,notificationProvider:i,accessControlProvider:a,auditLogProvider:l,resources:s,DashboardPage:u,ReadyPage:c,LoginPage:d,catchAll:f,children:m,liveProvider:p,i18nProvider:h,Title:y,Layout:b,Sider:g,Header:x,Footer:w,OffLayoutArea:P,onLiveEvent:C,options:E})=>{let{optionsWithDefaults:S,disableTelemetryWithDefault:M,reactQueryWithDefaults:O}=Dq({options:E}),R=cD(()=>{var T;return O.clientConfig instanceof yI?O.clientConfig:new yI({...O.clientConfig,defaultOptions:{...O.clientConfig.defaultOptions,queries:{refetchOnWindowFocus:!1,keepPreviousData:!0,...(T=O.clientConfig.defaultOptions)==null?void 0:T.queries}}})},[O.clientConfig]),_=k.useMemo(()=>typeof i=="function"?i:()=>i??{},[i])();if(ZK(o),r&&!o&&(s??[]).length===0)return c?k.createElement(c,null):k.createElement(AK,null);let{RouterComponent:D=k.Fragment}=o?{}:r??{};return k.createElement(EV,{client:R},k.createElement(gK,{..._},k.createElement(Uq,{...e??{},isProvided:!!e},k.createElement(Wq,{...t??{},isProvided:!!t},k.createElement(sK,{...n},k.createElement(uK,{liveProvider:p},k.createElement(fK,{value:r&&!o?"legacy":"new"},k.createElement(pK,{router:o},k.createElement(SK,{...r},k.createElement(dK,{resources:s??[]},k.createElement(vK,{i18nProvider:h},k.createElement(EK,{...a??{}},k.createElement($K,{...l??{}},k.createElement(iK,null,k.createElement(Lq,{mutationMode:S.mutationMode,warnWhenUnsavedChanges:S.warnWhenUnsavedChanges,syncWithLocation:S.syncWithLocation,Title:y,undoableTimeout:S.undoableTimeout,catchAll:f,DashboardPage:u,LoginPage:d,Layout:b,Sider:g,Footer:w,Header:x,OffLayoutArea:P,hasDashboard:!!u,liveMode:S.liveMode,onLiveEvent:C,options:S},k.createElement(Gq,null,k.createElement(D,null,m,!M&&k.createElement(YK,null),k.createElement(oQ,null))))))))))))))))))},"Refine"),eQ=W(({notification:e})=>{let t=Qe(),{notificationDispatch:n}=qp(),{open:r}=wu(),[o,i]=v.useState(),a=W(()=>{if(e.isRunning===!0&&(e.seconds===0&&e.doMutation(),e.isSilent||r==null||r({key:`${e.id}-${e.resource}-notification`,type:"progress",message:t("notifications.undoable",{seconds:Wb(e.seconds)},`You have ${Wb(e.seconds)} seconds to undo`),cancelMutation:e.cancelMutation,undoableTimeout:Wb(e.seconds)}),e.seconds>0)){o&&clearTimeout(o);let l=setTimeout(()=>{n({type:"DECREASE_NOTIFICATION_SECOND",payload:{id:e.id,seconds:e.seconds,resource:e.resource}})},1e3);i(l)}},"cancelNotification");return v.useEffect(()=>{a()},[e]),null},"UndoableQueue");W(({children:e,Layout:t,Sider:n,Header:r,Title:o,Footer:i,OffLayoutArea:a})=>{let{Layout:l,Footer:s,Header:u,Sider:c,Title:d,OffLayoutArea:f}=dn();return k.createElement(t??l,{Sider:n??c,Header:r??u,Footer:i??s,Title:o??d,OffLayoutArea:a??f},e,k.createElement(tQ,null))},"LayoutWrapper");var tQ=W(()=>{let{Prompt:e}=Bt(),t=Qe(),{warnWhen:n,setWarnWhen:r}=tl(),o=W(i=>(i.preventDefault(),i.returnValue=t("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes."),i.returnValue),"warnWhenListener");return v.useEffect(()=>(n&&window.addEventListener("beforeunload",o),window.removeEventListener("beforeunload",o)),[n]),k.createElement(e,{when:n,message:t("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes."),setWarnWhen:r})},"UnsavedPrompt");function bw({redirectOnFail:e=!0,appendCurrentPathToQuery:t=!0,children:n,fallback:r,loading:o}){var i;let a=zt(),l=st(),s=!!(a!=null&&a.isProvided),u=!!(a!=null&&a.isLegacy),c=l==="legacy",d=Qo(),f=hr(),{useLocation:m}=Bt(),p=m(),{isFetching:h,isSuccess:y,data:{authenticated:b,redirectTo:g}={}}=nD({v3LegacyAuthProviderCompatible:u}),x=s?u?y:b:!0;if(!s)return k.createElement(k.Fragment,null,n??null);if(h)return k.createElement(k.Fragment,null,o??null);if(x)return k.createElement(k.Fragment,null,n??null);if(typeof r<"u")return k.createElement(k.Fragment,null,r??null);let w=u?typeof e=="string"?e:"/login":typeof e=="string"?e:g,P=`${c?p==null?void 0:p.pathname:d.pathname}`.replace(/(\?.*|#.*)$/,"");if(w){if(c){let C=t?`?to=${encodeURIComponent(P)}`:"";return k.createElement(rQ,{to:`${w}${C}`})}return k.createElement(nQ,{config:{to:w,query:t?{to:(i=d.params)!=null&&i.to?d.params.to:f({to:P,options:{keepQuery:!0},type:"path"})}:void 0,type:"replace"}})}return null}W(bw,"Authenticated");var nQ=W(({config:e})=>{let t=hr();return k.useEffect(()=>{t(e)},[t,e]),null},"Redirect"),rQ=W(({to:e})=>{let{replace:t}=Cn();return k.useEffect(()=>{t(e)},[t,e]),null},"RedirectLegacy"),oQ=W(()=>{let{useLocation:e}=Bt(),{checkAuth:t}=qo(),n=e();return v.useEffect(()=>{t==null||t().catch(()=>!1)},[n==null?void 0:n.pathname]),null},"RouteChangeHandler"),Da=W(({resource:e,action:t,params:n,fallback:r,onUnauthorized:o,children:i,queryOptions:a,...l})=>{let{resource:s,id:u,action:c}=Je(e),{identifier:d}=Je(),f=W(()=>{let b=(n==null?void 0:n.id)??u;return e&&e!==d?n==null?void 0:n.id:b},"getDefaultId")(),m=e??(s==null?void 0:s.name),p=t??c??"",h=n??{id:f,resource:s},{data:y}=Cu({resource:m,action:p,params:h,queryOptions:a});return v.useEffect(()=>{o&&(y==null?void 0:y.can)===!1&&o({resource:m,action:p,reason:y==null?void 0:y.reason,params:h})},[y==null?void 0:y.can]),y!=null&&y.can?k.isValidElement(i)?k.cloneElement(i,l):k.createElement(k.Fragment,null,i):(y==null?void 0:y.can)===!1?k.createElement(k.Fragment,null,r??null):null},"CanAccess"),iQ=[` .bg-top-announcement { border-bottom: 1px solid rgba(71, 235, 235, 0.15); background: radial-gradient( 218.19% 111.8% at 0% 0%, rgba(71, 235, 235, 0.1) 0%, rgba(71, 235, 235, 0.2) 100% ), #14141f; } `,` .top-announcement-mask { mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg); -webkit-mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg); mask-repeat: repeat; -webkit-mask-repeat: repeat; background: rgba(71, 235, 235, 0.25); } `,` .banner { display: flex; @media (max-width: 1000px) { display: none; } }`,` .gh-link, .gh-link:hover, .gh-link:active, .gh-link:visited, .gh-link:focus { text-decoration: none; z-index: 9; } `,` @keyframes top-announcement-glow { 0% { opacity: 1; } 100% { opacity: 0; } } `],aQ="If you find Refine useful, you can contribute to its growth by giving it a star on GitHub";W(()=>(v.useEffect(()=>{let e=document.createElement("style");document.head.appendChild(e),iQ.forEach(t=>{var n;return(n=e.sheet)==null?void 0:n.insertRule(t,e.sheet.cssRules.length)})},[]),k.createElement("div",{className:"banner bg-top-announcement",style:{width:"100%",height:"48px"}},k.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"200px",width:"100%",maxWidth:"100vw",height:"100%",borderBottom:"1px solid #47ebeb26"}},k.createElement("div",{className:"top-announcement-mask",style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",borderBottom:"1px solid #47ebeb26"}},k.createElement("div",{style:{position:"relative",width:"960px",height:"100%",display:"flex",justifyContent:"space-between",margin:"0 auto"}},k.createElement("div",{style:{width:"calc(50% - 300px)",height:"100%",position:"relative"}},k.createElement(ih,{style:{animationDelay:"1.5s",position:"absolute",top:"2px",right:"220px"},id:"1"}),k.createElement(ih,{style:{animationDelay:"1s",position:"absolute",top:"8px",right:"100px",transform:"rotate(180deg)"},id:"2"}),k.createElement(OO,{style:{position:"absolute",right:"10px"},id:"3"})),k.createElement("div",{style:{width:"calc(50% - 300px)",height:"100%",position:"relative"}},k.createElement(ih,{style:{animationDelay:"2s",position:"absolute",top:"6px",right:"180px",transform:"rotate(180deg)"},id:"4"}),k.createElement(ih,{style:{animationDelay:"0.5s",transitionDelay:"1.3s",position:"absolute",top:"2px",right:"40px"},id:"5"}),k.createElement(OO,{style:{position:"absolute",right:"-70px"},id:"6"})))),k.createElement(lQ,{text:aQ})))),"GitHubBanner");var lQ=W(({text:e})=>k.createElement("a",{className:"gh-link",href:"https://s.refine.dev/github-support",target:"_blank",rel:"noreferrer",style:{position:"absolute",height:"100%",padding:"0 60px",display:"flex",flexWrap:"nowrap",whiteSpace:"nowrap",justifyContent:"center",alignItems:"center",backgroundImage:"linear-gradient(90deg, rgba(31, 63, 72, 0.00) 0%, #1F3F48 10%, #1F3F48 90%, rgba(31, 63, 72, 0.00) 100%)"}},k.createElement("div",{style:{color:"#fff",display:"flex",flexDirection:"row",gap:"8px"}},k.createElement("span",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},"⭐️"),k.createElement("span",{className:"text",style:{fontSize:"16px",lineHeight:"24px"}},e),k.createElement("span",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},"⭐️"))),"Text"),ih=W(({style:e,...t})=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:80,height:40,fill:"none",style:{opacity:1,animation:"top-announcement-glow 1s ease-in-out infinite alternate",...e}},k.createElement("circle",{cx:40,r:40,fill:`url(#${t.id}-a)`,fillOpacity:.5}),k.createElement("defs",null,k.createElement("radialGradient",{id:`${t.id}-a`,cx:0,cy:0,r:1,gradientTransform:"matrix(0 40 -40 0 40 0)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#47EBEB"}),k.createElement("stop",{offset:1,stopColor:"#47EBEB",stopOpacity:0})))),"GlowSmall"),OO=W(({style:e,...t})=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:120,height:48,fill:"none",...t,style:{opacity:1,animation:"top-announcement-glow 1s ease-in-out infinite alternate",...e}},k.createElement("circle",{cx:60,cy:24,r:60,fill:`url(#${t.id}-a)`,fillOpacity:.5}),k.createElement("defs",null,k.createElement("radialGradient",{id:`${t.id}-a`,cx:0,cy:0,r:1,gradientTransform:"matrix(0 60 -60 0 60 24)",gradientUnits:"userSpaceOnUse"},k.createElement("stop",{stopColor:"#47EBEB"}),k.createElement("stop",{offset:1,stopColor:"#47EBEB",stopOpacity:0})))),"GlowBig"),sQ=W(({status:e,elements:{success:t=k.createElement(ah,{key:"autoSave.success",defaultMessage:"saved"}),error:n=k.createElement(ah,{key:"autoSave.error",defaultMessage:"auto save failure"}),loading:r=k.createElement(ah,{key:"autoSave.loading",defaultMessage:"saving..."}),idle:o=k.createElement(ah,{key:"autoSave.idle",defaultMessage:"waiting for changes"})}={}})=>{switch(e){case"success":return k.createElement(k.Fragment,null,t);case"error":return k.createElement(k.Fragment,null,n);case"loading":return k.createElement(k.Fragment,null,r);default:return k.createElement(k.Fragment,null,o)}},"AutoSaveIndicator"),ah=W(({key:e,defaultMessage:t})=>{let n=Qe();return k.createElement("span",null,n(e,t))},"Message"),Zn={},kt={},xw=we&&we.__assign||function(){return xw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?vD:Kl.useLayoutEffect;function vQ(){var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);var t=document.createElement("div");e.appendChild(t);var n=e.offsetWidth-t.offsetWidth;return e.parentNode.removeChild(e),n}kt.getScrollbarWidth=vQ;function yQ(e,t){t===void 0&&(t=100);var n=Kl.useState(e),r=n[0],o=n[1],i=Kl.useRef(Date.now());return Kl.useEffect(function(){if(t!==0){var a=setTimeout(function(){o(e),i.current=Date.now()},i.current-(Date.now()-t));return function(){clearTimeout(a)}}},[t,e]),t===0?e:r}kt.useThrottledValue=yQ;function bQ(e){var t,n,r,o=e===void 0?{ignoreWhenFocused:[]}:e,i=o.ignoreWhenFocused,a=fQ(["input","textarea"],i,!0).map(function(u){return u.toLowerCase()}),l=document.activeElement,s=l&&(a.indexOf(l.tagName.toLowerCase())!==-1||((t=l.attributes.getNamedItem("role"))===null||t===void 0?void 0:t.value)==="textbox"||((n=l.attributes.getNamedItem("contenteditable"))===null||n===void 0?void 0:n.value)==="true"||((r=l.attributes.getNamedItem("contenteditable"))===null||r===void 0?void 0:r.value)==="plaintext-only");return s}kt.shouldRejectKeystrokes=bQ;var xQ=typeof window>"u",wQ=!xQ&&window.navigator.platform==="MacIntel";function CQ(e){return wQ?e.metaKey:e.ctrlKey}kt.isModKey=CQ;kt.Priority={HIGH:1,NORMAL:0,LOW:-1};var yD={},Gd={},Zb={},dy={},ww={exports:{}};(function(e,t){(function(n,r){r(t)})(we,function(n){var r=typeof WeakSet=="function",o=Object.keys;function i(O,R){return O===R||O!==O&&R!==R}function a(O){return O.constructor===Object||O.constructor==null}function l(O){return!!O&&typeof O.then=="function"}function s(O){return!!(O&&O.$$typeof)}function u(){var O=[];return{add:function(R){O.push(R)},has:function(R){return O.indexOf(R)!==-1}}}var c=function(O){return O?function(){return new WeakSet}:u}(r);function d(O){return function(_){var D=O||_;return function(F,j,$){$===void 0&&($=c());var L=!!F&&typeof F=="object",z=!!j&&typeof j=="object";if(L||z){var B=L&&$.has(F),A=z&&$.has(j);if(B||A)return B&&A;L&&$.add(F),z&&$.add(j)}return D(F,j,$)}}}function f(O,R,_,D){var T=O.length;if(R.length!==T)return!1;for(;T-- >0;)if(!_(O[T],R[T],D))return!1;return!0}function m(O,R,_,D){var T=O.size===R.size;if(T&&O.size){var F={};O.forEach(function(j,$){if(T){var L=!1,z=0;R.forEach(function(B,A){!L&&!F[z]&&(L=_($,A,D)&&_(j,B,D),L&&(F[z]=!0)),z++}),T=L}})}return T}var p="_owner",h=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function y(O,R,_,D){var T=o(O),F=T.length;if(o(R).length!==F)return!1;if(F)for(var j=void 0;F-- >0;){if(j=T[F],j===p){var $=s(O),L=s(R);if(($||L)&&$!==L)return!1}if(!h(R,j)||!_(O[j],R[j],D))return!1}return!0}function b(O,R){return O.source===R.source&&O.global===R.global&&O.ignoreCase===R.ignoreCase&&O.multiline===R.multiline&&O.unicode===R.unicode&&O.sticky===R.sticky&&O.lastIndex===R.lastIndex}function g(O,R,_,D){var T=O.size===R.size;if(T&&O.size){var F={};O.forEach(function(j){if(T){var $=!1,L=0;R.forEach(function(z){!$&&!F[L]&&($=_(j,z,D),$&&(F[L]=!0)),L++}),T=$}})}return T}var x=typeof Map=="function",w=typeof Set=="function";function P(O){var R=typeof O=="function"?O(_):_;function _(D,T,F){if(D===T)return!0;if(D&&T&&typeof D=="object"&&typeof T=="object"){if(a(D)&&a(T))return y(D,T,R,F);var j=Array.isArray(D),$=Array.isArray(T);return j||$?j===$&&f(D,T,R,F):(j=D instanceof Date,$=T instanceof Date,j||$?j===$&&i(D.getTime(),T.getTime()):(j=D instanceof RegExp,$=T instanceof RegExp,j||$?j===$&&b(D,T):l(D)||l(T)?D===T:x&&(j=D instanceof Map,$=T instanceof Map,j||$)?j===$&&m(D,T,R,F):w&&(j=D instanceof Set,$=T instanceof Set,j||$)?j===$&&g(D,T,R,F):y(D,T,R,F)))}return D!==D&&T!==T}return _}var C=P(),E=P(function(){return i}),S=P(d()),M=P(d(i));n.circularDeepEqual=S,n.circularShallowEqual=M,n.createCustomEqual=P,n.deepEqual=C,n.sameValueZeroEqual=i,n.shallowEqual=E,Object.defineProperty(n,"__esModule",{value:!0})})})(ww,ww.exports);var SQ=ww.exports,EQ="Invariant failed";function PQ(e,t){if(!e)throw new Error(EQ)}var nE=PQ,Qp={},Yp={},fy={};Object.defineProperty(fy,"__esModule",{value:!0});fy.Command=void 0;var kQ=function(){function e(t,n){var r=this;n===void 0&&(n={}),this.perform=function(){var o=t.perform();if(typeof o=="function"){var i=n.history;i&&(r.historyItem&&i.remove(r.historyItem),r.historyItem=i.add({perform:t.perform,negate:o}),r.history={undo:function(){return i.undo(r.historyItem)},redo:function(){return i.redo(r.historyItem)}})}}}return e}();fy.Command=kQ;var $Q=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.ActionImpl=void 0;var IQ=$Q(nE),OQ=fy,MQ=kt,RQ=function(e){var t=e.keywords,n=t===void 0?"":t,r=e.section,o=r===void 0?"":r;return(n+" "+(typeof o=="string"?o:o.name)).trim()},TQ=function(){function e(t,n){var r=this,o;this.priority=MQ.Priority.NORMAL,this.ancestors=[],this.children=[],Object.assign(this,t),this.id=t.id,this.name=t.name,this.keywords=RQ(t);var i=t.perform;if(this.command=i&&new OQ.Command({perform:function(){return i(r)}},{history:n.history}),this.perform=(o=this.command)===null||o===void 0?void 0:o.perform,t.parent){var a=n.store[t.parent];(0,IQ.default)(a,"attempted to create an action whos parent: "+t.parent+" does not exist in the store."),a.addChild(this)}}return e.prototype.addChild=function(t){t.ancestors.unshift(this);for(var n=this.parentActionImpl;n;)t.ancestors.unshift(n),n=n.parentActionImpl;this.children.push(t)},e.prototype.removeChild=function(t){var n=this,r=this.children.indexOf(t);r!==-1&&this.children.splice(r,1),t.children&&t.children.forEach(function(o){n.removeChild(o)})},Object.defineProperty(e.prototype,"parentActionImpl",{get:function(){return this.ancestors[this.ancestors.length-1]},enumerable:!1,configurable:!0}),e.create=function(t,n){return new e(t,n)},e}();Yp.ActionImpl=TQ;var tv=we&&we.__assign||function(){return tv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"||window.addEventListener("keydown",function(n){var r;if(!(!t.redoStack.length&&!t.undoStack.length||(0,DQ.shouldRejectKeystrokes)())){var o=(r=n.key)===null||r===void 0?void 0:r.toLowerCase();n.metaKey&&o==="z"&&n.shiftKey?t.redo():n.metaKey&&o==="z"&&t.undo()}})},e.prototype.add=function(t){var n=bD.create(t);return this.undoStack.push(n),n},e.prototype.remove=function(t){var n=this.undoStack.findIndex(function(o){return o===t});if(n!==-1){this.undoStack.splice(n,1);return}var r=this.redoStack.findIndex(function(o){return o===t});r!==-1&&this.redoStack.splice(r,1)},e.prototype.undo=function(t){if(!t){var n=this.undoStack.pop();return n?(n==null||n.negate(),this.redoStack.push(n),n):void 0}var r=this.undoStack.findIndex(function(o){return o===t});if(r!==-1)return this.undoStack.splice(r,1),t.negate(),this.redoStack.push(t),t},e.prototype.redo=function(t){if(!t){var n=this.redoStack.pop();return n?(n==null||n.perform(),this.undoStack.push(n),n):void 0}var r=this.redoStack.findIndex(function(o){return o===t});if(r!==-1)return this.redoStack.splice(r,1),t.perform(),this.undoStack.push(t),t},e.prototype.reset=function(){this.undoStack.splice(0),this.redoStack.splice(0)},e}(),xD=new NQ;Qc.history=xD;Object.freeze(xD);var Su={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VisualState=void 0,function(t){t.animatingIn="animating-in",t.showing="showing",t.animatingOut="animating-out",t.hidden="hidden"}(e.VisualState||(e.VisualState={}))})(Su);var $n=we&&we.__assign||function(){return $n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1)return this.subscribers.splice(n,1)}},e.prototype.notify=function(){this.subscribers.forEach(function(t){return t.collect()})},e}(),QQ=function(){function e(t,n){this.collector=t,this.onChange=n}return e.prototype.collect=function(){try{var t=this.collector();(0,VQ.deepEqual)(t,this.collected)||(this.collected=t,this.onChange&&this.onChange(this.collected))}catch(n){console.warn(n)}},e}(),Kd={},rE={};Object.defineProperty(rE,"__esModule",{value:!0});var YQ=["Shift","Meta","Alt","Control"],XQ=1e3,ZQ="keydown",JQ=typeof navigator=="object"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"Meta":"Control";function Cw(e,t){return typeof e.getModifierState=="function"?e.getModifierState(t):!1}function eY(e){return e.trim().split(" ").map(function(t){var n=t.split(/\b\+/),r=n.pop();return n=n.map(function(o){return o==="$mod"?JQ:o}),[n,r]})}function tY(e,t){return/^[^A-Za-z0-9]$/.test(e.key)&&t[1]===e.key?!0:!(t[1].toUpperCase()!==e.key.toUpperCase()&&t[1]!==e.code||t[0].find(function(n){return!Cw(e,n)})||YQ.find(function(n){return!t[0].includes(n)&&t[1]!==n&&Cw(e,n)}))}function nY(e,t,n){var r,o;n===void 0&&(n={});var i=(r=n.timeout)!==null&&r!==void 0?r:XQ,a=(o=n.event)!==null&&o!==void 0?o:ZQ,l=Object.keys(t).map(function(d){return[eY(d),t[d]]}),s=new Map,u=null,c=function(d){d instanceof KeyboardEvent&&(l.forEach(function(f){var m=f[0],p=f[1],h=s.get(m),y=h||m,b=y[0],g=tY(d,b);g?y.length>1?s.set(m,y.slice(1)):(s.delete(m),p(d)):Cw(d,d.key)||s.delete(m)}),u&&clearTimeout(u),u=setTimeout(s.clear.bind(s),i))};return e.addEventListener(a,c),function(){e.removeEventListener(a,c)}}rE.default=nY;var MO;function rY(){if(MO)return Kd;MO=1;var e=we&&we.__createBinding||(Object.create?function(y,b,g,x){x===void 0&&(x=g),Object.defineProperty(y,x,{enumerable:!0,get:function(){return b[g]}})}:function(y,b,g,x){x===void 0&&(x=g),y[x]=b[g]}),t=we&&we.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),n=we&&we.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var g in y)g!=="default"&&Object.prototype.hasOwnProperty.call(y,g)&&e(b,y,g);return t(b,y),b},r=we&&we.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.InternalEvents=void 0;var o=n(v),i=r(rE),a=Su,l=ds(),s=kt;function u(){return c(),d(),p(),h(),null}Kd.InternalEvents=u;function c(){var y,b,g=(0,l.useKBar)(function(O){return{visualState:O.visualState,showing:O.visualState!==a.VisualState.hidden,disabled:O.disabled}}),x=g.query,w=g.options,P=g.visualState,C=g.showing,E=g.disabled;o.useEffect(function(){var O,R=function(){x.setVisualState(function(T){return T===a.VisualState.hidden||T===a.VisualState.animatingOut?T:a.VisualState.animatingOut})};if(E){R();return}var _=w.toggleShortcut||"$mod+k",D=(0,i.default)(window,(O={},O[_]=function(T){var F,j,$,L;T.defaultPrevented||(T.preventDefault(),x.toggle(),C?(j=(F=w.callbacks)===null||F===void 0?void 0:F.onClose)===null||j===void 0||j.call(F):(L=($=w.callbacks)===null||$===void 0?void 0:$.onOpen)===null||L===void 0||L.call($))},O.Escape=function(T){var F,j;C&&(T.stopPropagation(),T.preventDefault(),(j=(F=w.callbacks)===null||F===void 0?void 0:F.onClose)===null||j===void 0||j.call(F)),R()},O));return function(){D()}},[w.callbacks,w.toggleShortcut,x,C,E]);var S=o.useRef(),M=o.useCallback(function(O){var R,_,D=0;O===a.VisualState.animatingIn&&(D=((R=w.animations)===null||R===void 0?void 0:R.enterMs)||0),O===a.VisualState.animatingOut&&(D=((_=w.animations)===null||_===void 0?void 0:_.exitMs)||0),clearTimeout(S.current),S.current=setTimeout(function(){var T=!1;x.setVisualState(function(){var F=O===a.VisualState.animatingIn?a.VisualState.showing:a.VisualState.hidden;return F===a.VisualState.hidden&&(T=!0),F}),T&&x.setCurrentRootAction(null)},D)},[(y=w.animations)===null||y===void 0?void 0:y.enterMs,(b=w.animations)===null||b===void 0?void 0:b.exitMs,x]);o.useEffect(function(){switch(P){case a.VisualState.animatingIn:case a.VisualState.animatingOut:M(P);break}},[M,P])}function d(){var y=(0,l.useKBar)(function(x){return{visualState:x.visualState}}),b=y.visualState,g=y.options;o.useEffect(function(){if(!g.disableDocumentLock)if(b===a.VisualState.animatingIn){if(document.body.style.overflow="hidden",!g.disableScrollbarManagement){var x=(0,s.getScrollbarWidth)(),w=getComputedStyle(document.body)["margin-right"];w&&(x+=Number(w.replace(/\D/g,""))),document.body.style.marginRight=x+"px"}}else b===a.VisualState.hidden&&(document.body.style.removeProperty("overflow"),g.disableScrollbarManagement||document.body.style.removeProperty("margin-right"))},[g.disableDocumentLock,g.disableScrollbarManagement,b])}var f=new WeakSet;function m(y){return function(b){f.has(b)||(y(b),f.add(b))}}function p(){var y=(0,l.useKBar)(function(C){return{actions:C.actions,open:C.visualState===a.VisualState.showing,disabled:C.disabled}}),b=y.actions,g=y.query,x=y.open,w=y.options,P=y.disabled;o.useEffect(function(){var C;if(!(x||P)){for(var E=Object.keys(b).map(function($){return b[$]}),S=[],M=0,O=E;M`Invalid value for key ${e}`,dY=e=>`Pattern length exceeds max of ${e}.`,fY=e=>`Missing ${e} property in key`,pY=e=>`Property 'weight' in key '${e}' must be a positive integer`,_O=Object.prototype.hasOwnProperty;class mY{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=PD(r);n+=o.weight,this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function PD(e){let t=null,n=null,r=null,o=1,i=null;if(zi(e)||Ga(e))r=e,t=FO(e),n=Sw(e);else{if(!_O.call(e,"name"))throw new Error(fY("name"));const a=e.name;if(r=a,_O.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(pY(a));t=FO(a),n=Sw(a),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function FO(e){return Ga(e)?e:e.split(".")}function Sw(e){return Ga(e)?e.join("."):e}function hY(e,t){let n=[],r=!1;const o=(i,a,l)=>{if(oo(i))if(!a[l])n.push(i);else{let s=a[l];const u=i[s];if(!oo(u))return;if(l===a.length-1&&(zi(u)||CD(u)||lY(u)))n.push(aY(u));else if(Ga(u)){r=!0;for(let c=0,d=u.length;ce.score===t.score?e.idx{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,zi(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();zi(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n{let a=o.getFn?o.getFn(t):this.getFn(t,o.path);if(oo(a)){if(Ga(a)){let l=[];const s=[{nestedArrIndex:-1,value:a}];for(;s.length;){const{nestedArrIndex:u,value:c}=s.pop();if(oo(c))if(zi(c)&&!Jb(c)){let d={v:c,i:u,n:this.norm.get(c)};l.push(d)}else Ga(c)&&c.forEach((d,f)=>{s.push({nestedArrIndex:f,value:d})})}r.$[i]=l}else if(zi(a)&&!Jb(a)){let l={v:a,n:this.norm.get(a)};r.$[i]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function kD(e,t,{getFn:n=et.getFn,fieldNormWeight:r=et.fieldNormWeight}={}){const o=new oE({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(PD)),o.setSources(t),o.create(),o}function CY(e,{getFn:t=et.getFn,fieldNormWeight:n=et.fieldNormWeight}={}){const{keys:r,records:o}=e,i=new oE({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i}function lh(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=et.distance,ignoreLocation:i=et.ignoreLocation}={}){const a=t/e.length;if(i)return a;const l=Math.abs(r-n);return o?a+l/o:l?1:a}function SY(e=[],t=et.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}const Rs=32;function EY(e,t,n,{location:r=et.location,distance:o=et.distance,threshold:i=et.threshold,findAllMatches:a=et.findAllMatches,minMatchCharLength:l=et.minMatchCharLength,includeMatches:s=et.includeMatches,ignoreLocation:u=et.ignoreLocation}={}){if(t.length>Rs)throw new Error(dY(Rs));const c=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let m=i,p=f;const h=l>1||s,y=h?Array(d):[];let b;for(;(b=e.indexOf(t,p))>-1;){let E=lh(t,{currentLocation:b,expectedLocation:f,distance:o,ignoreLocation:u});if(m=Math.min(E,m),p=b+c,h){let S=0;for(;S=O;T-=1){let F=T-1,j=n[e.charAt(F)];if(h&&(y[F]=+!!j),_[T]=(_[T+1]<<1|1)&j,E&&(_[T]|=(g[T+1]|g[T])<<1|1|g[T+1]),_[T]&P&&(x=lh(t,{errors:E,currentLocation:F,expectedLocation:f,distance:o,ignoreLocation:u}),x<=m)){if(m=x,p=F,p<=f)break;O=Math.max(1,2*f-p)}}if(lh(t,{errors:E+1,currentLocation:f,expectedLocation:f,distance:o,ignoreLocation:u})>m)break;g=_}const C={isMatch:p>=0,score:Math.max(.001,x)};if(h){const E=SY(y,l);E.length?s&&(C.indices=E):C.isMatch=!1}return C}function PY(e){let t={};for(let n=0,r=e.length;n{this.chunks.push({pattern:f,alphabet:PY(f),startIndex:m})},d=this.pattern.length;if(d>Rs){let f=0;const m=d%Rs,p=d-m;for(;f{const{isMatch:b,score:g,indices:x}=EY(t,p,h,{location:o+y,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:s,includeMatches:r,ignoreLocation:u});b&&(f=!0),d+=g,b&&x&&(c=[...c,...x])});let m={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(m.indices=c),m}}class fs{constructor(t){this.pattern=t}static isMultiMatch(t){return AO(t,this.multiRegex)}static isSingleMatch(t){return AO(t,this.singleRegex)}search(){}}function AO(e,t){const n=e.match(t);return n?n[1]:null}class kY extends fs{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class $Y extends fs{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class IY extends fs{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class OY extends fs{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class MY extends fs{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class RY extends fs{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class ID extends fs{constructor(t,{location:n=et.location,threshold:r=et.threshold,distance:o=et.distance,includeMatches:i=et.includeMatches,findAllMatches:a=et.findAllMatches,minMatchCharLength:l=et.minMatchCharLength,isCaseSensitive:s=et.isCaseSensitive,ignoreLocation:u=et.ignoreLocation}={}){super(t),this._bitapSearch=new $D(t,{location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:s,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class OD extends fs{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,o.push([r,n-1]);const a=!!o.length;return{isMatch:a,score:a?0:1,indices:o}}}const Ew=[kY,OD,IY,OY,RY,MY,$Y,ID],LO=Ew.length,TY=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,_Y="|";function FY(e,t={}){return e.split(_Y).map(n=>{let r=n.trim().split(TY).filter(i=>i&&!!i.trim()),o=[];for(let i=0,a=r.length;i!!(e[nv.AND]||e[nv.OR]),NY=e=>!!e[$w.PATH],jY=e=>!Ga(e)&&SD(e)&&!Iw(e),DO=e=>({[nv.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function MD(e,t,{auto:n=!0}={}){const r=o=>{let i=Object.keys(o);const a=NY(o);if(!a&&i.length>1&&!Iw(o))return r(DO(o));if(jY(o)){const s=a?o[$w.PATH]:i[0],u=a?o[$w.PATTERN]:o[s];if(!zi(u))throw new Error(cY(s));const c={keyId:Sw(s),pattern:u};return n&&(c.searcher=kw(u,t)),c}let l={children:[],operator:i[0]};return i.forEach(s=>{const u=o[s];Ga(u)&&u.forEach(c=>{l.children.push(r(c))})}),l};return Iw(e)||(e=DO(e)),r(e)}function zY(e,{ignoreFieldNorm:t=et.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:i,score:a})=>{const l=o?o.weight:null;r*=Math.pow(a===0&&l?Number.EPSILON:a,(l||1)*(t?1:i))}),n.score=r})}function BY(e,t){const n=e.matches;t.matches=[],oo(n)&&n.forEach(r=>{if(!oo(r.indices)||!r.indices.length)return;const{indices:o,value:i}=r;let a={indices:o,value:i};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),t.matches.push(a)})}function HY(e,t){t.score=e.score}function VY(e,t,{includeMatches:n=et.includeMatches,includeScore:r=et.includeScore}={}){const o=[];return n&&o.push(BY),r&&o.push(HY),e.map(i=>{const{idx:a}=i,l={item:t[a],refIndex:a};return o.length&&o.forEach(s=>{s(i,l)}),l})}class yd{constructor(t,n={},r){this.options={...et,...n},this.options.useExtendedSearch,this._keyStore=new mY(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof oE))throw new Error(uY);this._myIndex=n||kD(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){oo(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r-1&&(s=s.slice(0,n)),VY(s,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=kw(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:i,i:a,n:l})=>{if(!oo(i))return;const{isMatch:s,score:u,indices:c}=n.searchIn(i);s&&o.push({item:i,idx:a,matches:[{score:u,value:i,norm:l,indices:c}]})}),o}_searchLogical(t){const n=MD(t,this.options),r=(l,s,u)=>{if(!l.children){const{keyId:d,searcher:f}=l,m=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(s,d),searcher:f});return m&&m.length?[{idx:u,item:s,matches:m}]:[]}const c=[];for(let d=0,f=l.children.length;d{if(oo(l)){let u=r(n,l,s);u.length&&(i[s]||(i[s]={idx:s,item:l,matches:[]},a.push(i[s])),u.forEach(({matches:c})=>{i[s].matches.push(...c)}))}}),a}_searchObjectList(t){const n=kw(t,this.options),{keys:r,records:o}=this._myIndex,i=[];return o.forEach(({$:a,i:l})=>{if(!oo(a))return;let s=[];r.forEach((u,c)=>{s.push(...this._findMatches({key:u,value:a[c],searcher:n}))}),s.length&&i.push({idx:l,item:a,matches:s})}),i}_findMatches({key:t,value:n,searcher:r}){if(!oo(n))return[];let o=[];if(Ga(n))n.forEach(({v:i,i:a,n:l})=>{if(!oo(i))return;const{isMatch:s,score:u,indices:c}=r.searchIn(i);s&&o.push({score:u,key:t,value:i,idx:a,norm:l,indices:c})});else{const{v:i,n:a}=n,{isMatch:l,score:s,indices:u}=r.searchIn(i);l&&o.push({score:s,key:t,value:i,norm:a,indices:u})}return o}}yd.version="6.6.2";yd.createIndex=kD;yd.parseIndex=CY;yd.config=et;yd.parseQuery=MD;DY(LY);const UY=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"})),WY=Go(UY);(function(e){var t=we&&we.__createBinding||(Object.create?function(m,p,h,y){y===void 0&&(y=h),Object.defineProperty(m,y,{enumerable:!0,get:function(){return p[h]}})}:function(m,p,h,y){y===void 0&&(y=h),m[y]=p[h]}),n=we&&we.__setModuleDefault||(Object.create?function(m,p){Object.defineProperty(m,"default",{enumerable:!0,value:p})}:function(m,p){m.default=p}),r=we&&we.__importStar||function(m){if(m&&m.__esModule)return m;var p={};if(m!=null)for(var h in m)h!=="default"&&Object.prototype.hasOwnProperty.call(m,h)&&t(p,m,h);return n(p,m),p},o=we&&we.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.useDeepMatches=e.useMatches=e.NO_GROUP=void 0;var i=r(v),a=ds(),l=kt,s=o(WY);e.NO_GROUP={name:"none",priority:l.Priority.NORMAL};var u={keys:[{name:"name",weight:.5},{name:"keywords",getFn:function(m){var p;return((p=m.keywords)!==null&&p!==void 0?p:"").split(",")},weight:.5},"subtitle"],ignoreLocation:!0,includeScore:!0,includeMatches:!0,threshold:.2,minMatchCharLength:1};function c(m,p){return p.priority-m.priority}function d(){var m=(0,a.useKBar)(function(M){return{search:M.searchQuery,actions:M.actions,rootActionId:M.currentRootActionId}}),p=m.search,h=m.actions,y=m.rootActionId,b=i.useMemo(function(){return Object.keys(h).reduce(function(M,O){var R=h[O];if(!R.parent&&!y&&M.push(R),R.id===y)for(var _=0;_0){for(var j=D[F].children,$=0;$o),n(e.exports,"useComposedRefs",()=>i);function r(a,l){typeof a=="function"?a(l):a!=null&&(a.current=l)}function o(...a){return l=>a.forEach(s=>r(s,l))}function i(...a){return t.useCallback(o(...a),a)}})(AD);var GY=AD.exports;(function(e){var t=my,n=v,r=GY;function o(f,m,p,h){Object.defineProperty(f,m,{get:p,set:h,enumerable:!0,configurable:!0})}function i(f){return f&&f.__esModule?f.default:f}o(e.exports,"Slot",()=>a),o(e.exports,"Slottable",()=>s),o(e.exports,"Root",()=>d);const a=n.forwardRef((f,m)=>{const{children:p,...h}=f,y=n.Children.toArray(p),b=y.find(u);if(b){const g=b.props.children,x=y.map(w=>w===b?n.Children.count(g)>1?n.Children.only(null):n.isValidElement(g)?g.props.children:null:w);return n.createElement(l,i(t)({},h,{ref:m}),n.isValidElement(g)?n.cloneElement(g,void 0,x):null)}return n.createElement(l,i(t)({},h,{ref:m}),p)});a.displayName="Slot";const l=n.forwardRef((f,m)=>{const{children:p,...h}=f;return n.isValidElement(p)?n.cloneElement(p,{...c(h,p.props),ref:m?r.composeRefs(m,p.ref):p.ref}):n.Children.count(p)>1?n.Children.only(null):null});l.displayName="SlotClone";const s=({children:f})=>n.createElement(n.Fragment,null,f);function u(f){return n.isValidElement(f)&&f.type===s}function c(f,m){const p={...m};for(const h in m){const y=f[h],b=m[h];/^on[A-Z]/.test(h)?y&&b?p[h]=(...x)=>{b(...x),y(...x)}:y&&(p[h]=y):h==="style"?p[h]={...y,...b}:h==="className"&&(p[h]=[y,b].filter(Boolean).join(" "))}return{...f,...p}}const d=a})(FD);var qY=FD.exports;(function(e){var t=my,n=v,r=ss,o=qY;function i(d,f,m,p){Object.defineProperty(d,f,{get:m,set:p,enumerable:!0,configurable:!0})}function a(d){return d&&d.__esModule?d.default:d}i(e.exports,"Primitive",()=>s),i(e.exports,"Root",()=>c),i(e.exports,"dispatchDiscreteCustomEvent",()=>u);const s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((d,f)=>{const m=n.forwardRef((p,h)=>{const{asChild:y,...b}=p,g=y?o.Slot:f;return n.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.createElement(g,a(t)({},b,{ref:h}))});return m.displayName=`Primitive.${f}`,{...d,[f]:m}},{});function u(d,f){d&&r.flushSync(()=>d.dispatchEvent(f))}const c=s})(_D);var KY=_D.exports;(function(e){var t=my,n=v,r=ss,o=KY;function i(u,c,d,f){Object.defineProperty(u,c,{get:d,set:f,enumerable:!0,configurable:!0})}function a(u){return u&&u.__esModule?u.default:u}i(e.exports,"Portal",()=>l),i(e.exports,"Root",()=>s);const l=n.forwardRef((u,c)=>{var d;const{container:f=globalThis==null||(d=globalThis.document)===null||d===void 0?void 0:d.body,...m}=u;return f?a(r).createPortal(n.createElement(o.Primitive.div,a(t)({},m,{ref:c})),f):null}),s=l})(RD);var QY=RD.exports,YY=we&&we.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),XY=we&&we.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ZY=we&&we.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&YY(t,e,n);return XY(t,e),t};Object.defineProperty(py,"__esModule",{value:!0});py.KBarPortal=void 0;var JY=QY,eX=ZY(v),tX=Su,nX=ds();function rX(e){var t=e.children,n=e.container,r=(0,nX.useKBar)(function(o){return{showing:o.visualState!==tX.VisualState.hidden}}).showing;return r?eX.createElement(JY.Portal,{container:n},t):null}py.KBarPortal=rX;var hy={},mp=we&&we.__assign||function(){return mp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0)&&(n[o]=e[o]);return n}var cX=["bottom","height","left","right","top","width"],dX=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),cX.some(function(r){return t[r]!==n[r]})},yl=new Map,LD,fX=function e(){var t=[];yl.forEach(function(n,r){var o=r.getBoundingClientRect();dX(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),LD=window.requestAnimationFrame(e)};function pX(e,t){return{observe:function(){var r=yl.size===0;yl.has(e)?yl.get(e).callbacks.push(t):yl.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&fX()},unobserve:function(){var r=yl.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||yl.delete(e),yl.size||cancelAnimationFrame(LD)}}}}var rv=typeof window<"u"?k.useLayoutEffect:k.useEffect;function mX(e,t){t===void 0&&(t={width:0,height:0});var n=k.useState(e.current),r=n[0],o=n[1],i=k.useReducer(hX,t),a=i[0],l=i[1],s=k.useRef(!1);return rv(function(){e.current!==r&&o(e.current)}),rv(function(){if(r&&!s.current){s.current=!0;var u=r.getBoundingClientRect();l({rect:u})}},[r]),k.useEffect(function(){if(r){var u=pX(r,function(c){l({rect:c})});return u.observe(),function(){u.unobserve()}}},[r]),a}function hX(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e}var gX=function(){return 50},vX=function(t){return t},yX=function(t,n){var r=n?"offsetWidth":"offsetHeight";return t[r]},DD=function(t){for(var n=Math.max(t.start-t.overscan,0),r=Math.min(t.end+t.overscan,t.size-1),o=[],i=n;i<=r;i++)o.push(i);return o};function bX(e){var t,n=e.size,r=n===void 0?0:n,o=e.estimateSize,i=o===void 0?gX:o,a=e.overscan,l=a===void 0?1:a,s=e.paddingStart,u=s===void 0?0:s,c=e.paddingEnd,d=c===void 0?0:c,f=e.parentRef,m=e.horizontal,p=e.scrollToFn,h=e.useObserver,y=e.initialRect,b=e.onScrollElement,g=e.scrollOffsetFn,x=e.keyExtractor,w=x===void 0?vX:x,P=e.measureSize,C=P===void 0?yX:P,E=e.rangeExtractor,S=E===void 0?DD:E,M=m?"width":"height",O=m?"scrollLeft":"scrollTop",R=k.useRef({scrollOffset:0,measurements:[]}),_=k.useState(0),D=_[0],T=_[1];R.current.scrollOffset=D;var F=h||mX,j=F(f,y),$=j[M];R.current.outerSize=$;var L=k.useCallback(function(Q){f.current&&(f.current[O]=Q)},[f,O]),z=p||L;p=k.useCallback(function(Q){z(Q,L)},[L,z]);var B=k.useState({}),A=B[0],H=B[1],q=k.useCallback(function(){return H({})},[]),U=k.useRef([]),G=k.useMemo(function(){var Q=U.current.length>0?Math.min.apply(Math,U.current):0;U.current=[];for(var Z=R.current.measurements.slice(0,Q),ae=Q;ae=se+Ce?K="end":K="start"),K==="start"?p(Q):K==="end"?p(Q-Ce):K==="center"&&p(Q-Ce/2)},[p]),ye=k.useCallback(function(Q,Z){var ae=Z===void 0?{}:Z,te=ae.align,K=te===void 0?"auto":te,ee=uX(ae,["align"]),se=R.current,Ce=se.measurements,_e=se.scrollOffset,$e=se.outerSize,X=Ce[Math.max(0,Math.min(Q,r-1))];if(X){if(K==="auto")if(X.end>=_e+$e)K="end";else if(X.start<=_e)K="start";else return;var Ee=K==="center"?X.start+X.size/2:K==="end"?X.end:X.start;ie(Ee,Ts({align:K},ee))}},[ie,r]),V=k.useCallback(function(){for(var Q=arguments.length,Z=new Array(Q),ae=0;aeo)n=i-1;else return i}return t>0?t-1:0};function wX(e){for(var t=e.measurements,n=e.outerSize,r=e.scrollOffset,o=t.length-1,i=function(u){return t[u].start},a=xX(0,o,i,r),l=a;lsh?b-1:b;if(typeof r.current[g]=="string"){if(g===0)return b;g-=1}return g})):h.key==="ArrowDown"||h.ctrlKey&&h.key==="n"?(h.preventDefault(),h.stopPropagation(),a.setActiveIndex(function(b){var g=bVX(e,"name",{value:t,configurable:!0}),_u=Ra(e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()),"capitalize"),UX=Ra(()=>{let e=Qe(),{resource:t,resources:n,id:r,action:o}=Je(),i=st(),a=Kp(),l=hr(),{mutate:s}=lD(),{push:u,list:c,create:d,show:f,edit:m}=Cn(),p=aa(),h=v.useContext(Zn.KBarContext),{can:y}=PK(),[b,g]=v.useState([]);v.useEffect(()=>{Ra(async()=>await Promise.all(x().flatMap(P=>w(P))),"preaparedActions")().then(P=>g(P.flatMap(C=>C)))},[n,r,t,o]),v.useEffect(()=>{b.length===0&&h.query.setVisualState(Zn.VisualState.hidden)},[b]);let x=Ra(()=>{let P=[...n],C=P==null?void 0:P.findIndex(E=>(E.identifier??(E==null?void 0:E.name))===((t==null?void 0:t.identifier)??(t==null?void 0:t.name)));if(C>0){let E=P[C];P.splice(C,1),P.splice(0,0,E)}return P},"moveActionToFirst"),w=Ra(async P=>{var C,E,S,M,O,R;let{name:_,label:D,list:T,create:F,canCreate:j,canEdit:$,canShow:L,icon:z,show:B,canDelete:A,edit:H,route:q}=P,U=((C=P==null?void 0:P.meta)==null?void 0:C.label)??((E=P==null?void 0:P.options)==null?void 0:E.label)??D,G=((S=P==null?void 0:P.meta)==null?void 0:S.icon)??((M=P==null?void 0:P.options)==null?void 0:M.icon)??z,Y=((O=P==null?void 0:P.meta)==null?void 0:O.canDelete)??((R=P==null?void 0:P.options)==null?void 0:R.canDelete)??A,re=U??e(`${P.name}.${P.name}`,p(P.name,"plural")),le=[];if(T&&(t!==void 0&&(t==null?void 0:t.name)!==_||o!==void 0&&(t==null?void 0:t.name)===_)){let{can:J}=await(y==null?void 0:y({resource:_,action:"list",params:{id:r,resource:P}}))||{can:!0};J&&le.push(Zn.createAction({name:e("actions.list",_u("list")),section:re,icon:G,perform:()=>{let oe=a({resource:P,action:"list",legacy:i==="legacy"});oe&&(i==="legacy"?u(oe):l({to:oe}))}}))}if((j||F)&&F&&(o!=="create"||(t==null?void 0:t.name)!==_)){let{can:J}=await(y==null?void 0:y({resource:_,action:"create",params:{resource:P}}))||{can:!0};J&&le.push(Zn.createAction({name:e("actions.create",_u("create")),section:re,icon:G,keywords:"new",perform:()=>{let oe=a({resource:P,action:"create",legacy:i==="legacy"});oe&&(i==="legacy"?u(oe):l({to:oe}))}}))}if((t==null?void 0:t.name)===_&&r){if((L||B)&&B&&o!=="show"){let{can:J}=await(y==null?void 0:y({resource:_,action:"show",params:{id:r,resource:P}}))||{can:!0};J&&le.push(Zn.createAction({name:e("actions.show",_u("show")),section:re,icon:G,perform:()=>{let oe=a({resource:P,action:"show",legacy:i==="legacy",meta:{id:r}});oe&&(i==="legacy"?u(oe):l({to:oe}))}}))}if(($||H)&&H&&o!=="edit"){let{can:J}=await(y==null?void 0:y({resource:_,action:"edit",params:{id:r,resource:P}}))||{can:!0};J&&le.push(Zn.createAction({name:e("actions.edit",_u("edit")),section:re,icon:G,perform:()=>{let oe=a({resource:P,action:"edit",legacy:i==="legacy",meta:{id:r}});oe&&(i==="legacy"?u(oe):l({to:oe}))}}))}if(Y){let{can:J}=await(y==null?void 0:y({resource:_,action:"delete",params:{id:r,resource:P}}))||{can:!0};J&&le.push({id:"delete",name:e("actions.delete",_u("delete")),section:re,icon:G},Zn.createAction({name:e("buttons.delete",_u("delete")),section:e("buttons.confirm","Are you sure?"),parent:"delete",perform:()=>{s({resource:P.name,id:r},{onSuccess:()=>{let oe=a({resource:P,action:"list",legacy:i==="legacy"});oe&&(i==="legacy"?u(oe):l({to:oe}))}})}}),Zn.createAction({name:e("buttons.cancel","Cancel"),parent:"delete",perform:()=>null}))}}return le},"createActionWithResource");Zn.useRegisterActions(b,[b])},"useRefineKbar"),WX=Ra(()=>k.createElement(Zn.KBarPortal,null,k.createElement(Zn.KBarPositioner,{style:{opacity:1,transition:"background 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0s",backdropFilter:"saturate(180%) blur(1px)",background:"rgba(0, 0, 0, 0.1)",zIndex:"9999"}},k.createElement(Zn.KBarAnimator,{style:{maxWidth:"600px",width:"100%",background:"white",color:"black",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"}},k.createElement(Zn.KBarSearch,{style:{padding:"12px 16px",fontSize:"16px",width:"100%",boxSizing:"border-box",outline:"none",border:"none",background:"rgb(252 252 252)",color:"black"}}),k.createElement(qX,null)))),"CommandBar"),GX={padding:"8px 16px",fontSize:"14px",textTransform:"uppercase",fontWeight:"bold",opacity:.5},qX=Ra(()=>{let{results:e,rootActionId:t}=Zn.useMatches();return k.createElement(Zn.KBarResults,{items:e,onRender:({item:n,active:r})=>typeof n=="string"?k.createElement("div",{style:GX},n):k.createElement(jD,{action:n,active:r,currentRootActionId:t})})},"RenderResults"),jD=k.forwardRef(({action:e,active:t,currentRootActionId:n},r)=>{var o;let i=k.useMemo(()=>{if(!n)return e.ancestors;let a=e.ancestors.findIndex(l=>l.id===n);return e.ancestors.slice(a+1)},[e.ancestors,n]);return k.createElement("div",{ref:r,style:{padding:"12px 16px",background:t?"rgba(0 0 0 / 0.05)":"transparent",borderLeft:`2px solid ${t?"rgb(28 28 29)":"transparent"}`,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer"}},k.createElement("div",{style:{display:"flex",gap:"8px",alignItems:"center",fontSize:14}},e.icon&&e.icon,k.createElement("div",{style:{display:"flex",flexDirection:"column"}},k.createElement("div",null,i.length>0&&i.map(a=>k.createElement(k.Fragment,{key:a.id},k.createElement("span",{style:{opacity:.5,marginRight:8}},a.name),k.createElement("span",{style:{marginRight:8}},"›"))),k.createElement("span",{style:{color:e.name.toLocaleUpperCase()==="DELETE"?"red":"black"}},e.name)),e.subtitle&&k.createElement("span",{style:{fontSize:12}},e.subtitle))),(o=e.shortcut)!=null&&o.length?k.createElement("div",{"aria-hidden":!0,style:{display:"grid",gridAutoFlow:"column",gap:"4px"}},e.shortcut.map(a=>k.createElement("kbd",{key:a,style:{padding:"4px 6px",background:"rgba(0 0 0 / .1)",borderRadius:"4px",fontSize:14}},a))):null)});jD.displayName="ResultItem";var KX=Ra(({commandBarProps:e})=>{let t=v.useContext(zD);UX();let n={...t,...e};return k.createElement(WX,{...n})},"RefineKbar"),zD=v.createContext({}),QX=Ra(({children:e,commandBarProps:t})=>k.createElement(zD.Provider,{value:t??{}},k.createElement(Zn.KBarProvider,null,e)),"RefineKbarProvider");function BD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t=0)&&(n[o]=e[o]);return n}var HD={exports:{}},YX="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XX=YX,ZX=XX;function VD(){}function UD(){}UD.resetWarningCache=VD;var JX=function(){function e(r,o,i,a,l,s){if(s!==ZX){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:UD,resetWarningCache:VD};return n.PropTypes=n,n};HD.exports=JX();var WD=HD.exports;const fe=ra(WD);function Mw(e,t){return Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Mw(e,t)}function GD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Mw(e,t)}const VO={disabled:!1},ov=k.createContext(null);var eZ=function(t){return t.scrollTop},vf="unmounted",$s="exited",Is="entering",Yu="entered",Rw="exiting",nl=function(e){GD(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,l=a&&!a.isMounting?r.enter:r.appear,s;return i.appearStatus=null,r.in?l?(s=$s,i.appearStatus=Is):s=Yu:r.unmountOnExit||r.mountOnEnter?s=vf:s=$s,i.state={status:s},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===vf?{status:$s}: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!==Is&&a!==Yu&&(i=Is):(a===Is||a===Yu)&&(i=Rw)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,l;return i=a=l=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,l=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Is){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Jm.findDOMNode(this);a&&eZ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===$s&&this.setState({status:vf})},n.performEnter=function(o){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:o,s=this.props.nodeRef?[l]:[Jm.findDOMNode(this),l],u=s[0],c=s[1],d=this.getTimeouts(),f=l?d.appear:d.enter;if(!o&&!a||VO.disabled){this.safeSetState({status:Yu},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Is},function(){i.props.onEntering(u,c),i.onTransitionEnd(f,function(){i.safeSetState({status:Yu},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:Jm.findDOMNode(this);if(!i||VO.disabled){this.safeSetState({status:$s},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Rw},function(){o.props.onExiting(l),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:$s},function(){o.props.onExited(l)})})})},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(l){a&&(a=!1,i.nextCallback=null,o(l))},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:Jm.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=s[0],c=s[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===vf)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 l=ue(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(ov.Provider,{value:null},typeof a=="function"?a(o,l):k.cloneElement(k.Children.only(a),l))},t}(k.Component);nl.contextType=ov;nl.propTypes={};function Fu(){}nl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fu,onEntering:Fu,onEntered:Fu,onExit:Fu,onExiting:Fu,onExited:Fu};nl.UNMOUNTED=vf;nl.EXITED=$s;nl.ENTERING=Is;nl.ENTERED=Yu;nl.EXITING=Rw;const by=nl;function tZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aE(e,t){var n=function(i){return t&&v.isValidElement(i)?t(i):i},r=Object.create(null);return e&&v.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function nZ(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}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,l={};for(var s in t){if(r[s])for(a=0;anull}function bd(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 gp(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function vt(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{gp(n,t)})},e)}function qa(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?Jn(xd,--Wr):0,Yc--,In===10&&(Yc=1,wy--),In}function so(){return In=Wr2||yp(In)>3?"":" "}function PZ(e,t){for(;--t&&so()&&!(In<48||In>102||In>57&&In<65||In>70&&In<97););return Xp(e,tg()+(t<6&&Wi()==32&&so()==32))}function _w(e){for(;so();)switch(In){case e:return Wr;case 34:case 39:e!==34&&e!==39&&_w(In);break;case 40:e===41&&_w(e);break;case 92:so();break}return Wr}function kZ(e,t){for(;so()&&e+In!==47+10;)if(e+In===42+42&&Wi()===47)break;return"/*"+Xp(t,Wr-1)+"*"+xy(e===47?e:so())}function $Z(e){for(;!yp(Wi());)so();return Xp(e,Wr)}function IZ(e){return JD(rg("",null,null,null,[""],e=ZD(e),0,[0],e))}function rg(e,t,n,r,o,i,a,l,s){for(var u=0,c=0,d=a,f=0,m=0,p=0,h=1,y=1,b=1,g=0,x="",w=o,P=i,C=r,E=x;y;)switch(p=g,g=so()){case 40:if(p!=108&&Jn(E,d-1)==58){Tw(E+=Mt(ng(g),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:E+=ng(g);break;case 9:case 10:case 13:case 32:E+=EZ(p);break;case 92:E+=PZ(tg()-1,7);continue;case 47:switch(Wi()){case 42:case 47:uh(OZ(kZ(so(),tg()),t,n),s);break;default:E+="/"}break;case 123*h:l[u++]=Li(E)*b;case 125*h:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+c:b==-1&&(E=Mt(E,/\f/g,"")),m>0&&Li(E)-d&&uh(m>32?WO(E+";",r,n,d-1):WO(Mt(E," ","")+";",r,n,d-2),s);break;case 59:E+=";";default:if(uh(C=UO(E,t,n,u,c,o,l,x,w=[],P=[],d),i),g===123)if(c===0)rg(E,t,C,C,w,i,d,l,P);else switch(f===99&&Jn(E,3)===110?100:f){case 100:case 108:case 109:case 115:rg(e,C,C,r&&uh(UO(e,C,C,0,0,o,l,x,o,w=[],d),P),o,P,d,l,r?w:P);break;default:rg(E,C,C,C,[""],P,0,l,P)}}u=c=m=0,h=b=1,x=E="",d=a;break;case 58:d=1+Li(E),m=p;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&SZ()==125)continue}switch(E+=xy(g),g*h){case 38:b=c>0?1:(E+="\f",-1);break;case 44:l[u++]=(Li(E)-1)*b,b=1;break;case 64:Wi()===45&&(E+=ng(so())),f=Wi(),c=d=Li(x=E+=$Z(tg())),g++;break;case 45:p===45&&Li(E)==2&&(h=0)}}return i}function UO(e,t,n,r,o,i,a,l,s,u,c){for(var d=o-1,f=o===0?i:[""],m=cE(f),p=0,h=0,y=0;p0?f[b]+" "+g:Mt(g,/&\f/g,f[b])))&&(s[y++]=x);return Cy(e,t,n,o===0?sE:l,s,u,c)}function OZ(e,t,n){return Cy(e,t,n,KD,xy(CZ()),vp(e,2,-2),0)}function WO(e,t,n,r){return Cy(e,t,n,uE,vp(e,0,r),vp(e,r+1,-1),r)}function Ic(e,t){for(var n="",r=cE(e),o=0;o6)switch(Jn(e,t+1)){case 109:if(Jn(e,t+4)!==45)break;case 102:return Mt(e,/(.+:)(.+)-([^]+)/,"$1"+Ot+"$2-$3$1"+iv+(Jn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Tw(e,"stretch")?eN(Mt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jn(e,t+1)!==115)break;case 6444:switch(Jn(e,Li(e)-3-(~Tw(e,"!important")&&10))){case 107:return Mt(e,":",":"+Ot)+e;case 101:return Mt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ot+(Jn(e,14)===45?"inline-":"")+"box$3$1"+Ot+"$2$3$1"+lr+"$2box$3")+e}break;case 5936:switch(Jn(e,t+11)){case 114:return Ot+e+lr+Mt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ot+e+lr+Mt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ot+e+lr+Mt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ot+e+lr+e+e}return e}var NZ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case uE:t.return=eN(t.value,t.length);break;case QD:return Ic([Qd(t,{value:Mt(t.value,"@","@"+Ot)})],o);case sE:if(t.length)return wZ(t.props,function(i){switch(xZ(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ic([Qd(t,{props:[Mt(i,/:(read-\w+)/,":"+iv+"$1")]})],o);case"::placeholder":return Ic([Qd(t,{props:[Mt(i,/:(plac\w+)/,":"+Ot+"input-$1")]}),Qd(t,{props:[Mt(i,/:(plac\w+)/,":"+iv+"$1")]}),Qd(t,{props:[Mt(i,/:(plac\w+)/,lr+"input-$1")]})],o)}return""})}},jZ=[NZ],tN=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(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||jZ,i={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),b=1;b=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 XZ={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,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},ZZ=/[A-Z]|^ms/g,JZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sN=function(t){return t.charCodeAt(1)===45},qO=function(t){return t!=null&&typeof t!="boolean"},e1=qD(function(e){return sN(e)?e:e.replace(ZZ,"-$&").toLowerCase()}),KO=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(JZ,function(r,o,i){return Di={name:o,styles:i,next:Di},o})}return XZ[t]!==1&&!sN(t)&&typeof n=="number"&&n!==0?n+"px":n};function bp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Di={name:n.name,styles:n.styles,next:Di},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Di={name:r.name,styles:r.styles,next:Di},r=r.next;var o=n.styles+";";return o}return eJ(e,t,n)}case"function":{if(e!==void 0){var i=Di,a=n(e);return Di=i,bp(e,t,a)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function eJ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?iJ:aJ},ZO=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},lJ=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return aN(n,r,o),nJ(function(){return lN(n,r,o)}),null},sJ=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 l=ZO(t,n,r),s=l||XO(o),u=!s("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,m=1;mt(dJ(o)?n:o):t;return N.jsx(oJ,{styles:r})}/** * @mui/styled-engine v5.15.11 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function hE(e,t){return Fw(e,t)}const pN=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},fJ=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:fN,StyledEngineProvider:cJ,ThemeContext:Zp,css:Xc,default:hE,internal_processStyles:pN,keyframes:ps},Symbol.toStringTag,{value:"Module"}));function Ia(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 mN(e){if(!Ia(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=mN(e[n])}),t}function Ir(e,t,n={clone:!0}){const r=n.clone?I({},e):e;return Ia(e)&&Ia(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Ia(t[o])&&o in e&&Ia(e[o])?r[o]=Ir(e[o],t[o],n):n.clone?r[o]=Ia(t[o])?mN(t[o]):t[o]:r[o]=t[o])}),r}const pJ=Object.freeze(Object.defineProperty({__proto__:null,default:Ir,isPlainObject:Ia},Symbol.toStringTag,{value:"Module"})),mJ=["values","unit","step"],hJ=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)=>I({},n,{[r.key]:r.val}),{})};function hN(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=ue(e,mJ),i=hJ(t),a=Object.keys(i);function l(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function s(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,m){const p=a.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[a[p]]=="number"?t[a[p]]:m)-r/100}${n})`}function c(f){return a.indexOf(f)+1`@media (min-width:${gE[e]}px)`};function Gr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||JO;return t.reduce((a,l,s)=>(a[i.up(i.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const i=r.breakpoints||JO;return Object.keys(t).reduce((a,l)=>{if(Object.keys(i.values||gE).indexOf(l)!==-1){const s=i.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function gN(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function vN(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function yJ(e,...t){const n=gN(e),r=[n,...t].reduce((o,i)=>Ir(o,i),{});return vN(Object.keys(n),r)}function bJ(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function Gs({values:e,breakpoints:t,base:n}){const r=n||bJ(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,l,s)=>(Array.isArray(e)?(a[l]=e[s]!=null?e[s]:e[i],i=s):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function pe(e){if(typeof e!="string")throw new Error(qa(7));return e.charAt(0).toUpperCase()+e.slice(1)}const xJ=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"}));function Zc(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 av(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Zc(e,n)||r,t&&(o=t(o,r,e)),o}function Sn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,u=Zc(s,r)||{};return Gr(a,l,d=>{let f=av(u,o,d);return d===f&&typeof d=="string"&&(f=av(u,o,`${t}${d==="default"?"":pe(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function wJ(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const CJ={m:"margin",p:"padding"},SJ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},eM={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},EJ=wJ(e=>{if(e.length>2)if(eM[e])e=eM[e];else return[e];const[t,n]=e.split(""),r=CJ[t],o=SJ[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),vE=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],yE=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...vE,...yE];function Jp(e,t,n,r){var o;const i=(o=Zc(e,t,!1))!=null?o:n;return typeof i=="number"?a=>typeof a=="string"?a:i*a:Array.isArray(i)?a=>typeof a=="string"?a:i[a]:typeof i=="function"?i:()=>{}}function bE(e){return Jp(e,"spacing",8)}function uu(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function PJ(e,t){return n=>e.reduce((r,o)=>(r[o]=uu(t,n),r),{})}function kJ(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=EJ(n),i=PJ(o,r),a=e[n];return Gr(e,a,i)}function yN(e,t){const n=bE(e.theme);return Object.keys(e).map(r=>kJ(e,t,r,n)).reduce(Df,{})}function fn(e){return yN(e,vE)}fn.propTypes={};fn.filterProps=vE;function pn(e){return yN(e,yE)}pn.propTypes={};pn.filterProps=yE;function $J(e=8){if(e.mui)return e;const t=bE({spacing:e}),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 _y(...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]?Df(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ro(e){return typeof e!="number"?e:`${e}px solid`}function Xo(e,t){return Sn({prop:e,themeKey:"borders",transform:t})}const IJ=Xo("border",Ro),OJ=Xo("borderTop",Ro),MJ=Xo("borderRight",Ro),RJ=Xo("borderBottom",Ro),TJ=Xo("borderLeft",Ro),_J=Xo("borderColor"),FJ=Xo("borderTopColor"),AJ=Xo("borderRightColor"),LJ=Xo("borderBottomColor"),DJ=Xo("borderLeftColor"),NJ=Xo("outline",Ro),jJ=Xo("outlineColor"),Fy=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Jp(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:uu(t,r)});return Gr(e,e.borderRadius,n)}return null};Fy.propTypes={};Fy.filterProps=["borderRadius"];_y(IJ,OJ,MJ,RJ,TJ,_J,FJ,AJ,LJ,DJ,Fy,NJ,jJ);const Ay=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Jp(e.theme,"spacing",8),n=r=>({gap:uu(t,r)});return Gr(e,e.gap,n)}return null};Ay.propTypes={};Ay.filterProps=["gap"];const Ly=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Jp(e.theme,"spacing",8),n=r=>({columnGap:uu(t,r)});return Gr(e,e.columnGap,n)}return null};Ly.propTypes={};Ly.filterProps=["columnGap"];const Dy=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Jp(e.theme,"spacing",8),n=r=>({rowGap:uu(t,r)});return Gr(e,e.rowGap,n)}return null};Dy.propTypes={};Dy.filterProps=["rowGap"];const zJ=Sn({prop:"gridColumn"}),BJ=Sn({prop:"gridRow"}),HJ=Sn({prop:"gridAutoFlow"}),VJ=Sn({prop:"gridAutoColumns"}),UJ=Sn({prop:"gridAutoRows"}),WJ=Sn({prop:"gridTemplateColumns"}),GJ=Sn({prop:"gridTemplateRows"}),qJ=Sn({prop:"gridTemplateAreas"}),KJ=Sn({prop:"gridArea"});_y(Ay,Ly,Dy,zJ,BJ,HJ,VJ,UJ,WJ,GJ,qJ,KJ);function Oc(e,t){return t==="grey"?t:e}const QJ=Sn({prop:"color",themeKey:"palette",transform:Oc}),YJ=Sn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Oc}),XJ=Sn({prop:"backgroundColor",themeKey:"palette",transform:Oc});_y(QJ,YJ,XJ);function io(e){return e<=1&&e!==0?`${e*100}%`:e}const ZJ=Sn({prop:"width",transform:io}),xE=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const i=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||gE[n];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:io(n)}};return Gr(e,e.maxWidth,t)}return null};xE.filterProps=["maxWidth"];const JJ=Sn({prop:"minWidth",transform:io}),eee=Sn({prop:"height",transform:io}),tee=Sn({prop:"maxHeight",transform:io}),nee=Sn({prop:"minHeight",transform:io});Sn({prop:"size",cssProperty:"width",transform:io});Sn({prop:"size",cssProperty:"height",transform:io});const ree=Sn({prop:"boxSizing"});_y(ZJ,xE,JJ,eee,tee,nee,ree);const oee={border:{themeKey:"borders",transform:Ro},borderTop:{themeKey:"borders",transform:Ro},borderRight:{themeKey:"borders",transform:Ro},borderBottom:{themeKey:"borders",transform:Ro},borderLeft:{themeKey:"borders",transform:Ro},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ro},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fy},color:{themeKey:"palette",transform:Oc},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Oc},backgroundColor:{themeKey:"palette",transform:Oc},p:{style:pn},pt:{style:pn},pr:{style:pn},pb:{style:pn},pl:{style:pn},px:{style:pn},py:{style:pn},padding:{style:pn},paddingTop:{style:pn},paddingRight:{style:pn},paddingBottom:{style:pn},paddingLeft:{style:pn},paddingX:{style:pn},paddingY:{style:pn},paddingInline:{style:pn},paddingInlineStart:{style:pn},paddingInlineEnd:{style:pn},paddingBlock:{style:pn},paddingBlockStart:{style:pn},paddingBlockEnd:{style:pn},m:{style:fn},mt:{style:fn},mr:{style:fn},mb:{style:fn},ml:{style:fn},mx:{style:fn},my:{style:fn},margin:{style:fn},marginTop:{style:fn},marginRight:{style:fn},marginBottom:{style:fn},marginLeft:{style:fn},marginX:{style:fn},marginY:{style:fn},marginInline:{style:fn},marginInlineStart:{style:fn},marginInlineEnd:{style:fn},marginBlock:{style:fn},marginBlockStart:{style:fn},marginBlockEnd:{style:fn},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:Ay},rowGap:{style:Dy},columnGap:{style:Ly},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:io},maxWidth:{style:xE},minWidth:{transform:io},height:{transform:io},maxHeight:{transform:io},minHeight:{transform:io},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},em=oee;function iee(...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 aee(e,t){return typeof e=="function"?e(t):e}function bN(){function e(n,r,o,i){const a={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:u,transform:c,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=Zc(o,u)||{};return d?d(a):Gr(a,r,p=>{let h=av(f,c,p);return p===h&&typeof p=="string"&&(h=av(f,c,`${n}${p==="default"?"":pe(p)}`,p)),s===!1?h:{[s]:h}})}function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=(r=i.unstable_sxConfig)!=null?r:em;function l(s){let u=s;if(typeof s=="function")u=s(i);else if(typeof s!="object")return s;if(!u)return null;const c=gN(i.breakpoints),d=Object.keys(c);let f=c;return Object.keys(u).forEach(m=>{const p=aee(u[m],i);if(p!=null)if(typeof p=="object")if(a[m])f=Df(f,e(m,p,i,a));else{const h=Gr({theme:i},p,y=>({[m]:y}));iee(h,p)?f[m]=t({sx:p,theme:i}):f=Df(f,h)}else f=Df(f,e(m,p,i,a))}),vN(d,f)}return Array.isArray(o)?o.map(l):l(o)}return t}const xN=bN();xN.filterProps=["sx"];const tm=xN;function wN(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const lee=["breakpoints","palette","spacing","shape"];function wd(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=ue(e,lee),l=hN(n),s=$J(o);let u=Ir({breakpoints:l,direction:"ltr",components:{},palette:I({mode:"light"},r),spacing:s,shape:I({},vJ,i)},a);return u.applyStyles=wN,u=t.reduce((c,d)=>Ir(c,d),u),u.unstable_sxConfig=I({},em,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return tm({sx:d,theme:this})},u}const see=Object.freeze(Object.defineProperty({__proto__:null,default:wd,private_createBreakpoints:hN,unstable_applyStyles:wN},Symbol.toStringTag,{value:"Module"}));function uee(e){return Object.keys(e).length===0}function CN(e=null){const t=v.useContext(Zp);return!t||uee(t)?e:t}const cee=wd();function Ny(e=cee){return CN(e)}function dee({styles:e,themeId:t,defaultTheme:n={}}){const r=Ny(n),o=typeof e=="function"?e(t&&r[t]||r):e;return N.jsx(fN,{styles:o})}const fee=["sx"],pee=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:em;return Object.keys(e).forEach(i=>{o[i]?r.systemProps[i]=e[i]:r.otherProps[i]=e[i]}),r};function nm(e){const{sx:t}=e,n=ue(e,fee),{systemProps:r,otherProps:o}=pee(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const l=t(...a);return Ia(l)?I({},r,l):r}:i=I({},r,t),I({},o,{sx:i})}const mee=Object.freeze(Object.defineProperty({__proto__:null,default:tm,extendSxProp:nm,unstable_createStyleFunctionSx:bN,unstable_defaultSxConfig:em},Symbol.toStringTag,{value:"Module"})),tM=e=>e,hee=()=>{let e=tM;return{configure(t){e=t},generate(t){return e(t)},reset(){e=tM}}},gee=hee(),wE=gee;function SN(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;tl!=="theme"&&l!=="sx"&&l!=="as"})(tm);return v.forwardRef(function(s,u){const c=Ny(n),d=nm(s),{className:f,component:m="div"}=d,p=ue(d,vee);return N.jsx(i,I({as:m,ref:u,className:he(f,o?o(r):r),theme:t&&c[t]||c},p))})}const EN={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 Be(e,t,n="Mui"){const r=EN[t];return r?`${n}-${r}`:`${wE.generate(e)}-${t}`}function He(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Be(e,o,n)}),r}var PN={exports:{}},Lt={};/** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var CE=Symbol.for("react.element"),SE=Symbol.for("react.portal"),jy=Symbol.for("react.fragment"),zy=Symbol.for("react.strict_mode"),By=Symbol.for("react.profiler"),Hy=Symbol.for("react.provider"),Vy=Symbol.for("react.context"),bee=Symbol.for("react.server_context"),Uy=Symbol.for("react.forward_ref"),Wy=Symbol.for("react.suspense"),Gy=Symbol.for("react.suspense_list"),qy=Symbol.for("react.memo"),Ky=Symbol.for("react.lazy"),xee=Symbol.for("react.offscreen"),kN;kN=Symbol.for("react.module.reference");function Zo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case CE:switch(e=e.type,e){case jy:case By:case zy:case Wy:case Gy:return e;default:switch(e=e&&e.$$typeof,e){case bee:case Vy:case Uy:case Ky:case qy:case Hy:return e;default:return t}}case SE:return t}}}Lt.ContextConsumer=Vy;Lt.ContextProvider=Hy;Lt.Element=CE;Lt.ForwardRef=Uy;Lt.Fragment=jy;Lt.Lazy=Ky;Lt.Memo=qy;Lt.Portal=SE;Lt.Profiler=By;Lt.StrictMode=zy;Lt.Suspense=Wy;Lt.SuspenseList=Gy;Lt.isAsyncMode=function(){return!1};Lt.isConcurrentMode=function(){return!1};Lt.isContextConsumer=function(e){return Zo(e)===Vy};Lt.isContextProvider=function(e){return Zo(e)===Hy};Lt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===CE};Lt.isForwardRef=function(e){return Zo(e)===Uy};Lt.isFragment=function(e){return Zo(e)===jy};Lt.isLazy=function(e){return Zo(e)===Ky};Lt.isMemo=function(e){return Zo(e)===qy};Lt.isPortal=function(e){return Zo(e)===SE};Lt.isProfiler=function(e){return Zo(e)===By};Lt.isStrictMode=function(e){return Zo(e)===zy};Lt.isSuspense=function(e){return Zo(e)===Wy};Lt.isSuspenseList=function(e){return Zo(e)===Gy};Lt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jy||e===By||e===zy||e===Wy||e===Gy||e===xee||typeof e=="object"&&e!==null&&(e.$$typeof===Ky||e.$$typeof===qy||e.$$typeof===Hy||e.$$typeof===Vy||e.$$typeof===Uy||e.$$typeof===kN||e.getModuleId!==void 0)};Lt.typeOf=Zo;PN.exports=Lt;var nM=PN.exports;const wee=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function $N(e){const t=`${e}`.match(wee);return t&&t[1]||""}function IN(e,t=""){return e.displayName||e.name||$N(e)||t}function rM(e,t,n){const r=IN(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Cee(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return IN(e,"Component");if(typeof e=="object")switch(e.$$typeof){case nM.ForwardRef:return rM(e,e.render,"ForwardRef");case nM.Memo:return rM(e,e.type,"memo");default:return}}}const See=Object.freeze(Object.defineProperty({__proto__:null,default:Cee,getFunctionName:$N},Symbol.toStringTag,{value:"Module"})),Eee=["ownerState"],Pee=["variants"],kee=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function $ee(e){return Object.keys(e).length===0}function Iee(e){return typeof e=="string"&&e.charCodeAt(0)>96}function t1(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Oee=wd(),Mee=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function ch({defaultTheme:e,theme:t,themeId:n}){return $ee(t)?e:t[n]||t}function Ree(e){return e?(t,n)=>n[e]:null}function og(e,t){let{ownerState:n}=t,r=ue(t,Eee);const o=typeof e=="function"?e(I({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>og(i,I({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let l=ue(o,Pee);return i.forEach(s=>{let u=!0;typeof s.props=="function"?u=s.props(I({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(I({ownerState:n},r,n)):s.style))}),l}return o}function Tee(e={}){const{themeId:t,defaultTheme:n=Oee,rootShouldForwardProp:r=t1,slotShouldForwardProp:o=t1}=e,i=a=>tm(I({},a,{theme:ch(I({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,l={})=>{pN(a,P=>P.filter(C=>!(C!=null&&C.__mui_systemSx)));const{name:s,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f=Ree(Mee(u))}=l,m=ue(l,kee),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,h=d||!1;let y,b=t1;u==="Root"||u==="root"?b=r:u?b=o:Iee(a)&&(b=void 0);const g=hE(a,I({shouldForwardProp:b,label:y},m)),x=P=>typeof P=="function"&&P.__emotion_real!==P||Ia(P)?C=>og(P,I({},C,{theme:ch({theme:C.theme,defaultTheme:n,themeId:t})})):P,w=(P,...C)=>{let E=x(P);const S=C?C.map(x):[];s&&f&&S.push(R=>{const _=ch(I({},R,{defaultTheme:n,themeId:t}));if(!_.components||!_.components[s]||!_.components[s].styleOverrides)return null;const D=_.components[s].styleOverrides,T={};return Object.entries(D).forEach(([F,j])=>{T[F]=og(j,I({},R,{theme:_}))}),f(R,T)}),s&&!p&&S.push(R=>{var _;const D=ch(I({},R,{defaultTheme:n,themeId:t})),T=D==null||(_=D.components)==null||(_=_[s])==null?void 0:_.variants;return og({variants:T},I({},R,{theme:D}))}),h||S.push(i);const M=S.length-C.length;if(Array.isArray(P)&&M>0){const R=new Array(M).fill("");E=[...P,...R],E.raw=[...P.raw,...R]}const O=g(E,...S);return a.muiName&&(O.muiName=a.muiName),O};return g.withConfig&&(w.withConfig=g.withConfig),w}}const _ee=Tee(),zn=_ee;function rm(e,t){const n=I({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=I({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},!i||!Object.keys(i)?n[r]=o:!o||!Object.keys(o)?n[r]=i:(n[r]=I({},i),Object.keys(o).forEach(a=>{n[r][a]=rm(o[a],i[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function Fee(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:rm(t.components[n].defaultProps,r)}function EE({props:e,name:t,defaultTheme:n,themeId:r}){let o=Ny(n);return r&&(o=o[r]||o),Fee({theme:o,name:t,props:e})}const Aee=typeof window<"u"?v.useLayoutEffect:v.useEffect,Rt=Aee;function ON(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Lee=Object.freeze(Object.defineProperty({__proto__:null,default:ON},Symbol.toStringTag,{value:"Module"}));function PE(e,t=0,n=1){return ON(e,t,n)}function Dee(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 cu(e){if(e.type)return e;if(e.charAt(0)==="#")return cu(Dee(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(qa(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"].indexOf(o)===-1)throw new Error(qa(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}function Qy(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Nee(e){e=cu(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),Qy({type:l,values:s})}function jee(e){e=cu(e);let t=e.type==="hsl"||e.type==="hsla"?cu(Nee(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 Cr(e,t){return e=cu(e),t=PE(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Qy(e)}function Nf(e,t){if(e=cu(e),t=PE(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Qy(e)}function MN(e,t){if(e=cu(e),t=PE(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Qy(e)}function zee(e,t=.15){return jee(e)>.5?Nf(e,t):MN(e,t)}function Lw(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Bee(e,t){return()=>null}function jf(e,t){var n,r;return v.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function un(e){return e&&e.ownerDocument||document}function xi(e){return un(e).defaultView||window}function Hee(e,t){return()=>null}let oM=0;function Vee(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(oM+=1,n(`mui-${oM}`))},[t]),r}const iM=yg["useId".toString()];function _t(e){if(iM!==void 0){const t=iM();return e??t}return Vee(e)}function Uee(e,t,n,r,o){return null}function Ql({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,a]=v.useState(t),l=o?e:i,s=v.useCallback(u=>{o||a(u)},[]);return[l,s]}function Jt(e){const t=v.useRef(e);return Rt(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}const aM={};function Wee(e,t){const n=v.useRef(aM);return n.current===aM&&(n.current=e(t)),n}const Gee=[];function qee(e){v.useEffect(e,Gee)}let kE=class RN{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new RN}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function js(){const e=Wee(kE.create).current;return qee(e.disposeEffect),e}let Yy=!0,Dw=!1;const Kee=new kE,Qee={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Yee(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Qee[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Xee(e){e.metaKey||e.altKey||e.ctrlKey||(Yy=!0)}function n1(){Yy=!1}function Zee(){this.visibilityState==="hidden"&&Dw&&(Yy=!0)}function Jee(e){e.addEventListener("keydown",Xee,!0),e.addEventListener("mousedown",n1,!0),e.addEventListener("pointerdown",n1,!0),e.addEventListener("touchstart",n1,!0),e.addEventListener("visibilitychange",Zee,!0)}function ete(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Yy||Yee(t)}function Xy(){const e=v.useCallback(o=>{o!=null&&Jee(o.ownerDocument)},[]),t=v.useRef(!1);function n(){return t.current?(Dw=!0,Kee.start(100,()=>{Dw=!1}),t.current=!1,!0):!1}function r(o){return ete(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function TN(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const tte=e=>{const t=v.useRef({});return v.useEffect(()=>{t.current=e}),t.current},$E=tte;function nte(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}function Ie(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((i,a)=>{if(a){const l=t(a);l!==""&&i.push(l),n&&n[a]&&i.push(n[a])}return i},[]).join(" ")}),r}const rte=v.createContext(null),_N=rte;function FN(){return v.useContext(_N)}const ote=typeof Symbol=="function"&&Symbol.for,ite=ote?Symbol.for("mui.nested"):"__THEME_NESTED__";function ate(e,t){return typeof t=="function"?t(e):I({},e,t)}function lte(e){const{children:t,theme:n}=e,r=FN(),o=v.useMemo(()=>{const i=r===null?n:ate(r,n);return i!=null&&(i[ite]=r!==null),i},[n,r]);return N.jsx(_N.Provider,{value:o,children:t})}const ste=["value"],AN=v.createContext();function ute(e){let{value:t}=e,n=ue(e,ste);return N.jsx(AN.Provider,I({value:t??!0},n))}const Zy=()=>{const e=v.useContext(AN);return e??!1},lM={};function sM(e,t,n,r=!1){return v.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?I({},t,{[e]:i}):i;return r?()=>a:a}return e?I({},t,{[e]:n}):I({},t,n)},[e,t,n,r])}function cte(e){const{children:t,theme:n,themeId:r}=e,o=CN(lM),i=FN()||lM,a=sM(r,o,n),l=sM(r,i,n,!0),s=a.direction==="rtl";return N.jsx(lte,{theme:l,children:N.jsx(Zp.Provider,{value:a,children:N.jsx(ute,{value:s,children:t})})})}function xp(e){"@babel/helpers - typeof";return xp=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},xp(e)}function dte(e,t){if(xp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wp(e){var t=dte(e,"string");return xp(t)=="symbol"?t:String(t)}const fte=["className","component","disableGutters","fixed","maxWidth","classes"],pte=wd(),mte=zn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${pe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),hte=e=>EE({props:e,name:"MuiContainer",defaultTheme:pte}),gte=(e,t)=>{const n=s=>Be(t,s),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,l={root:["root",a&&`maxWidth${pe(String(a))}`,o&&"fixed",i&&"disableGutters"]};return Ie(l,n,r)};function vte(e={}){const{createStyledComponent:t=mte,useThemeProps:n=hte,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:l})=>I({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!l.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}),({theme:a,ownerState:l})=>l.fixed&&Object.keys(a.breakpoints.values).reduce((s,u)=>{const c=u,d=a.breakpoints.values[c];return d!==0&&(s[a.breakpoints.up(c)]={maxWidth:`${d}${a.breakpoints.unit}`}),s},{}),({theme:a,ownerState:l})=>I({},l.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},l.maxWidth&&l.maxWidth!=="xs"&&{[a.breakpoints.up(l.maxWidth)]:{maxWidth:`${a.breakpoints.values[l.maxWidth]}${a.breakpoints.unit}`}}));return v.forwardRef(function(l,s){const u=n(l),{className:c,component:d="div",disableGutters:f=!1,fixed:m=!1,maxWidth:p="lg"}=u,h=ue(u,fte),y=I({},u,{component:d,disableGutters:f,fixed:m,maxWidth:p}),b=gte(y,r);return N.jsx(o,I({as:d,ownerState:y,className:he(b.root,c),ref:s},h))})}const yte=["component","direction","spacing","divider","children","className","useFlexGap"],bte=wd(),xte=zn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function wte(e){return EE({props:e,name:"MuiStack",defaultTheme:bte})}function Cte(e,t){const n=v.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Ete=({ownerState:e,theme:t})=>{let n=I({display:"flex",flexDirection:"column"},Gr({theme:t},Gs({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=bE(t),o=Object.keys(t.breakpoints.values).reduce((s,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(s[u]=!0),s),{}),i=Gs({values:e.direction,base:o}),a=Gs({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((s,u,c)=>{if(!i[s]){const f=u>0?i[c[u-1]]:"column";i[s]=f}}),n=Ir(n,Gr({theme:t},a,(s,u)=>e.useFlexGap?{gap:uu(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ste(u?i[u]:e.direction)}`]:uu(r,s)}}))}return n=yJ(t.breakpoints,n),n};function Pte(e={}){const{createStyledComponent:t=xte,useThemeProps:n=wte,componentName:r="MuiStack"}=e,o=()=>Ie({root:["root"]},s=>Be(r,s),{}),i=t(Ete);return v.forwardRef(function(s,u){const c=n(s),d=nm(c),{component:f="div",direction:m="column",spacing:p=0,divider:h,children:y,className:b,useFlexGap:g=!1}=d,x=ue(d,yte),w={direction:m,spacing:p,useFlexGap:g},P=o();return N.jsx(i,I({as:f,ownerState:w,ref:u,className:he(P.root,b)},x,{children:h?Cte(y,h):y}))})}function kte(e,t){return I({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var En={},LN={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(LN);var wt=LN.exports;const $te=Go(uZ),Ite=Go(Lee);var DN=wt;Object.defineProperty(En,"__esModule",{value:!0});var rt=En.alpha=BN;En.blend=jte;En.colorChannel=void 0;var IE=En.darken=RE;En.decomposeColor=Vo;var uM=En.emphasize=Nte,Ote=En.getContrastRatio=Fte;En.getLuminance=lv;En.hexToRgb=NN;En.hslToRgb=zN;var OE=En.lighten=TE;En.private_safeAlpha=Ate;En.private_safeColorChannel=void 0;En.private_safeDarken=Lte;En.private_safeEmphasize=HN;En.private_safeLighten=Dte;En.recomposeColor=Cd;En.rgbToHex=_te;var cM=DN($te),Mte=DN(Ite);function ME(e,t=0,n=1){return(0,Mte.default)(e,t,n)}function NN(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 Rte(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Vo(e){if(e.type)return e;if(e.charAt(0)==="#")return Vo(NN(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,cM.default)(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"].indexOf(o)===-1)throw new Error((0,cM.default)(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const jN=e=>{const t=Vo(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};En.colorChannel=jN;const Tte=(e,t)=>{try{return jN(e)}catch{return e}};En.private_safeColorChannel=Tte;function Cd(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function _te(e){if(e.indexOf("#")===0)return e;const{values:t}=Vo(e);return`#${t.map((n,r)=>Rte(r===3?Math.round(255*n):n)).join("")}`}function zN(e){e=Vo(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),Cd({type:l,values:s})}function lv(e){e=Vo(e);let t=e.type==="hsl"||e.type==="hsla"?Vo(zN(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 Fte(e,t){const n=lv(e),r=lv(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function BN(e,t){return e=Vo(e),t=ME(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Cd(e)}function Ate(e,t,n){try{return BN(e,t)}catch{return e}}function RE(e,t){if(e=Vo(e),t=ME(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Cd(e)}function Lte(e,t,n){try{return RE(e,t)}catch{return e}}function TE(e,t){if(e=Vo(e),t=ME(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Cd(e)}function Dte(e,t,n){try{return TE(e,t)}catch{return e}}function Nte(e,t=.15){return lv(e)>.5?RE(e,t):TE(e,t)}function HN(e,t,n){try{return HN(e,t)}catch{return e}}function jte(e,t,n,r=1){const o=(s,u)=>Math.round((s**(1/r)*(1-n)+u**(1/r)*n)**r),i=Vo(e),a=Vo(t),l=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return Cd({type:"rgb",values:l})}const zte={black:"#000",white:"#fff"},Cp=zte,Bte={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"},Os=Bte,Hte={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Au=Hte,Vte={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},To=Vte,Ute={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Yd=Ute,Wte={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Lu=Wte,Gte={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Du=Gte,qte={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},_o=qte,Kte=["mode","contrastThreshold","tonalOffset"],dM={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:Cp.white,default:Cp.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}},r1={text:{primary:Cp.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:Cp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function fM(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=OE(e.main,o):t==="dark"&&(e.dark=IE(e.main,i)))}function Qte(e="light"){return e==="dark"?{main:Lu[200],light:Lu[50],dark:Lu[400]}:{main:Lu[700],light:Lu[400],dark:Lu[800]}}function Yte(e="light"){return e==="dark"?{main:Au[200],light:Au[50],dark:Au[400]}:{main:Au[500],light:Au[300],dark:Au[700]}}function Xte(e="light"){return e==="dark"?{main:To[500],light:To[300],dark:To[700]}:{main:To[700],light:To[400],dark:To[800]}}function Zte(e="light"){return e==="dark"?{main:Du[400],light:Du[300],dark:Du[700]}:{main:Du[700],light:Du[500],dark:Du[900]}}function Jte(e="light"){return e==="dark"?{main:_o[400],light:_o[300],dark:_o[700]}:{main:_o[800],light:_o[500],dark:_o[900]}}function ene(e="light"){return e==="dark"?{main:Yd[400],light:Yd[300],dark:Yd[700]}:{main:"#ed6c02",light:Yd[500],dark:Yd[900]}}function tne(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=ue(e,Kte),i=e.primary||Qte(t),a=e.secondary||Yte(t),l=e.error||Xte(t),s=e.info||Zte(t),u=e.success||Jte(t),c=e.warning||ene(t);function d(h){return Ote(h,r1.text.primary)>=n?r1.text.primary:dM.text.primary}const f=({color:h,name:y,mainShade:b=500,lightShade:g=300,darkShade:x=700})=>{if(h=I({},h),!h.main&&h[b]&&(h.main=h[b]),!h.hasOwnProperty("main"))throw new Error(qa(11,y?` (${y})`:"",b));if(typeof h.main!="string")throw new Error(qa(12,y?` (${y})`:"",JSON.stringify(h.main)));return fM(h,"light",g,r),fM(h,"dark",x,r),h.contrastText||(h.contrastText=d(h.main)),h},m={dark:r1,light:dM};return Ir(I({common:I({},Cp),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:l,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:s,name:"info"}),success:f({color:u,name:"success"}),grey:Os,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},m[t]),o)}const nne=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function rne(e){return Math.round(e*1e5)/1e5}const pM={textTransform:"uppercase"},mM='"Roboto", "Helvetica", "Arial", sans-serif';function one(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=mM,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:l=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,f=ue(n,nne),m=o/14,p=d||(b=>`${b/u*m}rem`),h=(b,g,x,w,P)=>I({fontFamily:r,fontWeight:b,fontSize:p(g),lineHeight:x},r===mM?{letterSpacing:`${rne(w/g)}em`}:{},P,c),y={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(a,48,1.167,0),h4:h(a,34,1.235,.25),h5:h(a,24,1.334,0),h6:h(l,20,1.6,.15),subtitle1:h(a,16,1.75,.15),subtitle2:h(l,14,1.57,.1),body1:h(a,16,1.5,.15),body2:h(a,14,1.43,.15),button:h(l,14,1.75,.4,pM),caption:h(a,12,1.66,.4),overline:h(a,12,2.66,1,pM),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ir(I({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:l,fontWeightBold:s},y),f,{clone:!1})}const ine=.2,ane=.14,lne=.12;function nn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ine})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ane})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${lne})`].join(",")}const sne=["none",nn(0,2,1,-1,0,1,1,0,0,1,3,0),nn(0,3,1,-2,0,2,2,0,0,1,5,0),nn(0,3,3,-2,0,3,4,0,0,1,8,0),nn(0,2,4,-1,0,4,5,0,0,1,10,0),nn(0,3,5,-1,0,5,8,0,0,1,14,0),nn(0,3,5,-1,0,6,10,0,0,1,18,0),nn(0,4,5,-2,0,7,10,1,0,2,16,1),nn(0,5,5,-3,0,8,10,1,0,3,14,2),nn(0,5,6,-3,0,9,12,1,0,3,16,2),nn(0,6,6,-3,0,10,14,1,0,4,18,3),nn(0,6,7,-4,0,11,15,1,0,4,20,3),nn(0,7,8,-4,0,12,17,2,0,5,22,4),nn(0,7,8,-4,0,13,19,2,0,5,24,4),nn(0,7,9,-4,0,14,21,2,0,5,26,4),nn(0,8,9,-5,0,15,22,2,0,6,28,5),nn(0,8,10,-5,0,16,24,2,0,6,30,5),nn(0,8,11,-5,0,17,26,2,0,6,32,5),nn(0,9,11,-5,0,18,28,2,0,7,34,6),nn(0,9,12,-6,0,19,29,2,0,7,36,6),nn(0,10,13,-6,0,20,31,3,0,8,38,7),nn(0,10,13,-6,0,21,33,3,0,8,40,7),nn(0,10,14,-6,0,22,35,3,0,8,42,7),nn(0,11,14,-7,0,23,36,3,0,9,44,8),nn(0,11,15,-7,0,24,38,3,0,9,46,8)],une=sne,cne=["duration","easing","delay"],dne={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)"},VN={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function hM(e){return`${Math.round(e)}ms`}function fne(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function pne(e){const t=I({},dne,e.easing),n=I({},VN,e.duration);return I({getAutoHeightDuration:fne,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:l=t.easeInOut,delay:s=0}=i;return ue(i,cne),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:hM(a)} ${l} ${typeof s=="string"?s:hM(s)}`).join(",")}},e,{easing:t,duration:n})}const mne={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},hne=mne,gne=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function om(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=ue(e,gne);if(e.vars)throw new Error(qa(18));const l=tne(r),s=wd(e);let u=Ir(s,{mixins:kte(s.breakpoints,n),palette:l,shadows:une.slice(),typography:one(l,i),transitions:pne(o),zIndex:I({},hne)});return u=Ir(u,a),u=t.reduce((c,d)=>Ir(c,d),u),u.unstable_sxConfig=I({},em,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return tm({sx:d,theme:this})},u}const vne=om(),Jy=vne,du="$$material";function Rr(){const e=Ny(Jy);return e[du]||e}const _E=e=>e.scrollTop;function ns(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:a.transitionDelay}}function Ue({props:e,name:t}){return EE({props:e,name:t,defaultTheme:Jy,themeId:du})}var im={},o1={exports:{}},gM;function yne(){return gM||(gM=1,function(e){function t(n,r){if(n==null)return{};var o={},i=Object.keys(n),a,l;for(l=0;l=0)&&(o[a]=n[a]);return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(o1)),o1.exports}const UN=Go(fJ),bne=Go(pJ),xne=Go(xJ),wne=Go(See),Cne=Go(see),Sne=Go(mee);var Sd=wt;Object.defineProperty(im,"__esModule",{value:!0});var Ene=im.default=Dne,WN=im.shouldForwardProp=ig;im.systemDefaultTheme=void 0;var So=Sd(my),Nw=Sd(yne()),vM=Rne(UN),Pne=bne;Sd(xne);Sd(wne);var kne=Sd(Cne),$ne=Sd(Sne);const Ine=["ownerState"],One=["variants"],Mne=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function GN(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(GN=function(r){return r?n:t})(e)}function Rne(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=GN(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Tne(e){return Object.keys(e).length===0}function _ne(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ig(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Fne=im.systemDefaultTheme=(0,kne.default)(),Ane=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function dh({defaultTheme:e,theme:t,themeId:n}){return Tne(t)?e:t[n]||t}function Lne(e){return e?(t,n)=>n[e]:null}function ag(e,t){let{ownerState:n}=t,r=(0,Nw.default)(t,Ine);const o=typeof e=="function"?e((0,So.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>ag(i,(0,So.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let l=(0,Nw.default)(o,One);return i.forEach(s=>{let u=!0;typeof s.props=="function"?u=s.props((0,So.default)({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style((0,So.default)({ownerState:n},r,n)):s.style))}),l}return o}function Dne(e={}){const{themeId:t,defaultTheme:n=Fne,rootShouldForwardProp:r=ig,slotShouldForwardProp:o=ig}=e,i=a=>(0,$ne.default)((0,So.default)({},a,{theme:dh((0,So.default)({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,l={})=>{(0,vM.internal_processStyles)(a,P=>P.filter(C=>!(C!=null&&C.__mui_systemSx)));const{name:s,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f=Lne(Ane(u))}=l,m=(0,Nw.default)(l,Mne),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,h=d||!1;let y,b=ig;u==="Root"||u==="root"?b=r:u?b=o:_ne(a)&&(b=void 0);const g=(0,vM.default)(a,(0,So.default)({shouldForwardProp:b,label:y},m)),x=P=>typeof P=="function"&&P.__emotion_real!==P||(0,Pne.isPlainObject)(P)?C=>ag(P,(0,So.default)({},C,{theme:dh({theme:C.theme,defaultTheme:n,themeId:t})})):P,w=(P,...C)=>{let E=x(P);const S=C?C.map(x):[];s&&f&&S.push(R=>{const _=dh((0,So.default)({},R,{defaultTheme:n,themeId:t}));if(!_.components||!_.components[s]||!_.components[s].styleOverrides)return null;const D=_.components[s].styleOverrides,T={};return Object.entries(D).forEach(([F,j])=>{T[F]=ag(j,(0,So.default)({},R,{theme:_}))}),f(R,T)}),s&&!p&&S.push(R=>{var _;const D=dh((0,So.default)({},R,{defaultTheme:n,themeId:t})),T=D==null||(_=D.components)==null||(_=_[s])==null?void 0:_.variants;return ag({variants:T},(0,So.default)({},R,{theme:D}))}),h||S.push(i);const M=S.length-C.length;if(Array.isArray(P)&&M>0){const R=new Array(M).fill("");E=[...P,...R],E.raw=[...P.raw,...R]}const O=g(E,...S);return a.muiName&&(O.muiName=a.muiName),O};return g.withConfig&&(w.withConfig=g.withConfig),w}}const gr=e=>WN(e)&&e!=="classes",Nne=WN,jne=Ene({themeId:du,defaultTheme:Jy,rootShouldForwardProp:gr}),de=jne;function zne(e){return Be("MuiSvgIcon",e)}He("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Bne=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Hne=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${pe(t)}`,`fontSize${pe(n)}`]};return Ie(o,zne,r)},Vne=de("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${pe(n.color)}`],t[`fontSize${pe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,a,l,s,u,c,d,f,m,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((l=e.typography)==null||(s=l.pxToRem)==null?void 0:s.call(l,24))||"1.5rem",large:((u=e.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}[t.fontSize],color:(d=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?d:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[t.color]}}),qN=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,m=ue(r,Bne),p=v.isValidElement(o)&&o.type==="svg",h=I({},r,{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:p}),y={};c||(y.viewBox=f);const b=Hne(h);return N.jsxs(Vne,I({as:l,className:he(b.root,i),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},y,m,p&&o.props,{ownerState:h,children:[p?o.props.children:o,d?N.jsx("title",{children:d}):null]}))});qN.muiName="SvgIcon";const rs=qN;function tt(e,t){function n(r,o){return N.jsx(rs,I({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return n.muiName=rs.muiName,v.memo(v.forwardRef(n))}const Une={configure:e=>{wE.configure(e)}},Wne=Object.freeze(Object.defineProperty({__proto__:null,capitalize:pe,createChainedFunction:Lw,createSvgIcon:tt,debounce:bd,deprecatedPropType:Bee,isMuiElement:jf,ownerDocument:un,ownerWindow:xi,requirePropFactory:Hee,setRef:gp,unstable_ClassNameGenerator:Une,unstable_useEnhancedEffect:Rt,unstable_useId:_t,unsupportedProp:Uee,useControlled:Ql,useEventCallback:Jt,useForkRef:vt,useIsFocusVisible:Xy},Symbol.toStringTag,{value:"Module"})),Gne=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qne(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=xi(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const u=i.getComputedStyle(t);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,s=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),s=parseInt(u[5],10)}return e==="left"?o?`translateX(${o.right+l-r.left}px)`:`translateX(${i.innerWidth+l-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-l}px)`:`translateX(-${r.left+r.width-l}px)`:e==="up"?o?`translateY(${o.bottom+s-r.top}px)`:`translateY(${i.innerHeight+s-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-s}px)`:`translateY(-${r.top+r.height-s}px)`}function Kne(e){return typeof e=="function"?e():e}function fh(e,t,n){const r=Kne(n),o=qne(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const Qne=v.forwardRef(function(t,n){const r=Rr(),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:l=!0,children:s,container:u,direction:c="down",easing:d=o,in:f,onEnter:m,onEntered:p,onEntering:h,onExit:y,onExited:b,onExiting:g,style:x,timeout:w=i,TransitionComponent:P=by}=t,C=ue(t,Gne),E=v.useRef(null),S=vt(s.ref,E,n),M=L=>z=>{L&&(z===void 0?L(E.current):L(E.current,z))},O=M((L,z)=>{fh(c,L,u),_E(L),m&&m(L,z)}),R=M((L,z)=>{const B=ns({timeout:w,style:x,easing:d},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",I({},B)),L.style.transition=r.transitions.create("transform",I({},B)),L.style.webkitTransform="none",L.style.transform="none",h&&h(L,z)}),_=M(p),D=M(g),T=M(L=>{const z=ns({timeout:w,style:x,easing:d},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",z),L.style.transition=r.transitions.create("transform",z),fh(c,L,u),y&&y(L)}),F=M(L=>{L.style.webkitTransition="",L.style.transition="",b&&b(L)}),j=L=>{a&&a(E.current,L)},$=v.useCallback(()=>{E.current&&fh(c,E.current,u)},[c,u]);return v.useEffect(()=>{if(f||c==="down"||c==="right")return;const L=bd(()=>{E.current&&fh(c,E.current,u)}),z=xi(E.current);return z.addEventListener("resize",L),()=>{L.clear(),z.removeEventListener("resize",L)}},[c,f,u]),v.useEffect(()=>{f||$()},[f,$]),N.jsx(P,I({nodeRef:E,onEnter:O,onEntered:_,onEntering:R,onExit:T,onExited:F,onExiting:D,addEndListener:j,appear:l,in:f,timeout:w},C,{children:(L,z)=>v.cloneElement(s,I({ref:S,style:I({visibility:L==="exited"&&!f?"hidden":void 0},x,s.props.style)},z))}))}),KN=Qne;function Yne(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Xne(e){return parseFloat(e)}const Zne=["theme"];function Jne(e){let{theme:t}=e,n=ue(e,Zne);const r=t[du];return N.jsx(cte,I({},n,{themeId:r?du:void 0,theme:r||t}))}const ere=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},yM=ere;function tre(e){return Be("MuiCollapse",e)}He("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const nre=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],rre=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ie(r,tre,n)},ore=de("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]}})(({theme:e,ownerState:t})=>I({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&I({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),ire=de("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>I({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),are=de("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>I({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),QN=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:l="0px",component:s,easing:u,in:c,onEnter:d,onEntered:f,onEntering:m,onExit:p,onExited:h,onExiting:y,orientation:b="vertical",style:g,timeout:x=VN.standard,TransitionComponent:w=by}=r,P=ue(r,nre),C=I({},r,{orientation:b,collapsedSize:l}),E=rre(C),S=Rr(),M=js(),O=v.useRef(null),R=v.useRef(),_=typeof l=="number"?`${l}px`:l,D=b==="horizontal",T=D?"width":"height",F=v.useRef(null),j=vt(n,F),$=Y=>re=>{if(Y){const le=F.current;re===void 0?Y(le):Y(le,re)}},L=()=>O.current?O.current[D?"clientWidth":"clientHeight"]:0,z=$((Y,re)=>{O.current&&D&&(O.current.style.position="absolute"),Y.style[T]=_,d&&d(Y,re)}),B=$((Y,re)=>{const le=L();O.current&&D&&(O.current.style.position="");const{duration:J,easing:oe}=ns({style:g,timeout:x,easing:u},{mode:"enter"});if(x==="auto"){const ce=S.transitions.getAutoHeightDuration(le);Y.style.transitionDuration=`${ce}ms`,R.current=ce}else Y.style.transitionDuration=typeof J=="string"?J:`${J}ms`;Y.style[T]=`${le}px`,Y.style.transitionTimingFunction=oe,m&&m(Y,re)}),A=$((Y,re)=>{Y.style[T]="auto",f&&f(Y,re)}),H=$(Y=>{Y.style[T]=`${L()}px`,p&&p(Y)}),q=$(h),U=$(Y=>{const re=L(),{duration:le,easing:J}=ns({style:g,timeout:x,easing:u},{mode:"exit"});if(x==="auto"){const oe=S.transitions.getAutoHeightDuration(re);Y.style.transitionDuration=`${oe}ms`,R.current=oe}else Y.style.transitionDuration=typeof le=="string"?le:`${le}ms`;Y.style[T]=_,Y.style.transitionTimingFunction=J,y&&y(Y)}),G=Y=>{x==="auto"&&M.start(R.current||0,Y),o&&o(F.current,Y)};return N.jsx(w,I({in:c,onEnter:z,onEntered:A,onEntering:B,onExit:H,onExited:q,onExiting:U,addEndListener:G,nodeRef:F,timeout:x==="auto"?null:x},P,{children:(Y,re)=>N.jsx(ore,I({as:s,className:he(E.root,a,{entered:E.entered,exited:!c&&_==="0px"&&E.hidden}[Y]),style:I({[D?"minWidth":"minHeight"]:_},g),ref:j},re,{ownerState:I({},C,{state:Y}),children:N.jsx(ire,{ownerState:I({},C,{state:Y}),className:E.wrapper,ref:O,children:N.jsx(are,{ownerState:I({},C,{state:Y}),className:E.wrapperInner,children:i})})}))}))});QN.muiSupportAuto=!0;const e0=QN;function bM(e){return e.substring(2).toLowerCase()}function lre(e,t){return t.documentElement.clientWidth(setTimeout(()=>{s.current=!0},0),()=>{s.current=!1}),[]);const c=vt(t.ref,l),d=Jt(p=>{const h=u.current;u.current=!1;const y=un(l.current);if(!s.current||!l.current||"clientX"in p&&lre(p,y))return;if(a.current){a.current=!1;return}let b;p.composedPath?b=p.composedPath().indexOf(l.current)>-1:b=!y.documentElement.contains(p.target)||l.current.contains(p.target),!b&&(n||!h)&&o(p)}),f=p=>h=>{u.current=!0;const y=t.props[p];y&&y(h)},m={ref:c};return i!==!1&&(m[i]=f(i)),v.useEffect(()=>{if(i!==!1){const p=bM(i),h=un(l.current),y=()=>{a.current=!0};return h.addEventListener(p,d),h.addEventListener("touchmove",y),()=>{h.removeEventListener(p,d),h.removeEventListener("touchmove",y)}}},[d,i]),r!==!1&&(m[r]=f(r)),v.useEffect(()=>{if(r!==!1){const p=bM(r),h=un(l.current);return h.addEventListener(p,d),()=>{h.removeEventListener(p,d)}}},[d,r]),N.jsx(v.Fragment,{children:v.cloneElement(t,m)})}function xM(e,t){for(var n=0;n=0)&&(n[o]=e[o]);return n}function wM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var YN=k.createContext(),cre={mui:{root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},container:{containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}}},ya={view:{default:20,dense:4},snackbar:{default:6,dense:2}},zs={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:KN,transitionDuration:{enter:225,exit:195}},zf=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},dre=function(t){return""+zf(t.vertical)+zf(t.horizontal)},fre=function(t){return Object.keys(t).filter(function(n){return!cre.container[n]}).reduce(function(n,r){var o;return Xt({},n,(o={},o[r]=t[r],o))},{})},Ml={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},lg={toContainerAnchorOrigin:function(t){return"containerAnchorOrigin"+t},toAnchorOrigin:function(t){var n=t.vertical,r=t.horizontal;return"anchorOrigin"+zf(n)+zf(r)},toVariant:function(t){return"variant"+zf(t)}},ph=function(t){return!!t||t===0},CM=function(t){return typeof t=="number"||t===null},pre=function(t,n,r){return function(o){return o==="autoHideDuration"?CM(t.autoHideDuration)?t.autoHideDuration:CM(n.autoHideDuration)?n.autoHideDuration:zs.autoHideDuration:t[o]||n[o]||r[o]}};function i1(e,t,n){return e===void 0&&(e={}),t===void 0&&(t={}),n===void 0&&(n={}),Xt({},n,{},t,{},e)}var mre="SnackbarContent",XN={root:mre+"-root"},hre=de("div")(function(e){var t,n,r=e.theme;return n={},n["&."+XN.root]=(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[r.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),n}),gre=v.forwardRef(function(e,t){var n=e.className,r=Yl(e,["className"]);return k.createElement(hre,Object.assign({ref:t,className:hp(XN.root,n)},r))}),SM={right:"left",left:"right",bottom:"up",top:"down"},vre=function(t){return t.horizontal!=="center"?SM[t.horizontal]:SM[t.vertical]},yre=function(t){return k.createElement(rs,Object.assign({},t),k.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},bre=function(t){return k.createElement(rs,Object.assign({},t),k.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},xre=function(t){return k.createElement(rs,Object.assign({},t),k.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},wre=function(t){return k.createElement(rs,Object.assign({},t),k.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z`}))},mh={fontSize:20,marginInlineEnd:8},Cre={default:void 0,success:k.createElement(yre,{style:mh}),warning:k.createElement(bre,{style:mh}),error:k.createElement(xre,{style:mh}),info:k.createElement(wre,{style:mh})};function Bf(e,t){return e.reduce(function(n,r){return r==null?n:function(){for(var i=arguments.length,a=new Array(i),l=0;l .MuiCollapse-container, & > .MuiCollapse-root",wrapper:"& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper"},l1=16,bs="SnackbarContainer",ui={root:bs+"-root",rootDense:bs+"-rootDense",top:bs+"-top",bottom:bs+"-bottom",left:bs+"-left",right:bs+"-right",center:bs+"-center"},$re=de("div")(function(e){var t,n,r,o,i,a,l=e.theme;return a={},a["&."+ui.root]=(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:l.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[a1.container]={pointerEvents:"all"},t[a1.wrapper]={padding:ya.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+ya.view.default*2+"px)",t[l.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - "+l1*2+"px)"},t),a["&."+ui.rootDense]=(n={},n[a1.wrapper]={padding:ya.snackbar.dense+"px 0px"},n),a["&."+ui.top]={top:ya.view.default-ya.snackbar.default,flexDirection:"column"},a["&."+ui.bottom]={bottom:ya.view.default-ya.snackbar.default,flexDirection:"column-reverse"},a["&."+ui.left]=(r={left:ya.view.default},r[l.breakpoints.up("sm")]={alignItems:"flex-start"},r[l.breakpoints.down("sm")]={left:l1+"px"},r),a["&."+ui.right]=(o={right:ya.view.default},o[l.breakpoints.up("sm")]={alignItems:"flex-end"},o[l.breakpoints.down("sm")]={right:l1+"px"},o),a["&."+ui.center]=(i={left:"50%",transform:"translateX(-50%)"},i[l.breakpoints.up("sm")]={alignItems:"center"},i),a}),Ire=function(t){var n=t.className,r=t.anchorOrigin,o=t.dense,i=Yl(t,["className","anchorOrigin","dense"]),a=hp(ui[r.vertical],ui[r.horizontal],ui.root,n,o&&ui.rootDense);return k.createElement($re,Object.assign({className:a},i))},Ore=k.memo(Ire),Mre=function(e){ure(t,e);function t(r){var o;return o=e.call(this,r)||this,o.enqueueSnackbar=function(i,a){a===void 0&&(a={});var l=a,s=l.key,u=l.preventDuplicate,c=Yl(l,["key","preventDuplicate"]),d=ph(s),f=d?s:new Date().getTime()+Math.random(),m=pre(c,o.props,zs),p=Xt({key:f},c,{message:i,open:!0,entered:!1,requestClose:!1,variant:m("variant"),anchorOrigin:m("anchorOrigin"),autoHideDuration:m("autoHideDuration")});return c.persist&&(p.autoHideDuration=void 0),o.setState(function(h){if(u===void 0&&o.props.preventDuplicate||u){var y=function(w){return d?w.key===s:w.message===i},b=h.queue.findIndex(y)>-1,g=h.snacks.findIndex(y)>-1;if(b||g)return h}return o.handleDisplaySnack(Xt({},h,{queue:[].concat(h.queue,[p])}))}),f},o.handleDisplaySnack=function(i){var a=i.snacks;return a.length>=o.maxSnack?o.handleDismissOldest(i):o.processQueue(i)},o.processQueue=function(i){var a=i.queue,l=i.snacks;return a.length>0?Xt({},i,{snacks:[].concat(l,[a[0]]),queue:a.slice(1,a.length)}):i},o.handleDismissOldest=function(i){if(i.snacks.some(function(c){return!c.open||c.requestClose}))return i;var a=!1,l=!1,s=i.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0);s===o.maxSnack&&(l=!0);var u=i.snacks.map(function(c){return!a&&(!c.persist||l)?(a=!0,c.entered?(c.onClose&&c.onClose(null,Ml.MAXSNACK,c.key),o.props.onClose&&o.props.onClose(null,Ml.MAXSNACK,c.key),Xt({},c,{open:!1})):Xt({},c,{requestClose:!0})):Xt({},c)});return Xt({},i,{snacks:u})},o.handleEnteredSnack=function(i,a,l){if(!ph(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");o.setState(function(s){var u=s.snacks;return{snacks:u.map(function(c){return c.key===l?Xt({},c,{entered:!0}):Xt({},c)})}})},o.handleCloseSnack=function(i,a,l){if(o.props.onClose&&o.props.onClose(i,a,l),a!==Ml.CLICKAWAY){var s=l===void 0;o.setState(function(u){var c=u.snacks,d=u.queue;return{snacks:c.map(function(f){return!s&&f.key!==l?Xt({},f):f.entered?Xt({},f,{open:!1}):Xt({},f,{requestClose:!0})}),queue:d.filter(function(f){return f.key!==l})}})}},o.closeSnackbar=function(i){var a=o.state.snacks.find(function(l){return l.key===i});ph(i)&&a&&a.onClose&&a.onClose(null,Ml.INSTRUCTED,i),o.handleCloseSnack(null,Ml.INSTRUCTED,i)},o.handleExitedSnack=function(i,a,l){var s=a||l;if(!ph(s))throw new Error("handleExitedSnack Cannot be called with undefined key");o.setState(function(u){var c=o.processQueue(Xt({},u,{snacks:u.snacks.filter(function(d){return d.key!==s})}));return c.queue.length===0?c:o.handleDismissOldest(c)})},o.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:o.enqueueSnackbar.bind(wM(o)),closeSnackbar:o.closeSnackbar.bind(wM(o))}},o}var n=t.prototype;return n.render=function(){var o=this,i=this.state.contextValue,a=this.props,l=a.iconVariant,s=a.dense,u=s===void 0?zs.dense:s,c=a.hideIconVariant,d=c===void 0?zs.hideIconVariant:c,f=a.domRoot,m=a.children,p=a.classes,h=p===void 0?{}:p,y=Yl(a,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),b=this.state.snacks.reduce(function(x,w){var P,C=dre(w.anchorOrigin),E=x[C]||[];return Xt({},x,(P={},P[C]=[].concat(E,[w]),P))},{}),g=Object.keys(b).map(function(x){var w=b[x];return k.createElement(Ore,{key:x,dense:u,anchorOrigin:w[0].anchorOrigin,className:hp(h.containerRoot,h[lg.toContainerAnchorOrigin(x)])},w.map(function(P){return k.createElement(kre,Object.assign({},y,{key:P.key,snack:P,dense:u,iconVariant:l,hideIconVariant:d,classes:fre(h),onClose:o.handleCloseSnack,onExited:Bf([o.handleExitedSnack,o.props.onExited]),onEntered:Bf([o.handleEnteredSnack,o.props.onEntered])}))}))});return k.createElement(YN.Provider,{value:i},m,f?ss.createPortal(g,f):g)},sre(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||zs.maxSnack}}]),t}(v.Component),Rre=function(){return v.useContext(YN)};const Tre=He("MuiBox",["root"]),_re=Tre,Fre=om(),Are=yee({themeId:du,defaultTheme:Fre,defaultClassName:_re.root,generateClassName:wE.generate}),Ke=Are;function fu(e){return typeof e=="string"}function gc(e,t,n){return e===void 0||fu(e)?t:I({},t,{ownerState:I({},t.ownerState,n)})}const Lre={disableDefaultClasses:!1},Dre=v.createContext(Lre);function Nre(e){const{disableDefaultClasses:t}=v.useContext(Dre);return n=>t?"":e(n)}function ZN(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 JN(e,t,n){return typeof e=="function"?e(t,n):e}function PM(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 e4(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const m=he(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),p=I({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=I({},n,o,r);return m.length>0&&(h.className=m),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:void 0}}const a=ZN(I({},o,r)),l=PM(r),s=PM(o),u=t(a),c=he(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d=I({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),f=I({},u,n,s,l);return c.length>0&&(f.className=c),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:u.ref}}const jre=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Xi(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=ue(e,jre),l=i?{}:JN(r,o),{props:s,internalRef:u}=e4(I({},a,{externalSlotProps:l})),c=vt(u,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return gc(n,I({},s,{ref:c}),o)}function zre(e){const t=un(e);return t.body===e?xi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Hf(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function kM(e){return parseInt(xi(e).getComputedStyle(e).paddingRight,10)||0}function Bre(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function $M(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const l=i.indexOf(a)===-1,s=!Bre(a);l&&s&&Hf(a,o)})}function s1(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function Hre(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(zre(r)){const a=TN(un(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${kM(r)+a}px`;const l=un(r).querySelectorAll(".mui-fixed");[].forEach.call(l,s=>{n.push({value:s.style.paddingRight,property:"padding-right",el:s}),s.style.paddingRight=`${kM(s)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=un(r).body;else{const a=r.parentElement,l=xi(r);i=(a==null?void 0:a.nodeName)==="HTML"&&l.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:l})=>{i?a.style.setProperty(l,i):a.style.removeProperty(l)})}}function Vre(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Ure{constructor(){this.containers=void 0,this.modals=void 0,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&&Hf(t.modalRef,!1);const o=Vre(n);$M(n,t.mount,t.modalRef,o,!0);const i=s1(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=s1(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=Hre(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=s1(this.containers,a=>a.modals.indexOf(t)!==-1),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&&Hf(t.modalRef,n),$M(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&&Hf(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Wre(e){return typeof e=="function"?e():e}function Gre(e){return e?e.props.hasOwnProperty("in"):!1}const qre=new Ure;function Kre(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=qre,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:s,onClose:u,open:c,rootRef:d}=e,f=v.useRef({}),m=v.useRef(null),p=v.useRef(null),h=vt(p,d),[y,b]=v.useState(!c),g=Gre(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const w=()=>un(m.current),P=()=>(f.current.modalRef=p.current,f.current.mount=m.current,f.current),C=()=>{o.mount(P(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},E=Jt(()=>{const j=Wre(t)||w().body;o.add(P(),j),p.current&&C()}),S=v.useCallback(()=>o.isTopModal(P()),[o]),M=Jt(j=>{m.current=j,j&&(c&&S()?C():p.current&&Hf(p.current,x))}),O=v.useCallback(()=>{o.remove(P(),x)},[x,o]);v.useEffect(()=>()=>{O()},[O]),v.useEffect(()=>{c?E():(!g||!i)&&O()},[c,O,g,i,E]);const R=j=>$=>{var L;(L=j.onKeyDown)==null||L.call(j,$),!($.key!=="Escape"||$.which===229||!S())&&(n||($.stopPropagation(),u&&u($,"escapeKeyDown")))},_=j=>$=>{var L;(L=j.onClick)==null||L.call(j,$),$.target===$.currentTarget&&u&&u($,"backdropClick")};return{getRootProps:(j={})=>{const $=ZN(e);delete $.onTransitionEnter,delete $.onTransitionExited;const L=I({},$,j);return I({role:"presentation"},L,{onKeyDown:R(L),ref:h})},getBackdropProps:(j={})=>{const $=j;return I({"aria-hidden":!0},$,{onClick:_($),open:c})},getTransitionProps:()=>{const j=()=>{b(!1),a&&a()},$=()=>{b(!0),l&&l(),i&&O()};return{onEnter:Lw(j,s==null?void 0:s.props.onEnter),onExited:Lw($,s==null?void 0:s.props.onExited)}},rootRef:h,portalRef:M,isTopModal:S,exited:y,hasTransition:g}}const Qre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Yre(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 Xre(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 Zre(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Xre(e))}function Jre(e){const t=[],n=[];return Array.from(e.querySelectorAll(Qre)).forEach((r,o)=>{const i=Yre(r);i===-1||!Zre(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 eoe(){return!0}function t4(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Jre,isEnabled:a=eoe,open:l}=e,s=v.useRef(!1),u=v.useRef(null),c=v.useRef(null),d=v.useRef(null),f=v.useRef(null),m=v.useRef(!1),p=v.useRef(null),h=vt(t.ref,p),y=v.useRef(null);v.useEffect(()=>{!l||!p.current||(m.current=!n)},[n,l]),v.useEffect(()=>{if(!l||!p.current)return;const x=un(p.current);return p.current.contains(x.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),m.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(s.current=!0,d.current.focus()),d.current=null)}},[l]),v.useEffect(()=>{if(!l||!p.current)return;const x=un(p.current),w=E=>{y.current=E,!(r||!a()||E.key!=="Tab")&&x.activeElement===p.current&&E.shiftKey&&(s.current=!0,c.current&&c.current.focus())},P=()=>{const E=p.current;if(E===null)return;if(!x.hasFocus()||!a()||s.current){s.current=!1;return}if(E.contains(x.activeElement)||r&&x.activeElement!==u.current&&x.activeElement!==c.current)return;if(x.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!m.current)return;let S=[];if((x.activeElement===u.current||x.activeElement===c.current)&&(S=i(p.current)),S.length>0){var M,O;const R=!!((M=y.current)!=null&&M.shiftKey&&((O=y.current)==null?void 0:O.key)==="Tab"),_=S[0],D=S[S.length-1];typeof _!="string"&&typeof D!="string"&&(R?D.focus():_.focus())}else E.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",w,!0);const C=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(C),x.removeEventListener("focusin",P),x.removeEventListener("keydown",w,!0)}},[n,r,o,a,l,i]);const b=x=>{d.current===null&&(d.current=x.relatedTarget),m.current=!0,f.current=x.target;const w=t.props.onFocus;w&&w(x)},g=x=>{d.current===null&&(d.current=x.relatedTarget),m.current=!0};return N.jsxs(v.Fragment,{children:[N.jsx("div",{tabIndex:l?0:-1,onFocus:g,ref:u,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:h,onFocus:b}),N.jsx("div",{tabIndex:l?0:-1,onFocus:g,ref:c,"data-testid":"sentinelEnd"})]})}function toe(e){return typeof e=="function"?e():e}const n4=v.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,l]=v.useState(null),s=vt(v.isValidElement(r)?r.ref:null,n);if(Rt(()=>{i||l(toe(o)||document.body)},[o,i]),Rt(()=>{if(a&&!i)return gp(n,a),()=>{gp(n,null)}},[n,a,i]),i){if(v.isValidElement(r)){const u={ref:s};return v.cloneElement(r,u)}return N.jsx(v.Fragment,{children:r})}return N.jsx(v.Fragment,{children:a&&ss.createPortal(r,a)})}),noe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],roe={entering:{opacity:1},entered:{opacity:1}},ooe=v.forwardRef(function(t,n){const r=Rr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:s,in:u,onEnter:c,onEntered:d,onEntering:f,onExit:m,onExited:p,onExiting:h,style:y,timeout:b=o,TransitionComponent:g=by}=t,x=ue(t,noe),w=v.useRef(null),P=vt(w,l.ref,n),C=T=>F=>{if(T){const j=w.current;F===void 0?T(j):T(j,F)}},E=C(f),S=C((T,F)=>{_E(T);const j=ns({style:y,timeout:b,easing:s},{mode:"enter"});T.style.webkitTransition=r.transitions.create("opacity",j),T.style.transition=r.transitions.create("opacity",j),c&&c(T,F)}),M=C(d),O=C(h),R=C(T=>{const F=ns({style:y,timeout:b,easing:s},{mode:"exit"});T.style.webkitTransition=r.transitions.create("opacity",F),T.style.transition=r.transitions.create("opacity",F),m&&m(T)}),_=C(p),D=T=>{i&&i(w.current,T)};return N.jsx(g,I({appear:a,in:u,nodeRef:w,onEnter:S,onEntered:M,onEntering:E,onExit:R,onExited:_,onExiting:O,addEndListener:D,timeout:b},x,{children:(T,F)=>v.cloneElement(l,I({style:I({opacity:0,visibility:T==="exited"&&!u?"hidden":void 0},roe[T],y,l.props.style),ref:P},F))}))}),r4=ooe;function ioe(e){return Be("MuiBackdrop",e)}He("MuiBackdrop",["root","invisible"]);const aoe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],loe=e=>{const{classes:t,invisible:n}=e;return Ie({root:["root",n&&"invisible"]},ioe,t)},soe=de("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>I({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"},e.invisible&&{backgroundColor:"transparent"})),uoe=v.forwardRef(function(t,n){var r,o,i;const a=Ue({props:t,name:"MuiBackdrop"}),{children:l,className:s,component:u="div",components:c={},componentsProps:d={},invisible:f=!1,open:m,slotProps:p={},slots:h={},TransitionComponent:y=r4,transitionDuration:b}=a,g=ue(a,aoe),x=I({},a,{component:u,invisible:f}),w=loe(x),P=(r=p.root)!=null?r:d.root;return N.jsx(y,I({in:m,timeout:b},g,{children:N.jsx(soe,I({"aria-hidden":!0},P,{as:(o=(i=h.root)!=null?i:c.Root)!=null?o:u,className:he(w.root,s,P==null?void 0:P.className),ownerState:I({},x,P==null?void 0:P.ownerState),classes:w,ref:n,children:l}))}))}),o4=uoe;function coe(e){return Be("MuiModal",e)}He("MuiModal",["root","hidden","backdrop"]);const doe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],foe=e=>{const{open:t,exited:n,classes:r}=e;return Ie({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},coe,r)},poe=de("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>I({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),moe=de(o4,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),hoe=v.forwardRef(function(t,n){var r,o,i,a,l,s;const u=Ue({name:"MuiModal",props:t}),{BackdropComponent:c=moe,BackdropProps:d,className:f,closeAfterTransition:m=!1,children:p,container:h,component:y,components:b={},componentsProps:g={},disableAutoFocus:x=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:P=!1,disablePortal:C=!1,disableRestoreFocus:E=!1,disableScrollLock:S=!1,hideBackdrop:M=!1,keepMounted:O=!1,onBackdropClick:R,open:_,slotProps:D,slots:T}=u,F=ue(u,doe),j=I({},u,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:w,disableEscapeKeyDown:P,disablePortal:C,disableRestoreFocus:E,disableScrollLock:S,hideBackdrop:M,keepMounted:O}),{getRootProps:$,getBackdropProps:L,getTransitionProps:z,portalRef:B,isTopModal:A,exited:H,hasTransition:q}=Kre(I({},j,{rootRef:n})),U=I({},j,{exited:H}),G=foe(U),Y={};if(p.props.tabIndex===void 0&&(Y.tabIndex="-1"),q){const{onEnter:me,onExited:ke}=z();Y.onEnter=me,Y.onExited=ke}const re=(r=(o=T==null?void 0:T.root)!=null?o:b.Root)!=null?r:poe,le=(i=(a=T==null?void 0:T.backdrop)!=null?a:b.Backdrop)!=null?i:c,J=(l=D==null?void 0:D.root)!=null?l:g.root,oe=(s=D==null?void 0:D.backdrop)!=null?s:g.backdrop,ce=Xi({elementType:re,externalSlotProps:J,externalForwardedProps:F,getSlotProps:$,additionalProps:{ref:n,as:y},ownerState:U,className:he(f,J==null?void 0:J.className,G==null?void 0:G.root,!U.open&&U.exited&&(G==null?void 0:G.hidden))}),ve=Xi({elementType:le,externalSlotProps:oe,additionalProps:d,getSlotProps:me=>L(I({},me,{onClick:ke=>{R&&R(ke),me!=null&&me.onClick&&me.onClick(ke)}})),className:he(oe==null?void 0:oe.className,d==null?void 0:d.className,G==null?void 0:G.backdrop),ownerState:U});return!O&&!_&&(!q||H)?null:N.jsx(n4,{ref:B,container:h,disablePortal:C,children:N.jsxs(re,I({},ce,{children:[!M&&c?N.jsx(le,I({},ve)):null,N.jsx(t4,{disableEnforceFocus:w,disableAutoFocus:x,disableRestoreFocus:E,isEnabled:A,open:_,children:v.cloneElement(p,Y)})]}))})}),AE=hoe;function goe(e){return Be("MuiPaper",e)}He("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 voe=["className","component","elevation","square","variant"],yoe=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ie(i,goe,o)},boe=de("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}`]]}})(({theme:e,ownerState:t})=>{var n;return I({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&I({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${rt("#fff",yM(t.elevation))}, ${rt("#fff",yM(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),xoe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:a=1,square:l=!1,variant:s="elevation"}=r,u=ue(r,voe),c=I({},r,{component:i,elevation:a,square:l,variant:s}),d=yoe(c);return N.jsx(boe,I({as:i,ownerState:c,className:he(d.root,o),ref:n},u))}),Jo=xoe;function woe(e){return Be("MuiDrawer",e)}He("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Coe=["BackdropProps"],Soe=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],i4=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},Eoe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${pe(n)}`,r!=="temporary"&&`paperAnchorDocked${pe(n)}`]};return Ie(o,woe,t)},Poe=de(AE,{name:"MuiDrawer",slot:"Root",overridesResolver:i4})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),IM=de("div",{shouldForwardProp:gr,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:i4})({flex:"0 0 auto"}),koe=de(Jo,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${pe(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${pe(n.anchor)}`]]}})(({theme:e,ownerState:t})=>I({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},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),a4={left:"right",right:"left",top:"down",bottom:"up"};function $oe(e){return["left","right"].indexOf(e)!==-1}function Ioe({direction:e},t){return e==="rtl"&&$oe(t)?a4[t]:t}const Ooe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDrawer"}),o=Rr(),i=Zy(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:s,children:u,className:c,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:m}={},onClose:p,open:h=!1,PaperProps:y={},SlideProps:b,TransitionComponent:g=KN,transitionDuration:x=a,variant:w="temporary"}=r,P=ue(r.ModalProps,Coe),C=ue(r,Soe),E=v.useRef(!1);v.useEffect(()=>{E.current=!0},[]);const S=Ioe({direction:i?"rtl":"ltr"},l),O=I({},r,{anchor:l,elevation:d,open:h,variant:w},C),R=Eoe(O),_=N.jsx(koe,I({elevation:w==="temporary"?d:0,square:!0},y,{className:he(R.paper,y.className),ownerState:O,children:u}));if(w==="permanent")return N.jsx(IM,I({className:he(R.root,R.docked,c),ownerState:O,ref:n},C,{children:_}));const D=N.jsx(g,I({in:h,direction:a4[S],timeout:x,appear:E.current},b,{children:_}));return w==="persistent"?N.jsx(IM,I({className:he(R.root,R.docked,c),ownerState:O,ref:n},C,{children:D})):N.jsx(Poe,I({BackdropProps:I({},s,m,{transitionDuration:x}),className:he(R.root,R.modal,c),open:h,ownerState:O,onClose:p,hideBackdrop:f,ref:n},C,P,{children:D}))}),Jc=Ooe,Moe=v.createContext({}),vi=Moe;function Roe(e){return Be("MuiList",e)}He("MuiList",["root","padding","dense","subheader"]);const Toe=["children","className","component","dense","disablePadding","subheader"],_oe=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Ie({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Roe,t)},Foe=de("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]}})(({ownerState:e})=>I({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Aoe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:l=!1,disablePadding:s=!1,subheader:u}=r,c=ue(r,Toe),d=v.useMemo(()=>({dense:l}),[l]),f=I({},r,{component:a,dense:l,disablePadding:s}),m=_oe(f);return N.jsx(vi.Provider,{value:d,children:N.jsxs(Foe,I({as:a,className:he(m.root,i),ref:n,ownerState:f},c,{children:[u,o]}))})}),os=Aoe;function Loe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:l,onExited:s,timeout:u}=e,[c,d]=v.useState(!1),f=he(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},p=he(n.child,c&&n.childLeaving,r&&n.childPulsate);return!l&&!c&&d(!0),v.useEffect(()=>{if(!l&&s!=null){const h=setTimeout(s,u);return()=>{clearTimeout(h)}}},[s,l,u]),N.jsx("span",{className:f,style:m,children:N.jsx("span",{className:p})})}const Doe=He("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),$o=Doe,Noe=["center","classes","className"];let t0=e=>e,OM,MM,RM,TM;const jw=550,joe=80,zoe=ps(OM||(OM=t0` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),Boe=ps(MM||(MM=t0` 0% { opacity: 1; } 100% { opacity: 0; } `)),Hoe=ps(RM||(RM=t0` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),Voe=de("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Uoe=de(Loe,{name:"MuiTouchRipple",slot:"Ripple"})(TM||(TM=t0` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),$o.rippleVisible,zoe,jw,({theme:e})=>e.transitions.easing.easeInOut,$o.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,$o.child,$o.childLeaving,Boe,jw,({theme:e})=>e.transitions.easing.easeInOut,$o.childPulsate,Hoe,({theme:e})=>e.transitions.easing.easeInOut),Woe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=r,l=ue(r,Noe),[s,u]=v.useState([]),c=v.useRef(0),d=v.useRef(null);v.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const f=v.useRef(!1),m=js(),p=v.useRef(null),h=v.useRef(null),y=v.useCallback(w=>{const{pulsate:P,rippleX:C,rippleY:E,rippleSize:S,cb:M}=w;u(O=>[...O,N.jsx(Uoe,{classes:{ripple:he(i.ripple,$o.ripple),rippleVisible:he(i.rippleVisible,$o.rippleVisible),ripplePulsate:he(i.ripplePulsate,$o.ripplePulsate),child:he(i.child,$o.child),childLeaving:he(i.childLeaving,$o.childLeaving),childPulsate:he(i.childPulsate,$o.childPulsate)},timeout:jw,pulsate:P,rippleX:C,rippleY:E,rippleSize:S},c.current)]),c.current+=1,d.current=M},[i]),b=v.useCallback((w={},P={},C=()=>{})=>{const{pulsate:E=!1,center:S=o||P.pulsate,fakeElement:M=!1}=P;if((w==null?void 0:w.type)==="mousedown"&&f.current){f.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(f.current=!0);const O=M?null:h.current,R=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let _,D,T;if(S||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)_=Math.round(R.width/2),D=Math.round(R.height/2);else{const{clientX:F,clientY:j}=w.touches&&w.touches.length>0?w.touches[0]:w;_=Math.round(F-R.left),D=Math.round(j-R.top)}if(S)T=Math.sqrt((2*R.width**2+R.height**2)/3),T%2===0&&(T+=1);else{const F=Math.max(Math.abs((O?O.clientWidth:0)-_),_)*2+2,j=Math.max(Math.abs((O?O.clientHeight:0)-D),D)*2+2;T=Math.sqrt(F**2+j**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{y({pulsate:E,rippleX:_,rippleY:D,rippleSize:T,cb:C})},m.start(joe,()=>{p.current&&(p.current(),p.current=null)})):y({pulsate:E,rippleX:_,rippleY:D,rippleSize:T,cb:C})},[o,y,m]),g=v.useCallback(()=>{b({},{pulsate:!0})},[b]),x=v.useCallback((w,P)=>{if(m.clear(),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,m.start(0,()=>{x(w,P)});return}p.current=null,u(C=>C.length>0?C.slice(1):C),d.current=P},[m]);return v.useImperativeHandle(n,()=>({pulsate:g,start:b,stop:x}),[g,b,x]),N.jsx(Voe,I({className:he($o.root,i.root,a),ref:h},l,{children:N.jsx(lZ,{component:null,exit:!0,children:s})}))}),Goe=Woe;function qoe(e){return Be("MuiButtonBase",e)}const Koe=He("MuiButtonBase",["root","disabled","focusVisible"]),Qoe=Koe,Yoe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Xoe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Ie({root:["root",t&&"disabled",n&&"focusVisible"]},qoe,o);return n&&r&&(a.root+=` ${r}`),a},Zoe=de("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"},[`&.${Qoe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Joe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:l,component:s="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:p,onClick:h,onContextMenu:y,onDragLeave:b,onFocus:g,onFocusVisible:x,onKeyDown:w,onKeyUp:P,onMouseDown:C,onMouseLeave:E,onMouseUp:S,onTouchEnd:M,onTouchMove:O,onTouchStart:R,tabIndex:_=0,TouchRippleProps:D,touchRippleRef:T,type:F}=r,j=ue(r,Yoe),$=v.useRef(null),L=v.useRef(null),z=vt(L,T),{isFocusVisibleRef:B,onFocus:A,onBlur:H,ref:q}=Xy(),[U,G]=v.useState(!1);u&&U&&G(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{G(!0),$.current.focus()}}),[]);const[Y,re]=v.useState(!1);v.useEffect(()=>{re(!0)},[]);const le=Y&&!c&&!u;v.useEffect(()=>{U&&f&&!c&&Y&&L.current.pulsate()},[c,f,U,Y]);function J(X,Ee,De=d){return Jt(Te=>(Ee&&Ee(Te),!De&&L.current&&L.current[X](Te),!0))}const oe=J("start",C),ce=J("stop",y),ve=J("stop",b),me=J("stop",S),ke=J("stop",X=>{U&&X.preventDefault(),E&&E(X)}),be=J("start",R),ie=J("stop",M),ye=J("stop",O),V=J("stop",X=>{H(X),B.current===!1&&G(!1),p&&p(X)},!1),Q=Jt(X=>{$.current||($.current=X.currentTarget),A(X),B.current===!0&&(G(!0),x&&x(X)),g&&g(X)}),Z=()=>{const X=$.current;return s&&s!=="button"&&!(X.tagName==="A"&&X.href)},ae=v.useRef(!1),te=Jt(X=>{f&&!ae.current&&U&&L.current&&X.key===" "&&(ae.current=!0,L.current.stop(X,()=>{L.current.start(X)})),X.target===X.currentTarget&&Z()&&X.key===" "&&X.preventDefault(),w&&w(X),X.target===X.currentTarget&&Z()&&X.key==="Enter"&&!u&&(X.preventDefault(),h&&h(X))}),K=Jt(X=>{f&&X.key===" "&&L.current&&U&&!X.defaultPrevented&&(ae.current=!1,L.current.stop(X,()=>{L.current.pulsate(X)})),P&&P(X),h&&X.target===X.currentTarget&&Z()&&X.key===" "&&!X.defaultPrevented&&h(X)});let ee=s;ee==="button"&&(j.href||j.to)&&(ee=m);const se={};ee==="button"?(se.type=F===void 0?"button":F,se.disabled=u):(!j.href&&!j.to&&(se.role="button"),u&&(se["aria-disabled"]=u));const Ce=vt(n,q,$),_e=I({},r,{centerRipple:i,component:s,disabled:u,disableRipple:c,disableTouchRipple:d,focusRipple:f,tabIndex:_,focusVisible:U}),$e=Xoe(_e);return N.jsxs(Zoe,I({as:ee,className:he($e.root,l),ownerState:_e,onBlur:V,onClick:h,onContextMenu:ce,onFocus:Q,onKeyDown:te,onKeyUp:K,onMouseDown:oe,onMouseLeave:ke,onMouseUp:me,onDragLeave:ve,onTouchEnd:ie,onTouchMove:ye,onTouchStart:be,ref:Ce,tabIndex:u?-1:_,type:F},se,j,{children:[a,le?N.jsx(Goe,I({ref:z,center:i},D)):null]}))}),Zi=Joe;function eie(e){return Be("MuiListItemButton",e)}const tie=He("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Xu=tie,nie=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],rie=(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]},oie=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:l}=e,u=Ie({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",l&&"selected"]},eie,n);return I({},n,u)},iie=de(Zi,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:rie})(({theme:e,ownerState:t})=>I({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"}},[`&.${Xu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Xu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Xu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(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})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Xu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Xu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),aie=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:l,dense:s=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:d,selected:f=!1,className:m}=r,p=ue(r,nie),h=v.useContext(vi),y=v.useMemo(()=>({dense:s||h.dense||!1,alignItems:o,disableGutters:u}),[o,h.dense,s,u]),b=v.useRef(null);Rt(()=>{i&&b.current&&b.current.focus()},[i]);const g=I({},r,{alignItems:o,dense:y.dense,disableGutters:u,divider:c,selected:f}),x=oie(g),w=vt(b,n);return N.jsx(vi.Provider,{value:y,children:N.jsx(iie,I({ref:w,href:p.href||p.to,component:(p.href||p.to)&&a==="div"?"button":a,focusVisibleClassName:he(x.focusVisible,d),ownerState:g,className:he(x.root,m)},p,{classes:x,children:l}))})}),Lo=aie;function lie(e){return Be("MuiListItemIcon",e)}const _M=He("MuiListItemIcon",["root","alignItemsFlexStart"]),sie=["className"],uie=e=>{const{alignItems:t,classes:n}=e;return Ie({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},lie,n)},cie=de("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>I({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),die=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListItemIcon"}),{className:o}=r,i=ue(r,sie),a=v.useContext(vi),l=I({},r,{alignItems:a.alignItems}),s=uie(l);return N.jsx(cie,I({className:he(s.root,o),ownerState:l,ref:n},i))}),vn=die;function fie(e){return Be("MuiTypography",e)}He("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pie=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],mie=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,l={root:["root",i,e.align!=="inherit"&&`align${pe(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ie(l,fie,a)},hie=de("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${pe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>I({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),FM={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},gie={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},vie=e=>gie[e]||e,yie=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiTypography"}),o=vie(r.color),i=nm(I({},r,{color:o})),{align:a="inherit",className:l,component:s,gutterBottom:u=!1,noWrap:c=!1,paragraph:d=!1,variant:f="body1",variantMapping:m=FM}=i,p=ue(i,pie),h=I({},i,{align:a,color:o,className:l,component:s,gutterBottom:u,noWrap:c,paragraph:d,variant:f,variantMapping:m}),y=s||(d?"p":m[f]||FM[f])||"span",b=mie(h);return N.jsx(hie,I({as:y,ref:n,ownerState:h,className:he(b.root,l)},p))}),Xe=yie;function bie(e){return Be("MuiListItemText",e)}const xie=He("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),sv=xie,wie=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Cie=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Ie({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},bie,t)},Sie=de("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${sv.primary}`]:t.primary},{[`& .${sv.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>I({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),Eie=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:l=!1,primary:s,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:d}=r,f=ue(r,wie),{dense:m}=v.useContext(vi);let p=s??o,h=c;const y=I({},r,{disableTypography:a,inset:l,primary:!!p,secondary:!!h,dense:m}),b=Cie(y);return p!=null&&p.type!==Xe&&!a&&(p=N.jsx(Xe,I({variant:m?"body2":"body1",className:b.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:p}))),h!=null&&h.type!==Xe&&!a&&(h=N.jsx(Xe,I({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:h}))),N.jsxs(Sie,I({className:he(b.root,i),ownerState:y,ref:n},f,{children:[p,h]}))}),Rn=Eie,Pie=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function zw(e){return`scale(${e}, ${e**2})`}const kie={entering:{opacity:1,transform:zw(1)},entered:{opacity:1,transform:"none"}},u1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),l4=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:l,onEnter:s,onEntered:u,onEntering:c,onExit:d,onExited:f,onExiting:m,style:p,timeout:h="auto",TransitionComponent:y=by}=t,b=ue(t,Pie),g=js(),x=v.useRef(),w=Rr(),P=v.useRef(null),C=vt(P,i.ref,n),E=F=>j=>{if(F){const $=P.current;j===void 0?F($):F($,j)}},S=E(c),M=E((F,j)=>{_E(F);const{duration:$,delay:L,easing:z}=ns({style:p,timeout:h,easing:a},{mode:"enter"});let B;h==="auto"?(B=w.transitions.getAutoHeightDuration(F.clientHeight),x.current=B):B=$,F.style.transition=[w.transitions.create("opacity",{duration:B,delay:L}),w.transitions.create("transform",{duration:u1?B:B*.666,delay:L,easing:z})].join(","),s&&s(F,j)}),O=E(u),R=E(m),_=E(F=>{const{duration:j,delay:$,easing:L}=ns({style:p,timeout:h,easing:a},{mode:"exit"});let z;h==="auto"?(z=w.transitions.getAutoHeightDuration(F.clientHeight),x.current=z):z=j,F.style.transition=[w.transitions.create("opacity",{duration:z,delay:$}),w.transitions.create("transform",{duration:u1?z:z*.666,delay:u1?$:$||z*.333,easing:L})].join(","),F.style.opacity=0,F.style.transform=zw(.75),d&&d(F)}),D=E(f),T=F=>{h==="auto"&&g.start(x.current||0,F),r&&r(P.current,F)};return N.jsx(y,I({appear:o,in:l,nodeRef:P,onEnter:M,onEntered:O,onEntering:S,onExit:_,onExited:D,onExiting:R,addEndListener:T,timeout:h==="auto"?null:h},b,{children:(F,j)=>v.cloneElement(i,I({style:I({opacity:0,transform:zw(.75),visibility:F==="exited"&&!l?"hidden":void 0},kie[F],p,i.props.style),ref:C},j))}))});l4.muiSupportAuto=!0;const uv=l4;var Hr="top",Uo="bottom",Wo="right",Vr="left",LE="auto",am=[Hr,Uo,Wo,Vr],ed="start",Sp="end",$ie="clippingParents",s4="viewport",Xd="popper",Iie="reference",AM=am.reduce(function(e,t){return e.concat([t+"-"+ed,t+"-"+Sp])},[]),u4=[].concat(am,[LE]).reduce(function(e,t){return e.concat([t,t+"-"+ed,t+"-"+Sp])},[]),Oie="beforeRead",Mie="read",Rie="afterRead",Tie="beforeMain",_ie="main",Fie="afterMain",Aie="beforeWrite",Lie="write",Die="afterWrite",Nie=[Oie,Mie,Rie,Tie,_ie,Fie,Aie,Lie,Die];function Ji(e){return e?(e.nodeName||"").toLowerCase():null}function po(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pu(e){var t=po(e).Element;return e instanceof t||e instanceof Element}function No(e){var t=po(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function DE(e){if(typeof ShadowRoot>"u")return!1;var t=po(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jie(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];!No(i)||!Ji(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var l=o[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function zie(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]),l=a.reduce(function(s,u){return s[u]="",s},{});!No(o)||!Ji(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(s){o.removeAttribute(s)}))})}}const Bie={name:"applyStyles",enabled:!0,phase:"write",fn:jie,effect:zie,requires:["computeStyles"]};function Gi(e){return e.split("-")[0]}var qs=Math.max,cv=Math.min,td=Math.round;function Bw(){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 c4(){return!/^((?!chrome|android).)*safari/i.test(Bw())}function nd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&No(e)&&(o=e.offsetWidth>0&&td(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&td(r.height)/e.offsetHeight||1);var a=pu(e)?po(e):window,l=a.visualViewport,s=!c4()&&n,u=(r.left+(s&&l?l.offsetLeft:0))/o,c=(r.top+(s&&l?l.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function NE(e){var t=nd(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 d4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&DE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ka(e){return po(e).getComputedStyle(e)}function Hie(e){return["table","td","th"].indexOf(Ji(e))>=0}function ms(e){return((pu(e)?e.ownerDocument:e.document)||window.document).documentElement}function n0(e){return Ji(e)==="html"?e:e.assignedSlot||e.parentNode||(DE(e)?e.host:null)||ms(e)}function LM(e){return!No(e)||Ka(e).position==="fixed"?null:e.offsetParent}function Vie(e){var t=/firefox/i.test(Bw()),n=/Trident/i.test(Bw());if(n&&No(e)){var r=Ka(e);if(r.position==="fixed")return null}var o=n0(e);for(DE(o)&&(o=o.host);No(o)&&["html","body"].indexOf(Ji(o))<0;){var i=Ka(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 lm(e){for(var t=po(e),n=LM(e);n&&Hie(n)&&Ka(n).position==="static";)n=LM(n);return n&&(Ji(n)==="html"||Ji(n)==="body"&&Ka(n).position==="static")?t:n||Vie(e)||t}function jE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vf(e,t,n){return qs(e,cv(t,n))}function Uie(e,t,n){var r=Vf(e,t,n);return r>n?n:r}function f4(){return{top:0,right:0,bottom:0,left:0}}function p4(e){return Object.assign({},f4(),e)}function m4(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Wie=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,p4(typeof t!="number"?t:m4(t,am))};function Gie(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Gi(n.placement),s=jE(l),u=[Vr,Wo].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!a)){var d=Wie(o.padding,n),f=NE(i),m=s==="y"?Hr:Vr,p=s==="y"?Uo:Wo,h=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],y=a[s]-n.rects.reference[s],b=lm(i),g=b?s==="y"?b.clientHeight||0:b.clientWidth||0:0,x=h/2-y/2,w=d[m],P=g-f[c]-d[p],C=g/2-f[c]/2+x,E=Vf(w,C,P),S=s;n.modifiersData[r]=(t={},t[S]=E,t.centerOffset=E-C,t)}}function qie(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)||d4(t.elements.popper,o)&&(t.elements.arrow=o))}const Kie={name:"arrow",enabled:!0,phase:"main",fn:Gie,effect:qie,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rd(e){return e.split("-")[1]}var Qie={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yie(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:td(n*o)/o||0,y:td(r*o)/o||0}}function DM(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,m=f===void 0?0:f,p=a.y,h=p===void 0?0:p,y=typeof c=="function"?c({x:m,y:h}):{x:m,y:h};m=y.x,h=y.y;var b=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),x=Vr,w=Hr,P=window;if(u){var C=lm(n),E="clientHeight",S="clientWidth";if(C===po(n)&&(C=ms(n),Ka(C).position!=="static"&&l==="absolute"&&(E="scrollHeight",S="scrollWidth")),C=C,o===Hr||(o===Vr||o===Wo)&&i===Sp){w=Uo;var M=d&&C===P&&P.visualViewport?P.visualViewport.height:C[E];h-=M-r.height,h*=s?1:-1}if(o===Vr||(o===Hr||o===Uo)&&i===Sp){x=Wo;var O=d&&C===P&&P.visualViewport?P.visualViewport.width:C[S];m-=O-r.width,m*=s?1:-1}}var R=Object.assign({position:l},u&&Qie),_=c===!0?Yie({x:m,y:h},po(n)):{x:m,y:h};if(m=_.x,h=_.y,s){var D;return Object.assign({},R,(D={},D[w]=g?"0":"",D[x]=b?"0":"",D.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",D))}return Object.assign({},R,(t={},t[w]=g?h+"px":"",t[x]=b?m+"px":"",t.transform="",t))}function Xie(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,l=n.roundOffsets,s=l===void 0?!0:l,u={placement:Gi(t.placement),variation:rd(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,DM(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,DM(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Zie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Xie,data:{}};var hh={passive:!0};function Jie(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,l=a===void 0?!0:a,s=po(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,hh)}),l&&s.addEventListener("resize",n.update,hh),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,hh)}),l&&s.removeEventListener("resize",n.update,hh)}}const eae={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jie,data:{}};var tae={left:"right",right:"left",bottom:"top",top:"bottom"};function sg(e){return e.replace(/left|right|bottom|top/g,function(t){return tae[t]})}var nae={start:"end",end:"start"};function NM(e){return e.replace(/start|end/g,function(t){return nae[t]})}function zE(e){var t=po(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function BE(e){return nd(ms(e)).left+zE(e).scrollLeft}function rae(e,t){var n=po(e),r=ms(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;var u=c4();(u||!u&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l+BE(e),y:s}}function oae(e){var t,n=ms(e),r=zE(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=qs(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=qs(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+BE(e),s=-r.scrollTop;return Ka(o||n).direction==="rtl"&&(l+=qs(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}function HE(e){var t=Ka(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function h4(e){return["html","body","#document"].indexOf(Ji(e))>=0?e.ownerDocument.body:No(e)&&HE(e)?e:h4(n0(e))}function Uf(e,t){var n;t===void 0&&(t=[]);var r=h4(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=po(r),a=o?[i].concat(i.visualViewport||[],HE(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(Uf(n0(a)))}function Hw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function iae(e,t){var n=nd(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 jM(e,t,n){return t===s4?Hw(rae(e,n)):pu(t)?iae(t,n):Hw(oae(ms(e)))}function aae(e){var t=Uf(n0(e)),n=["absolute","fixed"].indexOf(Ka(e).position)>=0,r=n&&No(e)?lm(e):e;return pu(r)?t.filter(function(o){return pu(o)&&d4(o,r)&&Ji(o)!=="body"}):[]}function lae(e,t,n,r){var o=t==="clippingParents"?aae(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce(function(s,u){var c=jM(e,u,r);return s.top=qs(c.top,s.top),s.right=cv(c.right,s.right),s.bottom=cv(c.bottom,s.bottom),s.left=qs(c.left,s.left),s},jM(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function g4(e){var t=e.reference,n=e.element,r=e.placement,o=r?Gi(r):null,i=r?rd(r):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,s;switch(o){case Hr:s={x:a,y:t.y-n.height};break;case Uo:s={x:a,y:t.y+t.height};break;case Wo:s={x:t.x+t.width,y:l};break;case Vr:s={x:t.x-n.width,y:l};break;default:s={x:t.x,y:t.y}}var u=o?jE(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case ed:s[u]=s[u]-(t[c]/2-n[c]/2);break;case Sp:s[u]=s[u]+(t[c]/2-n[c]/2);break}}return s}function Ep(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,l=n.boundary,s=l===void 0?$ie:l,u=n.rootBoundary,c=u===void 0?s4:u,d=n.elementContext,f=d===void 0?Xd:d,m=n.altBoundary,p=m===void 0?!1:m,h=n.padding,y=h===void 0?0:h,b=p4(typeof y!="number"?y:m4(y,am)),g=f===Xd?Iie:Xd,x=e.rects.popper,w=e.elements[p?g:f],P=lae(pu(w)?w:w.contextElement||ms(e.elements.popper),s,c,a),C=nd(e.elements.reference),E=g4({reference:C,element:x,strategy:"absolute",placement:o}),S=Hw(Object.assign({},x,E)),M=f===Xd?S:C,O={top:P.top-M.top+b.top,bottom:M.bottom-P.bottom+b.bottom,left:P.left-M.left+b.left,right:M.right-P.right+b.right},R=e.modifiersData.offset;if(f===Xd&&R){var _=R[o];Object.keys(O).forEach(function(D){var T=[Wo,Uo].indexOf(D)>=0?1:-1,F=[Hr,Uo].indexOf(D)>=0?"y":"x";O[D]+=_[F]*T})}return O}function sae(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=s===void 0?u4:s,c=rd(r),d=c?l?AM:AM.filter(function(p){return rd(p)===c}):am,f=d.filter(function(p){return u.indexOf(p)>=0});f.length===0&&(f=d);var m=f.reduce(function(p,h){return p[h]=Ep(e,{placement:h,boundary:o,rootBoundary:i,padding:a})[Gi(h)],p},{});return Object.keys(m).sort(function(p,h){return m[p]-m[h]})}function uae(e){if(Gi(e)===LE)return[];var t=sg(e);return[NM(e),t,NM(t)]}function cae(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,l=a===void 0?!0:a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,p=m===void 0?!0:m,h=n.allowedAutoPlacements,y=t.options.placement,b=Gi(y),g=b===y,x=s||(g||!p?[sg(y)]:uae(y)),w=[y].concat(x).reduce(function(U,G){return U.concat(Gi(G)===LE?sae(t,{placement:G,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:h}):G)},[]),P=t.rects.reference,C=t.rects.popper,E=new Map,S=!0,M=w[0],O=0;O=0,F=T?"width":"height",j=Ep(t,{placement:R,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),$=T?D?Wo:Vr:D?Uo:Hr;P[F]>C[F]&&($=sg($));var L=sg($),z=[];if(i&&z.push(j[_]<=0),l&&z.push(j[$]<=0,j[L]<=0),z.every(function(U){return U})){M=R,S=!1;break}E.set(R,z)}if(S)for(var B=p?3:1,A=function(G){var Y=w.find(function(re){var le=E.get(re);if(le)return le.slice(0,G).every(function(J){return J})});if(Y)return M=Y,"break"},H=B;H>0;H--){var q=A(H);if(q==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}const dae={name:"flip",enabled:!0,phase:"main",fn:cae,requiresIfExists:["offset"],data:{_skip:!1}};function zM(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 BM(e){return[Hr,Wo,Uo,Vr].some(function(t){return e[t]>=0})}function fae(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ep(t,{elementContext:"reference"}),l=Ep(t,{altBoundary:!0}),s=zM(a,r),u=zM(l,o,i),c=BM(s),d=BM(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const pae={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fae};function mae(e,t,n){var r=Gi(e),o=[Vr,Hr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[Vr,Wo].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function hae(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=u4.reduce(function(c,d){return c[d]=mae(d,t.rects,i),c},{}),l=a[t.placement],s=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const gae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hae};function vae(e){var t=e.state,n=e.name;t.modifiersData[n]=g4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const yae={name:"popperOffsets",enabled:!0,phase:"read",fn:vae,data:{}};function bae(e){return e==="x"?"y":"x"}function xae(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!1:a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,p=n.tetherOffset,h=p===void 0?0:p,y=Ep(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),b=Gi(t.placement),g=rd(t.placement),x=!g,w=jE(b),P=bae(w),C=t.modifiersData.popperOffsets,E=t.rects.reference,S=t.rects.popper,M=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,O=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(C){if(i){var D,T=w==="y"?Hr:Vr,F=w==="y"?Uo:Wo,j=w==="y"?"height":"width",$=C[w],L=$+y[T],z=$-y[F],B=m?-S[j]/2:0,A=g===ed?E[j]:S[j],H=g===ed?-S[j]:-E[j],q=t.elements.arrow,U=m&&q?NE(q):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:f4(),Y=G[T],re=G[F],le=Vf(0,E[j],U[j]),J=x?E[j]/2-B-le-Y-O.mainAxis:A-le-Y-O.mainAxis,oe=x?-E[j]/2+B+le+re+O.mainAxis:H+le+re+O.mainAxis,ce=t.elements.arrow&&lm(t.elements.arrow),ve=ce?w==="y"?ce.clientTop||0:ce.clientLeft||0:0,me=(D=R==null?void 0:R[w])!=null?D:0,ke=$+J-me-ve,be=$+oe-me,ie=Vf(m?cv(L,ke):L,$,m?qs(z,be):z);C[w]=ie,_[w]=ie-$}if(l){var ye,V=w==="x"?Hr:Vr,Q=w==="x"?Uo:Wo,Z=C[P],ae=P==="y"?"height":"width",te=Z+y[V],K=Z-y[Q],ee=[Hr,Vr].indexOf(b)!==-1,se=(ye=R==null?void 0:R[P])!=null?ye:0,Ce=ee?te:Z-E[ae]-S[ae]-se+O.altAxis,_e=ee?Z+E[ae]+S[ae]-se-O.altAxis:K,$e=m&&ee?Uie(Ce,Z,_e):Vf(m?Ce:te,Z,m?_e:K);C[P]=$e,_[P]=$e-Z}t.modifiersData[r]=_}}const wae={name:"preventOverflow",enabled:!0,phase:"main",fn:xae,requiresIfExists:["offset"]};function Cae(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Sae(e){return e===po(e)||!No(e)?zE(e):Cae(e)}function Eae(e){var t=e.getBoundingClientRect(),n=td(t.width)/e.offsetWidth||1,r=td(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Pae(e,t,n){n===void 0&&(n=!1);var r=No(t),o=No(t)&&Eae(t),i=ms(t),a=nd(e,o,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((Ji(t)!=="body"||HE(i))&&(l=Sae(t)),No(t)?(s=nd(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=BE(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function kae(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(l){if(!n.has(l)){var s=t.get(l);s&&o(s)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function $ae(e){var t=kae(e);return Nie.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Iae(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Oae(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 HM={placement:"bottom",modifiers:[],strategy:"absolute"};function VM(){for(var e=arguments.length,t=new Array(e),n=0;n{n[r]=y4(e,r)}),n}const b4="Popper";function Lae(e){return y4(b4,e)}Aae(b4,["root"]);const Dae=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Nae=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function jae(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 Vw(e){return typeof e=="function"?e():e}function zae(e){return e.nodeType!==void 0}const Bae=()=>Ie({root:["root"]},Nre(Lae)),Hae={},Vae=v.forwardRef(function(t,n){var r;const{anchorEl:o,children:i,direction:a,disablePortal:l,modifiers:s,open:u,placement:c,popperOptions:d,popperRef:f,slotProps:m={},slots:p={},TransitionProps:h}=t,y=ue(t,Dae),b=v.useRef(null),g=vt(b,n),x=v.useRef(null),w=vt(x,f),P=v.useRef(w);Rt(()=>{P.current=w},[w]),v.useImperativeHandle(f,()=>x.current,[]);const C=jae(c,a),[E,S]=v.useState(C),[M,O]=v.useState(Vw(o));v.useEffect(()=>{x.current&&x.current.forceUpdate()}),v.useEffect(()=>{o&&O(Vw(o))},[o]),Rt(()=>{if(!M||!u)return;const F=L=>{S(L.placement)};let j=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:L})=>{F(L)}}];s!=null&&(j=j.concat(s)),d&&d.modifiers!=null&&(j=j.concat(d.modifiers));const $=Tae(M,b.current,I({placement:C},d,{modifiers:j}));return P.current($),()=>{$.destroy(),P.current(null)}},[M,l,s,u,d,C]);const R={placement:E};h!==null&&(R.TransitionProps=h);const _=Bae(),D=(r=p.root)!=null?r:"div",T=Xi({elementType:D,externalSlotProps:m.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:g},ownerState:t,className:_.root});return N.jsx(D,I({},T,{children:typeof i=="function"?i(R):i}))}),Uae=v.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:f=Hae,popperRef:m,style:p,transition:h=!1,slotProps:y={},slots:b={}}=t,g=ue(t,Nae),[x,w]=v.useState(!0),P=()=>{w(!1)},C=()=>{w(!0)};if(!s&&!c&&(!h||x))return null;let E;if(i)E=i;else if(r){const O=Vw(r);E=O&&zae(O)?un(O).body:un(null).body}const S=!c&&s&&(!h||x)?"none":void 0,M=h?{in:c,onEnter:P,onExited:C}:void 0;return N.jsx(n4,{disablePortal:l,container:E,children:N.jsx(Vae,I({anchorEl:r,direction:a,disablePortal:l,modifiers:u,ref:n,open:h?!x:c,placement:d,popperOptions:f,popperRef:m,slotProps:y,slots:b},g,{style:I({position:"fixed",top:0,left:0,display:S},p),TransitionProps:M,children:o}))})});var VE={};Object.defineProperty(VE,"__esModule",{value:!0});var x4=VE.default=void 0,Wae=qae(v),Gae=UN;function w4(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(w4=function(r){return r?n:t})(e)}function qae(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=w4(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Kae(e){return Object.keys(e).length===0}function Qae(e=null){const t=Wae.useContext(Gae.ThemeContext);return!t||Kae(t)?e:t}x4=VE.default=Qae;const Yae=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Xae=de(Uae,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Zae=v.forwardRef(function(t,n){var r;const o=x4(),i=Ue({props:t,name:"MuiPopper"}),{anchorEl:a,component:l,components:s,componentsProps:u,container:c,disablePortal:d,keepMounted:f,modifiers:m,open:p,placement:h,popperOptions:y,popperRef:b,transition:g,slots:x,slotProps:w}=i,P=ue(i,Yae),C=(r=x==null?void 0:x.root)!=null?r:s==null?void 0:s.Root,E=I({anchorEl:a,container:c,disablePortal:d,keepMounted:f,modifiers:m,open:p,placement:h,popperOptions:y,popperRef:b,transition:g},P);return N.jsx(Xae,I({as:l,direction:o==null?void 0:o.direction,slots:{root:C},slotProps:w??u},E,{ref:n}))}),Eu=Zae;function Jae(e){return Be("MuiTooltip",e)}const ele=He("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Ll=ele,tle=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function nle(e){return Math.round(e*1e5)/1e5}const rle=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${pe(i.split("-")[0])}`],arrow:["arrow"]};return Ie(a,Jae,t)},ole=de(Eu,{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]}})(({theme:e,ownerState:t,open:n})=>I({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Ll.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ll.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ll.arrow}`]:I({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Ll.arrow}`]:I({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),ile=de("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${pe(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>I({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:rt(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},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${nle(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Ll.popper}[data-popper-placement*="left"] &`]:I({transformOrigin:"right center"},t.isRtl?I({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):I({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Ll.popper}[data-popper-placement*="right"] &`]:I({transformOrigin:"left center"},t.isRtl?I({marginRight:"14px"},t.touch&&{marginRight:"24px"}):I({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Ll.popper}[data-popper-placement*="top"] &`]:I({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Ll.popper}[data-popper-placement*="bottom"] &`]:I({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),ale=de("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:rt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let gh=!1;const UM=new kE;let Zd={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const lle=v.forwardRef(function(t,n){var r,o,i,a,l,s,u,c,d,f,m,p,h,y,b,g,x,w,P;const C=Ue({props:t,name:"MuiTooltip"}),{arrow:E=!1,children:S,components:M={},componentsProps:O={},describeChild:R=!1,disableFocusListener:_=!1,disableHoverListener:D=!1,disableInteractive:T=!1,disableTouchListener:F=!1,enterDelay:j=100,enterNextDelay:$=0,enterTouchDelay:L=700,followCursor:z=!1,id:B,leaveDelay:A=0,leaveTouchDelay:H=1500,onClose:q,onOpen:U,open:G,placement:Y="bottom",PopperComponent:re,PopperProps:le={},slotProps:J={},slots:oe={},title:ce,TransitionComponent:ve=uv,TransitionProps:me}=C,ke=ue(C,tle),be=v.isValidElement(S)?S:N.jsx("span",{children:S}),ie=Rr(),ye=Zy(),[V,Q]=v.useState(),[Z,ae]=v.useState(null),te=v.useRef(!1),K=T||z,ee=js(),se=js(),Ce=js(),_e=js(),[$e,X]=Ql({controlled:G,default:!1,name:"Tooltip",state:"open"});let Ee=$e;const De=_t(B),Te=v.useRef(),Pe=Jt(()=>{Te.current!==void 0&&(document.body.style.WebkitUserSelect=Te.current,Te.current=void 0),_e.clear()});v.useEffect(()=>Pe,[Pe]);const Re=Ve=>{UM.clear(),gh=!0,X(!0),U&&!Ee&&U(Ve)},Ge=Jt(Ve=>{UM.start(800+A,()=>{gh=!1}),X(!1),q&&Ee&&q(Ve),ee.start(ie.transitions.duration.shortest,()=>{te.current=!1})}),at=Ve=>{te.current&&Ve.type!=="touchstart"||(V&&V.removeAttribute("title"),se.clear(),Ce.clear(),j||gh&&$?se.start(gh?$:j,()=>{Re(Ve)}):Re(Ve))},It=Ve=>{se.clear(),Ce.start(A,()=>{Ge(Ve)})},{isFocusVisibleRef:Gt,onBlur:ot,onFocus:Pn,ref:tn}=Xy(),[,Tr]=v.useState(!1),St=Ve=>{ot(Ve),Gt.current===!1&&(Tr(!1),It(Ve))},ut=Ve=>{V||Q(Ve.currentTarget),Pn(Ve),Gt.current===!0&&(Tr(!0),at(Ve))},Et=Ve=>{te.current=!0;const gt=be.props;gt.onTouchStart&>.onTouchStart(Ve)},Qr=Ve=>{Et(Ve),Ce.clear(),ee.clear(),Pe(),Te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",_e.start(L,()=>{document.body.style.WebkitUserSelect=Te.current,at(Ve)})},ni=Ve=>{be.props.onTouchEnd&&be.props.onTouchEnd(Ve),Pe(),Ce.start(H,()=>{Ge(Ve)})};v.useEffect(()=>{if(!Ee)return;function Ve(gt){(gt.key==="Escape"||gt.key==="Esc")&&Ge(gt)}return document.addEventListener("keydown",Ve),()=>{document.removeEventListener("keydown",Ve)}},[Ge,Ee]);const ha=vt(be.ref,tn,Q,n);!ce&&ce!==0&&(Ee=!1);const Yr=v.useRef(),an=Ve=>{const gt=be.props;gt.onMouseMove&>.onMouseMove(Ve),Zd={x:Ve.clientX,y:Ve.clientY},Yr.current&&Yr.current.update()},Dt={},kn=typeof ce=="string";R?(Dt.title=!Ee&&kn&&!D?ce:null,Dt["aria-describedby"]=Ee?De:null):(Dt["aria-label"]=kn?ce:null,Dt["aria-labelledby"]=Ee&&!kn?De:null);const or=I({},Dt,ke,be.props,{className:he(ke.className,be.props.className),onTouchStart:Et,ref:ha},z?{onMouseMove:an}:{}),vo={};F||(or.onTouchStart=Qr,or.onTouchEnd=ni),D||(or.onMouseOver=vh(at,or.onMouseOver),or.onMouseLeave=vh(It,or.onMouseLeave),K||(vo.onMouseOver=at,vo.onMouseLeave=It)),_||(or.onFocus=vh(ut,or.onFocus),or.onBlur=vh(St,or.onBlur),K||(vo.onFocus=ut,vo.onBlur=St));const pl=v.useMemo(()=>{var Ve;let gt=[{name:"arrow",enabled:!!Z,options:{element:Z,padding:4}}];return(Ve=le.popperOptions)!=null&&Ve.modifiers&&(gt=gt.concat(le.popperOptions.modifiers)),I({},le.popperOptions,{modifiers:gt})},[Z,le]),ri=I({},C,{isRtl:ye,arrow:E,disableInteractive:K,placement:Y,PopperComponentProp:re,touch:te.current}),Pi=rle(ri),yo=(r=(o=oe.popper)!=null?o:M.Popper)!=null?r:ole,Xr=(i=(a=(l=oe.transition)!=null?l:M.Transition)!=null?a:ve)!=null?i:uv,ga=(s=(u=oe.tooltip)!=null?u:M.Tooltip)!=null?s:ile,xe=(c=(d=oe.arrow)!=null?d:M.Arrow)!=null?c:ale,ge=gc(yo,I({},le,(f=J.popper)!=null?f:O.popper,{className:he(Pi.popper,le==null?void 0:le.className,(m=(p=J.popper)!=null?p:O.popper)==null?void 0:m.className)}),ri),je=gc(Xr,I({},me,(h=J.transition)!=null?h:O.transition),ri),Fe=gc(ga,I({},(y=J.tooltip)!=null?y:O.tooltip,{className:he(Pi.tooltip,(b=(g=J.tooltip)!=null?g:O.tooltip)==null?void 0:b.className)}),ri),Ze=gc(xe,I({},(x=J.arrow)!=null?x:O.arrow,{className:he(Pi.arrow,(w=(P=J.arrow)!=null?P:O.arrow)==null?void 0:w.className)}),ri);return N.jsxs(v.Fragment,{children:[v.cloneElement(be,or),N.jsx(yo,I({as:re??Eu,placement:Y,anchorEl:z?{getBoundingClientRect:()=>({top:Zd.y,left:Zd.x,right:Zd.x,bottom:Zd.y,width:0,height:0})}:V,popperRef:Yr,open:V?Ee:!1,id:De,transition:!0},vo,ge,{popperOptions:pl,children:({TransitionProps:Ve})=>N.jsx(Xr,I({timeout:ie.transitions.duration.shorter},Ve,je,{children:N.jsxs(ga,I({},Fe,{children:[ce,E?N.jsx(xe,I({},Ze,{ref:ae})):null]}))}))}))]})}),kr=lle;function sle(e){return Be("MuiButton",e)}const ule=He("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"]),yh=ule,cle=v.createContext({}),C4=cle,dle=v.createContext(void 0),fle=dle,ple=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],mle=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,l={root:["root",i,`${i}${pe(t)}`,`size${pe(o)}`,`${i}Size${pe(o)}`,`color${pe(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${pe(o)}`],endIcon:["icon","endIcon",`iconSize${pe(o)}`]},s=Ie(l,sle,a);return I({},a,s)},S4=e=>I({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),hle=de(Zi,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${pe(n.color)}`],t[`size${pe(n.size)}`],t[`${n.variant}Size${pe(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return I({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":I({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":I({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${yh.focusVisible}`]:I({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${yh.disabled}`]:I({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${rt(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${yh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${yh.disabled}`]:{boxShadow:"none"}}),gle=de("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${pe(n.size)}`]]}})(({ownerState:e})=>I({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},S4(e))),vle=de("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${pe(n.size)}`]]}})(({ownerState:e})=>I({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},S4(e))),yle=v.forwardRef(function(t,n){const r=v.useContext(C4),o=v.useContext(fle),i=rm(r,t),a=Ue({props:i,name:"MuiButton"}),{children:l,color:s="primary",component:u="button",className:c,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:m=!1,endIcon:p,focusVisibleClassName:h,fullWidth:y=!1,size:b="medium",startIcon:g,type:x,variant:w="text"}=a,P=ue(a,ple),C=I({},a,{color:s,component:u,disabled:d,disableElevation:f,disableFocusRipple:m,fullWidth:y,size:b,type:x,variant:w}),E=mle(C),S=g&&N.jsx(gle,{className:E.startIcon,ownerState:C,children:g}),M=p&&N.jsx(vle,{className:E.endIcon,ownerState:C,children:p}),O=o||"";return N.jsxs(hle,I({ownerState:C,className:he(r.className,E.root,c,O),component:u,disabled:d,focusRipple:!m,focusVisibleClassName:he(E.focusVisible,h),ref:n,type:x},P,{classes:E,children:[S,l,M]}))}),jt=yle;function ble(e){return Be("MuiIconButton",e)}const xle=He("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),wle=xle,Cle=["edge","children","className","color","disabled","disableFocusRipple","size"],Sle=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${pe(r)}`,o&&`edge${pe(o)}`,`size${pe(i)}`]};return Ie(a,ble,t)},Ele=de(Zi,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${pe(n.color)}`],n.edge&&t[`edge${pe(n.edge)}`],t[`size${pe(n.size)}`]]}})(({theme:e,ownerState:t})=>I({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return I({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&I({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":I({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${wle.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),Ple=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:l="default",disabled:s=!1,disableFocusRipple:u=!1,size:c="medium"}=r,d=ue(r,Cle),f=I({},r,{edge:o,color:l,disabled:s,disableFocusRipple:u,size:c}),m=Sle(f);return N.jsx(Ele,I({className:he(m.root,a),centerRipple:!0,focusRipple:!u,disabled:s,ref:n},d,{ownerState:f,children:i}))}),Nn=Ple;var UE={},c1={};const kle=Go(Wne);var WM;function $t(){return WM||(WM=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=kle}(c1)),c1}var $le=wt;Object.defineProperty(UE,"__esModule",{value:!0});var Qa=UE.default=void 0,Ile=$le($t()),Ole=N;Qa=UE.default=(0,Ile.default)((0,Ole.jsx)("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"ListOutlined");var WE={},Mle=wt;Object.defineProperty(WE,"__esModule",{value:!0});var r0=WE.default=void 0,Rle=Mle($t()),Tle=N;r0=WE.default=(0,Rle.default)((0,Tle.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");var GE={},_le=wt;Object.defineProperty(GE,"__esModule",{value:!0});var o0=GE.default=void 0,Fle=_le($t()),Ale=N;o0=GE.default=(0,Fle.default)((0,Ale.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");var qE={},Lle=wt;Object.defineProperty(qE,"__esModule",{value:!0});var i0=qE.default=void 0,Dle=Lle($t()),Nle=N;i0=qE.default=(0,Dle.default)((0,Nle.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var KE={},jle=wt;Object.defineProperty(KE,"__esModule",{value:!0});var a0=KE.default=void 0,zle=jle($t()),Ble=N;a0=KE.default=(0,zle.default)((0,Ble.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var QE={},Hle=wt;Object.defineProperty(QE,"__esModule",{value:!0});var E4=QE.default=void 0,Vle=Hle($t()),Ule=N;E4=QE.default=(0,Vle.default)((0,Ule.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");var YE={},Wle=wt;Object.defineProperty(YE,"__esModule",{value:!0});var XE=YE.default=void 0,Gle=Wle($t()),qle=N;XE=YE.default=(0,Gle.default)((0,qle.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"}),"MenuRounded");var ZE={},Kle=wt;Object.defineProperty(ZE,"__esModule",{value:!0});var l0=ZE.default=void 0,Qle=Kle($t()),Yle=N;l0=ZE.default=(0,Qle.default)((0,Yle.jsx)("path",{d:"M3 13h8V3H3zm0 8h8v-6H3zm10 0h8V11h-8zm0-18v6h8V3z"}),"Dashboard");function Xle(e){return Be("MuiAppBar",e)}He("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Zle=["className","color","enableColorOnDark","position"],Jle=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${pe(t)}`,`position${pe(n)}`]};return Ie(o,Xle,r)},bh=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,ese=de(Jo,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${pe(n.position)}`],t[`color${pe(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return I({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&I({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&I({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&I({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:bh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:bh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:bh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:bh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),tse=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:l="fixed"}=r,s=ue(r,Zle),u=I({},r,{color:i,position:l,enableColorOnDark:a}),c=Jle(u);return N.jsx(ese,I({square:!0,component:"header",ownerState:u,elevation:4,className:he(c.root,o,l==="fixed"&&"mui-fixed"),ref:n},s))}),s0=tse,nse=Pte({createStyledComponent:de("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Ue({props:e,name:"MuiStack"})}),dr=nse;function rse(e){return Be("MuiToolbar",e)}He("MuiToolbar",["root","gutters","regular","dense"]);const ose=["className","component","disableGutters","variant"],ise=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Ie({root:["root",!n&&"gutters",r]},rse,t)},ase=de("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>I({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),lse=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:l="regular"}=r,s=ue(r,ose),u=I({},r,{component:i,disableGutters:a,variant:l}),c=ise(u);return N.jsx(ase,I({as:i,className:he(c.root,o),ref:n,ownerState:u},s))}),sm=lse;function JE(e){return Ue}const sse=tt(N.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"}),"Person");function use(e){return Be("MuiAvatar",e)}He("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const cse=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],dse=["component","slots","slotProps"],fse=["component"];function pse(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:l}=t,s=ue(t,cse),{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0}}=i,f=ue(i,dse),m=c[e]||r,p=JN(d[e],o),h=e4(I({className:n},s,{externalForwardedProps:e==="root"?f:void 0,externalSlotProps:p})),{props:{component:y},internalRef:b}=h,g=ue(h.props,fse),x=vt(b,p==null?void 0:p.ref,t.ref),w=a?a(g):{},P=I({},o,w),C=e==="root"?y||u:y,E=gc(m,I({},e==="root"&&!u&&!c[e]&&l,e!=="root"&&!c[e]&&l,g,C&&{as:C},{ref:x}),P);return Object.keys(w).forEach(S=>{delete E[S]}),[m,E]}const mse=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],hse=JE(),gse=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ie({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},use,t)},vse=de("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({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:I({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:I({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),yse=de("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),bse=de(sse,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function xse({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=v.useState(!1);return v.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const l=new Image;return l.onload=()=>{a&&i("loaded")},l.onerror=()=>{a&&i("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const wse=v.forwardRef(function(t,n){const r=hse({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:l="div",slots:s={},slotProps:u={},imgProps:c,sizes:d,src:f,srcSet:m,variant:p="circular"}=r,h=ue(r,mse);let y=null;const b=xse(I({},c,{src:f,srcSet:m})),g=f||m,x=g&&b!=="error",w=I({},r,{colorDefault:!x,component:l,variant:p}),P=gse(w),[C,E]=pse("img",{className:P.img,elementType:yse,externalForwardedProps:{slots:s,slotProps:{img:I({},c,u.img)}},additionalProps:{alt:o,src:f,srcSet:m,sizes:d},ownerState:w});return x?y=N.jsx(C,I({},E)):i||i===0?y=i:g&&o?y=o[0]:y=N.jsx(bse,{ownerState:w,className:P.fallback}),N.jsx(vse,I({as:l,ownerState:w,className:he(P.root,a),ref:n},h,{children:y}))}),u0=wse;var eP={},Cse=wt;Object.defineProperty(eP,"__esModule",{value:!0});var tP=eP.default=void 0,Sse=Cse($t()),Ese=N;tP=eP.default=(0,Sse.default)((0,Ese.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function Pse(e){return Be("MuiLink",e)}const kse=He("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),$se=kse,P4={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ise=e=>P4[e]||e,Ose=({theme:e,ownerState:t})=>{const n=Ise(t.color),r=Zc(e,`palette.${n}`,!1)||t.color,o=Zc(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:rt(r,.4)},Mse=Ose,Rse=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Tse=e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${pe(o)}`,n==="button"&&"button",r&&"focusVisible"]};return Ie(i,Pse,t)},_se=de(Xe,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${pe(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>I({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&I({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:Mse({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${$se.focusVisible}`]:{outline:"auto"}})),Fse=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiLink"}),{className:o,color:i="primary",component:a="a",onBlur:l,onFocus:s,TypographyClasses:u,underline:c="always",variant:d="inherit",sx:f}=r,m=ue(r,Rse),{isFocusVisibleRef:p,onBlur:h,onFocus:y,ref:b}=Xy(),[g,x]=v.useState(!1),w=vt(n,b),P=M=>{h(M),p.current===!1&&x(!1),l&&l(M)},C=M=>{y(M),p.current===!0&&x(!0),s&&s(M)},E=I({},r,{color:i,component:a,focusVisible:g,underline:c,variant:d}),S=Tse(E);return N.jsx(_se,I({color:i,className:he(S.root,o),classes:u,component:a,onBlur:P,onFocus:C,ref:w,ownerState:E,variant:d,sx:[...Object.keys(P4).includes(i)?[]:[{color:i}],...Array.isArray(f)?f:[f]]},m))}),Ur=Fse,k4=v.createContext(void 0);function dt(){const e=v.useContext(k4);if(e===void 0)throw new Error(["MUI: 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 $4=v.createContext(void 0),We=()=>{const e=v.useContext($4);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},I4=v.createContext(void 0);function hs(){const e=v.useContext(I4);if(e===void 0)throw new Error(["MUI: 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 GM={};function nP(e,t){const n=v.useRef(GM);return n.current===GM&&(n.current=e(t)),n}const Ase=[];function O4(e){v.useEffect(e,Ase)}const ua=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join(` `):e;return()=>{n||(n=!0,t==="error"?console.error(r):console.warn(r))}},Lse=Object.is;function M4(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,!Lse(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}ua(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);function Dse(e){return e.acceptsApiRef}function qM(e,t){return Dse(t)?t(e):t(e.current.state)}const Nse=Object.is,rP=M4,jse=()=>({state:null,equals:null,selector:null}),Ne=(e,t,n=Nse)=>{const r=nP(jse),o=r.current.selector!==null,[i,a]=v.useState(o?null:qM(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,O4(()=>e.current.store.subscribe(()=>{const l=qM(e,r.current.selector);r.current.equals(r.current.state,l)||(r.current.state=l,a(l))})),i};function ft(e){return Be("MuiDataGrid",e)}const ne=He("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]);var dv="NOT_FOUND";function zse(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:dv},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function Bse(e,t){var n=[];function r(l){var s=n.findIndex(function(c){return t(l,c.key)});if(s>-1){var u=n[s];return s>0&&(n.splice(s,1),n.unshift(u)),u.value}return dv}function o(l,s){r(l)===dv&&(n.unshift({key:l,value:s}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var Hse=function(t,n){return t===n};function Vse(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;r{if(a.length>0)throw new Error("Unsupported number of selectors");let l;if(e&&t&&n&&r&&o&&i)l=(s,u)=>{const c=Zu(s),d=u??(c?s.current.instanceId:Ju),f=c?s.current.state:s,m=e(f,d),p=t(f,d),h=n(f,d),y=r(f,d),b=o(f,d);return i(m,p,h,y,b)};else if(e&&t&&n&&r&&o)l=(s,u)=>{const c=Zu(s),d=u??(c?s.current.instanceId:Ju),f=c?s.current.state:s,m=e(f,d),p=t(f,d),h=n(f,d),y=r(f,d);return o(m,p,h,y)};else if(e&&t&&n&&r)l=(s,u)=>{const c=Zu(s),d=u??(c?s.current.instanceId:Ju),f=c?s.current.state:s,m=e(f,d),p=t(f,d),h=n(f,d);return r(m,p,h)};else if(e&&t&&n)l=(s,u)=>{const c=Zu(s),d=u??(c?s.current.instanceId:Ju),f=c?s.current.state:s,m=e(f,d),p=t(f,d);return n(m,p)};else if(e&&t)l=(s,u)=>{const c=Zu(s),d=u??(c?s.current.instanceId:Ju),f=c?s.current.state:s,m=e(f,d);return t(m)};else throw new Error("Missing arguments");return l.acceptsApiRef=!0,l},en=(...e)=>{const t=(...n)=>{var r,o;const[i,a]=n,l=Zu(i),s=l?i.current.instanceId:a??Ju,u=l?i.current.state:i,{cache:c}=qse;if(c.get(s)&&(r=c.get(s))!=null&&r.get(e)){var d;return(d=c.get(s))==null?void 0:d.get(e)(u,s)}const f=Gse(...e);return c.get(s)||c.set(s,new Map),(o=c.get(s))==null||o.set(e,f),f(u,s)};return t.acceptsApiRef=!0,t},Ks=e=>e.columns,Na=nt(Ks,e=>e.orderedFields),Ed=nt(Ks,e=>e.lookup),qi=en(Na,Ed,(e,t)=>e.map(n=>t[n])),mi=nt(Ks,e=>e.columnVisibilityModel),tr=en(qi,mi,(e,t)=>e.filter(n=>t[n.field]!==!1)),d0=en(tr,e=>e.map(t=>t.field)),od=en(tr,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),R4=en(qi,e=>e.filter(t=>t.filterable)),Kse=en(qi,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),f0=e=>e.columnGrouping,Qse=en(f0,e=>{var t;return(t=e==null?void 0:e.unwrappedGroupingModel)!=null?t:{}}),T4=en(f0,e=>{var t;return(t=e==null?void 0:e.lookup)!=null?t:{}}),Yse=en(f0,e=>{var t;return(t=e==null?void 0:e.headerStructure)!=null?t:[]}),um=nt(f0,e=>{var t;return(t=e==null?void 0:e.maxDepth)!=null?t:0}),Ci=e=>e.rows,p0=nt(Ci,e=>e.totalRowCount),Xse=nt(Ci,e=>e.loading),Zse=nt(Ci,e=>e.totalTopLevelRowCount),Ta=nt(Ci,e=>e.dataRowIdToModelLookup),fv=nt(Ci,e=>e.dataRowIdToIdLookup),di=nt(Ci,e=>e.tree),Jse=nt(Ci,e=>e.groupingName),KM=nt(Ci,e=>e.treeDepths),m0=en(Ci,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]+1}),yf=nt(Ci,e=>e.dataRowIds),eue=nt(Ci,e=>e==null?void 0:e.additionalRowGroups),Pd=en(eue,e=>{var t,n;const r=e==null?void 0:e.pinnedRows;return{bottom:r==null||(t=r.bottom)==null?void 0:t.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}}),top:r==null||(n=r.top)==null?void 0:n.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}})}}),tue=nt(Pd,e=>{var t,n;return((e==null||(t=e.top)==null?void 0:t.length)||0)+((e==null||(n=e.bottom)==null?void 0:n.length)||0)}),_4=()=>{var e;const t=hs(),n=We(),r=Ne(t,tr),o=Ne(t,p0),i=Ne(t,um),a=Ne(t,tue);let l="grid";return(e=n.experimentalFeatures)!=null&&e.ariaV7&&n.treeData&&(l="treegrid"),{role:l,"aria-colcount":r.length,"aria-rowcount":i+1+a+o,"aria-multiselectable":!n.disableMultipleRowSelection}},nue=e=>{const{classes:t}=e;return Ie({root:["main"]},ft,t)},rue=zn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})(()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})),oue=v.forwardRef((e,t)=>{var n;const r=We(),o=nue(r),i=(n=r.experimentalFeatures)!=null&&n.ariaV7?_4:null,a=typeof i=="function"?i():null;return N.jsx(rue,I({ref:t,className:o.root,ownerState:r},a,{children:e.children}))}),F4=e=>e.sorting,iP=nt(F4,e=>e.sortedRows),aP=en(iP,Ta,(e,t)=>e.map(n=>{var r;return{id:n,model:(r=t[n])!=null?r:{}}})),Eo=nt(F4,e=>e.sortModel),iue=en(Eo,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),lP=e=>e.filter,Xn=nt(lP,e=>e.filterModel);nt(Xn,e=>e.quickFilterValues);const aue=e=>e.visibleRowsLookup,A4=nt(lP,e=>e.filteredRowsLookup);nt(lP,e=>e.filteredDescendantCountLookup);const gs=en(aue,aP,(e,t)=>t.filter(n=>e[n.id]!==!1)),Wf=en(gs,e=>e.map(t=>t.id)),lue=en(A4,aP,(e,t)=>t.filter(n=>e[n.id]!==!1)),sue=en(lue,e=>e.map(t=>t.id)),L4=en(gs,di,m0,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),D4=nt(gs,e=>e.length),h0=nt(L4,e=>e.length),uue=en(Xn,Ed,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var o,i;if(!r.field)return!1;const a=t[r.field];if(!(a!=null&&a.filterOperators)||(a==null||(o=a.filterOperators)==null?void 0:o.length)===0)return!1;const l=a.filterOperators.find(s=>s.value===r.operator);return l?!l.InputComponent||r.value!=null&&((i=r.value)==null?void 0:i.toString())!=="":!1})}),cue=en(uue,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),g0=e=>e.focus,to=nt(g0,e=>e.cell),due=nt(g0,e=>e.columnHeader);nt(g0,e=>e.columnHeaderFilter);const pv=nt(g0,e=>e.columnGroupHeader),v0=e=>e.tabIndex,mv=nt(v0,e=>e.cell),N4=nt(v0,e=>e.columnHeader);nt(v0,e=>e.columnHeaderFilter);const fue=nt(v0,e=>e.columnGroupHeader),sP=e=>e.density,pue=nt(sP,e=>e.value),kd=nt(sP,e=>e.factor),Uw=e=>e.columnMenu;function mue(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:n,children:r}=e,o=hs(),i=We(),a=v.useRef(null),l=Ne(o,tr),s=Ne(o,cue),u=Ne(o,iue),c=Ne(o,od),d=Ne(o,N4),f=Ne(o,mv),m=Ne(o,fue),p=Ne(o,due),h=Ne(o,pv),y=Ne(o,kd),b=Ne(o,um),g=Ne(o,Uw),x=Ne(o,mi),w=Ne(o,Yse),P=!(m===null&&d===null&&f===null);Rt(()=>{o.current.computeSizeAndPublishResizeEvent();const O=a.current;if(typeof ResizeObserver>"u")return()=>{};let R;const _=new ResizeObserver(()=>{R=requestAnimationFrame(()=>{o.current.computeSizeAndPublishResizeEvent()})});return O&&_.observe(O),()=>{R&&window.cancelAnimationFrame(R),O&&_.unobserve(O)}},[o]);const C=v.useRef(null),E=v.useRef(null),S=v.useRef(null);o.current.register("private",{columnHeadersContainerElementRef:E,columnHeadersElementRef:C,virtualScrollerRef:S,mainElementRef:a});const M=!!o.current.getRootDimensions();return N.jsxs(oue,{ref:a,children:[N.jsx(i.slots.columnHeaders,I({ref:E,innerRef:C,visibleColumns:l,filterColumnLookup:s,sortColumnLookup:u,columnPositions:c,columnHeaderTabIndexState:d,columnGroupHeaderTabIndexState:m,columnHeaderFocus:p,columnGroupHeaderFocus:h,densityFactor:y,headerGroupingMaxDepth:b,columnMenuState:g,columnVisibility:x,columnGroupsHeaderStructure:w,hasOtherElementInTabSequence:P},n)),M&&N.jsx(t,{ref:S}),r]})}function hue(){var e;const t=We();return t.hideFooter?null:N.jsx(t.slots.footer,I({},(e=t.slotProps)==null?void 0:e.footer))}const Pr="auto-generated-group-node-root",Mc=Symbol("mui.id_autogenerated"),gue=()=>({type:"group",id:Pr,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function vue(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI: 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 hv=(e,t,n)=>{const r=t?t(e):e.id;return vue(r,e,n),r},ug=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let l=0;l{const n=e[Pr];return Math.max(t,n.children.length+(n.footerId==null?0:1))},z4=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o})=>{const i=e.current.caches.rows,{tree:a,treeDepths:l,dataRowIds:s,groupingName:u}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:i.updates,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIdToModelLookup:i.dataRowIdToModelLookup}),c=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:a,treeDepths:l,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIds:s,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},I({},c,{totalRowCount:Math.max(t,c.dataRowIds.length),totalTopLevelRowCount:j4({tree:c.tree,rowCountProp:t}),groupingName:u,loading:n})},Pp=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,uP=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{var r,o,i;if(e.updates.type==="full")throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const a=new Map;n.forEach(f=>{const m=hv(f,t,"A row was provided without id when calling updateRows():");a.has(m)?a.set(m,I({},a.get(m),f)):a.set(m,f)});const l={type:"partial",actions:{insert:[...(r=e.updates.actions.insert)!=null?r:[]],modify:[...(o=e.updates.actions.modify)!=null?o:[]],remove:[...(i=e.updates.actions.remove)!=null?i:[]]},idToActionLookup:I({},e.updates.idToActionLookup)},s=I({},e.dataRowIdToModelLookup),u=I({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};a.forEach((f,m)=>{const p=l.idToActionLookup[m];if(f._action==="delete"){if(p==="remove"||!s[m])return;p!=null&&(c[p][m]=!0),l.actions.remove.push(m),delete s[m],delete u[m];return}const h=s[m];if(h){p==="remove"?(c.remove[m]=!0,l.actions.modify.push(m)):p==null&&l.actions.modify.push(m),s[m]=I({},h,f);return}p==="remove"?(c.remove[m]=!0,l.actions.insert.push(m)):p==null&&l.actions.insert.push(m),s[m]=f,u[m]=m});const d=Object.keys(c);for(let f=0;f0&&(l.actions[m]=l.actions[m].filter(h=>!p[h]))}return{dataRowIdToModelLookup:s,dataRowIdToIdLookup:u,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function B4(e){var t,n;const r=Pd(e),o=(r==null||(t=r.top)==null?void 0:t.reduce((a,l)=>(a+=e.current.unstable_getRowHeight(l.id),a),0))||0,i=(r==null||(n=r.bottom)==null?void 0:n.reduce((a,l)=>(a+=e.current.unstable_getRowHeight(l.id),a),0))||0;return{top:o,bottom:i}}function H4(e,t){const n=kd(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*n)}px)`}const bue=zn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4})),xue=zn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),wue=e=>{const{classes:t}=e;return Ie({root:["overlayWrapper"],inner:["overlayWrapperInner"]},ft,t)};function Cue(e){var t,n;const r=dt(),o=We(),[i,a]=v.useState(()=>{var c,d;return(c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null}),l=v.useCallback(()=>{var c,d;a((c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null)},[r]);Rt(()=>r.current.subscribeEvent("viewportInnerSizeChange",l),[r,l]);let s=(t=i==null?void 0:i.height)!=null?t:0;o.autoHeight&&s===0&&(s=H4(r,o.rowHeight));const u=wue(I({},e,{classes:o.classes}));return i?N.jsx(bue,{className:he(u.root),overlayType:e.overlayType,children:N.jsx(xue,I({className:he(u.inner),style:{height:s,width:(n=i==null?void 0:i.width)!=null?n:0}},e))}):null}function Sue(){const e=dt(),t=We(),n=Ne(e,p0),r=Ne(e,D4),o=Ne(e,Xse),i=!o&&n===0,a=!o&&n>0&&r===0;let l=null,s="";if(i){var u;l=N.jsx(t.slots.noRowsOverlay,I({},(u=t.slotProps)==null?void 0:u.noRowsOverlay)),s="noRowsOverlay"}if(a){var c;l=N.jsx(t.slots.noResultsOverlay,I({},(c=t.slotProps)==null?void 0:c.noResultsOverlay)),s="noResultsOverlay"}if(o){var d;l=N.jsx(t.slots.loadingOverlay,I({},(d=t.slotProps)==null?void 0:d.loadingOverlay)),s="loadingOverlay"}return l===null?null:N.jsx(Cue,{overlayType:s,children:l})}function y0(e){return v.memo(e,M4)}let d1;function Eue(){return d1===void 0&&document.createElement("div").focus({get preventScroll(){return d1=!0,!1}}),d1}var ea=function(e){return e.Cell="cell",e.Row="row",e}(ea||{}),Tt=function(e){return e.Edit="edit",e.View="view",e}(Tt||{}),Vt=function(e){return e.Edit="edit",e.View="view",e}(Vt||{}),er=function(e){return e.And="and",e.Or="or",e}(er||{}),Ea=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Ea||{}),li=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(li||{}),bl=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(bl||{}),Pa=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Pa||{});function V4(e){return e.field!==void 0}function Pue(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function kue(e,t){return e.closest(`.${t}`)}function cP(e){return e.replace(/["\\]/g,"\\$&")}function $ue(e,t){return e.querySelector(`[role="columnheader"][data-field="${cP(t)}"]`)}function U4(e){return`.${ne.row}[data-id="${cP(String(e))}"]`}function Iue(e,t){return e.querySelector(U4(t))}function Oue(e,{id:t,field:n}){const r=U4(t),o=`.${ne.cell}[data-field="${cP(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function cm(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function it(e,t,n){const r=v.useRef(!0);v.useEffect(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}class vc extends Error{}function Mue(e,t){const{getRowId:n}=t,r=v.useCallback(p=>({field:p,colDef:e.current.getColumn(p)}),[e]),o=v.useCallback(p=>{const h=e.current.getRow(p);if(!h)throw new vc(`No row with id #${p} found`);return{id:p,columns:e.current.getAllColumns(),row:h}},[e]),i=v.useCallback((p,h)=>{const y=e.current.getRow(p),b=e.current.getRowNode(p);if(!y||!b)throw new vc(`No row with id #${p} found`);const g=to(e),x=mv(e);return{id:p,field:h,row:y,rowNode:b,value:y[h],colDef:e.current.getColumn(h),cellMode:e.current.getCellMode(p,h),api:e.current,hasFocus:g!==null&&g.field===h&&g.id===p,tabIndex:x&&x.field===h&&x.id===p?0:-1}},[e]),a=v.useCallback((p,h)=>{const y=e.current.getColumn(h),b=e.current.getCellValue(p,h),g=e.current.getRow(p),x=e.current.getRowNode(p);if(!g||!x)throw new vc(`No row with id #${p} found`);const w=to(e),P=mv(e),C={id:p,field:h,row:g,rowNode:x,colDef:y,cellMode:e.current.getCellMode(p,h),hasFocus:w!==null&&w.field===h&&w.id===p,tabIndex:P&&P.field===h&&P.id===p?0:-1,value:b,formattedValue:b,isEditable:!1};return y&&y.valueFormatter&&(C.formattedValue=y.valueFormatter({id:p,field:C.field,value:C.value,api:e.current})),C.isEditable=y&&e.current.isCellEditable(C),C},[e]),l=v.useCallback((p,h)=>{const y=e.current.getColumn(h);if(!y||!y.valueGetter){const b=e.current.getRow(p);if(!b)throw new vc(`No row with id #${p} found`);return b[h]}return y.valueGetter(i(p,h))},[e,i]),s=v.useCallback((p,h)=>{var y;const b=Mc in p?p[Mc]:(y=n==null?void 0:n(p))!=null?y:p.id,g=h.field;return!h||!h.valueGetter?p[g]:h.valueGetter(i(b,g))},[i,n]),u=v.useCallback((p,h)=>{var y;const b=s(p,h);if(!h||!h.valueFormatter)return b;const g=(y=n?n(p):p.id)!=null?y:p[Mc],x=h.field;return h.valueFormatter({id:g,field:x,value:b,api:e.current})},[e,n,s]),c=v.useCallback(p=>e.current.rootElementRef.current?$ue(e.current.rootElementRef.current,p):null,[e]),d=v.useCallback(p=>e.current.rootElementRef.current?Iue(e.current.rootElementRef.current,p):null,[e]),f=v.useCallback((p,h)=>e.current.rootElementRef.current?Oue(e.current.rootElementRef.current,{id:p,field:h}):null,[e]);it(e,{getCellValue:l,getCellParams:a,getCellElement:f,getRowValue:s,getRowFormattedValue:u,getRowParams:o,getRowElement:d,getColumnHeaderParams:r,getColumnHeaderElement:c},"public")}const Rue=["changeReason","unstable_updateValueOnRender"],Tue=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],_ue=["changeReason","unstable_updateValueOnRender"],gv={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Tt.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},Fue=e=>{const{align:t,showRightBorder:n,isEditable:r,isSelected:o,isSelectionMode:i,classes:a}=e,l={root:["cell",`cell--text${pe(t)}`,r&&"cell--editable",o&&"selected",n&&"cell--withRightBorder",i&&!r&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return Ie(l,ft,a)},Aue=v.forwardRef((e,t)=>{const{column:n,rowId:r,editCellState:o}=e,i=dt(),a=We(),l=n.field,s=Ne(i,()=>{try{const M=i.current.getCellParams(r,l);return M.api=i.current,M}catch(S){if(S instanceof vc)return gv;throw S}},rP),u=Ne(i,()=>i.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:r,field:l}));if(s===gv)return null;const{cellMode:c,hasFocus:d,isEditable:f,value:m,formattedValue:p}=s,h=n.type==="actions",y=(c==="view"||!f)&&!h?s.tabIndex:-1,{classes:b,getCellClassName:g}=a,x=i.current.unstable_applyPipeProcessors("cellClassName",[],{id:r,field:l});n.cellClassName&&x.push(typeof n.cellClassName=="function"?n.cellClassName(s):n.cellClassName),g&&x.push(g(s));let w;if(o==null&&n.renderCell&&(w=n.renderCell(s),x.push(ne["cell--withRenderer"]),x.push(b==null?void 0:b["cell--withRenderer"])),o!=null&&n.renderEditCell){const S=i.current.getRowWithUpdatedValues(r,n.field),M=ue(o,Rue),O=I({},s,{row:S},M);w=n.renderEditCell(O),x.push(ne["cell--editing"]),x.push(b==null?void 0:b["cell--editing"])}const{slots:P}=a,C=P.cell,E=I({},e,{ref:t,field:l,formattedValue:p,hasFocus:d,isEditable:f,isSelected:u,value:m,cellMode:c,children:w,tabIndex:y,className:he(x)});return v.createElement(C,E)}),Lue=y0(Aue),Due=v.forwardRef((e,t)=>{var n,r,o,i;const{column:a,rowId:l,editCellState:s,align:u,colIndex:c,height:d,width:f,className:m,showRightBorder:p,colSpan:h,disableDragEvents:y,isNotVisible:b,onClick:g,onDoubleClick:x,onMouseDown:w,onMouseUp:P,onMouseOver:C,onKeyDown:E,onKeyUp:S,onDragEnter:M,onDragOver:O,style:R}=e,_=ue(e,Tue),D=dt(),T=We(),F=a.field,j=Ne(D,()=>{try{const ee=D.current.getCellParams(l,F);return ee.api=D.current,ee}catch(K){if(K instanceof vc)return gv;throw K}},rP),$=Ne(D,()=>D.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:l,field:F})),{cellMode:L,hasFocus:z,isEditable:B,value:A,formattedValue:H}=j,q=a.type==="actions"&&((n=(r=a).getActions)==null?void 0:n.call(r,D.current.getRowParams(l)).some(K=>!K.props.disabled)),U=(L==="view"||!B)&&!q?j.tabIndex:-1,{classes:G,getCellClassName:Y}=T,re=D.current.unstable_applyPipeProcessors("cellClassName",[],{id:l,field:F});a.cellClassName&&re.push(typeof a.cellClassName=="function"?a.cellClassName(j):a.cellClassName),Y&&re.push(Y(j));const le=H??A,J=v.useRef(null),oe=vt(t,J),ce=v.useRef(null),ve=(o=T.unstable_cellSelection)!=null?o:!1,me={align:u,showRightBorder:p,isEditable:B,classes:T.classes,isSelected:$,isSelectionMode:ve},ke=Fue(me),be=v.useCallback(K=>ee=>{const se=D.current.getCellParams(l,F||"");D.current.publishEvent(K,se,ee),P&&P(ee)},[D,F,P,l]),ie=v.useCallback(K=>ee=>{const se=D.current.getCellParams(l,F||"");D.current.publishEvent(K,se,ee),w&&w(ee)},[D,F,w,l]),ye=v.useCallback((K,ee)=>se=>{if(!D.current.getRow(l))return;const Ce=D.current.getCellParams(l,F||"");D.current.publishEvent(K,Ce,se),ee&&ee(se)},[D,F,l]),V=v.useMemo(()=>I(b?{padding:0,opacity:0,width:0,border:0}:{minWidth:f,maxWidth:f,minHeight:d,maxHeight:d==="auto"?"none":d},R),[f,d,b,R]);if(v.useEffect(()=>{if(!z||L===Tt.Edit)return;const K=un(D.current.rootElementRef.current);if(J.current&&!J.current.contains(K.activeElement)){const ee=J.current.querySelector('[tabindex="0"]'),se=ce.current||ee||J.current;if(Eue())se.focus({preventScroll:!0});else{const Ce=D.current.getScrollPosition();se.focus(),D.current.scroll(Ce)}}},[z,L,D]),j===gv)return null;let Q=_.onFocus,Z;if(s==null&&a.renderCell&&(Z=a.renderCell(j),re.push(ne["cell--withRenderer"]),re.push(G==null?void 0:G["cell--withRenderer"])),s!=null&&a.renderEditCell){const K=D.current.getRowWithUpdatedValues(l,a.field),ee=ue(s,_ue),se=I({},j,{row:K},ee);Z=a.renderEditCell(se),re.push(ne["cell--editing"]),re.push(G==null?void 0:G["cell--editing"])}if(Z===void 0){const K=le==null?void 0:le.toString();Z=N.jsx("div",{className:ke.content,title:K,role:"presentation",children:K})}v.isValidElement(Z)&&q&&(Z=v.cloneElement(Z,{focusElementRef:ce}));const ae=y?null:{onDragEnter:ye("cellDragEnter",M),onDragOver:ye("cellDragOver",O)},te=(i=T.experimentalFeatures)==null?void 0:i.ariaV7;return N.jsx("div",I({ref:oe,className:he(m,re,ke.root),role:te?"gridcell":"cell","data-field":F,"data-colindex":c,"aria-colindex":c+1,"aria-colspan":h,style:V,tabIndex:U,onClick:ye("cellClick",g),onDoubleClick:ye("cellDoubleClick",x),onMouseOver:ye("cellMouseOver",C),onMouseDown:ie("cellMouseDown"),onMouseUp:be("cellMouseUp"),onKeyDown:ye("cellKeyDown",E),onKeyUp:ye("cellKeyUp",S)},ae,_,{onFocus:Q,children:Z}))}),Ww=y0(Due),Nue=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"],jue=e=>{const{classes:t}=e;return Ie({root:["booleanCell"]},ft,t)};function zue(e){const{value:t}=e,n=ue(e,Nue),r=dt(),o=We(),i={classes:o.classes},a=jue(i),l=v.useMemo(()=>t?o.slots.booleanCellTrueIcon:o.slots.booleanCellFalseIcon,[o.slots.booleanCellFalseIcon,o.slots.booleanCellTrueIcon,t]);return N.jsx(l,I({fontSize:"small",className:a.root,titleAccess:r.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},n))}const Bue=v.memo(zue),Hue=e=>Pp(e.rowNode)?"":N.jsx(Bue,I({},e)),Vue=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],Uue=e=>{const{classes:t}=e;return Ie({root:["editBooleanCell"]},ft,t)};function Wue(e){var t;const{id:n,value:r,field:o,className:i,hasFocus:a,onValueChange:l}=e,s=ue(e,Vue),u=dt(),c=v.useRef(null),d=_t(),[f,m]=v.useState(r),p=We(),h={classes:p.classes},y=Uue(h),b=v.useCallback(async g=>{const x=g.target.checked;l&&await l(g,x),m(x),await u.current.setEditCellValue({id:n,field:o,value:x},g)},[u,o,n,l]);return v.useEffect(()=>{m(r)},[r]),Rt(()=>{a&&c.current.focus()},[a]),N.jsx("label",I({htmlFor:d,className:he(y.root,i)},s,{children:N.jsx(p.slots.baseCheckbox,I({id:d,inputRef:c,checked:!!f,onChange:b,size:"small"},(t=p.slotProps)==null?void 0:t.baseCheckbox))}))}const Gue=e=>N.jsx(Wue,I({},e));function que(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=$E({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:l,max:s=r}=a?i:e,u=l&&Number(l)>s?`${s}+`:l;return{badgeContent:l,invisible:a,max:s,displayValue:u}}const Kue=["onChange","maxRows","minRows","style","value"];function xh(e){return parseInt(e,10)||0}const Que={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Yue(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const Xue=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:l}=t,s=ue(t,Kue),{current:u}=v.useRef(l!=null),c=v.useRef(null),d=vt(n,c),f=v.useRef(null),m=v.useCallback(()=>{const y=c.current,g=xi(y).getComputedStyle(y);if(g.width==="0px")return{outerHeightStyle:0,overflowing:!1};const x=f.current;x.style.width=g.width,x.value=y.value||t.placeholder||"x",x.value.slice(-1)===` `&&(x.value+=" ");const w=g.boxSizing,P=xh(g.paddingBottom)+xh(g.paddingTop),C=xh(g.borderBottomWidth)+xh(g.borderTopWidth),E=x.scrollHeight;x.value="x";const S=x.scrollHeight;let M=E;i&&(M=Math.max(Number(i)*S,M)),o&&(M=Math.min(Number(o)*S,M)),M=Math.max(M,S);const O=M+(w==="border-box"?P+C:0),R=Math.abs(M-E)<=1;return{outerHeightStyle:O,overflowing:R}},[o,i,t.placeholder]),p=v.useCallback(()=>{const y=m();if(Yue(y))return;const b=c.current;b.style.height=`${y.outerHeightStyle}px`,b.style.overflow=y.overflowing?"hidden":""},[m]);Rt(()=>{const y=()=>{p()};let b;const g=bd(y),x=c.current,w=xi(x);w.addEventListener("resize",g);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(y),P.observe(x)),()=>{g.clear(),cancelAnimationFrame(b),w.removeEventListener("resize",g),P&&P.disconnect()}},[m,p]),Rt(()=>{p()});const h=y=>{u||p(),r&&r(y)};return N.jsxs(v.Fragment,{children:[N.jsx("textarea",I({value:l,onChange:h,ref:d,rows:i,style:a},s)),N.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:I({},Que.shadow,a,{paddingTop:0,paddingBottom:0})})]})});function QM(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function W4(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(l,{inputValue:s,getOptionLabel:u})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=QM(c));const d=c?l.filter(f=>{let m=(i||u)(f);return n&&(m=m.toLowerCase()),t&&(m=QM(m)),o==="start"?m.indexOf(c)===0:m.indexOf(c)>-1}):l;return typeof r=="number"?d.slice(0,r):d}}function wh(e,t){for(let n=0;n{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))};function ece(e){const{unstable_isActiveElementInListbox:t=Jue,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:l=!e.freeSolo,clearOnEscape:s=!1,componentName:u="useAutocomplete",defaultValue:c=e.multiple?[]:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:m,disabledItemsFocusable:p=!1,disableListWrap:h=!1,filterOptions:y=Zue,filterSelectedOptions:b=!1,freeSolo:g=!1,getOptionDisabled:x,getOptionKey:w,getOptionLabel:P=xe=>{var ge;return(ge=xe.label)!=null?ge:xe},groupBy:C,handleHomeEndKeys:E=!e.freeSolo,id:S,includeInputInList:M=!1,inputValue:O,isOptionEqualToValue:R=(xe,ge)=>xe===ge,multiple:_=!1,onChange:D,onClose:T,onHighlightChange:F,onInputChange:j,onOpen:$,open:L,openOnFocus:z=!1,options:B,readOnly:A=!1,selectOnFocus:H=!e.freeSolo,value:q}=e,U=_t(S);let G=P;G=xe=>{const ge=P(xe);return typeof ge!="string"?String(ge):ge};const Y=v.useRef(!1),re=v.useRef(!0),le=v.useRef(null),J=v.useRef(null),[oe,ce]=v.useState(null),[ve,me]=v.useState(-1),ke=o?0:-1,be=v.useRef(ke),[ie,ye]=Ql({controlled:q,default:c,name:u}),[V,Q]=Ql({controlled:O,default:"",name:u,state:"inputValue"}),[Z,ae]=v.useState(!1),te=v.useCallback((xe,ge)=>{if(!(_?ie.length!(b&&(_?ie:[ie]).some(ge=>ge!==null&&R(xe,ge)))),{inputValue:_e&&se?"":V,getOptionLabel:G}):[],Ee=$E({filteredOptions:X,value:ie,inputValue:V});v.useEffect(()=>{const xe=ie!==Ee.value;Z&&!xe||g&&!xe||te(null,ie)},[ie,te,Z,Ee.value,g]);const De=K&&X.length>0&&!A,Te=Jt(xe=>{xe===-1?le.current.focus():oe.querySelector(`[data-tag-index="${xe}"]`).focus()});v.useEffect(()=>{_&&ve>ie.length-1&&(me(-1),Te(-1))},[ie,_,ve,Te]);function Pe(xe,ge){if(!J.current||xe<0||xe>=X.length)return-1;let je=xe;for(;;){const Fe=J.current.querySelector(`[data-option-index="${je}"]`),Ze=p?!1:!Fe||Fe.disabled||Fe.getAttribute("aria-disabled")==="true";if(Fe&&Fe.hasAttribute("tabindex")&&!Ze)return je;if(ge==="next"?je=(je+1)%X.length:je=(je-1+X.length)%X.length,je===xe)return-1}}const Re=Jt(({event:xe,index:ge,reason:je="auto"})=>{if(be.current=ge,ge===-1?le.current.removeAttribute("aria-activedescendant"):le.current.setAttribute("aria-activedescendant",`${U}-option-${ge}`),F&&F(xe,ge===-1?null:X[ge],je),!J.current)return;const Fe=J.current.querySelector(`[role="option"].${n}-focused`);Fe&&(Fe.classList.remove(`${n}-focused`),Fe.classList.remove(`${n}-focusVisible`));let Ze=J.current;if(J.current.getAttribute("role")!=="listbox"&&(Ze=J.current.parentElement.querySelector('[role="listbox"]')),!Ze)return;if(ge===-1){Ze.scrollTop=0;return}const Ve=J.current.querySelector(`[data-option-index="${ge}"]`);if(Ve&&(Ve.classList.add(`${n}-focused`),je==="keyboard"&&Ve.classList.add(`${n}-focusVisible`),Ze.scrollHeight>Ze.clientHeight&&je!=="mouse"&&je!=="touch")){const gt=Ve,ki=Ze.clientHeight+Ze.scrollTop,n$=gt.offsetTop+gt.offsetHeight;n$>ki?Ze.scrollTop=n$-Ze.clientHeight:gt.offsetTop-gt.offsetHeight*(C?1.3:0){if(!$e)return;const Ve=Pe((()=>{const gt=X.length-1;if(ge==="reset")return ke;if(ge==="start")return 0;if(ge==="end")return gt;const ki=be.current+ge;return ki<0?ki===-1&&M?-1:h&&be.current!==-1||Math.abs(ge)>1?0:gt:ki>gt?ki===gt+1&&M?-1:h||Math.abs(ge)>1?gt:0:ki})(),je);if(Re({index:Ve,reason:Fe,event:xe}),r&&ge!=="reset")if(Ve===-1)le.current.value=V;else{const gt=G(X[Ve]);le.current.value=gt,gt.toLowerCase().indexOf(V.toLowerCase())===0&&V.length>0&&le.current.setSelectionRange(V.length,gt.length)}}),at=()=>{const xe=(ge,je)=>{const Fe=ge?G(ge):"",Ze=je?G(je):"";return Fe===Ze};if(be.current!==-1&&Ee.filteredOptions&&Ee.filteredOptions.length!==X.length&&Ee.inputValue===V&&(_?ie.length===Ee.value.length&&Ee.value.every((ge,je)=>G(ie[je])===G(ge)):xe(Ee.value,ie))){const ge=Ee.filteredOptions[be.current];if(ge)return wh(X,je=>G(je)===G(ge))}return-1},It=v.useCallback(()=>{if(!$e)return;const xe=at();if(xe!==-1){be.current=xe;return}const ge=_?ie[0]:ie;if(X.length===0||ge==null){Ge({diff:"reset"});return}if(J.current){if(ge!=null){const je=X[be.current];if(_&&je&&wh(ie,Ze=>R(je,Ze))!==-1)return;const Fe=wh(X,Ze=>R(Ze,ge));Fe===-1?Ge({diff:"reset"}):Re({index:Fe});return}if(be.current>=X.length-1){Re({index:X.length-1});return}Re({index:be.current})}},[X.length,_?!1:ie,b,Ge,Re,$e,V,_]),Gt=Jt(xe=>{gp(J,xe),xe&&It()});v.useEffect(()=>{It()},[It]);const ot=xe=>{K||(ee(!0),Ce(!0),$&&$(xe))},Pn=(xe,ge)=>{K&&(ee(!1),T&&T(xe,ge))},tn=(xe,ge,je,Fe)=>{if(_){if(ie.length===ge.length&&ie.every((Ze,Ve)=>Ze===ge[Ve]))return}else if(ie===ge)return;D&&D(xe,ge,je,Fe),ye(ge)},Tr=v.useRef(!1),St=(xe,ge,je="selectOption",Fe="options")=>{let Ze=je,Ve=ge;if(_){Ve=Array.isArray(ie)?ie.slice():[];const gt=wh(Ve,ki=>R(ge,ki));gt===-1?Ve.push(ge):Fe!=="freeSolo"&&(Ve.splice(gt,1),Ze="removeOption")}te(xe,Ve),tn(xe,Ve,Ze,{option:ge}),!f&&(!xe||!xe.ctrlKey&&!xe.metaKey)&&Pn(xe,Ze),(a===!0||a==="touch"&&Tr.current||a==="mouse"&&!Tr.current)&&le.current.blur()};function ut(xe,ge){if(xe===-1)return-1;let je=xe;for(;;){if(ge==="next"&&je===ie.length||ge==="previous"&&je===-1)return-1;const Fe=oe.querySelector(`[data-tag-index="${je}"]`);if(!Fe||!Fe.hasAttribute("tabindex")||Fe.disabled||Fe.getAttribute("aria-disabled")==="true")je+=ge==="next"?1:-1;else return je}}const Et=(xe,ge)=>{if(!_)return;V===""&&Pn(xe,"toggleInput");let je=ve;ve===-1?V===""&&ge==="previous"&&(je=ie.length-1):(je+=ge==="next"?1:-1,je<0&&(je=0),je===ie.length&&(je=-1)),je=ut(je,ge),me(je),Te(je)},Qr=xe=>{Y.current=!0,Q(""),j&&j(xe,"","clear"),tn(xe,_?[]:null,"clear")},ni=xe=>ge=>{if(xe.onKeyDown&&xe.onKeyDown(ge),!ge.defaultMuiPrevented&&(ve!==-1&&["ArrowLeft","ArrowRight"].indexOf(ge.key)===-1&&(me(-1),Te(-1)),ge.which!==229))switch(ge.key){case"Home":$e&&E&&(ge.preventDefault(),Ge({diff:"start",direction:"next",reason:"keyboard",event:ge}));break;case"End":$e&&E&&(ge.preventDefault(),Ge({diff:"end",direction:"previous",reason:"keyboard",event:ge}));break;case"PageUp":ge.preventDefault(),Ge({diff:-YM,direction:"previous",reason:"keyboard",event:ge}),ot(ge);break;case"PageDown":ge.preventDefault(),Ge({diff:YM,direction:"next",reason:"keyboard",event:ge}),ot(ge);break;case"ArrowDown":ge.preventDefault(),Ge({diff:1,direction:"next",reason:"keyboard",event:ge}),ot(ge);break;case"ArrowUp":ge.preventDefault(),Ge({diff:-1,direction:"previous",reason:"keyboard",event:ge}),ot(ge);break;case"ArrowLeft":Et(ge,"previous");break;case"ArrowRight":Et(ge,"next");break;case"Enter":if(be.current!==-1&&$e){const je=X[be.current],Fe=x?x(je):!1;if(ge.preventDefault(),Fe)return;St(ge,je,"selectOption"),r&&le.current.setSelectionRange(le.current.value.length,le.current.value.length)}else g&&V!==""&&_e===!1&&(_&&ge.preventDefault(),St(ge,V,"createOption","freeSolo"));break;case"Escape":$e?(ge.preventDefault(),ge.stopPropagation(),Pn(ge,"escape")):s&&(V!==""||_&&ie.length>0)&&(ge.preventDefault(),ge.stopPropagation(),Qr(ge));break;case"Backspace":if(_&&!A&&V===""&&ie.length>0){const je=ve===-1?ie.length-1:ve,Fe=ie.slice();Fe.splice(je,1),tn(ge,Fe,"removeOption",{option:ie[je]})}break;case"Delete":if(_&&!A&&V===""&&ie.length>0&&ve!==-1){const je=ve,Fe=ie.slice();Fe.splice(je,1),tn(ge,Fe,"removeOption",{option:ie[je]})}break}},ha=xe=>{ae(!0),z&&!Y.current&&ot(xe)},Yr=xe=>{if(t(J)){le.current.focus();return}ae(!1),re.current=!0,Y.current=!1,i&&be.current!==-1&&$e?St(xe,X[be.current],"blur"):i&&g&&V!==""?St(xe,V,"blur","freeSolo"):l&&te(xe,ie),Pn(xe,"blur")},an=xe=>{const ge=xe.target.value;V!==ge&&(Q(ge),Ce(!1),j&&j(xe,ge,"input")),ge===""?!d&&!_&&tn(xe,null,"clear"):ot(xe)},Dt=xe=>{const ge=Number(xe.currentTarget.getAttribute("data-option-index"));be.current!==ge&&Re({event:xe,index:ge,reason:"mouse"})},kn=xe=>{Re({event:xe,index:Number(xe.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Tr.current=!0},or=xe=>{const ge=Number(xe.currentTarget.getAttribute("data-option-index"));St(xe,X[ge],"selectOption"),Tr.current=!1},vo=xe=>ge=>{const je=ie.slice();je.splice(xe,1),tn(ge,je,"removeOption",{option:ie[xe]})},pl=xe=>{K?Pn(xe,"toggleInput"):ot(xe)},ri=xe=>{xe.currentTarget.contains(xe.target)&&xe.target.getAttribute("id")!==U&&xe.preventDefault()},Pi=xe=>{xe.currentTarget.contains(xe.target)&&(le.current.focus(),H&&re.current&&le.current.selectionEnd-le.current.selectionStart===0&&le.current.select(),re.current=!1)},yo=xe=>{!m&&(V===""||!K)&&pl(xe)};let Xr=g&&V.length>0;Xr=Xr||(_?ie.length>0:ie!==null);let ga=X;return C&&(ga=X.reduce((xe,ge,je)=>{const Fe=C(ge);return xe.length>0&&xe[xe.length-1].group===Fe?xe[xe.length-1].options.push(ge):xe.push({key:je,index:je,group:Fe,options:[ge]}),xe},[])),m&&Z&&Yr(),{getRootProps:(xe={})=>I({"aria-owns":De?`${U}-listbox`:null},xe,{onKeyDown:ni(xe),onMouseDown:ri,onClick:Pi}),getInputLabelProps:()=>({id:`${U}-label`,htmlFor:U}),getInputProps:()=>({id:U,value:V,onBlur:Yr,onFocus:ha,onChange:an,onMouseDown:yo,"aria-activedescendant":$e?"":null,"aria-autocomplete":r?"both":"list","aria-controls":De?`${U}-listbox`:void 0,"aria-expanded":De,autoComplete:"off",ref:le,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Qr}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:pl}),getTagProps:({index:xe})=>I({key:xe,"data-tag-index":xe,tabIndex:-1},!A&&{onDelete:vo(xe)}),getListboxProps:()=>({role:"listbox",id:`${U}-listbox`,"aria-labelledby":`${U}-label`,ref:Gt,onMouseDown:xe=>{xe.preventDefault()}}),getOptionProps:({index:xe,option:ge})=>{var je;const Fe=(_?ie:[ie]).some(Ve=>Ve!=null&&R(ge,Ve)),Ze=x?x(ge):!1;return{key:(je=w==null?void 0:w(ge))!=null?je:G(ge),tabIndex:-1,role:"option",id:`${U}-option-${xe}`,onMouseMove:Dt,onClick:or,onTouchStart:kn,"data-option-index":xe,"aria-disabled":Ze,"aria-selected":Fe}},id:U,inputValue:V,value:ie,dirty:Xr,expanded:$e&&oe,popupOpen:$e,focused:Z||ve!==-1,anchorEl:oe,setAnchorEl:ce,focusedTag:ve,groupedOptions:ga}}function Pu({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 tce=v.createContext(void 0),b0=tce;function rl(){return v.useContext(b0)}function dP(e){return N.jsx(dee,I({},e,{defaultTheme:Jy,themeId:du}))}function XM(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function vv(e,t=!1){return e&&(XM(e.value)&&e.value!==""||t&&XM(e.defaultValue)&&e.defaultValue!=="")}function nce(e){return e.startAdornment}function rce(e){return Be("MuiInputBase",e)}const oce=He("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),no=oce,ice=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],x0=(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${pe(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},w0=(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]},ace=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:u,multiline:c,readOnly:d,size:f,startAdornment:m,type:p}=e,h={root:["root",`color${pe(n)}`,r&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl",f&&f!=="medium"&&`size${pe(f)}`,c&&"multiline",m&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",c&&"inputMultiline",f==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return Ie(h,rce,t)},C0=de("div",{name:"MuiInputBase",slot:"Root",overridesResolver:x0})(({theme:e,ownerState:t})=>I({},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",[`&.${no.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&I({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),S0=de("input",{name:"MuiInputBase",slot:"Input",overridesResolver:w0})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=I({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return I({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%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${no.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${no.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),lce=N.jsx(dP,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),sce=v.forwardRef(function(t,n){var r;const o=Ue({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:l,className:s,components:u={},componentsProps:c={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:m,endAdornment:p,fullWidth:h=!1,id:y,inputComponent:b="input",inputProps:g={},inputRef:x,maxRows:w,minRows:P,multiline:C=!1,name:E,onBlur:S,onChange:M,onClick:O,onFocus:R,onKeyDown:_,onKeyUp:D,placeholder:T,readOnly:F,renderSuffix:j,rows:$,slotProps:L={},slots:z={},startAdornment:B,type:A="text",value:H}=o,q=ue(o,ice),U=g.value!=null?g.value:H,{current:G}=v.useRef(U!=null),Y=v.useRef(),re=v.useCallback($e=>{},[]),le=vt(Y,x,g.ref,re),[J,oe]=v.useState(!1),ce=rl(),ve=Pu({props:o,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ve.focused=ce?ce.focused:J,v.useEffect(()=>{!ce&&f&&J&&(oe(!1),S&&S())},[ce,f,J,S]);const me=ce&&ce.onFilled,ke=ce&&ce.onEmpty,be=v.useCallback($e=>{vv($e)?me&&me():ke&&ke()},[me,ke]);Rt(()=>{G&&be({value:U})},[U,be,G]);const ie=$e=>{if(ve.disabled){$e.stopPropagation();return}R&&R($e),g.onFocus&&g.onFocus($e),ce&&ce.onFocus?ce.onFocus($e):oe(!0)},ye=$e=>{S&&S($e),g.onBlur&&g.onBlur($e),ce&&ce.onBlur?ce.onBlur($e):oe(!1)},V=($e,...X)=>{if(!G){const Ee=$e.target||Y.current;if(Ee==null)throw new Error(qa(1));be({value:Ee.value})}g.onChange&&g.onChange($e,...X),M&&M($e,...X)};v.useEffect(()=>{be(Y.current)},[]);const Q=$e=>{Y.current&&$e.currentTarget===$e.target&&Y.current.focus(),O&&O($e)};let Z=b,ae=g;C&&Z==="input"&&($?ae=I({type:void 0,minRows:$,maxRows:$},ae):ae=I({type:void 0,maxRows:w,minRows:P},ae),Z=Xue);const te=$e=>{be($e.animationName==="mui-auto-fill-cancel"?Y.current:{value:"x"})};v.useEffect(()=>{ce&&ce.setAdornedStart(!!B)},[ce,B]);const K=I({},o,{color:ve.color||"primary",disabled:ve.disabled,endAdornment:p,error:ve.error,focused:ve.focused,formControl:ce,fullWidth:h,hiddenLabel:ve.hiddenLabel,multiline:C,size:ve.size,startAdornment:B,type:A}),ee=ace(K),se=z.root||u.Root||C0,Ce=L.root||c.root||{},_e=z.input||u.Input||S0;return ae=I({},ae,(r=L.input)!=null?r:c.input),N.jsxs(v.Fragment,{children:[!m&&lce,N.jsxs(se,I({},Ce,!fu(se)&&{ownerState:I({},K,Ce.ownerState)},{ref:n,onClick:Q},q,{className:he(ee.root,Ce.className,s,F&&"MuiInputBase-readOnly"),children:[B,N.jsx(b0.Provider,{value:null,children:N.jsx(_e,I({ownerState:K,"aria-invalid":ve.error,"aria-describedby":i,autoComplete:a,autoFocus:l,defaultValue:d,disabled:ve.disabled,id:y,onAnimationStart:te,name:E,placeholder:T,readOnly:F,required:ve.required,rows:$,value:U,onKeyDown:_,onKeyUp:D,type:A},ae,!fu(_e)&&{as:Z,ownerState:I({},K,ae.ownerState)},{ref:le,className:he(ee.input,ae.className,F&&"MuiInputBase-readOnly"),onBlur:ye,onChange:V,onFocus:ie}))}),p,j?j(I({},ve,{startAdornment:B})):null]}))]})}),$d=sce,uce=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],cce=de($d)({fontSize:"inherit"}),dce=e=>{const{classes:t}=e;return Ie({root:["editInputCell"]},ft,t)};function fce(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:l}=e,s=ue(e,uce),u=o.type==="dateTime",c=dt(),d=v.useRef(),f=v.useMemo(()=>{let w;n==null?w=null:n instanceof Date?w=n:w=new Date((n??"").toString());let P;return w==null||Number.isNaN(w.getTime())?P="":P=new Date(w.getTime()-w.getTimezoneOffset()*60*1e3).toISOString().substr(0,u?16:10),{parsed:w,formatted:P}},[n,u]),[m,p]=v.useState(f),y={classes:We().classes},b=dce(y),g=v.useCallback(w=>{if(w==="")return null;const[P,C]=w.split("T"),[E,S,M]=P.split("-"),O=new Date;if(O.setFullYear(Number(E),Number(S)-1,Number(M)),O.setHours(0,0,0,0),C){const[R,_]=C.split(":");O.setHours(Number(R),Number(_),0,0)}return O},[]),x=v.useCallback(async w=>{const P=w.target.value,C=g(P);l&&await l(w,C),p({parsed:C,formatted:P}),c.current.setEditCellValue({id:t,field:r,value:C},w)},[c,r,t,l,g]);return v.useEffect(()=>{p(w=>{var P,C;return f.parsed!==w.parsed&&((P=f.parsed)==null?void 0:P.getTime())!==((C=w.parsed)==null?void 0:C.getTime())?f:w})},[f]),Rt(()=>{i&&d.current.focus()},[i]),N.jsx(cce,I({inputRef:d,fullWidth:!0,className:b.root,type:u?"datetime-local":"date",inputProps:I({max:u?"9999-12-31T23:59":"9999-12-31"},a),value:m.formatted,onChange:x},s))}const G4=e=>N.jsx(fce,I({},e)),pce=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],mce=e=>{const{classes:t}=e;return Ie({root:["editInputCell"]},ft,t)},hce=de($d,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>I({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),gce=v.forwardRef((e,t)=>{const n=We(),{id:r,value:o,field:i,colDef:a,hasFocus:l,debounceMs:s=200,isProcessingProps:u,onValueChange:c}=e,d=ue(e,pce),f=dt(),m=v.useRef(),[p,h]=v.useState(o),y=mce(n),b=v.useCallback(async x=>{const w=x.target.value;c&&await c(x,w);const P=f.current.getColumn(i);let C=w;P.valueParser&&(C=P.valueParser(w,f.current.getCellParams(r,i))),h(C),f.current.setEditCellValue({id:r,field:i,value:C,debounceMs:s,unstable_skipValueParser:!0},x)},[f,s,i,r,c]),g=f.current.unstable_getEditCellMeta(r,i);return v.useEffect(()=>{(g==null?void 0:g.changeReason)!=="debouncedSetEditCellValue"&&h(o)},[g,o]),Rt(()=>{l&&m.current.focus()},[l]),N.jsx(hce,I({ref:t,inputRef:m,className:y.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:p??"",onChange:b,endAdornment:u?N.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),vce=e=>N.jsx(gce,I({},e)),yv=e=>e==="Escape",yce=e=>e==="Enter",q4=e=>e==="Tab",K4=e=>e===" ",bce=e=>e.indexOf("Arrow")===0,xce=e=>e==="Home"||e==="End",wce=e=>e.indexOf("Page")===0;function Q4(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const bv=e=>xce(e)||bce(e)||wce(e)||K4(e),Cce=e=>!!e.key,Sce=e=>q4(e)||yv(e);function Qs(e){return(e==null?void 0:e.type)==="singleSelect"}function Gw(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 Ece=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],Pce=["MenuProps"];function kce(e){return!!e.key}function $ce(e){var t,n,r;const o=We(),{id:i,value:a,field:l,row:s,colDef:u,hasFocus:c,error:d,onValueChange:f,initialOpen:m=o.editMode===ea.Cell,getOptionLabel:p,getOptionValue:h}=e,y=ue(e,Ece),b=dt(),g=v.useRef(),x=v.useRef(),[w,P]=v.useState(m),E=(n=(((t=o.slotProps)==null?void 0:t.baseSelect)||{}).native)!=null?n:!1,S=((r=o.slotProps)==null?void 0:r.baseSelect)||{},{MenuProps:M}=S,O=ue(S,Pce);if(Rt(()=>{if(c){var $;($=x.current)==null||$.focus()}},[c]),!Qs(u))return null;let R;if(typeof(u==null?void 0:u.valueOptions)=="function"?R=u==null?void 0:u.valueOptions({id:i,row:s,field:l}):R=u==null?void 0:u.valueOptions,!R)return null;const _=h||u.getOptionValue,D=p||u.getOptionLabel,T=async $=>{if(!Qs(u)||!R)return;P(!1);const L=$.target,z=Gw(L.value,R,_);f&&await f($,z),await b.current.setEditCellValue({id:i,field:l,value:z},$)},F=($,L)=>{if(o.editMode===ea.Row){P(!1);return}if(L==="backdropClick"||yv($.key)){const z=b.current.getCellParams(i,l);b.current.publishEvent("cellEditStop",I({},z,{reason:yv($.key)?li.escapeKeyDown:li.cellFocusOut}))}},j=$=>{kce($)&&$.key==="Enter"||P(!0)};return!R||!u?null:N.jsx(o.slots.baseSelect,I({ref:g,inputRef:x,value:a,onChange:T,open:w,onOpen:j,MenuProps:I({onClose:F},M),error:d,native:E,fullWidth:!0},y,O,{children:R.map($=>{var L;const z=_($);return v.createElement(o.slots.baseSelectOption,I({},((L=o.slotProps)==null?void 0:L.baseSelectOption)||{},{native:E,key:z,value:z}),D($))})}))}const Ice=e=>N.jsx($ce,I({},e)),Oce=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function f1(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ZM(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Y4(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.indexOf(t.keys.join(""))===0}function Jd(e,t,n,r,o,i){let a=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const s=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!Y4(l,i)||s)l=o(e,l,n);else return l.focus(),!0}return!1}const Mce=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:s=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu"}=t,f=ue(t,Oce),m=v.useRef(null),p=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Rt(()=>{o&&m.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(x,{direction:w})=>{const P=!m.current.style.width;if(x.clientHeight{const w=m.current,P=x.key,C=un(w).activeElement;if(P==="ArrowDown")x.preventDefault(),Jd(w,C,u,s,f1);else if(P==="ArrowUp")x.preventDefault(),Jd(w,C,u,s,ZM);else if(P==="Home")x.preventDefault(),Jd(w,null,u,s,f1);else if(P==="End")x.preventDefault(),Jd(w,null,u,s,ZM);else if(P.length===1){const E=p.current,S=P.toLowerCase(),M=performance.now();E.keys.length>0&&(M-E.lastTime>500?(E.keys=[],E.repeating=!0,E.previousKeyMatched=!0):E.repeating&&S!==E.keys[0]&&(E.repeating=!1)),E.lastTime=M,E.keys.push(S);const O=C&&!E.repeating&&Y4(C,E);E.previousKeyMatched&&(O||Jd(w,C,!1,s,f1,E))?x.preventDefault():E.previousKeyMatched=!1}c&&c(x)},y=vt(m,n);let b=-1;v.Children.forEach(a,(x,w)=>{if(!v.isValidElement(x)){b===w&&(b+=1,b>=a.length&&(b=-1));return}x.props.disabled||(d==="selectedMenu"&&x.props.selected||b===-1)&&(b=w),b===w&&(x.props.disabled||x.props.muiSkipListHighlight||x.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const g=v.Children.map(a,(x,w)=>{if(w===b){const P={};return i&&(P.autoFocus=!0),x.props.tabIndex===void 0&&d==="selectedMenu"&&(P.tabIndex=0),v.cloneElement(x,P)}return x});return N.jsx(os,I({role:"menu",ref:y,className:l,onKeyDown:h,tabIndex:o?0:-1},f,{children:g}))}),fP=Mce,Rce=["open","target","onClose","children","position","className","onExited"],Tce=e=>{const{classes:t}=e;return Ie({root:["menu"]},ft,t)},_ce=de(Eu,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${ne.menuList}`]:{outline:0}})),Fce={"bottom-start":"top left","bottom-end":"top right"};function X4(e){var t;const{open:n,target:r,onClose:o,children:i,position:a,className:l,onExited:s}=e,u=ue(e,Rce),c=dt(),d=We(),f=Tce(d),m=v.useRef(null);Rt(()=>{if(n)m.current=document.activeElement instanceof HTMLElement?document.activeElement:null;else{var y,b;(y=m.current)==null||(b=y.focus)==null||b.call(y),m.current=null}},[n]),v.useEffect(()=>{const y=n?"menuOpen":"menuClose";c.current.publishEvent(y,{target:r})},[c,n,r]);const p=y=>b=>{y&&y(),s&&s(b)},h=y=>{y.target&&(r===y.target||r!=null&&r.contains(y.target))||o(y)};return N.jsx(_ce,I({as:d.slots.basePopper,className:he(l,f.root),ownerState:d,open:n,anchorEl:r,transition:!0,placement:a},u,(t=d.slotProps)==null?void 0:t.basePopper,{children:({TransitionProps:y,placement:b})=>N.jsx(FE,{onClickAway:h,mouseEvent:"onMouseDown",children:N.jsx(uv,I({},y,{style:{transformOrigin:Fce[b]},onExited:p(y==null?void 0:y.onExited),children:N.jsx(Jo,{children:i})}))})}))}const Ace=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],Lce=e=>typeof e.getActions=="function";function Dce(e){var t;const{colDef:n,id:r,hasFocus:o,tabIndex:i,position:a="bottom-end",focusElementRef:l}=e,s=ue(e,Ace),[u,c]=v.useState(-1),[d,f]=v.useState(!1),m=dt(),p=v.useRef(null),h=v.useRef(null),y=v.useRef(!1),b=v.useRef({}),g=Rr(),x=_t(),w=_t(),P=We();if(!Lce(n))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const C=n.getActions(m.current.getRowParams(r)),E=C.filter(j=>!j.props.showInMenu),S=C.filter(j=>j.props.showInMenu),M=E.length+(S.length?1:0);v.useLayoutEffect(()=>{o||Object.entries(b.current).forEach(([j,$])=>{$==null||$.stop({},()=>{delete b.current[j]})})},[o]),v.useEffect(()=>{if(u<0||!p.current||u>=p.current.children.length)return;p.current.children[u].focus({preventScroll:!0})},[u]),v.useEffect(()=>{o||(c(-1),y.current=!1)},[o]),v.useImperativeHandle(l,()=>({focus(){if(!y.current){const j=C.findIndex($=>!$.props.disabled);c(j)}}}),[C]),v.useEffect(()=>{u>=M&&c(M-1)},[u,M]);const O=()=>{f(!0),c(M-1),y.current=!0},R=()=>{f(!1)},_=j=>$=>{b.current[j]=$},D=(j,$)=>L=>{c(j),y.current=!0,$&&$(L)},T=j=>{if(M<=1)return;const $=(z,B)=>{var A;if(z<0||z>C.length)return z;const H=g.direction==="rtl"?-1:1,q=(B==="left"?-1:1)*H;return(A=C[z+q])!=null&&A.props.disabled?$(z+q,B):z+q};let L=u;j.key==="ArrowRight"?L=$(u,"right"):j.key==="ArrowLeft"&&(L=$(u,"left")),!(L<0||L>=M)&&L!==u&&(j.preventDefault(),j.stopPropagation(),c(L))},F=j=>{j.key==="Tab"&&j.preventDefault(),["Tab","Escape"].includes(j.key)&&R()};return N.jsxs("div",I({role:"menu",ref:p,tabIndex:-1,className:ne.actionsCell,onKeyDown:T},s,{children:[E.map((j,$)=>v.cloneElement(j,{key:$,touchRippleRef:_($),onClick:D($,j.props.onClick),tabIndex:u===$?i:-1})),S.length>0&&w&&N.jsx(P.slots.baseIconButton,I({ref:h,id:w,"aria-label":m.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":d,"aria-controls":d?x:void 0,role:"menuitem",size:"small",onClick:O,touchRippleRef:_(w),tabIndex:u===E.length?i:-1},(t=P.slotProps)==null?void 0:t.baseIconButton,{children:N.jsx(P.slots.moreActionsIcon,{fontSize:"small"})})),S.length>0&&N.jsx(X4,{open:d,target:h.current,position:a,onClose:R,children:N.jsx(fP,{id:x,className:ne.menuList,onKeyDown:F,"aria-labelledby":w,variant:"menu",autoFocusItem:!0,children:S.map((j,$)=>v.cloneElement(j,{key:$,closeMenu:R}))})})]}))}const Nce=e=>N.jsx(Dce,I({},e));function jce(e){return Be("MuiDivider",e)}const zce=He("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),JM=zce,Bce=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Hce=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Ie({root:["root",t&&"absolute",s,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},jce,r)},Vce=de("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]}})(({theme:e,ownerState:t})=>I({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:rt(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>I({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>I({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>I({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>I({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Uce=de("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>I({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),Z4=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,component:l=i?"div":"hr",flexItem:s=!1,light:u=!1,orientation:c="horizontal",role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:m="fullWidth"}=r,p=ue(r,Bce),h=I({},r,{absolute:o,component:l,flexItem:s,light:u,orientation:c,role:d,textAlign:f,variant:m}),y=Hce(h);return N.jsx(Vce,I({as:l,className:he(y.root,a),role:d,ref:n,ownerState:h},p,{children:i?N.jsx(Uce,{className:y.wrapper,ownerState:h,children:i}):null}))});Z4.muiSkipListHighlight=!0;const pP=Z4;function Wce(e){return Be("MuiMenuItem",e)}const Gce=He("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ef=Gce,qce=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Kce=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Qce=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Ie({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Wce,a);return I({},a,s)},Yce=de(Zi,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Kce})(({theme:e,ownerState:t})=>I({},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"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ef.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ef.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ef.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(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})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ef.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ef.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${JM.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${JM.inset}`]:{marginLeft:52},[`& .${sv.root}`]:{marginTop:0,marginBottom:0},[`& .${sv.inset}`]:{paddingLeft:36},[`& .${_M.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&I({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${_M.root} svg`]:{fontSize:"1.25rem"}}))),Xce=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:f}=r,m=ue(r,qce),p=v.useContext(vi),h=v.useMemo(()=>({dense:a||p.dense||!1,disableGutters:s}),[p.dense,a,s]),y=v.useRef(null);Rt(()=>{o&&y.current&&y.current.focus()},[o]);const b=I({},r,{dense:h.dense,divider:l,disableGutters:s}),g=Qce(r),x=vt(y,n);let w;return r.disabled||(w=d!==void 0?d:-1),N.jsx(vi.Provider,{value:h,children:N.jsx(Yce,I({ref:x,role:c,tabIndex:w,component:i,focusVisibleClassName:he(g.focusVisible,u),className:he(g.root,f)},m,{ownerState:b,classes:g}))})}),uo=Xce;function Zce(e){return Be("MuiSkeleton",e)}He("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Jce=["animation","className","component","height","style","variant","width"];let xv=e=>e,e2,t2,n2,r2;const ede=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return Ie({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},Zce,t)},tde=ps(e2||(e2=xv` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),nde=ps(t2||(t2=xv` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),rde=de("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]}})(({theme:e,ownerState:t})=>{const n=Yne(e.shape.borderRadius)||"px",r=Xne(e.shape.borderRadius);return I({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Cr(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&Xc(n2||(n2=xv` animation: ${0} 2s ease-in-out 0.5s infinite; `),tde),({ownerState:e,theme:t})=>e.animation==="wave"&&Xc(r2||(r2=xv` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 2s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),nde,(t.vars||t).palette.action.hover)),ode=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:l,style:s,variant:u="text",width:c}=r,d=ue(r,Jce),f=I({},r,{animation:o,component:a,variant:u,hasChildren:!!d.children}),m=ede(f);return N.jsx(rde,I({as:a,ref:n,className:he(m.root,i),ownerState:f},d,{style:I({width:c,height:l},s)}))}),ide=ode,ade=["field","align","width","contentWidth"],lde=e=>{const{align:t,classes:n}=e,r={root:["cell","cellSkeleton",`cell--text${pe(t)}`,"withBorderColor"]};return Ie(r,ft,n)};function sde(e){const{align:t,width:n,contentWidth:r}=e,o=ue(e,ade),a={classes:We().classes,align:t},l=lde(a);return N.jsx("div",I({className:l.root,style:{width:n}},o,{children:N.jsx(ide,{width:`${r}%`})}))}function ude(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?MN(Cr(e.palette.divider,1),.88):Nf(Cr(e.palette.divider,1),.68)}const o2={[`.${ne.columnSeparator}, .${ne["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},i2={[`& .${ne.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ne.menuIcon}`]:{width:"auto",visibility:"visible"}},cde=de("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${ne.autoHeight}`]:t.autoHeight},{[`&.${ne.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${ne["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${ne["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${ne["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${ne.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${ne["root--disableUserSelection"]} .${ne.cell}`]:t["root--disableUserSelection"]},{[`&.${ne.autosizing}`]:t.autosizing},{[`& .${ne.editBooleanCell}`]:t.editBooleanCell},{[`& .${ne["cell--editing"]}`]:t["cell--editing"]},{[`& .${ne["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ne["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ne["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ne["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${ne.cell}`]:t.cell},{[`& .${ne["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ne["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ne["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ne["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ne["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ne.cellContent}`]:t.cellContent},{[`& .${ne.cellCheckbox}`]:t.cellCheckbox},{[`& .${ne.cellSkeleton}`]:t.cellSkeleton},{[`& .${ne.checkboxInput}`]:t.checkboxInput},{[`& .${ne["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ne["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ne["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ne["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ne["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ne["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ne["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ne["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ne["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ne.columnHeader}`]:t.columnHeader},{[`& .${ne.headerFilterRow}`]:t.headerFilterRow},{[`& .${ne.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ne.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ne.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ne["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ne["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ne.columnSeparator}`]:t.columnSeparator},{[`& .${ne.filterIcon}`]:t.filterIcon},{[`& .${ne.iconSeparator}`]:t.iconSeparator},{[`& .${ne.menuIcon}`]:t.menuIcon},{[`& .${ne.menuIconButton}`]:t.menuIconButton},{[`& .${ne.menuOpen}`]:t.menuOpen},{[`& .${ne.menuList}`]:t.menuList},{[`& .${ne["row--editable"]}`]:t["row--editable"]},{[`& .${ne["row--editing"]}`]:t["row--editing"]},{[`& .${ne["row--dragging"]}`]:t["row--dragging"]},{[`& .${ne.row}`]:t.row},{[`& .${ne.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ne.rowReorderCell}`]:t.rowReorderCell},{[`& .${ne["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ne.sortIcon}`]:t.sortIcon},{[`& .${ne.withBorderColor}`]:t.withBorderColor},{[`& .${ne.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ne.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ne.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ne["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=ude(e),n=e.shape.borderRadius;return I({"--unstable_DataGrid-radius":typeof n=="number"?`${n}px`:n,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Cr(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${ne.autoHeight}`]:{height:"auto",[`& .${ne["row--lastVisible"]} .${ne.cell}`]:{borderBottomColor:"transparent"}},[`&.${ne.autosizing}`]:{[`& .${ne.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${ne.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"},[`& .${ne.groupingCriteriaCell}`]:{width:"unset"},[`& .${ne.treeDataGroupingCell}`]:{width:"unset"}},[`& .${ne["virtualScrollerContent--overflowed"]} .${ne["row--lastVisible"]} .${ne.cell}`]:{borderBottomColor:"transparent"},[`& .${ne.columnHeader}, & .${ne.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${ne.columnHeader}:focus-within, & .${ne.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:Cr(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${ne.columnHeader}:focus, & .${ne.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${ne.columnHeaderCheckbox}, & .${ne.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${ne.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${ne["columnHeader--sorted"]} .${ne.iconButtonContainer}, & .${ne["columnHeader--filtered"]} .${ne.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ne.columnHeader}:not(.${ne["columnHeader--sorted"]}) .${ne.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${ne.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${ne.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${ne["columnHeader--filledGroup"]} .${ne.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ne["columnHeader--filledGroup"]}.${ne["columnHeader--showColumnBorder"]} .${ne.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${ne["columnHeader--filledGroup"]}.${ne["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${ne.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${ne.sortIcon}, & .${ne.filterIcon}`]:{fontSize:"inherit"},[`& .${ne["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${ne["columnHeader--alignCenter"]} .${ne.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${ne["columnHeader--alignRight"]} .${ne.columnHeaderDraggableContainer}, & .${ne["columnHeader--alignRight"]} .${ne.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${ne["columnHeader--alignCenter"]} .${ne.menuIcon}, & .${ne["columnHeader--alignRight"]} .${ne.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${ne["columnHeader--alignRight"]} .${ne.menuIcon}, & .${ne["columnHeader--alignRight"]} .${ne.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${ne["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${ne.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${ne.columnHeaders}:hover`]:o2,[`& .${ne.columnHeader}:hover`]:i2,[`& .${ne.columnHeader}:not(.${ne["columnHeader--sorted"]}):hover .${ne.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${ne.columnHeaders}`]:o2,[`& .${ne.columnHeader}`]:i2},[`& .${ne["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${ne["columnSeparator--sideRight"]}`]:{right:-12},[`& .${ne["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${ne["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${ne.iconSeparator}`]:{color:"inherit"},[`& .${ne.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${ne.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${ne.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Cr(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc( ${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity} ))`:Cr(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})`:Cr(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${ne.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Cr(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:Cr(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})`:Cr(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${ne["root--disableUserSelection"]} .${ne.cell}`]:{userSelect:"none"},[`& .${ne.row}:not(.${ne["row--dynamicHeight"]}) > .${ne.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${ne.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${ne.cell}.${ne["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ne.cell}.${ne["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${ne["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${ne["row--editing"]} .${ne.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${ne.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ne.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${ne.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${ne.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${ne.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ne["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ne.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${ne.withBorderColor}`]:{borderColor:t},[`& .${ne["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ne["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ne["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${ne["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${ne["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${ne.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ne.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ne["columnHeader--dragging"]}, & .${ne["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ne["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${ne.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ne.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ne.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${ne.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ne.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}),dde=["children","className"],fde=e=>{const{autoHeight:t,density:n,classes:r}=e,o={root:["root",t&&"autoHeight",`root--density${pe(n)}`,"withBorderColor"]};return Ie(o,ft,r)},pde=v.forwardRef(function(t,n){var r;const o=We(),{children:i,className:a}=t,l=ue(t,dde),s=hs(),u=Ne(s,pue),c=v.useRef(null),d=vt(c,n),f=(r=o.experimentalFeatures)!=null&&r.ariaV7?null:_4,m=typeof f=="function"?f():null,p=I({},o,{density:u}),h=fde(p);s.current.register("public",{rootElementRef:c});const[y,b]=v.useState(!1);return Rt(()=>{b(!0)},[]),y?N.jsx(cde,I({ref:d,className:he(a,h.root),ownerState:p},m,l,{children:i})):null}),mde=["className"],hde=e=>{const{classes:t}=e;return Ie({root:["footerContainer","withBorderColor"]},ft,t)},gde=zn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),vde=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,mde),i=We(),a=hde(i);return N.jsx(gde,I({ref:n,className:he(a.root,r),ownerState:i},o))}),yde=["className"],bde=e=>{const{classes:t}=e;return Ie({root:["overlay"]},ft,t)},xde=zn("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),mP=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,yde),i=We(),a=bde(i);return N.jsx(xde,I({ref:n,className:he(a.root,r),ownerState:i},o))});function wde(e){return Be("MuiBadge",e)}const Cde=He("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"]),hl=Cde,Sde=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],p1=10,m1=4,Ede=JE(),Pde=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${pe(n.vertical)}${pe(n.horizontal)}`,`anchorOrigin${pe(n.vertical)}${pe(n.horizontal)}${pe(o)}`,`overlap${pe(o)}`,t!=="default"&&`color${pe(t)}`]};return Ie(l,wde,a)},kde=de("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),$de=de("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${pe(n.anchorOrigin.vertical)}${pe(n.anchorOrigin.horizontal)}${pe(n.overlap)}`],n.color!=="default"&&t[`color${pe(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{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:p1*2,lineHeight:1,padding:"0 6px",height:p1*2,borderRadius:p1,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:m1,height:m1*2,minWidth:m1*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${hl.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${hl.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})}}]}}),Ide=v.forwardRef(function(t,n){var r,o,i,a,l,s;const u=Ede({props:t,name:"MuiBadge"}),{anchorOrigin:c={vertical:"top",horizontal:"right"},className:d,component:f,components:m={},componentsProps:p={},children:h,overlap:y="rectangular",color:b="default",invisible:g=!1,max:x=99,badgeContent:w,slots:P,slotProps:C,showZero:E=!1,variant:S="standard"}=u,M=ue(u,Sde),{badgeContent:O,invisible:R,max:_,displayValue:D}=que({max:x,invisible:g,badgeContent:w,showZero:E}),T=$E({anchorOrigin:c,color:b,overlap:y,variant:S,badgeContent:w}),F=R||O==null&&S!=="dot",{color:j=b,overlap:$=y,anchorOrigin:L=c,variant:z=S}=F?T:u,B=z!=="dot"?D:void 0,A=I({},u,{badgeContent:O,invisible:F,max:_,displayValue:B,showZero:E,anchorOrigin:L,color:j,overlap:$,variant:z}),H=Pde(A),q=(r=(o=P==null?void 0:P.root)!=null?o:m.Root)!=null?r:kde,U=(i=(a=P==null?void 0:P.badge)!=null?a:m.Badge)!=null?i:$de,G=(l=C==null?void 0:C.root)!=null?l:p.root,Y=(s=C==null?void 0:C.badge)!=null?s:p.badge,re=Xi({elementType:q,externalSlotProps:G,externalForwardedProps:M,additionalProps:{ref:n,as:f},ownerState:A,className:he(G==null?void 0:G.className,H.root,d)}),le=Xi({elementType:U,externalSlotProps:Y,ownerState:A,className:he(H.badge,Y==null?void 0:Y.className)});return N.jsxs(q,I({},re,{children:[h,N.jsx(U,I({},le,{children:B}))]}))}),J4=Ide,Ode=["className"],Mde=e=>{const{classes:t}=e;return Ie({root:["iconButtonContainer"]},ft,t)},Rde=zn("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),ej=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,Ode),i=We(),a=Mde(i);return N.jsx(Rde,I({ref:n,className:he(a.root,r),ownerState:i},o))}),Tde=e=>{const{classes:t}=e;return Ie({icon:["sortIcon"]},ft,t)};function _de(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?N.jsx(o,I({fontSize:"small",className:n},i)):null}function Fde(e){var t;const{direction:n,index:r,sortingOrder:o}=e,i=dt(),a=We(),l=I({},e,{classes:a.classes}),s=Tde(l),u=_de(a.slots,n,s.icon,o);if(!u)return null;const c=N.jsx(a.slots.baseIconButton,I({tabIndex:-1,"aria-label":i.current.getLocaleText("columnHeaderSortIconLabel"),title:i.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},(t=a.slotProps)==null?void 0:t.baseIconButton,{children:u}));return N.jsxs(ej,{children:[r!=null&&N.jsx(J4,{badgeContent:r,color:"default",children:c}),r==null&&c]})}const Ade=v.memo(Fde),Lde=e=>{const{classes:t,open:n}=e;return Ie({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},ft,t)},Dde=v.memo(e=>{var t,n;const{colDef:r,open:o,columnMenuId:i,columnMenuButtonId:a,iconButtonRef:l}=e,s=dt(),u=We(),c=I({},e,{classes:u.classes}),d=Lde(c),f=v.useCallback(m=>{m.preventDefault(),m.stopPropagation(),s.current.toggleColumnMenu(r.field)},[s,r.field]);return N.jsx("div",{className:d.root,children:N.jsx(u.slots.baseTooltip,I({title:s.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(t=u.slotProps)==null?void 0:t.baseTooltip,{children:N.jsx(u.slots.baseIconButton,I({ref:l,tabIndex:-1,className:d.button,"aria-label":s.current.getLocaleText("columnMenuLabel"),size:"small",onClick:f,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?i:void 0,id:a},(n=u.slotProps)==null?void 0:n.baseIconButton,{children:N.jsx(u.slots.columnMenuIcon,{fontSize:"small"})}))}))})});function Nde({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:l}){const s=dt(),u=s.current.getColumn(o),c=Jt(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||s.current.hideColumnMenu()});return!a||!u?null:N.jsx(X4,{placement:`bottom-${u.align==="right"?"start":"end"}`,open:i,target:a,onClose:c,onExited:l,children:N.jsx(n,I({colDef:u,hideMenu:c,open:i,id:e,labelledby:t},r))})}const jde=["className"],zde=e=>{const{classes:t}=e;return Ie({root:["columnHeaderTitle"]},ft,t)},Bde=zn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),Hde=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,jde),i=We(),a=zde(i);return N.jsx(Bde,I({ref:n,className:he(a.root,r),ownerState:i},o))});function Vde(e){var t;const{label:n,description:r}=e,o=We(),i=v.useRef(null),[a,l]=v.useState(""),s=v.useCallback(()=>{if(!r&&i!=null&&i.current){const u=Pue(i.current);l(u?n:"")}},[r,n]);return N.jsx(o.slots.baseTooltip,I({title:r||a},(t=o.slotProps)==null?void 0:t.baseTooltip,{children:N.jsx(Hde,{onMouseOver:s,ref:i,children:n})}))}const Ude=["resizable","resizing","height","side"];var tj=function(e){return e.Left="left",e.Right="right",e}(tj||{});const Wde=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${pe(o)}`],icon:["iconSeparator"]};return Ie(i,ft,r)};function Gde(e){const{height:t,side:n=tj.Right}=e,r=ue(e,Ude),o=We(),i=I({},e,{side:n,classes:o.classes}),a=Wde(i),l=v.useCallback(s=>{s.preventDefault(),s.stopPropagation()},[]);return N.jsx("div",I({className:a.root,style:{minHeight:t,opacity:o.showColumnVerticalBorder?0:1}},r,{onClick:l,children:N.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const qde=v.memo(Gde),Kde=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],nj=v.forwardRef(function(t,n){const{classes:r,columnMenuOpen:o,colIndex:i,height:a,isResizing:l,sortDirection:s,hasFocus:u,tabIndex:c,separatorSide:d,isDraggable:f,headerComponent:m,description:p,width:h,columnMenuIconButton:y=null,columnMenu:b=null,columnTitleIconButtons:g=null,headerClassName:x,label:w,resizable:P,draggableContainerProps:C,columnHeaderSeparatorProps:E}=t,S=ue(t,Kde),M=hs(),O=We(),R=v.useRef(null),[_,D]=v.useState(o),T=vt(R,n);let F="none";return s!=null&&(F=s==="asc"?"ascending":"descending"),v.useEffect(()=>{_||D(o)},[_,o]),v.useLayoutEffect(()=>{const j=M.current.state.columnMenu;if(u&&!j.open){const L=R.current.querySelector('[tabindex="0"]')||R.current;L==null||L.focus(),M.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[M,u]),N.jsxs("div",I({ref:T,className:he(r.root,x),style:{height:a,width:h,minWidth:h,maxWidth:h},role:"columnheader",tabIndex:c,"aria-colindex":i+1,"aria-sort":F,"aria-label":m==null?w:void 0},S,{children:[N.jsxs("div",I({className:r.draggableContainer,draggable:f,role:"presentation"},C,{children:[N.jsxs("div",{className:r.titleContainer,role:"presentation",children:[N.jsx("div",{className:r.titleContainerContent,children:m!==void 0?m:N.jsx(Vde,{label:w,description:p,columnWidth:h})}),g]}),y]})),N.jsx(qde,I({resizable:!O.disableColumnResize&&!!P,resizing:l,height:a,side:d},E)),b]}))}),Qde=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,filterItemsCounter:a}=e,l=o!=null,s=a!=null&&a>0,u=t.type==="number",c={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",l&&"columnHeader--sorted",s&&"columnHeader--filtered",u&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return Ie(c,ft,n)};function Yde(e){var t,n,r,o;const{colDef:i,columnMenuOpen:a,colIndex:l,headerHeight:s,isResizing:u,sortDirection:c,sortIndex:d,filterItemsCounter:f,hasFocus:m,tabIndex:p,disableReorder:h,separatorSide:y}=e,b=hs(),g=We(),x=v.useRef(null),w=_t(),P=_t(),C=v.useRef(null),[E,S]=v.useState(a),M=v.useMemo(()=>!g.disableColumnReorder&&!h&&!i.disableReorder,[g.disableColumnReorder,h,i.disableReorder]);let O;i.renderHeader&&(O=i.renderHeader(b.current.getColumnHeaderParams(i.field)));const R=I({},e,{classes:g.classes,showRightBorder:g.showColumnVerticalBorder}),_=Qde(R),D=v.useCallback(U=>G=>{cm(G)||b.current.publishEvent(U,b.current.getColumnHeaderParams(i.field),G)},[b,i.field]),T=v.useMemo(()=>({onClick:D("columnHeaderClick"),onDoubleClick:D("columnHeaderDoubleClick"),onMouseOver:D("columnHeaderOver"),onMouseOut:D("columnHeaderOut"),onMouseEnter:D("columnHeaderEnter"),onMouseLeave:D("columnHeaderLeave"),onKeyDown:D("columnHeaderKeyDown"),onFocus:D("columnHeaderFocus"),onBlur:D("columnHeaderBlur")}),[D]),F=v.useMemo(()=>M?{onDragStart:D("columnHeaderDragStart"),onDragEnter:D("columnHeaderDragEnter"),onDragOver:D("columnHeaderDragOver"),onDragEnd:D("columnHeaderDragEnd")}:{},[M,D]),j=v.useMemo(()=>({onMouseDown:D("columnSeparatorMouseDown"),onDoubleClick:D("columnSeparatorDoubleClick")}),[D]);v.useEffect(()=>{E||S(a)},[E,a]);const $=v.useCallback(()=>{S(!1)},[]),L=!g.disableColumnMenu&&!i.disableColumnMenu&&N.jsx(Dde,{colDef:i,columnMenuId:w,columnMenuButtonId:P,open:E,iconButtonRef:C}),z=N.jsx(Nde,{columnMenuId:w,columnMenuButtonId:P,field:i.field,open:a,target:C.current,ContentComponent:g.slots.columnMenu,contentComponentProps:(t=g.slotProps)==null?void 0:t.columnMenu,onExited:$}),B=(n=i.sortingOrder)!=null?n:g.sortingOrder,A=N.jsxs(v.Fragment,{children:[!g.disableColumnFilter&&N.jsx(g.slots.columnHeaderFilterIconButton,I({field:i.field,counter:f},(r=g.slotProps)==null?void 0:r.columnHeaderFilterIconButton)),i.sortable&&!i.hideSortIcons&&N.jsx(Ade,{direction:c,index:d,sortingOrder:B})]});v.useLayoutEffect(()=>{const U=b.current.state.columnMenu;if(m&&!U.open){const Y=x.current.querySelector('[tabindex="0"]')||x.current;Y==null||Y.focus(),b.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[b,m]);const H=typeof i.headerClassName=="function"?i.headerClassName({field:i.field,colDef:i}):i.headerClassName,q=(o=i.headerName)!=null?o:i.field;return N.jsx(nj,I({ref:x,classes:_,columnMenuOpen:a,colIndex:l,height:s,isResizing:u,sortDirection:c,hasFocus:m,tabIndex:p,separatorSide:y,isDraggable:M,headerComponent:O,description:i.description,elementId:i.field,width:i.computedWidth,columnMenuIconButton:L,columnTitleIconButtons:A,headerClassName:H,label:q,resizable:!g.disableColumnResize&&!!i.resizable,"data-field":i.field,columnMenu:z,draggableContainerProps:F,columnHeaderSeparatorProps:j},T))}const kp=()=>({items:[],logicOperator:er.And,quickFilterValues:[],quickFilterLogicOperator:er.And}),a2=1e3;class Xde{constructor(t=a2){this.timeouts=new Map,this.cleanupTimeout=a2,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 Zde{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(){}}var Ki=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Ki||{});class Jde{}function efe(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Zde:new Xde);const[l]=v.useState(new Jde),s=v.useRef(null),u=v.useRef();u.current=i;const c=v.useRef(null);if(!s.current&&u.current){const d=(f,m,p)=>{if(!m.defaultMuiPrevented){var h;(h=u.current)==null||h.call(u,f,m,p)}};s.current=r.current.subscribeEvent(o,d,a),t+=1,c.current={cleanupToken:t},e.registry.register(l,()=>{var f;(f=s.current)==null||f.call(s),s.current=null,c.current=null},c.current)}else!u.current&&s.current&&(s.current(),s.current=null,c.current&&(e.registry.unregister(c.current),c.current=null));v.useEffect(()=>{if(!s.current&&u.current){const d=(f,m,p)=>{if(!m.defaultMuiPrevented){var h;(h=u.current)==null||h.call(u,f,m,p)}};s.current=r.current.subscribeEvent(o,d,a)}return c.current&&e.registry&&(e.registry.unregister(c.current),c.current=null),()=>{var d;(d=s.current)==null||d.call(s),s.current=null}},[r,o,a])}}const tfe={registry:null},qe=efe(tfe),nfe={isFirst:!0};function Qt(e,t,n){qe(e,t,n,nfe)}function vr(e,t){const n=v.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}function rfe(e){return typeof e=="number"&&!Number.isNaN(e)}function rj(e){return typeof e=="function"}function hP(e){return typeof e=="object"&&e!==null}function ofe(){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 cg(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const id=(e,t,n)=>Math.max(t,Math.min(n,e));function Ys(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{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 afe(e,t,n){const r=ife(e);return()=>t+(n-t)*r()}function oj(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const lfe=(e,t,n,r,o)=>{const i=vr(e,"useNativeEventListener"),[a,l]=v.useState(!1),s=v.useRef(r),u=v.useCallback(c=>s.current&&s.current(c),[]);v.useEffect(()=>{s.current=r},[r]),v.useEffect(()=>{let c;if(rj(t)?c=t():c=t&&t.current?t.current:null,c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o);const d=c;l(!0);const f=()=>{i.debug(`Clearing native ${n} event`),d.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",f)}},[t,u,n,a,i,o,e])},dm=e=>{const t=v.useRef(!0);t.current&&(t.current=!1,e())},sfe=100,ufe=e=>e?0:100,ij=(e,t)=>t>0&&e>0?Math.ceil(e/t):0;ua(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error");const aj=e=>({page:0,pageSize:e?0:100}),cfe=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),lj=(e,t)=>{if(t===Ki.DataGrid&&e>sfe)throw new Error(["MUI: `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(` `))},sj=e=>e.pagination,Io=nt(sj,e=>e.paginationModel),dfe=nt(Io,e=>e.page),ffe=nt(Io,e=>e.pageSize);nt(Io,h0,(e,t)=>ij(t,e.pageSize));const gP=en(Io,di,m0,gs,L4,(e,t,n,r,o)=>{const i=o.length,a=Math.min(e.pageSize*e.page,i-1),l=Math.min(a+e.pageSize-1,i-1);if(a===-1||l===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:l};const s=o[a],u=l-a+1,c=r.findIndex(p=>p.id===s.id);let d=c,f=0;for(;d0)&&(d+=1),h===0&&(f+=1))}return{firstRowIndex:c,lastRowIndex:d-1}}),pfe=en(gs,gP,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),uj=en(Wf,gP,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),$p=e=>e.preferencePanel;var mu=function(e){return e.filters="filters",e.columns="columns",e}(mu||{});const Ip=e=>e.rowsMeta,Po=e=>e.rowSelection,mfe=nt(Po,e=>e.length),hfe=en(Po,Ta,(e,t)=>new Map(e.map(n=>[n,t[n]]))),wv=en(Po,e=>e.reduce((t,n)=>(t[n]=n,t),{})),gfe=ua(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),cj=(e,t)=>t&&e.length>1?(gfe(),[e[0]]):e,l2=(e,t)=>n=>I({},n,{sorting:I({},n.sorting,{sortModel:cj(e,t)})}),vfe=e=>e==="desc",yfe=(e,t)=>{const n=t.current.getColumn(e.field);if(!n)return null;const r=vfe(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator;return{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}},bfe=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],l=n.params[i];return r=o.comparator(a.value,l.value,a,l),r},0),xfe=(e,t)=>{const n=e.map(r=>yfe(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)=>bfe(n,o,i)).map(o=>o.node.id)},s2=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},vP=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,wfe=new Intl.Collator,Cfe=(e,t)=>{const n=vP(e,t);return n!==null?n:typeof e=="string"?wfe.compare(e.toString(),t.toString()):e-t},dj=(e,t)=>{const n=vP(e,t);return n!==null?n:Number(e)-Number(t)},fj=(e,t)=>{const n=vP(e,t);return n!==null?n:e>t?1:ee.headerFiltering,Sfe=nt(pj,e=>e.editing),Efe=nt(pj,e=>e.menuOpen),Pfe=(e,t)=>{const n={enabled:!t.disableVirtualization,enabledForColumns:!0};return I({},e,{virtualization:n})};function kfe(e,t){const n=i=>{e.current.setState(a=>I({},a,{virtualization:I({},a.virtualization,{enabled:i})}))};it(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>I({},a,{virtualization:I({},a.virtualization,{enabledForColumns:i})}))}},"public"),v.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization])}const mj=e=>e.virtualization,$fe=nt(mj,e=>e.enabled),hj=nt(mj,e=>e.enabledForColumns),Ife=e=>{const{classes:t}=e;return Ie({icon:["filterIcon"]},ft,t)};function Ofe(e){var t,n;const{counter:r,field:o,onClick:i}=e,a=dt(),l=We(),s=I({},e,{classes:l.classes}),u=Ife(s),c=Ne(a,$p),d=_t(),f=_t(),m=v.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:b,openedPanelValue:g}=$p(a.current.state);b&&g===mu.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,f,d),i&&i(a.current.getColumnHeaderParams(o),y)},[a,o,i,f,d]);if(!r)return null;const p=c.open&&c.labelId===d,h=N.jsx(l.slots.baseIconButton,I({id:d,onClick:m,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?f:void 0},(t=l.slotProps)==null?void 0:t.baseIconButton,{children:N.jsx(l.slots.columnFilteredIcon,{className:u.icon,fontSize:"small"})}));return N.jsx(l.slots.baseTooltip,I({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},(n=l.slotProps)==null?void 0:n.baseTooltip,{children:N.jsxs(ej,{children:[r>1&&N.jsx(J4,{badgeContent:r,color:"default",children:h}),r===1&&h]})}))}const Mfe=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Rfe=e=>{const{classes:t}=e;return Ie({root:["checkboxInput"]},ft,t)},Tfe=v.forwardRef(function(t,n){var r;const{field:o,id:i,value:a,rowNode:l,hasFocus:s,tabIndex:u}=t,c=ue(t,Mfe),d=dt(),f=We(),m={classes:f.classes},p=Rfe(m),h=v.useRef(null),y=v.useRef(null),b=vt(h,n),g=d.current.getCellElement(i,o),x=E=>{const S={value:E.target.checked,id:i};d.current.publishEvent("rowSelectionCheckboxChange",S,E)};v.useLayoutEffect(()=>{u===0&&g&&(g.tabIndex=-1)},[g,u]),v.useEffect(()=>{if(s){var E;const S=(E=h.current)==null?void 0:E.querySelector("input");S==null||S.focus({preventScroll:!0})}else y.current&&y.current.stop({})},[s]);const w=v.useCallback(E=>{K4(E.key)&&E.stopPropagation()},[]);if(l.type==="footer"||l.type==="pinnedRow")return null;const P=d.current.isRowSelectable(i),C=d.current.getLocaleText(a?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return N.jsx(f.slots.baseCheckbox,I({ref:b,tabIndex:u,checked:a,onChange:x,className:p.root,inputProps:{"aria-label":C},onKeyDown:w,disabled:!P,touchRippleRef:y},(r=f.slotProps)==null?void 0:r.baseCheckbox,c))}),_fe=Tfe,Ffe=["field","colDef"],Afe=e=>{const{classes:t}=e;return Ie({root:["checkboxInput"]},ft,t)},Lfe=v.forwardRef(function(t,n){var r;const o=ue(t,Ffe),[,i]=v.useState(!1),a=dt(),l=We(),s={classes:l.classes},u=Afe(s),c=Ne(a,N4),d=Ne(a,Po),f=Ne(a,Wf),m=Ne(a,uj),p=v.useMemo(()=>typeof l.isRowSelectable!="function"?d:d.filter(S=>a.current.getRow(S)?l.isRowSelectable(a.current.getRowParams(S)):!1),[a,l.isRowSelectable,d]),h=v.useMemo(()=>(!l.pagination||!l.checkboxSelectionVisibleOnly?f:m).reduce((M,O)=>(M[O]=!0,M),{}),[l.pagination,l.checkboxSelectionVisibleOnly,m,f]),y=v.useMemo(()=>p.filter(S=>h[S]).length,[p,h]),b=y>0&&y0,x=S=>{const M={value:S.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",M)},w=c!==null&&c.field===t.field?0:-1;v.useLayoutEffect(()=>{const S=a.current.getColumnHeaderElement(t.field);w===0&&S&&(S.tabIndex=-1)},[w,a,t.field]);const P=v.useCallback(S=>{S.key===" "&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!g})},[a,g]),C=v.useCallback(()=>{i(S=>!S)},[]);v.useEffect(()=>a.current.subscribeEvent("rowSelectionChange",C),[a,C]);const E=a.current.getLocaleText(g?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return N.jsx(l.slots.baseCheckbox,I({ref:n,indeterminate:b,checked:g,onChange:x,className:u.root,inputProps:{"aria-label":E},tabIndex:w,onKeyDown:P},(r=l.slotProps)==null?void 0:r.baseCheckbox,o))}),u2=tt(N.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),c2=tt(N.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),d2=tt(N.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),f2=tt(N.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Dfe=tt(N.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),p2=tt(N.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"}),"FilterAlt"),Nfe=tt(N.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"}),"Search");tt(N.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");tt(N.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"}),"CheckCircle");const jfe=tt(N.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),zfe=tt(N.jsx("path",{d:"M11 19V5h2v14z"}),"Separator"),Bfe=tt(N.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Hfe=tt(N.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Vfe=tt(N.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Ufe=tt(N.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"}),"TripleDotsVertical"),h1=tt(N.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"}),"Close"),m2=tt(N.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Wfe=tt(N.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Gfe=tt(N.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"}),"Load"),h2=tt(N.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"}),"Drag"),qfe=tt(N.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),Kfe=tt(N.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Qfe=tt(N.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"}),"MoreVert"),Yfe=tt(N.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"}),"VisibilityOff"),Xfe=tt(N.jsx("g",{children:N.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Zfe=tt(N.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"}),"Clear");tt(N.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"}),"Delete");const Jfe=tt(N.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"}),"Delete"),epe=["hideMenu","colDef","id","labelledby","className","children","open"],tpe=de(fP)(()=>({minWidth:248})),npe=v.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:l,open:s}=t,u=ue(t,epe),c=v.useCallback(d=>{q4(d.key)&&d.preventDefault(),Sce(d.key)&&r(d)},[r]);return N.jsx(tpe,I({id:o,ref:n,className:he(ne.menuList,a),"aria-labelledby":i,onKeyDown:c,autoFocus:s},u,{children:l}))}),rpe=["displayOrder"],ope=e=>{const t=hs(),{defaultSlots:n,defaultSlotProps:r,slots:o={},slotProps:i={},hideMenu:a,colDef:l,addDividers:s=!0}=e,u=v.useMemo(()=>I({},n,o),[n,o]),c=v.useMemo(()=>{if(!i||Object.keys(i).length===0)return r;const m=I({},i);return Object.entries(r).forEach(([p,h])=>{m[p]=I({},h,i[p]||{})}),m},[r,i]),d=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),f=v.useMemo(()=>{const m=Object.keys(n);return Object.keys(o).filter(p=>!m.includes(p))},[o,n]);return v.useMemo(()=>{const h=Array.from(new Set([...d,...f])).filter(y=>u[y]!=null).sort((y,b)=>{const g=c[y],x=c[b],w=Number.isFinite(g==null?void 0:g.displayOrder)?g.displayOrder:100,P=Number.isFinite(x==null?void 0:x.displayOrder)?x.displayOrder:100;return w-P});return h.reduce((y,b,g)=>{let x={colDef:l,onClick:a};const w=c[b];if(w){const P=ue(w,rpe);x=I({},x,P)}return s&&g!==h.length-1?[...y,[u[b],x],[pP,{}]]:[...y,[u[b],x]]},[])},[s,l,d,a,u,c,f])};function ipe(e){const{colDef:t,onClick:n}=e,r=dt(),o=We(),l=tr(r).filter(u=>u.disableColumnMenu!==!0).length===1,s=v.useCallback(u=>{l||(r.current.setColumnVisibility(t.field,!1),n(u))},[r,t.field,n,l]);return o.disableColumnSelector||t.hideable===!1?null:N.jsxs(uo,{onClick:s,disabled:l,children:[N.jsx(vn,{children:N.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),N.jsx(Rn,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function ape(e){const{onClick:t}=e,n=dt(),r=We(),o=v.useCallback(i=>{t(i),n.current.showPreferences(mu.columns)},[n,t]);return r.disableColumnSelector?null:N.jsxs(uo,{onClick:o,children:[N.jsx(vn,{children:N.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),N.jsx(Rn,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function lpe(e){return N.jsxs(v.Fragment,{children:[N.jsx(ipe,I({},e)),N.jsx(ape,I({},e))]})}function spe(e){const{colDef:t,onClick:n}=e,r=dt(),o=We(),i=v.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:N.jsxs(uo,{onClick:i,children:[N.jsx(vn,{children:N.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),N.jsx(Rn,{children:r.current.getLocaleText("columnMenuFilter")})]})}function upe(e){var t;const{colDef:n,onClick:r}=e,o=dt(),i=Ne(o,Eo),a=We(),l=v.useMemo(()=>{if(!n)return null;const d=i.find(f=>f.field===n.field);return d==null?void 0:d.sort},[n,i]),s=(t=n.sortingOrder)!=null?t:a.sortingOrder,u=v.useCallback(d=>{r(d);const f=d.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(n,f===l?null:f)},[o,n,r,l]);if(!n||!n.sortable||!s.some(d=>!!d))return null;const c=d=>{const f=o.current.getLocaleText(d);return typeof f=="function"?f(n):f};return N.jsxs(v.Fragment,{children:[s.includes("asc")&&l!=="asc"?N.jsxs(uo,{onClick:u,"data-value":"asc",children:[N.jsx(vn,{children:N.jsx(a.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),N.jsx(Rn,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&l!=="desc"?N.jsxs(uo,{onClick:u,"data-value":"desc",children:[N.jsx(vn,{children:N.jsx(a.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),N.jsx(Rn,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&l!=null?N.jsxs(uo,{onClick:u,children:[N.jsx(vn,{}),N.jsx(Rn,{children:o.current.getLocaleText("columnMenuUnsort")})]}):null]})}const cpe=["defaultSlots","defaultSlotProps","slots","slotProps"],dpe={columnMenuSortItem:upe,columnMenuFilterItem:spe,columnMenuColumnsItem:lpe},fpe={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},ppe=v.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,l=ue(t,cpe),s=ope(I({},l,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return N.jsx(npe,I({ref:n},l,{children:s.map(([u,c],d)=>N.jsx(u,I({},c),d))}))}),mpe=v.forwardRef(function(t,n){return N.jsx(ppe,I({},t,{ref:n,defaultSlots:dpe,defaultSlotProps:fpe}))});function hpe(e){return Be("PrivateSwitchBase",e)}He("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const gpe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],vpe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${pe(o)}`],input:["input"]};return Ie(i,hpe,t)},ype=de(Zi)(({ownerState:e})=>I({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),bpe=de("input",{shouldForwardProp:gr})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),xpe=v.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:l,disabled:s,disableFocusRipple:u=!1,edge:c=!1,icon:d,id:f,inputProps:m,inputRef:p,name:h,onBlur:y,onChange:b,onFocus:g,readOnly:x,required:w=!1,tabIndex:P,type:C,value:E}=t,S=ue(t,gpe),[M,O]=Ql({controlled:o,default:!!l,name:"SwitchBase",state:"checked"}),R=rl(),_=z=>{g&&g(z),R&&R.onFocus&&R.onFocus(z)},D=z=>{y&&y(z),R&&R.onBlur&&R.onBlur(z)},T=z=>{if(z.nativeEvent.defaultPrevented)return;const B=z.target.checked;O(B),b&&b(z,B)};let F=s;R&&typeof F>"u"&&(F=R.disabled);const j=C==="checkbox"||C==="radio",$=I({},t,{checked:M,disabled:F,disableFocusRipple:u,edge:c}),L=vpe($);return N.jsxs(ype,I({component:"span",className:he(L.root,a),centerRipple:!0,focusRipple:!u,disabled:F,tabIndex:null,role:void 0,onFocus:_,onBlur:D,ownerState:$,ref:n},S,{children:[N.jsx(bpe,I({autoFocus:r,checked:o,defaultChecked:l,className:L.input,disabled:F,id:j?f:void 0,name:h,onChange:T,readOnly:x,ref:p,required:w,ownerState:$,tabIndex:P,type:C},C==="checkbox"&&E===void 0?{}:{value:E},m)),M?i:d]}))}),gj=xpe;function wpe(e){return Be("MuiSwitch",e)}const Cpe=He("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),sr=Cpe,Spe=["className","color","edge","size","sx"],Epe=JE(),Ppe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,l={root:["root",n&&`edge${pe(n)}`,`size${pe(r)}`],switchBase:["switchBase",`color${pe(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},s=Ie(l,wpe,t);return I({},t,s)},kpe=de("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${pe(n.edge)}`],t[`size${pe(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,[`& .${sr.thumb}`]:{width:16,height:16},[`& .${sr.switchBase}`]:{padding:4,[`&.${sr.checked}`]:{transform:"translateX(16px)"}}}}]}),$pe=de(gj,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${sr.input}`]:t.input},n.color!=="default"&&t[`color${pe(n.color)}`]]}})(({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}),[`&.${sr.checked}`]:{transform:"translateX(20px)"},[`&.${sr.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${sr.checked} + .${sr.track}`]:{opacity:.5},[`&.${sr.disabled} + .${sr.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${sr.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${sr.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${sr.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?OE(e.palette[t].main,.62):IE(e.palette[t].main,.55)}`}},[`&.${sr.checked} + .${sr.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),Ipe=de("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({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}`})),Ope=de("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Mpe=v.forwardRef(function(t,n){const r=Epe({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:l="medium",sx:s}=r,u=ue(r,Spe),c=I({},r,{color:i,edge:a,size:l}),d=Ppe(c),f=N.jsx(Ope,{className:d.thumb,ownerState:c});return N.jsxs(kpe,{className:he(d.root,o),sx:s,ownerState:c,children:[N.jsx($pe,I({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:c},u,{classes:I({},d,{root:d.switchBase})})),N.jsx(Ipe,{className:d.track,ownerState:c})]})}),Rpe=Mpe;function Tpe(e){return Be("MuiFormControl",e)}He("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _pe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Fpe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${pe(n)}`,r&&"fullWidth"]};return Ie(o,Tpe,t)},Ape=de("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>I({},t.root,t[`margin${pe(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>I({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Lpe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:l="div",disabled:s=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:f=!1,margin:m="none",required:p=!1,size:h="medium",variant:y="outlined"}=r,b=ue(r,_pe),g=I({},r,{color:a,component:l,disabled:s,error:u,fullWidth:d,hiddenLabel:f,margin:m,required:p,size:h,variant:y}),x=Fpe(g),[w,P]=v.useState(()=>{let D=!1;return o&&v.Children.forEach(o,T=>{if(!jf(T,["Input","Select"]))return;const F=jf(T,["Select"])?T.props.input:T;F&&nce(F.props)&&(D=!0)}),D}),[C,E]=v.useState(()=>{let D=!1;return o&&v.Children.forEach(o,T=>{jf(T,["Input","Select"])&&(vv(T.props,!0)||vv(T.props.inputProps,!0))&&(D=!0)}),D}),[S,M]=v.useState(!1);s&&S&&M(!1);const O=c!==void 0&&!s?c:S;let R;const _=v.useMemo(()=>({adornedStart:w,setAdornedStart:P,color:a,disabled:s,error:u,filled:C,focused:O,fullWidth:d,hiddenLabel:f,size:h,onBlur:()=>{M(!1)},onEmpty:()=>{E(!1)},onFilled:()=>{E(!0)},onFocus:()=>{M(!0)},registerEffect:R,required:p,variant:y}),[w,a,s,u,C,O,d,f,R,p,h,y]);return N.jsx(b0.Provider,{value:_,children:N.jsx(Ape,I({as:l,ownerState:g,className:he(x.root,i),ref:n},b,{children:o}))})}),yP=Lpe;function Dpe(e){return Be("MuiFormControlLabel",e)}const Npe=He("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),bf=Npe,jpe=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],zpe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${pe(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return Ie(a,Dpe,t)},Bpe=de("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bf.label}`]:t.label},t.root,t[`labelPlacement${pe(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>I({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${bf.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${bf.label}`]:{[`&.${bf.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Hpe=de("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${bf.error}`]:{color:(e.vars||e).palette.error.main}})),Vpe=v.forwardRef(function(t,n){var r,o;const i=Ue({props:t,name:"MuiFormControlLabel"}),{className:a,componentsProps:l={},control:s,disabled:u,disableTypography:c,label:d,labelPlacement:f="end",required:m,slotProps:p={}}=i,h=ue(i,jpe),y=rl(),b=(r=u??s.props.disabled)!=null?r:y==null?void 0:y.disabled,g=m??s.props.required,x={disabled:b,required:g};["checked","name","onChange","value","inputRef"].forEach(M=>{typeof s.props[M]>"u"&&typeof i[M]<"u"&&(x[M]=i[M])});const w=Pu({props:i,muiFormControl:y,states:["error"]}),P=I({},i,{disabled:b,labelPlacement:f,required:g,error:w.error}),C=zpe(P),E=(o=p.typography)!=null?o:l.typography;let S=d;return S!=null&&S.type!==Xe&&!c&&(S=N.jsx(Xe,I({component:"span"},E,{className:he(C.label,E==null?void 0:E.className),children:S}))),N.jsxs(Bpe,I({className:he(C.root,a),ownerState:P,ref:n},h,{children:[v.cloneElement(s,x),g?N.jsxs(dr,{display:"block",children:[S,N.jsxs(Hpe,{ownerState:P,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):S]}))}),bP=Vpe,Upe=["className"],Wpe=e=>{const{classes:t}=e;return Ie({root:["panelContent"]},ft,t)},Gpe=zn("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function vj(e){const{className:t}=e,n=ue(e,Upe),r=We(),o=Wpe(r);return N.jsx(Gpe,I({className:he(t,o.root),ownerState:r},n))}const qpe=["className"],Kpe=e=>{const{classes:t}=e;return Ie({root:["panelFooter"]},ft,t)},Qpe=zn("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function yj(e){const{className:t}=e,n=ue(e,qpe),r=We(),o=Kpe(r);return N.jsx(Qpe,I({className:he(t,o.root),ownerState:r},n))}const Ype=["className"],Xpe=e=>{const{classes:t}=e;return Ie({root:["panelHeader"]},ft,t)},Zpe=zn("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})(({theme:e})=>({padding:e.spacing(1)}));function Jpe(e){const{className:t}=e,n=ue(e,Ype),r=We(),o=Xpe(r);return N.jsx(Zpe,I({className:he(t,o.root),ownerState:r},n))}const eme=["className","slotProps"],tme=e=>{const{classes:t}=e;return Ie({root:["panelWrapper"]},ft,t)},nme=de("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),rme=()=>!0,bj=v.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=ue(t,eme),a=We(),l=tme(a);return N.jsx(t4,I({open:!0,disableEnforceFocus:!0,isEnabled:rme},o.TrapFocus,{children:N.jsx(nme,I({ref:n,tabIndex:-1,className:he(r,l.root),ownerState:a},i))}))}),ome=!1,ime=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],ame=e=>{const{classes:t}=e;return Ie({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},ft,t)},lme=de("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),sme=de("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${sr.root}`]:{marginRight:e.spacing(.5)}})),ume=de(Nn)({justifyContent:"flex-end"}),g2=new Intl.Collator,cme=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;function dme(e){var t,n,r;const o=dt(),i=v.useRef(null),a=Ne(o,qi),l=Ne(o,mi),s=We(),[u,c]=v.useState(""),d=ame(s),{sort:f,searchPredicate:m=cme,autoFocusSearchField:p=!0,disableHideAllButton:h=!1,disableShowAllButton:y=!1,getTogglableColumns:b}=e,g=ue(e,ime),x=v.useMemo(()=>{switch(f){case"asc":return[...a].sort((R,_)=>g2.compare(R.headerName||R.field,_.headerName||_.field));case"desc":return[...a].sort((R,_)=>-g2.compare(R.headerName||R.field,_.headerName||_.field));default:return a}},[a,f]),w=R=>{const{name:_}=R.target;o.current.setColumnVisibility(_,l[_]===!1)},P=v.useCallback(R=>{const _=mi(o),D=I({},_),T=b?b(a):null;return a.forEach(F=>{F.hideable&&(T==null||T.includes(F.field))&&(R?delete D[F.field]:D[F.field]=!1)}),o.current.setColumnVisibilityModel(D)},[o,a,b]),C=v.useCallback(R=>{c(R.target.value)},[]),E=v.useMemo(()=>{const R=b?b(x):null,_=R?x.filter(({field:D})=>R.includes(D)):x;return u?_.filter(D=>m(D,u.toLowerCase())):_},[x,u,m,b]),S=v.useRef(null);v.useEffect(()=>{p?i.current.focus():S.current&&typeof S.current.focus=="function"&&S.current.focus()},[p]);let M=!1;const O=R=>M===!1&&R.hideable!==!1?(M=!0,!0):!1;return N.jsxs(bj,I({},g,{children:[N.jsx(Jpe,{children:N.jsx(s.slots.baseTextField,I({label:o.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:o.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:i,value:u,onChange:C,variant:"standard",fullWidth:!0},(t=s.slotProps)==null?void 0:t.baseTextField))}),N.jsx(vj,{children:N.jsx(lme,{className:d.root,ownerState:s,children:E.map(R=>{var _;return N.jsxs(sme,{className:d.columnsPanelRow,ownerState:s,children:[N.jsx(bP,{control:N.jsx(s.slots.baseSwitch,I({disabled:R.hideable===!1,checked:l[R.field]!==!1,onClick:w,name:R.field,size:"small",inputRef:O(R)?S:void 0},(_=s.slotProps)==null?void 0:_.baseSwitch)),label:R.headerName||R.field}),!s.disableColumnReorder&&ome&&N.jsx(ume,{draggable:!0,"aria-label":o.current.getLocaleText("columnsPanelDragIconLabel"),title:o.current.getLocaleText("columnsPanelDragIconLabel"),size:"small",disabled:!0,children:N.jsx(s.slots.columnReorderIcon,{})})]},R.field)})})}),y&&h?null:N.jsxs(yj,{children:[h?N.jsx("span",{}):N.jsx(s.slots.baseButton,I({onClick:()=>P(!1)},(n=s.slotProps)==null?void 0:n.baseButton,{disabled:h,children:o.current.getLocaleText("columnsPanelHideAllButton")})),y?null:N.jsx(s.slots.baseButton,I({onClick:()=>P(!0)},(r=s.slotProps)==null?void 0:r.baseButton,{disabled:y,children:o.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))}const fme=["children","className","classes"],pme=He("MuiDataGrid",["panel","paper"]),mme=de(Eu,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),hme=de(Jo,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"})),gme=v.forwardRef((e,t)=>{const{children:n,className:r}=e,o=ue(e,fme),i=dt(),a=We(),l=pme,[s,u]=v.useState(!1),c=v.useCallback(()=>{i.current.hidePreferences()},[i]),d=v.useCallback(h=>{yv(h.key)&&i.current.hidePreferences()},[i]),f=v.useMemo(()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{u(!0)},effect:()=>()=>{u(!1)}}],[]),[m,p]=v.useState(null);return v.useEffect(()=>{var h;const y=(h=i.current.rootElementRef)==null||(h=h.current)==null?void 0:h.querySelector(`.${ne.columnHeaders}`);y&&p(y)},[i]),m?N.jsx(mme,I({ref:t,placement:"bottom-start",className:he(r,l.panel),ownerState:a,anchorEl:m,modifiers:f},o,{children:N.jsx(FE,{mouseEvent:"onMouseUp",onClickAway:c,children:N.jsx(hme,{className:l.paper,ownerState:a,elevation:8,onKeyDown:d,children:s&&n})})})):null}),vme=v.forwardRef(function(t,n){var r,o,i;const a=dt(),l=Ne(a,qi),s=We(),u=Ne(a,$p),c=a.current.unstable_applyPipeProcessors("preferencePanel",null,(r=u.openedPanelValue)!=null?r:mu.filters);return N.jsx(s.slots.panel,I({ref:n,as:s.slots.basePopper,open:l.length>0&&u.open,id:u.panelId,"aria-labelledby":u.labelId},(o=s.slotProps)==null?void 0:o.panel,t,(i=s.slotProps)==null?void 0:i.basePopper,{children:c}))}),yme=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],bme=["InputComponentProps"],xme=e=>{const{classes:t}=e;return Ie({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},ft,t)},wme=de("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),Cme=de("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),Sme=de("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),Eme=de("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),Pme=de("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),kme=de("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),$me=e=>{switch(e){case er.And:return"filterPanelOperatorAnd";case er.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}},tf=e=>e.headerName||e.field,v2=new Intl.Collator,Ime=v.forwardRef(function(t,n){var r,o,i,a,l,s,u,c,d,f;const{item:m,hasMultipleFilters:p,deleteFilter:h,applyFilterChanges:y,multiFilterOperator:b,showMultiFilterOperators:g,disableMultiFilterOperator:x,applyMultiFilterOperatorChanges:w,focusElementRef:P,logicOperators:C=[er.And,er.Or],columnsSort:E,filterColumns:S,deleteIconProps:M={},logicOperatorInputProps:O={},operatorInputProps:R={},columnInputProps:_={},valueInputProps:D={}}=t,T=ue(t,yme),F=dt(),j=Ne(F,R4),$=Ne(F,Xn),L=_t(),z=_t(),B=_t(),A=_t(),H=We(),q=xme(H),U=v.useRef(null),G=v.useRef(null),Y=p&&C.length>0,re=((r=H.slotProps)==null?void 0:r.baseFormControl)||{},J=(i=(((o=H.slotProps)==null?void 0:o.baseSelect)||{}).native)!=null?i:!0,oe=((a=H.slotProps)==null?void 0:a.baseInputLabel)||{},ce=((l=H.slotProps)==null?void 0:l.baseSelectOption)||{},{InputComponentProps:ve}=D,me=ue(D,bme),ke=v.useMemo(()=>{if(S===void 0||typeof S!="function")return j;const te=S({field:m.field,columns:j,currentFilters:($==null?void 0:$.items)||[]});return j.filter(K=>te.includes(K.field))},[S,$==null?void 0:$.items,j,m.field]),be=v.useMemo(()=>{switch(E){case"asc":return ke.sort((te,K)=>v2.compare(tf(te),tf(K)));case"desc":return ke.sort((te,K)=>-v2.compare(tf(te),tf(K)));default:return ke}},[ke,E]),ie=m.field?F.current.getColumn(m.field):null,ye=v.useMemo(()=>{var te;return!m.operator||!ie?null:(te=ie.filterOperators)==null?void 0:te.find(K=>K.value===m.operator)},[m,ie]),V=v.useCallback(te=>{const K=te.target.value,ee=F.current.getColumn(K);if(ee.field===ie.field)return;const se=ee.filterOperators.find(_e=>_e.value===m.operator)||ee.filterOperators[0],Ce=!se.InputComponent||se.InputComponent!==(ye==null?void 0:ye.InputComponent)||ee.type!==ie.type;y(I({},m,{field:K,operator:se.value,value:Ce?void 0:m.value}))},[F,y,m,ie,ye]),Q=v.useCallback(te=>{const K=te.target.value,ee=ie==null?void 0:ie.filterOperators.find(Ce=>Ce.value===K),se=!(ee!=null&&ee.InputComponent)||(ee==null?void 0:ee.InputComponent)!==(ye==null?void 0:ye.InputComponent);y(I({},m,{operator:K,value:se?void 0:m.value}))},[y,m,ie,ye]),Z=v.useCallback(te=>{const K=te.target.value===er.And.toString()?er.And:er.Or;w(K)},[w]),ae=()=>{H.disableMultipleColumnsFiltering?m.value===void 0?h(m):y(I({},m,{value:void 0})):h(m)};return v.useImperativeHandle(P,()=>({focus:()=>{if(ye!=null&&ye.InputComponent){var te;U==null||(te=U.current)==null||te.focus()}else G.current.focus()}}),[ye]),N.jsxs(wme,I({ref:n,className:q.root,"data-id":m.id,ownerState:H},T,{children:[N.jsx(Cme,I({variant:"standard",as:H.slots.baseFormControl},re,M,{className:he(q.deleteIcon,re.className,M.className),ownerState:H,children:N.jsx(H.slots.baseIconButton,I({"aria-label":F.current.getLocaleText("filterPanelDeleteIconLabel"),title:F.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:ae,size:"small"},(s=H.slotProps)==null?void 0:s.baseIconButton,{children:N.jsx(H.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),N.jsx(Sme,I({variant:"standard",as:H.slots.baseFormControl},re,O,{sx:I({display:Y?"flex":"none",visibility:g?"visible":"hidden"},re.sx||{},O.sx||{}),className:he(q.logicOperatorInput,re.className,O.className),ownerState:H,children:N.jsx(H.slots.baseSelect,I({inputProps:{"aria-label":F.current.getLocaleText("filterPanelLogicOperator")},value:b,onChange:Z,disabled:!!x||C.length===1,native:J},(u=H.slotProps)==null?void 0:u.baseSelect,{children:C.map(te=>v.createElement(H.slots.baseSelectOption,I({},ce,{native:J,key:te.toString(),value:te.toString()}),F.current.getLocaleText($me(te))))}))})),N.jsxs(Eme,I({variant:"standard",as:H.slots.baseFormControl},re,_,{className:he(q.columnInput,re.className,_.className),ownerState:H,children:[N.jsx(H.slots.baseInputLabel,I({},oe,{htmlFor:L,id:z,children:F.current.getLocaleText("filterPanelColumns")})),N.jsx(H.slots.baseSelect,I({labelId:z,id:L,label:F.current.getLocaleText("filterPanelColumns"),value:m.field||"",onChange:V,native:J},(c=H.slotProps)==null?void 0:c.baseSelect,{children:be.map(te=>v.createElement(H.slots.baseSelectOption,I({},ce,{native:J,key:te.field,value:te.field}),tf(te)))}))]})),N.jsxs(Pme,I({variant:"standard",as:H.slots.baseFormControl},re,R,{className:he(q.operatorInput,re.className,R.className),ownerState:H,children:[N.jsx(H.slots.baseInputLabel,I({},oe,{htmlFor:B,id:A,children:F.current.getLocaleText("filterPanelOperator")})),N.jsx(H.slots.baseSelect,I({labelId:A,label:F.current.getLocaleText("filterPanelOperator"),id:B,value:m.operator,onChange:Q,native:J,inputRef:G},(d=H.slotProps)==null?void 0:d.baseSelect,{children:ie==null||(f=ie.filterOperators)==null?void 0:f.map(te=>v.createElement(H.slots.baseSelectOption,I({},ce,{native:J,key:te.value,value:te.value}),te.label||F.current.getLocaleText(`filterOperator${pe(te.value)}`)))}))]})),N.jsx(kme,I({variant:"standard",as:H.slots.baseFormControl},re,me,{className:he(q.valueInput,re.className,me.className),ownerState:H,children:ye!=null&&ye.InputComponent?N.jsx(ye.InputComponent,I({apiRef:F,item:m,applyValue:y,focusElementRef:U},ye.InputComponentProps,ve)):null}))]}))});class xP{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new xP}start(t,n){this.clear(),this.currentId=setTimeout(n,t)}}function wP(){const e=nP(xP.create).current;return O4(e.disposeEffect),e}const Ome=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function Ni(e){var t,n;const{item:r,applyValue:o,type:i,apiRef:a,focusElementRef:l,tabIndex:s,disabled:u,clearButton:c,InputProps:d,variant:f="standard"}=e,m=ue(e,Ome),p=wP(),[h,y]=v.useState((t=r.value)!=null?t:""),[b,g]=v.useState(!1),x=_t(),w=We(),P=v.useCallback(C=>{const{value:E}=C.target;y(String(E)),g(!0),p.start(w.filterDebounceMs,()=>{const S=I({},r,{value:E,fromInput:x});o(S),g(!1)})},[x,o,r,w.filterDebounceMs,p]);return v.useEffect(()=>{if(r.fromInput!==x||r.value===void 0){var E;y(String((E=r.value)!=null?E:""))}},[x,r]),N.jsx(w.slots.baseTextField,I({id:x,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:h,onChange:P,variant:f,type:i||"text",InputProps:I({},b||c?{endAdornment:b?N.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):c}:{},{disabled:u},d,{inputProps:I({tabIndex:s},d==null?void 0:d.inputProps)}),InputLabelProps:{shrink:!0},inputRef:l},m,(n=w.slotProps)==null?void 0:n.baseTextField))}const Mme=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Nu(e){var t,n;const{item:r,applyValue:o,type:i,apiRef:a,focusElementRef:l,InputProps:s,clearButton:u,tabIndex:c,disabled:d}=e,f=ue(e,Mme),m=wP(),[p,h]=v.useState((t=r.value)!=null?t:""),[y,b]=v.useState(!1),g=_t(),x=We(),w=v.useCallback(P=>{const C=P.target.value;h(String(C)),b(!0),m.start(x.filterDebounceMs,()=>{o(I({},r,{value:C})),b(!1)})},[o,r,x.filterDebounceMs,m]);return v.useEffect(()=>{var P;const C=(P=r.value)!=null?P:"";h(String(C))},[r.value]),N.jsx(x.slots.baseTextField,I({fullWidth:!0,id:g,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:w,variant:"standard",type:i||"text",InputLabelProps:{shrink:!0},inputRef:l,InputProps:I({},y||u?{endAdornment:y?N.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):u}:{},{disabled:d},s,{inputProps:I({max:i==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:c},s==null?void 0:s.inputProps)})},f,(n=x.slotProps)==null?void 0:n.baseTextField))}const Rme=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],Tme=({column:{valueOptions:e,field:t},OptionComponent:n,getOptionLabel:r,getOptionValue:o,isSelectNative:i,baseSelectOptionProps:a})=>(typeof e=="function"?["",...e({field:t})]:["",...e||[]]).map(s=>{const u=o(s),c=r(s);return v.createElement(n,I({},a,{native:i,key:u,value:u}),c)}),_me=de("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function y2(e){var t,n,r,o,i,a,l,s;const{item:u,applyValue:c,type:d,apiRef:f,focusElementRef:m,getOptionLabel:p,getOptionValue:h,placeholder:y,tabIndex:b,label:g,variant:x="standard",clearButton:w}=e,P=ue(e,Rme),[C,E]=v.useState((t=u.value)!=null?t:""),S=_t(),M=_t(),O=We(),R=(n=(r=O.slotProps)==null||(r=r.baseSelect)==null?void 0:r.native)!=null?n:!0;let _=null;if(u.field){const L=f.current.getColumn(u.field);Qs(L)&&(_=L)}const D=h||((o=_)==null?void 0:o.getOptionValue),T=p||((i=_)==null?void 0:i.getOptionLabel),F=v.useMemo(()=>{if(_)return typeof _.valueOptions=="function"?_.valueOptions({field:_.field}):_.valueOptions},[_]),j=v.useCallback(L=>{let z=L.target.value;z=Gw(z,F,D),E(String(z)),c(I({},u,{value:z}))},[F,D,c,u]);if(v.useEffect(()=>{var L;let z;if(F!==void 0){if(z=Gw(u.value,F,D),z!==u.value){c(I({},u,{value:z}));return}}else z=u.value;z=(L=z)!=null?L:"",E(String(z))},[u,F,c,D]),!Qs(_)||!Qs(_))return null;const $=g??f.current.getLocaleText("filterPanelInputLabel");return N.jsxs(_me,{children:[N.jsxs(O.slots.baseFormControl,{children:[N.jsx(O.slots.baseInputLabel,I({},(a=O.slotProps)==null?void 0:a.baseInputLabel,{id:M,htmlFor:S,shrink:!0,variant:x,children:$})),N.jsx(O.slots.baseSelect,I({id:S,label:$,labelId:M,value:C,onChange:j,variant:x,type:d||"text",inputProps:{tabIndex:b,ref:m,placeholder:y??f.current.getLocaleText("filterPanelInputPlaceholder")},native:R,notched:x==="outlined"?!0:void 0},P,(l=O.slotProps)==null?void 0:l.baseSelect,{children:Tme({column:_,OptionComponent:O.slots.baseSelectOption,getOptionLabel:T,getOptionValue:D,isSelectNative:R,baseSelectOptionProps:(s=O.slotProps)==null?void 0:s.baseSelectOption})}))]}),w]})}const Fme=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],Ame=de("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Lme(e){var t,n,r,o;const{item:i,applyValue:a,apiRef:l,focusElementRef:s,clearButton:u,tabIndex:c,label:d,variant:f="standard"}=e,m=ue(e,Fme),[p,h]=v.useState(i.value||""),y=We(),b=_t(),g=_t(),x=((t=y.slotProps)==null?void 0:t.baseSelect)||{},w=(n=x.native)!=null?n:!0,P=((r=y.slotProps)==null?void 0:r.baseSelectOption)||{},C=v.useCallback(S=>{const M=S.target.value;h(M),a(I({},i,{value:M}))},[a,i]);v.useEffect(()=>{h(i.value||"")},[i.value]);const E=d??l.current.getLocaleText("filterPanelInputLabel");return N.jsxs(Ame,{children:[N.jsxs(y.slots.baseFormControl,{fullWidth:!0,children:[N.jsx(y.slots.baseInputLabel,I({},(o=y.slotProps)==null?void 0:o.baseInputLabel,{id:b,shrink:!0,variant:f,children:E})),N.jsxs(y.slots.baseSelect,I({labelId:b,id:g,label:E,value:p,onChange:C,variant:f,notched:f==="outlined"?!0:void 0,native:w,displayEmpty:!0,inputProps:{ref:s,tabIndex:c}},m,x,{children:[N.jsx(y.slots.baseSelectOption,I({},P,{native:w,value:"",children:l.current.getLocaleText("filterValueAny")})),N.jsx(y.slots.baseSelectOption,I({},P,{native:w,value:"true",children:l.current.getLocaleText("filterValueTrue")})),N.jsx(y.slots.baseSelectOption,I({},P,{native:w,value:"false",children:l.current.getLocaleText("filterValueFalse")}))]}))]}),u]})}const Dme=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],b2=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),Nme=v.forwardRef(function(t,n){var r,o;const i=dt(),a=We(),l=Ne(i,Xn),s=Ne(i,R4),u=v.useRef(null),c=v.useRef(null),{logicOperators:d=[er.And,er.Or],columnsSort:f,filterFormProps:m,getColumnForNewFilter:p,disableAddFilterButton:h=!1,disableRemoveAllButton:y=!1}=t,b=ue(t,Dme),g=i.current.upsertFilterItem,x=v.useCallback(R=>{i.current.setFilterLogicOperator(R)},[i]),w=v.useCallback(()=>{let R;if(p&&typeof p=="function"){const _=p({currentFilters:(l==null?void 0:l.items)||[],columns:s});if(_===null)return null;R=s.find(({field:D})=>D===_)}else R=s.find(_=>{var D;return(D=_.filterOperators)==null?void 0:D.length});return R?b2(R):null},[l==null?void 0:l.items,s,p]),P=v.useCallback(()=>{if(p===void 0||typeof p!="function")return w();const R=l.items.length?l.items:[w()].filter(Boolean),_=p({currentFilters:R,columns:s});if(_===null)return null;const D=s.find(({field:T})=>T===_);return D?b2(D):null},[l.items,s,p,w]),C=v.useMemo(()=>l.items.length?l.items:(c.current||(c.current=w()),c.current?[c.current]:[]),[l.items,w]),E=C.length>1,S=()=>{const R=P();R&&i.current.upsertFilterItems([...C,R])},M=v.useCallback(R=>{const _=C.length===1;i.current.deleteFilterItem(R),_&&i.current.hideFilterPanel()},[i,C.length]),O=()=>{C.length===1&&C[0].value===void 0&&(i.current.deleteFilterItem(C[0]),i.current.hideFilterPanel()),i.current.setFilterModel(I({},l,{items:[]}))};return v.useEffect(()=>{d.length>0&&l.logicOperator&&!d.includes(l.logicOperator)&&x(d[0])},[d,x,l.logicOperator]),v.useEffect(()=>{C.length>0&&u.current.focus()},[C.length]),N.jsxs(bj,I({ref:n},b,{children:[N.jsx(vj,{children:C.map((R,_)=>N.jsx(Ime,I({item:R,applyFilterChanges:g,deleteFilter:M,hasMultipleFilters:E,showMultiFilterOperators:_>0,multiFilterOperator:l.logicOperator,disableMultiFilterOperator:_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:_===C.length-1?u:null,logicOperators:d,columnsSort:f},m),R.id==null?_:R.id))}),!a.disableMultipleColumnsFiltering&&!(h&&y)?N.jsxs(yj,{children:[h?N.jsx("span",{}):N.jsx(a.slots.baseButton,I({onClick:S,startIcon:N.jsx(a.slots.filterPanelAddIcon,{})},(r=a.slotProps)==null?void 0:r.baseButton,{children:i.current.getLocaleText("filterPanelAddFilter")})),y?null:N.jsx(a.slots.baseButton,I({onClick:O,startIcon:N.jsx(a.slots.filterPanelRemoveAllIcon,{})},(o=a.slotProps)==null?void 0:o.baseButton,{children:i.current.getLocaleText("filterPanelRemoveAll")}))]}):null]}))});function jme(e){return Be("MuiListSubheader",e)}He("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const zme=["className","color","component","disableGutters","disableSticky","inset"],Bme=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${pe(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Ie(a,jme,t)},Hme=de("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${pe(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>I({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)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),xj=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:l=!1,disableSticky:s=!1,inset:u=!1}=r,c=ue(r,zme),d=I({},r,{color:i,component:a,disableGutters:l,disableSticky:s,inset:u}),f=Bme(d);return N.jsx(Hme,I({as:a,className:he(f.root,o),ref:n,ownerState:d},c))});xj.muiSkipListHighlight=!0;const Vme=xj,Ume=tt(N.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"}),"Cancel");function Wme(e){return Be("MuiChip",e)}const Gme=He("MuiChip",["root","sizeSmall","sizeMedium","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"]),Pt=Gme,qme=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Kme=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:s}=e,u={root:["root",s,n&&"disabled",`size${pe(r)}`,`color${pe(o)}`,l&&"clickable",l&&`clickableColor${pe(o)}`,a&&"deletable",a&&`deletableColor${pe(o)}`,`${s}${pe(o)}`],label:["label",`label${pe(r)}`],avatar:["avatar",`avatar${pe(r)}`,`avatarColor${pe(o)}`],icon:["icon",`icon${pe(r)}`,`iconColor${pe(i)}`],deleteIcon:["deleteIcon",`deleteIcon${pe(r)}`,`deleteIconColor${pe(o)}`,`deleteIcon${pe(s)}Color${pe(o)}`]};return Ie(u,Wme,t)},Qme=de("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:l,variant:s}=n;return[{[`& .${Pt.avatar}`]:t.avatar},{[`& .${Pt.avatar}`]:t[`avatar${pe(l)}`]},{[`& .${Pt.avatar}`]:t[`avatarColor${pe(r)}`]},{[`& .${Pt.icon}`]:t.icon},{[`& .${Pt.icon}`]:t[`icon${pe(l)}`]},{[`& .${Pt.icon}`]:t[`iconColor${pe(o)}`]},{[`& .${Pt.deleteIcon}`]:t.deleteIcon},{[`& .${Pt.deleteIcon}`]:t[`deleteIcon${pe(l)}`]},{[`& .${Pt.deleteIcon}`]:t[`deleteIconColor${pe(r)}`]},{[`& .${Pt.deleteIcon}`]:t[`deleteIcon${pe(s)}Color${pe(r)}`]},t.root,t[`size${pe(l)}`],t[`color${pe(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${pe(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${pe(r)}`],t[s],t[`${s}${pe(r)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return I({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",[`&.${Pt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Pt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Pt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Pt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Pt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Pt.icon}`]:I({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&I({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},t.color!=="default"&&{color:"inherit"})),[`& .${Pt.deleteIcon}`]:I({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:rt(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)`:rt(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:rt(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Pt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Pt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>I({},t.clickable&&{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}))`:rt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Pt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Pt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>I({},t.variant==="outlined"&&{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]}`,[`&.${Pt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Pt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Pt.avatar}`]:{marginLeft:4},[`& .${Pt.avatarSmall}`]:{marginLeft:2},[`& .${Pt.icon}`]:{marginLeft:4},[`& .${Pt.iconSmall}`]:{marginLeft:2},[`& .${Pt.deleteIcon}`]:{marginRight:5},[`& .${Pt.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:rt(e.palette[t.color].main,.7)}`,[`&.${Pt.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Pt.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:rt(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Pt.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:rt(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),Yme=de("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${pe(r)}`]]}})(({ownerState:e})=>I({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function x2(e){return e.key==="Backspace"||e.key==="Delete"}const Xme=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:l="default",component:s,deleteIcon:u,disabled:c=!1,icon:d,label:f,onClick:m,onDelete:p,onKeyDown:h,onKeyUp:y,size:b="medium",variant:g="filled",tabIndex:x,skipFocusWhenDisabled:w=!1}=r,P=ue(r,qme),C=v.useRef(null),E=vt(C,n),S=z=>{z.stopPropagation(),p&&p(z)},M=z=>{z.currentTarget===z.target&&x2(z)&&z.preventDefault(),h&&h(z)},O=z=>{z.currentTarget===z.target&&(p&&x2(z)?p(z):z.key==="Escape"&&C.current&&C.current.blur()),y&&y(z)},R=a!==!1&&m?!0:a,_=R||p?Zi:s||"div",D=I({},r,{component:_,disabled:c,size:b,color:l,iconColor:v.isValidElement(d)&&d.props.color||l,onDelete:!!p,clickable:R,variant:g}),T=Kme(D),F=_===Zi?I({component:s||"div",focusVisibleClassName:T.focusVisible},p&&{disableRipple:!0}):{};let j=null;p&&(j=u&&v.isValidElement(u)?v.cloneElement(u,{className:he(u.props.className,T.deleteIcon),onClick:S}):N.jsx(Ume,{className:he(T.deleteIcon),onClick:S}));let $=null;o&&v.isValidElement(o)&&($=v.cloneElement(o,{className:he(T.avatar,o.props.className)}));let L=null;return d&&v.isValidElement(d)&&(L=v.cloneElement(d,{className:he(T.icon,d.props.className)})),N.jsxs(Qme,I({as:_,className:he(T.root,i),disabled:R&&c?!0:void 0,onClick:m,onKeyDown:M,onKeyUp:O,ref:E,tabIndex:w&&c?-1:x,ownerState:D},F,P,{children:[$||L,N.jsx(Yme,{className:he(T.label),ownerState:D,children:f}),j]}))}),E0=Xme;function Zme(e){return Be("MuiInput",e)}const Jme=I({},no,He("MuiInput",["root","underline","input"])),Rl=Jme;function ehe(e){return Be("MuiOutlinedInput",e)}const the=I({},no,He("MuiOutlinedInput",["root","notchedOutline","input"])),_i=the;function nhe(e){return Be("MuiFilledInput",e)}const rhe=I({},no,He("MuiFilledInput",["root","underline","input"])),ro=rhe,ohe=tt(N.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"}),"Close"),wj=tt(N.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function ihe(e){return Be("MuiAutocomplete",e)}const ahe=He("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"]),ct=ahe;var w2,C2;const lhe=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],she=["ref"],uhe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:l,inputFocused:s,popupOpen:u,size:c}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",s&&"inputFocused"],tag:["tag",`tagSize${pe(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ie(d,ihe,t)},che=de("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:l}=n;return[{[`& .${ct.tag}`]:t.tag},{[`& .${ct.tag}`]:t[`tagSize${pe(l)}`]},{[`& .${ct.inputRoot}`]:t.inputRoot},{[`& .${ct.input}`]:t.input},{[`& .${ct.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})(({ownerState:e})=>I({[`&.${ct.focused} .${ct.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${ct.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${ct.tag}`]:I({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${ct.inputRoot}`]:{flexWrap:"wrap",[`.${ct.hasPopupIcon}&, .${ct.hasClearIcon}&`]:{paddingRight:26+4},[`.${ct.hasPopupIcon}.${ct.hasClearIcon}&`]:{paddingRight:52+4},[`& .${ct.input}`]:{width:0,minWidth:30}},[`& .${Rl.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Rl.root}.${no.sizeSmall}`]:{[`& .${Rl.input}`]:{padding:"2px 4px 3px 0"}},[`& .${_i.root}`]:{padding:9,[`.${ct.hasPopupIcon}&, .${ct.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${ct.hasPopupIcon}.${ct.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${ct.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${ct.endAdornment}`]:{right:9}},[`& .${_i.root}.${no.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${ct.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ro.root}`]:{paddingTop:19,paddingLeft:8,[`.${ct.hasPopupIcon}&, .${ct.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${ct.hasPopupIcon}.${ct.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${ro.input}`]:{padding:"7px 4px"},[`& .${ct.endAdornment}`]:{right:9}},[`& .${ro.root}.${no.sizeSmall}`]:{paddingBottom:1,[`& .${ro.input}`]:{padding:"2.5px 4px"}},[`& .${no.hiddenLabel}`]:{paddingTop:8},[`& .${ro.root}.${no.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${ct.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ro.root}.${no.hiddenLabel}.${no.sizeSmall}`]:{[`& .${ct.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${ct.input}`]:I({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),dhe=de("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),fhe=de(Nn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),phe=de(Nn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>I({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})(({ownerState:e})=>I({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),mhe=de(Eu,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ct.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(({theme:e,ownerState:t})=>I({zIndex:(e.vars||e).zIndex.modal},t.disablePortal&&{position:"absolute"})),hhe=de(Jo,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>I({},e.typography.body1,{overflow:"auto"})),ghe=de("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),vhe=de("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),yhe=de("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${ct.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"},[`&.${ct.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"},[`&.${ct.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})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ct.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${ct.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),bhe=de(Vme,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),xhe=de("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${ct.option}`]:{paddingLeft:24}}),whe=v.forwardRef(function(t,n){var r,o,i,a;const l=Ue({props:t,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:d=!1,ChipProps:f,className:m,clearIcon:p=w2||(w2=N.jsx(ohe,{fontSize:"small"})),clearOnBlur:h=!l.freeSolo,clearOnEscape:y=!1,clearText:b="Clear",closeText:g="Close",componentsProps:x={},defaultValue:w=l.multiple?[]:null,disableClearable:P=!1,disableCloseOnSelect:C=!1,disabled:E=!1,disabledItemsFocusable:S=!1,disableListWrap:M=!1,disablePortal:O=!1,filterSelectedOptions:R=!1,forcePopupIcon:_="auto",freeSolo:D=!1,fullWidth:T=!1,getLimitTagsText:F=Fe=>`+${Fe}`,getOptionLabel:j,groupBy:$,handleHomeEndKeys:L=!l.freeSolo,includeInputInList:z=!1,limitTags:B=-1,ListboxComponent:A="ul",ListboxProps:H,loading:q=!1,loadingText:U="Loading…",multiple:G=!1,noOptionsText:Y="No options",openOnFocus:re=!1,openText:le="Open",PaperComponent:J=Jo,PopperComponent:oe=Eu,popupIcon:ce=C2||(C2=N.jsx(wj,{})),readOnly:ve=!1,renderGroup:me,renderInput:ke,renderOption:be,renderTags:ie,selectOnFocus:ye=!l.freeSolo,size:V="medium",slotProps:Q={}}=l,Z=ue(l,lhe),{getRootProps:ae,getInputProps:te,getInputLabelProps:K,getPopupIndicatorProps:ee,getClearProps:se,getTagProps:Ce,getListboxProps:_e,getOptionProps:$e,value:X,dirty:Ee,expanded:De,id:Te,popupOpen:Pe,focused:Re,focusedTag:Ge,anchorEl:at,setAnchorEl:It,inputValue:Gt,groupedOptions:ot}=ece(I({},l,{componentName:"Autocomplete"})),Pn=!P&&!E&&Ee&&!ve,tn=(!D||_===!0)&&_!==!1,{onMouseDown:Tr}=te(),{ref:St}=H??{},ut=_e(),{ref:Et}=ut,Qr=ue(ut,she),ni=vt(Et,St),Yr=j||(Fe=>{var Ze;return(Ze=Fe.label)!=null?Ze:Fe}),an=I({},l,{disablePortal:O,expanded:De,focused:Re,fullWidth:T,getOptionLabel:Yr,hasClearIcon:Pn,hasPopupIcon:tn,inputFocused:Ge===-1,popupOpen:Pe,size:V}),Dt=uhe(an);let kn;if(G&&X.length>0){const Fe=Ze=>I({className:Dt.tag,disabled:E},Ce(Ze));ie?kn=ie(X,Fe,an):kn=X.map((Ze,Ve)=>N.jsx(E0,I({label:Yr(Ze),size:V},Fe({index:Ve}),f)))}if(B>-1&&Array.isArray(kn)){const Fe=kn.length-B;!Re&&Fe>0&&(kn=kn.splice(0,B),kn.push(N.jsx("span",{className:Dt.tag,children:F(Fe)},kn.length)))}const vo=me||(Fe=>N.jsxs("li",{children:[N.jsx(bhe,{className:Dt.groupLabel,ownerState:an,component:"div",children:Fe.group}),N.jsx(xhe,{className:Dt.groupUl,ownerState:an,children:Fe.children})]},Fe.key)),ri=be||((Fe,Ze)=>v.createElement("li",I({},Fe,{key:Fe.key}),Yr(Ze))),Pi=(Fe,Ze)=>{const Ve=$e({option:Fe,index:Ze});return ri(I({},Ve,{className:Dt.option}),Fe,{selected:Ve["aria-selected"],index:Ze,inputValue:Gt},an)},yo=(r=Q.clearIndicator)!=null?r:x.clearIndicator,Xr=(o=Q.paper)!=null?o:x.paper,ga=(i=Q.popper)!=null?i:x.popper,xe=(a=Q.popupIndicator)!=null?a:x.popupIndicator,ge=Fe=>N.jsx(mhe,I({as:oe,disablePortal:O,style:{width:at?at.clientWidth:null},ownerState:an,role:"presentation",anchorEl:at,open:Pe},ga,{className:he(Dt.popper,ga==null?void 0:ga.className),children:N.jsx(hhe,I({ownerState:an,as:J},Xr,{className:he(Dt.paper,Xr==null?void 0:Xr.className),children:Fe}))}));let je=null;return!q&&ot.length>0?je=ge(N.jsx(yhe,I({as:A,className:Dt.listbox,ownerState:an},Qr,H,{ref:ni,children:ot.map((Fe,Ze)=>$?vo({key:Fe.key,group:Fe.group,children:Fe.options.map((Ve,gt)=>Pi(Ve,Fe.index+gt))}):Pi(Fe,Ze))}))):q&&ot.length===0?je=ge(N.jsx(ghe,{className:Dt.loading,ownerState:an,children:U})):ot.length===0&&!D&&!q&&(je=ge(N.jsx(vhe,{className:Dt.noOptions,ownerState:an,role:"presentation",onMouseDown:Fe=>{Fe.preventDefault()},children:Y}))),N.jsxs(v.Fragment,{children:[N.jsx(che,I({ref:n,className:he(Dt.root,m),ownerState:an},ae(Z),{children:ke({id:Te,disabled:E,fullWidth:!0,size:V==="small"?"small":void 0,InputLabelProps:K(),InputProps:I({ref:It,className:Dt.inputRoot,startAdornment:kn,onClick:Fe=>{Fe.target===Fe.currentTarget&&Tr(Fe)}},(Pn||tn)&&{endAdornment:N.jsxs(dhe,{className:Dt.endAdornment,ownerState:an,children:[Pn?N.jsx(fhe,I({},se(),{"aria-label":b,title:b,ownerState:an},yo,{className:he(Dt.clearIndicator,yo==null?void 0:yo.className),children:p})):null,tn?N.jsx(phe,I({},ee(),{disabled:E,"aria-label":Pe?g:le,title:Pe?g:le,ownerState:an},xe,{className:he(Dt.popupIndicator,xe==null?void 0:xe.className),children:ce})):null]})}),inputProps:I({className:Dt.input,disabled:E,readOnly:ve},te())})})),at?je:null]})}),Cj=whe,Che=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function Sj(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:l,helperText:s,size:u,variant:c}=e,d=ue(e,Che),f={color:a,error:l,helperText:s,size:u,variant:c},[m,p]=v.useState(t.value||[]),h=_t(),y=We();v.useEffect(()=>{var g;const x=(g=t.value)!=null?g:[];p(x.map(String))},[t.value]);const b=v.useCallback((g,x)=>{p(x.map(String)),n(I({},t,{value:[...x]}))},[n,t]);return N.jsx(Cj,I({multiple:!0,freeSolo:!0,options:[],filterOptions:(g,x)=>{const{inputValue:w}=x;return w==null||w===""?[]:[w]},id:h,value:m,onChange:b,renderTags:(g,x)=>g.map((w,P)=>N.jsx(y.slots.baseChip,I({variant:"outlined",size:"small",label:w},x({index:P})))),renderInput:g=>{var x;return N.jsx(y.slots.baseTextField,I({},g,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:I({},g.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(x=y.slotProps)==null?void 0:x.baseTextField))}},d))}const She=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],Ehe=W4();function Phe(e){var t,n;const{item:r,applyValue:o,apiRef:i,focusElementRef:a,color:l,error:s,helperText:u,size:c,variant:d="standard",getOptionLabel:f,getOptionValue:m}=e,p=ue(e,She),h={color:l,error:s,helperText:u,size:c,variant:d},y=_t(),b=We();let g=null;if(r.field){const O=i.current.getColumn(r.field);Qs(O)&&(g=O)}const x=m||((t=g)==null?void 0:t.getOptionValue),w=f||((n=g)==null?void 0:n.getOptionLabel),P=v.useCallback((O,R)=>x(O)===x(R),[x]),C=v.useMemo(()=>{var O;return(O=g)!=null&&O.valueOptions?typeof g.valueOptions=="function"?g.valueOptions({field:g.field}):g.valueOptions:[]},[g]),E=v.useMemo(()=>C==null?void 0:C.map(x),[C,x]),S=v.useMemo(()=>Array.isArray(r.value)?C!==void 0?r.value.map(R=>E==null?void 0:E.findIndex(_=>_===R)).filter(R=>R>=0).map(R=>C[R]):r.value:[],[r.value,C,E]);v.useEffect(()=>{(!Array.isArray(r.value)||S.length!==r.value.length)&&o(I({},r,{value:S.map(x)}))},[r,S,o,x]);const M=v.useCallback((O,R)=>{o(I({},r,{value:R.map(x)}))},[o,r,x]);return N.jsx(Cj,I({multiple:!0,options:C,isOptionEqualToValue:P,filterOptions:Ehe,id:y,value:S,onChange:M,getOptionLabel:w,renderTags:(O,R)=>O.map((_,D)=>N.jsx(b.slots.baseChip,I({variant:"outlined",size:"small",label:w(_)},R({index:D})))),renderInput:O=>{var R;return N.jsx(b.slots.baseTextField,I({},O,{label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:I({},O.InputLabelProps,{shrink:!0}),inputRef:a,type:"singleSelect"},h,(R=b.slotProps)==null?void 0:R.baseTextField))}},p))}const khe=["hideMenu","options"],$he=["hideMenu","options"];function Ihe(e){const t=dt(),{hideMenu:n,options:r}=e,o=ue(e,khe);return N.jsx(uo,I({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Ohe(e){const t=dt(),{hideMenu:n,options:r}=e,o=ue(e,$he);return N.jsx(uo,I({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const Mhe=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Rhe=e=>{const{classes:t,disableUnderline:n}=e,o=Ie({root:["root",!n&&"underline"],input:["input"]},Zme,t);return I({},t,o)},The=de(C0,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...x0(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),I({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,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"},[`&.${Rl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Rl.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,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(.${Rl.disabled}, .${Rl.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Rl.disabled}:before`]:{borderBottomStyle:"dotted"}})}),_he=de(S0,{name:"MuiInput",slot:"Input",overridesResolver:w0})({}),Ej=v.forwardRef(function(t,n){var r,o,i,a;const l=Ue({props:t,name:"MuiInput"}),{disableUnderline:s,components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:f="input",multiline:m=!1,slotProps:p,slots:h={},type:y="text"}=l,b=ue(l,Mhe),g=Rhe(l),w={root:{ownerState:{disableUnderline:s}}},P=p??c?Ir(p??c,w):w,C=(r=(o=h.root)!=null?o:u.Root)!=null?r:The,E=(i=(a=h.input)!=null?a:u.Input)!=null?i:_he;return N.jsx($d,I({slots:{root:C,input:E},slotProps:P,fullWidth:d,inputComponent:f,multiline:m,ref:n,type:y},b,{classes:g}))});Ej.muiName="Input";const Pj=Ej,Fhe=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Ahe=e=>{const{classes:t,disableUnderline:n}=e,o=Ie({root:["root",!n&&"underline"],input:["input"]},nhe,t);return I({},t,o)},Lhe=de(C0,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...x0(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return I({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,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:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${ro.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${ro.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,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"},[`&.${ro.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ro.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})`:o}`,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(.${ro.disabled}, .${ro.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ro.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&I({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),Dhe=de(S0,{name:"MuiFilledInput",slot:"Input",overridesResolver:w0})(({theme:e,ownerState:t})=>I({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"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),kj=v.forwardRef(function(t,n){var r,o,i,a;const l=Ue({props:t,name:"MuiFilledInput"}),{components:s={},componentsProps:u,fullWidth:c=!1,inputComponent:d="input",multiline:f=!1,slotProps:m,slots:p={},type:h="text"}=l,y=ue(l,Fhe),b=I({},l,{fullWidth:c,inputComponent:d,multiline:f,type:h}),g=Ahe(l),x={root:{ownerState:b},input:{ownerState:b}},w=m??u?Ir(x,m??u):x,P=(r=(o=p.root)!=null?o:s.Root)!=null?r:Lhe,C=(i=(a=p.input)!=null?a:s.Input)!=null?i:Dhe;return N.jsx($d,I({slots:{root:P,input:C},componentsProps:w,fullWidth:c,inputComponent:d,multiline:f,ref:n,type:h},y,{classes:g}))});kj.muiName="Input";const $j=kj;var S2;const Nhe=["children","classes","className","label","notched"],jhe=de("fieldset",{shouldForwardProp:gr})({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%"}),zhe=de("legend",{shouldForwardProp:gr})(({ownerState:e,theme:t})=>I({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&I({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function Bhe(e){const{className:t,label:n,notched:r}=e,o=ue(e,Nhe),i=n!=null&&n!=="",a=I({},e,{notched:r,withLabel:i});return N.jsx(jhe,I({"aria-hidden":!0,className:t,ownerState:a},o,{children:N.jsx(zhe,{ownerState:a,children:i?N.jsx("span",{children:n}):S2||(S2=N.jsx("span",{className:"notranslate",children:"​"}))})}))}const Hhe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Vhe=e=>{const{classes:t}=e,r=Ie({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ehe,t);return I({},t,r)},Uhe=de(C0,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:x0})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return I({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${_i.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${_i.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${_i.focused} .${_i.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${_i.error} .${_i.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${_i.disabled} .${_i.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&I({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),Whe=de(Bhe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({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}}),Ghe=de(S0,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:w0})(({theme:e,ownerState:t})=>I({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"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Ij=v.forwardRef(function(t,n){var r,o,i,a,l;const s=Ue({props:t,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:d="input",label:f,multiline:m=!1,notched:p,slots:h={},type:y="text"}=s,b=ue(s,Hhe),g=Vhe(s),x=rl(),w=Pu({props:s,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),P=I({},s,{color:w.color||"primary",disabled:w.disabled,error:w.error,focused:w.focused,formControl:x,fullWidth:c,hiddenLabel:w.hiddenLabel,multiline:m,size:w.size,type:y}),C=(r=(o=h.root)!=null?o:u.Root)!=null?r:Uhe,E=(i=(a=h.input)!=null?a:u.Input)!=null?i:Ghe;return N.jsx($d,I({slots:{root:C,input:E},renderSuffix:S=>N.jsx(Whe,{ownerState:P,className:g.notchedOutline,label:f!=null&&f!==""&&w.required?l||(l=N.jsxs(v.Fragment,{children:[f," ","*"]})):f,notched:typeof p<"u"?p:!!(S.startAdornment||S.filled||S.focused)}),fullWidth:c,inputComponent:d,multiline:m,ref:n,type:y},b,{classes:I({},g,{notchedOutline:null})}))});Ij.muiName="Input";const Oj=Ij;function qhe(e){return Be("MuiFormLabel",e)}const Khe=He("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Gf=Khe,Qhe=["children","className","color","component","disabled","error","filled","focused","required"],Yhe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:l}=e,s={root:["root",`color${pe(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return Ie(s,qhe,t)},Xhe=de("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>I({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>I({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Gf.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Gf.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Gf.error}`]:{color:(e.vars||e).palette.error.main}})),Zhe=de("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Gf.error}`]:{color:(e.vars||e).palette.error.main}})),Jhe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiFormLabel"}),{children:o,className:i,component:a="label"}=r,l=ue(r,Qhe),s=rl(),u=Pu({props:r,muiFormControl:s,states:["color","required","focused","disabled","error","filled"]}),c=I({},r,{color:u.color||"primary",component:a,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=Yhe(c);return N.jsxs(Xhe,I({as:a,ownerState:c,className:he(d.root,i),ref:n},l,{children:[o,u.required&&N.jsxs(Zhe,{ownerState:c,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),ege=Jhe;function tge(e){return Be("MuiInputLabel",e)}He("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nge=["disableAnimation","margin","shrink","variant","className"],rge=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:l}=e,s={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${pe(r)}`,a],asterisk:[l&&"asterisk"]},u=Ie(s,tge,t);return I({},t,u)},oge=de(ege,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Gf.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]]}})(({theme:e,ownerState:t})=>I({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&I({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&I({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&I({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),ige=v.forwardRef(function(t,n){const r=Ue({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:i,className:a}=r,l=ue(r,nge),s=rl();let u=i;typeof u>"u"&&s&&(u=s.filled||s.focused||s.adornedStart);const c=Pu({props:r,muiFormControl:s,states:["size","variant","required","focused"]}),d=I({},r,{disableAnimation:o,formControl:s,shrink:u,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),f=rge(d);return N.jsx(oge,I({"data-shrink":u,ownerState:d,ref:n,className:he(f.root,a)},l,{classes:f}))}),Mj=ige;function age(e){return Be("MuiFormHelperText",e)}const lge=He("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),E2=lge;var P2;const sge=["children","className","component","disabled","error","filled","focused","margin","required","variant"],uge=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:l,required:s}=e,u={root:["root",o&&"disabled",i&&"error",r&&`size${pe(r)}`,n&&"contained",l&&"focused",a&&"filled",s&&"required"]};return Ie(u,age,t)},cge=de("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${pe(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>I({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${E2.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${E2.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),dge=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p"}=r,l=ue(r,sge),s=rl(),u=Pu({props:r,muiFormControl:s,states:["variant","size","disabled","error","filled","focused","required"]}),c=I({},r,{component:a,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=uge(c);return N.jsx(cge,I({as:a,ownerState:c,className:he(d.root,i),ref:n},l,{children:o===" "?P2||(P2=N.jsx("span",{className:"notranslate",children:"​"})):o}))}),fge=dge;function pge(e){return Be("MuiPopover",e)}He("MuiPopover",["root","paper"]);const mge=["onEntering"],hge=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],gge=["slotProps"];function k2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function $2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function I2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function g1(e){return typeof e=="function"?e():e}const vge=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"]},pge,t)},yge=de(AE,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Rj=de(Jo,{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}),bge=v.forwardRef(function(t,n){var r,o,i;const a=Ue({props:t,name:"MuiPopover"}),{action:l,anchorEl:s,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:f,className:m,container:p,elevation:h=8,marginThreshold:y=16,open:b,PaperProps:g={},slots:x,slotProps:w,transformOrigin:P={vertical:"top",horizontal:"left"},TransitionComponent:C=uv,transitionDuration:E="auto",TransitionProps:{onEntering:S}={},disableScrollLock:M=!1}=a,O=ue(a.TransitionProps,mge),R=ue(a,hge),_=(r=w==null?void 0:w.paper)!=null?r:g,D=v.useRef(),T=vt(D,_.ref),F=I({},a,{anchorOrigin:u,anchorReference:d,elevation:h,marginThreshold:y,externalPaperSlotProps:_,transformOrigin:P,TransitionComponent:C,transitionDuration:E,TransitionProps:O}),j=vge(F),$=v.useCallback(()=>{if(d==="anchorPosition")return c;const me=g1(s),be=(me&&me.nodeType===1?me:un(D.current).body).getBoundingClientRect();return{top:be.top+k2(be,u.vertical),left:be.left+$2(be,u.horizontal)}},[s,u.horizontal,u.vertical,c,d]),L=v.useCallback(me=>({vertical:k2(me,P.vertical),horizontal:$2(me,P.horizontal)}),[P.horizontal,P.vertical]),z=v.useCallback(me=>{const ke={width:me.offsetWidth,height:me.offsetHeight},be=L(ke);if(d==="none")return{top:null,left:null,transformOrigin:I2(be)};const ie=$();let ye=ie.top-be.vertical,V=ie.left-be.horizontal;const Q=ye+ke.height,Z=V+ke.width,ae=xi(g1(s)),te=ae.innerHeight-y,K=ae.innerWidth-y;if(y!==null&&yete){const ee=Q-te;ye-=ee,be.vertical+=ee}if(y!==null&&VK){const ee=Z-K;V-=ee,be.horizontal+=ee}return{top:`${Math.round(ye)}px`,left:`${Math.round(V)}px`,transformOrigin:I2(be)}},[s,d,$,L,y]),[B,A]=v.useState(b),H=v.useCallback(()=>{const me=D.current;if(!me)return;const ke=z(me);ke.top!==null&&(me.style.top=ke.top),ke.left!==null&&(me.style.left=ke.left),me.style.transformOrigin=ke.transformOrigin,A(!0)},[z]);v.useEffect(()=>(M&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[s,M,H]);const q=(me,ke)=>{S&&S(me,ke),H()},U=()=>{A(!1)};v.useEffect(()=>{b&&H()}),v.useImperativeHandle(l,()=>b?{updatePosition:()=>{H()}}:null,[b,H]),v.useEffect(()=>{if(!b)return;const me=bd(()=>{H()}),ke=xi(s);return ke.addEventListener("resize",me),()=>{me.clear(),ke.removeEventListener("resize",me)}},[s,b,H]);let G=E;E==="auto"&&!C.muiSupportAuto&&(G=void 0);const Y=p||(s?un(g1(s)).body:void 0),re=(o=x==null?void 0:x.root)!=null?o:yge,le=(i=x==null?void 0:x.paper)!=null?i:Rj,J=Xi({elementType:le,externalSlotProps:I({},_,{style:B?_.style:I({},_.style,{opacity:0})}),additionalProps:{elevation:h,ref:T},ownerState:F,className:he(j.paper,_==null?void 0:_.className)}),oe=Xi({elementType:re,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Y,open:b},ownerState:F,className:he(j.root,m)}),{slotProps:ce}=oe,ve=ue(oe,gge);return N.jsx(re,I({},ve,!fu(re)&&{slotProps:ce,disableScrollLock:M},{children:N.jsx(C,I({appear:!0,in:b,onEntering:q,onExited:U,timeout:G},O,{children:N.jsx(le,I({},J,{children:f}))}))}))}),xge=bge;function wge(e){return Be("MuiMenu",e)}He("MuiMenu",["root","paper","list"]);const Cge=["onEntering"],Sge=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Ege={vertical:"top",horizontal:"right"},Pge={vertical:"top",horizontal:"left"},kge=e=>{const{classes:t}=e;return Ie({root:["root"],paper:["paper"],list:["list"]},wge,t)},$ge=de(xge,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ige=de(Rj,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Oge=de(fP,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Mge=v.forwardRef(function(t,n){var r,o;const i=Ue({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:l,className:s,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:d,open:f,PaperProps:m={},PopoverClasses:p,transitionDuration:h="auto",TransitionProps:{onEntering:y}={},variant:b="selectedMenu",slots:g={},slotProps:x={}}=i,w=ue(i.TransitionProps,Cge),P=ue(i,Sge),C=Zy(),E=I({},i,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:c,onEntering:y,PaperProps:m,transitionDuration:h,TransitionProps:w,variant:b}),S=kge(E),M=a&&!u&&f,O=v.useRef(null),R=(L,z)=>{O.current&&O.current.adjustStyleForScrollbar(L,{direction:C?"rtl":"ltr"}),y&&y(L,z)},_=L=>{L.key==="Tab"&&(L.preventDefault(),d&&d(L,"tabKeyDown"))};let D=-1;v.Children.map(l,(L,z)=>{v.isValidElement(L)&&(L.props.disabled||(b==="selectedMenu"&&L.props.selected||D===-1)&&(D=z))});const T=(r=g.paper)!=null?r:Ige,F=(o=x.paper)!=null?o:m,j=Xi({elementType:g.root,externalSlotProps:x.root,ownerState:E,className:[S.root,s]}),$=Xi({elementType:T,externalSlotProps:F,ownerState:E,className:S.paper});return N.jsx($ge,I({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?Ege:Pge,slots:{paper:T,root:g.root},slotProps:{root:j,paper:$},open:f,ref:n,transitionDuration:h,TransitionProps:I({onEntering:R},w),ownerState:E},P,{classes:p,children:N.jsx(Oge,I({onKeyDown:_,actions:O,autoFocus:a&&(D===-1||u),autoFocusItem:M,variant:b},c,{className:he(S.list,c.className),children:l}))}))}),Tj=Mge;function Rge(e){return Be("MuiNativeSelect",e)}const Tge=He("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),CP=Tge,_ge=["className","disabled","error","IconComponent","inputRef","variant"],Fge=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${pe(n)}`,i&&"iconOpen",r&&"disabled"]};return Ie(l,Rge,t)},_j=({ownerState:e,theme:t})=>I({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":I({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${CP.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),Age=de("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:gr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${CP.multiple}`]:t.multiple}]}})(_j),Fj=({ownerState:e,theme:t})=>I({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${CP.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),Lge=de("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${pe(n.variant)}`],n.open&&t.iconOpen]}})(Fj),Dge=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:l,variant:s="standard"}=t,u=ue(t,_ge),c=I({},t,{disabled:o,variant:s,error:i}),d=Fge(c);return N.jsxs(v.Fragment,{children:[N.jsx(Age,I({ownerState:c,className:he(d.select,r),disabled:o,ref:l||n},u)),t.multiple?null:N.jsx(Lge,{as:a,ownerState:c,className:d.icon})]})}),Nge=Dge;function jge(e){return Be("MuiSelect",e)}const zge=He("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nf=zge;var O2;const Bge=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Hge=de("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${nf.select}`]:t.select},{[`&.${nf.select}`]:t[n.variant]},{[`&.${nf.error}`]:t.error},{[`&.${nf.multiple}`]:t.multiple}]}})(_j,{[`&.${nf.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Vge=de("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${pe(n.variant)}`],n.open&&t.iconOpen]}})(Fj),Uge=de("input",{shouldForwardProp:e=>Nne(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 M2(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Wge(e){return e==null||typeof e=="string"&&!e.trim()}const Gge=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${pe(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ie(l,jge,t)},qge=v.forwardRef(function(t,n){var r;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:l,children:s,className:u,defaultOpen:c,defaultValue:d,disabled:f,displayEmpty:m,error:p=!1,IconComponent:h,inputRef:y,labelId:b,MenuProps:g={},multiple:x,name:w,onBlur:P,onChange:C,onClose:E,onFocus:S,onOpen:M,open:O,readOnly:R,renderValue:_,SelectDisplayProps:D={},tabIndex:T,value:F,variant:j="standard"}=t,$=ue(t,Bge),[L,z]=Ql({controlled:F,default:d,name:"Select"}),[B,A]=Ql({controlled:O,default:c,name:"Select"}),H=v.useRef(null),q=v.useRef(null),[U,G]=v.useState(null),{current:Y}=v.useRef(O!=null),[re,le]=v.useState(),J=vt(n,y),oe=v.useCallback(Pe=>{q.current=Pe,Pe&&G(Pe)},[]),ce=U==null?void 0:U.parentNode;v.useImperativeHandle(J,()=>({focus:()=>{q.current.focus()},node:H.current,value:L}),[L]),v.useEffect(()=>{c&&B&&U&&!Y&&(le(l?null:ce.clientWidth),q.current.focus())},[U,l]),v.useEffect(()=>{a&&q.current.focus()},[a]),v.useEffect(()=>{if(!b)return;const Pe=un(q.current).getElementById(b);if(Pe){const Re=()=>{getSelection().isCollapsed&&q.current.focus()};return Pe.addEventListener("click",Re),()=>{Pe.removeEventListener("click",Re)}}},[b]);const ve=(Pe,Re)=>{Pe?M&&M(Re):E&&E(Re),Y||(le(l?null:ce.clientWidth),A(Pe))},me=Pe=>{Pe.button===0&&(Pe.preventDefault(),q.current.focus(),ve(!0,Pe))},ke=Pe=>{ve(!1,Pe)},be=v.Children.toArray(s),ie=Pe=>{const Re=be.find(Ge=>Ge.props.value===Pe.target.value);Re!==void 0&&(z(Re.props.value),C&&C(Pe,Re))},ye=Pe=>Re=>{let Ge;if(Re.currentTarget.hasAttribute("tabindex")){if(x){Ge=Array.isArray(L)?L.slice():[];const at=L.indexOf(Pe.props.value);at===-1?Ge.push(Pe.props.value):Ge.splice(at,1)}else Ge=Pe.props.value;if(Pe.props.onClick&&Pe.props.onClick(Re),L!==Ge&&(z(Ge),C)){const at=Re.nativeEvent||Re,It=new at.constructor(at.type,at);Object.defineProperty(It,"target",{writable:!0,value:{value:Ge,name:w}}),C(It,Pe)}x||ve(!1,Re)}},V=Pe=>{R||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Pe.key)!==-1&&(Pe.preventDefault(),ve(!0,Pe))},Q=U!==null&&B,Z=Pe=>{!Q&&P&&(Object.defineProperty(Pe,"target",{writable:!0,value:{value:L,name:w}}),P(Pe))};delete $["aria-invalid"];let ae,te;const K=[];let ee=!1;(vv({value:L})||m)&&(_?ae=_(L):ee=!0);const se=be.map(Pe=>{if(!v.isValidElement(Pe))return null;let Re;if(x){if(!Array.isArray(L))throw new Error(qa(2));Re=L.some(Ge=>M2(Ge,Pe.props.value)),Re&&ee&&K.push(Pe.props.children)}else Re=M2(L,Pe.props.value),Re&&ee&&(te=Pe.props.children);return v.cloneElement(Pe,{"aria-selected":Re?"true":"false",onClick:ye(Pe),onKeyUp:Ge=>{Ge.key===" "&&Ge.preventDefault(),Pe.props.onKeyUp&&Pe.props.onKeyUp(Ge)},role:"option",selected:Re,value:void 0,"data-value":Pe.props.value})});ee&&(x?K.length===0?ae=null:ae=K.reduce((Pe,Re,Ge)=>(Pe.push(Re),Ge{const{classes:t}=e;return t},SP={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>gr(e)&&e!=="variant",slot:"Root"},Zge=de(Pj,SP)(""),Jge=de(Oj,SP)(""),eve=de($j,SP)(""),Aj=v.forwardRef(function(t,n){const r=Ue({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:l,defaultOpen:s=!1,displayEmpty:u=!1,IconComponent:c=wj,id:d,input:f,inputProps:m,label:p,labelId:h,MenuProps:y,multiple:b=!1,native:g=!1,onClose:x,onOpen:w,open:P,renderValue:C,SelectDisplayProps:E,variant:S="outlined"}=r,M=ue(r,Qge),O=g?Nge:Kge,R=rl(),_=Pu({props:r,muiFormControl:R,states:["variant","error"]}),D=_.variant||S,T=I({},r,{variant:D,classes:a}),F=Xge(T),j=ue(F,Yge),$=f||{standard:N.jsx(Zge,{ownerState:T}),outlined:N.jsx(Jge,{label:p,ownerState:T}),filled:N.jsx(eve,{ownerState:T})}[D],L=vt(n,$.ref);return N.jsx(v.Fragment,{children:v.cloneElement($,I({inputComponent:O,inputProps:I({children:i,error:_.error,IconComponent:c,variant:D,type:void 0,multiple:b},g?{id:d}:{autoWidth:o,defaultOpen:s,displayEmpty:u,labelId:h,MenuProps:y,onClose:x,onOpen:w,open:P,renderValue:C,SelectDisplayProps:I({id:d},E)},m,{classes:m?Ir(j,m.classes):j},f?f.props.inputProps:{})},(b&&g||u)&&D==="outlined"?{notched:!0}:{},{ref:L,className:he($.props.className,l,F.root)},!f&&{variant:D},M))})});Aj.muiName="Select";const EP=Aj;function tve(e){return Be("MuiTextField",e)}He("MuiTextField",["root"]);const nve=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],rve={standard:Pj,filled:$j,outlined:Oj},ove=e=>{const{classes:t}=e;return Ie({root:["root"]},tve,t)},ive=de(yP,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ave=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:l,color:s="primary",defaultValue:u,disabled:c=!1,error:d=!1,FormHelperTextProps:f,fullWidth:m=!1,helperText:p,id:h,InputLabelProps:y,inputProps:b,InputProps:g,inputRef:x,label:w,maxRows:P,minRows:C,multiline:E=!1,name:S,onBlur:M,onChange:O,onFocus:R,placeholder:_,required:D=!1,rows:T,select:F=!1,SelectProps:j,type:$,value:L,variant:z="outlined"}=r,B=ue(r,nve),A=I({},r,{autoFocus:i,color:s,disabled:c,error:d,fullWidth:m,multiline:E,required:D,select:F,variant:z}),H=ove(A),q={};z==="outlined"&&(y&&typeof y.shrink<"u"&&(q.notched=y.shrink),q.label=w),F&&((!j||!j.native)&&(q.id=void 0),q["aria-describedby"]=void 0);const U=_t(h),G=p&&U?`${U}-helper-text`:void 0,Y=w&&U?`${U}-label`:void 0,re=rve[z],le=N.jsx(re,I({"aria-describedby":G,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:m,multiline:E,name:S,rows:T,maxRows:P,minRows:C,type:$,value:L,id:U,inputRef:x,onBlur:M,onChange:O,onFocus:R,placeholder:_,inputProps:b},q,g));return N.jsxs(ive,I({className:he(H.root,l),disabled:c,error:d,fullWidth:m,ref:n,required:D,color:s,variant:z,ownerState:A},B,{children:[w!=null&&w!==""&&N.jsx(Mj,I({htmlFor:U,id:Y},y,{children:w})),F?N.jsx(EP,I({"aria-describedby":G,id:U,labelId:Y,value:L,input:le},j,{children:a})):le,p&&N.jsx(fge,I({id:G},f,{children:p}))]}))}),Mn=ave,lve=["className","selectedRowCount"],sve=e=>{const{classes:t}=e;return Ie({root:["selectedRowCount"]},ft,t)},uve=zn("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),cve=v.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=ue(t,lve),a=dt(),l=We(),s=sve(l),u=a.current.getLocaleText("footerRowSelected")(o);return N.jsx(uve,I({ref:n,className:he(s.root,r),ownerState:l},i,{children:u}))}),dve=v.forwardRef(function(t,n){var r,o;const i=dt(),a=We(),l=Ne(i,Zse),s=Ne(i,mfe),u=Ne(i,h0),c=!a.hideFooterSelectedRowCount&&s>0?N.jsx(cve,{selectedRowCount:s}):N.jsx("div",{}),d=!a.hideFooterRowCount&&!a.pagination?N.jsx(a.slots.footerRowCount,I({},(r=a.slotProps)==null?void 0:r.footerRowCount,{rowCount:l,visibleRowCount:u})):null,f=a.pagination&&!a.hideFooterPagination&&a.slots.pagination&&N.jsx(a.slots.pagination,I({},(o=a.slotProps)==null?void 0:o.pagination));return N.jsxs(vde,I({ref:n},t,{children:[c,d,f]}))});function fve(){var e,t;const n=We();return N.jsxs(v.Fragment,{children:[N.jsx(n.slots.preferencesPanel,I({},(e=n.slotProps)==null?void 0:e.preferencesPanel)),n.slots.toolbar&&N.jsx(n.slots.toolbar,I({},(t=n.slotProps)==null?void 0:t.toolbar))]})}function pve(e){return Be("MuiCircularProgress",e)}He("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const mve=["className","color","disableShrink","size","style","thickness","value","variant"];let P0=e=>e,R2,T2,_2,F2;const gl=44,hve=ps(R2||(R2=P0` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),gve=ps(T2||(T2=P0` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),vve=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${pe(r)}`],svg:["svg"],circle:["circle",`circle${pe(n)}`,o&&"circleDisableShrink"]};return Ie(i,pve,t)},yve=de("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${pe(n.color)}`]]}})(({ownerState:e,theme:t})=>I({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Xc(_2||(_2=P0` animation: ${0} 1.4s linear infinite; `),hve)),bve=de("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),xve=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>I({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Xc(F2||(F2=P0` animation: ${0} 1.4s ease-in-out infinite; `),gve)),wve=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:l=40,style:s,thickness:u=3.6,value:c=0,variant:d="indeterminate"}=r,f=ue(r,mve),m=I({},r,{color:i,disableShrink:a,size:l,thickness:u,value:c,variant:d}),p=vve(m),h={},y={},b={};if(d==="determinate"){const g=2*Math.PI*((gl-u)/2);h.strokeDasharray=g.toFixed(3),b["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*g).toFixed(3)}px`,y.transform="rotate(-90deg)"}return N.jsx(yve,I({className:he(p.root,o),style:I({width:l,height:l},y,s),ownerState:m,ref:n,role:"progressbar"},b,f,{children:N.jsx(bve,{className:p.svg,ownerState:m,viewBox:`${gl/2} ${gl/2} ${gl} ${gl}`,children:N.jsx(xve,{className:p.circle,style:h,ownerState:m,cx:gl,cy:gl,r:(gl-u)/2,fill:"none",strokeWidth:u})})}))}),PP=wve,Cve=v.forwardRef(function(t,n){return N.jsx(mP,I({ref:n},t,{children:N.jsx(PP,{})}))}),Sve=v.forwardRef(function(t,n){const o=dt().current.getLocaleText("noRowsLabel");return N.jsx(mP,I({ref:n},t,{children:o}))}),Eve=v.createContext(),Pve=Eve,kve=v.createContext(),$ve=kve;function Ive(e){return Be("MuiTableCell",e)}const Ove=He("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Mve=Ove,Rve=["align","className","component","padding","scope","size","sortDirection","variant"],Tve=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,l={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${pe(r)}`,o!=="normal"&&`padding${pe(o)}`,`size${pe(i)}`]};return Ie(l,Ive,t)},_ve=de("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${pe(n.size)}`],n.padding!=="normal"&&t[`padding${pe(n.padding)}`],n.align!=="inherit"&&t[`align${pe(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>I({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid ${e.palette.mode==="light"?OE(rt(e.palette.divider,1),.88):IE(rt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${Mve.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),Fve=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:l,scope:s,size:u,sortDirection:c,variant:d}=r,f=ue(r,Rve),m=v.useContext(Pve),p=v.useContext($ve),h=p&&p.variant==="head";let y;a?y=a:y=h?"th":"td";let b=s;y==="td"?b=void 0:!b&&h&&(b="col");const g=d||p&&p.variant,x=I({},r,{align:o,component:y,padding:l||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:c,stickyHeader:g==="head"&&m&&m.stickyHeader,variant:g}),w=Tve(x);let P=null;return c&&(P=c==="asc"?"ascending":"descending"),N.jsx(_ve,I({as:y,ref:n,className:he(w.root,i),"aria-sort":P,scope:b,ownerState:x},f))}),qw=Fve,Ave=tt(N.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Lve=tt(N.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),Dve=tt(N.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),Nve=tt(N.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),jve=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],zve=v.forwardRef(function(t,n){var r,o,i,a,l,s,u,c;const{backIconButtonProps:d,count:f,disabled:m=!1,getItemAriaLabel:p,nextIconButtonProps:h,onPageChange:y,page:b,rowsPerPage:g,showFirstButton:x,showLastButton:w,slots:P={},slotProps:C={}}=t,E=ue(t,jve),S=Zy(),M=J=>{y(J,0)},O=J=>{y(J,b-1)},R=J=>{y(J,b+1)},_=J=>{y(J,Math.max(0,Math.ceil(f/g)-1))},D=(r=P.firstButton)!=null?r:Nn,T=(o=P.lastButton)!=null?o:Nn,F=(i=P.nextButton)!=null?i:Nn,j=(a=P.previousButton)!=null?a:Nn,$=(l=P.firstButtonIcon)!=null?l:Nve,L=(s=P.lastButtonIcon)!=null?s:Dve,z=(u=P.nextButtonIcon)!=null?u:Lve,B=(c=P.previousButtonIcon)!=null?c:Ave,A=S?T:D,H=S?F:j,q=S?j:F,U=S?D:T,G=S?C.lastButton:C.firstButton,Y=S?C.nextButton:C.previousButton,re=S?C.previousButton:C.nextButton,le=S?C.firstButton:C.lastButton;return N.jsxs("div",I({ref:n},E,{children:[x&&N.jsx(A,I({onClick:M,disabled:m||b===0,"aria-label":p("first",b),title:p("first",b)},G,{children:S?N.jsx(L,I({},C.lastButtonIcon)):N.jsx($,I({},C.firstButtonIcon))})),N.jsx(H,I({onClick:O,disabled:m||b===0,color:"inherit","aria-label":p("previous",b),title:p("previous",b)},Y??d,{children:S?N.jsx(z,I({},C.nextButtonIcon)):N.jsx(B,I({},C.previousButtonIcon))})),N.jsx(q,I({onClick:R,disabled:m||(f!==-1?b>=Math.ceil(f/g)-1:!1),color:"inherit","aria-label":p("next",b),title:p("next",b)},re??h,{children:S?N.jsx(B,I({},C.previousButtonIcon)):N.jsx(z,I({},C.nextButtonIcon))})),w&&N.jsx(U,I({onClick:_,disabled:m||b>=Math.ceil(f/g)-1,"aria-label":p("last",b),title:p("last",b)},le,{children:S?N.jsx($,I({},C.firstButtonIcon)):N.jsx(L,I({},C.lastButtonIcon))}))]}))}),Bve=zve;function Hve(e){return Be("MuiTablePagination",e)}const Vve=He("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),Xs=Vve;var A2;const Uve=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],Wve=de(qw,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),Gve=de(sm,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>I({[`& .${Xs.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Xs.actions}`]:{flexShrink:0,marginLeft:20}})),qve=de("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),Kve=de("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>I({},e.typography.body2,{flexShrink:0})),Qve=de(EP,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>I({[`& .${Xs.selectIcon}`]:t.selectIcon,[`& .${Xs.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Xs.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Yve=de(uo,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Xve=de("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>I({},e.typography.body2,{flexShrink:0}));function Zve({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function Jve(e){return`Go to ${e} page`}const eye=e=>{const{classes:t}=e;return Ie({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Hve,t)},tye=v.forwardRef(function(t,n){var r;const o=Ue({props:t,name:"MuiTablePagination"}),{ActionsComponent:i=Bve,backIconButtonProps:a,className:l,colSpan:s,component:u=qw,count:c,disabled:d=!1,getItemAriaLabel:f=Jve,labelDisplayedRows:m=Zve,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:h,onPageChange:y,onRowsPerPageChange:b,page:g,rowsPerPage:x,rowsPerPageOptions:w=[10,25,50,100],SelectProps:P={},showFirstButton:C=!1,showLastButton:E=!1,slotProps:S={},slots:M={}}=o,O=ue(o,Uve),R=o,_=eye(R),D=(r=S==null?void 0:S.select)!=null?r:P,T=D.native?"option":Yve;let F;(u===qw||u==="td")&&(F=s||1e3);const j=_t(D.id),$=_t(D.labelId),L=()=>c===-1?(g+1)*x:x===-1?c:Math.min(c,(g+1)*x);return N.jsx(Wve,I({colSpan:F,ref:n,as:u,ownerState:R,className:he(_.root,l)},O,{children:N.jsxs(Gve,{className:_.toolbar,children:[N.jsx(qve,{className:_.spacer}),w.length>1&&N.jsx(Kve,{className:_.selectLabel,id:$,children:p}),w.length>1&&N.jsx(Qve,I({variant:"standard"},!D.variant&&{input:A2||(A2=N.jsx($d,{}))},{value:x,onChange:b,id:j,labelId:$},D,{classes:I({},D.classes,{root:he(_.input,_.selectRoot,(D.classes||{}).root),select:he(_.select,(D.classes||{}).select),icon:he(_.selectIcon,(D.classes||{}).icon)}),disabled:d,children:w.map(z=>v.createElement(T,I({},!fu(T)&&{ownerState:R},{className:_.menuItem,key:z.label?z.label:z,value:z.value?z.value:z}),z.label?z.label:z))})),N.jsx(Xve,{className:_.displayedRows,children:m({from:c===0?0:g*x+1,to:L(),count:c===-1?-1:c,page:g})}),N.jsx(i,{className:_.actions,backIconButtonProps:a,count:c,nextIconButtonProps:h,onPageChange:y,page:g,rowsPerPage:x,showFirstButton:C,showLastButton:E,slotProps:S.actions,slots:M.actions,getItemAriaLabel:f,disabled:d})]})}))}),nye=tye,rye=de(nye)(({theme:e})=>({[`& .${Xs.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Xs.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),oye=v.forwardRef(function(t,n){const r=dt(),o=We(),i=Ne(r,Io),a=Ne(r,h0),l=v.useMemo(()=>{var m,p;return(m=(p=o.rowCount)!=null?p:a)!=null?m:0},[o.rowCount,a]),s=v.useMemo(()=>Math.floor(l/(i.pageSize||1)),[l,i.pageSize]),u=v.useCallback(m=>{const p=Number(m.target.value);r.current.setPageSize(p)},[r]),c=v.useCallback((m,p)=>{r.current.setPage(p)},[r]),f=(m=>{for(let p=0;p{const{classes:t}=e;return Ie({root:["rowCount"]},ft,t)},lye=zn("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),sye=v.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=ue(t,iye),l=dt(),s=We(),u=aye(s);if(o===0)return null;const c=i{let n,r;return t.pagination&&t.paginationMode==="client"?(r=gP(e),n=pfe(e)):(n=gs(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},ku=(e,t)=>{const n=Cv(e,t);return v.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},Kw={current:null};function fm(e){return e.isInternal=!0,e}function Sv(e){return e!==void 0&&e.isInternal===!0}function uye(e){return fm((t,n)=>{const r=e(t,n);return r&&(o=>r(o.value,o.row,n,Kw.current))})}function pm(e){return e.map(t=>I({},t,{getApplyFilterFn:uye(t.getApplyFilterFnV7),getApplyFilterFnV7:fm(t.getApplyFilterFnV7)}))}function Lj(e){return fm((t,n,r)=>{const o=e(t,n,r);return o&&(i=>o(i.value,i.row,n,r))})}function Dj(e){return{current:e.current.getPublicApi()}}let rf;function cye(){if(rf!==void 0)return rf;try{rf=new Function("return true")()}catch{rf=!1}return rf}const Qw=(e,t)=>{const n=I({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=Ed(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},dye=ua(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),fye=ua("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),pye=ua("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),Nj=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?(dye(),o=[e.items[0]]):o=e.items;const i=r&&o.some(l=>l.id==null),a=o.some(l=>l.operator==null);return i&&fye(),a&&pye(),a||i?I({},e,{items:o.map(l=>Qw(l,n))}):e.items!==o?I({},e,{items:o}):e},L2=(e,t,n)=>r=>I({},r,{filterModel:Nj(e,t,n)}),Dl=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,jj=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){var o;const m=n.valueParser;r=Array.isArray(e.value)?(o=e.value)==null?void 0:o.map(p=>m(p)):m(e.value)}else r=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(r=Dl(r));const a=I({},e,{value:r}),l=n.filterOperators;if(!(l!=null&&l.length))throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const s=l.find(m=>m.value===a.operator);if(!s)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${a.operator}'.`);const u=!Sv(s.getApplyFilterFn),c=!Sv(s.getApplyFilterFnV7),d=Dj(t);if(s.getApplyFilterFnV7&&!(u&&!c)){const m=s.getApplyFilterFnV7(a,n);return typeof m!="function"?null:{v7:!0,item:a,fn:p=>{let h=t.current.getRowValue(p,n);return i&&(h=Dl(h)),m(h,p,n,d)}}}const f=s.getApplyFilterFn(a,n);return typeof f!="function"?null:{v7:!1,item:a,fn:m=>{const p=t.current.getCellParams(m,a.field);Kw.current=d,i&&(p.value=Dl(p.value));const h=f(p);return Kw.current=null,h}}};let D2=1;const mye=(e,t,n)=>{const{items:r}=e,o=r.map(l=>jj(l,t)).filter(l=>!!l);if(o.length===0)return null;if(n||!cye())return(l,s)=>{const u={};for(let c=0;c`const shouldApply${s} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(l.item.field)});`).join(` `)} const result$$ = { ${o.map((l,s)=>` ${JSON.stringify(String(l.item.id))}: !shouldApply${s} ? false : ${l.v7?`appliers[${s}].fn(row)`:`appliers[${s}].fn(getRowId(row))`},`).join(` `)} }; return result$$;`.replaceAll("$$",String(D2)));return D2+=1,(l,s)=>i(t.current.getRowId,o,l,s)},hye=(e,t)=>{var n,r,o;const i=(n=(r=e.quickFilterValues)==null?void 0:r.filter(Boolean))!=null?n:[];if(i.length===0)return null;const l=((o=e.quickFilterExcludeHiddenColumns)!=null?o:!1)?d0(t):Na(t),s=[],{ignoreDiacritics:u}=t.current.rootProps,c=Dj(t);return l.forEach(d=>{const f=t.current.getColumn(d),m=f==null?void 0:f.getApplyQuickFilterFn,p=f==null?void 0:f.getApplyQuickFilterFnV7,h=!Sv(m),y=!Sv(p);p&&!(h&&!y)?s.push({column:f,appliers:i.map(b=>{const g=u?Dl(b):b;return{v7:!0,fn:p(g,f,c)}})}):m&&s.push({column:f,appliers:i.map(b=>{const g=u?Dl(b):b;return{v7:!1,fn:m(g,f,c)}})})}),function(f,m){const p={},h={};e:for(let b=0;b{const r=mye(e,t,n),o=hye(e,t);return function(a,l,s){var u,c;s.passingFilterItems=(u=r==null?void 0:r(a,l))!=null?u:null,s.passingQuickFilterValues=(c=o==null?void 0:o(a,l))!=null?c:null}},N2=e=>e!=null,vye=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>jj(r,t)!==null)),e.cleanedFilterItems),yye=(e,t,n,r,o)=>{const i=vye(o,r,n.items),a=e.filter(N2),l=t.filter(N2);if(a.length>0){var s;const c=f=>a.some(m=>m[f.id]);if(((s=n.logicOperator)!=null?s:kp().logicOperator)===er.And){if(!i.every(c))return!1}else if(!i.some(c))return!1}if(l.length>0&&n.quickFilterValues!=null){var u;const c=f=>l.some(m=>m[f]);if(((u=n.quickFilterLogicOperator)!=null?u:kp().quickFilterLogicOperator)===er.And){if(!n.quickFilterValues.every(c))return!1}else if(!n.quickFilterValues.some(c))return!1}return!0},j2=fm(e=>{if(!e)return null;const t=new RegExp(cg(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=Dl(a)),a!=null?t.test(a.toString()):!1}}),bye=(e=!1)=>pm([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(cg(n),"i");return o=>o!=null?r.test(String(o)):!1},InputComponent:Ni},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?r.compare(n,o.toString())===0:!1},InputComponent:Ni},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${cg(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ni},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${cg(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ni},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t===""||t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!==""&&t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7: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:Sj}]),yi={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:Cfe,type:"string",align:"left",filterOperators:bye(),renderEditCell:vce,getApplyQuickFilterFn:Lj(j2),getApplyQuickFilterFnV7:j2},xye=()=>pm([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t=e.value==="true";return n=>!!n===t},InputComponent:Lme}]);function wye({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")}const Cye=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}},zj=I({},yi,{type:"boolean",align:"center",headerAlign:"center",renderCell:Hue,renderEditCell:Gue,sortComparator:dj,valueFormatter:wye,filterOperators:xye(),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>Cye(e)}),xl="__check__",Id=I({},zj,{field:xl,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>wv(e.api.state,e.api.instanceId)[e.id]!==void 0,renderHeader:e=>N.jsx(Lfe,I({},e)),renderCell:e=>N.jsx(_fe,I({},e))}),k0="actions",Sye=I({},yi,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:Nce,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),kP="__detail_panel_toggle__",Er=e=>e.editRows,Eye=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],Pye=e=>{const{editable:t,editing:n,selected:r,isLastVisible:o,rowHeight:i,classes:a}=e;return Ie({root:["row",r&&"selected",t&&"row--editable",n&&"row--editing",o&&"row--lastVisible",i==="auto"&&"row--dynamicHeight"]},ft,a)};function kye({width:e}){if(!e)return null;const t={width:e};return N.jsx("div",{className:`${ne.cell} ${ne.withBorderColor}`,style:t})}const $ye=v.forwardRef(function(t,n){const{selected:r,hovered:o,rowId:i,row:a,index:l,style:s,position:u,rowHeight:c,className:d,visibleColumns:f,renderedColumns:m,containerWidth:p,firstColumnToRender:h,isLastVisible:y=!1,focusedCellColumnIndexNotInRange:b,isNotVisible:g,focusedCell:x,onClick:w,onDoubleClick:P,onMouseEnter:C,onMouseLeave:E,onMouseOut:S,onMouseOver:M}=t,O=ue(t,Eye),R=dt(),_=v.useRef(null),D=We(),T=ku(R,D),F=Ne(R,oP),j=Ne(R,Eo),$=Ne(R,m0),L=Ne(R,um),z=Ne(R,Er),B=vt(_,n),A=l+L+2,H={selected:r,hovered:o,isLastVisible:y,classes:D.classes,editing:R.current.getRowMode(i)===Vt.Edit,editable:D.editMode===ea.Row,rowHeight:c},q=Pye(H);v.useLayoutEffect(()=>{c==="auto"&&_.current&&typeof ResizeObserver>"u"&&R.current.unstable_storeRowHeightMeasurement(i,_.current.clientHeight,u)},[R,c,i,u]),v.useLayoutEffect(()=>{if(T.range){const Ce=R.current.getRowIndexRelativeToVisibleRows(i);Ce!=null&&R.current.unstable_setLastMeasuredRowIndex(Ce)}const K=_.current;if(!K||c!=="auto"||typeof ResizeObserver>"u")return;const se=new ResizeObserver(Ce=>{const[_e]=Ce,$e=_e.borderBoxSize&&_e.borderBoxSize.length>0?_e.borderBoxSize[0].blockSize:_e.contentRect.height;R.current.unstable_storeRowHeightMeasurement(i,$e,u)});return se.observe(K),()=>se.disconnect()},[R,T.range,l,c,i,u]);const U=v.useCallback((K,ee)=>se=>{cm(se)||R.current.getRow(i)&&(R.current.publishEvent(K,R.current.getRowParams(i),se),ee&&ee(se))},[R,i]),G=v.useCallback(K=>{const ee=kue(K.target,ne.cell),se=ee==null?void 0:ee.getAttribute("data-field");if(se){if(se===Id.field||se===kP||se==="__reorder__"||R.current.getCellMode(i,se)===Tt.Edit)return;const Ce=R.current.getColumn(se);if((Ce==null?void 0:Ce.type)===k0)return}U("rowClick",w)(K)},[R,w,U,i]),{slots:Y,slotProps:re,disableColumnReorder:le}=D,J=Y.cell===Ww?Ww:Lue,oe=D.rowReordering,ce=(K,ee)=>{var se,Ce;const _e=le&&K.disableReorder||!oe&&!!j.length&&$>1&&Object.keys(z).length>0,$e=(se=(Ce=z[i])==null?void 0:Ce[K.field])!=null?se:null;let X=!1;return b!==void 0&&f[b].field===K.field&&(X=!0),N.jsx(J,I({column:K,width:ee.width,rowId:i,height:c,showRightBorder:ee.showRightBorder,align:K.align||"left",colIndex:ee.indexRelativeToAllColumns,colSpan:ee.colSpan,disableDragEvents:_e,editCellState:$e,isNotVisible:X},re==null?void 0:re.cell),K.field)},ve=Ne(R,()=>I({},R.current.unstable_getRowInternalSizes(i)),rP);let me=c;if(me==="auto"&&ve){let K=0;const ee=Object.entries(ve).reduce((se,[Ce,_e])=>/^base[A-Z]/.test(Ce)?(K+=1,_e>se?_e:se):se,0);ee>0&&K>1&&(me=ee)}const ke=v.useMemo(()=>{if(g)return{opacity:0,width:0,height:0};const K=I({},s,{maxHeight:c==="auto"?"none":c,minHeight:me});if(ve!=null&&ve.spacingTop){const ee=D.rowSpacingType==="border"?"borderTopWidth":"marginTop";K[ee]=ve.spacingTop}if(ve!=null&&ve.spacingBottom){const ee=D.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let se=K[ee];typeof se!="number"&&(se=parseInt(se||"0",10)),se+=ve.spacingBottom,K[ee]=se}return K},[g,c,s,me,ve,D.rowSpacingType]),be=R.current.unstable_applyPipeProcessors("rowClassName",[],i);if(typeof D.getRowClassName=="function"){var ie;const K=l-(((ie=T.range)==null?void 0:ie.firstRowIndex)||0),ee=I({},R.current.getRowParams(i),{isFirstVisible:K===0,isLastVisible:K===T.rows.length-1,indexRelativeToCurrentPage:K});be.push(D.getRowClassName(ee))}const ye=afe(1e4,20,80),V=R.current.getRowNode(i);if(!V)return null;const Q=V.type,Z=[];for(let K=0;K0&&N.jsx(kye,{width:ae})]}))}),Iye=y0($ye);function Oye({privateApiRef:e,props:t,children:n}){const r=v.useRef(e.current.getPublicApi());return N.jsx($4.Provider,{value:t,children:N.jsx(I4.Provider,{value:e,children:N.jsx(k4.Provider,{value:r,children:n})})})}const Mye=ofe()&&window.localStorage.getItem("DEBUG")!=null,xf=()=>{},Rye={debug:xf,info:xf,warn:xf,error:xf},z2=["debug","info","warn","error"];function B2(e,t,n=console){const r=z2.indexOf(t);if(r===-1)throw new Error(`MUI: Log level ${t} not recognized.`);return z2.reduce((i,a,l)=>(l>=r?i[a]=(...s)=>{const[u,...c]=s;n[a](`MUI: ${e} - ${u}`,...c)}:i[a]=xf,i),{})}const Tye=(e,t)=>{const n=v.useCallback(r=>Mye?B2(r,"debug",t.logger):t.logLevel?B2(r,t.logLevel.toString(),t.logger):Rye,[t.logLevel,t.logger]);it(e,{getLogger:n},"private")};class $P{static create(t){return new $P(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}}class _ye{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 l=o[a];r.highPriority.has(l)&&l.apply(this,n)}for(let a=0;ae.isPropagationStopped!==void 0;let H2=0;function Aye(e){var t;const n=(t=e.current)==null?void 0:t[Bj];if(n)return n;const r={},o={state:r,store:$P.create(r),instanceId:{id:H2}};return H2+=1,o.getPublicApi=()=>e.current,o.register=(i,a)=>{Object.keys(a).forEach(l=>{const s=a[l],u=o[l];if((u==null?void 0:u.spying)===!0?u.target=s:o[l]=s,i==="public"){const c=e.current,d=c[l];(d==null?void 0:d.spying)===!0?d.target=s:c[l]=s}})},o.register("private",{caches:{},eventManager:new _ye}),o}function Lye(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[Bj]:e.current}}function Dye(e,t){const n=v.useRef(),r=v.useRef();r.current||(r.current=Aye(n)),n.current||(n.current=Lye(r));const o=v.useCallback((...a)=>{const[l,s,u={}]=a;if(u.defaultMuiPrevented=!1,Fye(u)&&u.isPropagationStopped())return;const c=t.signature===Ki.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,s,u,c)},[r,t.signature]),i=v.useCallback((a,l,s)=>{r.current.eventManager.on(a,l,s);const u=r.current;return()=>{u.eventManager.removeListener(a,l)}},[r]);return it(r,{subscribeEvent:i,publishEvent:o},"public"),v.useImperativeHandle(e,()=>n.current,[n]),v.useEffect(()=>{const a=r.current;return()=>{a.publishEvent("unmount")}},[r]),r}const Nye=(e,t)=>{const n=v.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})},jye=e=>{const t=v.useRef({}),n=v.useRef(!1),r=v.useCallback(c=>{n.current||!c||(n.current=!0,Object.values(c.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=v.useCallback((c,d,f)=>{t.current[c]||(t.current[c]={processors:new Map,appliers:{}});const m=t.current[c];return m.processors.get(d)!==f&&(m.processors.set(d,f),r(m)),()=>{t.current[c].processors.set(d,null)}},[r]),i=v.useCallback((c,d,f)=>(t.current[c]||(t.current[c]={processors:new Map,appliers:{}}),t.current[c].appliers[d]=f,()=>{const m=t.current[c].appliers,p=ue(m,[d].map(wp));t.current[c].appliers=p}),[]),a=v.useCallback(c=>{const d=t.current[c];r(d)},[r]),l=v.useCallback((...c)=>{const[d,f,m]=c;return t.current[d]?Array.from(t.current[d].processors.values()).reduce((h,y)=>y?y(h,m):h,f):f},[]),s={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:a},u={unstable_applyPipeProcessors:l};it(e,s,"private"),it(e,u,"public")},jn=(e,t,n)=>{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);dm(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},IP=(e,t,n)=>{const r=v.useRef(),o=v.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=v.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);dm(()=>{i()});const a=v.useRef(!0);v.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},Ev=(e,t,n,r)=>{const o=v.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);dm(()=>{o()});const i=v.useRef(!0);v.useEffect(()=>{i.current?i.current=!1:o()},[o])},hu="none",V2={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},zye=e=>{const t=v.useRef(new Map),n=v.useRef({}),r=v.useCallback((s,u,c)=>{const d=()=>{const p=n.current[u],h=ue(p,[s].map(wp));n.current[u]=h};n.current[u]||(n.current[u]={});const f=n.current[u],m=f[s];return f[s]=c,!m||m===c||s===e.current.getActiveStrategy(V2[u])&&e.current.publishEvent("activeStrategyProcessorChange",u),d},[e]),o=v.useCallback((s,u)=>{const c=e.current.getActiveStrategy(V2[s]);if(c==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[s];if(!d||!d[c])throw new Error(`No processor found for processor "${s}" on strategy "${c}"`);const f=d[c];return f(u)},[e]),i=v.useCallback(s=>{var u;const d=Array.from(t.current.entries()).find(([,f])=>f.group!==s?!1:f.isAvailable());return(u=d==null?void 0:d[0])!=null?u:hu},[]),a=v.useCallback((s,u,c)=>{t.current.set(u,{group:s,isAvailable:c}),e.current.publishEvent("strategyAvailabilityChange")},[e]);it(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},Bye=(e,t)=>{const n=v.useRef({}),[,r]=v.useState(),o=v.useCallback(c=>{n.current[c.stateId]=c},[]),i=v.useCallback((c,d)=>{let f;if(rj(c)?f=c(e.current.state):f=c,e.current.state===f)return!1;let m=!1;const p=[];if(Object.keys(n.current).forEach(h=>{const y=n.current[h],b=y.stateSelector(e.current.state,e.current.instanceId),g=y.stateSelector(f,e.current.instanceId);g!==b&&(p.push({stateId:y.stateId,hasPropChanged:g!==y.propModel}),y.propModel!==void 0&&g!==y.propModel&&(m=!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(h=>h.stateId).join(", ")} in the same transaction.`);if(m||(e.current.state=f,e.current.publishEvent&&e.current.publishEvent("stateChange",f),e.current.store.update(f)),p.length===1){const{stateId:h,hasPropChanged:y}=p[0],b=n.current[h],g=b.stateSelector(f,e.current.instanceId);if(b.propOnChange&&y){const x=t.signature===Ki.DataGridPro?{api:e.current,reason:d}:{reason:d};b.propOnChange(g,x)}m||e.current.publishEvent(b.changeEvent,g,{reason:d})}return!m},[e,t.signature]),a=v.useCallback((c,d,f)=>e.current.setState(m=>I({},m,{[c]:d(m[c])}),f),[e]),l=v.useCallback(()=>r(()=>e.current.state),[e]),s={setState:i,forceUpdate:l},u={updateControlState:a,registerControlState:o};it(e,s,"public"),it(e,u,"private")},Hye=(e,t)=>{const n=Dye(e,t);return Tye(n,t),Bye(n,t),jye(n),zye(n),Nye(n,t),n.current.register("private",{rootProps:t}),n},_r=(e,t,n)=>{const r=v.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)},Vye=/(\d+)-(\d+)-(\d+)/,Uye=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function ju(e,t,n,r){if(!e.value)return null;const[o,i,a,l,s]=e.value.match(n?Uye:Vye).slice(1).map(Number),u=new Date(o,i-1,a,l||0,s||0).getTime();return c=>{if(!c)return!1;if(r)return t(c.getTime(),u);const f=new Date(c).setHours(n?c.getHours():0,n?c.getMinutes():0,0,0);return t(f,u)}}const Hj=e=>pm([{value:"is",getApplyFilterFnV7:t=>ju(t,(n,r)=>n===r,e),InputComponent:Nu,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>ju(t,(n,r)=>n!==r,e),InputComponent:Nu,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>ju(t,(n,r)=>n>r,e),InputComponent:Nu,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>ju(t,(n,r)=>n>=r,e),InputComponent:Nu,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>ju(t,(n,r)=>nju(t,(n,r)=>n<=r,e),InputComponent:Nu,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!=null,requiresFilterValue:!1}]);function Vj({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI: \`${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(` `))}function Wye({value:e,field:t,id:n}){return e?(Vj({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""}function Gye({value:e,field:t,id:n}){return e?(Vj({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""}const qye=I({},yi,{type:"date",sortComparator:fj,valueFormatter:Wye,filterOperators:Hj(),renderEditCell:G4,pastedValueParser:e=>new Date(e)}),Kye=I({},yi,{type:"dateTime",sortComparator:fj,valueFormatter:Gye,filterOperators:Hj(!0),renderEditCell:G4,pastedValueParser:e=>new Date(e)}),kl=e=>e==null?null:Number(e),U2=fm(e=>e==null||Number.isNaN(e)||e===""?null:t=>kl(t)===kl(e)),Qye=()=>pm([{value:"=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>kl(t)===e.value,InputComponent:Ni,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>kl(t)!==e.value,InputComponent:Ni,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:kl(t)>e.value,InputComponent:Ni,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:kl(t)>=e.value,InputComponent:Ni,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:kl(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:kl(t)<=e.value,InputComponent:Ni,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:Sj,InputComponentProps:{type:"number"}}]),Yye=I({},yi,{type:"number",align:"right",headerAlign:"right",sortComparator:dj,valueParser:e=>e===""?null:Number(e),valueFormatter:({value:e})=>rfe(e)?e.toLocaleString():e||"",filterOperators:Qye(),getApplyQuickFilterFn:Lj(U2),getApplyQuickFilterFnV7:U2}),zu=e=>e==null||!hP(e)?e:e.value,Xye=()=>pm([{value:"is",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>zu(t)===zu(e.value),InputComponent:y2},{value:"not",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>zu(t)!==zu(e.value),InputComponent:y2},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(zu);return n=>t.includes(zu(n))},InputComponent:Phe}]),Zye=e=>typeof e[0]=="object",Jye=e=>hP(e)?e.value:e,e0e=e=>hP(e)?e.label:String(e),t0e=I({},yi,{type:"singleSelect",getOptionLabel:e0e,getOptionValue:Jye,valueFormatter(e){const{id:t,field:n,value:r,api:o}=e,i=e.api.getColumn(n);if(!Qs(i))return"";let a;if(typeof i.valueOptions=="function"?a=i.valueOptions({id:t,row:t?o.getRow(t):null,field:n}):a=i.valueOptions,r==null)return"";if(!a)return r;if(!Zye(a))return i.getOptionLabel(r);const l=a.find(s=>i.getOptionValue(s)===r);return l?i.getOptionLabel(l):""},renderEditCell:Ice,filterOperators:Xye(),pastedValueParser:(e,t)=>{const n=t.colDef,r=n.valueOptions,o=typeof r=="function"?r({field:n.field}):r||[],i=n.getOptionValue;if(o.find(l=>i(l)===e))return e}}),Uj="__default__",n0e=()=>({string:yi,number:Yye,date:qye,dateTime:Kye,boolean:zj,singleSelect:t0e,[k0]:Sye,[Uj]:yi});function Yw(e,t){return typeof e=="string"&&[t,` `,"\r",'"'].some(n=>e.includes(n))?`"${e.replace(/"/g,'""')}"`:e}const Wj=(e,t)=>{const{delimiterCharacter:n,ignoreValueFormatter:r}=t;let o;if(r){var i;const l=e.colDef.type;if(l==="number")o=String(e.value);else if(l==="date"||l==="dateTime"){var a;o=(a=e.value)==null?void 0:a.toISOString()}else typeof((i=e.value)==null?void 0:i.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return Yw(o,n)};ua(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class Xw{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.delimiterCharacter),t==null?this.rowString+="":typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.delimiterCharacter):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const r0e=({id:e,columns:t,getCellParams:n,delimiterCharacter:r,ignoreValueFormatter:o})=>{const i=new Xw({delimiterCharacter:r});return t.forEach(a=>{const l=n(e,a.field);i.addValue(Wj(l,{delimiterCharacter:r,ignoreValueFormatter:o}))}),i.getRowString()};function o0e(e){const{columns:t,rowIds:n,delimiterCharacter:r,includeHeaders:o,includeColumnGroupsHeaders:i,ignoreValueFormatter:a,apiRef:l}=e,s=n.reduce((m,p)=>`${m}${r0e({id:p,columns:t,getCellParams:l.current.getCellParams,delimiterCharacter:r,ignoreValueFormatter:a})}\r `,"").trim();if(!o)return s;const u=t.filter(m=>m.field!==Id.field),c=[];if(i){const m=l.current.unstable_getAllGroupDetails();let p=0;const h=u.reduce((y,b)=>{const g=l.current.unstable_getColumnGroupPath(b.field);return y[b.field]=g,p=Math.max(p,g.length),y},{});for(let y=0;y{const x=(h[g.field]||[])[y],w=m[x];b.addValue(w?w.headerName||w.groupId:"")})}}const d=new Xw({delimiterCharacter:r,sanitizeCellValue:Yw});return u.forEach(m=>{d.addValue(m.headerName||m.field)}),c.push(d),`${`${c.map(m=>m.getRowString()).join(`\r `)}\r `}${s}`.trim()}function W2(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 i0e(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{W2(e)}):W2(e)}function a0e(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const l0e=(e,t)=>{const n=t.unstable_ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=v.useCallback(a=>{if(!((a.ctrlKey||a.metaKey)&&a.key==="c")||a0e(a.target))return;let l="";if(e.current.getSelectedRows().size>0)l=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o});else{const u=to(e);if(u){const c=e.current.getCellParams(u.id,u.field);l=Wj(c,{delimiterCharacter:o,ignoreValueFormatter:r})}}l=e.current.unstable_applyPipeProcessors("clipboardCopy",l),l&&(i0e(l),e.current.publishEvent("clipboardCopy",l))},[e,r,o]);lfe(e,e.current.rootElementRef,"keydown",i),Qt(e,"clipboardCopy",t.onClipboardCopy)},s0e=e=>I({},e,{columnMenu:{open:!1}}),u0e=e=>{const t=vr(e,"useGridColumnMenu"),n=v.useCallback(a=>{e.current.setState(s=>s.columnMenu.open&&s.columnMenu.field===a?s:(t.debug("Opening Column Menu"),I({},s,{columnMenu:{open:!0,field:a}})))&&(e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=v.useCallback(()=>{const a=Uw(e.current.state);if(a.field){const s=Ed(e),u=mi(e),c=Na(e);let d=a.field;if(s[d]||(d=c[0]),u[d]===!1){const f=c.filter(p=>p===d?!0:u[p]!==!1),m=f.indexOf(d);d=f[m+1]||f[m-1]}e.current.setColumnHeaderFocus(d)}e.current.setState(s=>!s.columnMenu.open&&s.columnMenu.field===void 0?s:(t.debug("Hiding Column Menu"),I({},s,{columnMenu:I({},s.columnMenu,{open:!1,field:void 0})})))&&e.current.forceUpdate()},[e,t]),o=v.useCallback(a=>{t.debug("Toggle Column Menu");const l=Uw(e.current.state);!l.open||l.field!==a?n(a):r()},[e,t,n,r]);it(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),qe(e,"columnResizeStart",r),qe(e,"virtualScrollerWheel",e.current.hideColumnMenu),qe(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},Gj=["maxWidth","minWidth","width","flex"];function c0e({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const l=o.all[a];l&&l.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 l=e,s=t,u=0;o.frozenFields.forEach(c=>{l-=o.all[c].computedWidth,s-=o.all[c].flex});for(let c=0;cd.maxWidth&&(u+=d.maxWidth-m,m=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:m,flex:d.flex}}u<0?Object.keys(a.max).forEach(c=>{o.freeze(c)}):u>0?Object.keys(a.min).forEach(c=>{o.freeze(c)}):n.forEach(({field:c})=>{o.freeze(c)}),i()}return i(),o.all}const Zw=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{const s=I({},e.lookup[l]);if(e.columnVisibilityModel[l]===!1)s.computedWidth=0;else{let u;s.flex&&s.flex>0?(r+=s.flex,u=0,i.push(s)):u=id(s.width||yi.width,s.minWidth||yi.minWidth,s.maxWidth||yi.maxWidth),o+=u,s.computedWidth=u}n[l]=s});const a=Math.max(t-o,0);if(r>0&&t>0){const l=c0e({initialFreeSpace:a,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(s=>{n[s].computedWidth=l[s].computedWidth})}return I({},e,{lookup:n})},d0e=(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 c=0;c!i[c])],s=I({},e.lookup);for(let c=0;c{f[m]=p===-1?1/0:p}),s[d]=f}return I({},e,{orderedFields:l,lookup:s})};function G2(e,t){let n=e[Uj];return t&&e[t]&&(n=e[t]),n}const ec=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:r,columnVisibilityModel:o=mi(e),keepOnlyColumnsToUpsert:i=!1})=>{var a,l,s;const u=!e.current.state.columns;let c;if(u)c={orderedFields:[],lookup:{},columnVisibilityModel:o};else{const p=Ks(e.current.state);c={orderedFields:i?[]:[...p.orderedFields],lookup:I({},p.lookup),columnVisibilityModel:o}}let d={};i&&!u&&(d=Object.keys(c.lookup).reduce((p,h)=>I({},p,{[h]:!1}),{})),t.forEach(p=>{const{field:h}=p;d[h]=!0;let y=c.lookup[h];y==null?(y=I({},G2(r,p.type),{field:h,hasBeenResized:!1}),c.orderedFields.push(h)):i&&c.orderedFields.push(h),y&&y.type!==p.type&&(y=I({},G2(r,p.type),{field:h}));let b=y.hasBeenResized;Gj.forEach(g=>{p[g]!==void 0&&(b=!0,p[g]===-1&&(p[g]=1/0))}),c.lookup[h]=I({},y,p,{hasBeenResized:b})}),i&&!u&&Object.keys(c.lookup).forEach(p=>{d[p]||delete c.lookup[p]});const f=e.current.unstable_applyPipeProcessors("hydrateColumns",c),m=d0e(f,n);return Zw(m,(a=(l=(s=e.current).getRootDimensions)==null||(l=l.call(s))==null?void 0:l.viewportInnerSize.width)!=null?a:0)},q2=e=>t=>I({},t,{columns:e});function Jw({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{var r,o,i,a;const l=ec({apiRef:n,columnTypes:qj,columnsToUpsert:t.columns,initialState:(r=t.initialState)==null?void 0:r.columns,columnVisibilityModel:(o=(i=t.columnVisibilityModel)!=null?i:(a=t.initialState)==null||(a=a.columns)==null?void 0:a.columnVisibilityModel)!=null?o:{},keepOnlyColumnsToUpsert:!0});return I({},e,{columns:l})};function m0e(e,t){var n,r;const o=vr(e,"useGridColumns"),i=qj,a=v.useRef(t.columns),l=v.useRef(i);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:mi,changeEvent:"columnVisibilityModelChange"});const s=v.useCallback(T=>{o.debug("Updating columns state."),e.current.setState(q2(T)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",T.orderedFields)},[o,e]),u=v.useCallback(T=>Ed(e)[T],[e]),c=v.useCallback(()=>qi(e),[e]),d=v.useCallback(()=>tr(e),[e]),f=v.useCallback((T,F=!0)=>(F?tr(e):qi(e)).findIndex($=>$.field===T),[e]),m=v.useCallback(T=>{const F=f(T);return od(e)[F]},[e,f]),p=v.useCallback(T=>{mi(e)!==T&&(e.current.setState(j=>I({},j,{columns:ec({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:T,keepOnlyColumnsToUpsert:!1})})),e.current.forceUpdate())},[e,i]),h=v.useCallback(T=>{const F=ec({apiRef:e,columnTypes:i,columnsToUpsert:T,initialState:void 0,keepOnlyColumnsToUpsert:!1});s(F)},[e,s,i]),y=v.useCallback((T,F)=>{var j;const $=mi(e),L=(j=$[T])!=null?j:!0;if(F!==L){const z=I({},$,{[T]:F});e.current.setColumnVisibilityModel(z)}},[e]),b=v.useCallback(T=>Na(e).findIndex(j=>j===T),[e]),g=v.useCallback((T,F)=>{const j=Na(e),$=b(T);if($===F)return;o.debug(`Moving column ${T} to index ${F}`);const L=[...j],z=L.splice($,1)[0];L.splice(F,0,z),s(I({},Ks(e.current.state),{orderedFields:L}));const B={column:e.current.getColumn(T),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(T),oldIndex:$};e.current.publishEvent("columnIndexChange",B)},[e,o,s,b]),x=v.useCallback((T,F)=>{var j,$;o.debug(`Updating column ${T} width to ${F}`);const L=Ks(e.current.state),z=L.lookup[T],B=I({},z,{width:F,hasBeenResized:!0});s(Zw(I({},L,{lookup:I({},L.lookup,{[T]:B})}),(j=($=e.current.getRootDimensions())==null?void 0:$.viewportInnerSize.width)!=null?j:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(T),colDef:B,width:F})},[e,o,s]),w={getColumn:u,getAllColumns:c,getColumnIndex:f,getColumnPosition:m,getVisibleColumns:d,getColumnIndexRelativeToVisibleColumns:b,updateColumns:h,setColumnVisibilityModel:p,setColumnVisibility:y,setColumnWidth:x},P={setColumnIndex:g};it(e,w,"public"),it(e,P,t.signature===Ki.DataGrid?"private":"public");const C=v.useCallback((T,F)=>{var j,$;const L={},z=mi(e);(!F.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys((j=($=t.initialState)==null||($=$.columns)==null?void 0:$.columnVisibilityModel)!=null?j:{}).length>0||Object.keys(z).length>0)&&(L.columnVisibilityModel=z),L.orderedFields=Na(e);const A=qi(e),H={};return A.forEach(q=>{if(q.hasBeenResized){const U={};Gj.forEach(G=>{let Y=q[G];Y===1/0&&(Y=-1),U[G]=Y}),H[q.field]=U}}),Object.keys(H).length>0&&(L.dimensions=H),I({},T,{columns:L})},[e,t.columnVisibilityModel,(n=t.initialState)==null?void 0:n.columns]),E=v.useCallback((T,F)=>{var j;const $=(j=F.stateToRestore.columns)==null?void 0:j.columnVisibilityModel,L=F.stateToRestore.columns;if($==null&&L==null)return T;const z=ec({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:L,columnVisibilityModel:$,keepOnlyColumnsToUpsert:!1});return e.current.setState(q2(z)),L!=null&&e.current.publishEvent("columnsChange",z.orderedFields),T},[e,i]),S=v.useCallback((T,F)=>{if(F===mu.columns){var j;const $=t.slots.columnsPanel;return N.jsx($,I({},(j=t.slotProps)==null?void 0:j.columnsPanel))}return T},[t.slots.columnsPanel,(r=t.slotProps)==null?void 0:r.columnsPanel]),M=v.useCallback(T=>t.disableColumnSelector?T:[...T,"columnMenuColumnsItem"],[t.disableColumnSelector]);jn(e,"columnMenu",M),jn(e,"exportState",C),jn(e,"restoreState",E),jn(e,"preferencePanel",S);const O=v.useRef(null);qe(e,"viewportInnerSizeChange",T=>{O.current!==T.width&&(O.current=T.width,s(Zw(Ks(e.current.state),T.width)))});const _=v.useCallback(()=>{o.info("Columns pipe processing have changed, regenerating the columns");const T=ec({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});s(T)},[e,o,s,i]);IP(e,"hydrateColumns",_);const D=v.useRef(!0);v.useEffect(()=>{if(D.current){D.current=!1;return}if(o.info(`GridColumns have changed, new length ${t.columns.length}`),a.current===t.columns&&l.current===i)return;const T=ec({apiRef:e,columnTypes:i,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});a.current=t.columns,l.current=i,s(T)},[o,e,s,t.columns,i]),v.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,o,t.columnVisibilityModel])}const h0e=.7,g0e=1.3,Kj={compact:h0e,comfortable:g0e,standard:1},v0e=(e,t)=>I({},e,{density:{value:t.density,factor:Kj[t.density]}}),y0e=(e,t)=>{const n=vr(e,"useDensity"),r=v.useCallback(i=>{n.debug(`Set grid density to ${i}`),e.current.setState(a=>{const l=sP(a),s={value:i,factor:Kj[i]};return Ys(l,s)?a:I({},a,{density:s})}),e.current.forceUpdate()},[n,e]);v.useEffect(()=>{e.current.setDensity(t.density)},[e,t.density]),it(e,{setDensity:r},"public")};function b0e(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: exportAs not supported")}const Qj=({apiRef:e,options:t})=>{const n=qi(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(l=>l.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:tr(e)).filter(o=>!o.disableExport)},x0e=({apiRef:e})=>{var t,n;const r=sue(e),o=di(e),i=e.current.getSelectedRows(),a=r.filter(c=>o[c].type!=="footer"),l=Pd(e),s=(l==null||(t=l.top)==null?void 0:t.map(c=>c.id))||[],u=(l==null||(n=l.bottom)==null?void 0:n.map(c=>c.id))||[];return a.unshift(...s),a.push(...u),i.size>0?a.filter(c=>i.has(c)):a},w0e=(e,t)=>{const n=vr(e,"useGridCsvExport"),r=t.unstable_ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=v.useCallback((u={})=>{var c,d,f;n.debug("Get data as CSV");const m=Qj({apiRef:e,options:u}),h=((c=u.getRowsToExport)!=null?c:x0e)({apiRef:e});return o0e({columns:m,rowIds:h,delimiterCharacter:u.delimiter||",",includeHeaders:(d=u.includeHeaders)!=null?d:!0,includeColumnGroupsHeaders:(f=u.includeColumnGroupsHeaders)!=null?f:!0,ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=v.useCallback(u=>{n.debug("Export data as CSV");const c=i(u),d=new Blob([u!=null&&u.utf8WithBom?new Uint8Array([239,187,191]):"",c],{type:"text/csv"});b0e(d,"csv",u==null?void 0:u.fileName)},[n,i]);it(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const s=v.useCallback((u,c)=>{var d;return(d=c.csvOptions)!=null&&d.disableToolbarButton?u:[...u,{component:N.jsx(Ihe,{options:c.csvOptions}),componentName:"csvExport"}]},[]);jn(e,"exportMenu",s)},C0e=(e,t)=>{var n,r;const o=I({},aj(t.autoPageSize),(n=t.paginationModel)!=null?n:(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.paginationModel);return lj(o.pageSize,t.signature),I({},e,{pagination:{paginationModel:o}})},dg=(e,t,n)=>r=>{var o;let i=r.paginationModel;const a=(o=n==null?void 0:n.pageSize)!=null?o:i.pageSize,l=ij(e,a);n&&((n==null?void 0:n.page)!==i.page||(n==null?void 0:n.pageSize)!==i.pageSize)&&(i=n);const s=cfe(i.page,l);return s!==i.page&&(i=I({},i,{page:s})),lj(i.pageSize,t),{paginationModel:i}},S0e=(e,t)=>{var n;const r=vr(e,"useGridPagination"),o=Ne(e,h0),i=Ne(e,kd),a=Math.floor(t.rowHeight*i);e.current.registerControlState({stateId:"pagination",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Io,changeEvent:"paginationModelChange"});const l=v.useCallback(h=>{const y=Io(e);h!==y.page&&(r.debug(`Setting page to ${h}`),e.current.setPaginationModel({page:h,pageSize:y.pageSize}))},[e,r]),s=v.useCallback(h=>{const y=Io(e);h!==y.pageSize&&(r.debug(`Setting page size to ${h}`),e.current.setPaginationModel({pageSize:h,page:y.page}))},[e,r]),u=v.useCallback(h=>{var y;const b=Io(e);h!==b&&(r.debug("Setting 'paginationModel' to",h),e.current.updateControlState("pagination",dg((y=t.rowCount)!=null?y:o,t.signature,h),"setPaginationModel"),e.current.forceUpdate())},[e,r,t.rowCount,t.signature,o]);it(e,{setPage:l,setPageSize:s,setPaginationModel:u},"public");const d=v.useCallback((h,y)=>{var b;const g=Io(e);return!y.exportOnlyDirtyModels||t.paginationModel!=null||((b=t.initialState)==null||(b=b.pagination)==null?void 0:b.paginationModel)!=null||g.page!==0&&g.pageSize!==ufe(t.autoPageSize)?I({},h,{pagination:I({},h.pagination,{paginationModel:g})}):h},[e,t.paginationModel,(n=t.initialState)==null||(n=n.pagination)==null?void 0:n.paginationModel,t.autoPageSize]),f=v.useCallback((h,y)=>{var b,g,x;const w=(b=y.stateToRestore.pagination)!=null&&b.paginationModel?I({},aj(t.autoPageSize),(g=y.stateToRestore.pagination)==null?void 0:g.paginationModel):Io(e);return e.current.updateControlState("pagination",dg((x=t.rowCount)!=null?x:o,t.signature,w),"stateRestorePreProcessing"),h},[e,t.autoPageSize,t.rowCount,t.signature,o]);jn(e,"exportState",d),jn(e,"restoreState",f);const m=()=>{var h;const y=Io(e);(h=e.current.virtualScrollerRef)!=null&&h.current&&e.current.scrollToIndexes({rowIndex:y.page*y.pageSize}),e.current.forceUpdate()},p=v.useCallback(()=>{const h=e.current.getRootDimensions();if(!t.autoPageSize||!h)return;const y=B4(e),b=Math.floor((h.viewportInnerSize.height-y.top-y.bottom)/a);e.current.setPageSize(b)},[e,t.autoPageSize,a]);qe(e,"viewportInnerSizeChange",p),qe(e,"paginationModelChange",m),v.useEffect(()=>{},[t.rowCount,t.paginationMode]),v.useEffect(()=>{var h;e.current.updateControlState("pagination",dg((h=t.rowCount)!=null?h:o,t.signature,t.paginationModel))},[e,t.paginationModel,t.rowCount,t.paginationMode,o,t.signature]),v.useEffect(()=>{p()},[p])};function E0e(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function P0e(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 k0e=(e,t)=>{const n=vr(e,"useGridPrintExport"),r=v.useRef(null),o=v.useRef(null),i=v.useRef({}),a=v.useRef([]);v.useEffect(()=>{r.current=un(e.current.rootElementRef.current)},[e]);const l=v.useCallback((p,h,y)=>new Promise(b=>{const g=Qj({apiRef:e,options:{fields:p,allColumns:h}}).map(P=>P.field),x=qi(e),w={};x.forEach(P=>{w[P.field]=g.includes(P.field)}),y&&(w[Id.field]=!0),e.current.setColumnVisibilityModel(w),b()}),[e]),s=v.useCallback(p=>{const y=p({apiRef:e}).map(b=>e.current.getRow(b));e.current.setRows(y)},[e]),u=v.useCallback((p,h)=>{var y,b;const g=I({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},h),x=p.contentDocument;if(!x)return;const w=Ip(e.current.state),P=e.current.rootElementRef.current,C=P.cloneNode(!0),E=C.querySelector(`.${ne.main}`);E.style.overflow="visible",C.style.contain="size";const M=C.querySelector(`.${ne.columnHeaders}`).querySelector(`.${ne.columnHeadersInner}`);M.style.width="100%";let O=((y=P.querySelector(`.${ne.toolbarContainer}`))==null?void 0:y.offsetHeight)||0,R=((b=P.querySelector(`.${ne.footerContainer}`))==null?void 0:b.offsetHeight)||0;if(g.hideToolbar){var _;(_=C.querySelector(`.${ne.toolbarContainer}`))==null||_.remove(),O=0}if(g.hideFooter){var D;(D=C.querySelector(`.${ne.footerContainer}`))==null||D.remove(),R=0}const T=w.currentPageTotalHeight+OP(e,t.columnHeaderHeight)+O+R;if(C.style.height=`${T}px`,C.style.boxSizing="content-box",h!=null&&h.getRowsToExport){const L=C.querySelector(`.${ne.footerContainer}`);L.style.position="absolute",L.style.width="100%",L.style.top=`${T-R}px`}const F=document.createElement("div");F.appendChild(C),x.body.innerHTML=F.innerHTML;const j=typeof g.pageStyle=="function"?g.pageStyle():g.pageStyle;if(typeof j=="string"){const L=x.createElement("style");L.appendChild(x.createTextNode(j)),x.head.appendChild(L)}g.bodyClassName&&x.body.classList.add(...g.bodyClassName.split(" "));const $=[];if(g.copyStyles){const L=P.getRootNode(),B=(L.constructor.name==="ShadowRoot"?L:r.current).querySelectorAll("style, link[rel='stylesheet']");for(let A=0;A{q.addEventListener("load",()=>U())})),x.head.appendChild(q)}}}Promise.all($).then(()=>{p.contentWindow.print()})},[e,r,t.columnHeaderHeight]),c=v.useCallback(p=>{var h;r.current.body.removeChild(p),e.current.restoreState(o.current||{}),(h=o.current)!=null&&(h=h.columns)!=null&&h.columnVisibilityModel||e.current.setColumnVisibilityModel(i.current),e.current.unstable_setVirtualization(!0),e.current.setRows(a.current),o.current=null,i.current={},a.current=[]},[e]),f={exportDataAsPrint:v.useCallback(async p=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");o.current=e.current.exportState(),i.current=mi(e);const h=Ta(e);if(a.current=yf(e).map(b=>h[b]),t.pagination){const b=D4(e),g={page:0,pageSize:b};e.current.updateControlState("pagination",dg(b,"DataGridPro",g)),e.current.forceUpdate()}await l(p==null?void 0:p.fields,p==null?void 0:p.allColumns,p==null?void 0:p.includeCheckboxes),p!=null&&p.getRowsToExport&&s(p.getRowsToExport),e.current.unstable_setVirtualization(!1),await E0e();const y=P0e(p==null?void 0:p.fileName);y.onload=()=>{u(y,p),y.contentWindow.matchMedia("print").addEventListener("change",g=>{g.matches===!1&&c(y)})},r.current.body.appendChild(y)},[t,n,e,u,c,l,s])};it(e,f,"public");const m=v.useCallback((p,h)=>{var y;return(y=h.printOptions)!=null&&y.disableToolbarButton?p:[...p,{component:N.jsx(Ohe,{options:h.printOptions}),componentName:"printExport"}]},[]);jn(e,"exportMenu",m)},$0e=(e,t,n)=>{var r,o,i;const a=(r=(o=t.filterModel)!=null?o:(i=t.initialState)==null||(i=i.filter)==null?void 0:i.filterModel)!=null?r:kp();return I({},e,{filter:{filterModel:Nj(a,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},I0e=e=>e.filteredRowsLookup;function K2(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function O0e(){return c0(Object.values)}const M0e=(e,t)=>{var n,r;const o=vr(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Xn,changeEvent:"filterModelChange"});const i=v.useCallback(()=>{e.current.setState(O=>{const R=Xn(O,e.current.instanceId),_=t.filterMode==="client"?gye(R,e,t.disableEval):null,D=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:_,filterModel:R??kp()}),T=I({},O,{filter:I({},O.filter,D)}),F=K2(e,T);return I({},T,{visibleRowsLookup:F})}),e.current.publishEvent("filteredRowsSet")},[e,t.filterMode,t.disableEval]),a=v.useCallback((O,R)=>R==null||R.filterable===!1||t.disableColumnFilter?O:[...O,"columnMenuFilterItem"],[t.disableColumnFilter]),l=v.useCallback(()=>{i(),e.current.forceUpdate()},[e,i]),s=v.useCallback(O=>{const R=Xn(e),_=[...R.items],D=_.findIndex(T=>T.id===O.id);D===-1?_.push(O):_[D]=O,e.current.setFilterModel(I({},R,{items:_}),"upsertFilterItem")},[e]),u=v.useCallback(O=>{const R=Xn(e),_=[...R.items];O.forEach(D=>{const T=O.findIndex(F=>F.id===D.id);T===-1?_.push(D):_[T]=D}),e.current.setFilterModel(I({},R,{items:O}),"upsertFilterItems")},[e]),c=v.useCallback(O=>{const R=Xn(e),_=R.items.filter(D=>D.id!==O.id);_.length!==R.items.length&&e.current.setFilterModel(I({},R,{items:_}),"deleteFilterItem")},[e]),d=v.useCallback((O,R,_)=>{if(o.debug("Displaying filter panel"),O){const D=Xn(e),T=D.items.filter(L=>{var z;if(L.value!==void 0)return!(Array.isArray(L.value)&&L.value.length===0);const A=(z=e.current.getColumn(L.field).filterOperators)==null?void 0:z.find(q=>q.value===L.operator);return!(typeof(A==null?void 0:A.requiresFilterValue)>"u"?!0:A==null?void 0:A.requiresFilterValue)});let F;const j=T.find(L=>L.field===O),$=e.current.getColumn(O);j?F=T:t.disableMultipleColumnsFiltering?F=[Qw({field:O,operator:$.filterOperators[0].value},e)]:F=[...T,Qw({field:O,operator:$.filterOperators[0].value},e)],e.current.setFilterModel(I({},D,{items:F}))}e.current.showPreferences(mu.filters,R,_)},[e,o,t.disableMultipleColumnsFiltering]),f=v.useCallback(()=>{o.debug("Hiding filter panel"),e.current.hidePreferences()},[e,o]),m=v.useCallback(O=>{const R=Xn(e);R.logicOperator!==O&&e.current.setFilterModel(I({},R,{logicOperator:O}),"changeLogicOperator")},[e]),p=v.useCallback(O=>{const R=Xn(e);Ys(R.quickFilterValues,O)||e.current.setFilterModel(I({},R,{quickFilterValues:[...O]}))},[e]),h=v.useCallback((O,R)=>{Xn(e)!==O&&(o.debug("Setting filter model"),e.current.updateControlState("filter",L2(O,t.disableMultipleColumnsFiltering,e),R),e.current.unstable_applyFilters())},[e,o,t.disableMultipleColumnsFiltering]),y={setFilterLogicOperator:m,unstable_applyFilters:l,deleteFilterItem:c,upsertFilterItem:s,upsertFilterItems:u,setFilterModel:h,showFilterPanel:d,hideFilterPanel:f,setQuickFilterValues:p,ignoreDiacritics:t.ignoreDiacritics};it(e,y,"public");const b=v.useCallback((O,R)=>{var _;const D=Xn(e);return!R.exportOnlyDirtyModels||t.filterModel!=null||((_=t.initialState)==null||(_=_.filter)==null?void 0:_.filterModel)!=null||!Ys(D,kp())?I({},O,{filter:{filterModel:D}}):O},[e,t.filterModel,(n=t.initialState)==null||(n=n.filter)==null?void 0:n.filterModel]),g=v.useCallback((O,R)=>{var _;const D=(_=R.stateToRestore.filter)==null?void 0:_.filterModel;return D==null?O:(e.current.updateControlState("filter",L2(D,t.disableMultipleColumnsFiltering,e),"restoreState"),I({},O,{callbacks:[...O.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=v.useCallback((O,R)=>{if(R===mu.filters){var _;const D=t.slots.filterPanel;return N.jsx(D,I({},(_=t.slotProps)==null?void 0:_.filterPanel))}return O},[t.slots.filterPanel,(r=t.slotProps)==null?void 0:r.filterPanel]),{getRowId:w}=t,P=nP(O0e),C=v.useCallback(O=>{if(t.filterMode!=="client"||!O.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const R=Ta(e),_={},{isRowMatchingFilters:D}=O,T={},F={passingFilterItems:null,passingQuickFilterValues:null},j=P.current(e.current.state.rows.dataRowIdToModelLookup);for(let z=0;z{o.debug("onColUpdated - GridColumns changed, applying filters");const O=Xn(e),R=Kse(e),_=O.items.filter(D=>D.field&&R[D.field]);_.length{O==="filtering"&&e.current.unstable_applyFilters()},[e]),M=v.useCallback(()=>{e.current.setState(O=>I({},O,{visibleRowsLookup:K2(e,O)})),e.current.forceUpdate()},[e]);qe(e,"rowsSet",i),qe(e,"columnsChange",E),qe(e,"activeStrategyProcessorChange",S),qe(e,"rowExpansionChange",M),qe(e,"columnVisibilityModelChange",()=>{const O=Xn(e);O.quickFilterValues&&O.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()}),dm(()=>{e.current.unstable_applyFilters()}),Rt(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,o,t.filterModel])},R0e=e=>I({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),T0e=(e,t)=>{const n=vr(e,"useGridFocus"),r=v.useRef(null),o=v.useCallback((E,S)=>{E&&e.current.getRow(E.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(E.id,E.field),S)},[e]),i=v.useCallback((E,S)=>{const M=to(e);(M==null?void 0:M.id)===E&&(M==null?void 0:M.field)===S||(e.current.setState(O=>(n.debug(`Focusing on cell with id=${E} and field=${S}`),I({},O,{tabIndex:{cell:{id:E,field:S},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:E,field:S},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(E)&&(M&&o(M,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(E,S))))},[e,n,o]),a=v.useCallback((E,S={})=>{const M=to(e);o(M,S),e.current.setState(O=>(n.debug(`Focusing on column header with colIndex=${E}`),I({},O,{tabIndex:{columnHeader:{field:E},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:E},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,o]),l=v.useCallback((E,S={})=>{const M=to(e);o(M,S),e.current.setState(O=>(n.debug(`Focusing on column header filter with colIndex=${E}`),I({},O,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:E},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:E},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,o]),s=v.useCallback((E,S,M={})=>{const O=to(e);O&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(O.id,O.field),M),e.current.setState(R=>I({},R,{tabIndex:{columnGroupHeader:{field:E,depth:S},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:E,depth:S},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=v.useCallback(()=>pv(e),[e]),c=v.useCallback((E,S,M)=>{let O=e.current.getColumnIndex(S);const R=tr(e),_=Cv(e,{pagination:t.pagination,paginationMode:t.paginationMode}),D=Pd(e),T=[].concat(D.top||[],_.rows,D.bottom||[]);let F=T.findIndex(z=>z.id===E);M==="right"?O+=1:M==="left"?O-=1:F+=1,O>=R.length?(F+=1,F=0&&(O=R.length-1)),F=id(F,0,T.length-1);const j=T[F];if(!j)return;const $=e.current.unstable_getCellColSpanInfo(j.id,O);$&&$.spannedByColSpan&&(M==="left"||M==="below"?O=$.leftVisibleCellIndex:M==="right"&&(O=$.rightVisibleCellIndex)),O=id(O,0,R.length-1);const L=R[O];e.current.setCellFocus(j.id,L.field)},[e,t.pagination,t.paginationMode]),d=v.useCallback(({id:E,field:S})=>{e.current.setCellFocus(E,S)},[e]),f=v.useCallback((E,S)=>{S.key==="Enter"||S.key==="Tab"||S.key==="Shift"||bv(S.key)||e.current.setCellFocus(E.id,E.field)},[e]),m=v.useCallback(({field:E},S)=>{S.target===S.currentTarget&&e.current.setColumnHeaderFocus(E,S)},[e]),p=v.useCallback(({fields:E,depth:S},M)=>{if(M.target!==M.currentTarget)return;const O=pv(e);O!==null&&O.depth===S&&E.includes(O.field)||e.current.setColumnGroupHeaderFocus(E[0],S,M)},[e]),h=v.useCallback((E,S)=>{var M;(M=S.relatedTarget)!=null&&M.className.includes(ne.columnHeader)||(n.debug("Clearing focus"),e.current.setState(O=>I({},O,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),y=v.useCallback(E=>{r.current=E},[]),b=v.useCallback(E=>{const S=r.current;r.current=null;const M=to(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:E,cell:S}))return;if(!M){S&&e.current.setCellFocus(S.id,S.field);return}if((S==null?void 0:S.id)===M.id&&(S==null?void 0:S.field)===M.field)return;const R=e.current.getCellElement(M.id,M.field);R!=null&&R.contains(E.target)||(S?e.current.setCellFocus(S.id,S.field):(e.current.setState(_=>I({},_,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),o(M,E)))},[e,o]),g=v.useCallback(E=>{if(E.cellMode==="view")return;const S=to(e);((S==null?void 0:S.id)!==E.id||(S==null?void 0:S.field)!==E.field)&&e.current.setCellFocus(E.id,E.field)},[e]),x=v.useCallback(()=>{const E=to(e);E&&!e.current.getRow(E.id)&&e.current.setState(S=>I({},S,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},[e]),w=Jt(()=>{const E=to(e);if(!E)return;const S=Cv(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(S.rows.find(R=>R.id===E.id))return;const O=tr(e);e.current.setState(R=>I({},R,{tabIndex:{cell:{id:S.rows[0].id,field:O[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),P={setCellFocus:i,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:l},C={moveFocusToRelativeCell:c,setColumnGroupHeaderFocus:s,getColumnGroupHeaderFocus:u};it(e,P,"public"),it(e,C,"private"),v.useEffect(()=>{const E=un(e.current.rootElementRef.current);return E.addEventListener("mouseup",b),()=>{E.removeEventListener("mouseup",b)}},[e,b]),qe(e,"columnHeaderBlur",h),qe(e,"cellDoubleClick",d),qe(e,"cellMouseDown",y),qe(e,"cellKeyDown",f),qe(e,"cellModeChange",g),qe(e,"columnHeaderFocus",m),qe(e,"columnGroupHeaderFocus",p),qe(e,"rowsSet",x),qe(e,"paginationModelChange",w)};function _0e(e,t){const n=Pd(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const v1=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:r})=>{if(r==="rtl"){if(et)return e-1;return null},y1=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:r})=>{if(r==="rtl"){if(e>t)return e-1}else if(r==="ltr"&&e{const n=vr(e,"useGridKeyboardNavigation"),r=ku(e,t).rows,o=Rr(),i=v.useMemo(()=>_0e(e,r),[e,r]),a=t.signature!=="DataGrid"&&t.unstable_headerFilters,l=v.useCallback((b,g,x="left")=>{const w=gs(e),P=e.current.unstable_getCellColSpanInfo(g,b);P&&P.spannedByColSpan&&(x==="left"?b=P.leftVisibleCellIndex:x==="right"&&(b=P.rightVisibleCellIndex));const C=w.findIndex(S=>S.id===g);n.debug(`Navigating to cell row ${C}, col ${b}`),e.current.scrollToIndexes({colIndex:b,rowIndex:C});const E=e.current.getVisibleColumns()[b].field;e.current.setCellFocus(g,E)},[e,n]),s=v.useCallback((b,g)=>{n.debug(`Navigating to header col ${b}`),e.current.scrollToIndexes({colIndex:b});const x=e.current.getVisibleColumns()[b].field;e.current.setColumnHeaderFocus(x,g)},[e,n]),u=v.useCallback((b,g)=>{n.debug(`Navigating to header filter col ${b}`),e.current.scrollToIndexes({colIndex:b});const x=e.current.getVisibleColumns()[b].field;e.current.setColumnHeaderFilterFocus(x,g)},[e,n]),c=v.useCallback((b,g,x)=>{n.debug(`Navigating to header col ${b}`),e.current.scrollToIndexes({colIndex:b});const{field:w}=e.current.getVisibleColumns()[b];e.current.setColumnGroupHeaderFocus(w,g,x)},[e,n]),d=v.useCallback(b=>{var g;return(g=i[b])==null?void 0:g.id},[i]),f=v.useCallback((b,g)=>{const x=g.currentTarget.querySelector(`.${ne.columnHeaderTitleContainerContent}`);if(!!x&&x.contains(g.target)&&b.field!==Id.field||!e.current.getRootDimensions())return;const C=e.current.getViewportPageSize(),E=b.field?e.current.getColumnIndex(b.field):0,S=i.length>0?0:null,M=i.length-1,O=0,R=tr(e).length-1,_=um(e);let D=!0;switch(g.key){case"ArrowDown":{S!==null&&(a?u(E,g):l(E,d(S)));break}case"ArrowRight":{const T=y1({currentColIndex:E,firstColIndex:O,lastColIndex:R,direction:o.direction});T!==null&&s(T,g);break}case"ArrowLeft":{const T=v1({currentColIndex:E,firstColIndex:O,lastColIndex:R,direction:o.direction});T!==null&&s(T,g);break}case"ArrowUp":{_>0&&c(E,_-1,g);break}case"PageDown":{S!==null&&M!==null&&l(E,d(Math.min(S+C,M)));break}case"Home":{s(O,g);break}case"End":{s(R,g);break}case"Enter":{(g.ctrlKey||g.metaKey)&&e.current.toggleColumnMenu(b.field);break}case" ":break;default:D=!1}D&&g.preventDefault()},[e,i.length,a,u,l,d,o.direction,s,c]),m=v.useCallback((b,g)=>{if(!e.current.getRootDimensions())return;const w=Sfe(e)===b.field,P=Efe(e)===b.field;if(w||P||!bv(g.key))return;const C=e.current.getViewportPageSize(),E=b.field?e.current.getColumnIndex(b.field):0,S=0,M=i.length-1,O=0,R=tr(e).length-1;let _=!0;switch(g.key){case"ArrowDown":{const D=d(S);D!=null&&l(E,D);break}case"ArrowRight":{const D=y1({currentColIndex:E,firstColIndex:O,lastColIndex:R,direction:o.direction});D!==null&&u(D,g);break}case"ArrowLeft":{const D=v1({currentColIndex:E,firstColIndex:O,lastColIndex:R,direction:o.direction});D!==null?u(D,g):e.current.setColumnHeaderFilterFocus(b.field,g);break}case"ArrowUp":{s(E,g);break}case"PageDown":{M!==null&&l(E,d(Math.min(S+C,M)));break}case"Home":{u(O,g);break}case"End":{u(R,g);break}case" ":break;default:_=!1}_&&g.preventDefault()},[e,i.length,u,o.direction,s,l,d]),p=v.useCallback((b,g)=>{if(!e.current.getRootDimensions())return;const w=pv(e);if(w===null)return;const{field:P,depth:C}=w,{fields:E,depth:S,maxDepth:M}=b,O=e.current.getViewportPageSize(),R=e.current.getColumnIndex(P),_=P?e.current.getColumnIndex(P):0,D=0,T=i.length-1,F=0,j=tr(e).length-1;let $=!0;switch(g.key){case"ArrowDown":{S===M-1?s(R,g):c(R,C+1,g);break}case"ArrowUp":{S>0&&c(R,C-1,g);break}case"ArrowRight":{const L=E.length-E.indexOf(P)-1;R+L+1<=j&&c(R+L+1,C,g);break}case"ArrowLeft":{const L=E.indexOf(P);R-L-1>=F&&c(R-L-1,C,g);break}case"PageDown":{T!==null&&l(_,d(Math.min(D+O,T)));break}case"Home":{c(F,C,g);break}case"End":{c(j,C,g);break}case" ":break;default:$=!1}$&&g.preventDefault()},[e,i.length,s,c,l,d]),h=v.useCallback((b,g)=>{if(cm(g))return;const x=e.current.getCellParams(b.id,b.field);if(x.cellMode===Tt.Edit||!bv(g.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:g,cell:x}))return;const P=e.current.getRootDimensions();if(i.length===0||!P)return;const C=o.direction,E=e.current.getViewportPageSize(),S=b.field?e.current.getColumnIndex(b.field):0,M=i.findIndex(F=>F.id===b.id),O=0,R=i.length-1,_=0,D=tr(e).length-1;let T=!0;switch(g.key){case"ArrowDown":{MO?l(S,d(M-1)):a?u(S,g):s(S,g);break}case"ArrowRight":{const F=y1({currentColIndex:S,firstColIndex:_,lastColIndex:D,direction:C});F!==null&&l(F,d(M),C==="rtl"?"left":"right");break}case"ArrowLeft":{const F=v1({currentColIndex:S,firstColIndex:_,lastColIndex:D,direction:C});F!==null&&l(F,d(M),C==="rtl"?"right":"left");break}case"Tab":{g.shiftKey&&S>_?l(S-1,d(M),"left"):!g.shiftKey&&S=O?l(S,d(F)):s(S,g);break}case"Home":{g.ctrlKey||g.metaKey||g.shiftKey?l(_,d(O)):l(_,d(M));break}case"End":{g.ctrlKey||g.metaKey||g.shiftKey?l(D,d(R)):l(D,d(M));break}default:T=!1}T&&g.preventDefault()},[e,i,o.direction,l,d,a,u,s]),y=v.useCallback((b,{event:g})=>g.key===" "?!1:b,[]);jn(e,"canStartEditing",y),qe(e,"columnHeaderKeyDown",f),qe(e,"headerFilterKeyDown",m),qe(e,"columnGroupHeaderKeyDown",p),qe(e,"cellKeyDown",h)},A0e=(e,t)=>{var n,r;return I({},e,{preferencePanel:(n=(r=t.initialState)==null?void 0:r.preferencePanel)!=null?n:{open:!1}})},L0e=(e,t)=>{var n;const r=vr(e,"useGridPreferencesPanel"),o=v.useRef(),i=v.useRef(),a=v.useCallback(()=>{r.debug("Hiding Preferences Panel");const f=$p(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(m=>I({},m,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,r]),l=v.useCallback(()=>{i.current=setTimeout(()=>clearTimeout(o.current),0)},[]),s=v.useCallback(()=>{o.current=setTimeout(a,100)},[a]),u=v.useCallback((f,m,p)=>{r.debug("Opening Preferences Panel"),l(),e.current.setState(h=>I({},h,{preferencePanel:I({},h.preferencePanel,{open:!0,openedPanelValue:f,panelId:m,labelId:p})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[r,l,e]);it(e,{showPreferences:u,hidePreferences:s},"public");const c=v.useCallback((f,m)=>{var p;const h=$p(e.current.state);return!m.exportOnlyDirtyModels||((p=t.initialState)==null?void 0:p.preferencePanel)!=null||h.open?I({},f,{preferencePanel:h}):f},[e,(n=t.initialState)==null?void 0:n.preferencePanel]),d=v.useCallback((f,m)=>{const p=m.stateToRestore.preferencePanel;return p!=null&&e.current.setState(h=>I({},h,{preferencePanel:p})),f},[e]);jn(e,"exportState",c),jn(e,"restoreState",d),v.useEffect(()=>()=>{clearTimeout(o.current),clearTimeout(i.current)},[])},D0e=["id","field"],N0e=["id","field"],j0e=ua(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),z0e=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:l,cellModesModel:s,onCellModesModelChange:u}=t,c=T=>(...F)=>{t.editMode===ea.Cell&&T(...F)},d=v.useCallback((T,F)=>{const j=e.current.getCellParams(T,F);if(!e.current.isCellEditable(j))throw new Error(`MUI: The cell with id=${T} and field=${F} is not editable.`)},[e]),f=v.useCallback((T,F,j)=>{if(e.current.getCellMode(T,F)!==j)throw new Error(`MUI: The cell with id=${T} and field=${F} is not in ${j} mode.`)},[e]),m=v.useCallback((T,F)=>{if(!T.isEditable||T.cellMode===Tt.Edit)return;const j=I({},T,{reason:Ea.cellDoubleClick});e.current.publishEvent("cellEditStart",j,F)},[e]),p=v.useCallback((T,F)=>{if(T.cellMode===Tt.View||e.current.getCellMode(T.id,T.field)===Tt.View)return;const j=I({},T,{reason:li.cellFocusOut});e.current.publishEvent("cellEditStop",j,F)},[e]),h=v.useCallback((T,F)=>{if(T.cellMode===Tt.Edit){if(F.which===229)return;let j;if(F.key==="Escape"?j=li.escapeKeyDown:F.key==="Enter"?j=li.enterKeyDown:F.key==="Tab"&&(j=F.shiftKey?li.shiftTabKeyDown:li.tabKeyDown,F.preventDefault()),j){const $=I({},T,{reason:j});e.current.publishEvent("cellEditStop",$,F)}}else if(T.isEditable){let j;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:F,cellParams:T,editMode:"cell"}))return;if(Q4(F)?j=Ea.printableKeyDown:(F.ctrlKey||F.metaKey)&&F.key==="v"?j=Ea.pasteKeyDown:F.key==="Enter"?j=Ea.enterKeyDown:(F.key==="Delete"||F.key==="Backspace")&&(j=Ea.deleteKeyDown),j){const L=I({},T,{reason:j,key:F.key});e.current.publishEvent("cellEditStart",L,F)}}},[e]),y=v.useCallback(T=>{const{id:F,field:j,reason:$}=T,L={id:F,field:j};($===Ea.printableKeyDown||$===Ea.deleteKeyDown||$===Ea.pasteKeyDown)&&(L.deleteValue=!0),e.current.startCellEditMode(L)},[e]),b=v.useCallback(T=>{const{id:F,field:j,reason:$}=T;e.current.runPendingEditCellValueMutation(F,j);let L;$===li.enterKeyDown?L="below":$===li.tabKeyDown?L="right":$===li.shiftTabKeyDown&&(L="left");const z=$==="escapeKeyDown";e.current.stopCellEditMode({id:F,field:j,ignoreModifications:z,cellToFocusAfter:L})},[e]);qe(e,"cellDoubleClick",c(m)),qe(e,"cellFocusOut",c(p)),qe(e,"cellKeyDown",c(h)),qe(e,"cellEditStart",c(y)),qe(e,"cellEditStop",c(b)),Qt(e,"cellEditStart",t.onCellEditStart),Qt(e,"cellEditStop",t.onCellEditStop);const g=v.useCallback((T,F)=>{const j=Er(e.current.state);return j[T]&&j[T][F]?Tt.Edit:Tt.View},[e]),x=Jt(T=>{const F=T!==t.cellModesModel;u&&F&&u(T,{}),!(t.cellModesModel&&F)&&(r(T),o.current=T,e.current.publishEvent("cellModesModelChange",T))}),w=v.useCallback((T,F,j)=>{const $=I({},o.current);if(j!==null)$[T]=I({},$[T],{[F]:I({},j)});else{const L=$[T],z=ue(L,[F].map(wp));$[T]=z,Object.keys($[T]).length===0&&delete $[T]}x($)},[x]),P=v.useCallback((T,F,j)=>{e.current.setState($=>{const L=I({},$.editRows);return j!==null?L[T]=I({},L[T],{[F]:I({},j)}):(delete L[T][F],Object.keys(L[T]).length===0&&delete L[T]),I({},$,{editRows:L})}),e.current.forceUpdate()},[e]),C=v.useCallback(T=>{const{id:F,field:j}=T,$=ue(T,D0e);d(F,j),f(F,j,Tt.View),w(F,j,I({mode:Tt.Edit},$))},[d,f,w]),E=Jt(T=>{const{id:F,field:j,deleteValue:$,initialValue:L}=T;let z=e.current.getCellValue(F,j);($||L)&&(z=$?"":L),P(F,j,{value:z,error:!1,isProcessingProps:!1}),e.current.setCellFocus(F,j)}),S=v.useCallback(T=>{const{id:F,field:j}=T,$=ue(T,N0e);f(F,j,Tt.Edit),w(F,j,I({mode:Tt.View},$))},[f,w]),M=Jt(async T=>{const{id:F,field:j,ignoreModifications:$,cellToFocusAfter:L="none"}=T;f(F,j,Tt.Edit),e.current.runPendingEditCellValueMutation(F,j);const z=()=>{P(F,j,null),w(F,j,null),L!=="none"&&e.current.moveFocusToRelativeCell(F,j,L)};if($){z();return}const B=Er(e.current.state),{error:A,isProcessingProps:H}=B[F][j];if(A||H){i.current[F][j].mode=Tt.Edit,w(F,j,{mode:Tt.Edit});return}const q=e.current.getRowWithUpdatedValuesFromCellEditing(F,j);if(a){const U=G=>{i.current[F][j].mode=Tt.Edit,w(F,j,{mode:Tt.Edit}),l?l(G):j0e()};try{const G=e.current.getRow(F);Promise.resolve(a(q,G)).then(Y=>{e.current.updateRows([Y]),z()}).catch(U)}catch(G){U(G)}}else e.current.updateRows([q]),z()}),O=v.useCallback(async T=>{var F;const{id:j,field:$,value:L,debounceMs:z,unstable_skipValueParser:B}=T;d(j,$),f(j,$,Tt.Edit);const A=e.current.getColumn($),H=e.current.getRow(j);let q=L;A.valueParser&&!B&&(q=A.valueParser(L,e.current.getCellParams(j,$)));let U=Er(e.current.state),G=I({},U[j][$],{value:q,changeReason:z?"debouncedSetEditCellValue":"setEditCellValue"});if(A.preProcessEditCellProps){const Y=L!==U[j][$].value;G=I({},G,{isProcessingProps:!0}),P(j,$,G),G=await Promise.resolve(A.preProcessEditCellProps({id:j,row:H,props:G,hasChanged:Y}))}return e.current.getCellMode(j,$)===Tt.View?!1:(U=Er(e.current.state),G=I({},G,{isProcessingProps:!1}),G.value=A.preProcessEditCellProps?U[j][$].value:q,P(j,$,G),U=Er(e.current.state),!((F=U[j])!=null&&(F=F[$])!=null&&F.error))},[e,d,f,P]),R=v.useCallback((T,F)=>{const j=e.current.getColumn(F),$=Er(e.current.state),L=e.current.getRow(T);if(!$[T]||!$[T][F])return e.current.getRow(T);const{value:z}=$[T][F];return j.valueSetter?j.valueSetter({value:z,row:L}):I({},L,{[F]:z})},[e]),_={getCellMode:g,startCellEditMode:C,stopCellEditMode:S},D={setCellEditingEditCellValue:O,getRowWithUpdatedValuesFromCellEditing:R};it(e,_,"public"),it(e,D,"private"),v.useEffect(()=>{s&&x(s)},[s,x]),Rt(()=>{const T=fv(e),F=i.current;i.current=oj(n),Object.entries(n).forEach(([j,$])=>{Object.entries($).forEach(([L,z])=>{var B,A;const H=((B=F[j])==null||(B=B[L])==null?void 0:B.mode)||Tt.View,q=(A=T[j])!=null?A:j;z.mode===Tt.Edit&&H===Tt.View?E(I({id:q,field:L},z)):z.mode===Tt.View&&H===Tt.Edit&&M(I({id:q,field:L},z))})})},[e,n,E,M])},B0e=["id"],H0e=["id"],V0e=ua(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),U0e=(e,t)=>{const[n,r]=v.useState({}),o=v.useRef(n),i=v.useRef({}),a=v.useRef(null),l=v.useRef(null),{processRowUpdate:s,onProcessRowUpdateError:u,rowModesModel:c,onRowModesModelChange:d}=t,f=L=>(...z)=>{t.editMode===ea.Row&&L(...z)},m=v.useCallback((L,z)=>{const B=e.current.getCellParams(L,z);if(!e.current.isCellEditable(B))throw new Error(`MUI: The cell with id=${L} and field=${z} is not editable.`)},[e]),p=v.useCallback((L,z)=>{if(e.current.getRowMode(L)!==z)throw new Error(`MUI: The row with id=${L} is not in ${z} mode.`)},[e]),h=v.useCallback((L,z)=>{if(!L.isEditable||e.current.getRowMode(L.id)===Vt.Edit)return;const B=e.current.getRowParams(L.id),A=I({},B,{field:L.field,reason:bl.cellDoubleClick});e.current.publishEvent("rowEditStart",A,z)},[e]),y=v.useCallback(L=>{l.current=L},[]),b=v.useCallback((L,z)=>{L.isEditable&&e.current.getRowMode(L.id)!==Vt.View&&(l.current=null,a.current=setTimeout(()=>{var B;if(a.current=null,((B=l.current)==null?void 0:B.id)!==L.id){if(!e.current.getRow(L.id)||e.current.getRowMode(L.id)===Vt.View)return;const A=e.current.getRowParams(L.id),H=I({},A,{field:L.field,reason:Pa.rowFocusOut});e.current.publishEvent("rowEditStop",H,z)}}))},[e]);v.useEffect(()=>()=>{clearTimeout(a.current)},[]);const g=v.useCallback((L,z)=>{if(L.cellMode===Vt.Edit){if(z.which===229)return;let B;if(z.key==="Escape")B=Pa.escapeKeyDown;else if(z.key==="Enter")B=Pa.enterKeyDown;else if(z.key==="Tab"){const A=d0(e).filter(H=>e.current.getColumn(H).type===k0?!0:e.current.isCellEditable(e.current.getCellParams(L.id,H)));if(z.shiftKey?L.field===A[0]&&(B=Pa.shiftTabKeyDown):L.field===A[A.length-1]&&(B=Pa.tabKeyDown),z.preventDefault(),!B){const H=A.findIndex(U=>U===L.field),q=A[z.shiftKey?H-1:H+1];e.current.setCellFocus(L.id,q)}}if(B){const A=I({},e.current.getRowParams(L.id),{reason:B,field:L.field});e.current.publishEvent("rowEditStop",A,z)}}else if(L.isEditable){let B;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:z,cellParams:L,editMode:"row"}))return;if(Q4(z)||(z.ctrlKey||z.metaKey)&&z.key==="v"?B=bl.printableKeyDown:z.key==="Enter"?B=bl.enterKeyDown:(z.key==="Delete"||z.key==="Backspace")&&(B=bl.deleteKeyDown),B){const H=e.current.getRowParams(L.id),q=I({},H,{field:L.field,reason:B});e.current.publishEvent("rowEditStart",q,z)}}},[e]),x=v.useCallback(L=>{const{id:z,field:B,reason:A}=L,H={id:z,fieldToFocus:B};(A===bl.printableKeyDown||A===bl.deleteKeyDown)&&(H.deleteValue=!!B),e.current.startRowEditMode(H)},[e]),w=v.useCallback(L=>{const{id:z,reason:B,field:A}=L;e.current.runPendingEditCellValueMutation(z);let H;B===Pa.enterKeyDown?H="below":B===Pa.tabKeyDown?H="right":B===Pa.shiftTabKeyDown&&(H="left");const q=B==="escapeKeyDown";e.current.stopRowEditMode({id:z,ignoreModifications:q,field:A,cellToFocusAfter:H})},[e]);qe(e,"cellDoubleClick",f(h)),qe(e,"cellFocusIn",f(y)),qe(e,"cellFocusOut",f(b)),qe(e,"cellKeyDown",f(g)),qe(e,"rowEditStart",f(x)),qe(e,"rowEditStop",f(w)),Qt(e,"rowEditStart",t.onRowEditStart),Qt(e,"rowEditStop",t.onRowEditStop);const P=v.useCallback(L=>{if(t.editMode===ea.Cell)return Vt.View;const z=Er(e.current.state);return z[L]&&Object.keys(z[L]).length>0?Vt.Edit:Vt.View},[e,t.editMode]),C=Jt(L=>{const z=L!==t.rowModesModel;d&&z&&d(L,{}),!(t.rowModesModel&&z)&&(r(L),o.current=L,e.current.publishEvent("rowModesModelChange",L))}),E=v.useCallback((L,z)=>{const B=I({},o.current);z!==null?B[L]=I({},z):delete B[L],C(B)},[C]),S=v.useCallback((L,z)=>{e.current.setState(B=>{const A=I({},B.editRows);return z!==null?A[L]=z:delete A[L],I({},B,{editRows:A})}),e.current.forceUpdate()},[e]),M=v.useCallback((L,z,B)=>{e.current.setState(A=>{const H=I({},A.editRows);return B!==null?H[L]=I({},H[L],{[z]:I({},B)}):(delete H[L][z],Object.keys(H[L]).length===0&&delete H[L]),I({},A,{editRows:H})}),e.current.forceUpdate()},[e]),O=v.useCallback(L=>{const{id:z}=L,B=ue(L,B0e);p(z,Vt.View),E(z,I({mode:Vt.Edit},B))},[p,E]),R=Jt(L=>{const{id:z,fieldToFocus:B,deleteValue:A,initialValue:H}=L,U=Na(e).reduce((G,Y)=>{if(!e.current.getCellParams(z,Y).isEditable)return G;let le=e.current.getCellValue(z,Y);return B===Y&&(A||H)&&(le=A?"":H),G[Y]={value:le,error:!1,isProcessingProps:!1},G},{});S(z,U),B&&e.current.setCellFocus(z,B)}),_=v.useCallback(L=>{const{id:z}=L,B=ue(L,H0e);p(z,Vt.Edit),E(z,I({mode:Vt.View},B))},[p,E]),D=Jt(L=>{const{id:z,ignoreModifications:B,field:A,cellToFocusAfter:H="none"}=L;e.current.runPendingEditCellValueMutation(z);const q=()=>{H!=="none"&&A&&e.current.moveFocusToRelativeCell(z,A,H),S(z,null),E(z,null)};if(B){q();return}const U=Er(e.current.state),G=e.current.getRow(z);if(Object.values(U[z]).some(J=>J.isProcessingProps)){i.current[z].mode=Vt.Edit;return}if(Object.values(U[z]).some(J=>J.error)){i.current[z].mode=Vt.Edit,E(z,{mode:Vt.Edit});return}const le=e.current.getRowWithUpdatedValuesFromRowEditing(z);if(s){const J=oe=>{i.current[z].mode=Vt.Edit,E(z,{mode:Vt.Edit}),u?u(oe):V0e()};try{Promise.resolve(s(le,G)).then(oe=>{e.current.updateRows([oe]),q()}).catch(J)}catch(oe){J(oe)}}else e.current.updateRows([le]),q()}),T=v.useCallback(L=>{const{id:z,field:B,value:A,debounceMs:H,unstable_skipValueParser:q}=L;m(z,B);const U=e.current.getColumn(B),G=e.current.getRow(z);let Y=A;U.valueParser&&!q&&(Y=U.valueParser(A,e.current.getCellParams(z,B)));let re=Er(e.current.state),le=I({},re[z][B],{value:Y,changeReason:H?"debouncedSetEditCellValue":"setEditCellValue"});return U.preProcessEditCellProps||M(z,B,le),new Promise(J=>{const oe=[];if(U.preProcessEditCellProps){const ce=le.value!==re[z][B].value;le=I({},le,{isProcessingProps:!0}),M(z,B,le);const ve=re[z],me=ue(ve,[B].map(wp)),ke=Promise.resolve(U.preProcessEditCellProps({id:z,row:G,props:le,hasChanged:ce,otherFieldsProps:me})).then(be=>{if(e.current.getRowMode(z)===Vt.View){J(!1);return}re=Er(e.current.state),be=I({},be,{isProcessingProps:!1}),be.value=U.preProcessEditCellProps?re[z][B].value:Y,M(z,B,be)});oe.push(ke)}Object.entries(re[z]).forEach(([ce,ve])=>{if(ce===B)return;const me=e.current.getColumn(ce);if(!me.preProcessEditCellProps)return;ve=I({},ve,{isProcessingProps:!0}),M(z,ce,ve),re=Er(e.current.state);const ke=re[z],be=ue(ke,[ce].map(wp)),ie=Promise.resolve(me.preProcessEditCellProps({id:z,row:G,props:ve,hasChanged:!1,otherFieldsProps:be})).then(ye=>{if(e.current.getRowMode(z)===Vt.View){J(!1);return}ye=I({},ye,{isProcessingProps:!1}),M(z,ce,ye)});oe.push(ie)}),Promise.all(oe).then(()=>{e.current.getRowMode(z)===Vt.Edit?(re=Er(e.current.state),J(!re[z][B].error)):J(!1)})})},[e,m,M]),F=v.useCallback(L=>{const z=Er(e.current.state),B=e.current.getRow(L);if(!z[L])return e.current.getRow(L);let A=I({},B);return Object.entries(z[L]).forEach(([H,q])=>{const U=e.current.getColumn(H);U.valueSetter?A=U.valueSetter({value:q.value,row:A}):A[H]=q.value}),A},[e]),j={getRowMode:P,startRowEditMode:O,stopRowEditMode:_},$={setRowEditingEditCellValue:T,getRowWithUpdatedValuesFromRowEditing:F};it(e,j,"public"),it(e,$,"private"),v.useEffect(()=>{c&&C(c)},[c,C]),Rt(()=>{const L=fv(e),z=i.current;i.current=oj(n),Object.entries(n).forEach(([B,A])=>{var H,q;const U=((H=z[B])==null?void 0:H.mode)||Vt.View,G=(q=L[B])!=null?q:B;A.mode===Vt.Edit&&U===Vt.View?R(I({id:G},A)):A.mode===Vt.View&&U===Vt.Edit&&D(I({id:G},A))})},[e,n,R,D])},W0e=e=>I({},e,{editRows:{}}),G0e=(e,t)=>{z0e(e,t),U0e(e,t);const n=v.useRef({}),{isCellEditable:r}=t,o=v.useCallback(f=>Pp(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,m,p,h)=>{if(!p){h();return}if(n.current[f]||(n.current[f]={}),n.current[f][m]){const[g]=n.current[f][m];clearTimeout(g)}const y=()=>{const[g]=n.current[f][m];clearTimeout(g),h(),delete n.current[f][m]},b=setTimeout(()=>{h(),delete n.current[f][m]},p);n.current[f][m]=[b,y]};v.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([m,p])=>{Object.keys(p).forEach(h=>{const[y]=f[m][h];clearTimeout(y),delete f[m][h]})})}},[]);const a=v.useCallback((f,m)=>{if(n.current[f]){if(!m)Object.keys(n.current[f]).forEach(p=>{const[,h]=n.current[f][p];h()});else if(n.current[f][m]){const[,p]=n.current[f][m];p()}}},[]),l=v.useCallback(f=>{const{id:m,field:p,debounceMs:h}=f;return new Promise(y=>{i(m,p,h,async()=>{const b=t.editMode===ea.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(m,p)===Tt.Edit){const g=await b(f);y(g)}})})},[e,t.editMode]),s=v.useCallback((f,m)=>t.editMode===ea.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,m):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),u=v.useCallback((f,m)=>{var p,h;return(p=(h=Er(e.current.state)[f])==null?void 0:h[m])!=null?p:null},[e]),c={isCellEditable:o,setEditCellValue:l,getRowWithUpdatedValues:s,unstable_getEditCellMeta:u},d={runPendingEditCellValueMutation:a};it(e,c,"public"),it(e,d,"private")},q0e=(e,t,n)=>(n.current.caches.rows=ug({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),I({},e,{rows:z4({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),K0e=(e,t)=>{const n=vr(e,"useGridRows"),r=ku(e,t),o=v.useRef(Date.now()),i=wP(),a=v.useCallback(D=>{const T=Ta(e)[D];if(T)return T;const F=e.current.getRowNode(D);return F&&Pp(F)?{[Mc]:D}:null},[e]),l=t.getRowId,s=v.useCallback(D=>Mc in D?D[Mc]:l?l(D):D.id,[l]),u=v.useMemo(()=>r.rows.reduce((D,{id:T},F)=>(D[T]=F,D),{}),[r.rows]),c=v.useCallback(({cache:D,throttle:T})=>{const F=()=>{o.current=Date.now(),e.current.setState($=>I({},$,{rows:z4({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:di(e),previousTreeDepths:KM(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(i.clear(),e.current.caches.rows=D,!T){F();return}const j=t.throttleRowsMs-(Date.now()-o.current);if(j>0){i.start(j,F);return}F()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),d=v.useCallback(D=>{n.debug(`Updating all rows, new length ${D.length}`);const T=ug({rows:D,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),F=e.current.caches.rows;T.rowsBeforePartialUpdates=F.rowsBeforePartialUpdates,c({cache:T,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,c,e]),f=v.useCallback(D=>{if(t.signature===Ki.DataGrid&&D.length>1)throw new Error(["MUI: You can't 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(` `));const T=[];D.forEach(j=>{const $=hv(j,t.getRowId,"A row was provided without id when calling updateRows():"),L=e.current.getRowNode($);if((L==null?void 0:L.type)==="pinnedRow"){const z=e.current.caches.pinnedRows,B=z.idLookup[$];B&&(z.idLookup[$]=I({},B,j))}else T.push(j)});const F=yue({updates:T,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:F,throttle:!0})},[t.signature,t.getRowId,c,e]),m=v.useCallback(()=>{const D=yf(e),T=Ta(e);return new Map(D.map(F=>{var j;return[F,(j=T[F])!=null?j:{}]}))},[e]),p=v.useCallback(()=>p0(e),[e]),h=v.useCallback(()=>yf(e),[e]),y=v.useCallback(D=>u[D],[u]),b=v.useCallback((D,T)=>{const F=e.current.getRowNode(D);if(!F)throw new Error(`MUI: No row with id #${D} found`);if(F.type!=="group")throw new Error("MUI: Only group nodes can be expanded or collapsed");const j=I({},F,{childrenExpanded:T});e.current.setState($=>I({},$,{rows:I({},$.rows,{tree:I({},$.rows.tree,{[D]:j})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",j)},[e]),g=v.useCallback(D=>{var T;return(T=di(e)[D])!=null?T:null},[e]),x=v.useCallback(({skipAutoGeneratedRows:D=!0,groupId:T,applySorting:F,applyFiltering:j})=>{const $=di(e);let L;if(F){const z=$[T];if(!z)return[];const B=iP(e);L=[];const A=B.findIndex(H=>H===T)+1;for(let H=A;Hz.depth;H+=1){const q=B[H];(!D||!Pp($[q]))&&L.push(q)}}else L=uP($,T,D);if(j){const z=A4(e);L=L.filter(B=>z[B]!==!1)}return L},[e]),w=v.useCallback((D,T)=>{const F=e.current.getRowNode(D);if(!F)throw new Error(`MUI: No row with id #${D} found`);if(F.parent!==Pr)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if(F.type!=="leaf")throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState(j=>{const $=di(j,e.current.instanceId)[Pr],L=$.children,z=L.findIndex(A=>A===D);if(z===-1||z===T)return j;n.debug(`Moving row ${D} to index ${T}`);const B=[...L];return B.splice(T,0,B.splice(z,1)[0]),I({},j,{rows:I({},j.rows,{tree:I({},j.rows.tree,{[Pr]:I({},$,{children:B})})})})}),e.current.publishEvent("rowsSet")},[e,n]),P=v.useCallback((D,T)=>{if(t.signature===Ki.DataGrid&&T.length>1)throw new Error(["MUI: You can't 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(T.length===0)return;if(m0(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const j=I({},di(e)),$=I({},Ta(e)),L=I({},fv(e)),z=j[Pr],B=[...z.children],A=new Set;for(let q=0;qj[q].type==="leaf");e.current.caches.rows.dataRowIdToModelLookup=$,e.current.caches.rows.dataRowIdToIdLookup=L,e.current.setState(q=>I({},q,{rows:I({},q.rows,{dataRowIdToModelLookup:$,dataRowIdToIdLookup:L,dataRowIds:H,tree:j})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),C={getRow:a,getRowId:s,getRowModels:m,getRowsCount:p,getAllRowIds:h,setRows:d,updateRows:f,getRowNode:g,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:P},E={setRowIndex:w,setRowChildrenExpansion:b,getRowGroupChildren:x},S=v.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let D;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?D=I({},e.current.caches.rows,{updates:{type:"full",rows:yf(e)}}):D=ug({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:D,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),M=v.useCallback(D=>{D==="rowTreeCreation"&&S()},[S]),O=v.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==Jse(e)&&S()},[e,S]);qe(e,"activeStrategyProcessorChange",M),qe(e,"strategyAvailabilityChange",O);const R=v.useCallback(()=>{e.current.setState(D=>{const T=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:di(D,e.current.instanceId),treeDepths:KM(D,e.current.instanceId),dataRowIds:yf(D,e.current.instanceId),dataRowIdToModelLookup:Ta(D,e.current.instanceId),dataRowIdToIdLookup:fv(D,e.current.instanceId)});return I({},D,{rows:I({},D.rows,T,{totalTopLevelRowCount:j4({tree:T.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);IP(e,"hydrateRows",R),it(e,C,"public"),it(e,E,t.signature===Ki.DataGrid?"private":"public");const _=v.useRef(!0);v.useEffect(()=>{if(_.current){_.current=!1;return}const D=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,T=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,F=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(D){T||(e.current.setState(j=>I({},j,{rows:I({},j.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),F||(e.current.setState(j=>I({},j,{rows:I({},j.rows,{totalRowCount:Math.max(t.rowCount||0,j.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,j.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate());return}n.debug(`Updating all rows, new length ${t.rows.length}`),c({cache:ug({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})},[t.rows,t.rowCount,t.getRowId,t.loading,n,c,e])},Q0e=e=>{const t={[Pr]:I({},gue(),{children:e})};for(let n=0;n{const n=I({},e),r={};for(let a=0;a!r[a])),n[Pr]=I({},o,{children:i}),{groupingName:hu,tree:n,treeDepths:{0:i.length},dataRowIds:i}},X0e=e=>e.updates.type==="full"?Q0e(e.updates.rows):Y0e({previousTree:e.previousTree,actions:e.updates.actions}),Z0e=e=>{Ev(e,hu,"rowTreeCreation",X0e)},Yj=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],J0e=(e,t)=>{var n;return I({},e,{rowSelection:t.rowSelection?(n=Yj(t.rowSelectionModel))!=null?n:[]:[]})},ebe=(e,t)=>{const n=vr(e,"useGridSelection"),r=T=>(...F)=>{t.rowSelection&&T(...F)},o=v.useMemo(()=>Yj(t.rowSelectionModel,Po(e.current.state)),[e,t.rowSelectionModel]),i=v.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:o,propOnChange:t.onRowSelectionModelChange,stateSelector:Po,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableMultipleRowSelection:l,disableRowSelectionOnClick:s,isRowSelectable:u}=t,c=!l||a,d=ku(e,t),f=v.useCallback(T=>{var F;let j=T;const $=(F=i.current)!=null?F:T,L=e.current.isRowSelected(T);if(L){const z=Wf(e),B=z.findIndex(H=>H===$),A=z.findIndex(H=>H===j);if(B===A)return;B>A?j=z[A+1]:j=z[A-1]}i.current=T,e.current.selectRowRange({startId:$,endId:j},!L)},[e]),m=v.useCallback(T=>{if(t.signature===Ki.DataGrid&&!t.checkboxSelection&&Array.isArray(T)&&T.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` `));Po(e.current.state)!==T&&(n.debug("Setting selection model"),e.current.setState(j=>I({},j,{rowSelection:t.rowSelection?T:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,t.checkboxSelection]),p=v.useCallback(T=>Po(e.current.state).includes(T),[e]),h=v.useCallback(T=>{if(u&&!u(e.current.getRowParams(T)))return!1;const F=e.current.getRowNode(T);return!((F==null?void 0:F.type)==="footer"||(F==null?void 0:F.type)==="pinnedRow")},[e,u]),y=v.useCallback(()=>hfe(e),[e]),b=v.useCallback((T,F=!0,j=!1)=>{if(e.current.isRowSelectable(T))if(i.current=T,j)n.debug(`Setting selection for row ${T}`),e.current.setRowSelectionModel(F?[T]:[]);else{n.debug(`Toggling selection for row ${T}`);const L=Po(e.current.state).filter(B=>B!==T);F&&L.push(T),(L.length<2||c)&&e.current.setRowSelectionModel(L)}},[e,n,c]),g=v.useCallback((T,F=!0,j=!1)=>{n.debug("Setting selection for several rows");const $=T.filter(B=>e.current.isRowSelectable(B));let L;if(j)L=F?$:[];else{const B=I({},wv(e));$.forEach(A=>{F?B[A]=A:delete B[A]}),L=Object.values(B)}(L.length<2||c)&&e.current.setRowSelectionModel(L)},[e,n,c]),x=v.useCallback(({startId:T,endId:F},j=!0,$=!1)=>{if(!e.current.getRow(T)||!e.current.getRow(F))return;n.debug(`Expanding selection from row ${T} to row ${F}`);const L=Wf(e),z=L.indexOf(T),B=L.indexOf(F),[A,H]=z>B?[B,z]:[z,B],q=L.slice(A,H+1);e.current.selectRows(q,j,$)},[e,n]),w={selectRow:b,setRowSelectionModel:m,getSelectedRows:y,isRowSelected:p,isRowSelectable:h},P={selectRows:g,selectRowRange:x};it(e,w,"public"),it(e,P,t.signature===Ki.DataGrid?"private":"public");const C=v.useCallback(()=>{if(t.keepNonExistentRowsSelected)return;const T=Po(e.current.state),F=Ta(e),j=I({},wv(e));let $=!1;T.forEach(L=>{F[L]||(delete j[L],$=!0)}),$&&e.current.setRowSelectionModel(Object.values(j))},[e,t.keepNonExistentRowsSelected]),E=v.useCallback((T,F)=>{const j=F.metaKey||F.ctrlKey,$=!a&&!j&&!Cce(F),L=!c||$,z=e.current.isRowSelected(T);L?e.current.selectRow(T,$?!0:!z,!0):e.current.selectRow(T,!z,!1)},[e,c,a]),S=v.useCallback((T,F)=>{var j;if(s)return;const $=(j=F.target.closest(`.${ne.cell}`))==null?void 0:j.getAttribute("data-field");if($===Id.field||$===kP)return;if($){const z=e.current.getColumn($);if((z==null?void 0:z.type)===k0)return}e.current.getRowNode(T.id).type!=="pinnedRow"&&(F.shiftKey&&(c||a)?f(T.id):E(T.id,F))},[s,c,a,e,f,E]),M=v.useCallback((T,F)=>{if(c&&F.shiftKey){var j;(j=window.getSelection())==null||j.removeAllRanges()}},[c]),O=v.useCallback((T,F)=>{F.nativeEvent.shiftKey?f(T.id):e.current.selectRow(T.id,T.value)},[e,f]),R=v.useCallback(T=>{const j=t.checkboxSelectionVisibleOnly&&t.pagination?uj(e):Wf(e);e.current.selectRows(j,T.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination]),_=v.useCallback((T,F)=>{if(e.current.getCellMode(T.id,T.field)!==Tt.Edit&&!cm(F)){if(bv(F.key)&&F.shiftKey){const j=to(e);if(j&&j.id!==T.id){F.preventDefault();const $=e.current.isRowSelected(j.id);if(!c){e.current.selectRow(j.id,!$,!0);return}const L=e.current.getRowIndexRelativeToVisibleRows(j.id),z=e.current.getRowIndexRelativeToVisibleRows(T.id);let B,A;L>z?$?(B=z,A=L-1):(B=z,A=L):$?(B=L+1,A=z):(B=L,A=z);const H=d.rows.slice(B,A+1).map(q=>q.id);e.current.selectRows(H,!$);return}}if(F.key===" "&&F.shiftKey){F.preventDefault(),E(T.id,F);return}F.key==="a"&&(F.ctrlKey||F.metaKey)&&(F.preventDefault(),g(e.current.getAllRowIds(),!0))}},[e,E,g,d.rows,c]);qe(e,"sortedRowsSet",r(C)),qe(e,"rowClick",r(S)),qe(e,"rowSelectionCheckboxChange",r(O)),qe(e,"headerSelectionCheckboxChange",R),qe(e,"cellMouseDown",r(M)),qe(e,"cellKeyDown",r(_)),v.useEffect(()=>{o!==void 0&&e.current.setRowSelectionModel(o)},[e,o,t.rowSelection]),v.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const D=o!=null;v.useEffect(()=>{if(D||!t.rowSelection)return;const T=Po(e.current.state);if(h){const F=T.filter(j=>h(j));F.length{if(!t.rowSelection||D)return;const T=Po(e.current.state);!c&&T.length>1&&e.current.setRowSelectionModel([])},[e,c,a,D,t.rowSelection])},tbe={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",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",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",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",filterOperatorEquals:"equals",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",headerFilterOperatorEquals:"Equals",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",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",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",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},nbe=e=>{const{classes:t}=e;return v.useMemo(()=>Ie({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},ft,t),[t])},rbe=(e,t)=>{const n={classes:t.classes},r=nbe(n),o=v.useCallback(i=>{const a=I({},Id,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),l=t.checkboxSelection,s=i.lookup[xl]!=null;return l&&!s?(i.lookup[xl]=a,i.orderedFields=[xl,...i.orderedFields]):!l&&s?(delete i.lookup[xl],i.orderedFields=i.orderedFields.filter(u=>u!==xl)):l&&s&&(i.lookup[xl]=I({},a,i.lookup[xl])),i},[e,r,t.checkboxSelection]);jn(e,"hydrateColumns",o)},obe=(e,t)=>{var n,r,o;const i=(n=(r=t.sortModel)!=null?r:(o=t.initialState)==null||(o=o.sorting)==null?void 0:o.sortModel)!=null?n:[];return I({},e,{sorting:{sortModel:cj(i,t.disableMultipleColumnsSorting),sortedRows:[]}})},ibe=(e,t)=>{var n;const r=vr(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Eo,changeEvent:"sortModelChange"});const o=v.useCallback((C,E)=>{const S=Eo(e),M=S.findIndex(R=>R.field===C);let O=[...S];return M>-1?E?O.splice(M,1,E):O.splice(M,1):O=[...S,E],O},[e]),i=v.useCallback((C,E)=>{var S;const O=Eo(e).find(_=>_.field===C.field);if(O){var R;const _=E===void 0?s2((R=C.sortingOrder)!=null?R:t.sortingOrder,O.sort):E;return _==null?void 0:I({},O,{sort:_})}return{field:C.field,sort:E===void 0?s2((S=C.sortingOrder)!=null?S:t.sortingOrder):E}},[e,t.sortingOrder]),a=v.useCallback((C,E)=>E==null||E.sortable===!1?C:(E.sortingOrder||t.sortingOrder).some(M=>!!M)?[...C,"columnMenuSortItem"]:C,[t.sortingOrder]),l=v.useCallback(()=>{e.current.setState(C=>{if(t.sortingMode==="server")return r.debug("Skipping sorting rows as sortingMode = server"),I({},C,{sorting:I({},C.sorting,{sortedRows:uP(di(e),Pr,!1)})});const E=Eo(C,e.current.instanceId),S=xfe(E,e),M=e.current.applyStrategyProcessor("sorting",{sortRowList:S});return I({},C,{sorting:I({},C.sorting,{sortedRows:M})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,r,t.sortingMode]),s=v.useCallback(C=>{Eo(e)!==C&&(r.debug("Setting sort model"),e.current.setState(l2(C,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,r,t.disableMultipleColumnsSorting]),u=v.useCallback((C,E,S)=>{if(!C.sortable)return;const M=i(C,E);let O;!S||t.disableMultipleColumnsSorting?O=M?[M]:[]:O=o(C.field,M),e.current.setSortModel(O)},[e,o,i,t.disableMultipleColumnsSorting]),c=v.useCallback(()=>Eo(e),[e]),d=v.useCallback(()=>aP(e).map(E=>E.model),[e]),f=v.useCallback(()=>iP(e),[e]),m=v.useCallback(C=>e.current.getSortedRowIds()[C],[e]);it(e,{getSortModel:c,getSortedRows:d,getSortedRowIds:f,getRowIdFromRowIndex:m,setSortModel:s,sortColumn:u,applySorting:l},"public");const h=v.useCallback((C,E)=>{var S;const M=Eo(e);return!E.exportOnlyDirtyModels||t.sortModel!=null||((S=t.initialState)==null||(S=S.sorting)==null?void 0:S.sortModel)!=null||M.length>0?I({},C,{sorting:{sortModel:M}}):C},[e,t.sortModel,(n=t.initialState)==null||(n=n.sorting)==null?void 0:n.sortModel]),y=v.useCallback((C,E)=>{var S;const M=(S=E.stateToRestore.sorting)==null?void 0:S.sortModel;return M==null?C:(e.current.setState(l2(M,t.disableMultipleColumnsSorting)),I({},C,{callbacks:[...C.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),b=v.useCallback(C=>{const E=di(e),S=E[Pr],M=C.sortRowList?C.sortRowList(S.children.map(O=>E[O])):[...S.children];return S.footerId!=null&&M.push(S.footerId),M},[e]);jn(e,"exportState",h),jn(e,"restoreState",y),Ev(e,hu,"sorting",b);const g=v.useCallback(({colDef:C},E)=>{const S=E.shiftKey||E.metaKey||E.ctrlKey;u(C,void 0,S)},[u]),x=v.useCallback(({colDef:C},E)=>{yce(E.key)&&!E.ctrlKey&&!E.metaKey&&u(C,void 0,E.shiftKey)},[u]),w=v.useCallback(()=>{const C=Eo(e),E=Ed(e);if(C.length>0){const S=C.filter(M=>E[M.field]);S.length{C==="sorting"&&e.current.applySorting()},[e]);jn(e,"columnMenu",a),qe(e,"columnHeaderClick",g),qe(e,"columnHeaderKeyDown",x),qe(e,"rowsSet",e.current.applySorting),qe(e,"columnsChange",w),qe(e,"activeStrategyProcessorChange",P),dm(()=>{e.current.applySorting()}),Rt(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function Q2(e){const{clientHeight:t,scrollTop:n,offsetHeight:r,offsetTop:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=Rr(),r=vr(e,"useGridScroll"),o=e.current.columnHeadersElementRef,i=e.current.virtualScrollerRef,a=Ne(e,gs),l=v.useCallback(d=>{const f=p0(e),m=tr(e);if(!(d.rowIndex==null)&&f===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let h={};if(d.colIndex!=null){const x=od(e);let w;if(typeof d.rowIndex<"u"){var y;const P=(y=a[d.rowIndex])==null?void 0:y.id,C=e.current.unstable_getCellColSpanInfo(P,d.colIndex);C&&!C.spannedByColSpan&&(w=C.cellProps.width)}typeof w>"u"&&(w=m[d.colIndex].computedWidth),h.left=Q2({clientHeight:i.current.clientWidth,scrollTop:Math.abs(i.current.scrollLeft),offsetHeight:w,offsetTop:x[d.colIndex]})}if(d.rowIndex!=null){var b,g;const x=Ip(e.current.state),w=dfe(e),P=ffe(e),C=t.pagination?d.rowIndex-w*P:d.rowIndex,E=x.positions[C+1]?x.positions[C+1]-x.positions[C]:x.currentPageTotalHeight-x.positions[C],S=((b=i.current.querySelector(`.${ne["pinnedRows--top"]}`))==null?void 0:b.clientHeight)||0,M=((g=i.current.querySelector(`.${ne["pinnedRows--bottom"]}`))==null?void 0:g.clientHeight)||0;h.top=Q2({clientHeight:i.current.clientHeight-S-M,scrollTop:i.current.scrollTop,offsetHeight:E,offsetTop:x.positions[C]})}return h=e.current.unstable_applyPipeProcessors("scrollToIndexes",h,d),typeof h.left!==void 0||typeof h.top!==void 0?(e.current.scroll(h),!0):!1},[r,e,i,t.pagination,a]),s=v.useCallback(d=>{if(i.current&&d.left!=null&&o.current){const f=n.direction==="rtl"?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!=null&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n.direction,o,r]),u=v.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);it(e,{scroll:s,scrollToIndexes:l,getScrollPosition:u},"public")};function lbe(e,t){Qt(e,"columnHeaderClick",t.onColumnHeaderClick),Qt(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Qt(e,"columnHeaderOver",t.onColumnHeaderOver),Qt(e,"columnHeaderOut",t.onColumnHeaderOut),Qt(e,"columnHeaderEnter",t.onColumnHeaderEnter),Qt(e,"columnHeaderLeave",t.onColumnHeaderLeave),Qt(e,"cellClick",t.onCellClick),Qt(e,"cellDoubleClick",t.onCellDoubleClick),Qt(e,"cellKeyDown",t.onCellKeyDown),Qt(e,"preferencePanelClose",t.onPreferencePanelClose),Qt(e,"preferencePanelOpen",t.onPreferencePanelOpen),Qt(e,"menuOpen",t.onMenuOpen),Qt(e,"menuClose",t.onMenuClose),Qt(e,"rowDoubleClick",t.onRowDoubleClick),Qt(e,"rowClick",t.onRowClick),Qt(e,"stateChange",t.onStateChange)}const sbe=({content:e,container:t,scrollBarSize:n})=>{const r=e.width>t.width,o=e.height>t.height;let i=!1,a=!1;return(r||o)&&(i=r,a=e.height+(i?n:0)>t.height,a&&(i=e.width+n>t.width)),{hasScrollX:i,hasScrollY:a}};function ube(e,t){const n=vr(e,"useResizeContainer"),r=v.useRef(!1),o=v.useRef(null),i=v.useRef(null),a=Ne(e,Ip),l=Ne(e,kd),s=Math.floor(t.rowHeight*l),u=OP(e,t.columnHeaderHeight),c=v.useCallback(()=>{var E;const S=(E=e.current.rootElementRef)==null?void 0:E.current,M=oP(e),O=B4(e);if(!o.current)return;let R;if(t.scrollbarSize!=null)R=t.scrollbarSize;else if(!M||!S)R=0;else{const z=un(S).createElement("div");z.style.width="99px",z.style.height="99px",z.style.position="absolute",z.style.overflow="scroll",z.className="scrollDiv",S.appendChild(z),R=z.offsetWidth-z.clientWidth,S.removeChild(z)}let _,D,T;if(t.autoHeight)T=!1,D=Math.round(M)>Math.round(o.current.width),_={width:o.current.width,height:a.currentPageTotalHeight+(D?R:0)};else{_={width:o.current.width,height:Math.max(o.current.height-u,0)};const L=sbe({content:{width:Math.round(M),height:a.currentPageTotalHeight},container:{width:Math.round(_.width),height:_.height-O.top-O.bottom},scrollBarSize:R});T=L.hasScrollY,D=L.hasScrollX}const F={width:_.width-(T?R:0),height:_.height-(D?R:0)},j={viewportOuterSize:_,viewportInnerSize:F,hasScrollX:D,hasScrollY:T,scrollBarSize:R},$=i.current;i.current=j,(j.viewportInnerSize.width!==($==null?void 0:$.viewportInnerSize.width)||j.viewportInnerSize.height!==($==null?void 0:$.viewportInnerSize.height))&&e.current.publishEvent("viewportInnerSizeChange",j.viewportInnerSize)},[e,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u]),[d,f]=v.useState(),m=v.useMemo(()=>bd(f,60),[]),p=v.useRef();Rt(()=>{d&&(c(),e.current.publishEvent("debouncedResize",o.current))},[e,d,c]);const h=v.useCallback(()=>{e.current.computeSizeAndPublishResizeEvent()},[e]),y=v.useCallback(()=>i.current,[]),b=v.useCallback(()=>{const E=e.current.getRootDimensions();if(!E)return 0;const S=Cv(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const O=e.current.getRenderContext(),R=O.lastRowIndex-O.firstRowIndex;return Math.min(R-1,S.rows.length)}const M=Math.floor(E.viewportInnerSize.height/s);return Math.min(M,S.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,s]),g=v.useCallback(()=>{var E,S,M;const O=(E=e.current.mainElementRef)==null?void 0:E.current;if(!O)return;const _=xi(O).getComputedStyle(O),D=parseFloat(_.height)||0,T=parseFloat(_.width)||0,F=D!==((S=p.current)==null?void 0:S.height),j=T!==((M=p.current)==null?void 0:M.width);if(!p.current||F||j){const $={width:T,height:D};e.current.publishEvent("resize",$),p.current=$}},[e]),x={resize:h,getRootDimensions:y},w={getViewportPageSize:b,updateGridDimensionsRef:c,computeSizeAndPublishResizeEvent:g};it(e,x,"public"),it(e,w,"private");const P=v.useRef(!0),C=v.useCallback(E=>{o.current=E;const S=/jsdom/.test(window.navigator.userAgent);if(E.height===0&&!r.current&&!t.autoHeight&&!S&&(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),E.width===0&&!r.current&&!S&&(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),P.current){f(E),P.current=!1;return}m(E)},[t.autoHeight,m,n]);Rt(()=>c(),[c]),Qt(e,"sortedRowsSet",c),Qt(e,"paginationModelChange",c),Qt(e,"columnsChange",c),qe(e,"resize",C),Qt(e,"debouncedResize",t.onResize)}const cbe=["style"],dbe=["style"];function Rc(e,t,n=0,r=t.length){if(t.length<=0)return-1;if(n>=r)return n;const o=n+Math.floor((r-n)/2),i=t[o];return e<=i?Rc(e,t,n,o):Rc(e,t,o+1,r)}function fbe(e,t,n){let r=1;for(;n[id(e-n,r,o),id(t+n,r,o)],Xj=(e,t)=>e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,pbe={maxSize:3},mbe=e=>{var t,n;const r=hs(),o=We(),i=Ne(r,tr),a=Ne(r,$fe),l=Ne(r,hj),{ref:s,onRenderZonePositioning:u,renderZoneMinColumnIndex:c=0,renderZoneMaxColumnIndex:d=i.length,getRowProps:f}=e,m=Rr(),p=Ne(r,od),h=Ne(r,oP),y=Ne(r,to),b=Ne(r,mv),g=Ne(r,Ip),x=Ne(r,wv),w=ku(r,o),P=v.useRef(null),C=v.useRef(null),E=vt(s,C),[S,M]=v.useState(null),O=v.useRef(S),R=v.useRef({top:0,left:0}),[_,D]=v.useState({width:null,height:null}),T=v.useRef(h),[F,j]=v.useState(null),$=v.useRef(Object.create(null)),L=v.useRef(),z=v.useRef(),B=v.useRef(c0((ie,ye,V,Q,Z,ae)=>{let te;const K=ie.slice(ye,V);return ae>-1&&(ye>ae&&ae>=Q||Vy!==null?i.findIndex(ie=>ie.field===y.field):-1,[y,i]),H=v.useCallback(ie=>{var ye,V;const Q=r.current.getLastMeasuredRowIndex();let Z=Q===1/0;(ye=w.range)!=null&&ye.lastRowIndex&&!Z&&(Z=Q>=w.range.lastRowIndex);const ae=id(Q-(((V=w.range)==null?void 0:V.firstRowIndex)||0),0,g.positions.length);return Z||g.positions[ae]>=ie?Rc(ie,g.positions):fbe(ie,g.positions,ae)},[r,(t=w.range)==null?void 0:t.firstRowIndex,(n=w.range)==null?void 0:n.lastRowIndex,g.positions]),q=v.useCallback(()=>{if(!a)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:ie,left:ye}=R.current,V=Math.min(H(ie),g.positions.length-1),Q=o.autoHeight?V+w.rows.length:H(ie+_.height);let Z=0,ae=p.length;if(l){let te=!1;const[K,ee]=$l({firstIndex:V,lastIndex:Q,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});for(let se=K;se{a?(C.current.scrollLeft=0,C.current.scrollTop=0):P.current.style.transform="translate3d(0px, 0px, 0px)"},[a]),Rt(()=>{D({width:C.current.clientWidth,height:C.current.clientHeight})},[g.currentPageTotalHeight]);const U=v.useCallback(()=>{C.current&&D({width:C.current.clientWidth,height:C.current.clientHeight})},[]);qe(r,"debouncedResize",U);const G=v.useCallback(ie=>{const[ye,V]=$l({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer}),[Q]=$l({firstIndex:ie.firstColumnIndex,lastIndex:ie.lastColumnIndex,minFirstIndex:c,maxLastIndex:d,buffer:o.columnBuffer}),Z=Jw({firstColumnToRender:Q,apiRef:r,firstRowToRender:ye,lastRowToRender:V,visibleRows:w.rows}),ae=m.direction==="ltr"?1:-1,te=Ip(r.current.state).positions[ye],K=ae*od(r)[Z];P.current.style.transform=`translate3d(${K}px, ${te}px, 0px)`,typeof u=="function"&&u({top:te,left:K})},[r,w.rows,u,c,d,o.columnBuffer,o.rowBuffer,m.direction]),Y=v.useCallback(()=>O.current,[]),re=v.useCallback(ie=>{if(O.current&&Xj(ie,O.current)){G(ie);return}M(ie),G(ie);const[ye,V]=$l({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:ye,lastRowToRender:V}),O.current=ie},[r,M,O,w.rows.length,o.rowBuffer,G]);Rt(()=>{if(_.width==null)return;const ie=q();re(ie);const{top:ye,left:V}=R.current,Q={top:ye,left:V,renderContext:ie};r.current.publishEvent("scrollPositionChange",Q)},[r,q,_.width,re]);const le=Jt(ie=>{const{scrollTop:ye,scrollLeft:V}=ie.currentTarget;if(R.current.top=ye,R.current.left=V,!O.current||ye<0||m.direction==="ltr"&&V<0||m.direction==="rtl"&&V>0)return;const Q=a?q():O.current,Z=Math.abs(Q.firstRowIndex-O.current.firstRowIndex),ae=Math.abs(Q.lastRowIndex-O.current.lastRowIndex),te=Math.abs(Q.firstColumnIndex-O.current.firstColumnIndex),K=Math.abs(Q.lastColumnIndex-O.current.lastColumnIndex),ee=Z>=o.rowThreshold||ae>=o.rowThreshold||te>=o.columnThreshold||K>=o.columnThreshold||T.current!==h;r.current.publishEvent("scrollPositionChange",{top:ye,left:V,renderContext:ee?Q:O.current},ie),ee&&(ss.flushSync(()=>{re(Q)}),T.current=h)}),J=Jt(ie=>{r.current.publishEvent("virtualScrollerWheel",{},ie)}),oe=Jt(ie=>{r.current.publishEvent("virtualScrollerTouchMove",{},ie)}),ce=v.useMemo(()=>y!==null?w.rows.findIndex(ie=>ie.id===y.id):-1,[y,w.rows]);qe(r,"rowMouseOver",(ie,ye)=>{var V;ye.currentTarget.contains(ye.relatedTarget)||j((V=ie.id)!=null?V:null)}),qe(r,"rowMouseOut",(ie,ye)=>{ye.currentTarget.contains(ye.relatedTarget)||j(null)});const ve=(ie={renderContext:S})=>{var ye;const{onRowRender:V,renderContext:Q,minFirstColumn:Z=c,maxLastColumn:ae=d,availableSpace:te=_.width,rowIndexOffset:K=0,position:ee="center"}=ie;if(!Q||te==null)return null;const se=a?o.rowBuffer:0,Ce=a?o.columnBuffer:0,[_e,$e]=$l({firstIndex:Q.firstRowIndex,lastIndex:Q.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:se}),X=[];if(ie.rows)ie.rows.forEach(ut=>{X.push(ut),r.current.calculateColSpan({rowId:ut.id,minFirstColumn:Z,maxLastColumn:ae,columns:i})});else{if(!w.range)return null;for(let ut=_e;ut<$e;ut+=1){const Et=w.rows[ut];X.push(Et),r.current.calculateColSpan({rowId:Et.id,minFirstColumn:Z,maxLastColumn:ae,columns:i})}}let Ee=!1;if(ce>-1){const ut=w.rows[ce];(_e>ce||$e_e?X.push(ut):X.unshift(ut),r.current.calculateColSpan({rowId:ut.id,minFirstColumn:Z,maxLastColumn:ae,columns:i}))}const[De,Te]=$l({firstIndex:Q.firstColumnIndex,lastIndex:Q.lastColumnIndex,minFirstIndex:Z,maxLastIndex:ae,buffer:Ce}),Pe=Jw({firstColumnToRender:De,apiRef:r,firstRowToRender:_e,lastRowToRender:$e,visibleRows:w.rows});let Re=!1;(Pe>A||Te=_.width,ke=v.useMemo(()=>{const ie=Math.max(g.currentPageTotalHeight,1);let ye=!1;C!=null&&C.current&&ie<=(C==null?void 0:C.current.clientHeight)&&(ye=!0);const V={width:me?h:"auto",height:ie,minHeight:ye?"100%":"auto"};return o.autoHeight&&w.rows.length===0&&(V.height=H4(r,o.rowHeight)),V},[r,C,h,g.currentPageTotalHeight,me,o.autoHeight,o.rowHeight,w.rows.length]);v.useEffect(()=>{r.current.publishEvent("virtualScrollerContentSizeChange")},[r,ke]);const be=v.useMemo(()=>{const ie={};return me||(ie.overflowX="hidden"),o.autoHeight&&(ie.overflowY="hidden"),ie},[me,o.autoHeight]);return r.current.register("private",{getRenderContext:Y}),{renderContext:S,updateRenderZonePosition:G,getRows:ve,getRootProps:(ie={})=>I({ref:E,onScroll:le,onWheel:J,onTouchMove:oe},ie,{style:ie.style?I({},ie.style,be):be,role:"presentation"}),getContentProps:({style:ie}={})=>({style:ie?I({},ie,ke):ke,role:"presentation"}),getRenderZoneProps:()=>({ref:P,role:"rowgroup"})}},hbe=e=>{const{classes:t,headerAlign:n,isDragging:r,showColumnBorder:o,groupId:i}=e;return Ie({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",i===null?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},ft,t)};function gbe(e){var t;const{groupId:n,width:r,depth:o,maxDepth:i,fields:a,height:l,colIndex:s,hasFocus:u,tabIndex:c,isLastColumn:d}=e,f=We(),m=v.useRef(null),p=dt(),h=Ne(p,T4),y=n?h[n]:{},{headerName:b=n??"",description:g="",headerAlign:x=void 0}=y;let w;const P=n&&((t=h[n])==null?void 0:t.renderHeaderGroup),C=v.useMemo(()=>({groupId:n,headerName:b,description:g,depth:o,maxDepth:i,fields:a,colIndex:s,isLastColumn:d}),[n,b,g,o,i,a,s,d]);n&&P&&(w=P(C));const E=f.showColumnVerticalBorder,S=I({},e,{classes:f.classes,showColumnBorder:E,headerAlign:x,depth:o,isDragging:!1}),M=b??n,O=_t(),R=n===null?`empty-group-cell-${O}`:n,_=hbe(S);v.useLayoutEffect(()=>{if(u){const $=m.current.querySelector('[tabindex="0"]')||m.current;$==null||$.focus()}},[p,u]);const D=v.useCallback(j=>$=>{cm($)||p.current.publishEvent(j,C,$)},[p,C]),T=v.useMemo(()=>({onKeyDown:D("columnGroupHeaderKeyDown"),onFocus:D("columnGroupHeaderFocus"),onBlur:D("columnGroupHeaderBlur")}),[D]),F=typeof y.headerClassName=="function"?y.headerClassName(C):y.headerClassName;return N.jsx(nj,I({ref:m,classes:_,columnMenuOpen:!1,colIndex:s,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:w,headerClassName:F,description:g,elementId:R,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:M,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`},T))}const Y2=de("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})(()=>({display:"flex"}));function vbe(e){return!!e.target}const ybe=e=>{const{innerRef:t,minColumnIndex:n=0,visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnPositions:a,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:s,columnHeaderFocus:u,columnGroupHeaderFocus:c,densityFactor:d,headerGroupingMaxDepth:f,columnMenuState:m,columnVisibility:p,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:y}=e,b=Rr(),[g,x]=v.useState(""),[w,P]=v.useState(""),C=hs(),E=Ne(C,hj),S=We(),M=v.useRef(null),O=vt(t,M),[R,_]=v.useState(null),D=v.useRef(R),T=v.useRef(0),F=ku(C,S),j=OP(C,S.columnHeaderHeight),$=Math.floor(S.columnHeaderHeight*d),L=v.useCallback(oe=>{R&&oe&&Xj(R,oe)||_(oe)},[R]);v.useEffect(()=>{C.current.columnHeadersContainerElementRef.current.scrollLeft=0},[C]);const z=v.useRef(c0(f0e,{equalityCheck:(oe,ce)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every(ve=>oe[ve]===ce[ve])})),B=v.useCallback(oe=>{const[ce,ve]=$l({firstIndex:oe.firstRowIndex,lastIndex:oe.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:S.rowBuffer}),me=z.current({firstColumnIndex:oe.firstColumnIndex,minColumnIndex:n,columnBuffer:S.columnBuffer,firstRowToRender:ce,lastRowToRender:ve,apiRef:C,visibleRows:F.rows}),ke=b.direction==="ltr"?1:-1,be=me>0?T.current-ke*a[me]:T.current;M.current.style.transform=`translate3d(${-be}px, 0px, 0px)`},[a,n,S.columnBuffer,C,F.rows,S.rowBuffer,b.direction]);v.useLayoutEffect(()=>{R&&B(R)},[R,B]);const A=v.useCallback(({left:oe,renderContext:ce=null},ve)=>{var me,ke;if(!M.current||T.current===oe&&((me=D.current)==null?void 0:me.firstColumnIndex)===(ce==null?void 0:ce.firstColumnIndex)&&((ke=D.current)==null?void 0:ke.lastColumnIndex)===(ce==null?void 0:ce.lastColumnIndex))return;T.current=oe;let be=!1;ce!==D.current||!D.current?(vbe(ve)?(ss.flushSync(()=>{L(ce)}),be=!0):L(ce),D.current=ce):be=!0,ce&&be&&B(ce)},[B,L]),H=v.useCallback(oe=>P(oe.field),[]),q=v.useCallback(()=>P(""),[]),U=v.useCallback(oe=>x(oe.field),[]),G=v.useCallback(()=>x(""),[]);qe(C,"columnResizeStart",H),qe(C,"columnResizeStop",q),qe(C,"columnHeaderDragStart",U),qe(C,"columnHeaderDragEnd",G),qe(C,"scrollPositionChange",A);const Y=oe=>{const{renderContext:ce=R,minFirstColumn:ve=n,maxLastColumn:me=r.length}=oe||{};if(!ce)return null;const[ke,be]=$l({firstIndex:ce.firstRowIndex,lastIndex:ce.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:S.rowBuffer}),ie=E?z.current({firstColumnIndex:ce.firstColumnIndex,minColumnIndex:ve,columnBuffer:S.columnBuffer,apiRef:C,firstRowToRender:ke,lastRowToRender:be,visibleRows:F.rows}):0,ye=E?Math.min(ce.lastColumnIndex+S.columnBuffer,me):me;return{renderedColumns:r.slice(ie,ye),firstColumnToRender:ie,lastColumnToRender:ye,minFirstColumn:ve,maxLastColumn:me}},re=(oe,ce={})=>{const ve=Y(oe);if(ve==null)return null;const{renderedColumns:me,firstColumnToRender:ke}=ve,be=[];for(let ie=0;ie{if(f===0)return null;const ce=Y(oe);if(ce==null||ce.renderedColumns.length===0)return null;const{firstColumnToRender:ve,lastColumnToRender:me}=ce,ke=[],be=[];for(let V=0;VTe===ae&&Pe.includes(Z)),K=r[me-1].field,ee=(ye=C.current.unstable_getColumnGroupPath(K)[V])!=null?ye:null,se=Q.findIndex(({groupId:Te,columnFields:Pe})=>Te===ee&&Pe.includes(K)),Ce=Q.slice(te,se+1).map(Te=>I({},Te,{columnFields:Te.columnFields.filter(Pe=>p[Pe]!==!1)})).filter(Te=>Te.columnFields.length>0),_e=Ce[0].columnFields.indexOf(Z),X=Ce[0].columnFields.slice(0,_e).reduce((Te,Pe)=>{var Re;const Ge=C.current.getColumn(Pe);return Te+((Re=Ge.computedWidth)!=null?Re:0)},0);let Ee=ve;const De=Ce.map(({groupId:Te,columnFields:Pe})=>{const Re=c!==null&&c.depth===V&&Pe.includes(c.field),Ge=s!==null&&s.depth===V&&Pe.includes(s.field)?0:-1,at={groupId:Te,width:Pe.reduce((It,Gt)=>It+C.current.getColumn(Gt).computedWidth,0),fields:Pe,colIndex:Ee,hasFocus:Re,tabIndex:Ge};return Ee+=Pe.length,at});be.push({leftOverflow:X,elements:De})}return be.forEach((V,Q)=>{ke.push(N.jsx(Y2,{style:{height:`${$}px`,transform:`translateX(-${V.leftOverflow}px)`},role:"row","aria-rowindex":Q+1,ownerState:S,children:V.elements.map(({groupId:Z,width:ae,fields:te,colIndex:K,hasFocus:ee,tabIndex:se},Ce)=>N.jsx(gbe,{groupId:Z,width:ae,fields:te,colIndex:K,depth:Q,isLastColumn:K===r.length-te.length,maxDepth:be.length,height:$,hasFocus:ee,tabIndex:se},Ce))},Q))}),ke},J={minHeight:j,maxHeight:j,lineHeight:`${$}px`};return{renderContext:R,getColumnHeaders:re,getColumnsToRender:Y,getColumnGroupHeaders:le,isDragging:!!g,getRootProps:(oe={})=>I({style:J},oe),getInnerProps:()=>({ref:O,role:"rowgroup"}),headerHeight:$}},bbe=["className"],xbe=e=>{const{classes:t}=e;return Ie({root:["columnHeaders","withBorderColor"]},ft,t)},wbe=zn("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),Cbe=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,bbe),i=We(),a=xbe(i);return N.jsx(wbe,I({ref:n,className:he(r,a.root),ownerState:i},o,{role:"presentation"}))}),Sbe=["isDragging","className"],Ebe=e=>{const{isDragging:t,hasScrollX:n,classes:r}=e;return Ie({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},ft,r)},Pbe=zn("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${ne.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})(()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${ne.columnHeaderDropZone} .${ne.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${ne["columnHeadersInner--scrollable"]} .${ne.columnHeader}:last-child`]:{borderRight:"none"}})),kbe=v.forwardRef(function(t,n){var r,o;const{isDragging:i,className:a}=t,l=ue(t,Sbe),s=dt(),u=We(),c=I({},u,{isDragging:i,hasScrollX:(r=(o=s.current.getRootDimensions())==null?void 0:o.hasScrollX)!=null?r:!1}),d=Ebe(c);return N.jsx(Pbe,I({ref:n,className:he(a,d.root),ownerState:c},l))}),$be=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Ibe=v.forwardRef(function(t,n){const{innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:l,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:m,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:b}=t,g=ue(t,$be),{isDragging:x,getRootProps:w,getInnerProps:P,getColumnHeaders:C,getColumnGroupHeaders:E}=ybe({innerRef:r,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:l,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:f,headerGroupingMaxDepth:m,columnMenuState:p,columnVisibility:h,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:b});return N.jsx(Cbe,I({ref:n},w(g),{children:N.jsxs(kbe,I({isDragging:x},P(),{children:[E(),C()]}))}))}),Obe=y0(Ibe),Mbe=v.forwardRef(function(t,n){const o=dt().current.getLocaleText("noResultsOverlayLabel");return N.jsx(mP,I({ref:n},t,{children:o}))}),Rbe=tt(N.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"}),"CheckBoxOutlineBlank"),Tbe=tt(N.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"}),"CheckBox"),_be=tt(N.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"}),"IndeterminateCheckBox");function Fbe(e){return Be("MuiCheckbox",e)}const Abe=He("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),b1=Abe,Lbe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Dbe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${pe(r)}`,`size${pe(o)}`]},a=Ie(i,Fbe,t);return I({},t,a)},Nbe=de(gj,{shouldForwardProp:e=>gr(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${pe(n.size)}`],n.color!=="default"&&t[`color${pe(n.color)}`]]}})(({theme:e,ownerState:t})=>I({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:rt(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${b1.checked}, &.${b1.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${b1.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),jbe=N.jsx(Tbe,{}),zbe=N.jsx(Rbe,{}),Bbe=N.jsx(_be,{}),Hbe=v.forwardRef(function(t,n){var r,o;const i=Ue({props:t,name:"MuiCheckbox"}),{checkedIcon:a=jbe,color:l="primary",icon:s=zbe,indeterminate:u=!1,indeterminateIcon:c=Bbe,inputProps:d,size:f="medium",className:m}=i,p=ue(i,Lbe),h=u?c:s,y=u?c:a,b=I({},i,{color:l,indeterminate:u,size:f}),g=Dbe(b);return N.jsx(Nbe,I({type:"checkbox",inputProps:I({"data-indeterminate":u},d),icon:v.cloneElement(h,{fontSize:(r=h.props.fontSize)!=null?r:f}),checkedIcon:v.cloneElement(y,{fontSize:(o=y.props.fontSize)!=null?o:f}),ownerState:b,ref:n,className:he(g.root,m)},p,{classes:g}))}),MP=Hbe;function Vbe(e){return Be("MuiInputAdornment",e)}const Ube=He("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),X2=Ube;var Z2;const Wbe=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Gbe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${pe(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},qbe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,l={root:["root",n&&"disablePointerEvents",o&&`position${pe(o)}`,a,r&&"hiddenLabel",i&&`size${pe(i)}`]};return Ie(l,Vbe,t)},Kbe=de("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Gbe})(({theme:e,ownerState:t})=>I({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},t.variant==="filled"&&{[`&.${X2.positionStart}&:not(.${X2.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),Qbe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:l=!1,disableTypography:s=!1,position:u,variant:c}=r,d=ue(r,Wbe),f=rl()||{};let m=c;c&&f.variant,f&&!m&&(m=f.variant);const p=I({},r,{hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:l,position:u,variant:m}),h=qbe(p);return N.jsx(b0.Provider,{value:null,children:N.jsx(Kbe,I({as:a,ownerState:p,className:he(h.root,i),ref:n},d,{children:typeof o=="string"&&!s?N.jsx(Xe,{color:"text.secondary",children:o}):N.jsxs(v.Fragment,{children:[u==="start"?Z2||(Z2=N.jsx("span",{className:"notranslate",children:"​"})):null,o]})}))})}),Zs=Qbe,Ybe=["sortingOrder"],Xbe=v.memo(function(t){const{sortingOrder:n}=t,r=ue(t,Ybe),o=We(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?N.jsx(a,I({},r)):null}),Zbe=["native"];function Jbe(e){let{native:t}=e,n=ue(e,Zbe);return t?N.jsx("option",I({},n)):N.jsx(uo,I({},n))}const e1e={BooleanCellTrueIcon:Kfe,BooleanCellFalseIcon:h1,ColumnMenuIcon:Ufe,OpenFilterButtonIcon:Dfe,FilterPanelDeleteIcon:h1,ColumnFilteredIcon:p2,ColumnSelectorIcon:jfe,ColumnUnsortedIcon:Xbe,ColumnSortedAscendingIcon:u2,ColumnSortedDescendingIcon:c2,ColumnResizeIcon:zfe,DensityCompactIcon:Bfe,DensityStandardIcon:Hfe,DensityComfortableIcon:Vfe,ExportIcon:qfe,MoreActionsIcon:Qfe,TreeDataCollapseIcon:f2,TreeDataExpandIcon:d2,GroupingCriteriaCollapseIcon:f2,GroupingCriteriaExpandIcon:d2,DetailPanelExpandIcon:m2,DetailPanelCollapseIcon:Wfe,RowReorderIcon:h2,QuickFilterIcon:Nfe,QuickFilterClearIcon:h1,ColumnMenuHideIcon:Yfe,ColumnMenuSortAscendingIcon:u2,ColumnMenuSortDescendingIcon:c2,ColumnMenuFilterIcon:p2,ColumnMenuManageColumnsIcon:Xfe,ColumnMenuClearIcon:Zfe,LoadIcon:Gfe,FilterPanelAddIcon:m2,FilterPanelRemoveAllIcon:Jfe,ColumnReorderIcon:h2},t1e=I({},e1e,{BaseCheckbox:MP,BaseTextField:Mn,BaseFormControl:yP,BaseSelect:EP,BaseSwitch:Rpe,BaseButton:jt,BaseIconButton:Nn,BaseInputAdornment:Zs,BaseTooltip:kr,BasePopper:Eu,BaseInputLabel:Mj,BaseSelectOption:Jbe,BaseChip:E0}),n1e=t1e,r1e=I({},n1e,{Cell:Ww,SkeletonCell:sde,ColumnHeaderFilterIconButton:Ofe,ColumnMenu:mpe,ColumnHeaders:Obe,Footer:dve,FooterRowCount:sye,Toolbar:null,PreferencesPanel:vme,LoadingOverlay:Cve,NoResultsOverlay:Mbe,NoRowsOverlay:Sve,Pagination:oye,FilterPanel:Nme,ColumnsPanel:dme,Panel:gme,Row:Iye}),Zj=e=>{if(e!==void 0)return Object.keys(e).reduce((t,n)=>I({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]}),{})};function o1e({defaultSlots:e,slots:t,components:n}){const r=t??(n?Zj(n):null);if(!r||Object.keys(r).length===0)return e;const o=I({},e);return Object.keys(r).forEach(i=>{const a=i;r[a]!==void 0&&(o[a]=r[a])}),o}const i1e=["components","componentsProps"];function a1e(e){var t;const n=Object.keys(e);if(!n.some(i=>i.startsWith("aria-")||i.startsWith("data-")))return e;const r={},o=(t=e.forwardedProps)!=null?t:{};for(let i=0;i{const{components:t,componentsProps:n}=e,r=ue(e,i1e);return[t,n,a1e(r)]},[e])}const s1e={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleRowSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},$0={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:ea.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:" ",rowPositionsDebounceMs:166},u1e=Zj(r1e),c1e=e=>{const[t,n,r]=l1e(Ue({props:e,name:"MuiDataGrid"})),o=v.useMemo(()=>I({},tbe,r.localeText),[r.localeText]),i=v.useMemo(()=>o1e({defaultSlots:u1e,slots:r.slots,components:t}),[t,r.slots]);return v.useMemo(()=>{var a;return I({},$0,r,{localeText:o,slots:i,slotProps:(a=r.slotProps)!=null?a:n},s1e)},[r,o,i,n])},d1e=e=>I({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),J2=(e,t,n)=>typeof e=="number"&&e>0?e:t,f1e=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=v.useRef(Object.create(null)),a=v.useRef(-1),l=v.useRef(!1),s=Ne(e,kd),u=Ne(e,Xn),c=Ne(e,sj),d=Ne(e,Eo),f=ku(e,t),m=Ne(e,Pd),p=J2(t.rowHeight,$0.rowHeight),h=Math.floor(p*s),y=v.useCallback(()=>{var _,D;l.current=!1;const T=$=>{i.current[$.id]||(i.current[$.id]={sizes:{baseCenter:h},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:L,needsFirstMeasurement:z,sizes:B}=i.current[$.id];let A=typeof h=="number"&&h>0?h:52;const H=B.baseCenter;if(L)A=H;else if(n){const re=n(I({},$,{densityFactor:s}));if(re==="auto"){if(z){const le=o?o(I({},$,{densityFactor:s})):h;A=le??h}else A=H;l.current=!0,i.current[$.id].autoHeight=!0}else A=J2(re,h),i.current[$.id].needsFirstMeasurement=!1,i.current[$.id].autoHeight=!1}else i.current[$.id].needsFirstMeasurement=!1;const q={};for(const re in B)/^base[A-Z]/.test(re)&&(q[re]=B[re]);if(q.baseCenter=A,r){var U,G;const re=e.current.getRowIndexRelativeToVisibleRows($.id),le=r(I({},$,{isFirstVisible:re===0,isLastVisible:re===f.rows.length-1,indexRelativeToCurrentPage:re}));q.spacingTop=(U=le.top)!=null?U:0,q.spacingBottom=(G=le.bottom)!=null?G:0}const Y=e.current.unstable_applyPipeProcessors("rowHeight",q,$);return i.current[$.id].sizes=Y,Y},F=[],j=f.rows.reduce(($,L)=>{F.push($);let z=0,B=0;const A=T(L);for(const H in A){const q=A[H];/^base[A-Z]/.test(H)?z=q>z?q:z:B+=q}return $+z+B},0);m==null||(_=m.top)==null||_.forEach($=>{T($)}),m==null||(D=m.bottom)==null||D.forEach($=>{T($)}),e.current.setState($=>I({},$,{rowsMeta:{currentPageTotalHeight:j,positions:F}})),l.current||(a.current=1/0),e.current.forceUpdate()},[e,f.rows,h,n,r,o,m,s]),b=v.useCallback(_=>{const D=i.current[_];return D?D.sizes.baseCenter:h},[h]),g=_=>{var D;return(D=i.current[_])==null?void 0:D.sizes},x=v.useCallback((_,D)=>{i.current[_].sizes.baseCenter=D,i.current[_].isResized=!0,i.current[_].needsFirstMeasurement=!1,y()},[y]),w=v.useMemo(()=>bd(y,t.rowPositionsDebounceMs),[y,t.rowPositionsDebounceMs]),P=v.useCallback((_,D,T)=>{if(!i.current[_]||!i.current[_].autoHeight)return;const F=i.current[_].sizes[`base${pe(T)}`]!==D;i.current[_].needsFirstMeasurement=!1,i.current[_].sizes[`base${pe(T)}`]=D,F&&w()},[w]),C=v.useCallback(_=>{var D;return((D=i.current[_])==null?void 0:D.autoHeight)||!1},[]),E=v.useCallback(()=>a.current,[]),S=v.useCallback(_=>{l.current&&_>a.current&&(a.current=_)},[]),M=v.useCallback(()=>{i.current={},y()},[y]);v.useEffect(()=>{y()},[h,u,c,d,y]),IP(e,"rowHeight",y);const O={unstable_setLastMeasuredRowIndex:S,unstable_getRowHeight:b,unstable_getRowInternalSizes:g,unstable_setRowHeight:x,unstable_storeRowHeightMeasurement:P,resetRowHeights:M},R={getLastMeasuredRowIndex:E,rowHasAutoHeight:C};it(e,O,"public"),it(e,R,"private")},p1e=e=>{const t=v.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=v.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);it(e,{exportState:t,restoreState:n},"public")},m1e=e=>{const t=v.useRef({}),n=v.useCallback((u,c,d)=>{const f=t.current;f[u]||(f[u]={}),f[u][c]=d},[]),r=v.useCallback((u,c)=>{var d;return(d=t.current[u])==null?void 0:d[c]},[]),o=v.useCallback(u=>{const{columnIndex:c,rowId:d,minFirstColumnIndex:f,maxLastColumnIndex:m,columns:p}=u,h=p.length,y=p[c],b=typeof y.colSpan=="function"?y.colSpan(e.current.getCellParams(d,y.field)):y.colSpan;if(!b||b===1)return n(d,c,{spannedByColSpan:!1,cellProps:{colSpan:1,width:y.computedWidth}}),{colSpan:1};let g=y.computedWidth;for(let x=1;x=f&&w{for(let m=c;m1&&(m+=p.colSpan-1)}},[o]),a={unstable_getCellColSpanInfo:r},l={calculateColSpan:i};it(e,a,"public"),it(e,l,"private");const s=v.useCallback(()=>{t.current={}},[]);qe(e,"columnOrderChange",s)},Jj=(e,t,n)=>{if(V4(e)){if(n[e.field]!==void 0)throw new Error(["MUI: 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=>{Jj(i,[...t,r],n)})},eC=e=>{if(!e)return{};const t={};return e.forEach(n=>{Jj(n,[],t)}),t},tC=(e,t,n)=>{const r=s=>{var u;return(u=t[s])!=null?u:[]},o=[],i=Math.max(...e.map(s=>r(s).length)),a=(s,u,c)=>Ys(r(s).slice(0,c+1),r(u).slice(0,c+1)),l=(s,u)=>!!(n!=null&&n.left&&n.left.includes(s)&&!n.left.includes(u)||n!=null&&n.right&&!n.right.includes(s)&&n.right.includes(u));for(let s=0;s{var f;const m=(f=r(d)[s])!=null?f:null;if(c.length===0)return[{columnFields:[d],groupId:m}];const p=c[c.length-1],h=p.columnFields[p.columnFields.length-1];return p.groupId!==m||!a(h,d,s)||l(h,d)?[...c,{columnFields:[d],groupId:m}]:[...c.slice(0,c.length-1),{columnFields:[...p.columnFields,d],groupId:m}]},[]);o.push(u)}return o},h1e=["groupId","children"],RP=e=>{let t={};return e.forEach(n=>{if(V4(n))return;const{groupId:r,children:o}=n,i=ue(n,h1e);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${r} has no children.`);const a=I({},i,{groupId:r}),l=RP(o);if(l[r]!==void 0||t[r]!==void 0)throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=I({},t,l,{[r]:a})}),I({},t)},g1e=(e,t,n)=>{var r,o,i,a;if(!((r=t.experimentalFeatures)!=null&&r.columnGrouping))return e;const l=Na(n),s=d0(n),u=RP((o=t.columnGroupingModel)!=null?o:[]),c=eC((i=t.columnGroupingModel)!=null?i:[]),d=tC(l,c,(a=n.current.state.pinnedColumns)!=null?a:{}),f=s.length===0?0:Math.max(...s.map(m=>{var p,h;return(p=(h=c[m])==null?void 0:h.length)!=null?p:0}));return I({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:c,headerStructure:d,maxDepth:f}})},v1e=(e,t)=>{var n;const r=v.useCallback(s=>{var u;return(u=Qse(e)[s])!=null?u:[]},[e]),o=v.useCallback(()=>T4(e),[e]);it(e,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:o},"public");const a=v.useCallback(()=>{var s;const u=eC((s=t.columnGroupingModel)!=null?s:[]);e.current.setState(c=>{var d,f,m;const p=(d=(f=c.columns)==null?void 0:f.orderedFields)!=null?d:[],h=(m=c.pinnedColumns)!=null?m:{},y=tC(p,u,h);return I({},c,{columnGrouping:I({},c.columnGrouping,{headerStructure:y})})})},[e,t.columnGroupingModel]),l=v.useCallback(s=>{var u,c,d,f;if(!((u=t.experimentalFeatures)!=null&&u.columnGrouping))return;const m=(c=(d=(f=e.current).getPinnedColumns)==null?void 0:d.call(f))!=null?c:{},p=Na(e),h=d0(e),y=RP(s??[]),b=eC(s??[]),g=tC(p,b,m),x=h.length===0?0:Math.max(...h.map(w=>{var P,C;return(P=(C=b[w])==null?void 0:C.length)!=null?P:0}));e.current.setState(w=>I({},w,{columnGrouping:{lookup:y,unwrappedGroupingModel:b,headerStructure:g,maxDepth:x}}))},[e,(n=t.experimentalFeatures)==null?void 0:n.columnGrouping]);qe(e,"columnIndexChange",a),qe(e,"columnsChange",()=>{l(t.columnGroupingModel)}),qe(e,"columnVisibilityModelChange",()=>{l(t.columnGroupingModel)}),v.useEffect(()=>{l(t.columnGroupingModel)},[l,t.columnGroupingModel])},y1e=(e,t)=>{const n=Hye(e,t);return rbe(n,t),Z0e(n),_r(J0e,n,t),_r(p0e,n,t),_r(q0e,n,t),_r(W0e,n,t),_r(R0e,n,t),_r(obe,n,t),_r(A0e,n,t),_r($0e,n,t),_r(v0e,n,t),_r(C0e,n,t),_r(d1e,n,t),_r(s0e,n,t),_r(g1e,n,t),_r(Pfe,n,t),F0e(n,t),ebe(n,t),m0e(n,t),K0e(n,t),Mue(n,t),m1e(n),v1e(n,t),G0e(n,t),T0e(n,t),L0e(n,t),M0e(n,t),ibe(n,t),y0e(n,t),S0e(n,t),f1e(n,t),abe(n,t),u0e(n),w0e(n,t),k0e(n,t),l0e(n,t),ube(n,t),lbe(n,t),p1e(n),kfe(n,t),n},b1e=e=>{const{classes:t}=e;return Ie({root:["virtualScroller"]},ft,t)},x1e=zn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),w1e=v.forwardRef(function(t,n){const r=We(),o=b1e(r);return N.jsx(x1e,I({ref:n},t,{className:he(o.root,t.className),ownerState:r}))}),C1e=(e,t)=>{const{classes:n}=e;return Ie({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},ft,n)},S1e=zn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),E1e=v.forwardRef(function(t,n){var r;const o=We(),i=!o.autoHeight&&((r=t.style)==null?void 0:r.minHeight)==="auto",a=C1e(o,i);return N.jsx(S1e,I({ref:n},t,{ownerState:o,className:he(a.root,t.className)}))}),P1e=["className"],k1e=e=>{const{classes:t}=e;return Ie({root:["virtualScrollerRenderZone"]},ft,t)},$1e=zn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),I1e=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,P1e),i=We(),a=k1e(i);return N.jsx($1e,I({ref:n,className:he(a.root,r),ownerState:i},o))}),O1e=["className"],M1e=v.forwardRef(function(t,n){const{className:r}=t,o=ue(t,O1e),{getRootProps:i,getContentProps:a,getRenderZoneProps:l,getRows:s}=mbe({ref:n});return N.jsxs(w1e,I({className:r},i(o),{children:[N.jsx(Sue,{}),N.jsx(E1e,I({},a(),{children:N.jsx(I1e,I({},l(),{children:s()}))}))]}))}),e5=v.forwardRef(function(t,n){const r=c1e(t),o=y1e(r.apiRef,r);return N.jsx(Oye,{privateApiRef:o,props:r,children:N.jsxs(pde,I({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[N.jsx(fve,{}),N.jsx(mue,{VirtualScrollerComponent:M1e}),N.jsx(hue,{})]}))})}),TP=v.memo(e5);$0.filterDebounceMs;$0.filterDebounceMs;e5.propTypes={apiRef:fe.shape({current:fe.object.isRequired}),"aria-label":fe.string,"aria-labelledby":fe.string,autoHeight:fe.bool,autoPageSize:fe.bool,cellModesModel:fe.object,checkboxSelection:fe.bool,classes:fe.object,clipboardCopyCellDelimiter:fe.string,columnBuffer:fe.number,columnGroupingModel:fe.arrayOf(fe.object),columnHeaderHeight:fe.number,columns:sZ(fe.array.isRequired),columnThreshold:fe.number,columnVisibilityModel:fe.object,components:fe.object,componentsProps:fe.object,density:fe.oneOf(["comfortable","compact","standard"]),disableColumnFilter:fe.bool,disableColumnMenu:fe.bool,disableColumnSelector:fe.bool,disableDensitySelector:fe.bool,disableEval:fe.bool,disableRowSelectionOnClick:fe.bool,disableVirtualization:fe.bool,editMode:fe.oneOf(["cell","row"]),experimentalFeatures:fe.shape({ariaV7:fe.bool,columnGrouping:fe.bool,warnIfFocusStateIsNotSynced:fe.bool}),filterDebounceMs:fe.number,filterMode:fe.oneOf(["client","server"]),filterModel:fe.shape({items:fe.arrayOf(fe.shape({field:fe.string.isRequired,id:fe.oneOfType([fe.number,fe.string]),operator:fe.string.isRequired,value:fe.any})).isRequired,logicOperator:fe.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:fe.bool,quickFilterLogicOperator:fe.oneOf(["and","or"]),quickFilterValues:fe.array}),forwardedProps:fe.object,getCellClassName:fe.func,getDetailPanelContent:fe.func,getEstimatedRowHeight:fe.func,getRowClassName:fe.func,getRowHeight:fe.func,getRowId:fe.func,getRowSpacing:fe.func,hideFooter:fe.bool,hideFooterPagination:fe.bool,hideFooterSelectedRowCount:fe.bool,ignoreDiacritics:fe.bool,initialState:fe.object,isCellEditable:fe.func,isRowSelectable:fe.func,keepNonExistentRowsSelected:fe.bool,loading:fe.bool,localeText:fe.object,logger:fe.shape({debug:fe.func.isRequired,error:fe.func.isRequired,info:fe.func.isRequired,warn:fe.func.isRequired}),logLevel:fe.oneOf(["debug","error","info","warn",!1]),nonce:fe.string,onCellClick:fe.func,onCellDoubleClick:fe.func,onCellEditStart:fe.func,onCellEditStop:fe.func,onCellKeyDown:fe.func,onCellModesModelChange:fe.func,onClipboardCopy:fe.func,onColumnHeaderClick:fe.func,onColumnHeaderDoubleClick:fe.func,onColumnHeaderEnter:fe.func,onColumnHeaderLeave:fe.func,onColumnHeaderOut:fe.func,onColumnHeaderOver:fe.func,onColumnOrderChange:fe.func,onColumnVisibilityModelChange:fe.func,onFilterModelChange:fe.func,onMenuClose:fe.func,onMenuOpen:fe.func,onPaginationModelChange:fe.func,onPreferencePanelClose:fe.func,onPreferencePanelOpen:fe.func,onProcessRowUpdateError:fe.func,onResize:fe.func,onRowClick:fe.func,onRowDoubleClick:fe.func,onRowEditCommit:fe.func,onRowEditStart:fe.func,onRowEditStop:fe.func,onRowModesModelChange:fe.func,onRowSelectionModelChange:fe.func,onSortModelChange:fe.func,onStateChange:fe.func,pageSizeOptions:fe.arrayOf(fe.oneOfType([fe.number,fe.shape({label:fe.string.isRequired,value:fe.number.isRequired})]).isRequired),pagination:e=>e.pagination===!1?new Error(["MUI: `` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join(` `)):null,paginationMode:fe.oneOf(["client","server"]),paginationModel:fe.shape({page:fe.number.isRequired,pageSize:fe.number.isRequired}),processRowUpdate:fe.func,rowBuffer:fe.number,rowCount:fe.number,rowHeight:fe.number,rowModesModel:fe.object,rowPositionsDebounceMs:fe.number,rows:fe.arrayOf(fe.object).isRequired,rowSelection:fe.bool,rowSelectionModel:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.number,fe.string]).isRequired),fe.number,fe.string]),rowSpacingType:fe.oneOf(["border","margin"]),rowThreshold:fe.number,scrollbarSize:fe.number,showCellVerticalBorder:fe.bool,showColumnVerticalBorder:fe.bool,slotProps:fe.object,slots:fe.object,sortingMode:fe.oneOf(["client","server"]),sortingOrder:fe.arrayOf(fe.oneOf(["asc","desc"])),sortModel:fe.arrayOf(fe.shape({field:fe.string.isRequired,sort:fe.oneOf(["asc","desc"])})),sx:fe.oneOfType([fe.arrayOf(fe.oneOfType([fe.func,fe.object,fe.bool])),fe.func,fe.object]),unstable_ignoreValueFormatterDuringExport:fe.oneOfType([fe.shape({clipboardExport:fe.bool,csvExport:fe.bool}),fe.bool])};var R1e=Object.prototype,T1e=R1e.hasOwnProperty;function _1e(e,t){return e!=null&&T1e.call(e,t)}function F1e(e,t){return e!=null&&TL(e,t,_1e)}var mm=e=>e.type==="checkbox",yc=e=>e instanceof Date,Sr=e=>e==null;const t5=e=>typeof e=="object";var Tn=e=>!Sr(e)&&!Array.isArray(e)&&t5(e)&&!yc(e),n5=e=>Tn(e)&&e.target?mm(e.target)?e.target.checked:e.target.value:e,A1e=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,r5=(e,t)=>e.has(A1e(t)),L1e=e=>{const t=e.constructor&&e.constructor.prototype;return Tn(t)&&t.hasOwnProperty("isPrototypeOf")},_P=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Lr(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(_P&&(e instanceof Blob||e instanceof FileList))&&(n||Tn(e)))if(t=n?[]:{},!n&&!L1e(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Lr(e[r]));else return e;return t}var hm=e=>Array.isArray(e)?e.filter(Boolean):[],hn=e=>e===void 0,Le=(e,t,n)=>{if(!t||!Tn(e))return n;const r=hm(t.split(/[,[\].]+?/)).reduce((o,i)=>Sr(o)?o:o[i],e);return hn(r)||r===e?hn(e[t])?n:e[t]:r},fi=e=>typeof e=="boolean";const Pv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},pi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},o5=k.createContext(null),FP=()=>k.useContext(o5),D1e=e=>{const{children:t,...n}=e;return k.createElement(o5.Provider,{value:n},t)};var i5=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==pi.all&&(t._proxyFormState[a]=!r||pi.all),n&&(n[a]=!0),e[a]}});return o},ko=e=>Tn(e)&&!Object.keys(e).length,a5=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return ko(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||pi.all))},fg=e=>Array.isArray(e)?e:[e],l5=(e,t,n)=>!e||!t||e===t||fg(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function AP(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function N1e(e){const t=FP(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[a,l]=k.useState(n._formState),s=k.useRef(!0),u=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=k.useRef(o);return c.current=o,AP({disabled:r,next:d=>s.current&&l5(c.current,d.name,i)&&a5(d,u.current,n._updateFormState)&&l({...n._formState,...d}),subject:n._subjects.state}),k.useEffect(()=>(s.current=!0,u.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),i5(a,n,u.current,!1)}var Bi=e=>typeof e=="string",s5=(e,t,n,r,o)=>Bi(e)?(r&&t.watch.add(e),Le(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Le(n,i))):(r&&(t.watchAll=!0),n);function j1e(e){const t=FP(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:a}=e||{},l=k.useRef(r);l.current=r,AP({disabled:i,subject:n._subjects.values,next:c=>{l5(l.current,c.name,a)&&u(Lr(s5(l.current,n._names,c.values||n._formValues,!1,o)))}});const[s,u]=k.useState(n._getWatch(r,o));return k.useEffect(()=>n._removeUnmounted()),s}var LP=e=>/^\w*$/.test(e),u5=e=>hm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Nt=(e,t,n)=>{let r=-1;const o=LP(t)?[t]:u5(t),i=o.length,a=i-1;for(;++r{const c=o._options.shouldUnregister||i,d=(f,m)=>{const p=Le(o._fields,f);p&&(p._f.mount=m)};if(d(n,!0),c){const f=Lr(Le(o._options.defaultValues,n));Nt(o._defaultValues,n,f),hn(Le(o._formValues,n))&&Nt(o._formValues,n,f)}return()=>{(a?c&&!o._state.action:c)?o.unregister(n):d(n,!1)}},[n,o,a,i]),k.useEffect(()=>{Le(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:Le(o._fields,n)._f.value})},[r,n,o]),{field:{name:n,value:l,...fi(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:k.useCallback(c=>u.current.onChange({target:{value:n5(c),name:n},type:Pv.CHANGE}),[n]),onBlur:k.useCallback(()=>u.current.onBlur({target:{value:Le(o._formValues,n),name:n},type:Pv.BLUR}),[n,o]),ref:c=>{const d=Le(o._fields,n);d&&c&&(d._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:f=>c.setCustomValidity(f),reportValidity:()=>c.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Le(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Le(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Le(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Le(s.validatingFields,n)},error:{enumerable:!0,get:()=>Le(s.errors,n)}})}}const B1e=e=>e.render(z1e(e));var H1e=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},eR=e=>({isOnSubmit:!e||e===pi.onSubmit,isOnBlur:e===pi.onBlur,isOnChange:e===pi.onChange,isOnAll:e===pi.all,isOnTouch:e===pi.onTouched}),tR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const qf=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=Le(e,o);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)break;if(a.ref&&t(a.ref,a.name)&&!r)break;qf(l,t)}else Tn(l)&&qf(l,t)}}};var V1e=(e,t,n)=>{const r=hm(Le(e,n));return Nt(r,"root",t[n]),Nt(e,n,r),e},DP=e=>e.type==="file",Nl=e=>typeof e=="function",kv=e=>{if(!_P)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pg=e=>Bi(e),NP=e=>e.type==="radio",$v=e=>e instanceof RegExp;const nR={value:!1,isValid:!1},rR={value:!0,isValid:!0};var c5=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!hn(e[0].attributes.value)?hn(e[0].value)||e[0].value===""?rR:{value:e[0].value,isValid:!0}:rR:nR}return nR};const oR={isValid:!1,value:null};var d5=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,oR):oR;function iR(e,t,n="validate"){if(pg(e)||Array.isArray(e)&&e.every(pg)||fi(e)&&!e)return{type:n,message:pg(e)?e:"",ref:t}}var Bu=e=>Tn(e)&&!$v(e)?e:{value:e,message:""},aR=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:l,maxLength:s,minLength:u,min:c,max:d,pattern:f,validate:m,name:p,valueAsNumber:h,mount:y,disabled:b}=e._f,g=Le(t,p);if(!y||b)return{};const x=a?a[0]:i,w=_=>{r&&x.reportValidity&&(x.setCustomValidity(fi(_)?"":_||""),x.reportValidity())},P={},C=NP(i),E=mm(i),S=C||E,M=(h||DP(i))&&hn(i.value)&&hn(g)||kv(i)&&i.value===""||g===""||Array.isArray(g)&&!g.length,O=H1e.bind(null,p,n,P),R=(_,D,T,F=xa.maxLength,j=xa.minLength)=>{const $=_?D:T;P[p]={type:_?F:j,message:$,ref:i,...O(_?F:j,$)}};if(o?!Array.isArray(g)||!g.length:l&&(!S&&(M||Sr(g))||fi(g)&&!g||E&&!c5(a).isValid||C&&!d5(a).isValid)){const{value:_,message:D}=pg(l)?{value:!!l,message:l}:Bu(l);if(_&&(P[p]={type:xa.required,message:D,ref:x,...O(xa.required,D)},!n))return w(D),P}if(!M&&(!Sr(c)||!Sr(d))){let _,D;const T=Bu(d),F=Bu(c);if(!Sr(g)&&!isNaN(g)){const j=i.valueAsNumber||g&&+g;Sr(T.value)||(_=j>T.value),Sr(F.value)||(D=jnew Date(new Date().toDateString()+" "+B),L=i.type=="time",z=i.type=="week";Bi(T.value)&&g&&(_=L?$(g)>$(T.value):z?g>T.value:j>new Date(T.value)),Bi(F.value)&&g&&(D=L?$(g)<$(F.value):z?g+_.value,F=!Sr(D.value)&&g.length<+D.value;if((T||F)&&(R(T,_.message,D.message),!n))return w(P[p].message),P}if(f&&!M&&Bi(g)){const{value:_,message:D}=Bu(f);if($v(_)&&!g.match(_)&&(P[p]={type:xa.pattern,message:D,ref:i,...O(xa.pattern,D)},!n))return w(D),P}if(m){if(Nl(m)){const _=await m(g,t),D=iR(_,x);if(D&&(P[p]={...D,...O(xa.validate,D.message)},!n))return w(D.message),P}else if(Tn(m)){let _={};for(const D in m){if(!ko(_)&&!n)break;const T=iR(await m[D](g,t),x,D);T&&(_={...T,...O(D,T.message)},w(T.message),n&&(P[p]=_))}if(!ko(_)&&(P[p]={ref:x,..._},!n))return P}}return w(!0),P};function U1e(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},Iv=e=>Sr(e)||!t5(e);function Bs(e,t){if(Iv(e)||Iv(t))return e===t;if(yc(e)&&yc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(yc(i)&&yc(a)||Tn(i)&&Tn(a)||Array.isArray(i)&&Array.isArray(a)?!Bs(i,a):i!==a)return!1}}return!0}var f5=e=>e.type==="select-multiple",G1e=e=>NP(e)||mm(e),w1=e=>kv(e)&&e.isConnected,q1e=e=>Tn(e)&&Object.values(e).some(t=>t),p5=e=>{for(const t in e)if(Nl(e[t]))return!0;return!1};function Ov(e,t={}){const n=Array.isArray(e);if(Tn(e)||n)for(const r in e)Array.isArray(e[r])||Tn(e[r])&&!p5(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Ov(e[r],t[r])):Sr(e[r])||(t[r]=!0);return t}function m5(e,t,n){const r=Array.isArray(e);if(Tn(e)||r)for(const o in e)Array.isArray(e[o])||Tn(e[o])&&!p5(e[o])?hn(t)||Iv(n[o])?n[o]=Array.isArray(e[o])?Ov(e[o],[]):{...Ov(e[o])}:m5(e[o],Sr(t)?{}:t[o],n[o]):n[o]=!Bs(e[o],t[o]);return n}var Ch=(e,t)=>m5(e,t,Ov(t)),h5=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>hn(e)?e:t?e===""?NaN:e&&+e:n&&Bi(e)?new Date(e):r?r(e):e;function C1(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return DP(t)?t.files:NP(t)?d5(e.refs).value:f5(t)?[...t.selectedOptions].map(({value:n})=>n):mm(t)?c5(e.refs).value:h5(hn(t.value)?e.ref.value:t.value,e)}var K1e=(e,t,n,r)=>{const o={};for(const i of e){const a=Le(t,i);a&&Nt(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},of=e=>hn(e)?e:$v(e)?e.source:Tn(e)?$v(e.value)?e.value.source:e.value:e,Q1e=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function lR(e,t,n){const r=Le(e,n);if(r||LP(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=Le(t,i),l=Le(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};o.pop()}return{name:n}}var Y1e=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,X1e=(e,t)=>!hm(Le(e,t)).length&&Hn(e,t);const Z1e={mode:pi.onSubmit,reValidateMode:pi.onChange,shouldFocusError:!0};function J1e(e={}){let t={...Z1e,...e},n={submitCount:0,isDirty:!1,isLoading:Nl(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Tn(t.defaultValues)||Tn(t.values)?Lr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Lr(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},s,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:x1(),array:x1(),state:x1()},f=eR(t.mode),m=eR(t.reValidateMode),p=t.criteriaMode===pi.all,h=V=>Q=>{clearTimeout(u),u=setTimeout(V,Q)},y=async V=>{if(c.isValid||V){const Q=t.resolver?ko((await S()).errors):await O(r,!0);Q!==n.isValid&&d.state.next({isValid:Q})}},b=(V,Q)=>{(c.isValidating||c.validatingFields)&&(Q.forEach(Z=>{Nt(n.validatingFields,Z,V)}),n.isValidating=q1e(n.validatingFields),d.state.next({validatingFields:n.validatingFields,isValidating:n.isValidating}))},g=(V,Q=[],Z,ae,te=!0,K=!0)=>{if(ae&&Z){if(a.action=!0,K&&Array.isArray(Le(r,V))){const ee=Z(Le(r,V),ae.argA,ae.argB);te&&Nt(r,V,ee)}if(K&&Array.isArray(Le(n.errors,V))){const ee=Z(Le(n.errors,V),ae.argA,ae.argB);te&&Nt(n.errors,V,ee),X1e(n.errors,V)}if(c.touchedFields&&K&&Array.isArray(Le(n.touchedFields,V))){const ee=Z(Le(n.touchedFields,V),ae.argA,ae.argB);te&&Nt(n.touchedFields,V,ee)}c.dirtyFields&&(n.dirtyFields=Ch(o,i)),d.state.next({name:V,isDirty:_(V,Q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Nt(i,V,Q)},x=(V,Q)=>{Nt(n.errors,V,Q),d.state.next({errors:n.errors})},w=V=>{n.errors=V,d.state.next({errors:n.errors,isValid:!1})},P=(V,Q,Z,ae)=>{const te=Le(r,V);if(te){const K=Le(i,V,hn(Z)?Le(o,V):Z);hn(K)||ae&&ae.defaultChecked||Q?Nt(i,V,Q?K:C1(te._f)):F(V,K),a.mount&&y()}},C=(V,Q,Z,ae,te)=>{let K=!1,ee=!1;const se={name:V},Ce=!!(Le(r,V)&&Le(r,V)._f.disabled);if(!Z||ae){c.isDirty&&(ee=n.isDirty,n.isDirty=se.isDirty=_(),K=ee!==se.isDirty);const _e=Ce||Bs(Le(o,V),Q);ee=!!(!Ce&&Le(n.dirtyFields,V)),_e||Ce?Hn(n.dirtyFields,V):Nt(n.dirtyFields,V,!0),se.dirtyFields=n.dirtyFields,K=K||c.dirtyFields&&ee!==!_e}if(Z){const _e=Le(n.touchedFields,V);_e||(Nt(n.touchedFields,V,Z),se.touchedFields=n.touchedFields,K=K||c.touchedFields&&_e!==Z)}return K&&te&&d.state.next(se),K?se:{}},E=(V,Q,Z,ae)=>{const te=Le(n.errors,V),K=c.isValid&&fi(Q)&&n.isValid!==Q;if(e.delayError&&Z?(s=h(()=>x(V,Z)),s(e.delayError)):(clearTimeout(u),s=null,Z?Nt(n.errors,V,Z):Hn(n.errors,V)),(Z?!Bs(te,Z):te)||!ko(ae)||K){const ee={...ae,...K&&fi(Q)?{isValid:Q}:{},errors:n.errors,name:V};n={...n,...ee},d.state.next(ee)}b(!1,Object.keys(n.validatingFields).filter(ee=>ee===V))},S=async V=>t.resolver(i,t.context,K1e(V||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation)),M=async V=>{const{errors:Q}=await S(V);if(V)for(const Z of V){const ae=Le(Q,Z);ae?Nt(n.errors,Z,ae):Hn(n.errors,Z)}else n.errors=Q;return Q},O=async(V,Q,Z={valid:!0})=>{for(const ae in V){const te=V[ae];if(te){const{_f:K,...ee}=te;if(K){const se=l.array.has(K.name),Ce=await aR(te,i,p,t.shouldUseNativeValidation&&!Q,se);if(Ce[K.name]&&(Z.valid=!1,Q))break;!Q&&(Le(Ce,K.name)?se?V1e(n.errors,Ce,K.name):Nt(n.errors,K.name,Ce[K.name]):Hn(n.errors,K.name))}ee&&await O(ee,Q,Z)}}return Z.valid},R=()=>{for(const V of l.unMount){const Q=Le(r,V);Q&&(Q._f.refs?Q._f.refs.every(Z=>!w1(Z)):!w1(Q._f.ref))&&Y(V)}l.unMount=new Set},_=(V,Q)=>(V&&Q&&Nt(i,V,Q),!Bs(A(),o)),D=(V,Q,Z)=>s5(V,l,{...a.mount?i:hn(Q)?o:Bi(V)?{[V]:Q}:Q},Z,Q),T=V=>hm(Le(a.mount?i:o,V,e.shouldUnregister?Le(o,V,[]):[])),F=(V,Q,Z={})=>{const ae=Le(r,V);let te=Q;if(ae){const K=ae._f;K&&(!K.disabled&&Nt(i,V,h5(Q,K)),te=kv(K.ref)&&Sr(Q)?"":Q,f5(K.ref)?[...K.ref.options].forEach(ee=>ee.selected=te.includes(ee.value)):K.refs?mm(K.ref)?K.refs.length>1?K.refs.forEach(ee=>(!ee.defaultChecked||!ee.disabled)&&(ee.checked=Array.isArray(te)?!!te.find(se=>se===ee.value):te===ee.value)):K.refs[0]&&(K.refs[0].checked=!!te):K.refs.forEach(ee=>ee.checked=ee.value===te):DP(K.ref)?K.ref.value="":(K.ref.value=te,K.ref.type||d.values.next({name:V,values:{...i}})))}(Z.shouldDirty||Z.shouldTouch)&&C(V,te,Z.shouldTouch,Z.shouldDirty,!0),Z.shouldValidate&&B(V)},j=(V,Q,Z)=>{for(const ae in Q){const te=Q[ae],K=`${V}.${ae}`,ee=Le(r,K);(l.array.has(V)||!Iv(te)||ee&&!ee._f)&&!yc(te)?j(K,te,Z):F(K,te,Z)}},$=(V,Q,Z={})=>{const ae=Le(r,V),te=l.array.has(V),K=Lr(Q);Nt(i,V,K),te?(d.array.next({name:V,values:{...i}}),(c.isDirty||c.dirtyFields)&&Z.shouldDirty&&d.state.next({name:V,dirtyFields:Ch(o,i),isDirty:_(V,K)})):ae&&!ae._f&&!Sr(K)?j(V,K,Z):F(V,K,Z),tR(V,l)&&d.state.next({...n}),d.values.next({name:a.mount?V:void 0,values:{...i}})},L=async V=>{const Q=V.target;let Z=Q.name,ae=!0;const te=Le(r,Z),K=()=>Q.type?C1(te._f):n5(V),ee=se=>{ae=Number.isNaN(se)||se===Le(i,Z,se)};if(te){let se,Ce;const _e=K(),$e=V.type===Pv.BLUR||V.type===Pv.FOCUS_OUT,X=!Q1e(te._f)&&!t.resolver&&!Le(n.errors,Z)&&!te._f.deps||Y1e($e,Le(n.touchedFields,Z),n.isSubmitted,m,f),Ee=tR(Z,l,$e);Nt(i,Z,_e),$e?(te._f.onBlur&&te._f.onBlur(V),s&&s(0)):te._f.onChange&&te._f.onChange(V);const De=C(Z,_e,$e,!1),Te=!ko(De)||Ee;if(!$e&&d.values.next({name:Z,type:V.type,values:{...i}}),X)return c.isValid&&y(),Te&&d.state.next({name:Z,...Ee?{}:De});if(!$e&&Ee&&d.state.next({...n}),b(!0,[Z]),t.resolver){const{errors:Pe}=await S([Z]);if(ee(_e),ae){const Re=lR(n.errors,r,Z),Ge=lR(Pe,r,Re.name||Z);se=Ge.error,Z=Ge.name,Ce=ko(Pe)}}else se=(await aR(te,i,p,t.shouldUseNativeValidation))[Z],ee(_e),ae&&(se?Ce=!1:c.isValid&&(Ce=await O(r,!0)));ae&&(te._f.deps&&B(te._f.deps),E(Z,Ce,se,De))}},z=(V,Q)=>{if(Le(n.errors,Q)&&V.focus)return V.focus(),1},B=async(V,Q={})=>{let Z,ae;const te=fg(V);if(b(!0,te),t.resolver){const K=await M(hn(V)?V:te);Z=ko(K),ae=V?!te.some(ee=>Le(K,ee)):Z}else V?(ae=(await Promise.all(te.map(async K=>{const ee=Le(r,K);return await O(ee&&ee._f?{[K]:ee}:ee)}))).every(Boolean),!(!ae&&!n.isValid)&&y()):ae=Z=await O(r);return d.state.next({...!Bi(V)||c.isValid&&Z!==n.isValid?{}:{name:V},...t.resolver||!V?{isValid:Z}:{},errors:n.errors,isValidating:!1}),Q.shouldFocus&&!ae&&qf(r,z,V?te:l.mount),ae},A=V=>{const Q={...o,...a.mount?i:{}};return hn(V)?Q:Bi(V)?Le(Q,V):V.map(Z=>Le(Q,Z))},H=(V,Q)=>({invalid:!!Le((Q||n).errors,V),isDirty:!!Le((Q||n).dirtyFields,V),isTouched:!!Le((Q||n).touchedFields,V),isValidating:!!Le((Q||n).validatingFields,V),error:Le((Q||n).errors,V)}),q=V=>{V&&fg(V).forEach(Q=>Hn(n.errors,Q)),d.state.next({errors:V?n.errors:{}})},U=(V,Q,Z)=>{const ae=(Le(r,V,{_f:{}})._f||{}).ref;Nt(n.errors,V,{...Q,ref:ae}),d.state.next({name:V,errors:n.errors,isValid:!1}),Z&&Z.shouldFocus&&ae&&ae.focus&&ae.focus()},G=(V,Q)=>Nl(V)?d.values.subscribe({next:Z=>V(D(void 0,Q),Z)}):D(V,Q,!0),Y=(V,Q={})=>{for(const Z of V?fg(V):l.mount)l.mount.delete(Z),l.array.delete(Z),Q.keepValue||(Hn(r,Z),Hn(i,Z)),!Q.keepError&&Hn(n.errors,Z),!Q.keepDirty&&Hn(n.dirtyFields,Z),!Q.keepTouched&&Hn(n.touchedFields,Z),!Q.keepIsValidating&&Hn(n.validatingFields,Z),!t.shouldUnregister&&!Q.keepDefaultValue&&Hn(o,Z);d.values.next({values:{...i}}),d.state.next({...n,...Q.keepDirty?{isDirty:_()}:{}}),!Q.keepIsValid&&y()},re=({disabled:V,name:Q,field:Z,fields:ae,value:te})=>{if(fi(V)){const K=V?void 0:hn(te)?C1(Z?Z._f:Le(ae,Q)._f):te;Nt(i,Q,K),C(Q,K,!1,!1,!0)}},le=(V,Q={})=>{let Z=Le(r,V);const ae=fi(Q.disabled);return Nt(r,V,{...Z||{},_f:{...Z&&Z._f?Z._f:{ref:{name:V}},name:V,mount:!0,...Q}}),l.mount.add(V),Z?re({field:Z,disabled:Q.disabled,name:V,value:Q.value}):P(V,!0,Q.value),{...ae?{disabled:Q.disabled}:{},...t.progressive?{required:!!Q.required,min:of(Q.min),max:of(Q.max),minLength:of(Q.minLength),maxLength:of(Q.maxLength),pattern:of(Q.pattern)}:{},name:V,onChange:L,onBlur:L,ref:te=>{if(te){le(V,Q),Z=Le(r,V);const K=hn(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ee=G1e(K),se=Z._f.refs||[];if(ee?se.find(Ce=>Ce===K):K===Z._f.ref)return;Nt(r,V,{_f:{...Z._f,...ee?{refs:[...se.filter(w1),K,...Array.isArray(Le(o,V))?[{}]:[]],ref:{type:K.type,name:V}}:{ref:K}}}),P(V,!1,void 0,K)}else Z=Le(r,V,{}),Z._f&&(Z._f.mount=!1),(t.shouldUnregister||Q.shouldUnregister)&&!(r5(l.array,V)&&a.action)&&l.unMount.add(V)}}},J=()=>t.shouldFocusError&&qf(r,z,l.mount),oe=V=>{fi(V)&&(d.state.next({disabled:V}),qf(r,(Q,Z)=>{let ae=V;const te=Le(r,Z);te&&fi(te._f.disabled)&&(ae||(ae=te._f.disabled)),Q.disabled=ae},0,!1))},ce=(V,Q)=>async Z=>{let ae;Z&&(Z.preventDefault&&Z.preventDefault(),Z.persist&&Z.persist());let te=Lr(i);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:ee}=await S();n.errors=K,te=ee}else await O(r);if(Hn(n.errors,"root"),ko(n.errors)){d.state.next({errors:{}});try{await V(te,Z)}catch(K){ae=K}}else Q&&await Q({...n.errors},Z),J(),setTimeout(J);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ko(n.errors)&&!ae,submitCount:n.submitCount+1,errors:n.errors}),ae)throw ae},ve=(V,Q={})=>{Le(r,V)&&(hn(Q.defaultValue)?$(V,Lr(Le(o,V))):($(V,Q.defaultValue),Nt(o,V,Lr(Q.defaultValue))),Q.keepTouched||Hn(n.touchedFields,V),Q.keepDirty||(Hn(n.dirtyFields,V),n.isDirty=Q.defaultValue?_(V,Lr(Le(o,V))):_()),Q.keepError||(Hn(n.errors,V),c.isValid&&y()),d.state.next({...n}))},me=(V,Q={})=>{const Z=V?Lr(V):o,ae=Lr(Z),te=ko(V),K=te?o:ae;if(Q.keepDefaultValues||(o=Z),!Q.keepValues){if(Q.keepDirtyValues)for(const ee of l.mount)Le(n.dirtyFields,ee)?Nt(K,ee,Le(i,ee)):$(ee,Le(K,ee));else{if(_P&&hn(V))for(const ee of l.mount){const se=Le(r,ee);if(se&&se._f){const Ce=Array.isArray(se._f.refs)?se._f.refs[0]:se._f.ref;if(kv(Ce)){const _e=Ce.closest("form");if(_e){_e.reset();break}}}}r={}}i=e.shouldUnregister?Q.keepDefaultValues?Lr(o):{}:Lr(K),d.array.next({values:{...K}}),d.values.next({values:{...K}})}l={mount:Q.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!Q.keepIsValid||!!Q.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:Q.keepSubmitCount?n.submitCount:0,isDirty:te?!1:Q.keepDirty?n.isDirty:!!(Q.keepDefaultValues&&!Bs(V,o)),isSubmitted:Q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?[]:Q.keepDirtyValues?Q.keepDefaultValues&&i?Ch(o,i):n.dirtyFields:Q.keepDefaultValues&&V?Ch(o,V):{},touchedFields:Q.keepTouched?n.touchedFields:{},errors:Q.keepErrors?n.errors:{},isSubmitSuccessful:Q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ke=(V,Q)=>me(Nl(V)?V(i):V,Q);return{control:{register:le,unregister:Y,getFieldState:H,handleSubmit:ce,setError:U,_executeSchema:S,_getWatch:D,_getDirty:_,_updateValid:y,_removeUnmounted:R,_updateFieldArray:g,_updateDisabledField:re,_getFieldArray:T,_reset:me,_resetDefaultValues:()=>Nl(t.defaultValues)&&t.defaultValues().then(V=>{ke(V,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:V=>{n={...n,...V}},_disableForm:oe,_subjects:d,_proxyFormState:c,_setErrors:w,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(V){a=V},get _defaultValues(){return o},get _names(){return l},set _names(V){l=V},get _formState(){return n},set _formState(V){n=V},get _options(){return t},set _options(V){t={...t,...V}}},trigger:B,register:le,handleSubmit:ce,watch:G,setValue:$,getValues:A,reset:ke,resetField:ve,clearErrors:q,unregister:Y,setError:U,setFocus:(V,Q={})=>{const Z=Le(r,V),ae=Z&&Z._f;if(ae){const te=ae.refs?ae.refs[0]:ae.ref;te.focus&&(te.focus(),Q.shouldSelect&&te.select())}},getFieldState:H}}function exe(e={}){const t=k.useRef(),n=k.useRef(),[r,o]=k.useState({isDirty:!1,isValidating:!1,isLoading:Nl(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Nl(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...J1e(e),formState:r});const i=t.current.control;return i._options=e,AP({subject:i._subjects.state,next:a=>{a5(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),k.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),k.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),k.useEffect(()=>{e.values&&!Bs(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),k.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),k.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),k.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=i5(r,i),t.current}var txe=Object.defineProperty,Xl=(e,t)=>txe(e,"name",{value:t,configurable:!0}),ol=Xl(({refineCoreProps:e,warnWhenUnsavedChanges:t,disableServerSideValidation:n=!1,...r}={})=>{let{options:o}=dn(),i=(o==null?void 0:o.disableServerSideValidation)||n,a=Qe(),{warnWhenUnsavedChanges:l,setWarnWhen:s}=tl(),u=t??l,c=exe({...r}),{watch:d,setValue:f,getValues:m,handleSubmit:p,setError:h}=c,y=yK({...e,onMutationError:(E,S,M)=>{var O,R;if(i){(O=e==null?void 0:e.onMutationError)==null||O.call(e,E,S,M);return}let _=E==null?void 0:E.errors;for(let D in _){if(!Object.keys(Jg(S)).includes(D))continue;let T=_[D],F="";Array.isArray(T)&&(F=T.join(" ")),typeof T=="string"&&(F=T),typeof T=="boolean"&&T&&(F="Field is not valid."),typeof T=="object"&&"key"in T&&(F=a(T.key,T.message)),h(D,{message:F})}(R=e==null?void 0:e.onMutationError)==null||R.call(e,E,S,M)}}),{queryResult:b,onFinish:g,formLoading:x,onFinishAutoSave:w}=y;v.useEffect(()=>{var E;let S=(E=b==null?void 0:b.data)==null?void 0:E.data;S&&Object.keys(Jg(m())).forEach(M=>{let O=F1e(S,M),R=Zg(S,M);O&&f(M,R)})},[b==null?void 0:b.data,f,m]),v.useEffect(()=>{let E=d((S,{type:M})=>{M==="change"&&P(S)});return()=>E.unsubscribe()},[d]);let P=Xl(E=>{var S;if(u&&s(!0),e!=null&&e.autoSave){s(!1);let M=(S=e.autoSave)==null?void 0:S.onFinish;return w(M?M(E):E)}return E},"onValuesChange"),C=Xl((E,S)=>async M=>(s(!1),p(E,S)(M)),"handleSubmit");return{...c,handleSubmit:C,refineCore:y,saveButtonProps:{disabled:x,onClick:E=>{C(g,()=>!1)(E)}}}},"useForm");Xl(({stepsProps:e,...t}={})=>{let{defaultStep:n=0,isBackValidate:r=!1}=e??{},[o,i]=v.useState(n),a=ol({...t}),{trigger:l,getValues:s,setValue:u,formState:{dirtyFields:c},refineCore:{queryResult:d}}=a;v.useEffect(()=>{var m;let p=(m=d==null?void 0:d.data)==null?void 0:m.data;if(!p)return;let h=Object.keys(s());Object.entries(p).forEach(([y,b])=>{let g=y;h.includes(g)&&(c[g]||u(g,b))})},[d==null?void 0:d.data,o,u,s]);let f=Xl(m=>{let p=m;m<0&&(p=0),i(p)},"go");return{...a,steps:{currentStep:o,gotoStep:Xl(async m=>{if(m!==o){if(m{var o,i;let a=la(),[l,s]=k.useState(!1),u=Qe(),{resource:c,action:d}=t??{},{resource:f,action:m,identifier:p}=Je(c),h=Qo(),y=hr(),b=aa(),g=d??m??"",x=!(typeof n=="object"&&(n==null?void 0:n.syncId)===!1),w=typeof n=="object"&&"key"in n?n.key:f&&g&&n?`modal-${p}-${g}`:void 0,{defaultVisible:P=!1,autoSubmitClose:C=!0,autoResetForm:E=!0}=e??{},S=ol({refineCoreProps:{...t,meta:{...w?{[w]:void 0}:{},...t==null?void 0:t.meta}},...r}),{reset:M,refineCore:{onFinish:O,id:R,setId:_,autoSaveProps:D},saveButtonProps:T,handleSubmit:F}=S,{visible:j,show:$,close:L}=wK({defaultVisible:P});k.useEffect(()=>{var G,Y,re,le;if(l===!1&&w){let J=(Y=(G=h==null?void 0:h.params)==null?void 0:G[w])==null?void 0:Y.open;if(typeof J=="boolean"?J&&$():typeof J=="string"&&J==="true"&&$(),x){let oe=(le=(re=h==null?void 0:h.params)==null?void 0:re[w])==null?void 0:le.id;oe&&(_==null||_(oe))}s(!0)}},[w,h,x,_]),k.useEffect(()=>{var G;l===!0&&(j&&w?y({query:{[w]:{...(G=h==null?void 0:h.params)==null?void 0:G[w],open:!0,...x&&R&&{id:R}}},options:{keepQuery:!0},type:"replace"}):w&&!j&&y({query:{[w]:void 0},options:{keepQuery:!0},type:"replace"}))},[R,j,$,w,x]);let z=Xl(async G=>{await O(G),C&&L(),E&&M()},"submit"),{warnWhen:B,setWarnWhen:A}=tl(),H=v.useCallback(()=>{var G;if(D.status==="success"&&(G=t==null?void 0:t.autoSave)!=null&&G.invalidateOnClose&&a({id:R,invalidates:t.invalidates||["list","many","detail"],dataProviderName:t.dataProviderName,resource:p}),B)if(window.confirm(u("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes.")))A(!1);else return;_==null||_(void 0),L()},[B,D.status]),q=v.useCallback(G=>{typeof G<"u"&&(_==null||_(G)),(!(g==="edit"||g==="clone")||typeof G<"u"||typeof R<"u")&&$()},[R]),U=u(`${p}.titles.${d}`,void 0,`${b(`${d} ${((o=f==null?void 0:f.meta)==null?void 0:o.label)??((i=f==null?void 0:f.options)==null?void 0:i.label)??(f==null?void 0:f.label)??p}`,"singular")}`);return{modal:{submit:z,close:H,show:q,visible:j,title:U},...S,saveButtonProps:{...T,onClick:G=>F(z)(G)}}},"useModalForm");const nxe=vte({createStyledComponent:de("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${pe(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Ue({props:e,name:"MuiContainer"})}),gm=nxe;function rxe(e){return Be("MuiCard",e)}He("MuiCard",["root"]);const oxe=["className","raised"],ixe=e=>{const{classes:t}=e;return Ie({root:["root"]},rxe,t)},axe=de(Jo,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),lxe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=r,a=ue(r,oxe),l=I({},r,{raised:i}),s=ixe(l);return N.jsx(axe,I({className:he(s.root,o),elevation:i?8:void 0,ref:n,ownerState:l},a))}),il=lxe;function sxe(e){return Be("MuiCardContent",e)}He("MuiCardContent",["root"]);const uxe=["className","component"],cxe=e=>{const{classes:t}=e;return Ie({root:["root"]},sxe,t)},dxe=de("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),fxe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=r,a=ue(r,uxe),l=I({},r,{component:i}),s=cxe(l);return N.jsx(dxe,I({as:i,className:he(s.root,o),ownerState:l,ref:n},a))}),al=fxe,pxe=v.createContext(),sR=pxe;function mxe(e){return Be("MuiGrid",e)}const hxe=[0,1,2,3,4,5,6,7,8,9,10],gxe=["column-reverse","column","row-reverse","row"],vxe=["nowrap","wrap-reverse","wrap"],af=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],yxe=He("MuiGrid",["root","container","item","zeroMinWidth",...hxe.map(e=>`spacing-xs-${e}`),...gxe.map(e=>`direction-xs-${e}`),...vxe.map(e=>`wrap-xs-${e}`),...af.map(e=>`grid-xs-${e}`),...af.map(e=>`grid-sm-${e}`),...af.map(e=>`grid-md-${e}`),...af.map(e=>`grid-lg-${e}`),...af.map(e=>`grid-xl-${e}`)]),Op=yxe,bxe=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Tc(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function xxe({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,o)=>{let i={};if(t[o]&&(n=t[o]),!n)return r;if(n===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Gs({values:t.columns,breakpoints:e.breakpoints.values}),l=typeof a=="object"?a[o]:a;if(l==null)return r;const s=`${Math.round(n/l*1e8)/1e6}%`;let u={};if(t.container&&t.item&&t.columnSpacing!==0){const c=e.spacing(t.columnSpacing);if(c!=="0px"){const d=`calc(${s} + ${Tc(c)})`;u={flexBasis:d,maxWidth:d}}}i=I({flexBasis:s,flexGrow:0,maxWidth:s},u)}return e.breakpoints.values[o]===0?Object.assign(r,i):r[e.breakpoints.up(o)]=i,r},{})}function wxe({theme:e,ownerState:t}){const n=Gs({values:t.direction,breakpoints:e.breakpoints.values});return Gr({theme:e},n,r=>{const o={flexDirection:r};return r.indexOf("column")===0&&(o[`& > .${Op.item}`]={maxWidth:"none"}),o})}function g5({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(o=>{n===""&&t[o]!==0&&(n=o)});const r=Object.keys(e).sort((o,i)=>e[o]-e[i]);return r.slice(0,r.indexOf(n))}function Cxe({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&r!==0){const i=Gs({values:r,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=g5({breakpoints:e.breakpoints.values,values:i})),o=Gr({theme:e},i,(l,s)=>{var u;const c=e.spacing(l);return c!=="0px"?{marginTop:`-${Tc(c)}`,[`& > .${Op.item}`]:{paddingTop:Tc(c)}}:(u=a)!=null&&u.includes(s)?{}:{marginTop:0,[`& > .${Op.item}`]:{paddingTop:0}}})}return o}function Sxe({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&r!==0){const i=Gs({values:r,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=g5({breakpoints:e.breakpoints.values,values:i})),o=Gr({theme:e},i,(l,s)=>{var u;const c=e.spacing(l);return c!=="0px"?{width:`calc(100% + ${Tc(c)})`,marginLeft:`-${Tc(c)}`,[`& > .${Op.item}`]:{paddingLeft:Tc(c)}}:(u=a)!=null&&u.includes(s)?{}:{width:"100%",marginLeft:0,[`& > .${Op.item}`]:{paddingLeft:0}}})}return o}function Exe(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(o=>{const i=e[o];Number(i)>0&&r.push(n[`spacing-${o}-${String(i)}`])}),r}const Pxe=de("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:l,zeroMinWidth:s,breakpoints:u}=n;let c=[];r&&(c=Exe(a,u,t));const d=[];return u.forEach(f=>{const m=n[f];m&&d.push(t[`grid-${f}-${String(m)}`])}),[t.root,r&&t.container,i&&t.item,s&&t.zeroMinWidth,...c,o!=="row"&&t[`direction-xs-${String(o)}`],l!=="wrap"&&t[`wrap-xs-${String(l)}`],...d]}})(({ownerState:e})=>I({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),wxe,Cxe,Sxe,xxe);function kxe(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const o=e[r];if(Number(o)>0){const i=`spacing-${r}-${String(o)}`;n.push(i)}}),n}const $xe=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:s}=e;let u=[];n&&(u=kxe(i,s));const c=[];s.forEach(f=>{const m=e[f];m&&c.push(`grid-${f}-${String(m)}`)});const d={root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...c]};return Ie(d,mxe,t)},Ixe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiGrid"}),{breakpoints:o}=Rr(),i=nm(r),{className:a,columns:l,columnSpacing:s,component:u="div",container:c=!1,direction:d="row",item:f=!1,rowSpacing:m,spacing:p=0,wrap:h="wrap",zeroMinWidth:y=!1}=i,b=ue(i,bxe),g=m||p,x=s||p,w=v.useContext(sR),P=c?l||12:w,C={},E=I({},b);o.keys.forEach(O=>{b[O]!=null&&(C[O]=b[O],delete E[O])});const S=I({},i,{columns:P,container:c,direction:d,item:f,rowSpacing:g,columnSpacing:x,wrap:h,zeroMinWidth:y,spacing:p},C,{breakpoints:o.keys}),M=$xe(S);return N.jsx(sR.Provider,{value:P,children:N.jsx(Pxe,I({ownerState:S,className:he(M.root,a),as:u,ref:n},E))})}),_c=Ixe;var jP={},Oxe=wt;Object.defineProperty(jP,"__esModule",{value:!0});var v5=jP.default=void 0,Mxe=Oxe($t()),Rxe=N;v5=jP.default=(0,Mxe.default)((0,Rxe.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"}),"Info");function Txe(e){return Be("MuiCardHeader",e)}const _xe=He("MuiCardHeader",["root","avatar","action","content","title","subheader"]),uR=_xe,Fxe=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],Axe=e=>{const{classes:t}=e;return Ie({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},Txe,t)},Lxe=de("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>I({[`& .${uR.title}`]:t.title,[`& .${uR.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),Dxe=de("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),Nxe=de("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),jxe=de("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),zxe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:l="div",disableTypography:s=!1,subheader:u,subheaderTypographyProps:c,title:d,titleTypographyProps:f}=r,m=ue(r,Fxe),p=I({},r,{component:l,disableTypography:s}),h=Axe(p);let y=d;y!=null&&y.type!==Xe&&!s&&(y=N.jsx(Xe,I({variant:i?"body2":"h5",className:h.title,component:"span",display:"block"},f,{children:y})));let b=u;return b!=null&&b.type!==Xe&&!s&&(b=N.jsx(Xe,I({variant:i?"body2":"body1",className:h.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:b}))),N.jsxs(Lxe,I({className:he(h.root,a),as:l,ref:n,ownerState:p},m,{children:[i&&N.jsx(Dxe,{className:h.avatar,ownerState:p,children:i}),N.jsxs(jxe,{className:h.content,ownerState:p,children:[y,b]}),o&&N.jsx(Nxe,{className:h.action,ownerState:p,children:o})]}))}),I0=zxe;function Bxe(e){return Be("MuiCardActions",e)}He("MuiCardActions",["root","spacing"]);const Hxe=["disableSpacing","className"],Vxe=e=>{const{classes:t,disableSpacing:n}=e;return Ie({root:["root",!n&&"spacing"]},Bxe,t)},Uxe=de("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>I({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),Wxe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i}=r,a=ue(r,Hxe),l=I({},r,{disableSpacing:o}),s=Vxe(l);return N.jsx(Uxe,I({className:he(s.root,i),ownerState:l,ref:n},a))}),zP=Wxe;var BP={},Gxe=wt;Object.defineProperty(BP,"__esModule",{value:!0});var O0=BP.default=void 0,qxe=Gxe($t()),Kxe=N;O0=BP.default=(0,qxe.default)((0,Kxe.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack");var M0={Title:"refine-pageHeader-title",SubTitle:"refine-pageHeader-subTitle"},ca={CloneButton:"refine-clone-button",DeleteButton:"refine-delete-button",EditButton:"refine-edit-button",SaveButton:"refine-save-button",CreateButton:"refine-create-button",ImportButton:"refine-import-button",ExportButton:"refine-export-button",ListButton:"refine-list-button",RefreshButton:"refine-refresh-button",ShowButton:"refine-show-button"},HP={},Qxe=wt;Object.defineProperty(HP,"__esModule",{value:!0});var Mp=HP.default=void 0,Yxe=Qxe($t()),Xxe=N;Mp=HP.default=(0,Yxe.default)((0,Xxe.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z"}),"AddBoxOutlined");var VP={},Zxe=wt;Object.defineProperty(VP,"__esModule",{value:!0});var nC=VP.default=void 0,Jxe=Zxe($t()),ewe=N;nC=VP.default=(0,Jxe.default)((0,ewe.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined");function twe(e){return Be("MuiDialog",e)}const nwe=He("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),S1=nwe,rwe=v.createContext({}),y5=rwe,owe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],iwe=de(o4,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),awe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${pe(n)}`],paper:["paper",`paperScroll${pe(n)}`,`paperWidth${pe(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ie(a,twe,t)},lwe=de(AE,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),swe=de("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${pe(n.scroll)}`]]}})(({ownerState:e})=>I({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),uwe=de(Jo,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${pe(n.scroll)}`],t[`paperWidth${pe(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>I({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${S1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),cwe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDialog"}),o=Rr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":l,BackdropComponent:s,BackdropProps:u,children:c,className:d,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:p=!1,maxWidth:h="sm",onBackdropClick:y,onClose:b,open:g,PaperComponent:x=Jo,PaperProps:w={},scroll:P="paper",TransitionComponent:C=r4,transitionDuration:E=i,TransitionProps:S}=r,M=ue(r,owe),O=I({},r,{disableEscapeKeyDown:f,fullScreen:m,fullWidth:p,maxWidth:h,scroll:P}),R=awe(O),_=v.useRef(),D=$=>{_.current=$.target===$.currentTarget},T=$=>{_.current&&(_.current=null,y&&y($),b&&b($,"backdropClick"))},F=_t(l),j=v.useMemo(()=>({titleId:F}),[F]);return N.jsx(lwe,I({className:he(R.root,d),closeAfterTransition:!0,components:{Backdrop:iwe},componentsProps:{backdrop:I({transitionDuration:E,as:s},u)},disableEscapeKeyDown:f,onClose:b,open:g,ref:n,onClick:T,ownerState:O},M,{children:N.jsx(C,I({appear:!0,in:g,timeout:E,role:"presentation"},S,{children:N.jsx(swe,{className:he(R.container),onMouseDown:D,ownerState:O,children:N.jsx(uwe,I({as:x,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":F},w,{className:he(R.paper,w.className),ownerState:O,children:N.jsx(y5.Provider,{value:j,children:c})}))})}))}))}),b5=cwe;function dwe(e){return Be("MuiDialogActions",e)}He("MuiDialogActions",["root","spacing"]);const fwe=["className","disableSpacing"],pwe=e=>{const{classes:t,disableSpacing:n}=e;return Ie({root:["root",!n&&"spacing"]},dwe,t)},mwe=de("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>I({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),hwe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=r,a=ue(r,fwe),l=I({},r,{disableSpacing:i}),s=pwe(l);return N.jsx(mwe,I({className:he(s.root,o),ownerState:l,ref:n},a))}),x5=hwe;function gwe(e){return Be("MuiDialogTitle",e)}const vwe=He("MuiDialogTitle",["root"]),ywe=vwe,bwe=["className","id"],xwe=e=>{const{classes:t}=e;return Ie({root:["root"]},gwe,t)},wwe=de(Xe,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Cwe=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDialogTitle"}),{className:o,id:i}=r,a=ue(r,bwe),l=r,s=xwe(l),{titleId:u=i}=v.useContext(y5);return N.jsx(wwe,I({component:"h2",className:he(s.root,o),ownerState:l,ref:n,variant:"h6",id:i??u},a))}),w5=Cwe;function Swe(e){return Be("MuiLoadingButton",e)}const Ewe=He("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),wa=Ewe,Pwe=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],kwe=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${pe(n)}`],endIcon:[t&&`endIconLoading${pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${pe(n)}`]},i=Ie(o,Swe,r);return I({},r,i)},$we=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",Iwe=de(jt,{shouldForwardProp:e=>$we(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${wa.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${wa.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>I({[`& .${wa.startIconLoadingStart}, & .${wa.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${wa.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${wa.startIconLoadingStart}, & .${wa.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${wa.startIconLoadingStart}, & .${wa.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),Owe=de("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>I({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),Mwe=v.forwardRef(function(t,n){const r=v.useContext(C4),o=rm(r,t),i=Ue({props:o,name:"MuiLoadingButton"}),{children:a,disabled:l=!1,id:s,loading:u=!1,loadingIndicator:c,loadingPosition:d="center",variant:f="text"}=i,m=ue(i,Pwe),p=_t(s),h=c??N.jsx(PP,{"aria-labelledby":p,color:"inherit",size:16}),y=I({},i,{disabled:l,loading:u,loadingIndicator:h,loadingPosition:d,variant:f}),b=kwe(y),g=u?N.jsx(Owe,{className:b.loadingIndicator,ownerState:y,children:h}):null;return N.jsxs(Iwe,I({disabled:l||u,id:p,ref:n},m,{variant:f,classes:b,ownerState:y,children:[y.loadingPosition==="end"?a:g,y.loadingPosition==="end"?g:a]}))}),vm=Mwe;var UP={},Rwe=wt;Object.defineProperty(UP,"__esModule",{value:!0});var rC=UP.default=void 0,Twe=Rwe($t()),_we=N;rC=UP.default=(0,Twe.default)((0,_we.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");var WP={},Fwe=wt;Object.defineProperty(WP,"__esModule",{value:!0});var oC=WP.default=void 0,Awe=Fwe($t()),Lwe=N;oC=WP.default=(0,Awe.default)((0,Lwe.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"RefreshOutlined");var GP={},Dwe=wt;Object.defineProperty(GP,"__esModule",{value:!0});var iC=GP.default=void 0,Nwe=Dwe($t()),jwe=N;iC=GP.default=(0,Nwe.default)((0,jwe.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}),"VisibilityOutlined");var qP={},zwe=wt;Object.defineProperty(qP,"__esModule",{value:!0});var Rp=qP.default=void 0,Bwe=zwe($t()),Hwe=N;Rp=qP.default=(0,Bwe.default)((0,Hwe.jsx)("path",{d:"M9 3 5 6.99h3V14h2V6.99h3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99z"}),"ImportExportOutlined");var KP={},Vwe=wt;Object.defineProperty(KP,"__esModule",{value:!0});var aC=KP.default=void 0,Uwe=Vwe($t()),Wwe=N;aC=KP.default=(0,Uwe.default)((0,Wwe.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3M6 6h9v4H6z"}),"SaveOutlined");var QP={},Gwe=wt;Object.defineProperty(QP,"__esModule",{value:!0});var C5=QP.default=void 0,qwe=Gwe($t()),Kwe=N;C5=QP.default=(0,qwe.default)((0,Kwe.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"CheckOutlined");var YP={},Qwe=wt;Object.defineProperty(YP,"__esModule",{value:!0});var S5=YP.default=void 0,Ywe=Qwe($t()),Xwe=N;S5=YP.default=(0,Ywe.default)((0,Xwe.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"}),"CloseOutlined");var E5={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(we,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",l="minute",s="hour",u="day",c="week",d="month",f="quarter",m="year",p="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var F=["th","st","nd","rd"],j=T%100;return"["+T+(F[(j-20)%10]||F[j]||F[0])+"]"}},x=function(T,F,j){var $=String(T);return!$||$.length>=F?T:""+Array(F+1-$.length).join(j)+T},w={s:x,z:function(T){var F=-T.utcOffset(),j=Math.abs(F),$=Math.floor(j/60),L=j%60;return(F<=0?"+":"-")+x($,2,"0")+":"+x(L,2,"0")},m:function T(F,j){if(F.date()1)return T(B[0])}else{var A=F.name;C[A]=F,L=A}return!$&&L&&(P=L),L||!$&&P},O=function(T,F){if(S(T))return T.clone();var j=typeof F=="object"?F:{};return j.date=T,j.args=arguments,new _(j)},R=w;R.l=M,R.i=S,R.w=function(T,F){return O(T,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var _=function(){function T(j){this.$L=M(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[E]=!0}var F=T.prototype;return F.parse=function(j){this.$d=function($){var L=$.date,z=$.utc;if(L===null)return new Date(NaN);if(R.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var B=L.match(y);if(B){var A=B[2]-1||0,H=(B[7]||"0").substring(0,3);return z?new Date(Date.UTC(B[1],A,B[3]||1,B[4]||0,B[5]||0,B[6]||0,H)):new Date(B[1],A,B[3]||1,B[4]||0,B[5]||0,B[6]||0,H)}}return new Date(L)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return R},F.isValid=function(){return this.$d.toString()!==h},F.isSame=function(j,$){var L=O(j);return this.startOf($)<=L&&L<=this.endOf($)},F.isAfter=function(j,$){return O(j)e.length){for(;o--;)if(e.charCodeAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";for(i=-1,l=t.length-1;o--;)if(e.charCodeAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1),l>-1&&(e.charCodeAt(o)===t.charCodeAt(l--)?l<0&&(r=o):(l=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function aCe(e){var t,n,r;if(ym(e),!e.length)return".";for(t=-1,r=e.length;--r;)if(e.charCodeAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function lCe(e){var t=-1,n=0,r=-1,o=0,i,a,l;for(ym(e),l=e.length;l--;){if(a=e.charCodeAt(l),a===47){if(i){n=l+1;break}continue}r<0&&(i=!0,r=l+1),a===46?t<0?t=l:o!==1&&(o=1):t>-1&&(o=-1)}return t<0||r<0||o===0||o===1&&t===r-1&&t===n+1?"":e.slice(t,r)}function sCe(){for(var e=-1,t;++e2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length){n="",r=0,o=a,i=0;continue}}t&&(n=n.length?n+"/..":"..",r=2)}else n.length?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else l===46&&i>-1?i++:i=-1}return n}function ym(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var I5={};I5.cwd=dCe;function dCe(){return"/"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */var fCe=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},ta=Od,pCe=I5,mCe=fCe,hCe=Ya,gCe={}.hasOwnProperty,E1=["history","path","basename","stem","extname","dirname"];Ya.prototype.toString=$Ce;Object.defineProperty(Ya.prototype,"path",{get:vCe,set:yCe});Object.defineProperty(Ya.prototype,"dirname",{get:bCe,set:xCe});Object.defineProperty(Ya.prototype,"basename",{get:wCe,set:CCe});Object.defineProperty(Ya.prototype,"extname",{get:SCe,set:ECe});Object.defineProperty(Ya.prototype,"stem",{get:PCe,set:kCe});function Ya(e){var t,n;if(!e)e={};else if(typeof e=="string"||mCe(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof Ya))return new Ya(e);for(this.data={},this.messages=[],this.history=[],this.cwd=pCe.cwd(),n=-1;++n-1)throw new Error("`extname` cannot contain multiple dots")}this.path=ta.join(this.dirname,this.stem+(e||""))}function PCe(){return typeof this.path=="string"?ta.basename(this.path,this.extname):void 0}function kCe(e){ek(e,"stem"),JP(e,"stem"),this.path=ta.join(this.dirname||"",e+(this.extname||""))}function $Ce(e){return(this.contents||"").toString(e)}function JP(e,t){if(e&&e.indexOf(ta.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+ta.sep+"`")}function ek(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function O5(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var ICe=rCe,R0=hCe,OCe=R0;R0.prototype.message=MCe;R0.prototype.info=TCe;R0.prototype.fail=RCe;function MCe(e,t,n){var r=new ICe(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}function RCe(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function TCe(){var e=this.message.apply(this,arguments);return e.fatal=null,e}var M5=OCe,_Ce=FCe;function FCe(e){if(e)throw e}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */var ACe=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},mg=Object.prototype.hasOwnProperty,R5=Object.prototype.toString,fR=Object.defineProperty,pR=Object.getOwnPropertyDescriptor,mR=function(t){return typeof Array.isArray=="function"?Array.isArray(t):R5.call(t)==="[object Array]"},hR=function(t){if(!t||R5.call(t)!=="[object Object]")return!1;var n=mg.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&mg.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||mg.call(t,o)},gR=function(t,n){fR&&n.name==="__proto__"?fR(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},vR=function(t,n){if(n==="__proto__")if(mg.call(t,n)){if(pR)return pR(t,n).value}else return;return t[n]},LCe=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});s{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},NCe=[].slice,jCe=zCe;function zCe(e,t){var n;return r;function r(){var a=NCe.call(arguments,0),l=e.length>a.length,s;l&&a.push(o);try{s=e.apply(null,a)}catch(u){if(l&&n)throw u;return o(u)}l||(s&&typeof s.then=="function"?s.then(i,o):s instanceof Error?o(s):i(s))}function o(){n||(n=!0,t.apply(null,arguments))}function i(a){o(null,a)}}var T5=jCe,BCe=_5;_5.wrap=T5;var yR=[].slice;function _5(){var e=[],t={};return t.run=n,t.use=r,t;function n(){var o=-1,i=yR.call(arguments,0,-1),a=arguments[arguments.length-1];if(typeof a!="function")throw new Error("Expected function as last argument, not "+a);l.apply(null,[null].concat(i));function l(s){var u=e[++o],c=yR.call(arguments,0),d=c.slice(1),f=i.length,m=-1;if(s){a(s);return}for(;++m13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":nSe(n)}var oSe=rSe,nk={};function iSe(e){return e<-2}var Fn=iSe;function aSe(e){return e===-2||e===-1||e===32}var ll=aSe,PR=ll;function lSe(e,t,n,r){var o=r?r-1:1/0,i=0;return a;function a(s){return PR(s)?(e.enter(n),l(s)):t(s)}function l(s){return PR(s)&&i++g;)t.containerState=n[w][1],n[w][0].exit.call(t,e);n.length=g}function b(g,x){var w=0;return i={},P;function P(R){return w-1?void 0:4)}function CSe(e,t,n){return N5(e,e.lazy(this.parser.constructs.flow,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}rk.tokenize=ySe;var ok={};function SSe(e){for(var t=-1,n=0;++to?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),O1.apply(e,a);else for(n&&O1.apply(e,[t,n]);i-1||ASe(r.events,"linePrefix")<4?e.interrupt(r.parser.constructs.flow,n,t)(a):t(a)}}var VSe=NSe;Object.defineProperty(ok,"__esModule",{value:!0});var USe=VSe,WSe=Bn,GSe=_0,qSe=KSe;function KSe(e){var t=this,n=e.attempt(GSe,r,e.attempt(this.parser.constructs.flowInitial,o,WSe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(USe,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}ok.tokenize=qSe;var Md={};Object.defineProperty(Md,"__esModule",{value:!0});var QSe=bm,kR=$u,YSe=V5("text"),XSe=V5("string"),ZSe={resolveAll:U5()};function V5(e){return{tokenize:t,resolveAll:U5(e==="text"?JSe:void 0)};function t(n){var r=this,o=this.parser.constructs[e],i=n.attempt(o,a,l);return a;function a(c){return u(c)?i(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),s}function s(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),s)}function u(c){var d=o[c],f=-1;if(c===null)return!0;if(d){for(;++f-1&&(a[0]=a[0].slice(r)),i>0&&a.push(e[o].slice(0,i))),a}var pEe=fEe,mEe=bm,hEe=Fn,gEe=ak,vEe=sl,M1=ik,yEe=F0,bEe=dEe,IR=$u,xEe=pEe;function wEe(e,t,n){var r=n?IR(n):{line:1,column:1,offset:0},o={},i=[],a=[],l=[],s={consume:g,enter:x,exit:w,attempt:E(P),check:E(C),interrupt:E(C,{interrupt:!0}),lazy:E(C,{lazy:!0})},u={previous:null,events:[],parser:e,sliceStream:m,sliceSerialize:f,now:p,defineSkip:h,write:d},c=t.tokenize.call(u,s);return t.resolveAll&&i.push(t),r._index=0,r._bufferIndex=-1,u;function d(R){return a=gEe(a,R),y(),a[a.length-1]!==null?[]:(S(t,0),u.events=yEe(i,u.events,u),u.events)}function f(R){return bEe(m(R))}function m(R){return xEe(a,R)}function p(){return IR(r)}function h(R){o[R.line]=R.column,O()}function y(){for(var R,_;r._index-1?G():Y.tokenize.call(_?mEe({},u,_):u,s,U,G)(le)}}function U(Y){return R(z,B),F}function G(Y){return B.restore(),++L<$.length?q($[L]):j}}}function S(R,_){R.resolveAll&&i.indexOf(R)<0&&i.push(R),R.resolve&&vEe(u.events,_,u.events.length-_,R.resolve(u.events.slice(_),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function M(){var R=p(),_=u.previous,D=u.currentConstruct,T=u.events.length,F=Array.from(l);return{restore:j,from:T};function j(){r=R,u.previous=_,u.currentConstruct=D,u.events.length=T,l=F,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}var CEe=wEe,da={};function SEe(e){return e<0||e===32}var ul=SEe,EEe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,PEe=EEe,kEe=T0;function $Ee(e){return t;function t(n){return e.test(kEe(n))}}var ys=$Ee,IEe=PEe,OEe=ys,MEe=OEe(IEe),lk=MEe,REe=ys,TEe=REe(/\s/),sk=TEe,_Ee=ul,FEe=lk,AEe=sk;function LEe(e){if(e===null||_Ee(e)||AEe(e))return 1;if(FEe(e))return 2}var G5=LEe;function DEe(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}var NEe=DEe,sf=ak,jEe=sl,OR=G5,MR=NEe,zEe=F0,Mi=$u,BEe={name:"attention",tokenize:VEe,resolveAll:HEe};function HEe(e,t){for(var n=-1,r,o,i,a,l,s,u,c;++n1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={type:s>1?"strongSequence":"emphasisSequence",start:MR(Mi(e[r][1].end),-s),end:Mi(e[r][1].end)},l={type:s>1?"strongSequence":"emphasisSequence",start:Mi(e[n][1].start),end:MR(Mi(e[n][1].start),s)},i={type:s>1?"strongText":"emphasisText",start:Mi(e[r][1].end),end:Mi(e[n][1].start)},o={type:s>1?"strong":"emphasis",start:Mi(a.start),end:Mi(l.end)},e[r][1].end=Mi(a.start),e[n][1].start=Mi(l.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=sf(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=sf(u,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=sf(u,zEe(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=sf(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=sf(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,jEe(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n-1?void 0:4)}function sPe(e){e.exit("blockQuote")}var uPe=q5,cPe=ys,dPe=cPe(/[!-/:-@[-`{-~]/),fPe=dPe,pPe=fPe,mPe={name:"characterEscape",tokenize:hPe};function hPe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return pPe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}var gPe=mPe,Ph,vPe=59,K5=yPe;function yPe(e){var t="&"+e+";",n;return Ph=Ph||document.createElement("i"),Ph.innerHTML=t,n=Ph.textContent,n.charCodeAt(n.length-1)===vPe&&e!=="semi"||n===t?!1:n}var bPe=ys,xPe=bPe(/\d/),Q5=xPe,wPe=ys,CPe=wPe(/[\dA-Fa-f]/),SPe=CPe,EPe=K5,TR=wm,PPe=Q5,kPe=SPe;function $Pe(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var IPe=$Pe(EPe),OPe={name:"characterReference",tokenize:MPe};function MPe(e,t,n){var r=this,o=0,i,a;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),s}function s(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=TR,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=kPe,c):(e.enter("characterReferenceValue"),i=7,a=PPe,c(d))}function c(d){var f;return d===59&&o?(f=e.exit("characterReferenceValue"),a===TR&&!IPe.default(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)):a(d)&&o++-1?void 0:4);function E(O){return x.enter("codeFencedFence"),x.enter("codeFencedFenceSequence"),S(O)}function S(O){return O===l?(x.consume(O),C++,S):Cu?n(b):(e.consume(b),h):b===41?c--?(e.consume(b),h):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(b)):b===null||KPe(b)?c?n(b):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(b)):DR(b)?n(b):(e.consume(b),b===92?y:h)}function y(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}var Y5=YPe,NR=Fn,XPe=ll;function ZPe(e,t,n,r,o,i){var a=this,l=0,s;return u;function u(m){return e.enter(r),e.enter(o),e.consume(m),e.exit(o),e.enter(i),c}function c(m){return m===null||m===91||m===93&&!s||m===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs||l>999?n(m):m===93?(e.exit(i),e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):NR(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||NR(m)||l++>999?(e.exit("chunkString"),c(m)):(e.consume(m),s=s||!XPe(m),m===92?f:d)}function f(m){return m===91||m===92||m===93?(e.consume(m),l++,d):d(m)}}var X5=ZPe,JPe=Fn,eke=ll,tke=Bn;function nke(e,t){var n;return r;function r(o){return JPe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):eke(o)?tke(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}var Z5=nke,jR=Fn,rke=Bn;function oke(e,t,n,r,o,i){var a;return l;function l(f){return e.enter(r),e.enter(o),e.consume(f),e.exit(o),a=f===40?41:f,s}function s(f){return f===a?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===a?(e.exit(i),s(a)):f===null?n(f):jR(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),rke(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||jR(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===a||f===92?(e.consume(f),c):c(f)}}var J5=oke,ez=Fn,ike=ul,ake=tk,lke=Y5,ske=X5,uC=Bn,tz=Z5,uke=J5,cke={name:"definition",tokenize:fke},dke={tokenize:pke,partial:!0};function fke(e,t,n){var r=this,o;return i;function i(s){return e.enter("definition"),ske.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(s)}function a(s){return o=ake(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),s===58?(e.enter("definitionMarker"),e.consume(s),e.exit("definitionMarker"),tz(e,lke(e,e.attempt(dke,uC(e,l,"whitespace"),uC(e,l,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(s)}function l(s){return s===null||ez(s)?(e.exit("definition"),r.parser.defined.indexOf(o)<0&&r.parser.defined.push(o),t(s)):n(s)}}function pke(e,t,n){return r;function r(a){return ike(a)?tz(e,o)(a):n(a)}function o(a){return a===34||a===39||a===40?uke(e,uC(e,i,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a):n(a)}function i(a){return a===null||ez(a)?t(a):n(a)}}var mke=cke,hke=Fn,gke={name:"hardBreakEscape",tokenize:vke};function vke(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(i),o}function o(i){return hke(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}var yke=gke,bke=Fn,zR=ul,xke=ll,wke=sl,Cke=Bn,Ske={name:"headingAtx",tokenize:Pke,resolve:Eke};function Eke(e,t){var n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wke(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function Pke(e,t,n){var r=this,o=0;return i;function i(c){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&o++<6?(e.consume(c),a):c===null||zR(c)?(e.exit("atxHeadingSequence"),r.interrupt?t(c):l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||bke(c)?(e.exit("atxHeading"),t(c)):xke(c)?Cke(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||zR(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}var kke=Ske,$ke=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ike=$ke,Oke=["pre","script","style","textarea"],Mke=Oke,cf=A0,BR=wm,Uu=Fn,HR=ul,Wu=ll,kh=T0,Rke=Ike,VR=Mke,Tke=_0,_ke={name:"htmlFlow",tokenize:Lke,resolveTo:Ake,concrete:!0},Fke={tokenize:Dke,partial:!0};function Ake(e){for(var t=e.length;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lke(e,t,n){var r=this,o,i,a,l,s;return u;function u(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),c}function c(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),p):A===63?(e.consume(A),o=3,r.interrupt?t:L):cf(A)?(e.consume(A),a=kh(A),i=!0,h):n(A)}function d(A){return A===45?(e.consume(A),o=2,f):A===91?(e.consume(A),o=5,a="CDATA[",l=0,m):cf(A)?(e.consume(A),o=4,r.interrupt?t:L):n(A)}function f(A){return A===45?(e.consume(A),r.interrupt?t:L):n(A)}function m(A){return A===a.charCodeAt(l++)?(e.consume(A),l===a.length?r.interrupt?t:R:m):n(A)}function p(A){return cf(A)?(e.consume(A),a=kh(A),h):n(A)}function h(A){return A===null||A===47||A===62||HR(A)?A!==47&&i&&VR.indexOf(a.toLowerCase())>-1?(o=1,r.interrupt?t(A):R(A)):Rke.indexOf(a.toLowerCase())>-1?(o=6,A===47?(e.consume(A),y):r.interrupt?t(A):R(A)):(o=7,r.interrupt?n(A):i?g(A):b(A)):A===45||BR(A)?(e.consume(A),a+=kh(A),h):n(A)}function y(A){return A===62?(e.consume(A),r.interrupt?t:R):n(A)}function b(A){return Wu(A)?(e.consume(A),b):M(A)}function g(A){return A===47?(e.consume(A),M):A===58||A===95||cf(A)?(e.consume(A),x):Wu(A)?(e.consume(A),g):M(A)}function x(A){return A===45||A===46||A===58||A===95||BR(A)?(e.consume(A),x):w(A)}function w(A){return A===61?(e.consume(A),P):Wu(A)?(e.consume(A),w):g(A)}function P(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),s=A,C):Wu(A)?(e.consume(A),P):(s=void 0,E(A))}function C(A){return A===s?(e.consume(A),S):A===null||Uu(A)?n(A):(e.consume(A),C)}function E(A){return A===null||A===34||A===39||A===60||A===61||A===62||A===96||HR(A)?w(A):(e.consume(A),E)}function S(A){return A===47||A===62||Wu(A)?g(A):n(A)}function M(A){return A===62?(e.consume(A),O):n(A)}function O(A){return Wu(A)?(e.consume(A),O):A===null||Uu(A)?R(A):n(A)}function R(A){return A===45&&o===2?(e.consume(A),T):A===60&&o===1?(e.consume(A),F):A===62&&o===4?(e.consume(A),z):A===63&&o===3?(e.consume(A),L):A===93&&o===5?(e.consume(A),$):Uu(A)&&(o===6||o===7)?e.check(Fke,z,_)(A):A===null||Uu(A)?_(A):(e.consume(A),R)}function _(A){return e.exit("htmlFlowData"),D(A)}function D(A){return A===null?B(A):Uu(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),D):(e.enter("htmlFlowData"),R(A))}function T(A){return A===45?(e.consume(A),L):R(A)}function F(A){return A===47?(e.consume(A),a="",j):R(A)}function j(A){return A===62&&VR.indexOf(a.toLowerCase())>-1?(e.consume(A),z):cf(A)&&a.length<8?(e.consume(A),a+=kh(A),j):R(A)}function $(A){return A===93?(e.consume(A),L):R(A)}function L(A){return A===62?(e.consume(A),z):R(A)}function z(A){return A===null||Uu(A)?(e.exit("htmlFlowData"),B(A)):(e.consume(A),z)}function B(A){return e.exit("htmlFlow"),t(A)}}function Dke(e,t,n){return r;function r(o){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),e.attempt(Tke,t,n)}}var Nke=_ke,$h=A0,R1=wm,Ca=Fn,T1=ul,Ih=ll,jke=Bn,zke={name:"htmlText",tokenize:Bke};function Bke(e,t,n){var r=this,o,i,a,l;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),c):A===47?(e.consume(A),E):A===63?(e.consume(A),P):$h(A)?(e.consume(A),O):n(A)}function c(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),i="CDATA[",a=0,y):$h(A)?(e.consume(A),w):n(A)}function d(A){return A===45?(e.consume(A),f):n(A)}function f(A){return A===null||A===62?n(A):A===45?(e.consume(A),m):p(A)}function m(A){return A===null||A===62?n(A):p(A)}function p(A){return A===null?n(A):A===45?(e.consume(A),h):Ca(A)?(l=p,L(A)):(e.consume(A),p)}function h(A){return A===45?(e.consume(A),B):p(A)}function y(A){return A===i.charCodeAt(a++)?(e.consume(A),a===i.length?b:y):n(A)}function b(A){return A===null?n(A):A===93?(e.consume(A),g):Ca(A)?(l=b,L(A)):(e.consume(A),b)}function g(A){return A===93?(e.consume(A),x):b(A)}function x(A){return A===62?B(A):A===93?(e.consume(A),x):b(A)}function w(A){return A===null||A===62?B(A):Ca(A)?(l=w,L(A)):(e.consume(A),w)}function P(A){return A===null?n(A):A===63?(e.consume(A),C):Ca(A)?(l=P,L(A)):(e.consume(A),P)}function C(A){return A===62?B(A):P(A)}function E(A){return $h(A)?(e.consume(A),S):n(A)}function S(A){return A===45||R1(A)?(e.consume(A),S):M(A)}function M(A){return Ca(A)?(l=M,L(A)):Ih(A)?(e.consume(A),M):B(A)}function O(A){return A===45||R1(A)?(e.consume(A),O):A===47||A===62||T1(A)?R(A):n(A)}function R(A){return A===47?(e.consume(A),B):A===58||A===95||$h(A)?(e.consume(A),_):Ca(A)?(l=R,L(A)):Ih(A)?(e.consume(A),R):B(A)}function _(A){return A===45||A===46||A===58||A===95||R1(A)?(e.consume(A),_):D(A)}function D(A){return A===61?(e.consume(A),T):Ca(A)?(l=D,L(A)):Ih(A)?(e.consume(A),D):R(A)}function T(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),o=A,F):Ca(A)?(l=T,L(A)):Ih(A)?(e.consume(A),T):(e.consume(A),o=void 0,$)}function F(A){return A===o?(e.consume(A),j):A===null?n(A):Ca(A)?(l=F,L(A)):(e.consume(A),F)}function j(A){return A===62||A===47||T1(A)?R(A):n(A)}function $(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===62||T1(A)?R(A):(e.consume(A),$)}function L(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),jke(e,z,"linePrefix",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function z(A){return e.enter("htmlTextData"),l(A)}function B(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}}var Hke=zke,Vke=ul,Gu=ak,Uke=sl,nz=tk,Wke=F0,qu=$u,Gke=Y5,qke=X5,Kke=J5,_1=Z5,Qke={name:"labelEnd",tokenize:t$e,resolveTo:e$e,resolveAll:Jke},Yke={tokenize:n$e},Xke={tokenize:r$e},Zke={tokenize:o$e};function Jke(e){for(var t=-1,n;++t-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelEnd"),s):n(c)}function s(c){return c===40?e.attempt(Yke,t,a?t:u)(c):c===91?e.attempt(Xke,t,a?e.attempt(Zke,t,u):u)(c):a?t(c):u(c)}function u(c){return i._balanced=!0,n(c)}}function n$e(e,t,n){return r;function r(s){return e.enter("resource"),e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),_1(e,o)}function o(s){return s===41?l(s):Gke(e,i,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(s)}function i(s){return Vke(s)?_1(e,a)(s):l(s)}function a(s){return s===34||s===39||s===40?Kke(e,_1(e,l),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(s):l(s)}function l(s){return s===41?(e.enter("resourceMarker"),e.consume(s),e.exit("resourceMarker"),e.exit("resource"),t):n(s)}}function r$e(e,t,n){var r=this;return o;function o(a){return qke.call(r,e,i,n,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.indexOf(nz(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(a):t(a)}}function o$e(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}var ck=Qke,i$e=ck,a$e={name:"labelStartImage",tokenize:l$e,resolveAll:i$e.resolveAll};function l$e(e,t,n){var r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}var s$e=a$e,u$e=ck,c$e={name:"labelStartLink",tokenize:d$e,resolveAll:u$e.resolveAll};function d$e(e,t,n){var r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var f$e=c$e,p$e=Bn,m$e={name:"lineEnding",tokenize:h$e};function h$e(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),p$e(e,t,"linePrefix")}}var g$e=m$e,v$e=Fn,y$e=ll,b$e=Bn,x$e={name:"thematicBreak",tokenize:w$e};function w$e(e,t,n){var r=0,o;return i;function i(s){return e.enter("thematicBreak"),o=s,a(s)}function a(s){return s===o?(e.enter("thematicBreakSequence"),l(s)):y$e(s)?b$e(e,a,"whitespace")(s):r<3||s!==null&&!v$e(s)?n(s):(e.exit("thematicBreak"),t(s))}function l(s){return s===o?(e.consume(s),r++,l):(e.exit("thematicBreakSequence"),a(s))}}var rz=x$e,UR=Q5,dk=ll,fk=xm,C$e=j5,Mv=Bn,oz=_0,S$e=rz,iz={name:"list",tokenize:k$e,continuation:{tokenize:$$e},exit:O$e},E$e={tokenize:M$e,partial:!0},P$e={tokenize:I$e,partial:!0};function k$e(e,t,n){var r=this,o=fk(r.events,"linePrefix"),i=0;return a;function a(f){var m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:UR(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(S$e,n,s)(f):s(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return UR(f)&&++i<10?(e.consume(f),l):(!r.interrupt||i<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),s(f)):n(f)}function s(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(oz,r.interrupt?n:u,e.attempt(E$e,d,c))}function u(f){return r.containerState.initialBlankLine=!0,o++,d(f)}function c(f){return dk(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):n(f)}function d(f){return r.containerState.size=o+C$e(r.sliceStream(e.exit("listItemPrefix"))),t(f)}}function $$e(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(oz,o,i);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Mv(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!dk(l)?(r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,e.attempt(P$e,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Mv(e,e.attempt(iz,t,n),"linePrefix",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(l)}}function I$e(e,t,n){var r=this;return Mv(e,o,"listItemIndent",r.containerState.size+1);function o(i){return fk(r.events,"listItemIndent")===r.containerState.size?t(i):n(i)}}function O$e(e){e.exit(this.containerState.type)}function M$e(e,t,n){var r=this;return Mv(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4+1);function o(i){return dk(i)||!fk(r.events,"listItemPrefixWhitespace")?n(i):t(i)}}var R$e=iz,T$e=Fn,F1=$u,_$e=Bn,F$e={name:"setextUnderline",tokenize:L$e,resolveTo:A$e};function A$e(e,t){for(var n=e.length,r,o,i,a;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);return a={type:"setextHeading",start:F1(e[o][1].start),end:F1(e[e.length-1][1].end)},e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=F1(e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function L$e(e,t,n){for(var r=this,o=r.events.length,i,a;o--;)if(r.events[o][1].type!=="lineEnding"&&r.events[o][1].type!=="linePrefix"&&r.events[o][1].type!=="content"){a=r.events[o][1].type==="paragraph";break}return l;function l(c){return!r.lazy&&(r.interrupt||a)?(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=c,s(c)):n(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),_$e(e,u,"lineSuffix")(c))}function u(c){return c===null||T$e(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var D$e=F$e;Object.defineProperty(da,"__esModule",{value:!0});var N$e=Md,cC=UEe,j$e=rPe,z$e=uPe,az=gPe,lz=RPe,WR=LPe,A1=HPe,B$e=qPe,H$e=mke,V$e=yke,U$e=kke,W$e=Nke,G$e=Hke,q$e=ck,K$e=s$e,Q$e=f$e,L1=g$e,Zr=R$e,GR=D$e,D1=rz,Y$e={42:Zr,43:Zr,45:Zr,48:Zr,49:Zr,50:Zr,51:Zr,52:Zr,53:Zr,54:Zr,55:Zr,56:Zr,57:Zr,62:z$e},X$e={91:H$e},Z$e={"-2":A1,"-1":A1,32:A1},J$e={35:U$e,42:D1,45:[GR,D1],60:W$e,61:GR,95:D1,96:WR,126:WR},eIe={38:lz,92:az},tIe={"-5":L1,"-4":L1,"-3":L1,33:K$e,38:lz,42:cC,60:[j$e,G$e],91:Q$e,92:[V$e,az],93:q$e,95:cC,96:B$e},nIe={null:[cC,N$e.resolver]},rIe={null:[]};da.contentInitial=X$e;da.disable=rIe;da.document=Y$e;da.flow=J$e;da.flowInitial=Z$e;da.insideSpan=nIe;da.string=eIe;da.text=tIe;var oIe=nk,iIe=rk,aIe=ok,qR=Md,lIe=W5,sIe=CEe,uIe=ik,cIe=da;function dIe(e){var t=e||{},n={defined:[],constructs:lIe([cIe].concat(uIe(t.extensions))),content:r(oIe),document:r(iIe),flow:r(aIe),string:r(qR.string),text:r(qR.text)};return n;function r(o){return i;function i(a){return sIe(n,o,a)}}}var fIe=dIe,KR=/[\0\t\n\r]/g;function pIe(){var e=!0,t=1,n="",r;return o;function o(i,a,l){var s=[],u,c,d,f,m;for(i=n+i.toString(a),d=0,n="",e&&(i.charCodeAt(0)===65279&&d++,e=void 0);d-1&&(D.call(this,X),T.call(this,X))}function j(){a("atHardBreak",!0)}function $(){var X=this.resume();this.stack[this.stack.length-1].value=X}function L(){var X=this.resume();this.stack[this.stack.length-1].value=X}function z(){var X=this.resume();this.stack[this.stack.length-1].value=X}function B(){var X=this.stack[this.stack.length-1];l("inReference")?(X.type+="Reference",X.referenceType=l("referenceType")||"shortcut",delete X.url,delete X.title):(delete X.identifier,delete X.label,delete X.referenceType),a("referenceType")}function A(){var X=this.stack[this.stack.length-1];l("inReference")?(X.type+="Reference",X.referenceType=l("referenceType")||"shortcut",delete X.url,delete X.title):(delete X.identifier,delete X.label,delete X.referenceType),a("referenceType")}function H(X){this.stack[this.stack.length-2].identifier=N1(this.sliceSerialize(X)).toLowerCase()}function q(){var X=this.stack[this.stack.length-1],Ee=this.resume();this.stack[this.stack.length-1].label=Ee,a("inReference",!0),this.stack[this.stack.length-1].type==="link"?this.stack[this.stack.length-1].children=X.children:this.stack[this.stack.length-1].alt=Ee}function U(){var X=this.resume();this.stack[this.stack.length-1].url=X}function G(){var X=this.resume();this.stack[this.stack.length-1].title=X}function Y(){a("inReference")}function re(){a("referenceType","collapsed")}function le(X){var Ee=this.resume();this.stack[this.stack.length-1].label=Ee,this.stack[this.stack.length-1].identifier=N1(this.sliceSerialize(X)).toLowerCase(),a("referenceType","full")}function J(X){a("characterReferenceType",X.type)}function oe(X){var Ee=this.sliceSerialize(X),De=l("characterReferenceType"),Te,Pe;De?(Te=wIe(Ee,De==="characterReferenceMarkerNumeric"?10:16),a("characterReferenceType")):Te=PIe(Ee),Pe=this.stack.pop(),Pe.value+=Te,Pe.position.end=s(X.end)}function ce(X){T.call(this,X),this.stack[this.stack.length-1].url=this.sliceSerialize(X)}function ve(X){T.call(this,X),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(X)}function me(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ye(){return{type:"emphasis",children:[]}}function V(){return{type:"heading",depth:void 0,children:[]}}function Q(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function K(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function ee(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function Ce(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function $e(){return{type:"thematicBreak"}}}function IIe(e,t){for(var n=-1;++n":""))+")"),f;function f(){var m=u.concat(l),p=[],h,y;if((!t||i(l,s,u[u.length-1]||null))&&(p=VIe(n(l,u)),p[0]===dC))return p;if(l.children&&p[0]!==pz)for(y=(r?l.children.length:-1)+o;y>-1&&y-1?d=a:d=l.unknownHandler,(typeof d=="function"?d:r)(l,s,u)}function i(l){var s=l.data||{};return n.call(s,"hName")||n.call(s,"hProperties")||n.call(s,"hChildren")?!1:"value"in l}function a(l,s){var u;return s.children?(u=Object.assign({},s),u.children=t(l,s),u):s}return z1}var wz=eOe;function eOe(e,t){return e(t,"hr")}var Cm=tOe,B1=ei;function tOe(e,t){var n=[],r=-1,o=e.length;for(t&&n.push(B1("text",` `));++r0&&n.push(B1("text",` `)),n}var Cz=oOe,nOe=Cm,rOe=Kr();function oOe(e,t){var n={},r=t.ordered?"ol":"ul",o,i=-1,a;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start),o=rOe(e,t),a=o.length;++i"u"&&(n=!0),l=DOe(t),r=0,o=e.length;r=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1=56320&&a<=57343)){s+=encodeURIComponent(e[r]+e[r+1]),r++;continue}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[r])}return s}j0.defaultChars=";/?:@&=+$,-_.!~*'()#";j0.componentChars="-_.!~*'()";var z0=j0,Ez=jOe,H1=ei,NOe=Kr();function jOe(e,t){var n=t.referenceType,r="]",o,i,a;return n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference"?H1("text","!["+t.alt+r):(o=NOe(e,t),i=o[0],i&&i.type==="text"?i.value="["+i.value:o.unshift(H1("text","[")),a=o[o.length-1],a&&a.type==="text"?a.value+=r:o.push(H1("text",r)),o)}var zOe=VOe,BOe=z0,HOe=Ez;function VOe(e,t){var n=e.definition(t.identifier),r;return n?(r={src:BOe(n.url||""),alt:t.alt},n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)):HOe(e,t)}var UOe=z0,WOe=GOe;function GOe(e,t){var n={src:UOe(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}var qOe=QOe,KOe=ei;function QOe(e,t){var n=t.value.replace(/\r?\n|\r/g," ");return e(t,"code",[KOe("text",n)])}var YOe=eMe,XOe=z0,ZOe=Ez,JOe=Kr();function eMe(e,t){var n=e.definition(t.identifier),r;return n?(r={href:XOe(n.url||"")},n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,JOe(e,t))):ZOe(e,t)}var tMe=z0,nMe=Kr(),rMe=oMe;function oMe(e,t){var n={href:tMe(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,nMe(e,t))}var iMe=lMe,V1=ei,aMe=Kr();function lMe(e,t,n){var r=aMe(e,t),o=r[0],i=n?sMe(n):Pz(t),a={},l=[],s,u,c;for(typeof t.checked=="boolean"&&((!o||o.tagName!=="p")&&(o=e(null,"p",[]),r.unshift(o)),o.children.length>0&&o.children.unshift(V1("text"," ")),o.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),a.className=["task-list-item"]),s=r.length,u=-1;++u1}var uMe=dMe,cMe=Kr();function dMe(e,t){return e(t,"p",cMe(e,t))}var fMe=gMe,pMe=ei,mMe=Cm,hMe=Kr();function gMe(e,t){return e.augment(t,pMe("root",mMe(hMe(e,t))))}var vMe=bMe,yMe=Kr();function bMe(e,t){return e(t,"strong",yMe(e,t))}var xMe=CMe,ZR=gz,Mh=Cm,wMe=Kr();function CMe(e,t){for(var n=t.children,r=n.length,o=t.align||[],i=o.length,a=[],l,s,u,c,d;r--;){for(s=n[r].children,c=r===0?"th":"td",l=i||s.length,u=[];l--;)d=s[l],u[l]=e(d,c,{align:o[l]},d?wMe(e,d):[]);a[r]=e(n[r],"tr",Mh(u,!0))}return e(t,"table",Mh([e(a[0].position,"thead",Mh([a[0]],!0))].concat(a[1]?e({start:ZR.start(a[1]),end:ZR.end(a[a.length-1])},"tbody",Mh(a.slice(1),!0)):[]),!0))}var SMe=PMe,EMe=ei;function PMe(e,t){return e.augment(t,EMe("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}var kMe={blockquote:cOe,break:mOe,code:vOe,delete:xOe,emphasis:SOe,footnoteReference:Sz,footnote:IOe,heading:ROe,html:FOe,imageReference:zOe,image:WOe,inlineCode:qOe,linkReference:YOe,link:rMe,listItem:iMe,list:Cz,paragraph:uMe,root:fMe,strong:vMe,table:xMe,text:SMe,thematicBreak:wz,toml:Rh,yaml:Rh,definition:Rh,footnoteDefinition:Rh};function Rh(){return null}var $Me=DMe,IMe=ei,OMe=pk,JR=gz,MMe=qIe,RMe=YIe,TMe=xz(),_Me=iOe,FMe=kMe,AMe={}.hasOwnProperty,eT=!1;function LMe(e,t){var n=t||{};n.allowDangerousHTML!==void 0&&!eT&&(eT=!0,console.warn("mdast-util-to-hast: deprecation: `allowDangerousHTML` is nonstandard, use `allowDangerousHtml` instead"));var r=n.allowDangerousHtml||n.allowDangerousHTML,o={};return a.dangerous=r,a.definition=RMe(e),a.footnoteById=o,a.footnoteOrder=[],a.augment=i,a.handlers=Object.assign({},FMe,n.handlers),a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,OMe(e,"footnoteDefinition",l),a;function i(s,u){var c,d;return s&&s.data&&(c=s.data,c.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=c.hName),u.type==="element"&&c.hProperties&&(u.properties=Object.assign({},u.properties,c.hProperties)),u.children&&c.hChildren&&(u.children=c.hChildren)),d=s&&s.position?s:{position:s},MMe(d)||(u.position={start:JR.start(d),end:JR.end(d)}),u}function a(s,u,c,d){return d==null&&typeof c=="object"&&"length"in c&&(d=c,c={}),i(s,{type:"element",tagName:u,properties:c||{},children:d||[]})}function l(s){var u=String(s.identifier).toUpperCase();AMe.call(o,u)||(o[u]=s)}}function DMe(e,t){var n=LMe(e,t),r=TMe(n,e),o=_Me(n);return o&&(r.children=r.children.concat(IMe("text",` `),o)),r}var NMe=$Me,kz=NMe,jMe=zMe;function zMe(e,t){return e&&!e.process&&(t=e,e=null),e?BMe(e,t):HMe(t)}function BMe(e,t){return n;function n(r,o,i){e.run(kz(r,t),o,a);function a(l){i(l)}}}function HMe(e){return t;function t(n){return kz(n,e)}}var VMe=WMe,UMe=Object.prototype.hasOwnProperty;function WMe(){for(var e={},t=0;t{C2e(n,"element",t)};function t(n,r,o){const i=n,a=o;let l;if(e.allowedElements?l=!e.allowedElements.includes(i.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(i.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(i,r,a)),l&&typeof r=="number")return e.unwrapDisallowed&&i.children?a.children.splice(r,1,...i.children):a.children.splice(r,1),r}}const iT=["http","https","mailto","tel"];var P2e=k2e;function k2e(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let o=-1;for(;++oo||(o=t.indexOf("#"),o!==-1&&r>o)?t:"javascript:void(0)"}var yk={},Hz={exports:{}},Ht={};/** @license React v17.0.2 * 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 B0=60103,H0=60106,Sm=60107,Em=60108,Pm=60114,km=60109,$m=60110,Im=60112,Om=60113,bk=60120,Mm=60115,Rm=60116,Vz=60121,Uz=60122,Wz=60117,Gz=60129,qz=60131;if(typeof Symbol=="function"&&Symbol.for){var Qn=Symbol.for;B0=Qn("react.element"),H0=Qn("react.portal"),Sm=Qn("react.fragment"),Em=Qn("react.strict_mode"),Pm=Qn("react.profiler"),km=Qn("react.provider"),$m=Qn("react.context"),Im=Qn("react.forward_ref"),Om=Qn("react.suspense"),bk=Qn("react.suspense_list"),Mm=Qn("react.memo"),Rm=Qn("react.lazy"),Vz=Qn("react.block"),Uz=Qn("react.server.block"),Wz=Qn("react.fundamental"),Gz=Qn("react.debug_trace_mode"),qz=Qn("react.legacy_hidden")}function Ei(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case B0:switch(e=e.type,e){case Sm:case Pm:case Em:case Om:case bk:return e;default:switch(e=e&&e.$$typeof,e){case $m:case Im:case Rm:case Mm:case km:return e;default:return t}}case H0:return t}}}var $2e=km,I2e=B0,O2e=Im,M2e=Sm,R2e=Rm,T2e=Mm,_2e=H0,F2e=Pm,A2e=Em,L2e=Om;Ht.ContextConsumer=$m;Ht.ContextProvider=$2e;Ht.Element=I2e;Ht.ForwardRef=O2e;Ht.Fragment=M2e;Ht.Lazy=R2e;Ht.Memo=T2e;Ht.Portal=_2e;Ht.Profiler=F2e;Ht.StrictMode=A2e;Ht.Suspense=L2e;Ht.isAsyncMode=function(){return!1};Ht.isConcurrentMode=function(){return!1};Ht.isContextConsumer=function(e){return Ei(e)===$m};Ht.isContextProvider=function(e){return Ei(e)===km};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===B0};Ht.isForwardRef=function(e){return Ei(e)===Im};Ht.isFragment=function(e){return Ei(e)===Sm};Ht.isLazy=function(e){return Ei(e)===Rm};Ht.isMemo=function(e){return Ei(e)===Mm};Ht.isPortal=function(e){return Ei(e)===H0};Ht.isProfiler=function(e){return Ei(e)===Pm};Ht.isStrictMode=function(e){return Ei(e)===Em};Ht.isSuspense=function(e){return Ei(e)===Om};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Sm||e===Pm||e===Gz||e===Em||e===Om||e===bk||e===qz||typeof e=="object"&&e!==null&&(e.$$typeof===Rm||e.$$typeof===Mm||e.$$typeof===km||e.$$typeof===$m||e.$$typeof===Im||e.$$typeof===Wz||e.$$typeof===Vz||e[0]===Uz)};Ht.typeOf=Ei;Hz.exports=Ht;var D2e=Hz.exports,Tm=Si,N2e=Rd,j2e=Nz,z2e=Tm.boolean,Ye=Tm.number,aT=Tm.spaceSeparated,U1=Tm.commaSeparated,xo=Tm.commaOrSpaceSeparated,B2e=N2e({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:j2e,properties:{about:xo,accentHeight:Ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ye,amplitude:Ye,arabicForm:null,ascent:Ye,attributeName:null,attributeType:null,azimuth:Ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ye,by:null,calcMode:null,capHeight:Ye,className:aT,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ye,diffuseConstant:Ye,direction:null,display:null,dur:null,divisor:Ye,dominantBaseline:null,download:z2e,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ye,enableBackground:null,end:null,event:null,exponent:Ye,externalResourcesRequired:null,fill:null,fillOpacity:Ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:U1,g2:U1,glyphName:U1,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ye,horizOriginX:Ye,horizOriginY:Ye,id:null,ideographic:Ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ye,k:Ye,k1:Ye,k2:Ye,k3:Ye,k4:Ye,kernelMatrix:xo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ye,overlineThickness:Ye,paintOrder:null,panose1:null,path:null,pathLength:Ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:aT,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ye,pointsAtY:Ye,pointsAtZ:Ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xo,rev:xo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xo,requiredFeatures:xo,requiredFonts:xo,requiredFormats:xo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ye,specularExponent:Ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ye,strikethroughThickness:Ye,string:null,stroke:null,strokeDashArray:xo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ye,strokeOpacity:Ye,strokeWidth:null,style:null,surfaceScale:Ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xo,tabIndex:Ye,tableValues:null,target:null,targetX:Ye,targetY:Ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xo,to:null,transform:null,u1:null,u2:null,underlinePosition:Ye,underlineThickness:Ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ye,values:null,vAlphabetic:Ye,vMathematical:Ye,vectorEffect:null,vHanging:Ye,vIdeographic:Ye,version:null,vertAdvY:Ye,vertOriginX:Ye,vertOriginY:Ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),H2e=Oz,V2e=Lz,U2e=Dz,W2e=zz,G2e=Bz,q2e=B2e,K2e=H2e([U2e,V2e,W2e,G2e,q2e]),Q2e=Mz,Y2e=Fz,X2e=Rz,xk="data",Z2e=tRe,J2e=/^data[-\w.:]+$/i,Kz=/-[a-z]/g,eRe=/[A-Z]/g;function tRe(e,t){var n=Q2e(t),r=t,o=X2e;return n in e.normal?e.property[e.normal[n]]:(n.length>4&&n.slice(0,4)===xk&&J2e.test(t)&&(t.charAt(4)==="-"?r=nRe(t):t=rRe(t),o=Y2e),new o(r,t))}function nRe(e){var t=e.slice(5).replace(Kz,iRe);return xk+t.charAt(0).toUpperCase()+t.slice(1)}function rRe(e){var t=e.slice(4);return Kz.test(t)?e:(t=t.replace(eRe,oRe),t.charAt(0)!=="-"&&(t="-"+t),xk+t)}function oRe(e){return"-"+e.toLowerCase()}function iRe(e){return e.charAt(1).toUpperCase()}const aRe="classID",lRe="datatype",sRe="itemID",uRe="strokeDasharray",cRe="strokeDashoffset",dRe="strokeLinecap",fRe="strokeLinejoin",pRe="strokeMiterlimit",mRe="typeof",hRe="xlinkActuate",gRe="xlinkArcrole",vRe="xlinkHref",yRe="xlinkRole",bRe="xlinkShow",xRe="xlinkTitle",wRe="xlinkType",CRe="xmlnsXlink",SRe={classId:aRe,dataType:lRe,itemId:sRe,strokeDashArray:uRe,strokeDashOffset:cRe,strokeLineCap:dRe,strokeLineJoin:fRe,strokeMiterLimit:pRe,typeOf:mRe,xLinkActuate:hRe,xLinkArcRole:gRe,xLinkHref:vRe,xLinkRole:yRe,xLinkShow:bRe,xLinkTitle:xRe,xLinkType:wRe,xmlnsXLink:CRe};var wk={};wk.parse=kRe;wk.stringify=$Re;var lT="",ERe=" ",PRe=/[ \t\n\r\f]+/g;function kRe(e){var t=String(e||lT).trim();return t===lT?[]:t.split(PRe)}function $Re(e){return e.join(ERe).trim()}var Ck={};Ck.parse=IRe;Ck.stringify=ORe;var fC=",",sT=" ",wf="";function IRe(e){for(var t=[],n=String(e||wf),r=n.indexOf(fC),o=0,i=!1,a;!i;)r===-1&&(r=n.length,i=!0),a=n.slice(o,r).trim(),(a||!i)&&t.push(a),o=r+1,r=n.indexOf(fC,o);return t}function ORe(e,t){var n=t||{},r=n.padLeft===!1?wf:sT,o=n.padRight?sT:wf;return e[e.length-1]===wf&&(e=e.concat(wf)),e.join(o+fC+r).trim()}var uT=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,MRe=/\n/g,RRe=/^\s*/,TRe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,_Re=/^:\s*/,FRe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ARe=/^[;\s]*/,LRe=/^\s+|\s+$/g,DRe=` `,cT="/",dT="*",_s="",NRe="comment",jRe="declaration",zRe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(p){var h=p.match(MRe);h&&(n+=h.length);var y=p.lastIndexOf(DRe);r=~y?p.length-y:r+p.length}function i(){var p={line:n,column:r};return function(h){return h.position=new a(p),u(),h}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function l(p){var h=new Error(t.source+":"+n+":"+r+": "+p);if(h.reason=p,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function s(p){var h=p.exec(e);if(h){var y=h[0];return o(y),e=e.slice(y.length),h}}function u(){s(RRe)}function c(p){var h;for(p=p||[];h=d();)h!==!1&&p.push(h);return p}function d(){var p=i();if(!(cT!=e.charAt(0)||dT!=e.charAt(1))){for(var h=2;_s!=e.charAt(h)&&(dT!=e.charAt(h)||cT!=e.charAt(h+1));)++h;if(h+=2,_s===e.charAt(h-1))return l("End of comment missing");var y=e.slice(2,h-2);return r+=2,o(y),e=e.slice(h),r+=2,p({type:NRe,comment:y})}}function f(){var p=i(),h=s(TRe);if(h){if(d(),!s(_Re))return l("property missing ':'");var y=s(FRe),b=p({type:jRe,property:fT(h[0].replace(uT,_s)),value:y?fT(y[0].replace(uT,_s)):_s});return s(ARe),b}}function m(){var p=[];c(p);for(var h;h=f();)h!==!1&&(p.push(h),c(p));return p}return u(),m()};function fT(e){return e?e.replace(LRe,_s):_s}var BRe=zRe;function HRe(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=BRe(e),i=typeof t=="function",a,l,s=0,u=o.length;s0?W1.createElement(f,l,c):W1.createElement(f,l)}function XRe(e){let t=-1;for(;++tString(t)).join("")}const q1=v,mT=M5,nTe=VCe,rTe=RIe,oTe=jMe,pt=WD,iTe=w2e,aTe=S2e,Xz=P2e,lTe=yk.hastChildrenToReact;var sTe=V0;const hT={}.hasOwnProperty,uTe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_h={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function V0(e){for(const i in _h)if(hT.call(_h,i)&&hT.call(e,i)){const a=_h[i];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${i}\` (see <${uTe}#${a.id}> for more info)`),delete _h[i]}const t=nTe().use(rTe).use(e.remarkPlugins||e.plugins||[]).use(oTe,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(aTe,e);let n;typeof e.children=="string"?n=mT(e.children):(e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`),n=mT());const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=q1.createElement(q1.Fragment,{},lTe({options:e,schema:iTe,listDepth:0},r));return e.className&&(o=q1.createElement("div",{className:e.className},o)),o}V0.defaultProps={transformLinkUri:Xz};V0.propTypes={children:pt.string,className:pt.string,allowElement:pt.func,allowedElements:pt.arrayOf(pt.string),disallowedElements:pt.arrayOf(pt.string),unwrapDisallowed:pt.bool,remarkPlugins:pt.arrayOf(pt.oneOfType([pt.object,pt.func,pt.arrayOf(pt.oneOfType([pt.object,pt.func]))])),rehypePlugins:pt.arrayOf(pt.oneOfType([pt.object,pt.func,pt.arrayOf(pt.oneOfType([pt.object,pt.func]))])),sourcePos:pt.bool,rawSourcePos:pt.bool,skipHtml:pt.bool,includeElementIndex:pt.bool,transformLinkUri:pt.oneOfType([pt.func,pt.bool]),linkTarget:pt.oneOfType([pt.func,pt.string]),transformImageUri:pt.func,components:pt.object};V0.uriTransformer=Xz;const cTe=ra(sTe);var Zz={},Jz=A0,e3=wm,t3=uk,dTe=Fn,n3=lk,r3=sk,fTe={tokenize:gTe,partial:!0},o3={tokenize:vTe,partial:!0},i3={tokenize:yTe,partial:!0},Fc={tokenize:xTe,partial:!0},a3={tokenize:bTe,partial:!0},l3={tokenize:mTe,previous:c3},s3={tokenize:hTe,previous:Ek},cl={tokenize:pTe,previous:d3},fa={};Zz.text=fa;var ws=48;for(;ws<123;)fa[ws]=cl,ws++,ws===58?ws=65:ws===91&&(ws=97);fa[43]=cl;fa[45]=cl;fa[46]=cl;fa[95]=cl;fa[72]=[cl,s3];fa[104]=[cl,s3];fa[87]=[cl,l3];fa[119]=[cl,l3];function pTe(e,t,n){var r=this,o;return i;function i(f){return!gT(f)||!d3(r.previous)||Pk(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(f))}function a(f){return gT(f)?(e.consume(f),a):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(Fc,d,s)(f):f===45||f===95?e.check(Fc,n,u)(f):e3(f)?(e.consume(f),l):d(f)}function s(f){return e.consume(f),o=!0,l}function u(f){return e.consume(f),c}function c(f){return f===46?e.check(Fc,n,s)(f):l(f)}function d(f){return o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function mTe(e,t,n){var r=this;return o;function o(a){return a!==87&&a-32!==87||!c3(r.previous)||Pk(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fTe,e.attempt(o3,e.attempt(i3,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function hTe(e,t,n){var r=this;return o;function o(p){return p!==72&&p-32!==72||!Ek(r.previous)||Pk(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(p),i)}function i(p){return p===84||p-32===84?(e.consume(p),a):n(p)}function a(p){return p===84||p-32===84?(e.consume(p),l):n(p)}function l(p){return p===80||p-32===80?(e.consume(p),s):n(p)}function s(p){return p===83||p-32===83?(e.consume(p),u):u(p)}function u(p){return p===58?(e.consume(p),c):n(p)}function c(p){return p===47?(e.consume(p),d):n(p)}function d(p){return p===47?(e.consume(p),f):n(p)}function f(p){return t3(p)||r3(p)||n3(p)?n(p):e.attempt(o3,e.attempt(i3,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function gTe(e,t,n){return r;function r(s){return e.consume(s),o}function o(s){return s===87||s-32===87?(e.consume(s),i):n(s)}function i(s){return s===87||s-32===87?(e.consume(s),a):n(s)}function a(s){return s===46?(e.consume(s),l):n(s)}function l(s){return s===null||dTe(s)?n(s):t(s)}}function vTe(e,t,n){var r,o;return i;function i(s){return s===38?e.check(a3,l,a)(s):s===46||s===95?e.check(Fc,l,a)(s):t3(s)||r3(s)||s!==45&&n3(s)?l(s):(e.consume(s),i)}function a(s){return s===46?(o=r,r=void 0,e.consume(s),i):(s===95&&(r=!0),e.consume(s),i)}function l(s){return!o&&!r?t(s):n(s)}}function yTe(e,t){var n=0;return r;function r(a){return a===38?e.check(a3,t,o)(a):(a===40&&n++,a===41?e.check(Fc,i,o)(a):Sk(a)?t(a):u3(a)?e.check(Fc,t,o)(a):(e.consume(a),r))}function o(a){return e.consume(a),r}function i(a){return n--,n<0?t(a):o(a)}}function bTe(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Jz(a)?(e.consume(a),o):a===59?(e.consume(a),i):n(a)}function i(a){return Sk(a)?t(a):n(a)}}function xTe(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return u3(i)?(e.consume(i),o):Sk(i)?t(i):n(i)}}function u3(e){return e===33||e===34||e===39||e===41||e===42||e===44||e===46||e===58||e===59||e===60||e===63||e===95||e===126}function Sk(e){return e===null||e<0||e===32||e===60}function gT(e){return e===43||e===45||e===46||e===95||e3(e)}function c3(e){return e===null||e<0||e===32||e===40||e===42||e===95||e===126}function Ek(e){return e===null||!Jz(e)}function d3(e){return e!==47&&Ek(e)}function Pk(e){for(var t=e.length;t--;)if((e[t][1].type==="labelLink"||e[t][1].type==="labelImage")&&!e[t][1]._balanced)return!0}var wTe=Zz,CTe=ETe,vT=G5,K1=sl,STe=F0,Fh=$u;function ETe(e){var t=e||{},n=t.singleTilde,r={tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:r}};function o(l,s){for(var u=-1,c,d,f,m;++u1?u(h):(l.consume(h),f++,p):f<2&&!n?u(h):(b=l.exit("strikethroughSequenceTemporary"),g=vT(h),b._open=!g||g===2&&y,b._close=!y||y===2&&g,s(h))}}}var f3={};f3.flow={null:{tokenize:$Te,resolve:kTe,interruptible:!0}};var Q1=Bn,PTe={tokenize:ITe,partial:!0},yT={tokenize:OTe,partial:!0};function kTe(e,t){for(var n=e.length,r=-1,o,i,a,l,s,u,c,d,f,m;++r{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},QTe=e_e,YTe=dz,XTe=uz,ZTe=KTe,JTe=[].splice;function e_e(e,t,n,r){var o,i;return typeof t=="string"||t&&typeof t.exec=="function"?i=[[t,n]]:(i=t,r=n),o=r||{},bT(e,o,a(t_e(i))),e;function a(l){var s=l[0];return u;function u(c,d){var f=s[0],m=s[1],p=[],h=0,y=d.children.indexOf(c),b,g,x,w;for(f.lastIndex=0,g=f.exec(c.value);g&&(b=g.index,w=m.apply(null,[].concat(g,{index:g.index,input:g.input})),w!==!1&&(h!==b&&p.push({type:"text",value:c.value.slice(h,b)}),typeof w=="string"&&w.length>0&&(w={type:"text",value:w}),w&&(p=[].concat(p,w)),h=b+g[0].length),!!f.global);)g=f.exec(c.value);if(b===void 0?(p=[c],y--):(h1)for(x=a(l.slice(1)),b=-1;++b?\]}]+$/.exec(e),n,r,o;if(t)for(e=e.slice(0,t.index),t=t[0],n=t.indexOf(")"),r=CT(e,"("),o=CT(e,")");n!==-1&&r>o;)e+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),o++;return[e,t]}function m3(e,t){var n=e.input.charCodeAt(e.index-1);return(n!==n||o_e(n)||r_e(n))&&(!t||n!==47)}var W0={};W0.canContainEols=["delete"];W0.enter={strikethrough:h_e};W0.exit={strikethrough:g_e};function h_e(e){this.enter({type:"delete",children:[]},e)}function g_e(e){this.exit(e)}var kk={};kk.enter={table:v_e,tableData:ST,tableHeader:ST,tableRow:b_e};kk.exit={codeText:x_e,table:y_e,tableData:X1,tableHeader:X1,tableRow:X1};function v_e(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)}function y_e(e){this.exit(e),this.setData("inTable")}function b_e(e){this.enter({type:"tableRow",children:[]},e)}function X1(e){this.exit(e)}function ST(e){this.enter({type:"tableCell",children:[]},e)}function x_e(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,w_e)),this.stack[this.stack.length-1].value=t,this.exit(e)}function w_e(e,t){return t==="|"?t:e}var h3={};h3.exit={taskListCheckValueChecked:ET,taskListCheckValueUnchecked:ET,paragraph:C_e};function ET(e){this.stack[this.stack.length-2].checked=e.type==="taskListCheckValueChecked"}function C_e(e){var t=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],r=t.children,o=n.children[0],i=-1,a;if(t&&t.type==="listItem"&&typeof t.checked=="boolean"&&o&&o.type==="text"){for(;++i0&&(a==="\r"||a===` `)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" "),o.push(t.handle(u,e,t,{before:a,after:l})),a=o[o.length-1].slice(-1);return o.join("")}var T_e=v3;$k.unsafe=[{character:"~",inConstruct:"phrasing"}];$k.handlers={delete:y3};y3.peek=__e;function y3(e,t,n){var r=n.enter("emphasis"),o=T_e(e,n,{before:"~",after:"~"});return r(),"~~"+o+"~~"}function __e(){return"~"}var F_e=A_e;function A_e(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}var L_e=b3;b3.peek=N_e;var D_e=F_e;function b3(e,t,n){for(var r=e.value||"",o="`",i=-1,a,l,s,u;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/[ \r\n`]/.test(r.charAt(0))||/[ \r\n`]/.test(r.charAt(r.length-1)))&&(r=" "+r+" ");++i * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */var Sa="",ex,Ik=j_e;function j_e(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var n=e.length*t;if(ex!==e||typeof ex>"u")ex=e,Sa="";else if(Sa.length>=n)return Sa.substr(0,n);for(;n>Sa.length&&t>1;)t&1&&(Sa+=e),t>>=1,e+=e;return Sa+=e,Sa=Sa.substr(0,n),Sa}var Ku=Ik,z_e=q_e,B_e=/ +$/,Cs=" ",H_e=` `,V_e="-",Ah=":",PT="|",kT=0,U_e=67,W_e=76,G_e=82,Rv=99,mC=108,Tv=114;function q_e(e,t){for(var n=t||{},r=n.padding!==!1,o=n.delimiterStart!==!1,i=n.delimiterEnd!==!1,a=(n.align||[]).concat(),l=n.alignDelimiters!==!1,s=[],u=n.stringLength||Q_e,c=-1,d=e.length,f=[],m=[],p=[],h=[],y=[],b=0,g,x,w,P,C,E,S,M,O,R,_;++cb&&(b=w);++xP)&&(y[x]=C)),p.push(E);f[c]=p,m[c]=h}if(x=-1,w=b,typeof a=="object"&&"length"in a)for(;++xy[x]&&(y[x]=C),h[x]=C),p[x]=E;for(f.splice(1,0,p),m.splice(1,0,h),c=-1,d=f.length,S=[];++c `}return` `}}var sFe=cFe,uFe=/\r?\n|\r/g;function cFe(e,t){for(var n=[],r=0,o=0,i;i=uFe.exec(e);)a(e.slice(r,i.index)),n.push(i[0]),r=i.index+i[0].length,o++;return a(e.slice(r)),n.join("");function a(l){n.push(t(l,o,!l))}}var dFe=gFe,IT=Ik,fFe=tFe,pFe=rFe,mFe=iFe,hFe=sFe;function gFe(e,t,n){var r=fFe(n),o=pFe(n),i,a,l;return t&&t.ordered&&(r=(t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+"."),i=r.length+1,(o==="tab"||o==="mixed"&&(t&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4),l=n.enter("listItem"),a=hFe(mFe(e,n),s),l(),a;function s(u,c,d){return c?(d?"":IT(" ",i))+u:(d?r:r+IT(" ",i-r.length))+u}}var vFe=dFe;Ok.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}];Ok.handlers={listItem:yFe};function yFe(e,t,n){var r=vFe(e,t,n),o=e.children[0];return typeof e.checked=="boolean"&&o&&o.type==="paragraph"&&(r=r.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,i)),r;function i(a){return a+"["+(e.checked?"x":" ")+"] "}}var bFe=x3;function x3(e,t){var n=-1,r;if(t.extensions)for(;++nI({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":I({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":I({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:uM(e.palette.grey[200],.12)}:{backgroundColor:uM(e.palette.grey[600],.12)})})),LFe=de(_Fe)({width:24,height:16});function DFe(e){const{slots:t={},slotProps:n={}}=e,r=ue(e,FFe),o=e;return N.jsx("li",{children:N.jsx(AFe,I({focusRipple:!0},r,{ownerState:o,children:N.jsx(LFe,I({as:t.CollapsedIcon,ownerState:o},n.collapsedIcon))}))})}function NFe(e){return Be("MuiBreadcrumbs",e)}const jFe=He("MuiBreadcrumbs",["root","ol","li","separator"]),zFe=jFe,BFe=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],HFe=e=>{const{classes:t}=e;return Ie({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},NFe,t)},VFe=de(Xe,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${zFe.li}`]:t.li},t.root]})({}),UFe=de("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),WFe=de("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function GFe(e,t,n,r){return e.reduce((o,i,a)=>(a{const S=()=>{y(!0);const M=w.current.querySelector("a[href],button,[tabindex]");M&&M.focus()};return d+c>=E.length?E:[...E.slice(0,d),N.jsx(DFe,{"aria-label":u,slots:{CollapsedIcon:l.CollapsedIcon},slotProps:{collapsedIcon:x},onClick:S},"ellipsis"),...E.slice(E.length-c,E.length)]},C=v.Children.toArray(o).filter(E=>v.isValidElement(E)).map((E,S)=>N.jsx("li",{className:g.li,children:E},`child-${S}`));return N.jsx(VFe,I({ref:n,component:a,color:"text.secondary",className:he(g.root,i),ownerState:b},p,{children:N.jsx(UFe,{className:g.ol,ref:w,ownerState:b,children:GFe(h||f&&C.length<=f?C:P(C),g.separator,m,b)})}))}),KFe=qFe;var Mk={},QFe=wt;Object.defineProperty(Mk,"__esModule",{value:!0});var w3=Mk.default=void 0,YFe=QFe($t()),XFe=N;w3=Mk.default=(0,YFe.default)((0,XFe.jsx)("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"}),"HomeOutlined");var Rk={},ZFe=wt;Object.defineProperty(Rk,"__esModule",{value:!0});var C3=Rk.default=void 0,JFe=ZFe($t()),eAe=N;C3=Rk.default=(0,JFe.default)((0,eAe.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"}),"MoreHorizOutlined");var Tk={},tAe=wt;Object.defineProperty(Tk,"__esModule",{value:!0});var S3=Tk.default=void 0,nAe=tAe($t()),rAe=N;S3=Tk.default=(0,nAe.default)((0,rAe.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-8m0 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-4z"}),"SyncOutlined");var _k={},oAe=wt;Object.defineProperty(_k,"__esModule",{value:!0});var E3=_k.default=void 0,iAe=oAe($t()),aAe=N;E3=_k.default=(0,iAe.default)((0,aAe.jsx)("path",{d:"M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z"}),"TaskAltOutlined");var Fk={},lAe=wt;Object.defineProperty(Fk,"__esModule",{value:!0});var P3=Fk.default=void 0,sAe=lAe($t()),uAe=N;P3=Fk.default=(0,sAe.default)((0,uAe.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutlineOutlined");var Ak={},cAe=wt;Object.defineProperty(Ak,"__esModule",{value:!0});var k3=Ak.default=void 0,dAe=cAe($t()),fAe=N;k3=Ak.default=(0,dAe.default)((0,fAe.jsx)("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"UndoOutlined");var pAe=Object.defineProperty,Oe=(e,t)=>pAe(e,"name",{value:t,configurable:!0}),mAe=Oe(({Title:e,render:t,meta:n})=>{let[r,o]=v.useState(!1),[i,a]=v.useState(!1),l=Oe(()=>r?64:200,"drawerWidth"),s=Qe(),u=st(),c=Gn(),{Link:d}=Bt(),f=u==="legacy"?d:c,{hasDashboard:m}=dn(),p=Qe(),{warnWhen:h,setWarnWhen:y}=tl(),{menuItems:b,selectedKey:g,defaultOpenKeys:x}=tE({meta:n}),w=ly(),P=GS(),C=zt(),{mutate:E}=Kc({v3LegacyAuthProviderCompatible:!!(C!=null&&C.isLegacy)}),[S,M]=v.useState({});k.useEffect(()=>{M(L=>{let z=Object.keys(L).filter(A=>L[A]),B=new Set([...z,...x]);return Object.fromEntries(Array.from(B.values()).map(A=>[A,!0]))})},[x]);let O=e??P??gAe,R=Oe(L=>{M({...S,[L]:!S[L]})},"handleClick"),_=Oe((L,z)=>L.map(B=>{let{icon:A,label:H,route:q,name:U,children:G,parentName:Y,meta:re,options:le}=B,J=S[B.key||""]||!1,oe=B.key===z,ce=Ae(re==null?void 0:re.parent,le==null?void 0:le.parent,Y)!==void 0;return G.length>0?k.createElement(Da,{key:B.key,resource:U.toLowerCase(),action:"list",params:{resource:B}},k.createElement("div",{key:B.key},k.createElement(kr,{title:H??U,placement:"right",disableHoverListener:!r,arrow:!0},k.createElement(Lo,{onClick:()=>{r?(o(!1),J||R(B.key||"")):R(B.key||"")},sx:{pl:ce?4:2,justifyContent:"center","&.Mui-selected":{"&:hover":{backgroundColor:"transparent"},backgroundColor:"transparent"}}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:36,color:"secondary.contrastText"}},A??k.createElement(Qa,null)),k.createElement(Rn,{primary:H,primaryTypographyProps:{noWrap:!0,fontSize:"14px",fontWeight:oe?"bold":"normal"}}),!r&&(J?k.createElement(o0,null):k.createElement(i0,null)))),!r&&k.createElement(e0,{in:S[B.key||""],timeout:"auto",unmountOnExit:!0},k.createElement(os,{component:"div",disablePadding:!0},_(G,z))))):k.createElement(Da,{key:B.key,resource:U.toLowerCase(),action:"list",params:{resource:B}},k.createElement(kr,{title:H??U,placement:"right",disableHoverListener:!r,arrow:!0},k.createElement(Lo,{component:f,to:q,selected:oe,onClick:()=>{a(!1)},sx:{pl:ce?4:2,py:ce?1.25:1,"&.Mui-selected":{"&:hover":{backgroundColor:"transparent"},backgroundColor:"transparent"},justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:36,color:"secondary.contrastText"}},A??k.createElement(Qa,null)),k.createElement(Rn,{primary:H,primaryTypographyProps:{noWrap:!0,fontSize:"14px",fontWeight:oe?"bold":"normal"}}))))}),"renderTreeView"),D=m?k.createElement(Da,{resource:"dashboard",action:"list"},k.createElement(kr,{title:p("dashboard.title","Dashboard"),placement:"right",disableHoverListener:!r,arrow:!0},k.createElement(Lo,{component:f,to:"/",selected:g==="/",onClick:()=>{a(!1)},sx:{pl:2,py:1,"&.Mui-selected":{"&:hover":{backgroundColor:"transparent"},backgroundColor:"transparent"},justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:36,color:"secondary.contrastText"}},k.createElement(l0,null)),k.createElement(Rn,{primary:p("dashboard.title","Dashboard"),primaryTypographyProps:{noWrap:!0,fontSize:"14px",fontWeight:g==="/"?"bold":"normal"}})))):null,T=Oe(()=>{h?window.confirm(p("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes."))&&(y(!1),E()):E()},"handleLogout"),F=w&&k.createElement(kr,{title:s("buttons.logout","Logout"),placement:"right",disableHoverListener:!r,arrow:!0},k.createElement(Lo,{key:"logout",onClick:T,sx:{justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:36,color:"secondary.contrastText"}},k.createElement(r0,null)),k.createElement(Rn,{primary:s("buttons.logout","Logout"),primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}))),j=_(b,g),$=k.createElement(os,{disablePadding:!0,sx:{mt:1,color:"secondary.contrastText"}},Oe(()=>t?t({dashboard:D,logout:F,items:j,collapsed:r}):k.createElement(k.Fragment,null,D,j,F),"renderSider")());return k.createElement(k.Fragment,null,k.createElement(Ke,{sx:{width:{xs:l()},display:{xs:"none",md:"block"},transition:"width 0.3s ease"}}),k.createElement(Ke,{component:"nav",sx:{position:"fixed",zIndex:1101,width:{sm:l()},display:"flex"}},k.createElement(Jc,{variant:"temporary",open:i,onClose:()=>a(!1),ModalProps:{keepMounted:!0},sx:{display:{sm:"block",md:"none"},"& .MuiDrawer-paper":{width:256,bgcolor:"secondary.main"}}},k.createElement(Ke,{sx:{height:64,display:"flex",alignItems:"center",justifyContent:"center"}},k.createElement(O,{collapsed:!1})),$),k.createElement(Jc,{variant:"permanent",PaperProps:{elevation:1},sx:{display:{xs:"none",md:"block"},"& .MuiDrawer-paper":{width:l,bgcolor:"secondary.main",overflow:"hidden",transition:"width 200ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"}},open:!0},k.createElement(Ke,{sx:{height:64,display:"flex",alignItems:"center",justifyContent:"center"}},k.createElement(O,{collapsed:r})),k.createElement(Ke,{sx:{flexGrow:1,overflowX:"hidden",overflowY:"auto"}},$),k.createElement(jt,{sx:{background:"rgba(0,0,0,.5)",color:"secondary.contrastText",textAlign:"center",borderRadius:0,borderTop:"1px solid #ffffff1a"},fullWidth:!0,size:"large",onClick:()=>o(L=>!L)},r?k.createElement(E4,null):k.createElement(a0,null))),k.createElement(Ke,{sx:{display:{xs:"block",md:"none"},position:"fixed",top:"64px",left:"0px",borderRadius:"0 6px 6px 0",bgcolor:"secondary.main",zIndex:1199,width:"36px"}},k.createElement(Nn,{sx:{color:"#fff",width:"36px"},onClick:()=>a(L=>!L)},k.createElement(XE,null)))))},"Sider"),hAe=Oe(()=>{let e=zt(),{data:t}=md({v3LegacyAuthProviderCompatible:!!(e!=null&&e.isLegacy)});return t&&(t.name||t.avatar)?k.createElement(s0,{color:"default",position:"sticky",elevation:1},k.createElement(sm,null,k.createElement(dr,{direction:"row",width:"100%",justifyContent:"flex-end",alignItems:"center"},k.createElement(dr,{direction:"row",gap:"16px",alignItems:"center",justifyContent:"center"},k.createElement(Xe,{variant:"subtitle2"},t==null?void 0:t.name),k.createElement(u0,{src:t==null?void 0:t.avatar,alt:t==null?void 0:t.name}))))):null},"Header");Oe(({Sider:e,Header:t,Title:n,Footer:r,OffLayoutArea:o,children:i})=>k.createElement(Ke,{display:"flex",flexDirection:"row"},k.createElement(e??mAe,{Title:n}),k.createElement(Ke,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:"100vh"}},k.createElement(t??hAe,null),k.createElement(Ke,{component:"main",sx:{p:{xs:1,md:2,lg:3},flexGrow:1,bgcolor:a=>a.palette.background.default}},i),r&&k.createElement(r,null)),o&&k.createElement(o,null)),"Layout");var gAe=Oe(({collapsed:e})=>{let t=st(),n=Gn(),{Link:r}=Bt();return k.createElement(jt,{fullWidth:!0,variant:"text",disableRipple:!0},k.createElement(t==="legacy"?r:n,{to:"/"},e?k.createElement("img",{src:"https://refine.ams3.cdn.digitaloceanspaces.com/logo/refine-mini.svg",alt:"Refine",width:"28px",style:{maxHeight:"38px"}}):k.createElement("img",{src:"https://refine.ams3.cdn.digitaloceanspaces.com/logo/refine.svg",alt:"Refine",width:"140px"})))},"Title"),vAe=Oe(({Title:e,render:t,meta:n,isSiderOpen:r,onToggleSiderClick:o})=>{let[i,a]=v.useState(!1),l=Oe(()=>r?240:56,"drawerWidth"),s=Qe(),u=st(),c=Gn(),{Link:d}=Bt(),f=u==="legacy"?d:c,{hasDashboard:m}=dn(),p=Qe(),{menuItems:h,selectedKey:y,defaultOpenKeys:b}=tE({meta:n}),g=ly(),x=GS(),w=zt(),{warnWhen:P,setWarnWhen:C}=tl(),{mutate:E}=Kc({v3LegacyAuthProviderCompatible:!!(w!=null&&w.isLegacy)}),[S,M]=v.useState({});k.useEffect(()=>{M(L=>{let z=Object.keys(L).filter(A=>L[A]),B=new Set([...z,...b]);return Object.fromEntries(Array.from(B.values()).map(A=>[A,!0]))})},[b]);let O=e??x??wAe,R=Oe(L=>{M({...S,[L]:!S[L]})},"handleClick"),_=Oe((L,z)=>L.map(B=>{let{icon:A,label:H,route:q,name:U,children:G,parentName:Y,meta:re,options:le}=B,J=S[B.key||""]||!1,oe=B.key===z,ce=Ae(re==null?void 0:re.parent,le==null?void 0:le.parent,Y)!==void 0;return G.length>0?k.createElement(Da,{key:B.key,resource:U.toLowerCase(),action:"list",params:{resource:B}},k.createElement("div",{key:B.key},k.createElement(kr,{title:H??U,placement:"right",disableHoverListener:r,arrow:!0},k.createElement(Lo,{onClick:()=>{r?R(B.key||""):(o==null||o(!0),J||R(B.key||""))},sx:{pl:ce?4:2,justifyContent:"center",marginTop:"8px"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:r?"12px":"0px",color:"currentColor"}},A??k.createElement(Qa,null)),k.createElement(Rn,{primary:H,primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}),J?k.createElement(o0,{sx:{color:"text.icon"}}):k.createElement(i0,{sx:{color:"text.icon"}}))),r&&k.createElement(e0,{in:S[B.key||""],timeout:"auto",unmountOnExit:!0},k.createElement(os,{component:"div",disablePadding:!0},_(G,z))))):k.createElement(Da,{key:B.key,resource:U.toLowerCase(),action:"list",params:{resource:B}},k.createElement(kr,{title:H??U,placement:"right",disableHoverListener:r,arrow:!0},k.createElement(Lo,{component:f,to:q,selected:oe,onClick:()=>{a(!1)},sx:{pl:ce?4:2,py:ce?1.25:1,justifyContent:"center",color:oe?"primary.main":"text.primary"}},k.createElement(vn,{sx:{justifyContent:"center",transition:"margin-right 0.3s",marginRight:r?"12px":"0px",minWidth:"24px",color:"currentColor"}},A??k.createElement(Qa,null)),k.createElement(Rn,{primary:H,primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}))))}),"renderTreeView"),D=m?k.createElement(Da,{resource:"dashboard",action:"list"},k.createElement(kr,{title:p("dashboard.title","Dashboard"),placement:"right",disableHoverListener:r,arrow:!0},k.createElement(Lo,{component:f,to:"/",selected:y==="/",onClick:()=>{a(!1)},sx:{pl:2,py:1,justifyContent:"center",color:y==="/"?"primary.main":"text.primary"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:r?"12px":"0px",color:"currentColor",fontSize:"14px"}},k.createElement(l0,null)),k.createElement(Rn,{primary:p("dashboard.title","Dashboard"),primaryTypographyProps:{noWrap:!0,fontSize:"14px"}})))):null,T=Oe(()=>{P?window.confirm(s("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes."))&&(C(!1),E()):E()},"handleLogout"),F=g&&k.createElement(kr,{title:s("buttons.logout","Logout"),placement:"right",disableHoverListener:r,arrow:!0},k.createElement(Lo,{key:"logout",onClick:()=>T(),sx:{justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:r?"12px":"0px",marginLeft:"2px",color:"currentColor"}},k.createElement(r0,null)),k.createElement(Rn,{primary:s("buttons.logout","Logout"),primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}))),j=_(h,y),$=k.createElement(os,{disablePadding:!0,sx:{flexGrow:1,paddingTop:"16px"}},Oe(()=>t?t({dashboard:D,logout:F,items:j,collapsed:!r}):k.createElement(k.Fragment,null,D,j,F),"renderSider")());return k.createElement(k.Fragment,null,k.createElement(Ke,{sx:{width:{xs:l()},display:{xs:"none",md:"block"},transition:"width 0.3s ease"}}),k.createElement(Ke,{component:"nav",sx:{position:"fixed",zIndex:1101,width:{sm:l()},display:"flex"}},k.createElement(Jc,{variant:"temporary",elevation:2,open:i,onClose:()=>a(!1),ModalProps:{keepMounted:!0},sx:{display:{sm:"block",md:"none"}}},k.createElement(Ke,{sx:{width:l()}},k.createElement(Ke,{sx:{height:64,display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px"}},k.createElement(O,{collapsed:!1})),$)),k.createElement(Jc,{variant:"permanent",sx:{display:{xs:"none",md:"block"},"& .MuiDrawer-paper":{width:l,overflow:"hidden",transition:"width 200ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"}},open:!0},k.createElement(Jo,{elevation:0,sx:{fontSize:"14px",width:"100%",height:64,display:"flex",alignItems:"center",justifyContent:r?"space-between":"center",paddingLeft:r?"16px":0,paddingRight:r?"8px":0,variant:"outlined",borderRadius:0,borderBottom:L=>`1px solid ${L.palette.action.focus}`}},k.createElement(O,{collapsed:!r}),r&&k.createElement(Nn,{size:"small",onClick:()=>o==null?void 0:o(!1)},k.createElement(a0,null))),k.createElement(Ke,{sx:{flexGrow:1,overflowX:"hidden",overflowY:"auto"}},$)),k.createElement(Nn,{sx:L=>{let{palette:z}=L,{mode:B,getContrastText:A,primary:H,background:q}=z;return{color:A(B==="light"?H.main:q.paper),display:{xs:"flex",md:"none"},justifyContent:"center",alignItems:"center",position:"fixed",top:"12px",left:"16px",zIndex:1199,height:"36px",width:"36px"}},onClick:()=>a(L=>!L)},k.createElement(XE,null))))},"ThemedSider"),yAe=Oe(({isSiderOpen:e,onToggleSiderClick:t,toggleSiderIcon:n})=>{let r=zt(),{data:o}=md({v3LegacyAuthProviderCompatible:!!(r!=null&&r.isLegacy)});return k.createElement(s0,{position:"sticky"},k.createElement(sm,null,!!t&&k.createElement(Nn,{color:"inherit","aria-label":"open drawer",onClick:()=>t==null?void 0:t(),edge:"start",sx:{mr:2,display:{xs:"none",md:"flex"},...e&&{display:"none"}}},(n==null?void 0:n(!!e))??k.createElement(tP,null)),k.createElement(dr,{direction:"row",width:"100%",justifyContent:"flex-end",alignItems:"center"},k.createElement(dr,{direction:"row",gap:"16px",alignItems:"center",justifyContent:"center"},k.createElement(Xe,{sx:{display:{xs:"none",md:"block"}},variant:"subtitle2"},o==null?void 0:o.name),k.createElement(u0,{src:o==null?void 0:o.avatar,alt:o==null?void 0:o.name})))))},"ThemedHeader");Oe(({Sider:e,Header:t,Title:n,Footer:r,OffLayoutArea:o,children:i})=>{let[a,l]=v.useState(!0);return k.createElement(Ke,{display:"flex",flexDirection:"row"},k.createElement(e??vAe,{Title:n,isSiderOpen:a,onToggleSiderClick:s=>l(!!s)}),k.createElement(Ke,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:"100vh"}},k.createElement(t??yAe,{isSiderOpen:a,onToggleSiderClick:()=>l(s=>!s)}),k.createElement(Ke,{component:"main",sx:{p:{xs:1,md:2,lg:3},flexGrow:1,bgcolor:s=>s.palette.background.default}},i),r&&k.createElement(r,null)),o&&k.createElement(o,null))},"ThemedLayout");var bAe="Refine Project",xAe=k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7889 0.422291C12.6627 -0.140764 11.3373 -0.140764 10.2111 0.422291L2.21115 4.42229C0.85601 5.09986 0 6.48491 0 8V16C0 17.5151 0.85601 18.9001 2.21115 19.5777L10.2111 23.5777C11.3373 24.1408 12.6627 24.1408 13.7889 23.5777L21.7889 19.5777C23.144 18.9001 24 17.5151 24 16V8C24 6.48491 23.144 5.09986 21.7889 4.42229L13.7889 0.422291ZM8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8V16C16 18.2091 14.2091 20 12 20C9.79086 20 8 18.2091 8 16V8Z",fill:"currentColor"}),k.createElement("path",{d:"M14 8C14 9.10457 13.1046 10 12 10C10.8954 10 10 9.10457 10 8C10 6.89543 10.8954 6 12 6C13.1046 6 14 6.89543 14 8Z",fill:"currentColor"})),wAe=Oe(({collapsed:e,wrapperStyles:t,icon:n=xAe,text:r=bAe})=>{let o=st(),i=Gn(),{Link:a}=Bt();return k.createElement(Ur,{to:"/",component:o==="legacy"?a:i,underline:"none",sx:{display:"flex",alignItems:"center",gap:"12px",...t}},k.createElement(rs,{height:"24px",width:"24px",color:"primary"},n),!e&&k.createElement(Xe,{variant:"h6",fontWeight:700,color:"text.primary",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},r))},"ThemedTitle"),Lk=k.createContext({siderCollapsed:!1,mobileSiderOpen:!1,setSiderCollapsed:()=>{},setMobileSiderOpen:()=>{}}),CAe=Oe(({children:e,initialSiderCollapsed:t})=>{let[n,r]=v.useState(t??!1),[o,i]=v.useState(!1);return k.createElement(Lk.Provider,{value:{siderCollapsed:n,mobileSiderOpen:o,setSiderCollapsed:r,setMobileSiderOpen:i}},e)},"ThemedLayoutContextProvider");Oe(e=>{var t,n;let{queryResult:r,defaultValueQueryResult:o,onSearch:i,overtime:a}=kK(e);return{autocompleteProps:{options:zS(((t=r.data)==null?void 0:t.data)||[],((n=o.data)==null?void 0:n.data)||[],Ao),loading:r.isFetching||o.isFetching,onInputChange:(l,s)=>{(l==null?void 0:l.type)==="change"?i(s):(l==null?void 0:l.type)==="click"&&i("")},filterOptions:l=>l},onSearch:i,queryResult:r,defaultValueQueryResult:o,overtime:a}},"useAutocomplete");var SAe=Oe(e=>e.map(({field:t,sort:n})=>({field:t,order:n||"asc"})),"transformSortModelToCrudSorting"),EAe=Oe(e=>e.map(({field:t,order:n})=>({field:t,sort:n})),"transformCrudSortingToSortModel"),PAe=Oe(e=>{if(!e)return"eq";switch(e){case"equals":case"is":case"=":return"eq";case"!=":case"not":return"ne";case"contains":return"contains";case"isAnyOf":return"in";case">":case"after":return"gt";case">=":case"onOrAfter":return"gte";case"<":case"before":return"lt";case"<=":case"onOrBefore":return"lte";case"startsWith":return"startswith";case"endsWith":return"endswith";case"isEmpty":return"null";case"isNotEmpty":return"nnull";default:return e}},"transformMuiOperatorToCrudOperator"),kAe=Oe(({items:e,logicOperator:t})=>{let n=e.map(({field:r,value:o,operator:i})=>({field:r,value:["isEmpty","isNotEmpty"].includes(i)?!0:o??"",operator:PAe(i)}));return t===er.Or?[{operator:"or",value:n}]:n},"transformFilterModelToCrudFilters"),MT=Oe((e,t)=>{switch(t){case"number":switch(e){case"eq":return"=";case"ne":return"!=";case"gt":return">";case"gte":return">=";case"lt":return"<";case"lte":return"<=";case"null":return"isEmpty";case"nnull":return"isNotEmpty";case"in":return"isAnyOf";default:return e}case"singleSelect":case"boolean":switch(e){case"eq":return"is";default:return e}case void 0:case"string":switch(e){case"eq":return"equals";case"contains":return"contains";case"null":return"isEmpty";case"nnull":return"isNotEmpty";case"startswith":return"startsWith";case"endswith":return"endsWith";case"in":return"isAnyOf";default:return e}case"date":case"dateTime":switch(e){case"eq":return"is";case"ne":return"not";case"gt":return"after";case"gte":return"onOrAfter";case"lt":return"before";case"lte":return"onOrBefore";case"null":return"isEmpty";case"nnull":return"isNotEmpty";default:return e}default:return e}},"transformCrudOperatorToMuiOperator"),$Ae=Oe((e,t)=>{var n;let r=[],o=e.some(i=>i.operator==="or");return t&&(o?((n=e.find(i=>i.operator==="or"))==null?void 0:n.value).map(({field:i,value:a,operator:l})=>{let s=t[i];r.push({field:i,operator:MT(l,s),value:a===""?void 0:a,id:i+l})}):e.map(({field:i,value:a,operator:l})=>{let s=t[i];r.push({field:i,operator:MT(l,s),value:a===""?void 0:a,id:i+l})})),{items:r,logicOperator:o?er.Or:er.And}},"transformCrudFiltersToFilterModel");function Dk({onSearch:e,initialCurrent:t,initialPageSize:n=25,pagination:r,hasPagination:o=!0,initialSorter:i,permanentSorter:a,defaultSetFilterBehavior:l="replace",initialFilter:s,permanentFilter:u,filters:c,sorters:d,syncWithLocation:f,resource:m,successNotification:p,errorNotification:h,queryOptions:y,liveMode:b,onLiveEvent:g,liveParams:x,meta:w,metaData:P,dataProviderName:C,overtimeOptions:E}={}){let S=Rr(),M=pD(b),[O,R]=v.useState(),{tableQueryResult:_,current:D,setCurrent:T,pageSize:F,setPageSize:j,filters:$,setFilters:L,sorters:z,setSorters:B,sorter:A,setSorter:H,pageCount:q,createLinkForSyncWithLocation:U,overtime:G}=hD({permanentSorter:a,permanentFilter:u,initialCurrent:t,initialPageSize:n,pagination:r,hasPagination:o,initialSorter:i,initialFilter:s,filters:c,sorters:d,syncWithLocation:f,defaultSetFilterBehavior:l,resource:m,successNotification:p,errorNotification:h,queryOptions:y,liveMode:b,onLiveEvent:g,liveParams:x,meta:Ae(w,P),metaData:Ae(w,P),dataProviderName:C,overtimeOptions:E}),[Y,re]=v.useState($),{data:le,isFetched:J,isLoading:oe}=_,ce=((c==null?void 0:c.mode)||"server")==="server",ve=((d==null?void 0:d.mode)||"server")==="server",me=o===!1?"off":"server",ke=((r==null?void 0:r.mode)??me)!=="off",be=Ae(d==null?void 0:d.permanent,a)??[],ie=Ae(c==null?void 0:c.permanent,u)??[],ye=Oe(K=>{ke&&T(K+1)},"handlePageChange"),V=Oe(K=>{ke&&j(K)},"handlePageSizeChange"),Q=Oe(K=>{let ee=SAe(K);B(ee)},"handleSortModelChange"),Z=Oe(K=>{let ee=kAe(K);re(ee),L(ee.filter(se=>se.value!=="")),ke&&T(1)},"handleFilterModelChange"),ae=Oe(async K=>{if(e){let ee=await e(K);re(ee),L(ee.filter(se=>se.value!=="")),ke&&T(1)}},"search"),te=Oe(()=>ke?{paginationMode:"server",paginationModel:{page:D-1,pageSize:F},onPaginationModelChange:K=>{ye(K.page),V(K.pageSize)}}:{paginationMode:"client"},"dataGridPaginationValues");return{tableQueryResult:_,dataGridProps:{disableRowSelectionOnClick:!0,rows:(le==null?void 0:le.data)||[],loading:M==="auto"?oe:!J,rowCount:(le==null?void 0:le.total)||0,...te(),sortingMode:ve?"server":"client",sortModel:EAe(Al(z,be,Ao)),onSortModelChange:Q,filterMode:ce?"server":"client",filterModel:$Ae(Al(Y,ie,Ao),O),onFilterModelChange:Z,onStateChange:K=>{let ee=Object.fromEntries(Object.entries(K.columns.lookup).map(([se,Ce])=>[se,Ce.type]));!Ao(ee,O)&&R(ee)},sx:{border:"none","& .MuiDataGrid-columnHeaders":{background:Nf(S.palette.background.paper,.05),borderBottom:`1px solid ${Nf(S.palette.background.paper,.1)}`},"& .MuiDataGrid-cell":{borderBottom:`1px solid ${Nf(S.palette.background.paper,.05)}`}}},current:D,setCurrent:T,pageSize:F,setPageSize:j,pageCount:q,sorters:z,setSorters:B,sorter:A,setSorter:H,filters:$,setFilters:L,search:ae,createLinkForSyncWithLocation:U,overtime:G}}Oe(Dk,"useDataGrid");Oe(()=>{let{mobileSiderOpen:e,siderCollapsed:t,setMobileSiderOpen:n,setSiderCollapsed:r}=v.useContext(Lk);return{siderVisible:e,setSiderVisible:n,drawerSiderVisible:!t,setDrawerSiderVisible:o=>r(!o)}},"useSiderVisible");var $3=Oe(()=>{let{mobileSiderOpen:e,siderCollapsed:t,setMobileSiderOpen:n,setSiderCollapsed:r}=v.useContext(Lk);return{mobileSiderOpen:e,siderCollapsed:t,setMobileSiderOpen:n,setSiderCollapsed:r}},"useThemedLayoutContext"),IAe=Oe(({Title:e,render:t,meta:n,activeItemDisabled:r=!1})=>{let{siderCollapsed:o,setSiderCollapsed:i,mobileSiderOpen:a,setMobileSiderOpen:l}=$3(),s=Oe(()=>o?56:240,"drawerWidth"),u=Qe(),c=st(),d=Gn(),{Link:f}=Bt(),m=c==="legacy"?f:d,{hasDashboard:p}=dn(),h=Qe(),{menuItems:y,selectedKey:b,defaultOpenKeys:g}=tE({meta:n}),x=ly(),w=GS(),P=zt(),{warnWhen:C,setWarnWhen:E}=tl(),{mutate:S}=Kc({v3LegacyAuthProviderCompatible:!!(P!=null&&P.isLegacy)}),[M,O]=v.useState({});k.useEffect(()=>{O(z=>{let B=Object.keys(z).filter(H=>z[H]),A=new Set([...B,...g]);return Object.fromEntries(Array.from(A.values()).map(H=>[H,!0]))})},[g]);let R=e??w??dl,_=Oe(z=>{O({...M,[z]:!M[z]})},"handleClick"),D=Oe((z,B)=>z.map(A=>{let{icon:H,label:q,route:U,name:G,children:Y,parentName:re,meta:le,options:J}=A,oe=M[A.key||""]||!1,ce=A.key===B,ve=Ae(le==null?void 0:le.parent,J==null?void 0:J.parent,re)!==void 0;if(Y.length>0)return k.createElement(Da,{key:A.key,resource:G.toLowerCase(),action:"list",params:{resource:A}},k.createElement("div",{key:A.key},k.createElement(kr,{title:q??G,placement:"right",disableHoverListener:!o,arrow:!0},k.createElement(Lo,{onClick:()=>{o?(i(!1),oe||_(A.key||"")):_(A.key||"")},sx:{pl:ve?4:2,justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:o?"0px":"12px",color:"currentColor"}},H??k.createElement(Qa,null)),k.createElement(Rn,{primary:q,primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}),oe?k.createElement(o0,{sx:{color:"text.icon"}}):k.createElement(i0,{sx:{color:"text.icon"}}))),!o&&k.createElement(e0,{in:M[A.key||""],timeout:"auto",unmountOnExit:!0},k.createElement(os,{component:"div",disablePadding:!0},D(Y,B)))));let me=r&&ce?{pointerEvents:"none"}:{};return k.createElement(Da,{key:A.key,resource:G.toLowerCase(),action:"list",params:{resource:A}},k.createElement(kr,{title:q??G,placement:"right",disableHoverListener:!o,arrow:!0},k.createElement(Lo,{component:m,to:U,selected:ce,style:me,onClick:()=>{l(!1)},sx:{pl:ve?4:2,py:ve?1.25:1,justifyContent:"center",color:ce?"primary.main":"text.primary"}},k.createElement(vn,{sx:{justifyContent:"center",transition:"margin-right 0.3s",marginRight:o?"0px":"12px",minWidth:"24px",color:"currentColor"}},H??k.createElement(Qa,null)),k.createElement(Rn,{primary:q,primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}))))}),"renderTreeView"),T=p?k.createElement(Da,{resource:"dashboard",action:"list"},k.createElement(kr,{title:h("dashboard.title","Dashboard"),placement:"right",disableHoverListener:!o,arrow:!0},k.createElement(Lo,{component:m,to:"/",selected:b==="/",onClick:()=>{l(!1)},sx:{pl:2,py:1,justifyContent:"center",color:b==="/"?"primary.main":"text.primary"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:o?"0px":"12px",color:"currentColor",fontSize:"14px"}},k.createElement(l0,null)),k.createElement(Rn,{primary:h("dashboard.title","Dashboard"),primaryTypographyProps:{noWrap:!0,fontSize:"14px"}})))):null,F=Oe(()=>{C?window.confirm(u("warnWhenUnsavedChanges","Are you sure you want to leave? You have unsaved changes."))&&(E(!1),S()):S()},"handleLogout"),j=x&&k.createElement(kr,{title:u("buttons.logout","Logout"),placement:"right",disableHoverListener:!o,arrow:!0},k.createElement(Lo,{key:"logout",onClick:()=>F(),sx:{justifyContent:"center"}},k.createElement(vn,{sx:{justifyContent:"center",minWidth:"24px",transition:"margin-right 0.3s",marginRight:o?"0px":"12px",color:"currentColor"}},k.createElement(r0,null)),k.createElement(Rn,{primary:u("buttons.logout","Logout"),primaryTypographyProps:{noWrap:!0,fontSize:"14px"}}))),$=D(y,b),L=k.createElement(os,{disablePadding:!0,sx:{flexGrow:1,paddingTop:"16px"}},Oe(()=>t?t({dashboard:T,logout:j,items:$,collapsed:o}):k.createElement(k.Fragment,null,T,$,j),"renderSider")());return k.createElement(k.Fragment,null,k.createElement(Ke,{sx:{width:{xs:s()},display:{xs:"none",md:"block"},transition:"width 0.3s ease"}}),k.createElement(Ke,{component:"nav",sx:{position:"fixed",zIndex:1101,width:{sm:s()},display:"flex"}},k.createElement(Jc,{variant:"temporary",elevation:2,open:a,onClose:()=>l(!1),ModalProps:{keepMounted:!0},sx:{display:{sm:"block",md:"none"}}},k.createElement(Ke,{sx:{width:s()}},k.createElement(Ke,{sx:{height:64,display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px"}},k.createElement(R,{collapsed:!1})),L)),k.createElement(Jc,{variant:"permanent",sx:{display:{xs:"none",md:"block"},"& .MuiDrawer-paper":{width:s(),overflow:"hidden",transition:"width 200ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"}},open:!0},k.createElement(Jo,{elevation:0,sx:{fontSize:"14px",width:"100%",height:64,display:"flex",flexShrink:0,alignItems:"center",justifyContent:o?"center":"space-between",paddingLeft:o?0:"16px",paddingRight:o?0:"8px",variant:"outlined",borderRadius:0,borderBottom:z=>`1px solid ${z.palette.action.focus}`}},k.createElement(R,{collapsed:o}),!o&&k.createElement(Nn,{size:"small",onClick:()=>i(!0)},k.createElement(a0,null))),k.createElement(Ke,{sx:{flexGrow:1,overflowX:"hidden",overflowY:"auto"}},L))))},"ThemedSiderV2"),RT=Oe(e=>k.createElement(Nn,{color:"inherit","aria-label":"open drawer",edge:"start",...e},k.createElement(tP,null)),"HamburgerIcon"),I3=Oe(()=>{let{siderCollapsed:e,setSiderCollapsed:t,mobileSiderOpen:n,setMobileSiderOpen:r}=$3();return k.createElement(k.Fragment,null,k.createElement(RT,{onClick:()=>t(!e),sx:{mr:2,display:{xs:"none",md:"flex"},...!e&&{display:"none"}}}),k.createElement(RT,{onClick:()=>r(!n),sx:{mr:2,display:{xs:"flex",md:"none"},...n&&{display:"none"}}}))},"HamburgerMenu"),OAe=Oe(({isSticky:e,sticky:t})=>{let n=zt(),{data:r}=md({v3LegacyAuthProviderCompatible:!!(n!=null&&n.isLegacy)}),o=Ae(t,e)??!0;return k.createElement(s0,{position:o?"sticky":"relative"},k.createElement(sm,null,k.createElement(I3,null),k.createElement(dr,{direction:"row",width:"100%",justifyContent:"flex-end",alignItems:"center"},k.createElement(dr,{direction:"row",gap:"16px",alignItems:"center",justifyContent:"center"},(r==null?void 0:r.name)&&k.createElement(Xe,{variant:"subtitle2"},r==null?void 0:r.name),(r==null?void 0:r.avatar)&&k.createElement(u0,{src:r==null?void 0:r.avatar,alt:r==null?void 0:r.name})))))},"ThemedHeaderV2"),MAe=Oe(({Sider:e,Header:t,Title:n,Footer:r,OffLayoutArea:o,children:i,initialSiderCollapsed:a})=>k.createElement(CAe,{initialSiderCollapsed:a},k.createElement(Ke,{display:"flex",flexDirection:"row"},k.createElement(e??IAe,{Title:n}),k.createElement(Ke,{sx:[{display:"flex",flexDirection:"column",flex:1,minHeight:"100vh"},{overflow:"auto"},{overflow:"clip"}]},k.createElement(t??OAe,null),k.createElement(Ke,{component:"main",sx:{p:{xs:1,md:2,lg:3},flexGrow:1,bgcolor:l=>l.palette.background.default}},i),r&&k.createElement(r,null)),o&&k.createElement(o,null))),"ThemedLayoutV2"),RAe="Refine Project",TAe=k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7889 0.422291C12.6627 -0.140764 11.3373 -0.140764 10.2111 0.422291L2.21115 4.42229C0.85601 5.09986 0 6.48491 0 8V16C0 17.5151 0.85601 18.9001 2.21115 19.5777L10.2111 23.5777C11.3373 24.1408 12.6627 24.1408 13.7889 23.5777L21.7889 19.5777C23.144 18.9001 24 17.5151 24 16V8C24 6.48491 23.144 5.09986 21.7889 4.42229L13.7889 0.422291ZM8 8C8 5.79086 9.79086 4 12 4C14.2091 4 16 5.79086 16 8V16C16 18.2091 14.2091 20 12 20C9.79086 20 8 18.2091 8 16V8Z",fill:"currentColor"}),k.createElement("path",{d:"M14 8C14 9.10457 13.1046 10 12 10C10.8954 10 10 9.10457 10 8C10 6.89543 10.8954 6 12 6C13.1046 6 14 6.89543 14 8Z",fill:"currentColor"})),dl=Oe(({collapsed:e,wrapperStyles:t,icon:n=TAe,text:r=RAe})=>{let o=st(),i=Gn(),{Link:a}=Bt();return k.createElement(Ur,{to:"/",component:o==="legacy"?a:i,underline:"none",sx:{display:"flex",alignItems:"center",gap:"12px",...t}},k.createElement(rs,{height:"24px",width:"24px",color:"primary"},n),!e&&k.createElement(Xe,{variant:"h6",fontWeight:700,color:"text.primary",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},r))},"ThemedTitleV2");Oe(()=>{var e;let{register:t,handleSubmit:n,formState:{errors:r}}=ol(),o=zt(),{mutate:i,isLoading:a}=Vp({v3LegacyAuthProviderCompatible:!!(o!=null&&o.isLegacy)}),l=Qe();return v.createElement(v.Fragment,null,v.createElement(Ke,{component:"div",sx:{background:"radial-gradient(50% 50% at 50% 50%, #63386A 0%, #310438 100%)",backgroundSize:"cover"}},v.createElement(gm,{component:"main",maxWidth:"xs",sx:{display:"flex",flexDirection:"column",justifyContent:"center",height:"100vh"}},v.createElement(Ke,{sx:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"}},v.createElement("div",null,v.createElement("img",{src:"https://refine.ams3.cdn.digitaloceanspaces.com/logo/refine.svg",alt:"Refine Logo",style:{maxWidth:200}})),v.createElement(Ke,{mt:4},v.createElement(il,null,v.createElement(al,{sx:{paddingX:"32px"}},v.createElement(Xe,{component:"h1",variant:"h5",align:"center",sx:{fontWeight:"700",margin:"12px 0"}},l("pages.login.title","Sign in your account")),v.createElement(Ke,{component:"form",onSubmit:n(s=>{i(s)}),gap:"16px"},v.createElement(Mn,{...t("username",{required:!0}),id:"username",margin:"normal",size:"small",fullWidth:!0,label:l("pages.login.username","Username"),name:"username",autoComplete:"username",autoFocus:!0}),v.createElement(Mn,{...t("password",{required:!0}),id:"password",size:"small",margin:"normal",fullWidth:!0,name:"password",label:l("pages.login.password","Password"),helperText:(e=r==null?void 0:r.password)==null?void 0:e.message,type:"password",placeholder:"●●●●●●●●",autoComplete:"current-password"}),v.createElement(Ke,{component:"div",sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},v.createElement(bP,{sx:{span:{fontSize:"12px",color:"text.secondary"}},color:"secondary",control:v.createElement(MP,{size:"small",id:"remember",...t("remember")}),label:l("pages.login.remember","Remember me")}),v.createElement(Ur,{href:"#",sx:{fontSize:"12px",textDecoration:"none"}},v.createElement(Xe,{sx:{fontSize:"12px"}},l("pages.login.forgotPassword","Forgot password?")))),v.createElement(jt,{type:"submit",fullWidth:!0,variant:"contained",sx:{my:"8px",color:"white"},disabled:a},l("pages.login.signin","Sign in")),v.createElement(Ke,{style:{marginTop:8}},v.createElement(Xe,{variant:"subtitle2"},l("pages.login.noAccount","Don’t have an account?")," ",v.createElement(Ur,{underline:"none",href:"#",style:{fontWeight:"bold"}},l("pages.login.signup","Sign up"))))))))))))},"LoginPage");Oe(()=>{let e=Oe(t=>v.createElement(Xe,{sx:{backgroundColor:n=>n.palette.secondary.contrastText,color:n=>n.palette.secondary.main,display:"inline-block",fontFamily:"monospace"}},t),"renderCode");return v.createElement(v.Fragment,null,v.createElement(_c,{container:!0,sx:{backgroundColor:t=>t.palette.secondary.main,display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",backgroundImage:"url('https://refine.ams3.cdn.digitaloceanspaces.com/login-background/background.png')",backgroundSize:"cover"},p:3},v.createElement(_c,{display:"flex",flexDirection:"column",flex:1,alignItems:"center",color:t=>t.palette.primary.contrastText},v.createElement(Xe,{display:"flex",justifyContent:"center"},v.createElement("img",{style:{marginBottom:"48px"},src:"https://refine.ams3.cdn.digitaloceanspaces.com/logo/refine.svg",alt:"Refine Logo"})),v.createElement(Xe,{variant:"h2",fontWeight:"bold",display:"flex",justifyContent:"center"},"Welcome on board"),v.createElement(Xe,{variant:"h5",mt:2},"Your configuration is completed."),v.createElement(Xe,{variant:"h6",mt:2},"Now you can get started by adding your resources to the"," ",e("resources")," property of ",e("Refine")),v.createElement(_c,{item:!0,sm:12,mt:12,display:"flex",justifyContent:"center"},v.createElement(dr,{spacing:2,direction:{xs:"column",sm:"row"}},v.createElement(Ur,{href:"https://refine.dev",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"}},v.createElement(jt,{variant:"outlined",fullWidth:!0},"Documentation")),v.createElement(Ur,{href:"https://refine.dev/examples",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"}},v.createElement(jt,{variant:"outlined",fullWidth:!0},"Examples")),v.createElement(Ur,{href:"https://discord.gg/refine",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"}},v.createElement(jt,{variant:"outlined",fullWidth:!0},"Community")))))))},"ReadyPage");Oe(()=>k.createElement(VK,null),"WelcomePage");var _Ae=Oe(()=>{let[e,t]=v.useState(),{push:n}=Cn(),r=hr(),o=st(),{resource:i,action:a}=Je(),l=Qe();return v.useEffect(()=>{i&&a&&t(l("pages.error.info",{action:a,resource:i==null?void 0:i.name},`You may have forgotten to add the "${a}" component to "${i==null?void 0:i.name}" resource.`))},[a,i]),k.createElement(_c,{display:"flex",justifyContent:"center",alignItems:"center",mt:20},k.createElement(_c,{container:!0,direction:"column",display:"flex",alignItems:"center"},k.createElement(Xe,{variant:"h1"},"404"),k.createElement(dr,{direction:"row",spacing:"2"},k.createElement(Xe,null,l("pages.error.404","Sorry, the page you visited does not exist.")),e&&k.createElement(kr,{title:e},k.createElement(v5,{}))),k.createElement(jt,{onClick:()=>{o==="legacy"?n("/"):r({to:"/"})}},l("pages.error.backHome","Back Home"))))},"ErrorComponent"),G0={},q0={textAlign:"center",fontSize:"24px",marginBottom:"24px",overflowWrap:"break-word",hyphens:"manual",textOverflow:"unset",whiteSpace:"pre-wrap"},FAe=Oe(({providers:e,registerLink:t,forgotPasswordLink:n,rememberMe:r,contentProps:o,wrapperProps:i,renderContent:a,formProps:l,title:s,hideForm:u})=>{var c;let{onSubmit:d,...f}=l||{},m=ol({...f}),{register:p,handleSubmit:h,formState:{errors:y}}=m,b=zt(),{mutate:g,isLoading:x}=Vp({v3LegacyAuthProviderCompatible:!!(b!=null&&b.isLegacy)}),w=Qe(),P=st(),C=Gn(),{Link:E}=Bt(),S=P==="legacy"?E:C,M=s===!1?null:v.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"32px",fontSize:"20px"}},s??v.createElement(dl,{collapsed:!1,wrapperStyles:{gap:"8px"}})),O=Oe(()=>e&&e.length>0?v.createElement(v.Fragment,null,v.createElement(dr,{spacing:1},e.map(_=>v.createElement(jt,{key:_.name,variant:"outlined",fullWidth:!0,sx:{color:"primary.light",borderColor:"primary.light",textTransform:"none"},onClick:()=>g({providerName:_.name}),startIcon:_.icon},_.label))),!u&&v.createElement(pP,{sx:{fontSize:"12px",marginY:"16px"}},w("pages.login.divider","or"))):null,"renderProviders"),R=v.createElement(il,{...o??{}},v.createElement(al,{sx:{p:"32px","&:last-child":{pb:"32px"}}},v.createElement(Xe,{component:"h1",variant:"h5",align:"center",style:q0,color:"primary",fontWeight:700},w("pages.login.title","Sign in to your account")),O(),!u&&v.createElement(Ke,{component:"form",onSubmit:h(_=>d?d(_):g(_))},v.createElement(Mn,{...p("email",{required:!0}),id:"email",margin:"normal",fullWidth:!0,label:w("pages.login.fields.email","Email"),error:!!y.email,name:"email",type:"email",autoComplete:"email",sx:{mt:0}}),v.createElement(Mn,{...p("password",{required:!0}),id:"password",margin:"normal",fullWidth:!0,name:"password",label:w("pages.login.fields.password","Password"),helperText:(c=y==null?void 0:y.password)==null?void 0:c.message,error:!!y.password,type:"password",placeholder:"●●●●●●●●",autoComplete:"current-password",sx:{mb:0}}),v.createElement(Ke,{component:"div",sx:{mt:"24px",display:"flex",justifyContent:"space-between",alignItems:"center"}},r??v.createElement(bP,{sx:{span:{fontSize:"14px",color:"text.secondary"}},color:"secondary",control:v.createElement(MP,{size:"small",id:"remember",...p("remember")}),label:w("pages.login.buttons.rememberMe","Remember me")}),n??v.createElement(Ur,{variant:"body2",color:"primary",fontSize:"12px",component:S,underline:"none",to:"/forgot-password"},w("pages.login.buttons.forgotPassword","Forgot password?"))),v.createElement(jt,{type:"submit",fullWidth:!0,variant:"contained",disabled:x,sx:{mt:"24px"}},w("pages.login.signin","Sign in"))),t??v.createElement(Ke,{sx:{mt:"24px",display:"flex",justifyContent:"center",alignItems:"center"}},v.createElement(Xe,{textAlign:"center",variant:"body2",component:"span",fontSize:"12px"},w("pages.login.buttons.noAccount","Don’t have an account?")),v.createElement(Ur,{ml:"4px",fontSize:"12px",variant:"body2",color:"primary",component:S,underline:"none",to:"/register",fontWeight:"bold"},w("pages.login.signup","Sign up")))));return v.createElement(D1e,{...m},v.createElement(Ke,{component:"div",style:G0,...i??{}},v.createElement(gm,{component:"main",sx:{display:"flex",flexDirection:"column",justifyContent:u?"flex-start":"center",alignItems:"center",minHeight:"100dvh",padding:"16px",width:"100%",maxWidth:"400px"}},v.createElement(Ke,{sx:{width:"100%",maxWidth:"400px",display:"flex",flexDirection:"column",paddingTop:u?"15dvh":0}},a?a(R,M):v.createElement(v.Fragment,null,M,R)))))},"LoginPage"),AAe=Oe(({loginLink:e,wrapperProps:t,contentProps:n,renderContent:r,providers:o,formProps:i,title:a,hideForm:l})=>{let{onSubmit:s,...u}=i||{},{register:c,handleSubmit:d,formState:{errors:f}}=ol({...u}),m=zt(),{mutate:p,isLoading:h}=KS({v3LegacyAuthProviderCompatible:!!(m!=null&&m.isLegacy)}),y=Qe(),b=st(),g=Gn(),{Link:x}=Bt(),w=b==="legacy"?x:g,P=a===!1?null:v.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"32px",fontSize:"20px"}},a??v.createElement(dl,{collapsed:!1,wrapperStyles:{gap:"8px"}})),C=Oe(()=>o&&o.length>0?v.createElement(v.Fragment,null,v.createElement(dr,{spacing:1},o.map(S=>v.createElement(jt,{key:S.name,color:"secondary",fullWidth:!0,variant:"outlined",sx:{color:"primary.light",borderColor:"primary.light",textTransform:"none"},onClick:()=>p({providerName:S.name}),startIcon:S.icon},S.label))),!l&&v.createElement(pP,{sx:{fontSize:"12px",marginY:"16px"}},y("pages.login.divider","or"))):null,"renderProviders"),E=v.createElement(il,{...n??{}},v.createElement(al,{sx:{p:"32px","&:last-child":{pb:"32px"}}},v.createElement(Xe,{component:"h1",variant:"h5",align:"center",style:q0,color:"primary",fontWeight:700},y("pages.register.title","Sign up for your account")),C(),!l&&v.createElement(Ke,{component:"form",onSubmit:d(S=>s?s(S):p(S))},v.createElement(Mn,{...c("email",{required:!0,pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:y("pages.register.errors.validEmail","Invalid email address")}}),id:"email",margin:"normal",fullWidth:!0,label:y("pages.register.email","Email"),error:!!f.email,helperText:f.email?f.email.message:"",name:"email",autoComplete:"email",sx:{mt:0}}),v.createElement(Mn,{...c("password",{required:!0}),id:"password",margin:"normal",fullWidth:!0,name:"password",label:y("pages.register.fields.password","Password"),helperText:f.password?f.password.message:"",error:!!f.password,type:"password",placeholder:"●●●●●●●●",autoComplete:"current-password",sx:{mb:0}}),v.createElement(jt,{type:"submit",fullWidth:!0,variant:"contained",disabled:h,sx:{mt:"24px"}},y("pages.register.signup","Sign up"))),e??v.createElement(Ke,{display:"flex",justifyContent:"flex-end",alignItems:"center",sx:{mt:"24px",display:"flex",justifyContent:"center",alignItems:"center"}},v.createElement(Xe,{variant:"body2",component:"span",fontSize:"12px"},y("pages.login.buttons.haveAccount","Have an account?")),v.createElement(Ur,{ml:"4px",variant:"body2",color:"primary",component:w,underline:"none",to:"/login",fontSize:"12px",fontWeight:"bold"},y("pages.login.signin","Sign in")))));return v.createElement(Ke,{component:"div",style:G0,...t??{}},v.createElement(gm,{component:"main",sx:{display:"flex",flexDirection:"column",justifyContent:l?"flex-start":"center",alignItems:"center",minHeight:"100dvh",padding:"16px",width:"100%",maxWidth:"400px"}},v.createElement(Ke,{sx:{width:"100%",maxWidth:"400px",display:"flex",flexDirection:"column",paddingTop:l?"15dvh":0}},r?r(E,P):v.createElement(v.Fragment,null,P,E))))},"RegisterPage"),LAe=Oe(({loginLink:e,wrapperProps:t,contentProps:n,renderContent:r,formProps:o,title:i})=>{let{onSubmit:a,...l}=o||{},{register:s,handleSubmit:u,formState:{errors:c}}=ol({...l}),{mutate:d,isLoading:f}=QS(),m=Qe(),p=st(),h=Gn(),{Link:y}=Bt(),b=p==="legacy"?y:h,g=i===!1?null:v.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"32px",fontSize:"20px"}},i??v.createElement(dl,{collapsed:!1,wrapperStyles:{gap:"8px"}})),x=v.createElement(il,{...n??{}},v.createElement(al,{sx:{p:"32px","&:last-child":{pb:"32px"}}},v.createElement(Xe,{component:"h1",variant:"h5",align:"center",style:q0,color:"primary",fontWeight:700},m("pages.forgotPassword.title","Forgot your password?")),v.createElement(Ke,{component:"form",onSubmit:u(w=>a?a(w):d(w))},v.createElement(Mn,{...s("email",{required:!0,pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:m("pages.register.errors.validEmail","Invalid email address")}}),id:"email",margin:"normal",fullWidth:!0,label:m("pages.forgotPassword.fields.email","Email"),name:"email",type:"email",error:!!c.email,autoComplete:"email",sx:{m:0}}),e??v.createElement(Ke,{textAlign:"right",sx:{mt:"24px"}},v.createElement(Xe,{variant:"body2",component:"span",fontSize:"12px"},m("pages.register.buttons.haveAccount","Have an account?"))," ",v.createElement(Ur,{variant:"body2",component:b,underline:"none",to:"/login",fontWeight:"bold",fontSize:"12px",color:"primary.light"},m("pages.login.signin","Sign in"))),v.createElement(jt,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:"24px"},disabled:f},m("pages.forgotPassword.buttons.submit","Send reset instructions")))));return v.createElement(v.Fragment,null,v.createElement(Ke,{component:"div",style:G0,...t??{}},v.createElement(gm,{component:"main",maxWidth:"xs",sx:{display:"flex",flexDirection:"column",justifyContent:"center",minHeight:"100dvh",padding:"16px",width:"100%",maxWidth:"400px"}},r?r(x,g):v.createElement(v.Fragment,null,g,x))))},"ForgotPasswordPage"),DAe=Oe(({wrapperProps:e,contentProps:t,renderContent:n,formProps:r,title:o=void 0})=>{var i,a;let{onSubmit:l,...s}=r||{},{register:u,watch:c,handleSubmit:d,formState:{errors:f}}=ol({...s}),m=zt(),{mutate:p,isLoading:h}=YS({v3LegacyAuthProviderCompatible:!!(m!=null&&m.isLegacy)}),y=Qe(),b=o===!1?null:v.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"32px",fontSize:"20px"}},o??v.createElement(dl,{collapsed:!1,wrapperStyles:{gap:"8px"}})),g=v.createElement(il,{...t??{}},v.createElement(al,{sx:{p:"32px","&:last-child":{pb:"32px"}}},v.createElement(Xe,{component:"h1",variant:"h5",align:"center",style:q0,color:"primary",fontWeight:700},y("pages.updatePassword.title","Set New Password")),v.createElement(Ke,{component:"form",onSubmit:d(x=>l?l(x):p(x))},v.createElement(Mn,{...u("password",{required:!0}),id:"password",margin:"normal",fullWidth:!0,name:"password",label:y("pages.updatePassword.fields.password","New Password"),helperText:(i=f==null?void 0:f.password)==null?void 0:i.message,error:!!(f!=null&&f.password),type:"password",placeholder:"●●●●●●●●",autoComplete:"current-password",sx:{m:0}}),v.createElement(Mn,{...u("confirmPassword",{required:!0,validate:x=>c("password")!==x?y("pages.updatePassword.errors.confirmPasswordNotMatch","Passwords do not match"):!0}),id:"confirmPassword",margin:"normal",fullWidth:!0,name:"confirmPassword",label:y("pages.updatePassword.fields.confirmPassword","Confirm New Password"),helperText:(a=f==null?void 0:f.confirmPassword)==null?void 0:a.message,error:!!(f!=null&&f.confirmPassword),type:"password",placeholder:"●●●●●●●●",autoComplete:"current-confirm-password",sx:{mb:0}}),v.createElement(jt,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:"24px"},disabled:h},y("pages.updatePassword.buttons.submit","Update")))));return v.createElement(v.Fragment,null,v.createElement(Ke,{component:"div",style:G0,...e??{}},v.createElement(gm,{component:"main",maxWidth:"xs",sx:{display:"flex",flexDirection:"column",justifyContent:"center",minHeight:"100dvh",padding:"16px",width:"100%",maxWidth:"400px"}},n?n(g,b):v.createElement(v.Fragment,null,b,g))))},"UpdatePasswordPage"),Nk=Oe(e=>{let{type:t}=e;return k.createElement(k.Fragment,null,Oe(()=>{switch(t){case"register":return k.createElement(AAe,{...e});case"forgotPassword":return k.createElement(LAe,{...e});case"updatePassword":return k.createElement(DAe,{...e});default:return k.createElement(FAe,{...e})}},"renderView")())},"AuthPage"),NAe=Oe(({title:e,children:t,saveButtonProps:n,resource:r,isLoading:o=!1,breadcrumb:i,wrapperProps:a,headerProps:l,contentProps:s,headerButtonProps:u,headerButtons:c,footerButtonProps:d,footerButtons:f,goBack:m})=>{var p,h;let y=Qe(),{options:{breadcrumb:b}={}}=dn(),g=st(),x=uy(),{goBack:w}=Cn(),P=aa(),{resource:C,action:E,identifier:S}=Je(r),M=typeof i>"u"?b:i,O=typeof M<"u"?k.createElement(k.Fragment,null,M)??void 0:k.createElement(K0,null),R={...o?{disabled:!0}:{},...n},_=k.createElement(_3,{...R});return k.createElement(il,{...a??{}},O,k.createElement(I0,{sx:{display:"flex",flexWrap:"wrap",".MuiCardHeader-action":{margin:0,alignSelf:"center"}},title:e??k.createElement(Xe,{variant:"h5",className:M0.Title},y(`${S}.titles.create`,`Create ${P(((p=C==null?void 0:C.meta)==null?void 0:p.label)??((h=C==null?void 0:C.options)==null?void 0:h.label)??(C==null?void 0:C.label)??S,"singular")}`)),avatar:typeof m<"u"?m:k.createElement(Nn,{onClick:E!=="list"||typeof E<"u"?g==="legacy"?w:x:void 0},k.createElement(O0,null)),action:c?k.createElement(Ke,{display:"flex",gap:"16px",...u??{}},c?typeof c=="function"?c({defaultButtons:null}):c:null):void 0,...l??{}}),k.createElement(al,{...s??{}},t),k.createElement(zP,{sx:{display:"flex",justifyContent:"flex-end",gap:"16px",padding:"16px"},...d??{}},f?typeof f=="function"?f({defaultButtons:_,saveButtonProps:R}):f:_))},"Create"),jAe=Oe(({title:e,saveButtonProps:t,mutationMode:n,recordItemId:r,children:o,deleteButtonProps:i,canDelete:a,resource:l,isLoading:s=!1,breadcrumb:u,dataProviderName:c,wrapperProps:d,headerProps:f,contentProps:m,headerButtonProps:p,headerButtons:h,footerButtonProps:y,footerButtons:b,goBack:g,autoSaveProps:x})=>{var w,P,C;let E=Qe(),{options:{breadcrumb:S}={}}=dn(),{mutationMode:M}=xu(),O=n??M,R=st(),_=uy(),D=hr(),{goBack:T,list:F}=Cn(),j=aa(),{resource:$,action:L,id:z,identifier:B}=Je(l),A=mD({resource:$,action:"list"}),H=r??z,q=typeof u>"u"?S:u,U=($==null?void 0:$.list)&&!r,G=a??((((w=$==null?void 0:$.meta)==null?void 0:w.canDelete)??($==null?void 0:$.canDelete))||i),Y=typeof q<"u"?k.createElement(k.Fragment,null,q)??void 0:k.createElement(K0,null),re=U?{...s?{disabled:!0}:{},resource:R==="legacy"?$==null?void 0:$.route:B}:void 0,le={...s?{disabled:!0}:{},resource:R==="legacy"?$==null?void 0:$.route:B,recordItemId:H,dataProviderName:c},J=k.createElement(Ke,{display:"flex",flexDirection:"row",alignItems:"center"},x&&k.createElement(WAe,{...x}),U&&k.createElement(T3,{...re}),k.createElement(R3,{...le})),oe=G?{...s?{disabled:!0}:{},resource:R==="legacy"?$==null?void 0:$.route:B,mutationMode:O,variant:"outlined",onSuccess:()=>{R==="legacy"?F(($==null?void 0:$.route)??($==null?void 0:$.name)??""):D({to:A})},recordItemId:H,dataProviderName:c,...i}:void 0,ce={...s?{disabled:!0}:{},...t},ve=k.createElement(k.Fragment,null,G&&k.createElement(_m,{...oe}),k.createElement(_3,{...ce}));return k.createElement(il,{...d??{}},Y,k.createElement(I0,{sx:{display:"flex",flexWrap:"wrap",".MuiCardHeader-action":{margin:0,alignSelf:"center"}},title:e??k.createElement(Xe,{variant:"h5",className:M0.Title},E(`${B}.titles.edit`,`Edit ${j(((P=$==null?void 0:$.meta)==null?void 0:P.label)??((C=$==null?void 0:$.options)==null?void 0:C.label)??($==null?void 0:$.label)??B,"singular")}`)),avatar:typeof g<"u"?g:k.createElement(Nn,{onClick:L!=="list"&&typeof L<"u"?R==="legacy"?T:_:void 0},k.createElement(O0,null)),action:k.createElement(Ke,{display:"flex",gap:"16px",...p??{}},h?typeof h=="function"?h({defaultButtons:J,listButtonProps:re,refreshButtonProps:le}):h:J),...f??{}}),k.createElement(al,{...m??{}},o),k.createElement(zP,{sx:{display:"flex",justifyContent:"flex-end",gap:"16px",padding:"16px"},...y??{}},b?typeof b=="function"?b({defaultButtons:ve,deleteButtonProps:oe,saveButtonProps:ce}):b:ve))},"Edit"),O3=Oe(({title:e,canCreate:t,children:n,createButtonProps:r,resource:o,breadcrumb:i,wrapperProps:a,headerProps:l,contentProps:s,headerButtonProps:u,headerButtons:c})=>{var d,f;let m=Qe(),{options:{breadcrumb:p}={}}=dn(),h=aa(),y=st(),{resource:b,identifier:g}=Je(o),x=t??(((b==null?void 0:b.canCreate)??!!(b!=null&&b.create))||r),w=typeof i>"u"?p:i,P=typeof w<"u"?k.createElement(k.Fragment,null,w)??void 0:k.createElement(K0,null),C=x?{resource:y==="legacy"?b==null?void 0:b.route:g,...r}:void 0,E=x?k.createElement(zAe,{...C}):null;return k.createElement(il,{...a??{}},P,k.createElement(I0,{sx:{display:"flex",flexWrap:"wrap",".MuiCardHeader-action":{margin:0,alignSelf:"center"}},title:e??k.createElement(Xe,{variant:"h5",className:M0.Title},m(`${g}.titles.list`,h(((d=b==null?void 0:b.meta)==null?void 0:d.label)??((f=b==null?void 0:b.options)==null?void 0:f.label)??(b==null?void 0:b.label)??g,"plural"))),action:k.createElement(Ke,{display:"flex",gap:"16px",...u},c?typeof c=="function"?c({defaultButtons:E,createButtonProps:C}):c:E),...l??{}}),k.createElement(al,{...s??{}},n))},"List");Oe(({title:e,canEdit:t,canDelete:n,isLoading:r=!1,children:o,resource:i,recordItemId:a,breadcrumb:l,dataProviderName:s,wrapperProps:u,headerProps:c,contentProps:d,headerButtonProps:f,headerButtons:m,footerButtonProps:p,footerButtons:h,goBack:y})=>{var b,g,x;let w=Qe(),{options:{breadcrumb:P}={}}=dn(),C=st(),E=uy(),S=hr(),{goBack:M,list:O}=Cn(),R=aa(),{resource:_,action:D,id:T,identifier:F}=Je(i),j=mD({resource:_,action:"list"}),$=a??T,L=typeof l>"u"?P:l,z=(_==null?void 0:_.list)&&!a,B=(n??((b=_==null?void 0:_.meta)==null?void 0:b.canDelete)??(_==null?void 0:_.canDelete))&&typeof $<"u",A=t??(_==null?void 0:_.canEdit)??!!(_!=null&&_.edit),H=typeof L<"u"?k.createElement(k.Fragment,null,L)??void 0:k.createElement(K0,null),q=z?{...r?{disabled:!0}:{},resource:C==="legacy"?_==null?void 0:_.route:F}:void 0,U=A?{...r?{disabled:!0}:{},resource:C==="legacy"?_==null?void 0:_.route:F,recordItemId:$}:void 0,G=B?{...r?{disabled:!0}:{},resource:C==="legacy"?_==null?void 0:_.route:F,recordItemId:$,onSuccess:()=>{C==="legacy"?O((_==null?void 0:_.route)??(_==null?void 0:_.name)??""):S({to:j})},dataProviderName:s}:void 0,Y={...r?{disabled:!0}:{},resource:C==="legacy"?_==null?void 0:_.route:F,recordItemId:$,dataProviderName:s},re=k.createElement(k.Fragment,null,z&&k.createElement(T3,{...q}),A&&k.createElement(M3,{...U}),B&&k.createElement(_m,{...G}),k.createElement(R3,{...Y}));return k.createElement(il,{...u??{}},H,k.createElement(I0,{sx:{display:"flex",flexWrap:"wrap",".MuiCardHeader-action":{margin:0,alignSelf:"center"}},title:e??k.createElement(Xe,{variant:"h5",className:M0.Title},w(`${F}.titles.show`,`Show ${R(((g=_==null?void 0:_.meta)==null?void 0:g.label)??((x=_==null?void 0:_.options)==null?void 0:x.label)??(_==null?void 0:_.label)??F,"singular")}`)),avatar:typeof y<"u"?y:k.createElement(Nn,{onClick:D!=="list"&&typeof D<"u"?C==="legacy"?M:E:void 0},k.createElement(O0,null)),action:k.createElement(Ke,{display:"flex",gap:"16px",...f??{}},m?typeof m=="function"?m({defaultButtons:re,deleteButtonProps:G,editButtonProps:U,listButtonProps:q,refreshButtonProps:Y}):m:re),...c??{}}),k.createElement(al,{...d??{}},o),k.createElement(zP,{sx:{padding:"16px"},...p??{}},h?typeof h=="function"?h({defaultButtons:null}):h:null))},"Show");var zAe=Oe(({resource:e,resourceNameOrRouteName:t,hideText:n=!1,accessControl:r,svgIconProps:o,meta:i,children:a,onClick:l,...s})=>{let u=v.useContext(sa),c=(r==null?void 0:r.enabled)??u.options.buttons.enableAccessControl,d=(r==null?void 0:r.hideIfUnauthorized)??u.options.buttons.hideIfUnauthorized,f=Qe(),m=st(),p=Gn(),{Link:h}=Bt(),y=m==="legacy"?h:p,{createUrl:b}=Cn(),{resource:g}=Je(e??t),{data:x}=Cu({resource:g==null?void 0:g.name,action:"create",queryOptions:{enabled:c},params:{resource:g}}),w=Oe(()=>x!=null&&x.can?"":x!=null&&x.reason?x.reason:f("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),P=g?b(g,i):"",{sx:C,...E}=s;return c&&d&&!(x!=null&&x.can)?null:k.createElement(y,{to:P,replace:!1,onClick:S=>{if((x==null?void 0:x.can)===!1){S.preventDefault();return}l&&(S.preventDefault(),l(S))},style:{textDecoration:"none"}},k.createElement(jt,{disabled:(x==null?void 0:x.can)===!1,startIcon:!n&&k.createElement(Mp,{...o}),title:w(),variant:"contained",sx:{minWidth:0,...C},className:ca.CreateButton,...E},n?k.createElement(Mp,{fontSize:"small",...o}):a??f("buttons.create","Create")))},"CreateButton"),M3=Oe(({resource:e,resourceNameOrRouteName:t,recordItemId:n,hideText:r=!1,accessControl:o,svgIconProps:i,meta:a,children:l,onClick:s,...u})=>{let c=v.useContext(sa),d=(o==null?void 0:o.enabled)??c.options.buttons.enableAccessControl,f=(o==null?void 0:o.hideIfUnauthorized)??c.options.buttons.hideIfUnauthorized,m=Qe(),p=st(),h=Gn(),{Link:y}=Bt(),b=p==="legacy"?y:h,{editUrl:g}=Cn(),{id:x,resource:w}=Je(e??t),{data:P}=Cu({resource:w==null?void 0:w.name,action:"edit",params:{id:n??x,resource:w},queryOptions:{enabled:d}}),C=Oe(()=>P!=null&&P.can?"":P!=null&&P.reason?P.reason:m("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),E=w&&(n??x)?g(w,n??x,a):"",{sx:S,...M}=u;return d&&f&&!(P!=null&&P.can)?null:k.createElement(b,{to:E,replace:!1,onClick:O=>{if((P==null?void 0:P.can)===!1){O.preventDefault();return}s&&(O.preventDefault(),s(O))},style:{textDecoration:"none"}},k.createElement(jt,{disabled:(P==null?void 0:P.can)===!1,startIcon:!r&&k.createElement(nC,{sx:{selfAlign:"center"},...i}),title:C(),sx:{minWidth:0,...S},className:ca.EditButton,...M},r?k.createElement(nC,{fontSize:"small",...i}):l??m("buttons.edit","Edit")))},"EditButton"),_m=Oe(({resource:e,resourceNameOrRouteName:t,recordItemId:n,onSuccess:r,mutationMode:o,children:i,successNotification:a,errorNotification:l,hideText:s=!1,accessControl:u,meta:c,metaData:d,dataProviderName:f,confirmTitle:m,confirmOkText:p,confirmCancelText:h,svgIconProps:y,invalidates:b,...g})=>{let x=v.useContext(sa),w=(u==null?void 0:u.enabled)??x.options.buttons.enableAccessControl,P=(u==null?void 0:u.hideIfUnauthorized)??x.options.buttons.hideIfUnauthorized,C=Qe(),{id:E,resource:S,identifier:M}=Je(e??t),{mutationMode:O}=xu(),R=o??O,{mutate:_,isLoading:D,variables:T}=lD(),{data:F}=Cu({resource:S==null?void 0:S.name,action:"delete",params:{id:n??E,resource:S},queryOptions:{enabled:w}}),j=Oe(()=>F!=null&&F.can?"":F!=null&&F.reason?F.reason:C("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),[$,L]=k.useState(!1),z=Oe(()=>{L(!0)},"handleClickOpen"),B=Oe(()=>{L(!1)},"handleClose"),A=Oe(()=>{(n??E)&&M&&(U(!1),L(!1),_({id:n??E??"",resource:M,mutationMode:R,successNotification:a,errorNotification:l,meta:Ae(c,d),metaData:Ae(c,d),dataProviderName:f,invalidates:b},{onSuccess:G=>{r==null||r(G)}}))},"handleCloseOnConfirm"),{sx:H,...q}=g,{setWarnWhen:U}=tl();return w&&P&&!(F!=null&&F.can)?null:k.createElement("div",null,k.createElement(vm,{color:"error",onClick:z,disabled:(F==null?void 0:F.can)===!1,loading:(n??E)===(T==null?void 0:T.id)&&D,startIcon:!s&&k.createElement(rC,{...y}),title:j(),sx:{minWidth:0,...H},loadingPosition:s?"center":"start",className:ca.DeleteButton,...q},s?k.createElement(rC,{fontSize:"small",...y}):i??C("buttons.delete","Delete")),k.createElement(b5,{open:$,onClose:B,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},k.createElement(w5,{id:"alert-dialog-title"},m??C("buttons.confirm","Are you sure?")),k.createElement(x5,{sx:{justifyContent:"center"}},k.createElement(jt,{onClick:B},h??C("buttons.cancel","Cancel")),k.createElement(jt,{color:"error",onClick:A,autoFocus:!0},p??C("buttons.delete","Delete")))))},"DeleteButton"),R3=Oe(({resource:e,resourceNameOrRouteName:t,recordItemId:n,hideText:r=!1,dataProviderName:o,svgIconProps:i,children:a,onClick:l,meta:s,metaData:u,...c})=>{let d=Qe(),f=oa(),m=la(),{resources:p,identifier:h,id:y}=Je(e??t),b=!!f.isFetching({queryKey:Oq(h,bt(h,o,p)).detail(n??y)}),g=Oe(()=>{m({id:n??y,invalidates:["detail"],dataProviderName:o,resource:h})},"handleInvalidate"),{sx:x,...w}=c;return k.createElement(vm,{startIcon:!r&&k.createElement(oC,{...i}),loading:b,loadingPosition:r?"center":"start",onClick:P=>{l?l(P):g()},sx:{minWidth:0,...x},className:ca.RefreshButton,...w},r?k.createElement(oC,{fontSize:"small",...i}):a??d("buttons.refresh","Refresh"))},"RefreshButton"),BAe=Oe(({resource:e,resourceNameOrRouteName:t,recordItemId:n,hideText:r=!1,accessControl:o,svgIconProps:i,meta:a,children:l,onClick:s,...u})=>{let c=v.useContext(sa),d=(o==null?void 0:o.enabled)??c.options.buttons.enableAccessControl,f=(o==null?void 0:o.hideIfUnauthorized)??c.options.buttons.hideIfUnauthorized,{showUrl:m}=Cn(),p=st(),h=Gn(),{Link:y}=Bt(),b=p==="legacy"?y:h,g=Qe(),{id:x,resource:w}=Je(e??t),{data:P}=Cu({resource:w==null?void 0:w.name,action:"show",params:{id:n??x,resource:w},queryOptions:{enabled:d}}),C=Oe(()=>P!=null&&P.can?"":P!=null&&P.reason?P.reason:g("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),E=w&&(n||x)?m(w,n??x,a):"",{sx:S,...M}=u;return d&&f&&!(P!=null&&P.can)?null:k.createElement(b,{to:E,replace:!1,onClick:O=>{if((P==null?void 0:P.can)===!1){O.preventDefault();return}s&&(O.preventDefault(),s(O))},style:{textDecoration:"none"}},k.createElement(jt,{disabled:(P==null?void 0:P.can)===!1,startIcon:!r&&k.createElement(iC,{...i}),title:C(),sx:{minWidth:0,...S},className:ca.ShowButton,...M},r?k.createElement(iC,{fontSize:"small",...i}):l??g("buttons.show","Show")))},"ShowButton"),T3=Oe(({resource:e,resourceNameOrRouteName:t,hideText:n=!1,accessControl:r,svgIconProps:o,meta:i,children:a,onClick:l,...s})=>{var u;let c=v.useContext(sa),d=(r==null?void 0:r.enabled)??c.options.buttons.enableAccessControl,f=(r==null?void 0:r.hideIfUnauthorized)??c.options.buttons.hideIfUnauthorized,{listUrl:m}=Cn(),p=st(),h=Gn(),{Link:y}=Bt(),b=aa(),g=p==="legacy"?y:h,x=Qe(),{resource:w,identifier:P}=Je(e??t),{data:C}=Cu({resource:w==null?void 0:w.name,action:"list",queryOptions:{enabled:d},params:{resource:w}}),E=Oe(()=>C!=null&&C.can?"":C!=null&&C.reason?C.reason:x("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),S=w?m(w,i):"",{sx:M,...O}=s;return d&&f&&!(C!=null&&C.can)?null:k.createElement(g,{to:S,replace:!1,onClick:R=>{if((C==null?void 0:C.can)===!1){R.preventDefault();return}l&&(R.preventDefault(),l(R))},style:{textDecoration:"none"}},k.createElement(jt,{disabled:(C==null?void 0:C.can)===!1,startIcon:!n&&k.createElement(Qa,{...o}),title:E(),sx:{minWidth:0,...M},className:ca.ListButton,...O},n?k.createElement(Qa,{fontSize:"small",...o}):a??x(`${P??e??t}.titles.list`,b(((u=w==null?void 0:w.meta)==null?void 0:u.label)??(w==null?void 0:w.label)??P??Ae(e,t),"plural"))))},"ListButton");Oe(({hideText:e=!1,children:t,loading:n=!1,svgIconProps:r,...o})=>{let i=Qe(),{sx:a,...l}=o;return k.createElement(vm,{...o,loading:n,startIcon:!e&&k.createElement(Rp,{...r}),loadingPosition:e?"center":"start",sx:{minWidth:0,...a},className:ca.ExportButton,...l},e?k.createElement(Rp,{fontSize:"small",...r}):t??i("buttons.export","Export"))},"ExportButton");var _3=Oe(({hideText:e=!1,svgIconProps:t,children:n,...r})=>{let o=Qe(),{sx:i,...a}=r;return k.createElement(vm,{startIcon:!e&&k.createElement(aC,{...t}),sx:{minWidth:0,...i},variant:"contained",className:ca.SaveButton,...a},e?k.createElement(aC,{fontSize:"small",...t}):n??o("buttons.save","Save"))},"SaveButton");Oe(({resource:e,resourceNameOrRouteName:t,recordItemId:n,hideText:r=!1,accessControl:o,svgIconProps:i,meta:a,children:l,onClick:s,...u})=>{let c=v.useContext(sa),d=(o==null?void 0:o.enabled)??c.options.buttons.enableAccessControl,f=(o==null?void 0:o.hideIfUnauthorized)??c.options.buttons.hideIfUnauthorized,{cloneUrl:m}=Cn(),p=st(),h=Gn(),{Link:y}=Bt(),b=p==="legacy"?y:h,g=Qe(),{id:x,resource:w}=Je(e??t),{data:P}=Cu({resource:w==null?void 0:w.name,action:"create",params:{id:n??x,resource:w},queryOptions:{enabled:d}}),C=Oe(()=>P!=null&&P.can?"":P!=null&&P.reason?P.reason:g("buttons.notAccessTitle","You don't have permission to access"),"disabledTitle"),E=w&&(n||x)?m(w,n??x,a):"",{sx:S,...M}=u;return d&&f&&!(P!=null&&P.can)?null:k.createElement(b,{to:E,replace:!1,onClick:O=>{if((P==null?void 0:P.can)===!1){O.preventDefault();return}s&&(O.preventDefault(),s(O))},style:{textDecoration:"none"}},k.createElement(jt,{disabled:(P==null?void 0:P.can)===!1,startIcon:!r&&k.createElement(Mp,{...i}),title:C(),sx:{minWidth:0,...S},className:ca.CloneButton,...M},r?k.createElement(Mp,{fontSize:"small",...i}):l??g("buttons.clone","Clone")))},"CloneButton");Oe(({inputProps:e,hideText:t=!1,loading:n=!1,svgIconProps:r,children:o,...i})=>{let a=Qe(),{sx:l,...s}=i;return k.createElement("label",{htmlFor:"contained-button-file"},k.createElement("input",{...e,id:"contained-button-file",multiple:!0,hidden:!0}),k.createElement(vm,{component:"span",startIcon:!t&&k.createElement(Rp,{...r}),loadingPosition:t?"center":"start",loading:n,sx:{minWidth:0,...l},className:ca.ImportButton,...s},t?k.createElement(Rp,{fontSize:"small",...r}):o??a("buttons.import","Import")))},"ImportButton");var HAe=Oe(({undoableTimeout:e,message:t})=>{let[n,r]=v.useState(100),[o,i]=v.useState(e);return v.useEffect(()=>{let a=100/e,l=setInterval(()=>{i(s=>s-1),r(s=>s-a)},1e3);return o===0&&clearInterval(l),()=>{clearInterval(l)}},[o]),k.createElement(k.Fragment,null,k.createElement(Ke,{sx:{position:"relative",display:"inline-flex"}},k.createElement(PP,{color:"inherit",variant:"determinate",value:n}),k.createElement(Ke,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"}},k.createElement(Xe,{component:"div"},o))),k.createElement(Ke,{sx:{marginLeft:"10px",maxWidth:{xs:"150px",md:"100%"}}},k.createElement(Xe,{variant:"subtitle2"},t)))},"CircularDeterminate");Oe(({value:e,...t})=>k.createElement(Xe,{variant:"body2",...t},e),"TextField");Oe(({value:e,...t})=>k.createElement(E0,{label:e==null?void 0:e.toString(),...t}),"TagField");Oe(({value:e,...t})=>k.createElement(Xe,{variant:"body2"},k.createElement(Ur,{href:`mailto:${e}`,...t},e)),"EmailField");Oe(({value:e,valueLabelTrue:t="true",valueLabelFalse:n="false",trueIcon:r,falseIcon:o,svgIconProps:i,...a})=>k.createElement(kr,{title:e?t:n,...a},e?k.createElement("span",null,r??k.createElement(C5,{...i})):k.createElement("span",null,o??k.createElement(S5,{...i}))),"BooleanField");XP.extend(eCe);var VAe=XP.locale(),jk=Oe(({value:e,locales:t,format:n="L",...r})=>k.createElement(Xe,{variant:"body2",...r},XP(e).locale(t||VAe).format(n)),"DateField");Oe(({title:e,src:t,...n})=>k.createElement(UAe,{value:t,title:e,...n},e??t),"FileField");var UAe=Oe(({children:e,value:t,...n})=>k.createElement(Xe,{variant:"body2"},k.createElement(Ur,{href:t,...n},e??t)),"UrlField");function F3(){return!!(typeof Intl=="object"&&Intl&&typeof Intl.NumberFormat=="function")}Oe(F3,"toLocaleStringSupportsOptions");var ja=Oe(({value:e,locale:t,options:n,...r})=>{let o=Number(e);return k.createElement(Xe,{variant:"body2",...r},F3()?o.toLocaleString(t,n):o)},"NumberField");Oe(({value:e=""})=>k.createElement(cTe,{remarkPlugins:[TFe]},e),"MarkdownField");var K0=Oe(({breadcrumbProps:e,showHome:t=!0,hideIcons:n=!1,meta:r})=>{var o,i;let{breadcrumbs:a}=IK({meta:r}),l=st(),s=Gn(),{Link:u}=Bt(),c=l==="legacy"?u:s,{hasDashboard:d}=dn(),{resources:f}=Je(),m=WL("/",f);if(a.length===1)return null;let p=Oe(h=>k.createElement(Ur,{...h,component:c}),"LinkRouter");return k.createElement(KFe,{"aria-label":"breadcrumb",sx:{paddingY:2,paddingX:2,...(e==null?void 0:e.sx)??{}},...e},t&&(d||m.found)&&k.createElement(p,{underline:"hover",sx:{display:"flex",alignItems:"center"},color:"inherit",to:"/"},((i=(o=m==null?void 0:m.resource)==null?void 0:o.meta)==null?void 0:i.icon)??k.createElement(w3,{sx:{fontSize:"18px"}})),a.map(({label:h,icon:y,href:b})=>k.createElement(_c,{key:h,sx:{display:"flex",alignItems:"center","& .MuiSvgIcon-root":{fontSize:"16px"}}},!n&&y,b?k.createElement(p,{underline:"hover",sx:{display:"flex",alignItems:"center",fontSize:"14px"},color:"inherit",to:b,variant:"subtitle1",marginLeft:.5},h):k.createElement(Xe,{fontSize:"14px"},h))))},"Breadcrumb"),WAe=Oe(({status:e,elements:{success:t=k.createElement(Lh,{key:"autoSave.success",defaultMessage:"saved",icon:k.createElement(E3,{fontSize:"small"})}),error:n=k.createElement(Lh,{key:"autoSave.error",defaultMessage:"auto save failure",icon:k.createElement(P3,{fontSize:"small"})}),loading:r=k.createElement(Lh,{key:"autoSave.loading",defaultMessage:"saving...",icon:k.createElement(S3,{fontSize:"small"})}),idle:o=k.createElement(Lh,{key:"autoSave.idle",defaultMessage:"waiting for changes",icon:k.createElement(C3,{fontSize:"small"})})}={}})=>k.createElement(sQ,{status:e,elements:{success:t,error:n,loading:r,idle:o}}),"AutoSaveIndicator"),Lh=Oe(({key:e,defaultMessage:t,icon:n})=>{let r=Qe();return k.createElement(Xe,{color:"gray",fontSize:"0.8rem",position:"relative",display:"flex",alignItems:"center",flexWrap:"wrap",marginRight:".3rem"},r(e,t),k.createElement("span",{style:{position:"relative",top:"3px",marginLeft:"3px"}},n))},"Message"),GAe={mode:"light",primary:{main:"#67be23",contrastText:"#fff"},secondary:{main:"#2A132E",contrastText:"#fff"},background:{default:"#f0f0f0",paper:"#ffffff"},success:{main:"#67be23",contrastText:"#fff"},error:{main:"#fa541c",contrastText:"#fff"},warning:{main:"#fa8c16",contrastText:"#fff"},info:{main:"#0b82f0",contrastText:"#fff"},divider:"rgba(0,0,0,0)",text:{primary:"#626262",secondary:"#9f9f9f",disabled:"#c1c1c1"}},qAe={mode:"dark",primary:{main:"#67be23",contrastText:"#fff"},secondary:{main:"#2A132E",contrastText:"#fff"},background:{default:"#212121",paper:"#242424"},success:{main:"#67be23",contrastText:"#fff"},error:{main:"#ee2a1e",contrastText:"#fff"},warning:{main:"#fa8c16",contrastText:"#fff"},info:{main:"#1890ff",contrastText:"#fff"},divider:"rgba(0,0,0,0)",text:{primary:"#fff",secondary:"rgba(255,255,255,0.7)",disabled:"#d1d1d1"}},KAe={fontFamily:["Montserrat","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(",")},TT={Blue:{mode:"light",primary:{main:"#1976D2",light:"#4791db",dark:"#115293"}},BlueDark:{mode:"dark",primary:{main:"#67b7f7",light:"#85c5f8",dark:"#4880ac"}},Purple:{mode:"light",primary:{main:"#7B1FA2",light:"#954bb4",dark:"#561571"}},PurpleDark:{mode:"dark",primary:{main:"#AB47BC",light:"#bb6bc9",dark:"#773183"}},Magenta:{mode:"light",primary:{main:"#C2185B",light:"#ce467b",dark:"#87103f"}},MagentaDark:{mode:"dark",primary:{main:"#EC407A",light:"#ef6694",dark:"#a52c55"}},Red:{mode:"light",primary:{main:"#D32F2F",light:"#db5858",dark:"#932020"}},RedDark:{mode:"dark",primary:{main:"#EF5350",light:"#f27573",dark:"#a73a38"}},Orange:{mode:"light",primary:{main:"#F57C00",light:"#f79633",dark:"#ab5600"}},OrangeDark:{mode:"dark",primary:{main:"#FFA726",light:"#ffb851",dark:"#b2741a"}},Yellow:{mode:"light",primary:{main:"#FFA000",light:"#ffb333",dark:"#b27000"}},YellowDark:{mode:"dark",primary:{main:"#FFCA28",light:"#ffd453",dark:"#E87040"}},Green:{mode:"light",primary:{main:"#689F38",light:"#86b25f",dark:"#486f27"}},GreenDark:{mode:"dark",primary:{main:"#9CCC65",light:"#afd683",dark:"#6d8e46"}}},A3={shape:{borderRadius:6},typography:{...KAe}};om({...A3,palette:GAe,components:{MuiAppBar:{styleOverrides:{colorDefault:{backgroundColor:"#fff"}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01))"}}},MuiTypography:{styleOverrides:{h5:{fontWeight:800,lineHeight:"2rem"}}}}});om({...A3,palette:qAe,components:{MuiPaper:{styleOverrides:{root:{backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025))"}}},MuiAppBar:{defaultProps:{color:"transparent"}},MuiTypography:{styleOverrides:{h5:{fontWeight:800,lineHeight:"2rem"}}}}});var _T=Object.keys(TT).reduce((e,t)=>{let n=t;return{...e,[t]:om({palette:{...TT[n]},components:{MuiButton:{styleOverrides:{root:({ownerState:r})=>({...r.variant==="contained"&&r.color==="primary"&&{color:"#fff"}})}}}})}},{}),QAe=Oe(()=>{let{closeSnackbar:e,enqueueSnackbar:t}=Rre();return{open:({message:n,type:r,undoableTimeout:o,key:i,cancelMutation:a,description:l})=>{r==="progress"?t(k.createElement(k.Fragment,null,k.createElement(HAe,{undoableTimeout:o??0,message:n})),{action:Oe(s=>k.createElement(Nn,{onClick:()=>{a==null||a(),e(s)},color:"inherit"},k.createElement(k3,null)),"action"),anchorOrigin:{vertical:"top",horizontal:"right"},preventDuplicate:!0,key:i,autoHideDuration:(o??0)*1e3,disableWindowBlurListener:!0}):t(k.createElement(Ke,null,k.createElement(Xe,{variant:"subtitle2",component:"h6"},l),k.createElement(Xe,{variant:"caption",component:"p"},n)),{key:i,variant:r,anchorOrigin:{vertical:"top",horizontal:"right"},disableWindowBlurListener:!0})},close:n=>{e(n)}}},"useNotificationProvider"),YAe=QAe,XAe=de(Mre)` &.SnackbarItem-contentRoot { background-color: ${e=>e.theme.palette.background.default}; color: ${e=>e.theme.palette.primary.main}; } &.SnackbarItem-variantSuccess { background-color: ${e=>e.theme.palette.success.main}; color: ${e=>e.theme.palette.success.contrastText}; } &.SnackbarItem-variantError { background-color: ${e=>e.theme.palette.error.main}; color: ${e=>e.theme.palette.error.contrastText}; } &.SnackbarItem-variantInfo { background-color: ${e=>e.theme.palette.info.main}; color: ${e=>e.theme.palette.info.contrastText}; } &.SnackbarItem-variantWarning { background-color: ${e=>e.theme.palette.warning.main}; color: ${e=>e.theme.palette.warning.contrastText}; } `;const ZAe=(e,t)=>I({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),JAe=e=>I({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),eLe=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([a,l])=>{var s;r[e.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(s=l.palette)==null?void 0:s.mode}});let o=I({html:ZAe(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:I({margin:0},JAe(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const i=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function tLe(e){const t=Ue({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return N.jsxs(v.Fragment,{children:[N.jsx(dP,{styles:o=>eLe(o,r)}),n]})}/** * @remix-run/router v1.15.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Tp(){return Tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function L3(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rLe(){return Math.random().toString(36).substr(2,8)}function AT(e,t){return{usr:e.state,key:e.key,idx:t}}function hC(e,t,n,r){return n===void 0&&(n=null),Tp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_d(t):t,{state:n,key:t&&t.key||r||rLe()})}function _v(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function _d(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function oLe(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=jl.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(Tp({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){l=jl.Pop;let y=c(),b=y==null?null:y-u;u=y,s&&s({action:l,location:h.location,delta:b})}function f(y,b){l=jl.Push;let g=hC(h.location,y,b);n&&n(g,y),u=c()+1;let x=AT(g,u),w=h.createHref(g);try{a.pushState(x,"",w)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(w)}i&&s&&s({action:l,location:h.location,delta:1})}function m(y,b){l=jl.Replace;let g=hC(h.location,y,b);n&&n(g,y),u=c();let x=AT(g,u),w=h.createHref(g);a.replaceState(x,"",w),i&&s&&s({action:l,location:h.location,delta:0})}function p(y){let b=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof y=="string"?y:_v(y);return g=g.replace(/ $/,"%20"),xn(b,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,b)}let h={get action(){return l},get location(){return e(o,a)},listen(y){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(FT,d),s=y,()=>{o.removeEventListener(FT,d),s=null}},createHref(y){return t(o,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(y){return a.go(y)}};return h}var LT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(LT||(LT={}));function iLe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?_d(t):t,o=zk(r.pathname||"/",n);if(o==null)return null;let i=D3(e);aLe(i);let a=null;for(let l=0;a==null&&l{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(xn(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Zl([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(xn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),D3(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:pLe(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let s of N3(i.path))o(i,a,s)}),t}function N3(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=N3(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function aLe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mLe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lLe=/^:[\w-]+$/,sLe=3,uLe=2,cLe=1,dLe=10,fLe=-2,DT=e=>e==="*";function pLe(e,t){let n=e.split("/"),r=n.length;return n.some(DT)&&(r+=fLe),t&&(r+=uLe),n.filter(o=>!DT(o)).reduce((o,i)=>o+(lLe.test(i)?sLe:i===""?cLe:dLe),r)}function mLe(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 hLe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{let{paramName:f,isOptional:m}=c;if(f==="*"){let h=l[d]||"";a=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}const p=l[d];return m&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function gLe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),L3(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,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function vLe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return L3(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function zk(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 yLe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?_d(e):e;return{pathname:n?n.startsWith("/")?n:bLe(n,t):t,search:CLe(r),hash:SLe(o)}}function bLe(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 tx(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 and the router will parse it for you.'}function xLe(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Bk(e,t){let n=xLe(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Hk(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=_d(e):(o=Tp({},e),xn(!o.pathname||!o.pathname.includes("?"),tx("?","pathname","search",o)),xn(!o.pathname||!o.pathname.includes("#"),tx("#","pathname","hash",o)),xn(!o.search||!o.search.includes("#"),tx("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}l=d>=0?t[d]:"/"}let s=yLe(o,l),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Zl=e=>e.join("/").replace(/\/\/+/g,"/"),wLe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),CLe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SLe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ELe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const z3=["post","put","patch","delete"];new Set(z3);const PLe=["get",...z3];new Set(PLe);/** * React Router v6.22.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),v.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=Hk(u,JSON.parse(a),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Zl([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,i,e])}const OLe=v.createContext(null);function MLe(e){let t=v.useContext(pa).outlet;return t&&v.createElement(OLe.Provider,{value:e},t)}function RLe(){let{matches:e}=v.useContext(pa),t=e[e.length-1];return t?t.params:{}}function V3(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(fl),{matches:o}=v.useContext(pa),{pathname:i}=na(),a=JSON.stringify(Bk(o,r.v7_relativeSplatPath));return v.useMemo(()=>Hk(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function TLe(e,t){return _Le(e,t)}function _Le(e,t,n,r){Fd()||xn(!1);let{navigator:o}=v.useContext(fl),{matches:i}=v.useContext(pa),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let u=na(),c;if(t){var d;let y=typeof t=="string"?_d(t):t;s==="/"||(d=y.pathname)!=null&&d.startsWith(s)||xn(!1),c=y}else c=u;let f=c.pathname||"/",m=f;if(s!=="/"){let y=s.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=iLe(e,{pathname:m}),h=NLe(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Zl([s,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Zl([s,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&h?v.createElement(Q0.Provider,{value:{location:_p({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:jl.Pop}},h):h}function FLe(){let e=HLe(),t=ELe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}const ALe=v.createElement(FLe,null);class LLe extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(pa.Provider,{value:this.props.routeContext},v.createElement(B3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DLe(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(Vk);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(pa.Provider,{value:t},r)}function NLe(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let c=a.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id]));c>=0||xn(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let m,p=!1,h=null,y=null;n&&(m=l&&d.route.id?l[d.route.id]:void 0,h=d.route.errorElement||ALe,s&&(u<0&&f===0?(ULe("route-fallback",!1),p=!0,y=null):u===f&&(p=!0,y=d.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,f+1)),g=()=>{let x;return m?x=h:p?x=y:d.route.Component?x=v.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=c,v.createElement(DLe,{match:d,routeContext:{outlet:c,matches:b,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(LLe,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:g(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):g()},null)}var U3=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(U3||{}),Av=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Av||{});function jLe(e){let t=v.useContext(Vk);return t||xn(!1),t}function zLe(e){let t=v.useContext(kLe);return t||xn(!1),t}function BLe(e){let t=v.useContext(pa);return t||xn(!1),t}function W3(e){let t=BLe(),n=t.matches[t.matches.length-1];return n.route.id||xn(!1),n.route.id}function HLe(){var e;let t=v.useContext(B3),n=zLe(Av.UseRouteError),r=W3(Av.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function VLe(){let{router:e}=jLe(U3.UseNavigateStable),t=W3(Av.UseNavigateStable),n=v.useRef(!1);return H3(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,_p({fromRouteId:t},i)))},[e,t])}const NT={};function ULe(e,t,n){!t&&!NT[e]&&(NT[e]=!0)}function G3(e){let{to:t,replace:n,state:r,relative:o}=e;Fd()||xn(!1);let{future:i,static:a}=v.useContext(fl),{matches:l}=v.useContext(pa),{pathname:s}=na(),u=Fv(),c=Hk(t,Bk(l,i.v7_relativeSplatPath),s,o==="path"),d=JSON.stringify(c);return v.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:o}),[u,d,o,n,r]),null}function jT(e){return MLe(e.context)}function br(e){xn(!1)}function WLe(e){let{basename:t="/",children:n=null,location:r,navigationType:o=jl.Pop,navigator:i,static:a=!1,future:l}=e;Fd()&&xn(!1);let s=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:s,navigator:i,static:a,future:_p({v7_relativeSplatPath:!1},l)}),[s,l,i,a]);typeof r=="string"&&(r=_d(r));let{pathname:c="/",search:d="",hash:f="",state:m=null,key:p="default"}=r,h=v.useMemo(()=>{let y=zk(c,s);return y==null?null:{location:{pathname:y,search:d,hash:f,state:m,key:p},navigationType:o}},[s,c,d,f,m,p,o]);return h==null?null:v.createElement(fl.Provider,{value:u},v.createElement(Q0.Provider,{children:n,value:h}))}function GLe(e){let{children:t,location:n}=e;return TLe(gC(t),n)}new Promise(()=>{});function gC(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,o)=>{if(!v.isValidElement(r))return;let i=[...t,o];if(r.type===v.Fragment){n.push.apply(n,gC(r.props.children,i));return}r.type!==br&&xn(!1),!r.props.index||!r.props.children||xn(!1);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,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary: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=gC(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.22.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function vC(){return vC=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function KLe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QLe(e,t){return e.button===0&&(!t||t==="_self")&&!KLe(e)}const YLe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],XLe="6";try{window.__reactRouterVersion=XLe}catch{}const ZLe="startTransition",zT=yg[ZLe];function JLe(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=nLe({window:o,v5Compat:!0}));let a=i.current,[l,s]=v.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&zT?zT(()=>s(d)):s(d)},[s,u]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(WLe,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const eDe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tDe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nDe=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:d}=t,f=qLe(t,YLe),{basename:m}=v.useContext(fl),p,h=!1;if(typeof u=="string"&&tDe.test(u)&&(p=u,eDe))try{let x=new URL(window.location.href),w=u.startsWith("//")?new URL(x.protocol+u):new URL(u),P=zk(w.pathname,m);w.origin===x.origin&&P!=null?u=P+w.search+w.hash:h=!0}catch{}let y=$Le(u,{relative:o}),b=rDe(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:o,unstable_viewTransition:d});function g(x){r&&r(x),x.defaultPrevented||b(x)}return v.createElement("a",vC({},f,{href:p||y,onClick:h||i?r:g,ref:n,target:s}))});var BT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(BT||(BT={}));var HT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(HT||(HT={}));function rDe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,s=Fv(),u=na(),c=V3(e,{relative:a});return v.useCallback(d=>{if(QLe(d,n)){d.preventDefault();let f=r!==void 0?r:_v(u)===_v(c);s(e,{replace:f,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l})}},[u,s,c,r,o,n,e,i,a,l])}var VT=e=>{if(typeof e>"u")return e;let t=Number(e);return`${t}`===e?t:e},oDe={addQueryPrefix:!0,skipNulls:!0,arrayFormat:"indices",encode:!1,encodeValuesOnly:!0},iDe={go:()=>{let{search:e,hash:t}=na(),n=Fv();return v.useCallback(({to:r,type:o,query:i,hash:a,options:{keepQuery:l,keepHash:s}={}})=>{let u={...l&&e&&Jh.parse(e,{ignoreQueryPrefix:!0}),...i};u.to&&(u.to=encodeURIComponent(`${u.to}`));let c=Object.keys(u).length>0,d=`#${(a||s&&t||"").replace(/^#/,"")}`,f=d.length>1,m=`${r||""}${c?Jh.stringify(u,oDe):""}${f?d:""}`;return o==="path"?m:n(m,{replace:o==="replace"})},[t,e,n])},back:()=>{let e=Fv();return v.useCallback(()=>{e(-1)},[e])},parse:()=>{var e;let t=RLe(),{pathname:n,search:r}=na(),{resources:o}=v.useContext(Wp),{resource:i,action:a,matchedRoute:l}=k.useMemo(()=>WL(n,o),[o,n]);return Object.entries(t).length===0&&l&&(t=((e=j3(l,n))==null?void 0:e.params)||{}),v.useCallback(()=>{let s=Jh.parse(r,{ignoreQueryPrefix:!0}),u={...t,...s};return{...i&&{resource:i},...a&&{action:a},...(t==null?void 0:t.id)&&{id:decodeURIComponent(t.id)},pathname:n,params:{...u,current:VT(u.current),pageSize:VT(u.pageSize),to:u.to?decodeURIComponent(u.to):void 0}}},[n,r,t,i,a])},Link:k.forwardRef(function(e,t){return k.createElement(nDe,{...e,ref:t})})},UT=({resource:e,meta:t})=>{let n=Kp(),{resource:r,resources:o}=Je(e),i=r||o.find(a=>a.list);if(i){let a=n({resource:i,action:"list",meta:t});return a?k.createElement(G3,{to:a}):(console.warn("No resource is found to navigate to."),null)}return console.warn("No resource is found to navigate to."),null};function aDe(e,t=!0){let{navigator:n}=k.useContext(fl);k.useEffect(()=>{if(!t)return;let r=n.go,o=n.push;return n.push=(...i)=>{e()!==!1&&o(...i)},n.go=(...i)=>{e()!==!1&&r(...i)},()=>{n.push=o,n.go=r}},[n,e,t])}function lDe(e,t=!0,n,r=!1){let o=k.useCallback(a=>(a.preventDefault(),a.returnValue=e,a.returnValue),[e]);k.useEffect(()=>(t&&!r&&window.addEventListener("beforeunload",o),()=>{window.removeEventListener("beforeunload",o)}),[o,t,r]);let i=k.useCallback(()=>{let a=window.confirm(e);return a&&n&&n(),a},[e]);aDe(i,t)}var sDe=({translationKey:e="warnWhenUnsavedChanges",message:t="Are you sure you want to leave? You have unsaved changes."})=>{let n=Qe(),{pathname:r}=na(),{warnWhen:o,setWarnWhen:i}=tl();k.useEffect(()=>()=>i==null?void 0:i(!1),[r]);let a=k.useMemo(()=>n(e,t),[e,t,n]);return lDe(a,o,()=>{i==null||i(!1)}),null},uDe=({to:e})=>{let{pathname:t,search:n}=na(),r=`${t}${n}`,o=r.length>1?`?to=${encodeURIComponent(r)}`:"";return k.createElement(G3,{to:`${e}${o}`})};function cDe({handler:e}){var t;let n=na(),{action:r,id:o,params:i,pathname:a,resource:l}=Qo(),s=Qe(),u=aa(),c=(l==null?void 0:l.identifier)??(l==null?void 0:l.name),d=(l==null?void 0:l.label)??((t=l==null?void 0:l.meta)==null?void 0:t.label)??u(c,r==="list"?"plural":"singular");return v.useLayoutEffect(()=>{let f=XL(s,l,r,`${o}`,d);e?document.title=e({action:r,resource:l,params:i,pathname:a,autoGeneratedTitle:f}):document.title=f},[n]),k.createElement(k.Fragment,null)}var tc={},dDe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),q3="%[a-f0-9]{2}",WT=new RegExp("("+q3+")|([^%]+?)","gi"),GT=new RegExp("("+q3+")+","gi");function yC(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],yC(n),yC(r))}function fDe(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(WT)||[],n=1;n{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]},gDe=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;ig==null,a=Symbol("encodeFragmentIdentifier");function l(g){switch(g.arrayFormat){case"index":return x=>(w,P)=>{const C=w.length;return P===void 0||g.skipNull&&P===null||g.skipEmptyString&&P===""?w:P===null?[...w,[c(x,g),"[",C,"]"].join("")]:[...w,[c(x,g),"[",c(C,g),"]=",c(P,g)].join("")]};case"bracket":return x=>(w,P)=>P===void 0||g.skipNull&&P===null||g.skipEmptyString&&P===""?w:P===null?[...w,[c(x,g),"[]"].join("")]:[...w,[c(x,g),"[]=",c(P,g)].join("")];case"colon-list-separator":return x=>(w,P)=>P===void 0||g.skipNull&&P===null||g.skipEmptyString&&P===""?w:P===null?[...w,[c(x,g),":list="].join("")]:[...w,[c(x,g),":list=",c(P,g)].join("")];case"comma":case"separator":case"bracket-separator":{const x=g.arrayFormat==="bracket-separator"?"[]=":"=";return w=>(P,C)=>C===void 0||g.skipNull&&C===null||g.skipEmptyString&&C===""?P:(C=C===null?"":C,P.length===0?[[c(w,g),x,c(C,g)].join("")]:[[P,c(C,g)].join(g.arrayFormatSeparator)])}default:return x=>(w,P)=>P===void 0||g.skipNull&&P===null||g.skipEmptyString&&P===""?w:P===null?[...w,c(x,g)]:[...w,[c(x,g),"=",c(P,g)].join("")]}}function s(g){let x;switch(g.arrayFormat){case"index":return(w,P,C)=>{if(x=/\[(\d*)\]$/.exec(w),w=w.replace(/\[\d*\]$/,""),!x){C[w]=P;return}C[w]===void 0&&(C[w]={}),C[w][x[1]]=P};case"bracket":return(w,P,C)=>{if(x=/(\[\])$/.exec(w),w=w.replace(/\[\]$/,""),!x){C[w]=P;return}if(C[w]===void 0){C[w]=[P];return}C[w]=[].concat(C[w],P)};case"colon-list-separator":return(w,P,C)=>{if(x=/(:list)$/.exec(w),w=w.replace(/:list$/,""),!x){C[w]=P;return}if(C[w]===void 0){C[w]=[P];return}C[w]=[].concat(C[w],P)};case"comma":case"separator":return(w,P,C)=>{const E=typeof P=="string"&&P.includes(g.arrayFormatSeparator),S=typeof P=="string"&&!E&&d(P,g).includes(g.arrayFormatSeparator);P=S?d(P,g):P;const M=E||S?P.split(g.arrayFormatSeparator).map(O=>d(O,g)):P===null?P:d(P,g);C[w]=M};case"bracket-separator":return(w,P,C)=>{const E=/(\[\])$/.test(w);if(w=w.replace(/\[\]$/,""),!E){C[w]=P&&d(P,g);return}const S=P===null?[]:P.split(g.arrayFormatSeparator).map(M=>d(M,g));if(C[w]===void 0){C[w]=S;return}C[w]=[].concat(C[w],S)};default:return(w,P,C)=>{if(C[w]===void 0){C[w]=P;return}C[w]=[].concat(C[w],P)}}}function u(g){if(typeof g!="string"||g.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(g,x){return x.encode?x.strict?t(g):encodeURIComponent(g):g}function d(g,x){return x.decode?n(g):g}function f(g){return Array.isArray(g)?g.sort():typeof g=="object"?f(Object.keys(g)).sort((x,w)=>Number(x)-Number(w)).map(x=>g[x]):g}function m(g){const x=g.indexOf("#");return x!==-1&&(g=g.slice(0,x)),g}function p(g){let x="";const w=g.indexOf("#");return w!==-1&&(x=g.slice(w)),x}function h(g){g=m(g);const x=g.indexOf("?");return x===-1?"":g.slice(x+1)}function y(g,x){return x.parseNumbers&&!Number.isNaN(Number(g))&&typeof g=="string"&&g.trim()!==""?g=Number(g):x.parseBooleans&&g!==null&&(g.toLowerCase()==="true"||g.toLowerCase()==="false")&&(g=g.toLowerCase()==="true"),g}function b(g,x){x=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},x),u(x.arrayFormatSeparator);const w=s(x),P=Object.create(null);if(typeof g!="string"||(g=g.trim().replace(/^[?#&]/,""),!g))return P;for(const C of g.split("&")){if(C==="")continue;let[E,S]=r(x.decode?C.replace(/\+/g," "):C,"=");S=S===void 0?null:["comma","separator","bracket-separator"].includes(x.arrayFormat)?S:d(S,x),w(d(E,x),S,P)}for(const C of Object.keys(P)){const E=P[C];if(typeof E=="object"&&E!==null)for(const S of Object.keys(E))E[S]=y(E[S],x);else P[C]=y(E,x)}return x.sort===!1?P:(x.sort===!0?Object.keys(P).sort():Object.keys(P).sort(x.sort)).reduce((C,E)=>{const S=P[E];return S&&typeof S=="object"&&!Array.isArray(S)?C[E]=f(S):C[E]=S,C},Object.create(null))}e.extract=h,e.parse=b,e.stringify=(g,x)=>{if(!g)return"";x=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},x),u(x.arrayFormatSeparator);const w=S=>x.skipNull&&i(g[S])||x.skipEmptyString&&g[S]==="",P=l(x),C={};for(const S of Object.keys(g))w(S)||(C[S]=g[S]);const E=Object.keys(C);return x.sort!==!1&&E.sort(x.sort),E.map(S=>{const M=g[S];return M===void 0?"":M===null?c(S,x):Array.isArray(M)?M.length===0&&x.arrayFormat==="bracket-separator"?c(S,x)+"[]":M.reduce(P(S),[]).join("&"):c(S,x)+"="+c(M,x)}).filter(S=>S.length>0).join("&")},e.parseUrl=(g,x)=>{x=Object.assign({decode:!0},x);const[w,P]=r(g,"#");return Object.assign({url:w.split("?")[0]||"",query:b(h(g),x)},x&&x.parseFragmentIdentifier&&P?{fragmentIdentifier:d(P,x)}:{})},e.stringifyUrl=(g,x)=>{x=Object.assign({encode:!0,strict:!0,[a]:!0},x);const w=m(g.url).split("?")[0]||"",P=e.extract(g.url),C=e.parse(P,{sort:!1}),E=Object.assign(C,g.query);let S=e.stringify(E,x);S&&(S=`?${S}`);let M=p(g.url);return g.fragmentIdentifier&&(M=`#${x[a]?c(g.fragmentIdentifier,x):g.fragmentIdentifier}`),`${w}${S}${M}`},e.pick=(g,x,w)=>{w=Object.assign({parseFragmentIdentifier:!0,[a]:!1},w);const{url:P,query:C,fragmentIdentifier:E}=e.parseUrl(g,w);return e.stringifyUrl({url:P,query:o(C,x),fragmentIdentifier:E},w)},e.exclude=(g,x,w)=>{const P=Array.isArray(x)?C=>!x.includes(C):(C,E)=>!x(C,E);return e.pick(g,P,w)}})(tc);const vDe=e=>{switch(e){case"ne":case"gte":case"lte":return`_${e}`;case"contains":return"_like";default:return""}},qT=e=>{if(e&&e.length>0){const t=[],n=[];return e.map(r=>{t.push(r.field),n.push(r.order)}),{_sort:t,_order:n}}},KT=e=>{const t={};return e&&e.map(n=>{if(n.operator==="or"||n.operator==="and")throw new Error(`[@refinedev/simple-rest]: \`operator: ${n.operator}\` is not supported. You can create custom data provider. https://refine.dev/docs/api-reference/core/providers/data-provider/#creating-a-data-provider`);if("field"in n){const{field:r,operator:o,value:i}=n;if(r==="q"){t[r]=i;return}const a=vDe(o);t[`${r}${a}`]=i}}),t};function K3(e,t){return function(){return e.apply(t,arguments)}}const{toString:yDe}=Object.prototype,{getPrototypeOf:Uk}=Object,Y0=(e=>t=>{const n=yDe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ma=e=>(e=e.toLowerCase(),t=>Y0(t)===e),X0=e=>t=>typeof t===e,{isArray:Ad}=Array,Fp=X0("undefined");function bDe(e){return e!==null&&!Fp(e)&&e.constructor!==null&&!Fp(e.constructor)&&jo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Q3=ma("ArrayBuffer");function xDe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Q3(e.buffer),t}const wDe=X0("string"),jo=X0("function"),Y3=X0("number"),Z0=e=>e!==null&&typeof e=="object",CDe=e=>e===!0||e===!1,hg=e=>{if(Y0(e)!=="object")return!1;const t=Uk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},SDe=ma("Date"),EDe=ma("File"),PDe=ma("Blob"),kDe=ma("FileList"),$De=e=>Z0(e)&&jo(e.pipe),IDe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||jo(e.append)&&((t=Y0(e))==="formdata"||t==="object"&&jo(e.toString)&&e.toString()==="[object FormData]"))},ODe=ma("URLSearchParams"),MDe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ad(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Z3=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),J3=e=>!Fp(e)&&e!==Z3;function bC(){const{caseless:e}=J3(this)&&this||{},t={},n=(r,o)=>{const i=e&&X3(t,o)||o;hg(t[i])&&hg(r)?t[i]=bC(t[i],r):hg(r)?t[i]=bC({},r):Ad(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Fm(t,(o,i)=>{n&&jo(o)?e[i]=K3(o,n):e[i]=o},{allOwnKeys:r}),e),TDe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_De=(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)},FDe=(e,t,n,r)=>{let o,i,a;const l={};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))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&Uk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ADe=(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},LDe=e=>{if(!e)return null;if(Ad(e))return e;let t=e.length;if(!Y3(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},DDe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Uk(Uint8Array)),NDe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},jDe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zDe=ma("HTMLFormElement"),BDe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),QT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),HDe=ma("RegExp"),eB=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fm(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},VDe=e=>{eB(e,(t,n)=>{if(jo(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(jo(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+"'")})}})},UDe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Ad(e)?r(e):r(String(e).split(t)),n},WDe=()=>{},GDe=(e,t)=>(e=+e,Number.isFinite(e)?e:t),nx="abcdefghijklmnopqrstuvwxyz",YT="0123456789",tB={DIGIT:YT,ALPHA:nx,ALPHA_DIGIT:nx+nx.toUpperCase()+YT},qDe=(e=16,t=tB.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function KDe(e){return!!(e&&jo(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const QDe=e=>{const t=new Array(10),n=(r,o)=>{if(Z0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Ad(r)?[]:{};return Fm(r,(a,l)=>{const s=n(a,o+1);!Fp(s)&&(i[l]=s)}),t[o]=void 0,i}}return r};return n(e,0)},YDe=ma("AsyncFunction"),XDe=e=>e&&(Z0(e)||jo(e))&&jo(e.then)&&jo(e.catch),Se={isArray:Ad,isArrayBuffer:Q3,isBuffer:bDe,isFormData:IDe,isArrayBufferView:xDe,isString:wDe,isNumber:Y3,isBoolean:CDe,isObject:Z0,isPlainObject:hg,isUndefined:Fp,isDate:SDe,isFile:EDe,isBlob:PDe,isRegExp:HDe,isFunction:jo,isStream:$De,isURLSearchParams:ODe,isTypedArray:DDe,isFileList:kDe,forEach:Fm,merge:bC,extend:RDe,trim:MDe,stripBOM:TDe,inherits:_De,toFlatObject:FDe,kindOf:Y0,kindOfTest:ma,endsWith:ADe,toArray:LDe,forEachEntry:NDe,matchAll:jDe,isHTMLForm:zDe,hasOwnProperty:QT,hasOwnProp:QT,reduceDescriptors:eB,freezeMethods:VDe,toObjectSet:UDe,toCamelCase:BDe,noop:WDe,toFiniteNumber:GDe,findKey:X3,global:Z3,isContextDefined:J3,ALPHABET:tB,generateString:qDe,isSpecCompliantForm:KDe,toJSONObject:QDe,isAsyncFn:YDe,isThenable:XDe};function yt(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)}Se.inherits(yt,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:Se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const nB=yt.prototype,rB={};["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=>{rB[e]={value:e}});Object.defineProperties(yt,rB);Object.defineProperty(nB,"isAxiosError",{value:!0});yt.from=(e,t,n,r,o,i)=>{const a=Object.create(nB);return Se.toFlatObject(e,a,function(s){return s!==Error.prototype},l=>l!=="isAxiosError"),yt.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ZDe=null;function xC(e){return Se.isPlainObject(e)||Se.isArray(e)}function oB(e){return Se.endsWith(e,"[]")?e.slice(0,-2):e}function XT(e,t,n){return e?e.concat(t).map(function(o,i){return o=oB(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function JDe(e){return Se.isArray(e)&&!e.some(xC)}const eNe=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function J0(e,t,n){if(!Se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!Se.isUndefined(y[h])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Se.isDate(p))return p.toISOString();if(!s&&Se.isBlob(p))throw new yt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(p)||Se.isTypedArray(p)?s&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,y){let b=p;if(p&&!y&&typeof p=="object"){if(Se.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(Se.isArray(p)&&JDe(p)||(Se.isFileList(p)||Se.endsWith(h,"[]"))&&(b=Se.toArray(p)))return h=oB(h),b.forEach(function(x,w){!(Se.isUndefined(x)||x===null)&&t.append(a===!0?XT([h],w,i):a===null?h:h+"[]",u(x))}),!1}return xC(p)?!0:(t.append(XT(y,h,i),u(p)),!1)}const d=[],f=Object.assign(eNe,{defaultVisitor:c,convertValue:u,isVisitable:xC});function m(p,h){if(!Se.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(p),Se.forEach(p,function(b,g){(!(Se.isUndefined(b)||b===null)&&o.call(t,b,Se.isString(g)?g.trim():g,h,f))===!0&&m(b,h?h.concat(g):[g])}),d.pop()}}if(!Se.isObject(e))throw new TypeError("data must be an object");return m(e),t}function ZT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wk(e,t){this._pairs=[],e&&J0(e,this,t)}const iB=Wk.prototype;iB.append=function(t,n){this._pairs.push([t,n])};iB.toString=function(t){const n=t?function(r){return t.call(this,r,ZT)}:ZT;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function tNe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aB(e,t,n){if(!t)return e;const r=n&&n.encode||tNe,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Se.isURLSearchParams(t)?t.toString():new Wk(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nNe{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){Se.forEach(this.handlers,function(r){r!==null&&t(r)})}}const JT=nNe,lB={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rNe=typeof URLSearchParams<"u"?URLSearchParams:Wk,oNe=typeof FormData<"u"?FormData:null,iNe=typeof Blob<"u"?Blob:null,aNe={isBrowser:!0,classes:{URLSearchParams:rNe,FormData:oNe,Blob:iNe},protocols:["http","https","file","blob","url","data"]},sB=typeof window<"u"&&typeof document<"u",lNe=(e=>sB&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),sNe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),uNe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sB,hasStandardBrowserEnv:lNe,hasStandardBrowserWebWorkerEnv:sNe},Symbol.toStringTag,{value:"Module"})),Hi={...uNe,...aNe};function cNe(e,t){return J0(e,new Hi.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Hi.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function dNe(e){return Se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fNe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&Se.isArray(o)?o.length:a,s?(Se.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!l):((!o[a]||!Se.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Se.isArray(o[a])&&(o[a]=fNe(o[a])),!l)}if(Se.isFormData(e)&&Se.isFunction(e.entries)){const n={};return Se.forEachEntry(e,(r,o)=>{t(dNe(r),o,n,0)}),n}return null}function pNe(e,t,n){if(Se.isString(e))try{return(t||JSON.parse)(e),Se.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gk={transitional:lB,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Se.isObject(t);if(i&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return o?JSON.stringify(uB(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cNe(t,this.formSerializer).toString();if((l=Se.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return J0(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),pNe(t)):t}],transformResponse:[function(t){const n=this.transitional||Gk.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Se.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?yt.from(l,yt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Hi.classes.FormData,Blob:Hi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],e=>{Gk.headers[e]={}});const qk=Gk,mNe=Se.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"]),hNe=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]&&mNe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},e_=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function gg(e){return e===!1||e==null?e:Se.isArray(e)?e.map(gg):String(e)}function gNe(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 vNe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rx(e,t,n,r,o){if(Se.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function yNe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bNe(e,t){const n=Se.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})})}class eb{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(l,s,u){const c=ff(s);if(!c)throw new Error("header name must be a non-empty string");const d=Se.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||s]=gg(l))}const a=(l,s)=>Se.forEach(l,(u,c)=>i(u,c,s));return Se.isPlainObject(t)||t instanceof this.constructor?a(t,n):Se.isString(t)&&(t=t.trim())&&!vNe(t)?a(hNe(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=ff(t),t){const r=Se.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return gNe(o);if(Se.isFunction(n))return n.call(this,o,r);if(Se.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ff(t),t){const r=Se.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||rx(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=ff(a),a){const l=Se.findKey(r,a);l&&(!n||rx(r,r[l],l,n))&&(delete r[l],o=!0)}}return Se.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||rx(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Se.forEach(this,(o,i)=>{const a=Se.findKey(r,i);if(a){n[a]=gg(o),delete n[i];return}const l=t?yNe(i):String(i).trim();l!==i&&delete n[i],n[l]=gg(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Se.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Se.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(` `)}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[e_]=this[e_]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=ff(a);r[l]||(bNe(o,a),r[l]=!0)}return Se.isArray(t)?t.forEach(i):i(t),this}}eb.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Se.reduceDescriptors(eb.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Se.freezeMethods(eb);const za=eb;function ox(e,t){const n=this||qk,r=t||n,o=za.from(r.headers);let i=r.data;return Se.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function cB(e){return!!(e&&e.__CANCEL__)}function Am(e,t,n){yt.call(this,e??"canceled",yt.ERR_CANCELED,t,n),this.name="CanceledError"}Se.inherits(Am,yt,{__CANCEL__:!0});function xNe(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new yt("Request failed with status code "+n.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const wNe=Hi.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Se.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&a.push("path="+r),Se.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 CNe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SNe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dB(e,t){return e&&!CNe(t)?SNe(e,t):t}const ENe=Hi.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const l=Se.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function PNe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kNe(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(s){const u=Date.now(),c=r[i];a||(a=u),n[o]=s,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-n,s=r(l),u=i<=a;n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:s||void 0,estimated:s&&a&&u?(a-i)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const $Ne=typeof XMLHttpRequest<"u",INe=$Ne&&function(e){return new Promise(function(n,r){let o=e.data;const i=za.from(e.headers).normalize();let{responseType:a,withXSRFToken:l}=e,s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}let c;if(Se.isFormData(o)){if(Hi.hasStandardBrowserEnv||Hi.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[h,...y]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([h||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+y))}const f=dB(e.baseURL,e.url);d.open(e.method.toUpperCase(),aB(f,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function m(){if(!d)return;const h=za.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:e,request:d};xNe(function(x){n(x),u()},function(x){r(x),u()},b),d=null}if("onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(r(new yt("Request aborted",yt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new yt("Network Error",yt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||lB;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new yt(y,b.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,e,d)),d=null},Hi.hasStandardBrowserEnv&&(l&&Se.isFunction(l)&&(l=l(e)),l||l!==!1&&ENe(f))){const h=e.xsrfHeaderName&&e.xsrfCookieName&&wNe.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in d&&Se.forEach(i.toJSON(),function(y,b){d.setRequestHeader(b,y)}),Se.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&a!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",t_(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",t_(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{d&&(r(!h||h.type?new Am(null,e,d):h),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=PNe(f);if(p&&Hi.protocols.indexOf(p)===-1){r(new yt("Unsupported protocol "+p+":",yt.ERR_BAD_REQUEST,e));return}d.send(o||null)})},wC={http:ZDe,xhr:INe};Se.forEach(wC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const n_=e=>`- ${e}`,ONe=e=>Se.isFunction(e)||e===null||e===!1,fB={getAdapter:e=>{e=Se.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${l} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : `+i.map(n_).join(` `):" "+n_(i[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:wC};function ix(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Am(null,e)}function r_(e){return ix(e),e.headers=za.from(e.headers),e.data=ox.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fB.getAdapter(e.adapter||qk.adapter)(e).then(function(r){return ix(e),r.data=ox.call(e,e.transformResponse,r),r.headers=za.from(r.headers),r},function(r){return cB(r)||(ix(e),r&&r.response&&(r.response.data=ox.call(e,e.transformResponse,r.response),r.response.headers=za.from(r.response.headers))),Promise.reject(r)})}const o_=e=>e instanceof za?e.toJSON():e;function ad(e,t){t=t||{};const n={};function r(u,c,d){return Se.isPlainObject(u)&&Se.isPlainObject(c)?Se.merge.call({caseless:d},u,c):Se.isPlainObject(c)?Se.merge({},c):Se.isArray(c)?c.slice():c}function o(u,c,d){if(Se.isUndefined(c)){if(!Se.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!Se.isUndefined(c))return r(void 0,c)}function a(u,c){if(Se.isUndefined(c)){if(!Se.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const s={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:l,headers:(u,c)=>o(o_(u),o_(c),!0)};return Se.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||o,f=d(e[c],t[c],c);Se.isUndefined(f)&&d!==l||(n[c]=f)}),n}const pB="1.6.7",Kk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const i_={};Kk.transitional=function(t,n,r){function o(i,a){return"[Axios v"+pB+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,l)=>{if(t===!1)throw new yt(o(a," has been removed"+(n?" in "+n:"")),yt.ERR_DEPRECATED);return n&&!i_[a]&&(i_[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function MNe(e,t,n){if(typeof e!="object")throw new yt("options must be an object",yt.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 l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new yt("option "+i+" must be "+s,yt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new yt("Unknown option "+i,yt.ERR_BAD_OPTION)}}const CC={assertOptions:MNe,validators:Kk},vl=CC.validators;class Lv{constructor(t){this.defaults=t,this.interceptors={request:new JT,response:new JT}}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/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ad(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&CC.assertOptions(r,{silentJSONParsing:vl.transitional(vl.boolean),forcedJSONParsing:vl.transitional(vl.boolean),clarifyTimeoutError:vl.transitional(vl.boolean)},!1),o!=null&&(Se.isFunction(o)?n.paramsSerializer={serialize:o}:CC.assertOptions(o,{encode:vl.function,serialize:vl.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Se.merge(i.common,i[n.method]);i&&Se.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=za.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(s=s&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,d=0,f;if(!s){const p=[r_.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d{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(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Am(i,a,l),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)}static source(){let t;return{token:new Qk(function(o){t=o}),cancel:t}}}const RNe=Qk;function TNe(e){return function(n){return e.apply(null,n)}}function _Ne(e){return Se.isObject(e)&&e.isAxiosError===!0}const SC={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(SC).forEach(([e,t])=>{SC[t]=e});const FNe=SC;function mB(e){const t=new vg(e),n=K3(vg.prototype.request,t);return Se.extend(n,vg.prototype,t,{allOwnKeys:!0}),Se.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return mB(ad(e,o))},n}const _n=mB(qk);_n.Axios=vg;_n.CanceledError=Am;_n.CancelToken=RNe;_n.isCancel=cB;_n.VERSION=pB;_n.toFormData=J0;_n.AxiosError=yt;_n.Cancel=_n.CanceledError;_n.all=function(t){return Promise.all(t)};_n.spread=TNe;_n.isAxiosError=_Ne;_n.mergeConfig=ad;_n.AxiosHeaders=za;_n.formToJSON=e=>uB(Se.isHTMLForm(e)?new FormData(e):e);_n.getAdapter=fB.getAdapter;_n.HttpStatusCode=FNe;_n.default=_n;const ANe=_n,hB=ANe.create();hB.interceptors.response.use(e=>e,e=>{var n,r,o;const t={...e,message:(r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message,statusCode:(o=e.response)==null?void 0:o.status};return Promise.reject(t)});const ax=(e,t=hB)=>({getList:async({resource:n,pagination:r,filters:o,sorters:i,meta:a})=>{const l=`${e}/${n}`,{current:s=1,pageSize:u=10,mode:c="server"}=r??{},{headers:d,method:f}=a??{},m=f??"get",p=KT(o),h={};c==="server"&&(h._start=(s-1)*u,h._end=s*u);const y=qT(i);if(y){const{_sort:C,_order:E}=y;h._sort=C.join(","),h._order=E.join(",")}const b={...h,...p},g=Object.keys(b).length?`${l}?${tc.stringify(b)}`:l,{data:x,headers:w}=await t[m](g,{headers:d}),P=+w["x-total-count"];return{data:x,total:P||x.length}},getMany:async({resource:n,ids:r,meta:o})=>{const{headers:i,method:a}=o??{},l=a??"get",{data:s}=await t[l](`${e}/${n}?${tc.stringify({id:r})}`,{headers:i});return{data:s}},create:async({resource:n,variables:r,meta:o})=>{const i=`${e}/${n}`,{headers:a,method:l}=o??{},s=l??"post",{data:u}=await t[s](i,r,{headers:a});return{data:u}},update:async({resource:n,id:r,variables:o,meta:i})=>{const a=`${e}/${n}/${r}`,{headers:l,method:s}=i??{},u=s??"patch",{data:c}=await t[u](a,o,{headers:l});return{data:c}},getOne:async({resource:n,id:r,meta:o})=>{const i=`${e}/${n}/${r}`,{headers:a,method:l}=o??{},s=l??"get",{data:u}=await t[s](i,{headers:a});return{data:u}},deleteOne:async({resource:n,id:r,variables:o,meta:i})=>{const a=`${e}/${n}/${r}`,{headers:l,method:s}=i??{},u=s??"delete",{data:c}=await t[u](a,{data:o,headers:l});return{data:c}},getApiUrl:()=>e,custom:async({url:n,method:r,filters:o,sorters:i,payload:a,query:l,headers:s})=>{let u=`${n}?`;if(i){const f=qT(i);if(f){const{_sort:m,_order:p}=f,h={_sort:m.join(","),_order:p.join(",")};u=`${u}&${tc.stringify(h)}`}}if(o){const f=KT(o);u=`${u}&${tc.stringify(f)}`}l&&(u=`${u}&${tc.stringify(l)}`);let c;switch(r){case"put":case"post":case"patch":c=await t[r](n,a,{headers:s});break;case"delete":c=await t.delete(n,{data:a,headers:s});break;default:c=await t.get(u,{headers:s});break}const{data:d}=c;return Promise.resolve({data:d})}}),Dh="refine-auth",LNe={login:async({username:e,email:t,password:n})=>(e||t)&&n?(localStorage.setItem(Dh,e),{success:!0,redirectTo:"/"}):{success:!1,error:{name:"LoginError",message:"Invalid username or password"}},logout:async()=>(localStorage.removeItem(Dh),{success:!0,redirectTo:"/login"}),check:async()=>localStorage.getItem(Dh)?{authenticated:!0}:{authenticated:!1,redirectTo:"/login"},getPermissions:async()=>null,getIdentity:async()=>localStorage.getItem(Dh)?{id:1,name:"John Doe",avatar:"https://i.pravatar.cc/300"}:null,onError:async e=>(console.error(e),{error:e})},tb=()=>N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",children:N.jsxs("g",{fill:"currentColor",children:[N.jsx("path",{d:"M8 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"}),N.jsx("path",{"fill-rule":"evenodd",d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.333 4a2.667 2.667 0 0 1 5.334 0v8a2.667 2.667 0 1 1-5.334 0z","clip-rule":"evenodd"})]})});var Yk={},DNe=wt;Object.defineProperty(Yk,"__esModule",{value:!0});var gB=Yk.default=void 0,NNe=DNe($t()),jNe=N;gB=Yk.default=(0,NNe.default)((0,jNe.jsx)("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined");var Xk={},zNe=wt;Object.defineProperty(Xk,"__esModule",{value:!0});var vB=Xk.default=void 0,BNe=zNe($t()),HNe=N;vB=Xk.default=(0,BNe.default)((0,HNe.jsx)("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined");const yB=v.createContext({}),VNe=({children:e})=>{const t=localStorage.getItem("colorMode"),r=(window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)").matches)?"dark":"light",[o,i]=v.useState(t||r);v.useEffect(()=>{window.localStorage.setItem("colorMode",o)},[o]);const a=()=>{i(o==="light"?"dark":"light")};return N.jsx(yB.Provider,{value:{setMode:a,mode:o},children:N.jsx(Jne,{theme:o==="light"?_T.Blue:_T.BlueDark,children:e})})},UNe=({sticky:e=!0})=>{const{mode:t,setMode:n}=v.useContext(yB),{data:r}=md();return N.jsx(s0,{position:e?"sticky":"relative",children:N.jsx(sm,{children:N.jsxs(dr,{direction:"row",width:"100%",justifyContent:"flex-end",alignItems:"center",children:[N.jsx(I3,{}),N.jsxs(dr,{direction:"row",width:"100%",justifyContent:"flex-end",alignItems:"center",children:[N.jsx(Nn,{color:"inherit",onClick:()=>{n()},children:t==="dark"?N.jsx(vB,{}):N.jsx(gB,{})}),((r==null?void 0:r.avatar)||(r==null?void 0:r.name))&&N.jsxs(dr,{direction:"row",gap:"16px",alignItems:"center",justifyContent:"center",children:[(r==null?void 0:r.name)&&N.jsx(Xe,{sx:{display:{xs:"none",sm:"inline-block"}},variant:"subtitle2",children:r==null?void 0:r.name}),N.jsx(u0,{src:r==null?void 0:r.avatar,alt:r==null?void 0:r.name})]})]})]})})})},WNe=()=>N.jsx(Nk,{type:"forgotPassword",title:N.jsx(dl,{collapsed:!1,text:"Refine Project",icon:N.jsx(tb,{})})}),GNe=()=>N.jsx(Nk,{type:"login",title:N.jsx(dl,{collapsed:!1,text:"Refine Project",icon:N.jsx(tb,{})}),formProps:{defaultValues:{email:"demo@refine.dev",password:"demodemo"}}}),qNe=()=>N.jsx(Nk,{type:"register",title:N.jsx(dl,{collapsed:!1,text:"Refine Project",icon:N.jsx(tb,{})})});var Zk={},KNe=wt;Object.defineProperty(Zk,"__esModule",{value:!0});var EC=Zk.default=void 0,QNe=KNe($t()),YNe=N;EC=Zk.default=(0,QNe.default)((0,YNe.jsx)("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 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"}),"HighlightOffOutlined");var Jk={},XNe=wt;Object.defineProperty(Jk,"__esModule",{value:!0});var PC=Jk.default=void 0;e4e(v);var ZNe=XNe($t()),JNe=N;function bB(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(bB=function(r){return r?n:t})(e)}function e4e(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=bB(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}PC=Jk.default=(0,ZNe.default)((0,JNe.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-2-3.5l6-4.5-6-4.5z"}),"PlayCircleFilledWhiteOutlined");var e$={},t4e=wt;Object.defineProperty(e$,"__esModule",{value:!0});var kC=e$.default=void 0,n4e=t4e($t()),r4e=N;kC=e$.default=(0,n4e.default)((0,r4e.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");const o4e=({objId:e,status:t,onChange:n})=>{Qe();const{palette:r}=Rr(),o=r.mode==="dark";ev();let i="",a;const l="started",s="stopped",u="off",[c,d]=v.useState(null),f=!!c,m=w=>{d(w.currentTarget)},p=()=>{d(null)},h=()=>{d(null),n("started")},y=()=>{d(null),n("stopped")},b=()=>{d(null),n("off")},g=(w,P)=>w!==P;switch(t){case"off":i=o?Os[200]:Os[800],a=N.jsx(EC,{sx:{fill:o?Os[200]:Os[600]}});break;case"started":i=o?_o[200]:_o[800],a=N.jsx(PC,{sx:{fill:o?_o[200]:_o[600]}});break;case"stopped":i=o?To[200]:To[800],a=N.jsx(kC,{sx:{fill:o?To[200]:To[600]}});break}const x=()=>{let w=[];return g(t,l)&&w.push(N.jsxs(uo,{id:"chip-menu-Item-1",onClick:h,children:[N.jsx(vn,{children:N.jsx(PC,{sx:{fill:o?_o[200]:_o[600]}})}),"Start"]},1)),g(t,s)&&w.push(N.jsxs(uo,{id:"chip-menu-Item-2",onClick:y,children:[N.jsx(vn,{children:N.jsx(kC,{sx:{fill:o?To[200]:To[600]}})}),"Stop"]},2)),g(t,u)&&w.push(N.jsxs(uo,{id:"chip-menu-Item-3",onClick:b,children:[N.jsx(vn,{children:N.jsx(EC,{sx:{fill:o?Os[200]:Os[600]}})}),"Deactivate"]},3)),w};return N.jsxs("div",{children:[N.jsx(E0,{id:"MonChip1",variant:"outlined",size:"medium",icon:a,sx:{borderColor:i,color:i,width:100,alignItems:"center",justifyContent:"left"},label:t,onClick:m},"MonChip"),N.jsx(Tj,{anchorEl:c,id:"monStatus-menu",open:f,onClose:p,onClick:p,children:x()},"monchip-menu")]})},i4e=()=>{const e="monitorings",{dataGridProps:t}=Dk({syncWithLocation:!0,dataProviderName:e,pagination:{mode:"client",pageSize:10}}),{mutate:n}=ev(),r=k.useMemo(()=>[{field:"name",flex:1,headerName:"Name",type:"string",minWidth:250},{field:"created_at",flex:1,headerName:"Created at",minWidth:30,renderCell:function({value:i}){return N.jsx(jk,{value:i})}},{field:"samplerate",flex:.3,headerName:"Samplerate/Hz",renderCell:function({row:i}){return N.jsx(ja,{value:i.samplerate,options:{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0}})},minWidth:120},{field:"sampleperiod",flex:.3,headerName:"Period/s",renderCell:function({row:i}){return N.jsx(ja,{value:i.sampleperiod,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"downtime",flex:.3,headerName:"Downtime/s",renderCell:function({row:i}){return N.jsx(ja,{value:i.downtime,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"owner",flex:1,headerName:"Owner",type:"string",minWidth:80},{field:"status",headerName:"Status",width:124,editable:!0,renderCell:function({row:i}){return N.jsx(o4e,{objId:i.id,status:i.status,onChange:a=>{n({resource:e,id:i.id,values:{status:a}})}},"MonStatus1")}},{field:"actions",headerName:"Actions",sortable:!1,renderCell:function({row:i}){return N.jsxs(N.Fragment,{children:[N.jsx(M3,{hideText:!0,recordItemId:i.id}),N.jsx(BAe,{hideText:!0,recordItemId:i.id}),N.jsx(_m,{hideText:!0,recordItemId:i.id})]})},align:"center",headerAlign:"center",minWidth:80}],[]);return N.jsx(O3,{children:N.jsx(TP,{...t,columns:r,autoHeight:!0})})};function a4e(e){return Be("MuiDialogContent",e)}He("MuiDialogContent",["root","dividers"]);const l4e=["className","dividers"],s4e=e=>{const{classes:t,dividers:n}=e;return Ie({root:["root",n&&"dividers"]},a4e,t)},u4e=de("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>I({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${ywe.root} + &`]:{paddingTop:0}})),c4e=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=r,a=ue(r,l4e),l=I({},r,{dividers:i}),s=s4e(l);return N.jsx(u4e,I({className:he(s.root,o),ownerState:l,ref:n},a))}),d4e=c4e;function f4e(e){return Be("MuiListItem",e)}const p4e=He("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),nc=p4e;function m4e(e){return Be("MuiListItemSecondaryAction",e)}He("MuiListItemSecondaryAction",["root","disableGutters"]);const h4e=["className"],g4e=e=>{const{disableGutters:t,classes:n}=e;return Ie({root:["root",t&&"disableGutters"]},m4e,n)},v4e=de("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>I({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),xB=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=r,i=ue(r,h4e),a=v.useContext(vi),l=I({},r,{disableGutters:a.disableGutters}),s=g4e(l);return N.jsx(v4e,I({className:he(s.root,o),ownerState:l,ref:n},i))});xB.muiName="ListItemSecondaryAction";const y4e=xB,b4e=["className"],x4e=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],w4e=(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.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},C4e=e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:s,hasSecondaryAction:u,selected:c}=e;return Ie({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",s&&"divider",i&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",c&&"selected"],container:["container"]},f4e,r)},S4e=de("div",{name:"MuiListItem",slot:"Root",overridesResolver:w4e})(({theme:e,ownerState:t})=>I({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&I({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Xu.root}`]:{paddingRight:48}},{[`&.${nc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${nc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${nc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:rt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${nc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{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"}},[`&.${nc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:rt(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})`:rt(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),E4e=de("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),P4e=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:a=!1,children:l,className:s,component:u,components:c={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:m}={},dense:p=!1,disabled:h=!1,disableGutters:y=!1,disablePadding:b=!1,divider:g=!1,focusVisibleClassName:x,secondaryAction:w,selected:P=!1,slotProps:C={},slots:E={}}=r,S=ue(r.ContainerProps,b4e),M=ue(r,x4e),O=v.useContext(vi),R=v.useMemo(()=>({dense:p||O.dense||!1,alignItems:o,disableGutters:y}),[o,O.dense,p,y]),_=v.useRef(null);Rt(()=>{i&&_.current&&_.current.focus()},[i]);const D=v.Children.toArray(l),T=D.length&&jf(D[D.length-1],["ListItemSecondaryAction"]),F=I({},r,{alignItems:o,autoFocus:i,button:a,dense:R.dense,disabled:h,disableGutters:y,disablePadding:b,divider:g,hasSecondaryAction:T,selected:P}),j=C4e(F),$=vt(_,n),L=E.root||c.Root||S4e,z=C.root||d.root||{},B=I({className:he(j.root,z.className,s),disabled:h},M);let A=u||"li";return a&&(B.component=u||"div",B.focusVisibleClassName=he(nc.focusVisible,x),A=Zi),T?(A=!B.component&&!u?"div":A,f==="li"&&(A==="li"?A="div":B.component==="li"&&(B.component="div")),N.jsx(vi.Provider,{value:R,children:N.jsxs(E4e,I({as:f,className:he(j.container,m),ref:$,ownerState:F},S,{children:[N.jsx(L,I({},z,!fu(L)&&{as:A,ownerState:I({},F,z.ownerState)},B,{children:D})),D.pop()]}))})):N.jsx(vi.Provider,{value:R,children:N.jsxs(L,I({},z,{as:A,ref:$},!fu(L)&&{ownerState:I({},F,z.ownerState)},B,{children:[D,w&&N.jsx(y4e,{children:w})]}))})}),k4e=P4e;function $4e(e){return Be("MuiToggleButton",e)}const I4e=He("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),bc=I4e,O4e=v.createContext({}),wB=O4e,M4e=v.createContext(void 0),CB=M4e;function R4e(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.indexOf(e)>=0:e===t}const T4e=["value"],_4e=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],F4e=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${pe(i)}`,a]};return Ie(l,$4e,t)},A4e=de(Zi,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${pe(n.size)}`]]}})(({theme:e,ownerState:t})=>{let n=t.color==="standard"?e.palette.text.primary:e.palette[t.color].main,r;return e.vars&&(n=t.color==="standard"?e.vars.palette.text.primary:e.vars.palette[t.color].main,r=t.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[t.color].mainChannel),I({},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},t.fullWidth&&{width:"100%"},{[`&.${bc.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})`:Cr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${bc.selected}`]:{color:n,backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:Cr(n,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${r} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Cr(n,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${r} / ${e.vars.palette.action.selectedOpacity})`:Cr(n,e.palette.action.selectedOpacity)}}}},t.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},t.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),L4e=v.forwardRef(function(t,n){const r=v.useContext(wB),{value:o}=r,i=ue(r,T4e),a=v.useContext(CB),l=rm(I({},i,{selected:R4e(t.value,o)}),t),s=Ue({props:l,name:"MuiToggleButton"}),{children:u,className:c,color:d="standard",disabled:f=!1,disableFocusRipple:m=!1,fullWidth:p=!1,onChange:h,onClick:y,selected:b,size:g="medium",value:x}=s,w=ue(s,_4e),P=I({},s,{color:d,disabled:f,disableFocusRipple:m,fullWidth:p,size:g}),C=F4e(P),E=M=>{y&&(y(M,x),M.defaultPrevented)||h&&h(M,x)},S=a||"";return N.jsx(A4e,I({className:he(i.className,C.root,c,S),disabled:f,focusRipple:!m,ref:n,onClick:E,onChange:h,value:x,ownerState:P,"aria-pressed":b},w,{children:u}))}),lx=L4e;function D4e(e){return Be("MuiToggleButtonGroup",e)}const N4e=He("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),rn=N4e,j4e=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],z4e=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${pe(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Ie(i,D4e,t)},B4e=de("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${rn.grouped}`]:t.grouped},{[`& .${rn.grouped}`]:t[`grouped${pe(n.orientation)}`]},{[`& .${rn.firstButton}`]:t.firstButton},{[`& .${rn.lastButton}`]:t.lastButton},{[`& .${rn.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(({ownerState:e,theme:t})=>I({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},e.orientation==="vertical"&&{flexDirection:"column"},e.fullWidth&&{width:"100%"},{[`& .${rn.grouped}`]:I({},e.orientation==="horizontal"?{[`&.${rn.selected} + .${rn.grouped}.${rn.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${rn.selected} + .${rn.grouped}.${rn.selected}`]:{borderTop:0,marginTop:0}})},e.orientation==="horizontal"?{[`& .${rn.firstButton},& .${rn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${rn.lastButton},& .${rn.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${rn.firstButton},& .${rn.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${rn.lastButton},& .${rn.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},e.orientation==="horizontal"?{[`& .${rn.lastButton}.${bc.disabled},& .${rn.middleButton}.${bc.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${rn.lastButton}.${bc.disabled},& .${rn.middleButton}.${bc.disabled}`]:{borderTop:"1px solid transparent"}})),H4e=v.forwardRef(function(t,n){const r=Ue({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:l=!1,exclusive:s=!1,fullWidth:u=!1,onChange:c,orientation:d="horizontal",size:f="medium",value:m}=r,p=ue(r,j4e),h=I({},r,{disabled:l,fullWidth:u,orientation:d,size:f}),y=z4e(h),b=v.useCallback((E,S)=>{if(!c)return;const M=m&&m.indexOf(S);let O;m&&M>=0?(O=m.slice(),O.splice(M,1)):O=m?m.concat(S):[S],c(E,O)},[c,m]),g=v.useCallback((E,S)=>{c&&c(E,m===S?null:S)},[c,m]),x=v.useMemo(()=>({className:y.grouped,onChange:s?g:b,value:m,size:f,fullWidth:u,color:a,disabled:l}),[y.grouped,s,g,b,m,f,u,a,l]),w=nte(o),P=w.length,C=E=>{const S=E===0,M=E===P-1;return S&&M?"":S?y.firstButton:M?y.lastButton:y.middleButton};return N.jsx(B4e,I({role:"group",className:he(y.root,i),ref:n,ownerState:h},p,{children:N.jsx(wB.Provider,{value:x,children:w.map((E,S)=>N.jsx(CB.Provider,{value:C(S),children:E},S))})}))}),V4e=H4e,U4e=()=>{var a,l,s,u,c;const{saveButtonProps:e,refineCore:{formLoading:t},setValue:n,register:r,control:o,formState:{errors:i}}=ol({});return N.jsx(NAe,{isLoading:t,saveButtonProps:e,children:N.jsxs(Ke,{component:"form",sx:{display:"flex",flexDirection:"column"},gap:2,autoComplete:"off",children:[N.jsx(Mn,{...r("name",{required:"The name is required"}),error:!!(i!=null&&i.name),helperText:(a=i==null?void 0:i.name)==null?void 0:a.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"text",label:"Name",name:"name"}),N.jsxs(dr,{direction:"row",spacing:2,alignItems:"center",justifyContent:"space-between",children:[N.jsx(Mn,{...r("samplerate",{required:"The samplerate is required"}),error:!!(i!=null&&i.samplerate),helperText:(l=i==null?void 0:i.samplerate)==null?void 0:l.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Samplerate",name:"samplerate",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"hz"})}}),N.jsx(Mn,{...r("sampleperiod",{required:"The sampleperiod is required"}),error:!!(i!=null&&i.sampleperiod),helperText:(s=i==null?void 0:i.sampleperiod)==null?void 0:s.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Sampleperiod",name:"sampleperiod",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"s"})}}),N.jsx(Mn,{...r("downtime",{required:"The downtime is required"}),error:!!(i!=null&&i.downtime),helperText:(u=i==null?void 0:i.downtime)==null?void 0:u.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Downtime",name:"downtime",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"s"})}})]}),N.jsx(yP,{children:N.jsx(B1e,{control:o,name:"status",defaultValue:"off",render:({field:d})=>N.jsxs(V4e,{id:"Status",...d,exclusive:!0,color:"primary",onChange:(f,m)=>(n("status",m,{shouldValidate:!0}),m),children:[N.jsx(lx,{value:"started",children:"Started"}),N.jsx(lx,{value:"stopped",children:"Stopped"}),N.jsx(lx,{value:"off",children:"Deactivated"})]})})}),N.jsx(Mn,{...r("owner",{required:"The downtime is required"}),error:!!(i!=null&&i.downtime),helperText:(c=i==null?void 0:i.downtime)==null?void 0:c.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},multiline:!0,label:"Owner",name:"owner"})]})})},W4e=()=>{var a,l,s,u,c,d;const{saveButtonProps:e,refineCore:{queryResult:t,formLoading:n},register:r,control:o,formState:{errors:i}}=ol({});return(a=t==null?void 0:t.data)==null||a.data,N.jsx(jAe,{dataProviderName:"monitorings",isLoading:n,saveButtonProps:e,children:N.jsxs(Ke,{component:"form",sx:{display:"flex",flexDirection:"column"},autoComplete:"off",children:[N.jsx(Mn,{...r("name",{required:"The name is required"}),error:!!(i!=null&&i.name),helperText:(l=i==null?void 0:i.name)==null?void 0:l.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"text",label:"Name",name:"name"}),N.jsx(Mn,{...r("samplerate",{required:"The samplerate is required"}),error:!!(i!=null&&i.samplerate),helperText:(s=i==null?void 0:i.samplerate)==null?void 0:s.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Samplerate",name:"samplerate",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"hz"})}}),N.jsx(Mn,{...r("sampleperiod",{required:"The sampleperiod is required"}),error:!!(i!=null&&i.sampleperiod),helperText:(u=i==null?void 0:i.sampleperiod)==null?void 0:u.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Sampleperiod",name:"sampleperiod",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"s"})}}),N.jsx(Mn,{...r("downtime",{required:"The downtime is required"}),error:!!(i!=null&&i.downtime),helperText:(c=i==null?void 0:i.downtime)==null?void 0:c.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},type:"number",label:"Downtime",name:"downtime",InputProps:{endAdornment:N.jsx(Zs,{position:"end",children:"s"})}}),N.jsx(Mn,{...r("owner",{required:"The downtime is required"}),error:!!(i!=null&&i.downtime),helperText:(d=i==null?void 0:i.downtime)==null?void 0:d.message,margin:"normal",fullWidth:!0,InputLabelProps:{shrink:!0},multiline:!0,label:"Owner",name:"owner"})]})})},G4e=tt(N.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"}),"Delete"),q4e=tt(N.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),K4e=tt(N.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"}),"Settings");var t$={},Q4e=wt;Object.defineProperty(t$,"__esModule",{value:!0});var SB=t$.default=void 0,Y4e=Q4e($t()),X4e=N;SB=t$.default=(0,Y4e.default)((0,X4e.jsx)("path",{d:"M20.13 5.41 18.72 4l-9.19 9.19-4.25-4.24-1.41 1.41 5.66 5.66zM5 18h14v2H5z"}),"DownloadDone");const sx={color:"primary"};function Z4e(e){const{onClose:t,elements:n,open:r,monitoringId:o}=e,[i,a]=v.useState([]),[l,s]=v.useState([]),d=sD("monitoringfiles")+"/monitoringfiles/download",f=()=>{let x=[],w={field:"monId",operator:"eq",value:o};x.push(w);for(let P=0;P{const w=x.name+"_"+x.timestamp,P="data:application/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(x)),C=document.createElement("a");C.setAttribute("href",P),C.setAttribute("download",w+".json"),document.body.appendChild(C),C.click(),C.remove()};v.useEffect(()=>{m&&m.data!=null&&a(m.data)},[m,p,h]),v.useEffect(()=>{if(i.length>0){y(i[0]);let x=[i[0],...l];s(x);let w=i;w.splice(0,1),a(w)}},[i,l]);const b=()=>{t(!1)},g=()=>{};return N.jsx(N.Fragment,{children:N.jsxs(b5,{open:r,"aria-label":"dialog-input",id:"input-dialog",onClose:b,disableEscapeKeyDown:!0,PaperProps:{sx},scroll:"body",TransitionProps:{onExited:g},transitionDuration:{enter:1e3,exit:1e3},sx:{"& .MuiDialog-paper":{minWidth:"75%",maxHeight:500}},maxWidth:"xs",children:[N.jsx(w5,{children:"Downloads"}),N.jsx(d4e,{dividers:!0,children:N.jsx(os,{sx:{pt:0,maxHeight:200},children:l.map(x=>N.jsxs(k4e,{disableGutters:!0,children:[N.jsx(Rn,{primary:x.name}),N.jsx(Rn,{primary:x.timestamp}),N.jsx(vn,{children:N.jsx(SB,{})})]},x.id))})}),N.jsxs(x5,{children:[N.jsx(jt,{autoFocus:!0,onClick:b,sx,children:"Cancel"}),N.jsx(jt,{onClick:b,sx,children:"Ok"})]})]})})}const J4e=({monfilterId:e,setDF:t})=>{const[n,r]=k.useState([]);n.length>0;const o="monitoringfiles",{dataGridProps:i}=Dk({syncWithLocation:!0,dataProviderName:o,pagination:{mode:"client",pageSize:10},filters:{initial:[{field:"monId",operator:"eq",value:e}]}});k.useState(!1);const a=s=>{r(s),t(s)},l=k.useMemo(()=>[{field:"name",flex:1,headerName:"Name",type:"string",minWidth:250},{field:"timestamp",flex:1,headerName:"Timestamp",minWidth:30,renderCell:function({value:u}){const c=new Date(u);return N.jsx(jk,{value:c,format:"DD-MM-YYYY hh:mm:ss A"})}},{field:"samplerate",flex:.3,headerName:"Samplerate/Hz",renderCell:function({row:u}){return N.jsx(ja,{value:u.samplerate,options:{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0}})},minWidth:120},{field:"sampleperiod",flex:.3,headerName:"Period/s",renderCell:function({row:u}){return N.jsx(ja,{value:u.sampleperiod,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"downtime",flex:.3,headerName:"Downtime/s",renderCell:function({row:u}){return N.jsx(ja,{value:u.downtime,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"actions",headerName:"Actions",sortable:!1,renderCell:function({row:u}){return N.jsx(N.Fragment,{children:N.jsx(_m,{hideText:!0,recordItemId:u.id})})},align:"center",headerAlign:"center",minWidth:80}],[]);return N.jsx(TP,{...i,columns:l,autoHeight:!0,checkboxSelection:!0,onRowSelectionModelChange:s=>{a(s)},rowSelectionModel:n})},a_=()=>{const n=sD("monitoringfiles")+"/monitoring/mondfaivalable",{data:r,isLoading:o,isError:i}=uD({url:n,method:"get"});let a=r==null?void 0:r.data;const[l,s]=v.useState(void 0),[u,c]=v.useState([]),d=u.length>0,[f,m]=v.useState(!1),[p,h]=v.useState(!0);v.useEffect(()=>{if(r!=null&&(r==null?void 0:r.data)!=null){let E=r.data[0];s(E),h(!1)}},[r,o,i]);const y=E=>{m(!1)},b=()=>{m(!0)},g=()=>{},x=()=>{},w=k.useMemo(()=>[{field:"name",flex:1,headerName:"Name",type:"string",minWidth:250},{field:"timestamp",flex:1,headerName:"Timestamp",minWidth:30,renderCell:function({value:S}){const M=new Date(S);return N.jsx(jk,{value:M,format:"DD-MM-YYYY hh:mm:ss A"})}},{field:"samplerate",flex:.3,headerName:"Samplerate/Hz",renderCell:function({row:S}){return N.jsx(ja,{value:S.samplerate,options:{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0}})},minWidth:120},{field:"sampleperiod",flex:.3,headerName:"Period/s",renderCell:function({row:S}){return N.jsx(ja,{value:S.sampleperiod,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"downtime",flex:.3,headerName:"Downtime/s",renderCell:function({row:S}){return N.jsx(ja,{value:S.downtime,options:{minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:3}})},minWidth:120},{field:"actions",headerName:"Actions",sortable:!1,renderCell:function({row:S}){return N.jsx(N.Fragment,{children:N.jsx(_m,{hideText:!0,recordItemId:S.id})})},align:"center",headerAlign:"center",minWidth:80}],[]);let P=null;f&&l!=null&&(P=N.jsx(Z4e,{monitoringId:l.id,elements:u,onClose:y,open:f}));let C=null;return a!=null&&a.length>0&&l!=null?C=N.jsx(J4e,{monfilterId:l.id,setDF:c}):C=N.jsx(TP,{rows:[],columns:w,autoHeight:!0}),N.jsxs(O3,{headerProps:{subheader:N.jsxs(dr,{direction:"row",children:[N.jsx(jt,{disabled:!d,startIcon:N.jsx(q4e,{color:"primary"}),onClick:b,children:"Download"}),N.jsx(jt,{disabled:!d,startIcon:N.jsx(G4e,{color:"primary"}),onClick:g,children:"Delete"}),N.jsx(jt,{startIcon:N.jsx(K4e,{color:"primary"}),onClick:x,children:"Settings"})]})},children:[C,P]})},eje="https://api.fake-rest.refine.dev",tje="/vrpmdvapi/1_0",nje="/vrpmdvapi/1_0";function rje(){return N.jsx(JLe,{children:N.jsx(QX,{children:N.jsxs(VNe,{children:[N.jsx(tLe,{}),N.jsx(dP,{styles:{html:{WebkitFontSmoothing:"auto"}}}),N.jsx(XAe,{children:N.jsxs(JK,{dataProvider:{default:ax(eje),monitorings:ax(tje),monitoringfiles:ax(nje)},notificationProvider:YAe,authProvider:LNe,routerProvider:iDe,resources:[{name:"monitorings",list:"/monitorings",create:"/monitorings/create",edit:"/monitorings/edit/:id",meta:{canDelete:!0,dataProviderName:"monitorings"}},{name:"monitoringfiles",list:"/monitoringfiles",meta:{canDelete:!0,dataProviderName:"monitoringfiles"}}],options:{syncWithLocation:!0,warnWhenUnsavedChanges:!0,useNewQueryKeys:!0,projectId:"4LRbGi-1874iA-m2rbd1"},children:[N.jsxs(GLe,{children:[N.jsxs(br,{element:N.jsx(bw,{fallback:N.jsx(uDe,{to:"/login"}),children:N.jsx(MAe,{Header:()=>N.jsx(UNe,{sticky:!0}),Title:({collapsed:e})=>N.jsx(dl,{collapsed:e,text:"VR Predictive Maintenance Device",icon:N.jsx(tb,{})}),children:N.jsx(jT,{})})},"authenticated-inner"),children:[N.jsx(br,{index:!0,element:N.jsx(UT,{resource:"monitorings"})}),N.jsxs(br,{path:"/monitorings",children:[N.jsx(br,{index:!0,element:N.jsx(i4e,{})}),N.jsx(br,{path:"create",element:N.jsx(U4e,{})}),N.jsx(br,{path:"edit/:id",element:N.jsx(W4e,{})}),N.jsx(br,{path:"datafiles/:id",element:N.jsx(a_,{})})]}),N.jsx(br,{path:"/monitoringfiles",children:N.jsx(br,{index:!0,element:N.jsx(a_,{})})}),N.jsx(br,{path:"*",element:N.jsx(_Ae,{})})]}),N.jsxs(br,{element:N.jsx(bw,{fallback:N.jsx(jT,{}),children:N.jsx(UT,{})},"authenticated-outer"),children:[N.jsx(br,{path:"/login",element:N.jsx(GNe,{})}),N.jsx(br,{path:"/register",element:N.jsx(qNe,{})}),N.jsx(br,{path:"/forgot-password",element:N.jsx(WNe,{})})]})]}),N.jsx(KX,{}),N.jsx(sDe,{}),N.jsx(cDe,{})]})})]})})})}const oje=document.getElementById("root"),ije=xA(oje);ije.render(N.jsx(k.StrictMode,{children:N.jsx(rje,{})}))});export default aje();