/*! For license information please see main.769f9215bbea89a7.js.LICENSE.txt */ (()=>{var e,t,n,r,o,i,a,s,l={40990:function(e,t,n){"use strict";n.d(t,{Z:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t2||T(b)>3?"":" "}function O(e,t){for(;--t&&C()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return M(e,_()+(t<6&&32==k()&&32==C()))}function A(e){for(;C();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&A(b);break;case 40:41===e&&A(e);break;case 92:C()}return y}function E(e,t){for(;C()&&e+b!==57&&(e+b!==84||47!==k()););return"/*"+M(t,y-1)+"*"+i(47===e?e:C())}function L(e){for(;!T(k());)C();return M(e,y)}var Z="-ms-",F="-moz-",j="-webkit-",N="comm",z="rule",B="decl",V="@keyframes";function $(e,t){for(var n="",r=p(e),o=0;o0&&h(V)-S&&f(T>32?K(V+";",r,n,S-1):K(l(V," ","")+";",r,n,S-2),p);break;case 59:V+=";";default:if(f(B=U(V,t,n,v,w,o,d,j,N=[],z=[],S),a),123===F)if(0===w)G(V,t,B,B,N,a,S,d,z);else switch(99===M&&110===c(V,3)?100:M){case 100:case 108:case 109:case 115:G(e,B,B,r&&f(U(e,B,B,0,0,o,d,j,o,N=[],S),z),o,z,S,d,r?N:z);break;default:G(V,B,B,B,[""],z,0,d,z)}}v=w=T=0,R=Z=1,j=V="",S=s;break;case 58:S=1+h(V),T=P;default:if(R<1)if(123==F)--R;else if(125==F&&0==R++&&125==(b=y>0?c(x,--y):0,g--,10===b&&(g=1,m--),b))continue;switch(V+=i(F),F*R){case 38:Z=w>0?1:(V+="\f",-1);break;case 44:d[v++]=(h(V)-1)*Z,Z=1;break;case 64:45===k()&&(V+=I(C())),M=k(),w=S=h(j=V+=L(_())),F++;break;case 45:45===P&&2==h(V)&&(R=0)}}return a}function U(e,t,n,r,i,a,u,c,h,f,m){for(var g=i-1,v=0===i?a:[""],y=p(v),b=0,x=0,S=0;b0?v[C]+" "+k:l(k,/&\f/g,v[C])))&&(h[S++]=_);return w(e,t,n,0===i?z:c,h,f,m)}function q(e,t,n){return w(e,t,n,N,i(b),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,B,d(e,0,r),d(e,r+1,-1),r)}var Y=function(e,t,n){for(var r=0,o=0;r=o,o=k(),38===r&&12===o&&(t[n]=1),!T(o);)C();return M(e,y)},X=function(e,t){return R(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=Y(y-1,t,n);break;case 2:e[n]+=I(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=C());return e}(P(e),t))},Q=new WeakMap,J=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var o=[],i=X(t,o),a=n.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+F+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,h(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+j)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===c(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+Z+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+Z+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case B:e.return=te(e.value,e.length);break;case V:return $([S(e,{value:l(e.value,"@","@"+j)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $([S(e,{props:[l(t,/:(plac\w+)/,":"+j+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,Z+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||ne,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;nr})},13726:function(e,t,n){"use strict";n.d(t,{E:()=>T,h:()=>C,T:()=>y,_:()=>g,c:()=>_,a:()=>w,u:()=>b,w:()=>v,i:()=>p,b:()=>S,C:()=>m});var r=n(27378),o=n(40990),i=n(70252),a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},s=n(55839),l=n.n(s),u=function(e,t){return l()(e,t)},c=n(53211),d=n(42747),h=n(37164),p=!1,f=r.createContext("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null),m=f.Provider,g=function(){return(0,r.useContext)(f)},v=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(f);return e(t,o,n)}))},y=r.createContext({}),b=function(){return r.useContext(y)},x=a((function(e){return a((function(t){return function(e,t){return"function"==typeof t?t(e):(0,i.Z)({},e,t)}(e,t)}))})),w=function(e){var t=r.useContext(y);return e.theme!==t&&(t=x(t)(e.theme)),r.createElement(y.Provider,{value:t},e.children)};function S(e){var t=e.displayName||e.name||"Component",n=r.forwardRef((function(t,n){var o=r.useContext(y);return r.createElement(e,(0,i.Z)({theme:o,ref:n},t))}));return n.displayName="WithTheme("+t+")",u(n,e)}var C={}.hasOwnProperty,k="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_=function(e,t){var n={};for(var r in t)C.call(t,r)&&(n[r]=t[r]);return n[k]=e,n},M=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,h.L)((function(){return(0,c.My)(t,n,r)})),null},T=v((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[k],a=[o],s="";"string"==typeof e.className?s=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=(0,d.O)(a,void 0,r.useContext(y));s+=t.key+"-"+l.name;var u={};for(var h in e)C.call(e,h)&&"css"!==h&&h!==k&&!p&&(u[h]=e[h]);return u.className=s,n&&(u.ref=n),r.createElement(r.Fragment,null,r.createElement(M,{cache:t,serialized:l,isStringTag:"string"==typeof i}),r.createElement(i,u))}))},10043:function(e,t,n){"use strict";n.r(t),n.d(t,{CacheProvider:()=>r.C,ClassNames:()=>f,Global:()=>u,ThemeContext:()=>r.T,ThemeProvider:()=>r.a,__unsafe_useEmotionCache:()=>r._,createElement:()=>l,css:()=>c,jsx:()=>l,keyframes:()=>d,useTheme:()=>r.u,withEmotionCache:()=>r.w,withTheme:()=>r.b});var r=n(13726),o=n(27378),i=n(53211),a=n(37164),s=n(42747),l=(n(40990),n(55839),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return o.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;sg});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(17960),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.Z)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:f}}},51958:function(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(70252),o=n(13726),i=n(42747),a=n(37164),s=n(53211),l=n(27378),u=n(17960),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,u.Z)((function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.hC)(t,n,r),(0,a.L)((function(){return(0,s.My)(t,n,r)})),null},g=function e(t,n){var a,u,c=t.__emotion_real===t,d=c&&t.__emotion_base||t;void 0!==n&&(a=n.label,u=n.target);var h=f(t,n,c),g=h||p(d),v=!g("as");return function(){var y=arguments,b=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{var x=y[0];b.push(x[0]);for(var w=y.length,S=1;Sa,j:()=>s});var o=n(27378),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},53211:function(e,t,n){"use strict";n.d(t,{My:()=>i,fp:()=>r,hC:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},49538:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(33711),c=n(28866),d=n(18810),h=n(18817),p=n(16351),f=n(44124),m=n(6749);function g(e){return(0,m.ZP)("MuiAccordion",e)}const v=(0,f.Z)("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]);var y=n(24246);const b=(0,a.ZP)(c.Z,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${v.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((0,s.Z)((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${v.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${v.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}})),(0,s.Z)((({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${v.expanded}`]:{margin:"16px 0"}}}]})))),x=(0,a.ZP)("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),w=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordion"}),{children:a,className:s,defaultExpanded:c=!1,disabled:f=!1,disableGutters:m=!1,expanded:v,onChange:w,square:S=!1,slots:C={},slotProps:k={},TransitionComponent:_,TransitionProps:M,...T}=n,[P,R]=(0,h.Z)({controlled:v,default:c,name:"Accordion",state:"expanded"}),I=r.useCallback((e=>{R(!P),w&&w(e,!P)}),[P,w,R]),[D,...O]=r.Children.toArray(a),A=r.useMemo((()=>({expanded:P,disabled:f,disableGutters:m,toggle:I})),[P,f,m,I]),E={...n,square:S,disabled:f,disableGutters:m,expanded:P},L=(e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:a}=e,s={root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!a&&"gutters"],heading:["heading"],region:["region"]};return(0,i.Z)(s,g,t)})(E),Z={slots:{transition:_,...C},slotProps:{transition:M,...k}},[F,j]=(0,p.Z)("heading",{elementType:x,externalForwardedProps:Z,className:L.heading,ownerState:E}),[N,z]=(0,p.Z)("transition",{elementType:u.Z,externalForwardedProps:Z,ownerState:E});return(0,y.jsxs)(b,{className:(0,o.Z)(L.root,s),ref:t,ownerState:E,square:S,...T,children:[(0,y.jsx)(F,{...j,children:(0,y.jsx)(d.Z.Provider,{value:A,children:D})}),(0,y.jsx)(N,{in:P,timeout:"auto",...z,children:(0,y.jsx)("div",{"aria-labelledby":D.props.id,id:D.props["aria-controls"],role:"region",className:L.region,children:O})})]})}))},18810:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},85474:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiAccordionDetails",e)}(0,u.Z)("MuiAccordionDetails",["root"]);var h=n(24246);const p=(0,a.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((({theme:e})=>({padding:e.spacing(1,2,2)})))),f=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordionDetails"}),{className:r,...a}=n,s=n,u=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(s);return(0,h.jsx)(p,{className:(0,o.Z)(u.root,r),ref:t,ownerState:s,...a})}))},56656:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(14544),c=n(18810),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiAccordionSummary",e)}const f=(0,d.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var m=n(24246);const g=(0,a.ZP)(u.Z,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${f.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${f.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${f.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${f.expanded}`]:{minHeight:64}}}]}}))),v=(0,a.ZP)("span",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((0,s.Z)((({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${f.expanded}`]:{margin:"20px 0"}}}]})))),y=(0,a.ZP)("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((0,s.Z)((({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${f.expanded}`]:{transform:"rotate(180deg)"}})))),b=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordionSummary"}),{children:a,className:s,expandIcon:u,focusVisibleClassName:d,onClick:h,...f}=n,{disabled:b=!1,disableGutters:x,expanded:w,toggle:S}=r.useContext(c.Z),C={...n,expanded:w,disabled:b,disableGutters:x},k=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e,a={root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,i.Z)(a,p,t)})(C);return(0,m.jsxs)(g,{focusRipple:!1,disableRipple:!0,disabled:b,"aria-expanded":w,className:(0,o.Z)(k.root,s),focusVisibleClassName:(0,o.Z)(k.focusVisible,d),onClick:e=>{S&&S(e),h&&h(e)},ref:t,ownerState:C,...f,children:[(0,m.jsx)(v,{className:k.content,ownerState:C,children:a}),u&&(0,m.jsx)(y,{className:k.expandIconWrapper,ownerState:C,children:u})]})}))},315:function(e,t,n){"use strict";n.d(t,{Z:()=>P});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(82319),u=n(24043),c=n(16351),d=n(51640),h=n(90433),p=n(28866),f=n(79602),m=n(75094),g=n(90247),v=n(24246);const y=(0,g.Z)((0,v.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),b=(0,g.Z)((0,v.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),x=(0,g.Z)((0,v.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),w=(0,g.Z)((0,v.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var S=n(23049);const C=(0,s.ZP)(p.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,d.Z)(n.color||n.severity)}`]]}})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?a._j:a.$n,n="light"===e.palette.mode?a.$n:a._j;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,h.Z)(["light"])).map((([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${f.Z.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}}))),...Object.entries(e.palette).filter((0,h.Z)(["light"])).map((([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${f.Z.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}}))),...Object.entries(e.palette).filter((0,h.Z)(["dark"])).map((([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}})))]}}))),k=(0,s.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),_=(0,s.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),M=(0,s.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),T={success:(0,v.jsx)(y,{fontSize:"inherit"}),warning:(0,v.jsx)(b,{fontSize:"inherit"}),error:(0,v.jsx)(x,{fontSize:"inherit"}),info:(0,v.jsx)(w,{fontSize:"inherit"})},P=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiAlert"}),{action:r,children:a,className:s,closeText:l="Close",color:h,components:p={},componentsProps:g={},icon:y,iconMapping:b=T,onClose:x,role:w="alert",severity:P="success",slotProps:R={},slots:I={},variant:D="standard",...O}=n,A={...n,color:h,severity:P,variant:D,colorSeverity:h||P},E=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,a={root:["root",`color${(0,d.Z)(n||r)}`,`${t}${(0,d.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,i.Z)(a,f.t,o)})(A),L={slots:{closeButton:p.CloseButton,closeIcon:p.CloseIcon,...I},slotProps:{...g,...R}},[Z,F]=(0,c.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,o.Z)(E.root,s),elementType:C,externalForwardedProps:{...L,...O},ownerState:A,additionalProps:{role:w,elevation:0}}),[j,N]=(0,c.Z)("icon",{className:E.icon,elementType:k,externalForwardedProps:L,ownerState:A}),[z,B]=(0,c.Z)("message",{className:E.message,elementType:_,externalForwardedProps:L,ownerState:A}),[V,$]=(0,c.Z)("action",{className:E.action,elementType:M,externalForwardedProps:L,ownerState:A}),[H,W]=(0,c.Z)("closeButton",{elementType:m.Z,externalForwardedProps:L,ownerState:A}),[G,U]=(0,c.Z)("closeIcon",{elementType:S.Z,externalForwardedProps:L,ownerState:A});return(0,v.jsxs)(Z,{...F,children:[!1!==y?(0,v.jsx)(j,{...N,children:y||b[P]||T[P]}):null,(0,v.jsx)(z,{...B,children:a}),null!=r?(0,v.jsx)(V,{...$,children:r}):null,null==r&&x?(0,v.jsx)(V,{...$,children:(0,v.jsx)(H,{size:"small","aria-label":l,title:l,color:"inherit",onClick:x,...W,children:(0,v.jsx)(G,{fontSize:"small",...U})})}):null]})}))},79602:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiAlert",e)}const a=(0,r.Z)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"])},13098:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(51640),c=n(90433),d=n(28866),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiAppBar",e)}(0,h.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var m=n(24246);const g=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,v=(0,a.ZP)(d.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,u.Z)(n.position)}`],t[`color${(0,u.Z)(n.color)}`]]}})((0,s.Z)((({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,c.Z)(["contrastText"])).map((([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}}))),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?g(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?g(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]})))),y=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAppBar"}),{className:r,color:a="primary",enableColorOnDark:s=!1,position:c="fixed",...d}=n,h={...n,color:a,position:c,enableColorOnDark:s},p=(e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${(0,u.Z)(t)}`,`position${(0,u.Z)(n)}`]};return(0,i.Z)(o,f,r)})(h);return(0,m.jsx)(v,{square:!0,component:"header",ownerState:h,elevation:4,className:(0,o.Z)(p.root,r,"fixed"===c&&"mui-fixed"),ref:t,...d})}))},11774:function(e,t,n){"use strict";n.d(t,{Z:()=>W});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(70678),l=n(75651),u=n(12709),c=n(82319),d=n(24043),h=n(51640),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiListSubheader",e)}(0,p.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var g=n(24246);const v=(0,u.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,h.Z)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((0,c.Z)((({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]})))),y=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiListSubheader"}),{className:r,color:a="default",component:s="li",disableGutters:l=!1,disableSticky:u=!1,inset:c=!1,...p}=n,f={...n,color:a,component:s,disableGutters:l,disableSticky:u,inset:c},y=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,s={root:["root","default"!==n&&`color${(0,h.Z)(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return(0,i.Z)(s,m,t)})(f);return(0,g.jsx)(v,{as:s,className:(0,o.Z)(y.root,r),ref:t,ownerState:f,...p})}));y&&(y.muiSkipListHighlight=!0);const b=y;var x=n(28866),w=n(75094),S=n(52889),C=n(28678),k=n(3597),_=n(8782),M=n(6499),T=n(23049),P=n(97686);function R(e){return(0,f.ZP)("MuiAutocomplete",e)}const I=(0,p.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var D,O,A=n(16351);const E=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${I.tag}`]:t.tag},{[`& .${I.tag}`]:t[`tagSize${(0,h.Z)(s)}`]},{[`& .${I.inputRoot}`]:t.inputRoot},{[`& .${I.input}`]:t.input},{[`& .${I.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${I.focused} .${I.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${I.clearIndicator}`]:{visibility:"visible"}},[`& .${I.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${I.inputRoot}`]:{[`.${I.hasPopupIcon}&, .${I.hasClearIcon}&`]:{paddingRight:30},[`.${I.hasPopupIcon}.${I.hasClearIcon}&`]:{paddingRight:56},[`& .${I.input}`]:{width:0,minWidth:30}},[`& .${C.Z.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${C.Z.root}.${k.Z.sizeSmall}`]:{[`& .${C.Z.input}`]:{padding:"2px 4px 3px 0"}},[`& .${_.Z.root}`]:{padding:9,[`.${I.hasPopupIcon}&, .${I.hasClearIcon}&`]:{paddingRight:39},[`.${I.hasPopupIcon}.${I.hasClearIcon}&`]:{paddingRight:65},[`& .${I.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${I.endAdornment}`]:{right:9}},[`& .${_.Z.root}.${k.Z.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${I.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${M.Z.root}`]:{paddingTop:19,paddingLeft:8,[`.${I.hasPopupIcon}&, .${I.hasClearIcon}&`]:{paddingRight:39},[`.${I.hasPopupIcon}.${I.hasClearIcon}&`]:{paddingRight:65},[`& .${M.Z.input}`]:{padding:"7px 4px"},[`& .${I.endAdornment}`]:{right:9}},[`& .${M.Z.root}.${k.Z.sizeSmall}`]:{paddingBottom:1,[`& .${M.Z.input}`]:{padding:"2.5px 4px"}},[`& .${k.Z.hiddenLabel}`]:{paddingTop:8},[`& .${M.Z.root}.${k.Z.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${I.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${M.Z.root}.${k.Z.hiddenLabel}.${k.Z.sizeSmall}`]:{[`& .${I.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${I.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${I.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${I.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${I.inputRoot}`]:{flexWrap:"wrap"}}}]}),L=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Z=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),F=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),j=(0,u.ZP)(l.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${I.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((0,c.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})))),N=(0,u.ZP)(x.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((0,c.Z)((({theme:e})=>({...e.typography.body1,overflow:"auto"})))),z=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),B=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),V=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((0,c.Z)((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${I.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"},[`&.${I.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"},[`&.${I.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})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${I.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${I.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})))),$=(0,u.ZP)(b,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((0,c.Z)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})))),H=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${I.option}`]:{paddingLeft:24}}),W=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiAutocomplete"}),{autoComplete:a=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:p=!1,ChipProps:f,className:m,clearIcon:v=D||(D=(0,g.jsx)(T.Z,{fontSize:"small"})),clearOnBlur:y=!n.freeSolo,clearOnEscape:b=!1,clearText:w="Clear",closeText:C="Close",componentsProps:k,defaultValue:_=(n.multiple?[]:null),disableClearable:M=!1,disableCloseOnSelect:I=!1,disabled:W=!1,disabledItemsFocusable:G=!1,disableListWrap:U=!1,disablePortal:q=!1,filterOptions:K,filterSelectedOptions:Y=!1,forcePopupIcon:X="auto",freeSolo:Q=!1,fullWidth:J=!1,getLimitTagsText:ee=e=>`+${e}`,getOptionDisabled:te,getOptionKey:ne,getOptionLabel:re,isOptionEqualToValue:oe,groupBy:ie,handleHomeEndKeys:ae=!n.freeSolo,id:se,includeInputInList:le=!1,inputValue:ue,limitTags:ce=-1,ListboxComponent:de,ListboxProps:he,loading:pe=!1,loadingText:fe="Loading…",multiple:me=!1,noOptionsText:ge="No options",onChange:ve,onClose:ye,onHighlightChange:be,onInputChange:xe,onOpen:we,open:Se,openOnFocus:Ce=!1,openText:ke="Open",options:_e,PaperComponent:Me,PopperComponent:Te,popupIcon:Pe=O||(O=(0,g.jsx)(P.Z,{})),readOnly:Re=!1,renderGroup:Ie,renderInput:De,renderOption:Oe,renderTags:Ae,selectOnFocus:Ee=!n.freeSolo,size:Le="medium",slots:Ze={},slotProps:Fe={},value:je,...Ne}=n,{getRootProps:ze,getInputProps:Be,getInputLabelProps:Ve,getPopupIndicatorProps:$e,getClearProps:He,getTagProps:We,getListboxProps:Ge,getOptionProps:Ue,value:qe,dirty:Ke,expanded:Ye,id:Xe,popupOpen:Qe,focused:Je,focusedTag:et,anchorEl:tt,setAnchorEl:nt,inputValue:rt,groupedOptions:ot}=(0,s.Z)({...n,componentName:"Autocomplete"}),it=!M&&!W&&Ke&&!Re,at=(!Q||!0===X)&&!1!==X,{onMouseDown:st}=Be(),{ref:lt,...ut}=Ge(),ct=re||(e=>e.label??e),dt={...n,disablePortal:q,expanded:Ye,focused:Je,fullWidth:J,getOptionLabel:ct,hasClearIcon:it,hasPopupIcon:at,inputFocused:-1===et,popupOpen:Qe,size:Le},ht=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:s,hasPopupIcon:l,inputFocused:u,popupOpen:c,size:d}=e,p={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",s&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",u&&"inputFocused"],tag:["tag",`tagSize${(0,h.Z)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,i.Z)(p,R,t)})(dt),pt={slots:{paper:Me,popper:Te,...Ze},slotProps:{chip:f,listbox:he,...k,...Fe}},[ft,mt]=(0,A.Z)("listbox",{elementType:V,externalForwardedProps:pt,ownerState:dt,className:ht.listbox,additionalProps:ut,ref:lt}),[gt,vt]=(0,A.Z)("paper",{elementType:x.Z,externalForwardedProps:pt,ownerState:dt,className:ht.paper}),[yt,bt]=(0,A.Z)("popper",{elementType:l.Z,externalForwardedProps:pt,ownerState:dt,className:ht.popper,additionalProps:{disablePortal:q,style:{width:tt?tt.clientWidth:null},role:"presentation",anchorEl:tt,open:Qe}});let xt;if(me&&qe.length>0){const e=e=>({className:ht.tag,disabled:W,...We(e)});xt=Ae?Ae(qe,e,dt):qe.map(((t,n)=>{const{key:r,...o}=e({index:n});return(0,g.jsx)(S.Z,{label:ct(t),size:Le,...o,...pt.slotProps.chip},r)}))}if(ce>-1&&Array.isArray(xt)){const e=xt.length-ce;!Je&&e>0&&(xt=xt.splice(0,ce),xt.push((0,g.jsx)("span",{className:ht.tag,children:ee(e)},xt.length)))}const wt=Ie||(e=>(0,g.jsxs)("li",{children:[(0,g.jsx)($,{className:ht.groupLabel,ownerState:dt,component:"div",children:e.group}),(0,g.jsx)(H,{className:ht.groupUl,ownerState:dt,children:e.children})]},e.key)),St=Oe||((e,t)=>{const{key:n,...r}=e;return(0,g.jsx)("li",{...r,children:ct(t)},n)}),Ct=(e,t)=>{const n=Ue({option:e,index:t});return St({...n,className:ht.option},e,{selected:n["aria-selected"],index:t,inputValue:rt},dt)},kt=pt.slotProps.clearIndicator,_t=pt.slotProps.popupIndicator;return(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(E,{ref:t,className:(0,o.Z)(ht.root,m),ownerState:dt,...ze(Ne),children:De({id:Xe,disabled:W,fullWidth:!0,size:"small"===Le?"small":void 0,InputLabelProps:Ve(),InputProps:{ref:nt,className:ht.inputRoot,startAdornment:xt,onMouseDown:e=>{e.target===e.currentTarget&&st(e)},...(it||at)&&{endAdornment:(0,g.jsxs)(L,{className:ht.endAdornment,ownerState:dt,children:[it?(0,g.jsx)(Z,{...He(),"aria-label":w,title:w,ownerState:dt,...kt,className:(0,o.Z)(ht.clearIndicator,kt?.className),children:v}):null,at?(0,g.jsx)(F,{...$e(),disabled:W,"aria-label":Qe?C:ke,title:Qe?C:ke,ownerState:dt,..._t,className:(0,o.Z)(ht.popupIndicator,_t?.className),children:Pe}):null]})}},inputProps:{className:ht.input,disabled:W,readOnly:Re,...Be()}})}),tt?(0,g.jsx)(j,{as:yt,...bt,children:(0,g.jsxs)(N,{as:gt,...vt,children:[pe&&0===ot.length?(0,g.jsx)(z,{className:ht.loading,ownerState:dt,children:fe}):null,0!==ot.length||Q||pe?null:(0,g.jsx)(B,{className:ht.noOptions,ownerState:dt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ge}),ot.length>0?(0,g.jsx)(ft,{as:de,...mt,children:ot.map(((e,t)=>ie?wt({key:e.key,group:e.group,children:e.options.map(((t,n)=>Ct(t,e.index+n)))}):Ct(e,t)))}):null]})}):null]})}))},19090:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(16351),u=n(69761),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiBackdrop",e)}(0,c.Z)("MuiBackdrop",["root","invisible"]);var p=n(24246);const f=(0,a.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),m=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiBackdrop"}),{children:r,className:a,component:c="div",invisible:d=!1,open:m,components:g={},componentsProps:v={},slotProps:y={},slots:b={},TransitionComponent:x,transitionDuration:w,...S}=n,C={...n,component:c,invisible:d},k=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,i.Z)(r,h,t)})(C),_={slots:{transition:x,root:g.Root,...b},slotProps:{...v,...y}},[M,T]=(0,l.Z)("root",{elementType:f,externalForwardedProps:_,className:(0,o.Z)(k.root,a),ownerState:C}),[P,R]=(0,l.Z)("transition",{elementType:u.Z,externalForwardedProps:_,ownerState:C});return(0,p.jsx)(P,{in:m,timeout:w,...S,...R,children:(0,p.jsx)(M,{"aria-hidden":!0,...T,classes:k,ref:t,children:r})})}))},36372:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(89966),a=n(11652),s=n(93772),l=n(38971),u=n(24246);var c=n(70544),d=n(45178),h=n(92994);const p=(0,n(44124).Z)("MuiBox",["root"]),f=(0,d.Z)(),m=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:c="MuiBox-root",generateClassName:d}=e,h=(0,i.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(a.Z);return r.forwardRef((function(e,r){const i=(0,l.Z)(n),{className:a,component:p="div",...f}=(0,s.Z)(e);return(0,u.jsx)(h,{as:p,ref:r,className:(0,o.Z)(a,d?d(c):c),theme:t&&i[t]||i,...f})}))}({themeId:h.Z,defaultTheme:f,defaultClassName:p.root,generateClassName:c.Z.generate})},48565:function(e,t,n){"use strict";n.d(t,{Z:()=>I});var r=n(27378),o=n(90496),i=n(16819),a=n(82267),s=n(16838),l=n(56839),u=n(73037),c=n(12709),d=n(82319),h=n(24043),p=n(14544),f=n(50898),m=n(51640),g=n(90433),v=n(44124),y=n(6749);function b(e){return(0,y.ZP)("MuiButton",e)}const x=(0,v.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);var w=n(55720),S=n(71645),C=n(24246);const k=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],_=(0,c.ZP)(p.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,m.Z)(n.color)}`],t[`size${(0,m.Z)(n.size)}`],t[`${n.variant}Size${(0,m.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,d.Z)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${x.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${x.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,g.Z)()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,s.Fq)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${x.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${x.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${x.loading}`]:{color:"transparent"}}}]}}))),M=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.Z)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...k]}))),T=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.Z)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...k]}))),P=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),R=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),I=r.forwardRef((function(e,t){const n=r.useContext(w.Z),s=r.useContext(S.Z),u=(0,i.Z)(n,e),c=(0,h.i)({props:u,name:"MuiButton"}),{children:d,color:p="primary",component:g="button",className:v,disabled:y=!1,disableElevation:x=!1,disableFocusRipple:k=!1,endIcon:I,focusVisibleClassName:D,fullWidth:O=!1,id:A,loading:E=null,loadingIndicator:L,loadingPosition:Z="center",size:F="medium",startIcon:j,type:N,variant:z="text",...B}=c,V=(0,l.Z)(A),$=L??(0,C.jsx)(f.Z,{"aria-labelledby":V,color:"inherit",size:16}),H={...c,color:p,component:g,disabled:y,disableElevation:x,disableFocusRipple:k,fullWidth:O,loading:E,loadingIndicator:$,loadingPosition:Z,size:F,type:N,variant:z},W=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:l,classes:u}=e,c={root:["root",s&&"loading",i,`${i}${(0,m.Z)(t)}`,`size${(0,m.Z)(o)}`,`${i}Size${(0,m.Z)(o)}`,`color${(0,m.Z)(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${(0,m.Z)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,m.Z)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,m.Z)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=(0,a.Z)(c,b,u);return{...u,...d}})(H),G=(j||E&&"start"===Z)&&(0,C.jsx)(M,{className:W.startIcon,ownerState:H,children:j||(0,C.jsx)(R,{className:W.loadingIconPlaceholder,ownerState:H})}),U=(I||E&&"end"===Z)&&(0,C.jsx)(T,{className:W.endIcon,ownerState:H,children:I||(0,C.jsx)(R,{className:W.loadingIconPlaceholder,ownerState:H})}),q=s||"",K="boolean"==typeof E?(0,C.jsx)("span",{className:W.loadingWrapper,style:{display:"contents"},children:E&&(0,C.jsx)(P,{className:W.loadingIndicator,ownerState:H,children:$})}):null;return(0,C.jsxs)(_,{ownerState:H,className:(0,o.Z)(n.className,W.root,v,q),component:g,disabled:y||E,focusRipple:!k,focusVisibleClassName:(0,o.Z)(W.focusVisible,D),ref:t,type:N,id:E?V:A,...B,classes:W,children:[G,"end"!==Z&&K,d,"end"===Z&&K,U]})}))},14544:function(e,t,n){"use strict";n.d(t,{Z:()=>D});var r=n(27378),o=n(90496),i=n(82267),a=n(74111),s=n(12709),l=n(24043),u=n(51183),c=n(67151),d=n(99565);class h{static create(){return new h}static use(){const e=(0,d.Z)(h.create).current,[t,n]=r.useState(!1);return e.shouldMount=t,e.setShouldMount=n,r.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then((()=>this.ref.current?.start(...e)))}stop(...e){this.mount().then((()=>this.ref.current?.stop(...e)))}pulsate(...e){this.mount().then((()=>this.ref.current?.pulsate(...e)))}}var p=n(16317),f=n(60203),m=n(10043),g=n(24246);const v=function(e){const{className:t,classes:n,pulsate:i=!1,rippleX:a,rippleY:s,rippleSize:l,in:u,onExited:c,timeout:d}=e,[h,p]=r.useState(!1),f=(0,o.Z)(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+a},v=(0,o.Z)(n.child,h&&n.childLeaving,i&&n.childPulsate);return u||h||p(!0),r.useEffect((()=>{if(!u&&null!=c){const e=setTimeout(c,d);return()=>{clearTimeout(e)}}}),[c,u,d]),(0,g.jsx)("span",{className:f,style:m,children:(0,g.jsx)("span",{className:v})})};var y=n(44124);const b=(0,y.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),x=m.keyframes` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `,w=m.keyframes` 0% { opacity: 1; } 100% { opacity: 0; } `,S=m.keyframes` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `,C=(0,s.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),k=(0,s.ZP)(v,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; &.${b.rippleVisible} { opacity: 0.3; transform: scale(1); animation-name: ${x}; animation-duration: ${550}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } &.${b.ripplePulsate} { animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; } & .${b.child} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${b.childLeaving} { opacity: 0; animation-name: ${w}; animation-duration: ${550}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } & .${b.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${S}; animation-duration: 2500ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } `,_=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...u}=n,[c,d]=r.useState([]),h=r.useRef(0),m=r.useRef(null);r.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[c]);const v=r.useRef(!1),y=(0,f.Z)(),x=r.useRef(null),w=r.useRef(null),S=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:s}=e;d((e=>[...e,(0,g.jsx)(k,{classes:{ripple:(0,o.Z)(a.ripple,b.ripple),rippleVisible:(0,o.Z)(a.rippleVisible,b.rippleVisible),ripplePulsate:(0,o.Z)(a.ripplePulsate,b.ripplePulsate),child:(0,o.Z)(a.child,b.child),childLeaving:(0,o.Z)(a.childLeaving,b.childLeaving),childPulsate:(0,o.Z)(a.childPulsate,b.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},h.current)])),h.current+=1,m.current=s}),[a]),_=r.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&v.current)return void(v.current=!1);"touchstart"===e?.type&&(v.current=!0);const s=a?null:w.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===x.current&&(x.current=()=>{S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})},y.start(80,(()=>{x.current&&(x.current(),x.current=null)}))):S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})}),[i,S,y]),M=r.useCallback((()=>{_({},{pulsate:!0})}),[_]),T=r.useCallback(((e,t)=>{if(y.clear(),"touchend"===e?.type&&x.current)return x.current(),x.current=null,void y.start(0,(()=>{T(e,t)}));x.current=null,d((e=>e.length>0?e.slice(1):e)),m.current=t}),[y]);return r.useImperativeHandle(t,(()=>({pulsate:M,start:_,stop:T})),[M,_,T]),(0,g.jsx)(C,{className:(0,o.Z)(b.root,a.root,s),ref:w,...u,children:(0,g.jsx)(p.Z,{component:null,exit:!0,children:c})})}));var M=n(6749);function T(e){return(0,M.ZP)("MuiButtonBase",e)}const P=(0,y.Z)("MuiButtonBase",["root","disabled","focusVisible"]),R=(0,s.ZP)("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"},[`&.${P.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function I(e,t,n,r=!1){return(0,c.Z)((o=>(n&&n(o),r||e[t](o),!0)))}const D=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:d=!1,children:p,className:f,component:m="button",disabled:v=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:x=!1,focusVisibleClassName:w,LinkComponent:S="a",onBlur:C,onClick:k,onContextMenu:M,onDragLeave:P,onFocus:D,onFocusVisible:O,onKeyDown:A,onKeyUp:E,onMouseDown:L,onMouseLeave:Z,onMouseUp:F,onTouchEnd:j,onTouchMove:N,onTouchStart:z,tabIndex:B=0,TouchRippleProps:V,touchRippleRef:$,type:H,...W}=n,G=r.useRef(null),U=h.use(),q=(0,u.Z)(U.ref,$),[K,Y]=r.useState(!1);v&&K&&Y(!1),r.useImperativeHandle(s,(()=>({focusVisible:()=>{Y(!0),G.current.focus()}})),[]);const X=U.shouldMount&&!y&&!v;r.useEffect((()=>{K&&x&&!y&&U.pulsate()}),[y,x,K,U]);const Q=I(U,"start",L,b),J=I(U,"stop",M,b),ee=I(U,"stop",P,b),te=I(U,"stop",F,b),ne=I(U,"stop",(e=>{K&&e.preventDefault(),Z&&Z(e)}),b),re=I(U,"start",z,b),oe=I(U,"stop",j,b),ie=I(U,"stop",N,b),ae=I(U,"stop",(e=>{(0,a.Z)(e.target)||Y(!1),C&&C(e)}),!1),se=(0,c.Z)((e=>{G.current||(G.current=e.currentTarget),(0,a.Z)(e.target)&&(Y(!0),O&&O(e)),D&&D(e)})),le=()=>{const e=G.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},ue=(0,c.Z)((e=>{x&&!e.repeat&&K&&" "===e.key&&U.stop(e,(()=>{U.start(e)})),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!v&&(e.preventDefault(),k&&k(e))})),ce=(0,c.Z)((e=>{x&&" "===e.key&&K&&!e.defaultPrevented&&U.stop(e,(()=>{U.pulsate(e)})),E&&E(e),k&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&k(e)}));let de=m;"button"===de&&(W.href||W.to)&&(de=S);const he={};"button"===de?(he.type=void 0===H?"button":H,he.disabled=v):(W.href||W.to||(he.role="button"),v&&(he["aria-disabled"]=v));const pe=(0,u.Z)(t,G),fe={...n,centerRipple:d,component:m,disabled:v,disableRipple:y,disableTouchRipple:b,focusRipple:x,tabIndex:B,focusVisible:K},me=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a={root:["root",t&&"disabled",n&&"focusVisible"]},s=(0,i.Z)(a,T,o);return n&&r&&(s.root+=` ${r}`),s})(fe);return(0,g.jsxs)(R,{as:de,className:(0,o.Z)(me.root,f),ownerState:fe,onBlur:ae,onClick:k,onContextMenu:J,onFocus:se,onKeyDown:ue,onKeyUp:ce,onMouseDown:Q,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:oe,onTouchMove:ie,onTouchStart:re,ref:pe,tabIndex:v?-1:B,type:H,...he,...W,children:[p,X?(0,g.jsx)(_,{ref:q,center:d,...V}):null]})}))},10970:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(65124),l=n(51640),u=n(12709),c=n(82319),d=n(90433),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiButtonGroup",e)}const g=(0,p.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var v=n(55720),y=n(71645),b=n(24246);const x=(0,u.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.grouped}`]:t.grouped},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.orientation)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}${(0,l.Z)(n.orientation)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}${(0,l.Z)(n.color)}`]},{[`& .${g.firstButton}`]:t.firstButton},{[`& .${g.lastButton}`]:t.lastButton},{[`& .${g.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,c.Z)((({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${g.lastButton},& .${g.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${g.lastButton},& .${g.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${g.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${g.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,d.Z)()).flatMap((([t])=>[{props:{variant:"text",color:t},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,a.Fq)(e.palette[t].main,.5)}}}])),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${g.lastButton},& .${g.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${g.lastButton},& .${g.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${g.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${g.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,d.Z)(["dark"])).map((([t])=>({props:{variant:"contained",color:t},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}})))],[`& .${g.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}})))),w=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiButtonGroup"}),{children:a,className:u,color:c="primary",component:d="div",disabled:p=!1,disableElevation:f=!1,disableFocusRipple:g=!1,disableRipple:w=!1,fullWidth:S=!1,orientation:C="horizontal",size:k="medium",variant:_="outlined",...M}=n,T={...n,color:c,component:d,disabled:p,disableElevation:f,disableFocusRipple:g,disableRipple:w,fullWidth:S,orientation:C,size:k,variant:_},P=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:a,orientation:s,variant:u}=e,c={root:["root",u,s,a&&"fullWidth",o&&"disableElevation",`color${(0,l.Z)(n)}`],grouped:["grouped",`grouped${(0,l.Z)(s)}`,`grouped${(0,l.Z)(u)}`,`grouped${(0,l.Z)(u)}${(0,l.Z)(s)}`,`grouped${(0,l.Z)(u)}${(0,l.Z)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,i.Z)(c,m,t)})(T),R=r.useMemo((()=>({className:P.grouped,color:c,disabled:p,disableElevation:f,disableFocusRipple:g,disableRipple:w,fullWidth:S,size:k,variant:_})),[c,p,f,g,w,S,k,_,P.grouped]),I=(0,s.Z)(a),D=I.length,O=e=>{const t=0===e,n=e===D-1;return t&&n?"":t?P.firstButton:n?P.lastButton:P.middleButton};return(0,b.jsx)(x,{as:d,role:"group",className:(0,o.Z)(P.root,u),ref:t,ownerState:T,...M,children:(0,b.jsx)(v.Z.Provider,{value:R,children:I.map(((e,t)=>(0,b.jsx)(y.Z.Provider,{value:O(t),children:e},t)))})})}))},71645:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},55720:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},84954:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(28866),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiCard",e)}(0,u.Z)("MuiCard",["root"]);var h=n(24246);const p=(0,a.ZP)(l.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCard"}),{className:r,raised:a=!1,...l}=n,u={...n,raised:a},c=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(u);return(0,h.jsx)(p,{className:(0,o.Z)(c.root,r),elevation:a?8:void 0,ref:t,ownerState:u,...l})}))},25635:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(44124),u=n(6749);function c(e){return(0,u.ZP)("MuiCardContent",e)}(0,l.Z)("MuiCardContent",["root"]);var d=n(24246);const h=(0,a.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCardContent"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{as:a,className:(0,o.Z)(p.root,r),ownerState:u,ref:t,...l})}))},82707:function(e,t,n){"use strict";n.d(t,{Z:()=>R});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(99140),l=n(90247),u=n(24246);const c=(0,l.Z)((0,u.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"),d=(0,l.Z)((0,u.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"),h=(0,l.Z)((0,u.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");var p=n(51640),f=n(73037),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiCheckbox",e)}const y=(0,m.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var b=n(12709),x=n(82319),w=n(90433),S=n(24043),C=n(27834),k=n(16351);const _=(0,b.ZP)(s.Z,{shouldForwardProp:e=>(0,f.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,p.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,p.Z)(n.color)}`]]}})((0,x.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,w.Z)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,w.Z)()).map((([t])=>({props:{color:t},style:{[`&.${y.checked}, &.${y.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${y.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),M=(0,u.jsx)(d,{}),T=(0,u.jsx)(c,{}),P=(0,u.jsx)(h,{}),R=r.forwardRef((function(e,t){const n=(0,S.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:a=M,color:s="primary",icon:l=T,indeterminate:c=!1,indeterminateIcon:d=P,inputProps:h,size:f="medium",disableRipple:m=!1,className:g,slots:y={},slotProps:b={},...x}=n,w=c?d:l,R=c?d:a,I={...n,disableRipple:m,color:s,indeterminate:c,size:f},D=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,a={root:["root",n&&"indeterminate",`color${(0,p.Z)(r)}`,`size${(0,p.Z)(o)}`]},s=(0,i.Z)(a,v,t);return{...t,...s}})(I),O=b.input??h,[A,E]=(0,k.Z)("root",{ref:t,elementType:_,className:(0,o.Z)(D.root,g),shouldForwardComponentProp:!0,externalForwardedProps:{slots:y,slotProps:b,...x},ownerState:I,additionalProps:{type:"checkbox",icon:r.cloneElement(w,{fontSize:w.props.fontSize??f}),checkedIcon:r.cloneElement(R,{fontSize:R.props.fontSize??f}),disableRipple:m,slots:y,slotProps:{input:(0,C.Z)("function"==typeof O?O(I):O,{"data-indeterminate":c})}}});return(0,u.jsx)(A,{...E,classes:D})}))},52889:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(90247),l=n(24246);const u=(0,s.Z)((0,l.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");var c=n(51183),d=n(51640),h=n(14544),p=n(12709),f=n(82319),m=n(90433),g=n(24043),v=n(44124),y=n(6749);function b(e){return(0,y.ZP)("MuiChip",e)}const x=(0,v.Z)("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),w=(0,p.ZP)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${x.avatar}`]:t.avatar},{[`& .${x.avatar}`]:t[`avatar${(0,d.Z)(s)}`]},{[`& .${x.avatar}`]:t[`avatarColor${(0,d.Z)(r)}`]},{[`& .${x.icon}`]:t.icon},{[`& .${x.icon}`]:t[`icon${(0,d.Z)(s)}`]},{[`& .${x.icon}`]:t[`iconColor${(0,d.Z)(o)}`]},{[`& .${x.deleteIcon}`]:t.deleteIcon},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(s)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIconColor${(0,d.Z)(r)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(l)}Color${(0,d.Z)(r)}`]},t.root,t[`size${(0,d.Z)(s)}`],t[`color${(0,d.Z)(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${(0,d.Z)(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${(0,d.Z)(r)}`],t[l],t[`${l}${(0,d.Z)(r)}`]]}})((0,f.Z)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,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",[`&.${x.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${x.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${x.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${x.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${x.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${x.icon}`]:{marginLeft:5,marginRight:-6},[`& .${x.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,a.Fq)(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)`:(0,a.Fq)(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${x.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${x.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter((0,m.Z)(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${x.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].contrastTextChannel} / 0.7)`:(0,a.Fq)(e.palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}}))),{props:e=>e.iconColor===e.color,style:{[`& .${x.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${x.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter((0,m.Z)(["dark"])).map((([t])=>({props:{color:t,onDelete:!0},style:{[`&.${x.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}}))),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter((0,m.Z)(["dark"])).map((([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}))),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${x.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${x.avatar}`]:{marginLeft:4},[`& .${x.avatarSmall}`]:{marginLeft:2},[`& .${x.icon}`]:{marginLeft:4},[`& .${x.iconSmall}`]:{marginLeft:2},[`& .${x.deleteIcon}`]:{marginRight:5},[`& .${x.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter((0,m.Z)()).map((([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,a.Fq)(e.palette[t].main,.7)}`,[`&.${x.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.focusOpacity)},[`& .${x.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,a.Fq)(e.palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}})))]}}))),S=(0,p.ZP)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,d.Z)(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function C(e){return"Backspace"===e.key||"Delete"===e.key}const k=r.forwardRef((function(e,t){const n=(0,g.i)({props:e,name:"MuiChip"}),{avatar:a,className:s,clickable:p,color:f="default",component:m,deleteIcon:v,disabled:y=!1,icon:x,label:k,onClick:_,onDelete:M,onKeyDown:T,onKeyUp:P,size:R="medium",variant:I="filled",tabIndex:D,skipFocusWhenDisabled:O=!1,...A}=n,E=r.useRef(null),L=(0,c.Z)(E,t),Z=e=>{e.stopPropagation(),M&&M(e)},F=!(!1===p||!_)||p,j=F||M?h.Z:m||"div",N={...n,component:j,disabled:y,size:R,color:f,iconColor:r.isValidElement(x)&&x.props.color||f,onDelete:!!M,clickable:F,variant:I},z=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:s,clickable:l,variant:u}=e,c={root:["root",u,n&&"disabled",`size${(0,d.Z)(r)}`,`color${(0,d.Z)(o)}`,l&&"clickable",l&&`clickableColor${(0,d.Z)(o)}`,s&&"deletable",s&&`deletableColor${(0,d.Z)(o)}`,`${u}${(0,d.Z)(o)}`],label:["label",`label${(0,d.Z)(r)}`],avatar:["avatar",`avatar${(0,d.Z)(r)}`,`avatarColor${(0,d.Z)(o)}`],icon:["icon",`icon${(0,d.Z)(r)}`,`iconColor${(0,d.Z)(a)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,d.Z)(r)}`,`deleteIconColor${(0,d.Z)(o)}`,`deleteIcon${(0,d.Z)(u)}Color${(0,d.Z)(o)}`]};return(0,i.Z)(c,b,t)})(N),B=j===h.Z?{component:m||"div",focusVisibleClassName:z.focusVisible,...M&&{disableRipple:!0}}:{};let V=null;M&&(V=v&&r.isValidElement(v)?r.cloneElement(v,{className:(0,o.Z)(v.props.className,z.deleteIcon),onClick:Z}):(0,l.jsx)(u,{className:(0,o.Z)(z.deleteIcon),onClick:Z}));let $=null;a&&r.isValidElement(a)&&($=r.cloneElement(a,{className:(0,o.Z)(z.avatar,a.props.className)}));let H=null;return x&&r.isValidElement(x)&&(H=r.cloneElement(x,{className:(0,o.Z)(z.icon,x.props.className)})),(0,l.jsxs)(w,{as:j,className:(0,o.Z)(z.root,s),disabled:!(!F||!y)||void 0,onClick:_,onKeyDown:e=>{e.currentTarget===e.target&&C(e)&&e.preventDefault(),T&&T(e)},onKeyUp:e=>{e.currentTarget===e.target&&M&&C(e)&&M(e),P&&P(e)},ref:L,tabIndex:O&&y?-1:D,ownerState:N,...B,...A,children:[$||H,(0,l.jsx)(S,{className:(0,o.Z)(z.label),ownerState:N,children:k}),V]})}))},50898:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(10043),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(90433),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=n(24246);const g=44,v=a.keyframes` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,y=a.keyframes` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 1px, 200px; stroke-dashoffset: -126px; } `,b="string"!=typeof v?a.css` animation: ${v} 1.4s linear infinite; `:null,x="string"!=typeof y?a.css` animation: ${y} 1.4s ease-in-out infinite; `:null,w=(0,s.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,c.Z)(n.color)}`]]}})((0,l.Z)((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:b||{animation:`${v} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),S=(0,s.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),C=(0,s.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,c.Z)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,l.Z)((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:x||{animation:`${y} 1.4s ease-in-out infinite`}}]})))),k=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiCircularProgress"}),{className:r,color:a="primary",disableShrink:s=!1,size:l=40,style:d,thickness:h=3.6,value:p=0,variant:v="indeterminate",...y}=n,b={...n,color:a,disableShrink:s,size:l,thickness:h,value:p,variant:v},x=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${(0,c.Z)(r)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(n)}`,o&&"circleDisableShrink"]};return(0,i.Z)(a,f,t)})(b),k={},_={},M={};if("determinate"===v){const e=2*Math.PI*((g-h)/2);k.strokeDasharray=e.toFixed(3),M["aria-valuenow"]=Math.round(p),k.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,_.transform="rotate(-90deg)"}return(0,m.jsx)(w,{className:(0,o.Z)(x.root,r),style:{width:l,height:l,..._,...d},ownerState:b,ref:t,role:"progressbar",...M,...y,children:(0,m.jsx)(S,{className:x.svg,ownerState:b,viewBox:"22 22 44 44",children:(0,m.jsx)(C,{className:x.circle,style:k,ownerState:b,cx:g,cy:g,r:(g-h)/2,fill:"none",strokeWidth:h})})})}))},70313:function(e,t,n){"use strict";n.d(t,{d:()=>u});var r=n(27378),o=n(97048),i=n(81925),a=n(80668),s=n(94680);function l(e){return e.substring(2).toLowerCase()}function u(e){const{children:t,disableReactTree:n=!1,mouseEvent:u="onClick",onClickAway:c,touchEvent:d="onTouchEnd"}=e,h=r.useRef(!1),p=r.useRef(null),f=r.useRef(!1),m=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{f.current=!0}),0),()=>{f.current=!1})),[]);const g=(0,o.Z)((0,s.Z)(t),p),v=(0,i.Z)((e=>{const t=m.current;m.current=!1;const r=(0,a.Z)(p.current);if(!f.current||!p.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidthn=>{m.current=!0;const r=t.props[e];r&&r(n)},b={ref:g};return!1!==d&&(b[d]=y(d)),r.useEffect((()=>{if(!1!==d){const e=l(d),t=(0,a.Z)(p.current),n=()=>{h.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",n)}}}),[v,d]),!1!==u&&(b[u]=y(u)),r.useEffect((()=>{if(!1!==u){const e=l(u),t=(0,a.Z)(p.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}}),[v,u]),r.cloneElement(t,b)}},33711:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(41825),a=n(60203),s=n(82267),l=n(12709),u=n(94776),c=n(82319),d=n(24043),h=n(39508),p=n(42777),f=n(51183),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiCollapse",e)}(0,m.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=n(24246);const b=(0,l.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((0,c.Z)((({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]})))),x=(0,l.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),w=(0,l.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),S=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiCollapse"}),{addEndListener:l,children:c,className:m,collapsedSize:g="0px",component:S,easing:C,in:k,onEnter:_,onEntered:M,onEntering:T,onExit:P,onExited:R,onExiting:I,orientation:D="vertical",style:O,timeout:A=h.x9.standard,TransitionComponent:E=i.ZP,...L}=n,Z={...n,orientation:D,collapsedSize:g},F=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,s.Z)(r,v,n)})(Z),j=(0,u.Z)(),N=(0,a.Z)(),z=r.useRef(null),B=r.useRef(),V="number"==typeof g?`${g}px`:g,$="horizontal"===D,H=$?"width":"height",W=r.useRef(null),G=(0,f.Z)(t,W),U=e=>t=>{if(e){const n=W.current;void 0===t?e(n):e(n,t)}},q=()=>z.current?z.current[$?"clientWidth":"clientHeight"]:0,K=U(((e,t)=>{z.current&&$&&(z.current.style.position="absolute"),e.style[H]=V,_&&_(e,t)})),Y=U(((e,t)=>{const n=q();z.current&&$&&(z.current.style.position="");const{duration:r,easing:o}=(0,p.C)({style:O,timeout:A,easing:C},{mode:"enter"});if("auto"===A){const t=j.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,B.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[H]=`${n}px`,e.style.transitionTimingFunction=o,T&&T(e,t)})),X=U(((e,t)=>{e.style[H]="auto",M&&M(e,t)})),Q=U((e=>{e.style[H]=`${q()}px`,P&&P(e)})),J=U(R),ee=U((e=>{const t=q(),{duration:n,easing:r}=(0,p.C)({style:O,timeout:A,easing:C},{mode:"exit"});if("auto"===A){const n=j.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,B.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[H]=V,e.style.transitionTimingFunction=r,I&&I(e)}));return(0,y.jsx)(E,{in:k,onEnter:K,onEntered:X,onEntering:Y,onExit:Q,onExited:J,onExiting:ee,addEndListener:e=>{"auto"===A&&N.start(B.current||0,e),l&&l(W.current,e)},nodeRef:W,timeout:"auto"===A?null:A,...L,children:(e,{ownerState:t,...n})=>(0,y.jsx)(b,{as:S,className:(0,o.Z)(F.root,m,{entered:F.entered,exited:!k&&"0px"===V&&F.hidden}[e]),style:{[$?"minWidth":"minHeight"]:V,...O},ref:G,ownerState:{...Z,state:e},...n,children:(0,y.jsx)(x,{ownerState:{...Z,state:e},className:F.wrapper,ref:z,children:(0,y.jsx)(w,{ownerState:{...Z,state:e},className:F.wrapperInner,children:c})})})})}));S&&(S.muiSupportAuto=!0);const C=S},24043:function(e,t,n){"use strict";n.d(t,{i:()=>o});n(27378);var r=n(34807);n(24246);function o(e){return(0,r.i)(e)}},56484:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},19978:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiDialogContent",e)}(0,u.Z)("MuiDialogContent",["root","dividers"]);var h=n(30138),p=n(24246);const f=(0,a.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,s.Z)((({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${h.Z.root} + &`]:{paddingTop:0}}}]})))),m=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContent"}),{className:r,dividers:a=!1,...s}=n,u={...n,dividers:a},c=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,i.Z)(r,d,t)})(u);return(0,p.jsx)(f,{className:(0,o.Z)(c.root,r),ownerState:u,ref:t,...s})}))},51602:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(52054),s=n(12709),l=n(24043),u=n(30138),c=n(56484),d=n(24246);const h=(0,s.ZP)(a.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogTitle"}),{className:a,id:s,...p}=n,f=n,m=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},u.a,t)})(f),{titleId:g=s}=r.useContext(c.Z);return(0,d.jsx)(h,{component:"h2",className:(0,o.Z)(m.root,a),ownerState:f,ref:t,variant:"h6",id:s??g,...p})}))},30138:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiDialogTitle",e)}const a=(0,r.Z)("MuiDialogTitle",["root"])},79119:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(82319),u=n(24043),c=n(38062),d=n(24246);const h=(0,s.ZP)("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,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((0,l.Z)((({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,a.Fq)(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]})))),p=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((0,l.Z)((({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]})))),f=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:a,className:s,orientation:l="horizontal",component:f=(a||"vertical"===l?"div":"hr"),flexItem:m=!1,light:g=!1,role:v=("hr"!==f?"separator":void 0),textAlign:y="center",variant:b="fullWidth",...x}=n,w={...n,absolute:r,component:f,flexItem:m,light:g,orientation:l,role:v,textAlign:y,variant:b},S=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:a,orientation:s,textAlign:l,variant:u}=e,d={root:["root",t&&"absolute",u,a&&"light","vertical"===s&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===l&&"vertical"!==s&&"textAlignRight","left"===l&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]};return(0,i.Z)(d,c.V,r)})(w);return(0,d.jsx)(h,{as:f,className:(0,o.Z)(S.root,s),role:v,ref:t,ownerState:w,"aria-orientation":"separator"!==v||"hr"===f&&"vertical"!==l?void 0:l,...x,children:a?(0,d.jsx)(p,{className:S.wrapper,ownerState:w,children:a}):null})}));f&&(f.muiSkipListHighlight=!0);const m=f},38062:function(e,t,n){"use strict";n.d(t,{V:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiDivider",e)}const a=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},69761:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(27378),o=n(41825),i=n(94680),a=n(94776),s=n(42777),l=n(51183),u=n(24246);const c={entering:{opacity:1},entered:{opacity:1}},d=r.forwardRef((function(e,t){const n=(0,a.Z)(),d={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:h,appear:p=!0,children:f,easing:m,in:g,onEnter:v,onEntered:y,onEntering:b,onExit:x,onExited:w,onExiting:S,style:C,timeout:k=d,TransitionComponent:_=o.ZP,...M}=e,T=r.useRef(null),P=(0,l.Z)(T,(0,i.Z)(f),t),R=e=>t=>{if(e){const n=T.current;void 0===t?e(n):e(n,t)}},I=R(b),D=R(((e,t)=>{(0,s.n)(e);const r=(0,s.C)({style:C,timeout:k,easing:m},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),v&&v(e,t)})),O=R(y),A=R(S),E=R((e=>{const t=(0,s.C)({style:C,timeout:k,easing:m},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),x&&x(e)})),L=R(w);return(0,u.jsx)(_,{appear:p,in:g,nodeRef:T,onEnter:D,onEntered:O,onEntering:I,onExit:E,onExited:L,onExiting:A,addEndListener:e=>{h&&h(T.current,e)},timeout:k,...M,children:(e,{ownerState:t,...n})=>r.cloneElement(f,{style:{opacity:0,visibility:"exited"!==e||g?void 0:"hidden",...c[e],...C,...f.props.style},ref:P,...n})})}))},90222:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(61170),i=n(82267),a=n(55879),s=n(73037),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(6499),p=n(51640),f=n(24246);const m=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${h.Z.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${h.Z.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}}))),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}}))),g=(0,l.ZP)(a.ni,{name:"MuiFilledInput",slot:"Input",overridesResolver:a._o})((0,u.Z)((({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]})))),v=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,hiddenLabel:c,inputComponent:v="input",multiline:y=!1,slotProps:b,slots:x={},type:w="text",...S}=n,C={...n,disableUnderline:r,fullWidth:u,inputComponent:v,multiline:y,type:w},k=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:a,hiddenLabel:s,multiline:l}=e,u={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===a&&`size${(0,p.Z)(a)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},c=(0,i.Z)(u,h._,t);return{...t,...c}})(n),_={root:{ownerState:C},input:{ownerState:C}},M=b??l?(0,o.Z)(_,b??l):_,T=x.root??s.Root??m,P=x.input??s.Input??g;return(0,f.jsx)(a.ZP,{slots:{root:T,input:P},slotProps:M,fullWidth:u,inputComponent:v,multiline:y,ref:t,type:w,...S,classes:k})}));v.muiName="Input";const y=v},6499:function(e,t,n){"use strict";n.d(t,{Z:()=>a,_:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiFilledInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},90192:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(65021),u=n(51640),c=n(70777),d=n(29992),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormControl",e)}(0,h.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var m=n(24246);const g=(0,a.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${(0,u.Z)(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),v=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiFormControl"}),{children:a,className:h,color:p="primary",component:v="div",disabled:y=!1,error:b=!1,focused:x,fullWidth:w=!1,hiddenLabel:S=!1,margin:C="none",required:k=!1,size:_="medium",variant:M="outlined",...T}=n,P={...n,color:p,component:v,disabled:y,error:b,fullWidth:w,hiddenLabel:S,margin:C,required:k,size:_,variant:M},R=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&`margin${(0,u.Z)(n)}`,r&&"fullWidth"]};return(0,i.Z)(o,f,t)})(P),[I,D]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{if(!(0,c.Z)(t,["Input","Select"]))return;const n=(0,c.Z)(t,["Select"])?t.props.input:t;n&&(0,l.B7)(n.props)&&(e=!0)})),e})),[O,A]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{(0,c.Z)(t,["Input","Select"])&&((0,l.vd)(t.props,!0)||(0,l.vd)(t.props.inputProps,!0))&&(e=!0)})),e})),[E,L]=r.useState(!1);y&&E&&L(!1);const Z=void 0===x||y?E:x;let F;r.useRef(!1);const j=r.useCallback((()=>{A(!0)}),[]),N=r.useCallback((()=>{A(!1)}),[]),z=r.useMemo((()=>({adornedStart:I,setAdornedStart:D,color:p,disabled:y,error:b,filled:O,focused:Z,fullWidth:w,hiddenLabel:S,size:_,onBlur:()=>{L(!1)},onFocus:()=>{L(!0)},onEmpty:N,onFilled:j,registerEffect:F,required:k,variant:M})),[I,p,y,b,O,Z,w,S,F,N,j,k,_,M]);return(0,m.jsx)(d.Z.Provider,{value:z,children:(0,m.jsx)(g,{as:v,ownerState:P,className:(0,o.Z)(R.root,h),ref:t,...T,children:a})})}))},29992:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},33567:function(e,t,n){"use strict";function r({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}n.d(t,{Z:()=>r})},36683:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(29992);function i(){return r.useContext(o.Z)}},28797:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(82267),a=n(36683),s=n(12709),l=n(82319),u=n(24043),c=n(52054),d=n(51640),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormControlLabel",e)}const m=(0,h.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var g=n(33567),v=n(16351),y=n(24246);const b=(0,s.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m.label}`]:t.label},t.root,t[`labelPlacement${(0,d.Z)(n.labelPlacement)}`]]}})((0,l.Z)((({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${m.disabled}`]:{cursor:"default"},[`& .${m.label}`]:{[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]})))),x=(0,s.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,l.Z)((({theme:e})=>({[`&.${m.error}`]:{color:(e.vars||e).palette.error.main}})))),w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiFormControlLabel"}),{checked:s,className:l,componentsProps:h={},control:p,disabled:m,disableTypography:w,inputRef:S,label:C,labelPlacement:k="end",name:_,onChange:M,required:T,slots:P={},slotProps:R={},value:I,...D}=n,O=(0,a.Z)(),A=m??p.props.disabled??O?.disabled,E=T??p.props.required,L={disabled:A,required:E};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===p.props[e]&&void 0!==n[e]&&(L[e]=n[e])}));const Z=(0,g.Z)({props:n,muiFormControl:O,states:["error"]}),F={...n,disabled:A,labelPlacement:k,required:E,error:Z.error},j=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,s={root:["root",n&&"disabled",`labelPlacement${(0,d.Z)(r)}`,o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,i.Z)(s,f,t)})(F),N={slots:P,slotProps:{...h,...R}},[z,B]=(0,v.Z)("typography",{elementType:c.Z,externalForwardedProps:N,ownerState:F});let V=C;return null==V||V.type===c.Z||w||(V=(0,y.jsx)(z,{component:"span",...B,className:(0,o.Z)(j.label,B?.className),children:V})),(0,y.jsxs)(b,{className:(0,o.Z)(j.root,l),ownerState:F,ref:t,...D,children:[r.cloneElement(p,L),E?(0,y.jsxs)("div",{children:[V,(0,y.jsxs)(x,{ownerState:F,"aria-hidden":!0,className:j.asterisk,children:[" ","*"]})]}):V]})}))},32931:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(27378),o=n(90496),i=n(82267),a=n(33567),s=n(36683),l=n(12709),u=n(82319),c=n(24043),d=n(51640),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormHelperText",e)}const m=(0,h.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var g,v=n(24246);const y=(0,l.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,d.Z)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((0,u.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${m.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]})))),b=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiFormHelperText"}),{children:r,className:l,component:u="p",disabled:h,error:p,filled:m,focused:b,margin:x,required:w,variant:S,...C}=n,k=(0,s.Z)(),_=(0,a.Z)({props:n,muiFormControl:k,states:["variant","size","disabled","error","filled","focused","required"]}),M={...n,component:u,contained:"filled"===_.variant||"outlined"===_.variant,variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required};delete M.ownerState;const T=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:s,focused:l,required:u}=e,c={root:["root",o&&"disabled",a&&"error",r&&`size${(0,d.Z)(r)}`,n&&"contained",l&&"focused",s&&"filled",u&&"required"]};return(0,i.Z)(c,f,t)})(M);return(0,v.jsx)(y,{as:u,className:(0,o.Z)(T.root,l),ref:t,...C,ownerState:M,children:" "===r?g||(g=(0,v.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})}))},23626:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(33567),s=n(36683),l=n(51640),u=n(12709),c=n(82319),d=n(90433),h=n(24043),p=n(15143),f=n(24246);const m=(0,u.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{[`&.${p.Z.focused}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${p.Z.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.Z.error}`]:{color:(e.vars||e).palette.error.main}}}]})))),g=(0,u.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,c.Z)((({theme:e})=>({[`&.${p.Z.error}`]:{color:(e.vars||e).palette.error.main}})))),v=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiFormLabel"}),{children:r,className:u,color:c,component:d="label",disabled:v,error:y,filled:b,focused:x,required:w,...S}=n,C=(0,s.Z)(),k=(0,a.Z)({props:n,muiFormControl:C,states:["color","required","focused","disabled","error","filled"]}),_={...n,color:k.color||"primary",component:d,disabled:k.disabled,error:k.error,filled:k.filled,focused:k.focused,required:k.required},M=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:s,required:u}=e,c={root:["root",`color${(0,l.Z)(n)}`,o&&"disabled",a&&"error",s&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",a&&"error"]};return(0,i.Z)(c,p.M,t)})(_);return(0,f.jsxs)(m,{as:d,ownerState:_,className:(0,o.Z)(M.root,u),ref:t,...S,children:[r,k.required&&(0,f.jsxs)(g,{ownerState:_,"aria-hidden":!0,className:M.asterisk,children:[" ","*"]})]})}))},15143:function(e,t,n){"use strict";n.d(t,{M:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiFormLabel",e)}const a=(0,r.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"])},38359:function(e,t,n){"use strict";n.d(t,{ZP:()=>w});var r=n(27378),o=n(90496),i=n(13890),a=n(93772),s=n(82267),l=n(12709),u=n(24043),c=n(94776);const d=r.createContext();var h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiGrid",e)}const m=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],g=(0,h.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...m.map((e=>`grid-xs-${e}`)),...m.map((e=>`grid-sm-${e}`)),...m.map((e=>`grid-md-${e}`)),...m.map((e=>`grid-lg-${e}`)),...m.map((e=>`grid-xl-${e}`))]);var v=n(24246);function y({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const b=(0,l.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,u,t));const d=[];return u.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...c,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},..."wrap"!==e.wrap&&{flexWrap:e.wrap}})),(function({theme:e,ownerState:t}){const n=(0,i.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,i.k9)({theme:e},n,(e=>{const t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${g.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,i.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=y({breakpoints:e.breakpoints.values,values:t})),o=(0,i.k9)({theme:e},t,((t,r)=>{const o=e.spacing(t);return"0px"!==o?{marginTop:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingTop:o}}:n?.includes(r)?{}:{marginTop:0,[`& > .${g.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,i.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=y({breakpoints:e.breakpoints.values,values:t})),o=(0,i.k9)({theme:e},t,((t,r)=>{const o=e.spacing(t);if("0px"!==o){return{width:`calc(100% + ${o})`,marginLeft:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingLeft:o}}}return n?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${g.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let a={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=(0,i.P$)({values:t.columns,breakpoints:e.breakpoints.values}),l="object"==typeof s?s[o]:s;if(null==l)return r;const u=Math.round(n/l*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${u} + ${n})`;c={flexBasis:e,maxWidth:e}}}a={flexBasis:u,flexGrow:0,maxWidth:u,...c}}return 0===e.breakpoints.values[o]?Object.assign(r,a):r[e.breakpoints.up(o)]=a,r}),{})}));const x=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:u}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,u));const d=[];u.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const h={root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...d]};return(0,s.Z)(h,f,t)};const w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiGrid"}),{breakpoints:i}=(0,c.Z)(),s=(0,a.Z)(n),{className:l,columns:h,columnSpacing:p,component:f="div",container:m=!1,direction:g="row",item:y=!1,rowSpacing:w,spacing:S=0,wrap:C="wrap",zeroMinWidth:k=!1,..._}=s,M=w||S,T=p||S,P=r.useContext(d),R=m?h||12:P,I={},D={..._};i.keys.forEach((e=>{null!=_[e]&&(I[e]=_[e],delete D[e])}));const O={...s,columns:R,container:m,direction:g,item:y,rowSpacing:M,columnSpacing:T,wrap:C,zeroMinWidth:k,spacing:S,...I,breakpoints:i.keys},A=x(O);return(0,v.jsx)(d.Provider,{value:R,children:(0,v.jsx)(b,{ownerState:O,className:(0,o.Z)(A.root,l),as:f,ref:t,...D})})}))},41305:function(e,t,n){"use strict";n.d(t,{Z:()=>L});var r=n(27378),o=n(90496),i=n(11104),a=n(6749),s=n(82267),l=n(4560),u=n(22179),c=n(38971),d=n(93772),h=n(6798);const p=(e,t,n)=>{const r=e.keys[0];if(Array.isArray(t))t.forEach(((t,r)=>{n(((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)}),t)}));else if(t&&"object"==typeof t){(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,i=Object.keys(t),o.filter((e=>i.includes(e))))).forEach((o=>{if(e.keys.includes(o)){const i=t[o];void 0!==i&&n(((t,n)=>{r===o?Object.assign(t,n):t[e.up(o)]=n}),i)}}))}else"number"!=typeof t&&"string"!=typeof t||n(((e,t)=>{Object.assign(e,t)}),t);var o,i};function f(e){return`--Grid-${e}Spacing`}function m(e){return`--Grid-parent-${e}Spacing`}const g="--Grid-columns",v="--Grid-parent-columns",y=({theme:e,ownerState:t})=>{const n={};return p(e.breakpoints,t.size,((e,t)=>{let r={};"grow"===t&&(r={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(r={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${v}) - (var(${v}) - ${t}) * (var(${m("column")}) / var(${v})))`}),e(n,r)})),n},b=({theme:e,ownerState:t})=>{const n={};return p(e.breakpoints,t.offset,((e,t)=>{let r={};"auto"===t&&(r={marginLeft:"auto"}),"number"==typeof t&&(r={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${v}) + var(${m("column")}) * ${t} / var(${v}))`}),e(n,r)})),n},x=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[g]:12};return p(e.breakpoints,t.columns,((e,t)=>{const r=t??12;e(n,{[g]:r,"> *":{[v]:r}})})),n},w=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.rowSpacing,((t,r)=>{const o="string"==typeof r?r:e.spacing?.(r);t(n,{[f("row")]:o,"> *":{[m("row")]:o}})})),n},S=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.columnSpacing,((t,r)=>{const o="string"==typeof r?r:e.spacing?.(r);t(n,{[f("column")]:o,"> *":{[m("column")]:o}})})),n},C=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.direction,((e,t)=>{e(n,{flexDirection:t})})),n},k=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${f("row")}) var(${f("column")})`}}),_=e=>{const t=[];return Object.entries(e).forEach((([e,n])=>{!1!==n&&void 0!==n&&t.push(`grid-${e}-${String(n)}`)})),t},M=(e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach((([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)})),t}return[]},T=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map((([e,t])=>`direction-${e}-${t}`)):[`direction-xs-${String(e)}`];var P=n(24246);const R=(0,h.Z)(),I=(0,l.Z)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function D(e){return(0,u.Z)({props:e,name:"MuiGrid",defaultTheme:R})}var O=n(12709),A=n(24043),E=n(94776);const L=function(e={}){const{createStyledComponent:t=I,useThemeProps:n=D,useTheme:l=c.Z,componentName:u="MuiGrid"}=e;function h(e,t,n=()=>!0){const r={};return null===e||(Array.isArray(e)?e.forEach(((e,o)=>{null!==e&&n(e)&&t.keys[o]&&(r[t.keys[o]]=e)})):"object"==typeof e?Object.keys(e).forEach((t=>{const o=e[t];null!=o&&n(o)&&(r[t]=o)})):r[t.keys[0]]=e),r}const p=t(x,S,w,y,C,k,b),f=r.forwardRef((function(e,t){const c=l(),f=n(e),m=(0,d.Z)(f);!function(e,t){const n=[];void 0!==e.item&&(delete e.item,n.push("item")),void 0!==e.zeroMinWidth&&(delete e.zeroMinWidth,n.push("zeroMinWidth")),t.keys.forEach((t=>{void 0!==e[t]&&(n.push(t),delete e[t])}))}(m,c.breakpoints);const{className:g,children:v,columns:y=12,container:b=!1,component:x="div",direction:w="row",wrap:S="wrap",size:C={},offset:k={},spacing:R=0,rowSpacing:I=R,columnSpacing:D=R,unstable_level:O=0,...A}=m,E=h(C,c.breakpoints,(e=>!1!==e)),L=h(k,c.breakpoints),Z=e.columns??(O?void 0:y),F=e.spacing??(O?void 0:R),j=e.rowSpacing??e.spacing??(O?void 0:I),N=e.columnSpacing??e.spacing??(O?void 0:D),z={...m,level:O,columns:Z,container:b,direction:w,wrap:S,spacing:F,rowSpacing:j,columnSpacing:N,size:E,offset:L},B=((e,t)=>{const{container:n,direction:r,spacing:o,wrap:i,size:l}=e,c={root:["root",n&&"container","wrap"!==i&&`wrap-xs-${String(i)}`,...T(r),..._(l),...n?M(o,t.breakpoints.keys[0]):[]]};return(0,s.Z)(c,(e=>(0,a.ZP)(u,e)),{})})(z,c);return(0,P.jsx)(p,{ref:t,as:x,ownerState:z,className:(0,o.Z)(B.root,g),...A,children:r.Children.map(v,(e=>r.isValidElement(e)&&(0,i.Z)(e,["Grid"])&&b&&e.props.container?r.cloneElement(e,{unstable_level:e.props?.unstable_level??O+1}):e))})}));return f.muiName="Grid",f}({createStyledComponent:(0,O.ZP)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,A.i)({props:e,name:"MuiGrid2"}),useTheme:E.Z})},23382:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(60203),i=n(94680),a=n(41825),s=n(94776),l=n(42777),u=n(51183),c=n(24246);function d(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:d(1)},entered:{opacity:1,transform:"none"}},p="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),f=r.forwardRef((function(e,t){const{addEndListener:n,appear:f=!0,children:m,easing:g,in:v,onEnter:y,onEntered:b,onEntering:x,onExit:w,onExited:S,onExiting:C,style:k,timeout:_="auto",TransitionComponent:M=a.ZP,...T}=e,P=(0,o.Z)(),R=r.useRef(),I=(0,s.Z)(),D=r.useRef(null),O=(0,u.Z)(D,(0,i.Z)(m),t),A=e=>t=>{if(e){const n=D.current;void 0===t?e(n):e(n,t)}},E=A(x),L=A(((e,t)=>{(0,l.n)(e);const{duration:n,delay:r,easing:o}=(0,l.C)({style:k,timeout:_,easing:g},{mode:"enter"});let i;"auto"===_?(i=I.transitions.getAutoHeightDuration(e.clientHeight),R.current=i):i=n,e.style.transition=[I.transitions.create("opacity",{duration:i,delay:r}),I.transitions.create("transform",{duration:p?i:.666*i,delay:r,easing:o})].join(","),y&&y(e,t)})),Z=A(b),F=A(C),j=A((e=>{const{duration:t,delay:n,easing:r}=(0,l.C)({style:k,timeout:_,easing:g},{mode:"exit"});let o;"auto"===_?(o=I.transitions.getAutoHeightDuration(e.clientHeight),R.current=o):o=t,e.style.transition=[I.transitions.create("opacity",{duration:o,delay:n}),I.transitions.create("transform",{duration:p?o:.666*o,delay:p?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=d(.75),w&&w(e)})),N=A(S);return(0,c.jsx)(M,{appear:f,in:v,nodeRef:D,onEnter:L,onEntered:Z,onEntering:E,onExit:j,onExited:N,onExiting:F,addEndListener:e=>{"auto"===_&&P.start(R.current||0,e),n&&n(D.current,e)},timeout:"auto"===_?null:_,...T,children:(e,{ownerState:t,...n})=>r.cloneElement(m,{style:{opacity:0,transform:d(.75),visibility:"exited"!==e||v?void 0:"hidden",...h[e],...k,...m.props.style},ref:O,...n})})}));f&&(f.muiSupportAuto=!0);const m=f},75094:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267),a=n(56839),s=n(16838),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(14544),p=n(50898),f=n(51640),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiIconButton",e)}const y=(0,m.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]);var b=n(24246);const x=(0,l.ZP)(h.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,f.Z)(n.color)}`],n.edge&&t[`edge${(0,f.Z)(n.edge)}`],t[`size${(0,f.Z)(n.size)}`]]}})((0,u.Z)((({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}))),(0,u.Z)((({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}}))),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${y.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${y.loading}`]:{color:"transparent"}})))),w=(0,l.ZP)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}))),S=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:s,className:l,color:u="default",disabled:c=!1,disableFocusRipple:h=!1,size:m="medium",id:g,loading:y=null,loadingIndicator:S,...C}=n,k=(0,a.Z)(g),_=S??(0,b.jsx)(p.Z,{"aria-labelledby":k,color:"inherit",size:16}),M={...n,edge:r,color:u,disabled:c,disableFocusRipple:h,loading:y,loadingIndicator:_,size:m},T=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a,loading:s}=e,l={root:["root",s&&"loading",n&&"disabled","default"!==r&&`color${(0,f.Z)(r)}`,o&&`edge${(0,f.Z)(o)}`,`size${(0,f.Z)(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,i.Z)(l,v,t)})(M);return(0,b.jsxs)(x,{id:y?k:g,className:(0,o.Z)(T.root,l),centerRipple:!0,focusRipple:!h,disabled:c||y,ref:t,...C,ownerState:M,children:["boolean"==typeof y&&(0,b.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:(0,b.jsx)(w,{className:T.loadingIndicator,ownerState:M,children:y&&_})}),s]})}))},20540:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(82267),i=n(61170),a=n(55879),s=n(73037),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(28678),p=n(24246);const f=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,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(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})))]}}))),m=(0,l.ZP)(a.ni,{name:"MuiInput",slot:"Input",overridesResolver:a._o})({}),g=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,inputComponent:c="input",multiline:g=!1,slotProps:v,slots:y={},type:b="text",...x}=n,w=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,o.Z)(r,h.l,t);return{...t,...i}})(n),S={root:{ownerState:{disableUnderline:r}}},C=v??l?(0,i.Z)(v??l,S):S,k=y.root??s.Root??f,_=y.input??s.Input??m;return(0,p.jsx)(a.ZP,{slots:{root:k,input:_},slotProps:C,fullWidth:u,inputComponent:c,multiline:g,ref:t,type:b,...x,classes:w})}));g.muiName="Input";const v=g},28678:function(e,t,n){"use strict";n.d(t,{Z:()=>a,l:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiInput",["root","underline","input"])}},76992:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(82267),a=n(51640),s=n(52054),l=n(29992),u=n(36683),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiInputAdornment",e)}const g=(0,p.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var v,y=n(24246);const b=(0,c.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,a.Z)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,d.Z)((({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${g.positionStart}&:not(.${g.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]})))),x=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiInputAdornment"}),{children:c,className:d,component:p="div",disablePointerEvents:f=!1,disableTypography:g=!1,position:x,variant:w,...S}=n,C=(0,u.Z)()||{};let k=w;w&&C.variant,C&&!k&&(k=C.variant);const _={...n,hiddenLabel:C.hiddenLabel,size:C.size,disablePointerEvents:f,position:x,variant:k},M=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:s,variant:l}=e,u={root:["root",n&&"disablePointerEvents",o&&`position${(0,a.Z)(o)}`,l,r&&"hiddenLabel",s&&`size${(0,a.Z)(s)}`]};return(0,i.Z)(u,m,t)})(_);return(0,y.jsx)(l.Z.Provider,{value:null,children:(0,y.jsx)(b,{as:p,ownerState:_,className:(0,o.Z)(M.root,d),ref:t,...S,children:"string"!=typeof c||g?(0,y.jsxs)(r.Fragment,{children:["start"===x?v||(v=(0,y.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,c]}):(0,y.jsx)(s.Z,{color:"textSecondary",children:c})})})}))},55879:function(e,t,n){"use strict";n.d(t,{_o:()=>I,ni:()=>O,ZP:()=>E,Ej:()=>D,Gx:()=>R});var r=n(62220),o=n(27378),i=n(90496),a=n(82267),s=n(97048),l=n(33205),u=n(96858),c=n(24384),d=n(24246);function h(e){return parseInt(e,10)||0}const p={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const f=o.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:f,...m}=e,{current:g}=o.useRef(null!=f),v=o.useRef(null),y=(0,s.Z)(t,v),b=o.useRef(null),x=o.useRef(null),w=o.useCallback((()=>{const t=v.current,n=x.current;if(!t||!n)return;const o=(0,l.Z)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=h(o.paddingBottom)+h(o.paddingTop),u=h(o.borderBottomWidth)+h(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+u:0),overflowing:Math.abs(p-c)<=1}}),[r,i,e.placeholder]),S=o.useCallback((()=>{const e=v.current,t=w();if(!e||!t||(function(e){for(const t in e)return!1;return!0}(n=t)||0===n.outerHeightStyle&&!n.overflowing))return;var n;const r=t.outerHeightStyle;b.current!==r&&(b.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""}),[w]),C=o.useRef(-1);(0,u.Z)((()=>{const e=(0,c.Z)((()=>S())),t=v?.current;if(!t)return;const n=(0,l.Z)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{r.unobserve(t),cancelAnimationFrame(C.current),S(),C.current=requestAnimationFrame((()=>{r.observe(t)}))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(C.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[w,S]),(0,u.Z)((()=>{S()}));return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("textarea",{value:f,onChange:e=>{g||S(),n&&n(e)},ref:y,rows:i,style:a,...m}),(0,d.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:x,tabIndex:-1,style:{...p,...a,paddingTop:0,paddingBottom:0}})]})}));var m,g=n(88653),v=n(33567),y=n(29992),b=n(36683),x=n(12709),w=n(16577),S=n(82319),C=n(24043),k=n(51640),_=n(51183),M=n(16758),T=n(65021),P=n(3597);const R=(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,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,k.Z)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},I=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},D=(0,x.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:R})((0,S.Z)((({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${P.Z.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),O=(0,x.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:I})((0,S.Z)((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${P.Z.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${P.Z.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),A=(0,w.zY)({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),E=o.forwardRef((function(e,t){const n=(0,C.i)({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:l,autoFocus:u,className:c,color:h,components:p={},componentsProps:x={},defaultValue:w,disabled:S,disableInjectingGlobalStyles:R,endAdornment:I,error:E,fullWidth:L=!1,id:Z,inputComponent:F="input",inputProps:j={},inputRef:N,margin:z,maxRows:B,minRows:V,multiline:$=!1,name:H,onBlur:W,onChange:G,onClick:U,onFocus:q,onKeyDown:K,onKeyUp:Y,placeholder:X,readOnly:Q,renderSuffix:J,rows:ee,size:te,slotProps:ne={},slots:re={},startAdornment:oe,type:ie="text",value:ae,...se}=n,le=null!=j.value?j.value:ae,{current:ue}=o.useRef(null!=le),ce=o.useRef(),de=o.useCallback((e=>{0}),[]),he=(0,_.Z)(ce,N,j.ref,de),[pe,fe]=o.useState(!1),me=(0,b.Z)();const ge=(0,v.Z)({props:n,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=me?me.focused:pe,o.useEffect((()=>{!me&&S&&pe&&(fe(!1),W&&W())}),[me,S,pe,W]);const ve=me&&me.onFilled,ye=me&&me.onEmpty,be=o.useCallback((e=>{(0,T.vd)(e)?ve&&ve():ye&&ye()}),[ve,ye]);(0,M.Z)((()=>{ue&&be({value:le})}),[le,be,ue]);o.useEffect((()=>{be(ce.current)}),[]);let xe=F,we=j;$&&"input"===xe&&(we=ee?{type:void 0,minRows:ee,maxRows:ee,...we}:{type:void 0,maxRows:B,minRows:V,...we},xe=f);o.useEffect((()=>{me&&me.setAdornedStart(Boolean(oe))}),[me,oe]);const Se={...n,color:ge.color||"primary",disabled:ge.disabled,endAdornment:I,error:ge.error,focused:ge.focused,formControl:me,fullWidth:L,hiddenLabel:ge.hiddenLabel,multiline:$,size:ge.size,startAdornment:oe,type:ie},Ce=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:l,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:f,type:m}=e,g={root:["root",`color${(0,k.Z)(n)}`,r&&"disabled",o&&"error",u&&"fullWidth",s&&"focused",l&&"formControl",p&&"medium"!==p&&`size${(0,k.Z)(p)}`,d&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return(0,a.Z)(g,P.u,t)})(Se),ke=re.root||p.Root||D,_e=ne.root||x.root||{},Me=re.input||p.Input||O;return we={...we,...ne.input??x.input},(0,d.jsxs)(o.Fragment,{children:[!R&&"function"==typeof A&&(m||(m=(0,d.jsx)(A,{}))),(0,d.jsxs)(ke,{..._e,ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),U&&U(e)},...se,...!(0,g.Z)(ke)&&{ownerState:{...Se,..._e.ownerState}},className:(0,i.Z)(Ce.root,_e.className,c,Q&&"MuiInputBase-readOnly"),children:[oe,(0,d.jsx)(y.Z.Provider,{value:null,children:(0,d.jsx)(Me,{"aria-invalid":ge.error,"aria-describedby":s,autoComplete:l,autoFocus:u,defaultValue:w,disabled:ge.disabled,id:Z,onAnimationStart:e=>{be("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:H,placeholder:X,readOnly:Q,required:ge.required,rows:ee,value:le,onKeyDown:K,onKeyUp:Y,type:ie,...we,...!(0,g.Z)(Me)&&{as:xe,ownerState:{...Se,...we.ownerState}},ref:he,className:(0,i.Z)(Ce.input,we.className,Q&&"MuiInputBase-readOnly"),onBlur:e=>{W&&W(e),j.onBlur&&j.onBlur(e),me&&me.onBlur?me.onBlur(e):fe(!1)},onChange:(e,...t)=>{if(!ue){const t=e.target||ce.current;if(null==t)throw new Error((0,r.Z)(1));be({value:t.value})}j.onChange&&j.onChange(e,...t),G&&G(e,...t)},onFocus:e=>{q&&q(e),j.onFocus&&j.onFocus(e),me&&me.onFocus?me.onFocus(e):fe(!0)}})}),I,J?J({...ge,startAdornment:oe}):null]})]})}))},3597:function(e,t,n){"use strict";n.d(t,{Z:()=>a,u:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiInputBase",e)}const a=(0,r.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},65021:function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{B7:()=>i,vd:()=>o})},68808:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(82267),i=n(90496),a=n(33567),s=n(36683),l=n(23626),u=n(15143),c=n(51640),d=n(73037),h=n(12709),p=n(82319),f=n(24043),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiInputLabel",e)}(0,m.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var y=n(24246);const b=(0,h.ZP)(l.Z,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${u.Z.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((0,p.Z)((({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]})))),x=r.forwardRef((function(e,t){const n=(0,f.i)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:l,shrink:u,variant:d,className:h,...p}=n,m=(0,s.Z)();let g=u;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);const x=(0,a.Z)({props:n,muiFormControl:m,states:["size","variant","required","focused"]}),w={...n,disableAnimation:r,formControl:m,shrink:g,size:x.size,variant:x.variant,required:x.required,focused:x.focused},S=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:s,required:l}=e,u={root:["root",n&&"formControl",!a&&"animated",i&&"shrink",r&&"normal"!==r&&`size${(0,c.Z)(r)}`,s],asterisk:[l&&"asterisk"]},d=(0,o.Z)(u,v,t);return{...t,...d}})(w);return(0,y.jsx)(b,{"data-shrink":g,ref:t,className:(0,i.Z)(S.root,h),...p,ownerState:w,classes:S})}))},37809:function(e,t,n){"use strict";n.d(t,{Z:()=>R});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(6595),l=n(10043),u=n(12709),c=n(82319),d=n(90433),h=n(24043),p=n(51640),f=n(44124),m=n(6749);function g(e){return(0,m.ZP)("MuiLinearProgress",e)}(0,f.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var v=n(24246);const y=l.keyframes` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `,b="string"!=typeof y?l.css` animation: ${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `:null,x=l.keyframes` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `,w="string"!=typeof x?l.css` animation: ${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `:null,S=l.keyframes` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `,C="string"!=typeof S?l.css` animation: ${S} 3s infinite linear; `:null,k=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,a.$n)(e.palette[t].main,.62):(0,a._j)(e.palette[t].main,.5),_=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,p.Z)(n.color)}`],t[n.variant]]}})((0,c.Z)((({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{backgroundColor:k(e,t)}}))),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]})))),M=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,p.Z)(n.color)}`]]}})((0,c.Z)((({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>{const n=k(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}}))]}))),C||{animation:`${S} 3s infinite linear`}),T=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((0,c.Z)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}}))),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:b||{animation:`${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]})))),P=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((0,c.Z)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}}))),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:k(e,t),transition:"transform .4s linear"}}))),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:w||{animation:`${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]})))),R=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiLinearProgress"}),{className:r,color:a="primary",value:l,valueBuffer:u,variant:c="indeterminate",...d}=n,f={...n,color:a,variant:c},m=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,p.Z)(r)}`,n],dashed:["dashed",`dashedColor${(0,p.Z)(r)}`],bar1:["bar","bar1",`barColor${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==n&&`barColor${(0,p.Z)(r)}`,"buffer"===n&&`color${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,i.Z)(o,g,t)})(f),y=(0,s.V)(),b={},x={bar1:{},bar2:{}};if("determinate"===c||"buffer"===c)if(void 0!==l){b["aria-valuenow"]=Math.round(l),b["aria-valuemin"]=0,b["aria-valuemax"]=100;let e=l-100;y&&(e=-e),x.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===c)if(void 0!==u){let e=(u||0)-100;y&&(e=-e),x.bar2.transform=`translateX(${e}%)`}else 0;return(0,v.jsxs)(_,{className:(0,o.Z)(m.root,r),ownerState:f,role:"progressbar",...b,ref:t,...d,children:["buffer"===c?(0,v.jsx)(M,{className:m.dashed,ownerState:f}):null,(0,v.jsx)(T,{className:m.bar1,ownerState:f,style:x.bar1}),"determinate"===c?null:(0,v.jsx)(P,{className:m.bar2,ownerState:f,style:x.bar2})]})}))},60886:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(16838),a=n(82267),s=n(74111),l=n(51640),u=n(12709),c=n(94776),d=n(82319),h=n(90433),p=n(24043),f=n(52054),m=n(757),g=n(33160);const v=({theme:e,ownerState:t})=>{const n=t.color,r=(0,g.DW)(e,`palette.${n}.main`,!1)||(0,g.DW)(e,`palette.${n}`,!1)||t.color,o=(0,g.DW)(e,`palette.${n}.mainChannel`)||(0,g.DW)(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,i.Fq)(r,.4)};var y=n(24246);const b={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},x=(0,u.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,l.Z)(n.underline)}`],"button"===n.component&&t.button]}})((0,d.Z)((({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:t})=>"always"===e&&"inherit"!==t.color,style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter((0,h.Z)()).map((([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:(0,i.Fq)(e.palette[t].main,.4)}}))),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,i.Fq)(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:(0,i.Fq)(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{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"},[`&.${m.Z.focusVisible}`]:{outline:"auto"}}}]})))),w=r.forwardRef((function(e,t){const n=(0,p.i)({props:e,name:"MuiLink"}),i=(0,c.Z)(),{className:u,color:d="primary",component:h="a",onBlur:f,onFocus:g,TypographyClasses:w,underline:S="always",variant:C="inherit",sx:k,..._}=n,[M,T]=r.useState(!1),P={...n,color:d,component:h,focusVisible:M,underline:S,variant:C},R=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${(0,l.Z)(o)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,a.Z)(i,m.w,t)})(P);return(0,y.jsx)(x,{color:d,className:(0,o.Z)(R.root,u),classes:w,component:h,onBlur:e=>{(0,s.Z)(e.target)||T(!1),f&&f(e)},onFocus:e=>{(0,s.Z)(e.target)&&T(!0),g&&g(e)},ref:t,ownerState:P,variant:C,..._,sx:[...void 0===b[d]?[{color:d}]:[],...Array.isArray(k)?k:[k]],style:{..._.style,..."always"===S&&"inherit"!==d&&!b[d]&&{"--Link-underlineColor":v({theme:i,ownerState:P})}}})}))},757:function(e,t,n){"use strict";n.d(t,{Z:()=>a,w:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiLink",e)}const a=(0,r.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"])},71852:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(78849),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiList",e)}(0,u.Z)("MuiList",["root","padding","dense","subheader"]);var h=n(24246);const p=(0,a.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiList"}),{children:a,className:u,component:c="ul",dense:f=!1,disablePadding:m=!1,subheader:g,...v}=n,y=r.useMemo((()=>({dense:f})),[f]),b={...n,component:c,dense:f,disablePadding:m},x=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,a={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,i.Z)(a,d,t)})(b);return(0,h.jsx)(l.Z.Provider,{value:y,children:(0,h.jsxs)(p,{as:c,className:(0,o.Z)(x.root,u),ref:t,ownerState:b,...v,children:[g,a]})})}))},78849:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},2259:function(e,t,n){"use strict";n.d(t,{ZP:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(88653),s=n(12709),l=n(82319),u=n(24043),c=n(70777),d=n(51183),h=n(78849),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiListItem",e)}(0,p.Z)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);var g=n(3552);function v(e){return(0,f.ZP)("MuiListItemSecondaryAction",e)}(0,p.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);var y=n(24246);const b=(0,s.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:a,...s}=n,l=r.useContext(h.Z),c={...n,disableGutters:l.disableGutters},d=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,i.Z)(r,v,n)})(c);return(0,y.jsx)(b,{className:(0,o.Z)(d.root,a),ownerState:c,ref:t,...s})}));x.muiName="ListItemSecondaryAction";const w=x,S=(0,s.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,l.Z)((({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${g.Z.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]})))),C=(0,s.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),k=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItem"}),{alignItems:s="center",children:l,className:p,component:f,components:g={},componentsProps:v={},ContainerComponent:b="li",ContainerProps:{className:x,...k}={},dense:_=!1,disableGutters:M=!1,disablePadding:T=!1,divider:P=!1,secondaryAction:R,slotProps:I={},slots:D={},...O}=n,A=r.useContext(h.Z),E=r.useMemo((()=>({dense:_||A.dense||!1,alignItems:s,disableGutters:M})),[s,A.dense,_,M]),L=r.useRef(null),Z=r.Children.toArray(l),F=Z.length&&(0,c.Z)(Z[Z.length-1],["ListItemSecondaryAction"]),j={...n,alignItems:s,dense:E.dense,disableGutters:M,disablePadding:T,divider:P,hasSecondaryAction:F},N=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:s,hasSecondaryAction:l}=e,u={root:["root",r&&"dense",!o&&"gutters",!a&&"padding",s&&"divider","flex-start"===t&&"alignItemsFlexStart",l&&"secondaryAction"],container:["container"]};return(0,i.Z)(u,m,n)})(j),z=(0,d.Z)(L,t),B=D.root||g.Root||S,V=I.root||v.root||{},$={className:(0,o.Z)(N.root,V.className,p),...O};let H=f||"li";return F?(H=$.component||f?H:"div","li"===b&&("li"===H?H="div":"li"===$.component&&($.component="div")),(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(C,{as:b,className:(0,o.Z)(N.container,x),ref:z,ownerState:j,...k,children:[(0,y.jsx)(B,{...V,...!(0,a.Z)(B)&&{as:H,ownerState:{...j,...V.ownerState}},...$,children:Z}),Z.pop()]})})):(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(B,{...V,as:H,ref:z,...!(0,a.Z)(B)&&{ownerState:{...j,...V.ownerState}},...$,children:[Z,R&&(0,y.jsx)(w,{children:R})]})})}))},3552:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemButton",e)}const a=(0,r.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},12211:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(65479),c=n(78849),d=n(24246);const h=(0,a.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((0,s.Z)((({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]})))),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiListItemIcon"}),{className:a,...s}=n,p=r.useContext(c.Z),f={...n,alignItems:p.alignItems},m=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,i.Z)(r,u.f,n)})(f);return(0,d.jsx)(h,{className:(0,o.Z)(m.root,a),ownerState:f,ref:t,...s})}))},65479:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemIcon",e)}const a=(0,r.Z)("MuiListItemIcon",["root","alignItemsFlexStart"])},12577:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(67488),s=n(52054),l=n(78849),u=n(12709),c=n(24043),d=n(14662),h=n(16351),p=n(24246);const f=(0,u.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${d.Z.primary}`]:t.primary},{[`& .${d.Z.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${a.Z.root}:where(& .${d.Z.primary})`]:{display:"block"},[`.${a.Z.root}:where(& .${d.Z.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),m=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiListItemText"}),{children:a,className:u,disableTypography:m=!1,inset:g=!1,primary:v,primaryTypographyProps:y,secondary:b,secondaryTypographyProps:x,slots:w={},slotProps:S={},...C}=n,{dense:k}=r.useContext(l.Z);let _=null!=v?v:a,M=b;const T={...n,disableTypography:m,inset:g,primary:!!_,secondary:!!M,dense:k},P=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e,s={root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,i.Z)(s,d.L,t)})(T),R={slots:w,slotProps:{primary:y,secondary:x,...S}},[I,D]=(0,h.Z)("primary",{className:P.primary,elementType:s.Z,externalForwardedProps:R,ownerState:T}),[O,A]=(0,h.Z)("secondary",{className:P.secondary,elementType:s.Z,externalForwardedProps:R,ownerState:T});return null==_||_.type===s.Z||m||(_=(0,p.jsx)(I,{variant:k?"body2":"body1",component:D?.variant?void 0:"span",...D,children:_})),null==M||M.type===s.Z||m||(M=(0,p.jsx)(O,{variant:"body2",color:"textSecondary",...A,children:M})),(0,p.jsxs)(f,{className:(0,o.Z)(P.root,u),ownerState:T,ref:t,...C,children:[_,M]})}))},14662:function(e,t,n){"use strict";n.d(t,{L:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemText",e)}const a=(0,r.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},5549:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(6595),s=n(25399),l=n(18873),u=n(6714),c=n(73037),d=n(12709),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiMenu",e)}(0,p.Z)("MuiMenu",["root","paper","list"]);var g=n(16351),v=n(24246);const y={vertical:"top",horizontal:"right"},b={vertical:"top",horizontal:"left"},x=(0,d.ZP)(u.ZP,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),w=(0,d.ZP)(u.XS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),S=(0,d.ZP)(l.Z,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),C=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiMenu"}),{autoFocus:l=!0,children:u,className:c,disableAutoFocusItem:d=!1,MenuListProps:p={},onClose:f,open:C,PaperProps:k={},PopoverClasses:_,transitionDuration:M="auto",TransitionProps:{onEntering:T,...P}={},variant:R="selectedMenu",slots:I={},slotProps:D={},...O}=n,A=(0,a.V)(),E={...n,autoFocus:l,disableAutoFocusItem:d,MenuListProps:p,onEntering:T,PaperProps:k,transitionDuration:M,TransitionProps:P,variant:R},L=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"],list:["list"]},m,t)})(E),Z=l&&!d&&C,F=r.useRef(null);let j=-1;r.Children.map(u,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===R&&e.props.selected||-1===j)&&(j=t))}));const N={slots:I,slotProps:{list:p,transition:P,paper:k,...D}},z=(0,s.Z)({elementType:I.root,externalSlotProps:D.root,ownerState:E,className:[L.root,c]}),[B,V]=(0,g.Z)("paper",{className:L.paper,elementType:w,externalForwardedProps:N,shouldForwardComponentProp:!0,ownerState:E}),[$,H]=(0,g.Z)("list",{className:(0,o.Z)(L.list,p.className),elementType:S,shouldForwardComponentProp:!0,externalForwardedProps:N,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),f&&f(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:E}),W="function"==typeof N.slotProps.transition?N.slotProps.transition(E):N.slotProps.transition;return(0,v.jsx)(x,{onClose:f,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?y:b,slots:{root:I.root,paper:B,backdrop:I.backdrop,...I.transition&&{transition:I.transition}},slotProps:{root:z,paper:V,backdrop:"function"==typeof D.backdrop?D.backdrop(E):D.backdrop,transition:{...W,onEntering:(...e)=>{((e,t)=>{F.current&&F.current.adjustStyleForScrollbar(e,{direction:A?"rtl":"ltr"}),T&&T(e,t)})(...e),W?.onEntering?.(...e)}}},open:C,ref:t,transitionDuration:M,ownerState:E,...O,classes:_,children:(0,v.jsx)($,{actions:F,autoFocus:l&&(-1===j||d),autoFocusItem:Z,variant:R,...H,children:u})})}))},30743:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(73037),l=n(12709),u=n(82319),c=n(24043),d=n(78849),h=n(14544),p=n(16758),f=n(51183),m=n(38062),g=n(65479),v=n(14662),y=n(44124),b=n(6749);function x(e){return(0,b.ZP)("MuiMenuItem",e)}const w=(0,y.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var S=n(24246);const C=(0,l.ZP)(h.Z,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,u.Z)((({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(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})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.Z.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.Z.inset}`]:{marginLeft:52},[`& .${v.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${v.Z.inset}`]:{paddingLeft:36},[`& .${g.Z.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${g.Z.root} svg`]:{fontSize:"1.25rem"}}}]})))),k=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiMenuItem"}),{autoFocus:a=!1,component:s="li",dense:l=!1,divider:u=!1,disableGutters:h=!1,focusVisibleClassName:m,role:g="menuitem",tabIndex:v,className:y,...b}=n,w=r.useContext(d.Z),k=r.useMemo((()=>({dense:l||w.dense||!1,disableGutters:h})),[w.dense,l,h]),_=r.useRef(null);(0,p.Z)((()=>{a&&_.current&&_.current.focus()}),[a]);const M={...n,dense:k.dense,divider:u,disableGutters:h},T=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:s}=e,l={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},u=(0,i.Z)(l,x,s);return{...s,...u}})(n),P=(0,f.Z)(_,t);let R;return n.disabled||(R=void 0!==v?v:-1),(0,S.jsx)(d.Z.Provider,{value:k,children:(0,S.jsx)(C,{ref:P,role:g,tabIndex:R,component:s,focusVisibleClassName:(0,o.Z)(T.focusVisible,m),className:(0,o.Z)(T.root,y),...b,ownerState:M,classes:T})})}))},18873:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(2444),i=n(71852);const a=n(16046).Z;var s=n(51183),l=n(16758),u=n(24255),c=n(24246);function d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function h(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function p(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function f(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&p(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const m=r.forwardRef((function(e,t){const{actions:n,autoFocus:m=!1,autoFocusItem:g=!1,children:v,className:y,disabledItemsFocusable:b=!1,disableListWrap:x=!1,onKeyDown:w,variant:S="selectedMenu",...C}=e,k=r.useRef(null),_=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,l.Z)((()=>{m&&k.current.focus()}),[m]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!k.current.style.width;if(e.clientHeight{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===T)&&(T=t),T===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(T+=1,T>=v.length&&(T=-1))):T===t&&(T+=1,T>=v.length&&(T=-1))}));const P=r.Children.map(v,((e,t)=>{if(t===T){const t={};return g&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,c.jsx)(i.Z,{role:"menu",ref:M,className:y,onKeyDown:e=>{const t=k.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(w&&w(e));const r=(0,o.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),f(t,r,x,b,d);else if("ArrowUp"===n)e.preventDefault(),f(t,r,x,b,h);else if("Home"===n)e.preventDefault(),f(t,null,x,b,d);else if("End"===n)e.preventDefault(),f(t,null,x,b,h);else if(1===n.length){const o=_.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&p(r,o);o.previousKeyMatched&&(s||f(t,r,!1,b,d,o))?e.preventDefault():o.previousKeyMatched=!1}w&&w(e)},tabIndex:m?0:-1,...C,children:P})}))},80058:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(27378),o=n(90496),i=n(82267),a=n(25188),s=n(7444),l=n(12709),u=n(82319),c=n(24043),d=n(19090),h=n(97048),p=n(80668),f=n(81925),m=n(38543),g=n(92438),v=n(33205),y=n(16046);function b(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,v.Z)(e).getComputedStyle(e).paddingRight,10)||0}function w(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&b(e,o)}))}function S(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function C(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,p.Z)(e);return t.body===e?(0,v.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,y.Z)((0,v.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${x(r)+e}px`;const t=(0,p.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${x(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,p.Z)(r).body;else{const t=r.parentElement,n=(0,v.Z)(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const k=()=>{},_=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&b(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);w(t,e.mount,e.modalRef,r,!0);const o=S(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=S(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=C(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=S(this.containers,(t=>t.modals.includes(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&b(e.modalRef,t),w(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&b(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const M=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:d}=e,v=r.useRef({}),y=r.useRef(null),x=r.useRef(null),w=(0,h.Z)(x,d),[S,C]=r.useState(!c),M=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let T=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(T=!1);const P=()=>(v.current.modalRef=x.current,v.current.mount=y.current,v.current),R=()=>{_.mount(P(),{disableScrollLock:o}),x.current&&(x.current.scrollTop=0)},I=(0,f.Z)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,p.Z)(y.current).body;_.add(P(),e),x.current&&R()})),D=()=>_.isTopModal(P()),O=(0,f.Z)((e=>{y.current=e,e&&(c&&D()?R():x.current&&b(x.current,T))})),A=r.useCallback((()=>{_.remove(P(),T)}),[T]);r.useEffect((()=>()=>{A()}),[A]),r.useEffect((()=>{c?I():M&&i||A()}),[c,A,M,i,I]);const E=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&D()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},L=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,g.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:E(r),ref:w}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:L(t),open:c}},getTransitionProps:()=>({onEnter:(0,m.Z)((()=>{C(!1),a&&a()}),l?.props.onEnter??k),onExited:(0,m.Z)((()=>{C(!0),s&&s(),i&&A()}),l?.props.onExited??k)}),rootRef:w,portalRef:O,isTopModal:D,exited:S,hasTransition:M}};var T=n(44124),P=n(6749);function R(e){return(0,P.ZP)("MuiModal",e)}(0,T.Z)("MuiModal",["root","hidden","backdrop"]);var I=n(16351),D=n(24246);const O=(0,l.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,u.Z)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),A=(0,l.ZP)(d.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),E=r.forwardRef((function(e,t){const n=(0,c.i)({name:"MuiModal",props:e}),{BackdropComponent:l=A,BackdropProps:u,classes:d,className:h,closeAfterTransition:p=!1,children:f,container:m,component:g,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:k=!1,hideBackdrop:_=!1,keepMounted:T=!1,onBackdropClick:P,onClose:E,onTransitionEnter:L,onTransitionExited:Z,open:F,slotProps:j={},slots:N={},theme:z,...B}=n,V={...n,closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:C,disableScrollLock:k,hideBackdrop:_,keepMounted:T},{getRootProps:$,getBackdropProps:H,getTransitionProps:W,portalRef:G,isTopModal:U,exited:q,hasTransition:K}=M({...V,rootRef:t}),Y={...V,exited:q},X=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.Z)(o,R,r)})(Y),Q={};if(void 0===f.props.tabIndex&&(Q.tabIndex="-1"),K){const{onEnter:e,onExited:t}=W();Q.onEnter=e,Q.onExited=t}const J={slots:{root:v.Root,backdrop:v.Backdrop,...N},slotProps:{...y,...j}},[ee,te]=(0,I.Z)("root",{ref:t,elementType:O,externalForwardedProps:{...J,...B,component:g},getSlotProps:$,ownerState:Y,className:(0,o.Z)(h,X?.root,!Y.open&&Y.exited&&X?.hidden)}),[ne,re]=(0,I.Z)("backdrop",{ref:u?.ref,elementType:l,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:u,getSlotProps:e=>H({...e,onClick:t=>{P&&P(t),e?.onClick&&e.onClick(t)}}),className:(0,o.Z)(u?.className,X?.backdrop),ownerState:Y});return T||F||K&&!q?(0,D.jsx)(s.Z,{ref:G,container:m,disablePortal:S,children:(0,D.jsxs)(ee,{...te,children:[!_&&l?(0,D.jsx)(ne,{...re}):null,(0,D.jsx)(a.Z,{disableEnforceFocus:x,disableAutoFocus:b,disableRestoreFocus:C,isEnabled:U,open:F,children:r.cloneElement(f,Q)})]})}):null}))},51857:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r,o=n(27378),i=n(82267),a=n(73037),s=n(12709),l=n(82319),u=n(24246);const c=(0,s.ZP)("fieldset",{shouldForwardProp:a.Z})({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%"}),d=(0,s.ZP)("legend",{shouldForwardProp:a.Z})((0,l.Z)((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));var h=n(36683),p=n(33567),f=n(90433),m=n(24043),g=n(8782),v=n(55879);const y=(0,s.ZP)(v.Ej,{shouldForwardProp:e=>(0,a.Z)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:v.Gx})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.Z.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter((0,f.Z)()).map((([t])=>({props:{color:t},style:{[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.Z.error} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.Z.disabled} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),b=(0,s.ZP)((function(e){const{children:t,classes:n,className:o,label:i,notched:a,...s}=e,l=null!=i&&""!==i,h={...e,notched:a,withLabel:l};return(0,u.jsx)(c,{"aria-hidden":!0,className:o,ownerState:h,...s,children:(0,u.jsx)(d,{ownerState:h,children:l?(0,u.jsx)("span",{children:i}):r||(r=(0,u.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?"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}}))),x=(0,s.ZP)(v.ni,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:v._o})((0,l.Z)((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),w=o.forwardRef((function(e,t){var n;const r=(0,m.i)({props:e,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:l="input",label:c,multiline:d=!1,notched:f,slots:w={},type:S="text",...C}=r,k=(e=>{const{classes:t}=e,n=(0,i.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.e,t);return{...t,...n}})(r),_=(0,h.Z)(),M=(0,p.Z)({props:r,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T={...r,color:M.color||"primary",disabled:M.disabled,error:M.error,focused:M.focused,formControl:_,fullWidth:s,hiddenLabel:M.hiddenLabel,multiline:d,size:M.size,type:S},P=w.root??a.Root??y,R=w.input??a.Input??x;return(0,u.jsx)(v.ZP,{slots:{root:P,input:R},renderSuffix:e=>(0,u.jsx)(b,{ownerState:T,className:k.notchedOutline,label:null!=c&&""!==c&&M.required?n||(n=(0,u.jsxs)(o.Fragment,{children:[c," ","*"]})):c,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:s,inputComponent:l,multiline:d,ref:t,type:S,...C,classes:{...k,notchedOutline:null}})}));w.muiName="Input";const S=w},8782:function(e,t,n){"use strict";n.d(t,{Z:()=>a,e:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiOutlinedInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiOutlinedInput",["root","notchedOutline","input"])}},28866:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(94776),u=n(82319),c=n(24043),d=n(8505),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiPaper",e)}(0,h.Z)("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"]);var m=n(24246);const g=(0,s.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((0,u.Z)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),v=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiPaper"}),r=(0,l.Z)(),{className:s,component:u="div",elevation:h=1,square:p=!1,variant:v="elevation",...y}=n,b={...n,component:u,elevation:h,square:p,variant:v},x=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,i.Z)(a,f,o)})(b);return(0,m.jsx)(g,{as:u,ownerState:b,className:(0,o.Z)(x.root,s),ref:t,...y,style:{..."elevation"===v&&{"--Paper-shadow":(r.vars||r).shadows[h],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[h]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,a.Fq)("#fff",(0,d.Z)(h))}, ${(0,a.Fq)("#fff",(0,d.Z)(h))})`}},...y.style}})}))},6714:function(e,t,n){"use strict";n.d(t,{XS:()=>M,ZP:()=>T});var r=n(27378),o=n(90496),i=n(82267),a=n(88653),s=n(12709),l=n(24043),u=n(77999),c=n(2444),d=n(24255),h=n(23382),p=n(80058),f=n(28866),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiPopover",e)}(0,m.Z)("MuiPopover",["root","paper"]);var y=n(16351),b=n(27834),x=n(24246);function w(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function k(e){return"function"==typeof e?e():e}const _=(0,s.ZP)(p.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),M=(0,s.ZP)(f.Z,{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}),T=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiPopover"}),{action:s,anchorEl:p,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:g="anchorEl",children:T,className:P,container:R,elevation:I=8,marginThreshold:D=16,open:O,PaperProps:A={},slots:E={},slotProps:L={},transformOrigin:Z={vertical:"top",horizontal:"left"},TransitionComponent:F,transitionDuration:j="auto",TransitionProps:N={},disableScrollLock:z=!1,...B}=n,V=r.useRef(),$={...n,anchorOrigin:f,anchorReference:g,elevation:I,marginThreshold:D,transformOrigin:Z,TransitionComponent:F,transitionDuration:j,TransitionProps:N},H=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"]},v,t)})($),W=r.useCallback((()=>{if("anchorPosition"===g)return m;const e=k(p),t=(e&&1===e.nodeType?e:(0,c.Z)(V.current).body).getBoundingClientRect();return{top:t.top+w(t,f.vertical),left:t.left+S(t,f.horizontal)}}),[p,f.horizontal,f.vertical,m,g]),G=r.useCallback((e=>({vertical:w(e,Z.vertical),horizontal:S(e,Z.horizontal)})),[Z.horizontal,Z.vertical]),U=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===g)return{top:null,left:null,transformOrigin:C(n)};const r=W();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,l=(0,d.Z)(k(p)),u=l.innerHeight-D,c=l.innerWidth-D;if(null!==D&&ou){const e=a-u;o-=e,n.vertical+=e}if(null!==D&&ic){const e=s-c;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:C(n)}}),[p,g,W,G,D]),[q,K]=r.useState(O),Y=r.useCallback((()=>{const e=V.current;if(!e)return;const t=U(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,K(!0)}),[U]);r.useEffect((()=>(z&&window.addEventListener("scroll",Y),()=>window.removeEventListener("scroll",Y))),[p,z,Y]);r.useEffect((()=>{O&&Y()})),r.useImperativeHandle(s,(()=>O?{updatePosition:()=>{Y()}}:null),[O,Y]),r.useEffect((()=>{if(!O)return;const e=(0,u.Z)((()=>{Y()})),t=(0,d.Z)(p);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[p,O,Y]);let X=j;const Q={slots:{transition:F,...E},slotProps:{transition:N,paper:A,...L}},[J,ee]=(0,y.Z)("transition",{elementType:h.Z,externalForwardedProps:Q,ownerState:$,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),Y()},onExited:t=>{e.onExited?.(t),K(!1)}}),additionalProps:{appear:!0,in:O}});"auto"!==j||J.muiSupportAuto||(X=void 0);const te=R||(p?(0,c.Z)(k(p)).body:void 0),[ne,{slots:re,slotProps:oe,...ie}]=(0,y.Z)("root",{ref:t,elementType:_,externalForwardedProps:{...Q,...B},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:E.backdrop},slotProps:{backdrop:(0,b.Z)("function"==typeof L.backdrop?L.backdrop($):L.backdrop,{invisible:!0})},container:te,open:O},ownerState:$,className:(0,o.Z)(H.root,P)}),[ae,se]=(0,y.Z)("paper",{ref:V,className:H.paper,elementType:M,externalForwardedProps:Q,shouldForwardComponentProp:!0,additionalProps:{elevation:I,style:q?void 0:{opacity:0}},ownerState:$});return(0,x.jsx)(ne,{...ie,...!(0,a.Z)(ne)&&{slots:re,slotProps:oe,disableScrollLock:z},children:(0,x.jsx)(J,{...ee,timeout:X,children:(0,x.jsx)(ae,{...se,children:T})})})}))},75651:function(e,t,n){"use strict";n.d(t,{Z:()=>Oe});var r=n(6595),o=n(27378),i=n(97048),a=n(96858),s=n(80668);function l(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function u(e){return e instanceof l(e).Element||e instanceof Element}function c(e){return e instanceof l(e).HTMLElement||e instanceof HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof l(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,p=Math.min,f=Math.round;function m(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function g(){return!/^((?!chrome|android).)*safari/i.test(m())}function v(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&c(e)&&(o=e.offsetWidth>0&&f(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&f(r.height)/e.offsetHeight||1);var a=(u(e)?l(e):window).visualViewport,s=!g()&&n,d=(r.left+(s&&a?a.offsetLeft:0))/o,h=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,m=r.height/i;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function y(e){var t=l(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return v(x(e)).left+y(e).scrollLeft}function S(e){return l(e).getComputedStyle(e)}function C(e){var t=S(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function k(e,t,n){void 0===n&&(n=!1);var r,o,i=c(t),a=c(t)&&function(e){var t=e.getBoundingClientRect(),n=f(t.width)/e.offsetWidth||1,r=f(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=x(t),u=v(e,a,n),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(i||!i&&!n)&&(("body"!==b(t)||C(s))&&(d=(r=t)!==l(r)&&c(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:y(r)),c(t)?((h=v(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):s&&(h.x=w(s))),{x:u.left+d.scrollLeft-h.x,y:u.top+d.scrollTop-h.y,width:u.width,height:u.height}}function _(e){var t=v(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 M(e){return"html"===b(e)?e:e.assignedSlot||e.parentNode||(d(e)?e.host:null)||x(e)}function T(e){return["html","body","#document"].indexOf(b(e))>=0?e.ownerDocument.body:c(e)&&C(e)?e:T(M(e))}function P(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=l(r),a=o?[i].concat(i.visualViewport||[],C(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(P(M(a)))}function R(e){return["table","td","th"].indexOf(b(e))>=0}function I(e){return c(e)&&"fixed"!==S(e).position?e.offsetParent:null}function D(e){for(var t=l(e),n=I(e);n&&R(n)&&"static"===S(n).position;)n=I(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===S(n).position)?t:n||function(e){var t=/firefox/i.test(m());if(/Trident/i.test(m())&&c(e)&&"fixed"===S(e).position)return null;var n=M(e);for(d(n)&&(n=n.host);c(n)&&["html","body"].indexOf(b(n))<0;){var r=S(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",A="bottom",E="right",L="left",Z="auto",F=[O,A,E,L],j="start",N="end",z="viewport",B="popper",V=F.reduce((function(e,t){return e.concat([t+"-"+j,t+"-"+N])}),[]),$=[].concat(F,[Z]).reduce((function(e,t){return e.concat([t,t+"-"+j,t+"-"+N])}),[]),H=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var G={placement:"bottom",modifiers:[],strategy:"absolute"};function U(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function J(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Y(o):null,a=o?X(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case O:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case E:t={x:n.x+n.width,y:l};break;case L:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?Q(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case j:t[u]=t[u]-(n[c]/2-r[c]/2);break;case N:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,m=void 0===p?0:p,g=a.y,v=void 0===g?0:g,y="function"==typeof d?d({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),C=L,k=O,_=window;if(c){var M=D(n),T="clientHeight",P="clientWidth";if(M===l(n)&&"static"!==S(M=x(n)).position&&"absolute"===s&&(T="scrollHeight",P="scrollWidth"),o===O||(o===L||o===E)&&i===N)k=A,v-=(h&&M===_&&_.visualViewport?_.visualViewport.height:M[T])-r.height,v*=u?1:-1;if(o===L||(o===O||o===A)&&i===N)C=E,m-=(h&&M===_&&_.visualViewport?_.visualViewport.width:M[P])-r.width,m*=u?1:-1}var R,I=Object.assign({position:s},c&&ee),Z=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:f(n*o)/o||0,y:f(r*o)/o||0}}({x:m,y:v},l(n)):{x:m,y:v};return m=Z.x,v=Z.y,u?Object.assign({},I,((R={})[k]=w?"0":"",R[C]=b?"0":"",R.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",R)):Object.assign({},I,((t={})[k]=w?v+"px":"",t[C]=b?m+"px":"",t.transform="",t))}var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function re(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var oe={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function ae(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&d(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function se(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function le(e,t,n){return t===z?se(function(e,t){var n=l(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var c=g();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+w(e),y:u}}(e,n)):u(t)?function(e,t){var n=v(e,!1,"fixed"===t);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}(t,n):se(function(e){var t,n=x(e),r=y(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+w(e),l=-r.scrollTop;return"rtl"===S(o||n).direction&&(s+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(x(e)))}function ue(e,t,n,r){var o="clippingParents"===t?function(e){var t=P(M(e)),n=["absolute","fixed"].indexOf(S(e).position)>=0&&c(e)?D(e):e;return u(n)?t.filter((function(e){return u(e)&&ae(e,n)&&"body"!==b(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=le(e,n,r);return t.top=h(o.top,t.top),t.right=p(o.right,t.right),t.bottom=p(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),le(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function de(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function he(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?z:c,h=n.elementContext,p=void 0===h?B:h,f=n.altBoundary,m=void 0!==f&&f,g=n.padding,y=void 0===g?0:g,b=ce("number"!=typeof y?y:de(y,F)),w=p===B?"reference":B,S=e.rects.popper,C=e.elements[m?w:p],k=ue(u(C)?C:C.contextElement||x(e.elements.popper),l,d,a),_=v(e.elements.reference),M=J({reference:_,element:S,strategy:"absolute",placement:o}),T=se(Object.assign({},S,M)),P=p===B?T:_,R={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},I=e.modifiersData.offset;if(p===B&&I){var D=I[o];Object.keys(R).forEach((function(e){var t=[E,A].indexOf(e)>=0?1:-1,n=[O,A].indexOf(e)>=0?"y":"x";R[e]+=D[n]*t}))}return R}function pe(e,t,n){return h(e,p(t,n))}function fe(e,t,n){return void 0===n&&(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 me(e){return[O,E,A,L].some((function(t){return e[t]>=0}))}var ge=q({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=l(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,K)})),s&&u.addEventListener("resize",n.update,K),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,K)})),s&&u.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=J({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:Y(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&b(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(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(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&b(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=$.reduce((function(e,n){return e[n]=function(e,t,n){var r=Y(e),o=[L,O].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[L,E].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=Y(g),y=l||(v===g||!f?[re(g)]:function(e){if(Y(e)===Z)return[];var t=re(e);return[ie(e),t,ie(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(Y(n)===Z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?$:l,c=X(r),d=c?s?V:V.filter((function(e){return X(e)===c})):F,h=d.filter((function(e){return u.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=he(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Y(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,k=b[0],_=0;_=0,I=R?"width":"height",D=he(t,{placement:M,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=R?P?E:L:P?A:O;x[I]>w[I]&&(N=re(N));var z=re(N),B=[];if(i&&B.push(D[T]<=0),s&&B.push(D[N]<=0,D[z]<=0),B.every((function(e){return e}))){k=M,C=!1;break}S.set(M,B)}if(C)for(var H=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},W=f?3:1;W>0;W--){if("break"===H(W))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,m=void 0===f||f,g=n.tetherOffset,v=void 0===g?0:g,y=he(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Y(t.placement),x=X(t.placement),w=!x,S=Q(b),C="x"===S?"y":"x",k=t.modifiersData.popperOffsets,M=t.rects.reference,T=t.rects.popper,P="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,R="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Z={x:0,y:0};if(k){if(i){var F,N="y"===S?O:L,z="y"===S?A:E,B="y"===S?"height":"width",V=k[S],$=V+y[N],H=V-y[z],W=m?-T[B]/2:0,G=x===j?M[B]:T[B],U=x===j?-T[B]:-M[B],q=t.elements.arrow,K=m&&q?_(q):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=J[N],te=J[z],ne=pe(0,M[B],K[B]),re=w?M[B]/2-W-ne-ee-R.mainAxis:G-ne-ee-R.mainAxis,oe=w?-M[B]/2+W+ne+te+R.mainAxis:U+ne+te+R.mainAxis,ie=t.elements.arrow&&D(t.elements.arrow),ae=ie?"y"===S?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(F=null==I?void 0:I[S])?F:0,le=V+oe-se,ue=pe(m?p($,V+re-se-ae):$,V,m?h(H,le):H);k[S]=ue,Z[S]=ue-V}if(s){var ce,de="x"===S?O:L,fe="x"===S?A:E,me=k[C],ge="y"===C?"height":"width",ve=me+y[de],ye=me-y[fe],be=-1!==[O,L].indexOf(b),xe=null!=(ce=null==I?void 0:I[C])?ce:0,we=be?ve:me-M[ge]-T[ge]-xe+R.altAxis,Se=be?me+M[ge]+T[ge]-xe-R.altAxis:ye,Ce=m&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(we,me,Se):pe(m?we:ve,me,m?Se:ye);k[C]=Ce,Z[C]=Ce-me}t.modifiersData[r]=Z}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Y(n.placement),l=Q(s),u=[L,E].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:de(e,F))}(o.padding,n),d=_(i),h="y"===l?O:L,p="y"===l?A:E,f=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=D(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=c[h],x=v-d[u]-c[p],w=v/2-d[u]/2+y,S=pe(b,w,x),C=l;n.modifiersData[r]=((t={})[C]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ae(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=he(t,{elementContext:"reference"}),s=he(t,{altBoundary:!0}),l=fe(a,r),u=fe(s,o,i),c=me(l),d=me(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),ve=n(82267),ye=n(25399),be=n(7444),xe=n(44124),we=n(6749);function Se(e){return(0,we.ZP)("MuiPopper",e)}(0,xe.Z)("MuiPopper",["root"]);var Ce=n(24246);function ke(e){return"function"==typeof e?e():e}function _e(e){return void 0!==e.nodeType}const Me={},Te=o.forwardRef((function(e,t){const{anchorEl:n,children:r,direction:s,disablePortal:l,modifiers:u,open:c,placement:d,popperOptions:h,popperRef:p,slotProps:f={},slots:m={},TransitionProps:g,ownerState:v,...y}=e,b=o.useRef(null),x=(0,i.Z)(b,t),w=o.useRef(null),S=(0,i.Z)(w,p),C=o.useRef(S);(0,a.Z)((()=>{C.current=S}),[S]),o.useImperativeHandle(p,(()=>w.current),[]);const k=function(e,t){if("ltr"===t)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}}(d,s),[_,M]=o.useState(k),[T,P]=o.useState(ke(n));o.useEffect((()=>{w.current&&w.current.forceUpdate()})),o.useEffect((()=>{n&&P(ke(n))}),[n]),(0,a.Z)((()=>{if(!T||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{M(e.placement)}}];null!=u&&(e=e.concat(u)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));const t=ge(T,b.current,{placement:k,...h,modifiers:e});return C.current(t),()=>{t.destroy(),C.current(null)}}),[T,l,u,c,h,k]);const R={placement:_};null!==g&&(R.TransitionProps=g);const I=(e=>{const{classes:t}=e;return(0,ve.Z)({root:["root"]},Se,t)})(e),D=m.root??"div",O=(0,ye.Z)({elementType:D,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:I.root});return(0,Ce.jsx)(D,{...O,children:"function"==typeof r?r(R):r})})),Pe=o.forwardRef((function(e,t){const{anchorEl:n,children:r,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=Me,popperRef:f,style:m,transition:g=!1,slotProps:v={},slots:y={},...b}=e,[x,w]=o.useState(!0);if(!u&&!d&&(!g||x))return null;let S;if(i)S=i;else if(n){const e=ke(n);S=e&&_e(e)?(0,s.Z)(e).body:(0,s.Z)(null).body}const C=d||!u||g&&!x?void 0:"none",k=g?{in:d,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return(0,Ce.jsx)(be.Z,{disablePortal:l,container:S,children:(0,Ce.jsx)(Te,{anchorEl:n,direction:a,disablePortal:l,modifiers:c,ref:t,open:g?!x:d,placement:h,popperOptions:p,popperRef:f,slotProps:v,slots:y,...b,style:{position:"fixed",top:0,left:0,display:C,...m},TransitionProps:k,children:r})})}));var Re=n(12709),Ie=n(24043);const De=(0,Re.ZP)(Pe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Oe=o.forwardRef((function(e,t){const n=(0,r.V)(),o=(0,Ie.i)({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,slots:y,slotProps:b,...x}=o,w=y?.root??s?.Root,S={anchorEl:i,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,...x};return(0,Ce.jsx)(De,{as:a,direction:n?"rtl":"ltr",slots:{root:w},slotProps:b??l,...S,ref:t})}))},7444:function(e,t,n){"use strict";n.d(t,{Z:()=>u});var r=n(27378),o=n(31542),i=n(97048),a=n(94680),s=n(96858),l=n(85817);const u=r.forwardRef((function(e,t){const{children:n,container:u,disablePortal:c=!1}=e,[d,h]=r.useState(null),p=(0,i.Z)(r.isValidElement(n)?(0,a.Z)(n):null,t);if((0,s.Z)((()=>{c||h(function(e){return"function"==typeof e?e():e}(u)||document.body)}),[u,c]),(0,s.Z)((()=>{if(d&&!c)return(0,l.Z)(t,d),()=>{(0,l.Z)(t,null)}}),[t,d,c]),c){if(r.isValidElement(n)){const e={ref:p};return r.cloneElement(n,e)}return n}return d?o.createPortal(n,d):d}))},63767:function(e,t,n){"use strict";n.d(t,{Z:()=>Y});var r=n(27378),o=n(90496),i=n(61170),a=n(82267),s=n(94680),l=n(62220),u=n(5056),c=n(2444),d=n(51640),h=n(5549),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiNativeSelect",e)}const g=(0,p.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var v=n(12709),y=n(73037),b=n(24246);const x=(0,v.ZP)("select")((({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${g.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]}))),w=(0,v.ZP)(x,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:y.Z,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${g.multiple}`]:t.multiple}]}})({}),S=(0,v.ZP)("svg")((({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${g.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}))),C=(0,v.ZP)(S,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),k=r.forwardRef((function(e,t){const{className:n,disabled:i,error:s,IconComponent:l,inputRef:u,variant:c="standard",...h}=e,p={...e,disabled:i,variant:c,error:s},f=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"]};return(0,a.Z)(l,m,t)})(p);return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(w,{ownerState:p,className:(0,o.Z)(f.select,n),disabled:i,ref:u||t,...h}),e.multiple?null:(0,b.jsx)(C,{as:l,ownerState:p,className:f.icon})]})}));var _=n(65021),M=n(4005),T=n(51183),P=n(18817);function R(e){return(0,f.ZP)("MuiSelect",e)}const I=(0,p.Z)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var D;const O=(0,v.ZP)(x,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${I.select}`]:t.select},{[`&.${I.select}`]:t[n.variant]},{[`&.${I.error}`]:t.error},{[`&.${I.multiple}`]:t.multiple}]}})({[`&.${I.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),A=(0,v.ZP)(S,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),E=(0,v.ZP)("input",{shouldForwardProp:e=>(0,M.Z)(e)&&"classes"!==e,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 L(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Z(e){return null==e||"string"==typeof e&&!e.trim()}const F=r.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":i,autoFocus:s,autoWidth:p,children:f,className:m,defaultOpen:g,defaultValue:v,disabled:y,displayEmpty:x,error:w=!1,IconComponent:S,inputRef:C,labelId:k,MenuProps:M={},multiple:I,name:F,onBlur:j,onChange:N,onClose:z,onFocus:B,onOpen:V,open:$,readOnly:H,renderValue:W,required:G,SelectDisplayProps:U={},tabIndex:q,type:K,value:Y,variant:X="standard",...Q}=e,[J,ee]=(0,P.Z)({controlled:Y,default:v,name:"Select"}),[te,ne]=(0,P.Z)({controlled:$,default:g,name:"Select"}),re=r.useRef(null),oe=r.useRef(null),[ie,ae]=r.useState(null),{current:se}=r.useRef(null!=$),[le,ue]=r.useState(),ce=(0,T.Z)(t,C),de=r.useCallback((e=>{oe.current=e,e&&ae(e)}),[]),he=ie?.parentNode;r.useImperativeHandle(ce,(()=>({focus:()=>{oe.current.focus()},node:re.current,value:J})),[J]),r.useEffect((()=>{g&&te&&ie&&!se&&(ue(p?null:he.clientWidth),oe.current.focus())}),[ie,p]),r.useEffect((()=>{s&&oe.current.focus()}),[s]),r.useEffect((()=>{if(!k)return;const e=(0,c.Z)(oe.current).getElementById(k);if(e){const t=()=>{getSelection().isCollapsed&&oe.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[k]);const pe=(e,t)=>{e?V&&V(t):z&&z(t),se||(ue(p?null:he.clientWidth),ne(e))},fe=r.Children.toArray(f),me=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(I){n=Array.isArray(J)?J.slice():[];const t=J.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),J!==n&&(ee(n),N)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:F}}),N(o,e)}I||pe(!1,t)}},ge=null!==ie&&te;let ve,ye;delete Q["aria-invalid"];const be=[];let xe=!1,we=!1;((0,_.vd)({value:J})||x)&&(W?ve=W(J):xe=!0);const Se=fe.map((e=>{if(!r.isValidElement(e))return null;let t;if(I){if(!Array.isArray(J))throw new Error((0,l.Z)(2));t=J.some((t=>L(t,e.props.value))),t&&xe&&be.push(e.props.children)}else t=L(J,e.props.value),t&&xe&&(ye=e.props.children);return t&&(we=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:me(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));xe&&(ve=I?0===be.length?null:be.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,a.Z)(l,R,t)})(Me),Pe={...M.PaperProps,...M.slotProps?.paper},Re=(0,u.Z)();return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(O,{as:"div",ref:de,tabIndex:Ce,role:"combobox","aria-controls":ge?Re:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":ge?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[k,_e].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":G?"true":void 0,"aria-invalid":w?"true":void 0,onKeyDown:e=>{if(!H){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),pe(!0,e))}},onMouseDown:y||H?null:e=>{0===e.button&&(e.preventDefault(),oe.current.focus(),pe(!0,e))},onBlur:e=>{!ge&&j&&(Object.defineProperty(e,"target",{writable:!0,value:{value:J,name:F}}),j(e))},onFocus:B,...U,ownerState:Me,className:(0,o.Z)(U.className,Te.select,m),id:_e,children:Z(ve)?D||(D=(0,b.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ve}),(0,b.jsx)(E,{"aria-invalid":w,value:Array.isArray(J)?J.join(","):J,name:F,ref:re,"aria-hidden":!0,onChange:e=>{const t=fe.find((t=>t.props.value===e.target.value));void 0!==t&&(ee(t.props.value),N&&N(e,t))},tabIndex:-1,disabled:y,className:Te.nativeInput,autoFocus:s,required:G,...Q,ownerState:Me}),(0,b.jsx)(A,{as:S,className:Te.icon,ownerState:Me}),(0,b.jsx)(h.Z,{id:`menu-${F||""}`,anchorEl:he,open:ge,onClose:e=>{pe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...M,slotProps:{...M.slotProps,list:{"aria-labelledby":k,role:"listbox","aria-multiselectable":I?"true":void 0,disableListWrap:!0,id:Re,...M.MenuListProps},paper:{...Pe,style:{minWidth:ke,...null!=Pe?Pe.style:null}}},children:Se})]})}));var j=n(33567),N=n(36683),z=n(97686),B=n(20540),V=n(90222),$=n(51857),H=n(24043);const W={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,y.Z)(e)&&"variant"!==e,slot:"Root"},G=(0,v.ZP)(B.Z,W)(""),U=(0,v.ZP)($.Z,W)(""),q=(0,v.ZP)(V.Z,W)(""),K=r.forwardRef((function(e,t){const n=(0,H.i)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:u,classes:c={},className:d,defaultOpen:h=!1,displayEmpty:p=!1,IconComponent:f=z.Z,id:m,input:g,inputProps:v,label:y,labelId:x,MenuProps:w,multiple:S=!1,native:C=!1,onClose:_,onOpen:M,open:P,renderValue:I,SelectDisplayProps:D,variant:O="outlined",...A}=n,E=C?k:F,L=(0,N.Z)(),Z=(0,j.Z)({props:n,muiFormControl:L,states:["variant","error"]}),B=Z.variant||O,V={...n,variant:B,classes:c},$=(e=>{const{classes:t}=e,n=(0,a.Z)({root:["root"]},R,t);return{...t,...n}})(V),{root:W,...K}=$,Y=g||{standard:(0,b.jsx)(G,{ownerState:V}),outlined:(0,b.jsx)(U,{label:y,ownerState:V}),filled:(0,b.jsx)(q,{ownerState:V})}[B],X=(0,T.Z)(t,(0,s.Z)(Y));return(0,b.jsx)(r.Fragment,{children:r.cloneElement(Y,{inputComponent:E,inputProps:{children:u,error:Z.error,IconComponent:f,variant:B,type:void 0,multiple:S,...C?{id:m}:{autoWidth:l,defaultOpen:h,displayEmpty:p,labelId:x,MenuProps:w,onClose:_,onOpen:M,open:P,renderValue:I,SelectDisplayProps:{id:m,...D}},...v,classes:v?(0,i.Z)(K,v.classes):K,...g?g.props.inputProps:{}},...(S&&C||p)&&"outlined"===B?{notched:!0}:{},ref:X,className:(0,o.Z)(Y.props.className,d,$.root),...!g&&{variant:B},...A})})}));K.muiName="Select";const Y=K},66224:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267);function a(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function s(e){return parseFloat(e)}var l=n(16838),u=n(10043),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiSkeleton",e)}(0,p.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(24246);const v=u.keyframes` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `,y=u.keyframes` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `,b="string"!=typeof v?u.css` animation: ${v} 2s ease-in-out 0.5s infinite; `:null,x="string"!=typeof y?u.css` &::after { animation: ${y} 2s linear 0.5s infinite; } `:null,w=(0,c.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,d.Z)((({theme:e})=>{const t=a(e.shape.borderRadius)||"px",n=s(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,l.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:b||{animation:`${v} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:x||{"&::after":{animation:`${y} 2s linear 0.5s infinite`}}}]}}))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d,...p}=n,f={...n,animation:r,component:s,variant:c,hasChildren:Boolean(p.children)},v=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:s}=e,l={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!s&&"heightAuto"]};return(0,i.Z)(l,m,t)})(f);return(0,g.jsx)(w,{as:s,ref:t,className:(0,o.Z)(v.root,a),ownerState:f,...p,style:{width:d,height:l,...u}})}))},25283:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(79886),o=n(12709),i=n(24043);const a=(0,r.Z)({createStyledComponent:(0,o.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,i.i)({props:e,name:"MuiStack"})})},87895:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(51640),l=n(90433),u=n(99140),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiSwitch",e)}const g=(0,p.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var v=n(24246);const y=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,s.Z)(n.edge)}`],t[`size${(0,s.Z)(n.size)}`]]}})({display:"inline-flex",width:58,height:38,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,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}}}]}),b=(0,c.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==n.color&&t[`color${(0,s.Z)(n.color)}`]]}})((0,d.Z)((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}}))),(0,d.Z)((({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,l.Z)(["light"])).map((([t])=>({props:{color:t},style:{[`&.${g.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,a.$n)(e.palette[t].main,.62):(0,a._j)(e.palette[t].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}})))]})))),x=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,d.Z)((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)})))),w=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,d.Z)((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSwitch"}),{className:r,color:a="primary",edge:l=!1,size:u="medium",sx:c,...d}=n,p={...n,color:a,edge:l,size:u},f=(e=>{const{classes:t,edge:n,size:r,color:o,checked:a,disabled:l}=e,u={root:["root",n&&`edge${(0,s.Z)(n)}`,`size${(0,s.Z)(r)}`],switchBase:["switchBase",`color${(0,s.Z)(o)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,i.Z)(u,m,t);return{...t,...c}})(p),g=(0,v.jsx)(w,{className:f.thumb,ownerState:p});return(0,v.jsxs)(y,{className:(0,o.Z)(f.root,r),sx:c,ownerState:p,children:[(0,v.jsx)(b,{type:"checkbox",icon:g,checkedIcon:g,ref:t,ownerState:p,...d,classes:{...f,root:f.switchBase}}),(0,v.jsx)(x,{className:f.track,ownerState:p})]})}))},49408:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(14544),s=n(51640),l=n(12709),u=n(82319),c=n(24043),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiTab",e)}const f=(0,d.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=n(24246);const g=(0,l.ZP)(a.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,s.Z)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${f.iconWrapper}`]:t.iconWrapper},{[`& .${f.icon}`]:t.icon}]}})((0,u.Z)((({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${f.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${f.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${f.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${f.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${f.selected}`]:{opacity:1},[`&.${f.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${f.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${f.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]})))),v=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTab"}),{className:a,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d,icon:h,iconPosition:f="top",indicator:v,label:y,onChange:b,onClick:x,onFocus:w,selected:S,selectionFollowsFocus:C,textColor:k="inherit",value:_,wrapped:M=!1,...T}=n,P={...n,disabled:l,disableFocusRipple:u,selected:S,icon:!!h,iconPosition:f,label:!!y,fullWidth:d,textColor:k,wrapped:M},R=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:l,selected:u,disabled:c}=e,d={root:["root",a&&l&&"labelIcon",`textColor${(0,s.Z)(n)}`,r&&"fullWidth",o&&"wrapped",u&&"selected",c&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.Z)(d,p,t)})(P),I=h&&y&&r.isValidElement(h)?r.cloneElement(h,{className:(0,o.Z)(R.icon,h.props.className)}):h;return(0,m.jsxs)(g,{focusRipple:!u,className:(0,o.Z)(R.root,a),ref:t,role:"tab","aria-selected":S,disabled:l,onClick:e=>{!S&&b&&b(e,_),x&&x(e)},onFocus:e=>{C&&!S&&b&&b(e,_),w&&w(e)},ownerState:P,tabIndex:S?0:-1,...T,children:["top"===f||"start"===f?(0,m.jsxs)(r.Fragment,{children:[I,y]}):(0,m.jsxs)(r.Fragment,{children:[y,I]}),v]})}))},90190:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(72679),s=n(12709),l=n(82319),u=n(24043),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiTable",e)}(0,c.Z)("MuiTable",["root","stickyHeader"]);var p=n(24246);const f=(0,s.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,l.Z)((({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]})))),m="table",g=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiTable"}),{className:s,component:l=m,padding:c="normal",size:d="medium",stickyHeader:g=!1,...v}=n,y={...n,component:l,padding:c,size:d,stickyHeader:g},b=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,i.Z)(r,h,t)})(y),x=r.useMemo((()=>({padding:c,size:d,stickyHeader:g})),[c,d,g]);return(0,p.jsx)(a.Z.Provider,{value:x,children:(0,p.jsx)(f,{as:l,role:l===m?null:"table",ref:t,className:(0,o.Z)(b.root,s),ownerState:y,...v})})}))},72679:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext()},32641:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext()},56174:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(32641),s=n(12709),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiTableBody",e)}(0,u.Z)("MuiTableBody",["root"]);var h=n(24246);const p=(0,s.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),f={variant:"body"},m="tbody",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableBody"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{className:(0,o.Z)(g.root,r),as:s,ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},96205:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(51640),l=n(72679),u=n(32641),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiTableCell",e)}const g=(0,p.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var v=n(24246);const y=(0,c.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,s.Z)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,s.Z)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,s.Z)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,d.Z)((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,a.$n)((0,a.Fq)(e.palette.divider,1),.88):(0,a._j)((0,a.Fq)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${g.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),b=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiTableCell"}),{align:a="inherit",className:c,component:d,padding:p,scope:f,size:g,sortDirection:b,variant:x,...w}=n,S=r.useContext(l.Z),C=r.useContext(u.Z),k=C&&"head"===C.variant;let _;_=d||(k?"th":"td");let M=f;"td"===_?M=void 0:!M&&k&&(M="col");const T=x||C&&C.variant,P={...n,align:a,component:_,padding:p||(S&&S.padding?S.padding:"normal"),size:g||(S&&S.size?S.size:"medium"),sortDirection:b,stickyHeader:"head"===T&&S&&S.stickyHeader,variant:T},R=(e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:l}=e,u={root:["root",n,l&&"stickyHeader","inherit"!==r&&`align${(0,s.Z)(r)}`,"normal"!==o&&`padding${(0,s.Z)(o)}`,`size${(0,s.Z)(a)}`]};return(0,i.Z)(u,m,t)})(P);let I=null;return b&&(I="asc"===b?"ascending":"descending"),(0,v.jsx)(y,{as:_,ref:t,className:(0,o.Z)(R.root,c),"aria-sort":I,scope:M,ownerState:P,...w})}))},59019:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(44124),u=n(6749);function c(e){return(0,u.ZP)("MuiTableContainer",e)}(0,l.Z)("MuiTableContainer",["root"]);var d=n(24246);const h=(0,a.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{ref:t,as:a,className:(0,o.Z)(p.root,r),ownerState:u,...l})}))},31889:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(32641),s=n(12709),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiTableHead",e)}(0,u.Z)("MuiTableHead",["root"]);var h=n(24246);const p=(0,s.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),f={variant:"head"},m="thead",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableHead"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{as:s,className:(0,o.Z)(g.root,r),ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},30575:function(e,t,n){"use strict";n.d(t,{Z:()=>Z});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(55879),c=n(30743),d=n(63767),h=n(96205),p=n(35231),f=n(6595),m=n(67665),g=n(63633),v=n(75094),y=n(90247),b=n(24246);const x=(0,y.Z)((0,b.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),w=(0,y.Z)((0,b.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),S=r.forwardRef((function(e,t){const{backIconButtonProps:n,count:r,disabled:o=!1,getItemAriaLabel:i,nextIconButtonProps:a,onPageChange:s,page:l,rowsPerPage:u,showFirstButton:c,showLastButton:d,slots:h={},slotProps:p={},...y}=e,S=(0,f.V)(),C=h.firstButton??v.Z,k=h.lastButton??v.Z,_=h.nextButton??v.Z,M=h.previousButton??v.Z,T=h.firstButtonIcon??w,P=h.lastButtonIcon??x,R=h.nextButtonIcon??g.Z,I=h.previousButtonIcon??m.Z,D=S?k:C,O=S?_:M,A=S?M:_,E=S?C:k,L=S?p.lastButton:p.firstButton,Z=S?p.nextButton:p.previousButton,F=S?p.previousButton:p.nextButton,j=S?p.firstButton:p.lastButton;return(0,b.jsxs)("div",{ref:t,...y,children:[c&&(0,b.jsx)(D,{onClick:e=>{s(e,0)},disabled:o||0===l,"aria-label":i("first",l),title:i("first",l),...L,children:S?(0,b.jsx)(P,{...p.lastButtonIcon}):(0,b.jsx)(T,{...p.firstButtonIcon})}),(0,b.jsx)(O,{onClick:e=>{s(e,l-1)},disabled:o||0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l),...Z??n,children:S?(0,b.jsx)(R,{...p.nextButtonIcon}):(0,b.jsx)(I,{...p.previousButtonIcon})}),(0,b.jsx)(A,{onClick:e=>{s(e,l+1)},disabled:o||-1!==r&&l>=Math.ceil(r/u)-1,color:"inherit","aria-label":i("next",l),title:i("next",l),...F??a,children:S?(0,b.jsx)(I,{...p.previousButtonIcon}):(0,b.jsx)(R,{...p.nextButtonIcon})}),d&&(0,b.jsx)(E,{onClick:e=>{s(e,Math.max(0,Math.ceil(r/u)-1))},disabled:o||l>=Math.ceil(r/u)-1,"aria-label":i("last",l),title:i("last",l),...j,children:S?(0,b.jsx)(T,{...p.firstButtonIcon}):(0,b.jsx)(P,{...p.lastButtonIcon})})]})}));var C,k=n(56839),_=n(95703),M=n(16351);const T=(0,a.ZP)(h.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})))),P=(0,a.ZP)(p.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${_.Z.actions}`]:t.actions,...t.toolbar})})((0,s.Z)((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${_.Z.actions}`]:{flexShrink:0,marginLeft:20}})))),R=(0,a.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),I=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((0,s.Z)((({theme:e})=>({...e.typography.body2,flexShrink:0})))),D=(0,a.ZP)(d.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${_.Z.selectIcon}`]:t.selectIcon,[`& .${_.Z.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${_.Z.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),O=(0,a.ZP)(c.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),A=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((0,s.Z)((({theme:e})=>({...e.typography.body2,flexShrink:0}))));function E({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function L(e){return`Go to ${e} page`}const Z=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTablePagination"}),{ActionsComponent:a=S,backIconButtonProps:s,colSpan:c,component:d=h.Z,count:p,disabled:f=!1,getItemAriaLabel:m=L,labelDisplayedRows:g=E,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:x,onRowsPerPageChange:w,page:Z,rowsPerPage:F,rowsPerPageOptions:j=[10,25,50,100],SelectProps:N={},showFirstButton:z=!1,showLastButton:B=!1,slotProps:V={},slots:$={},...H}=n,W=n,G=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},_.U,t)})(W),U=V?.select??N,q=U.native?"option":O;let K;d!==h.Z&&"td"!==d||(K=c||1e3);const Y=(0,k.Z)(U.id),X=(0,k.Z)(U.labelId),Q={slots:$,slotProps:V},[J,ee]=(0,M.Z)("root",{ref:t,className:G.root,elementType:T,externalForwardedProps:{...Q,component:d,...H},ownerState:W,additionalProps:{colSpan:K}}),[te,ne]=(0,M.Z)("toolbar",{className:G.toolbar,elementType:P,externalForwardedProps:Q,ownerState:W}),[re,oe]=(0,M.Z)("spacer",{className:G.spacer,elementType:R,externalForwardedProps:Q,ownerState:W}),[ie,ae]=(0,M.Z)("selectLabel",{className:G.selectLabel,elementType:I,externalForwardedProps:Q,ownerState:W,additionalProps:{id:X}}),[se,le]=(0,M.Z)("select",{className:G.select,elementType:D,externalForwardedProps:Q,ownerState:W}),[ue,ce]=(0,M.Z)("menuItem",{className:G.menuItem,elementType:q,externalForwardedProps:Q,ownerState:W}),[de,he]=(0,M.Z)("displayedRows",{className:G.displayedRows,elementType:A,externalForwardedProps:Q,ownerState:W});return(0,b.jsx)(J,{...ee,children:(0,b.jsxs)(te,{...ne,children:[(0,b.jsx)(re,{...oe}),j.length>1&&(0,b.jsx)(ie,{...ae,children:v}),j.length>1&&(0,b.jsx)(se,{variant:"standard",...!U.variant&&{input:C||(C=(0,b.jsx)(u.ZP,{}))},value:F,onChange:w,id:Y,labelId:X,...U,classes:{...U.classes,root:(0,o.Z)(G.input,G.selectRoot,(U.classes||{}).root),select:(0,o.Z)(G.select,(U.classes||{}).select),icon:(0,o.Z)(G.selectIcon,(U.classes||{}).icon)},disabled:f,...le,children:j.map((e=>(0,r.createElement)(ue,{...ce,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e)))}),(0,b.jsx)(de,{...he,children:g({from:0===p?0:Z*F+1,to:-1===p?(Z+1)*F:-1===F?p:Math.min(p,(Z+1)*F),count:-1===p?-1:p,page:Z})}),(0,b.jsx)(a,{className:G.actions,backIconButtonProps:s,count:p,nextIconButtonProps:y,onPageChange:x,page:Z,rowsPerPage:F,showFirstButton:z,showLastButton:B,slotProps:V.actions,slots:$.actions,getItemAriaLabel:m,disabled:f})]})})}))},95703:function(e,t,n){"use strict";n.d(t,{U:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTablePagination",e)}const a=(0,r.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"])},14968:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(32641),l=n(12709),u=n(82319),c=n(24043),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiTableRow",e)}const f=(0,d.Z)("MuiTableRow",["root","selected","hover","head","footer"]);var m=n(24246);const g=(0,l.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,u.Z)((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${f.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${f.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})))),v="tr",y=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTableRow"}),{className:a,component:l=v,hover:u=!1,selected:d=!1,...h}=n,f=r.useContext(s.Z),y={...n,component:l,hover:u,selected:d,head:f&&"head"===f.variant,footer:f&&"footer"===f.variant},b=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:a}=e,s={root:["root",n&&"selected",r&&"hover",o&&"head",a&&"footer"]};return(0,i.Z)(s,p,t)})(y);return(0,m.jsx)(g,{as:l,ref:t,className:(0,o.Z)(b.root,a),role:l===v?null:"row",ownerState:y,...h})}))},51781:function(e,t,n){"use strict";n.d(t,{Z:()=>z});var r=n(27378),o=n(90496),i=n(82267),a=n(6595),s=n(25399),l=n(12709),u=n(94776),c=n(82319),d=n(24043),h=n(77999);function p(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var f=n(16758),m=n(24255),g=n(24246);const v={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var y=n(67665),b=n(63633),x=n(14544),w=n(44124),S=n(6749);function C(e){return(0,S.ZP)("MuiTabScrollButton",e)}const k=(0,w.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),_=(0,l.ZP)(x.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${k.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),M=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:l={},slotProps:u={},direction:c,orientation:h,disabled:p,...f}=n,m=(0,a.V)(),v={isRtl:m,...n},x=(e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return(0,i.Z)(o,C,t)})(v),w=l.StartScrollButtonIcon??y.Z,S=l.EndScrollButtonIcon??b.Z,k=(0,s.Z)({elementType:w,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),M=(0,s.Z)({elementType:S,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return(0,g.jsx)(_,{component:"div",className:(0,o.Z)(x.root,r),ref:t,role:null,ownerState:v,tabIndex:null,...f,style:{...f.style,..."vertical"===h&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:"left"===c?(0,g.jsx)(w,{...k}):(0,g.jsx)(S,{...M})})}));var T=n(67151),P=n(16052),R=n(2444),I=n(16351);const D=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,O=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,A=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},E=(0,l.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${P.Z.scrollButtons}`]:t.scrollButtons},{[`& .${P.Z.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,c.Z)((({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${P.Z.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]})))),L=(0,l.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Z=(0,l.ZP)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),F=(0,l.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,c.Z)((({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]})))),j=(0,l.ZP)((function(e){const{onChange:t,...n}=e,o=r.useRef(),i=r.useRef(null),a=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return(0,f.Z)((()=>{const e=(0,h.Z)((()=>{const e=o.current;a(),e!==o.current&&t(o.current)})),n=(0,m.Z)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{a(),t(o.current)}),[t]),(0,g.jsx)("div",{style:v,...n,ref:i})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),N={};const z=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabs"}),l=(0,u.Z)(),c=(0,a.V)(),{"aria-label":f,"aria-labelledby":v,action:y,centered:b=!1,children:x,className:w,component:S="div",allowScrollButtonsMobile:C=!1,indicatorColor:k="primary",onChange:_,orientation:z="horizontal",ScrollButtonComponent:B,scrollButtons:V="auto",selectionFollowsFocus:$,slots:H={},slotProps:W={},TabIndicatorProps:G={},TabScrollButtonProps:U={},textColor:q="primary",value:K,variant:Y="standard",visibleScrollbar:X=!1,...Q}=n,J="scrollable"===Y,ee="vertical"===z,te=ee?"scrollTop":"scrollLeft",ne=ee?"top":"left",re=ee?"bottom":"right",oe=ee?"clientHeight":"clientWidth",ie=ee?"height":"width",ae={...n,component:S,allowScrollButtonsMobile:C,indicatorColor:k,orientation:z,vertical:ee,scrollButtons:V,textColor:q,variant:Y,visibleScrollbar:X,fixed:!J,hideScrollbar:J&&!X,scrollableX:J&&!ee,scrollableY:J&&ee,centered:b&&!J,scrollButtonsHideMobile:!C},se=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,i.Z)(c,P.m,u)})(ae),le=(0,s.Z)({elementType:H.StartScrollButtonIcon,externalSlotProps:W.startScrollButtonIcon,ownerState:ae}),ue=(0,s.Z)({elementType:H.EndScrollButtonIcon,externalSlotProps:W.endScrollButtonIcon,ownerState:ae});const[ce,de]=r.useState(!1),[he,pe]=r.useState(N),[fe,me]=r.useState(!1),[ge,ve]=r.useState(!1),[ye,be]=r.useState(!1),[xe,we]=r.useState({overflow:"hidden",scrollbarWidth:0}),Se=new Map,Ce=r.useRef(null),ke=r.useRef(null),_e={slots:H,slotProps:{indicator:G,scrollButton:U,...W}},Me=()=>{const e=Ce.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==K){const e=ke.current.children;if(e.length>0){const t=e[Se.get(K)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},Te=(0,T.Z)((()=>{const{tabsMeta:e,tabMeta:t}=Me();let n,r=0;ee?(n="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(n=c?"right":"left",t&&e&&(r=(c?-1:1)*(t[n]-e[n]+e.scrollLeft)));const o={[n]:r,[ie]:t?t[ie]:0};if("number"!=typeof he[n]||"number"!=typeof he[ie])pe(o);else{const e=Math.abs(he[n]-o[n]),t=Math.abs(he[ie]-o[ie]);(e>=1||t>=1)&&pe(o)}})),Pe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=p,duration:a=300}=r;let s=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void o(new Error("Animation cancelled"));null===s&&(s=r);const c=Math.min(1,(r-s)/a);t[e]=i(c)*(n-l)+l,c>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(te,Ce.current,e,{duration:l.transitions.duration.standard}):Ce.current[te]=e},Re=e=>{let t=Ce.current[te];t+=ee?e:e*(c?-1:1),Pe(t)},Ie=()=>{const e=Ce.current[oe];let t=0;const n=Array.from(ke.current.children);for(let r=0;re){0===r&&(t=e);break}t+=o[oe]}return t},De=()=>{Re(-1*Ie())},Oe=()=>{Re(Ie())},[Ae,{onChange:Ee,...Le}]=(0,I.Z)("scrollbar",{className:(0,o.Z)(se.scrollableX,se.hideScrollbar),elementType:j,shouldForwardComponentProp:!0,externalForwardedProps:_e,ownerState:ae}),Ze=r.useCallback((e=>{Ee?.(e),we({overflow:null,scrollbarWidth:e})}),[Ee]),[Fe,je]=(0,I.Z)("scrollButtons",{className:(0,o.Z)(se.scrollButtons,U.className),elementType:M,externalForwardedProps:_e,ownerState:ae,additionalProps:{orientation:z,slots:{StartScrollButtonIcon:H.startScrollButtonIcon||H.StartScrollButtonIcon,EndScrollButtonIcon:H.endScrollButtonIcon||H.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:le,endScrollButtonIcon:ue}}}),Ne=(0,T.Z)((e=>{const{tabsMeta:t,tabMeta:n}=Me();if(n&&t)if(n[ne]t[re]){const r=t[te]+(n[re]-t[re]);Pe(r,{animation:e})}})),ze=(0,T.Z)((()=>{J&&!1!==V&&be(!ye)}));r.useEffect((()=>{const e=(0,h.Z)((()=>{Ce.current&&Te()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{t?.unobserve(e)})),e.addedNodes.forEach((e=>{t?.observe(e)}))})),e(),ze()},r=(0,m.Z)(Ce.current);let o;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ke.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ke.current,{childList:!0})),()=>{e.clear(),r.removeEventListener("resize",e),o?.disconnect(),t?.disconnect()}}),[Te,ze]),r.useEffect((()=>{const e=Array.from(ke.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&J&&!1!==V){const n=e[0],r=e[t-1],o={root:Ce.current,threshold:.99},i=new IntersectionObserver((e=>{me(!e[0].isIntersecting)}),o);i.observe(n);const a=new IntersectionObserver((e=>{ve(!e[0].isIntersecting)}),o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}}),[J,V,ye,x?.length]),r.useEffect((()=>{de(!0)}),[]),r.useEffect((()=>{Te()})),r.useEffect((()=>{Ne(N!==he)}),[Ne,he]),r.useImperativeHandle(y,(()=>({updateIndicator:Te,updateScrollButtons:ze})),[Te,ze]);const[Be,Ve]=(0,I.Z)("indicator",{className:(0,o.Z)(se.indicator,G.className),elementType:F,externalForwardedProps:_e,ownerState:ae,additionalProps:{style:he}}),$e=(0,g.jsx)(Be,{...Ve});let He=0;const We=r.Children.map(x,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?He:e.props.value;Se.set(t,He);const n=t===K;return He+=1,r.cloneElement(e,{fullWidth:"fullWidth"===Y,indicator:n&&!ce&&$e,selected:n,selectionFollowsFocus:$,onChange:_,textColor:q,value:t,...1!==He||!1!==K||e.props.tabIndex?{}:{tabIndex:0}})})),Ge=(()=>{const e={};e.scrollbarSizeListener=J?(0,g.jsx)(Ae,{...Le,onChange:Ze}):null;const t=J&&("auto"===V&&(fe||ge)||!0===V);return e.scrollButtonStart=t?(0,g.jsx)(Fe,{direction:c?"right":"left",onClick:De,disabled:!fe,...je}):null,e.scrollButtonEnd=t?(0,g.jsx)(Fe,{direction:c?"left":"right",onClick:Oe,disabled:!ge,...je}):null,e})(),[Ue,qe]=(0,I.Z)("root",{ref:t,className:(0,o.Z)(se.root,w),elementType:E,externalForwardedProps:{..._e,...Q,component:S},ownerState:ae}),[Ke,Ye]=(0,I.Z)("scroller",{ref:Ce,className:se.scroller,elementType:L,externalForwardedProps:_e,ownerState:ae,additionalProps:{style:{overflow:xe.overflow,[ee?"margin"+(c?"Left":"Right"):"marginBottom"]:X?void 0:-xe.scrollbarWidth}}}),[Xe,Qe]=(0,I.Z)("list",{ref:ke,className:(0,o.Z)(se.list,se.flexContainer),elementType:Z,externalForwardedProps:_e,ownerState:ae,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{const t=ke.current,n=(0,R.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===z?"ArrowLeft":"ArrowUp",o="horizontal"===z?"ArrowRight":"ArrowDown";switch("horizontal"===z&&c&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),A(t,n,O);break;case o:e.preventDefault(),A(t,n,D);break;case"Home":e.preventDefault(),A(t,null,D);break;case"End":e.preventDefault(),A(t,null,O)}})(t),e.onKeyDown?.(t)}})});return(0,g.jsxs)(Ue,{...qe,children:[Ge.scrollButtonStart,Ge.scrollbarSizeListener,(0,g.jsxs)(Ke,{...Ye,children:[(0,g.jsx)(Xe,{"aria-label":f,"aria-labelledby":v,"aria-orientation":"vertical"===z?"vertical":null,role:"tablist",...Qe,children:We}),ce&&$e]}),Ge.scrollButtonEnd]})}))},16052:function(e,t,n){"use strict";n.d(t,{Z:()=>a,m:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTabs",e)}const a=(0,r.Z)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"])},8695:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(5056),s=n(12709),l=n(24043),u=n(20540),c=n(90222),d=n(51857),h=n(68808),p=n(90192),f=n(32931),m=n(63767),g=n(44124),v=n(6749);function y(e){return(0,v.ZP)("MuiTextField",e)}(0,g.Z)("MuiTextField",["root"]);var b=n(16351),x=n(24246);const w={standard:u.Z,filled:c.Z,outlined:d.Z},S=(0,s.ZP)(p.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),C=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:u,className:c,color:d="primary",defaultValue:p,disabled:g=!1,error:v=!1,FormHelperTextProps:C,fullWidth:k=!1,helperText:_,id:M,InputLabelProps:T,inputProps:P,InputProps:R,inputRef:I,label:D,maxRows:O,minRows:A,multiline:E=!1,name:L,onBlur:Z,onChange:F,onFocus:j,placeholder:N,required:z=!1,rows:B,select:V=!1,SelectProps:$,slots:H={},slotProps:W={},type:G,value:U,variant:q="outlined",...K}=n,Y={...n,autoFocus:s,color:d,disabled:g,error:v,fullWidth:k,multiline:E,required:z,select:V,variant:q},X=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},y,t)})(Y);const Q=(0,a.Z)(M),J=_&&Q?`${Q}-helper-text`:void 0,ee=D&&Q?`${Q}-label`:void 0,te=w[q],ne={slots:H,slotProps:{input:R,inputLabel:T,htmlInput:P,formHelperText:C,select:$,...W}},re={},oe=ne.slotProps.inputLabel;"outlined"===q&&(oe&&void 0!==oe.shrink&&(re.notched=oe.shrink),re.label=D),V&&($&&$.native||(re.id=void 0),re["aria-describedby"]=void 0);const[ie,ae]=(0,b.Z)("input",{elementType:te,externalForwardedProps:ne,additionalProps:re,ownerState:Y}),[se,le]=(0,b.Z)("inputLabel",{elementType:h.Z,externalForwardedProps:ne,ownerState:Y}),[ue,ce]=(0,b.Z)("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Y}),[de,he]=(0,b.Z)("formHelperText",{elementType:f.Z,externalForwardedProps:ne,ownerState:Y}),[pe,fe]=(0,b.Z)("select",{elementType:m.Z,externalForwardedProps:ne,ownerState:Y}),me=(0,x.jsx)(ie,{"aria-describedby":J,autoComplete:r,autoFocus:s,defaultValue:p,fullWidth:k,multiline:E,name:L,rows:B,maxRows:O,minRows:A,type:G,value:U,id:Q,inputRef:I,onBlur:Z,onChange:F,onFocus:j,placeholder:N,inputProps:ce,slots:{input:H.htmlInput?ue:void 0},...ae});return(0,x.jsxs)(S,{className:(0,o.Z)(X.root,c),disabled:g,error:v,fullWidth:k,ref:t,required:z,color:d,variant:q,ownerState:Y,...K,children:[null!=D&&""!==D&&(0,x.jsx)(se,{htmlFor:Q,id:ee,...le,children:D}),V?(0,x.jsx)(pe,{"aria-describedby":J,id:Q,labelId:ee,value:U,input:me,...fe,children:u}):me,_&&(0,x.jsx)(de,{id:J,...he,children:_})]})}))},98346:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(16819),a=n(82267),s=n(16838),l=n(14544),u=n(51640),c=n(12709),d=n(82319),h=n(90433),p=n(24043),f=n(87462),m=n(94996),g=n(19984);function v(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.includes(e):e===t)}var y=n(24246);const b=(0,c.ZP)(l.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${(0,u.Z)(n.size)}`]]}})((0,d.Z)((({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${f.Z.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})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${f.Z.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,h.Z)()).map((([t])=>({props:{color:t},style:{[`&.${f.Z.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.Fq)(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.selectedOpacity)}}}}}))),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]})))),x=r.forwardRef((function(e,t){const{value:n,...s}=r.useContext(m.Z),l=r.useContext(g.Z),c=(0,i.Z)({...s,selected:v(e.value,n)},e),d=(0,p.i)({props:c,name:"MuiToggleButton"}),{children:h,className:x,color:w="standard",disabled:S=!1,disableFocusRipple:C=!1,fullWidth:k=!1,onChange:_,onClick:M,selected:T,size:P="medium",value:R,...I}=d,D={...d,color:w,disabled:S,disableFocusRipple:C,fullWidth:k,size:P},O=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:s}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${(0,u.Z)(i)}`,s]};return(0,a.Z)(l,f.a,t)})(D),A=l||"";return(0,y.jsx)(b,{className:(0,o.Z)(s.className,O.root,x,A),disabled:S,focusRipple:!C,ref:t,onClick:e=>{M&&(M(e,R),e.defaultPrevented)||_&&_(e,R)},onChange:_,value:R,ownerState:D,"aria-pressed":T,...I,children:h})}))},87462:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiToggleButton",e)}const a=(0,r.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"])},5404:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(82267),a=n(65124),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiToggleButtonGroup",e)}const f=(0,d.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);var m=n(94996),g=n(19984),v=n(87462),y=n(24246);const b=(0,s.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${f.grouped}`]:t.grouped},{[`& .${f.grouped}`]:t[`grouped${(0,c.Z)(n.orientation)}`]},{[`& .${f.firstButton}`]:t.firstButton},{[`& .${f.lastButton}`]:t.lastButton},{[`& .${f.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,l.Z)((({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${f.grouped}`]:{[`&.${f.selected} + .${f.grouped}.${f.selected}`]:{borderTop:0,marginTop:0}},[`& .${f.firstButton},& .${f.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${f.lastButton},& .${f.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${f.lastButton}.${v.Z.disabled},& .${f.middleButton}.${v.Z.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${f.grouped}`]:{[`&.${f.selected} + .${f.grouped}.${f.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${f.firstButton},& .${f.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${f.lastButton},& .${f.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${f.lastButton}.${v.Z.disabled},& .${f.middleButton}.${v.Z.disabled}`]:{borderLeft:"1px solid transparent"}}}]})))),x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiToggleButtonGroup"}),{children:s,className:l,color:d="standard",disabled:h=!1,exclusive:f=!1,fullWidth:v=!1,onChange:x,orientation:w="horizontal",size:S="medium",value:C,...k}=n,_={...n,disabled:h,fullWidth:v,orientation:w,size:S},M=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,a={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,c.Z)(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,i.Z)(a,p,t)})(_),T=r.useCallback(((e,t)=>{if(!x)return;const n=C&&C.indexOf(t);let r;C&&n>=0?(r=C.slice(),r.splice(n,1)):r=C?C.concat(t):[t],x(e,r)}),[x,C]),P=r.useCallback(((e,t)=>{x&&x(e,C===t?null:t)}),[x,C]),R=r.useMemo((()=>({className:M.grouped,onChange:f?P:T,value:C,size:S,fullWidth:v,color:d,disabled:h})),[M.grouped,f,P,T,C,S,v,d,h]),I=(0,a.Z)(s),D=I.length,O=e=>{const t=0===e,n=e===D-1;return t&&n?"":t?M.firstButton:n?M.lastButton:M.middleButton};return(0,y.jsx)(b,{role:"group",className:(0,o.Z)(M.root,l),ref:t,ownerState:_,...k,children:(0,y.jsx)(m.Z.Provider,{value:R,children:I.map(((e,t)=>(0,y.jsx)(g.Z.Provider,{value:O(t),children:e},t)))})})}))},19984:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},94996:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},35231:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiToolbar",e)}(0,u.Z)("MuiToolbar",["root","gutters","regular","dense"]);var h=n(24246);const p=(0,a.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,s.Z)((({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]})))),f=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiToolbar"}),{className:r,component:a="div",disableGutters:s=!1,variant:u="regular",...c}=n,f={...n,component:a,disableGutters:s,variant:u},m=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,i.Z)(o,d,t)})(f);return(0,h.jsx)(p,{as:a,className:(0,o.Z)(m.root,r),ref:t,ownerState:f,...c})}))},32964:function(e,t,n){"use strict";n.d(t,{Z:()=>O});var r=n(27378),o=n(90496),i=n(60203),a=n(82267),s=n(16838),l=n(6595),u=n(74111),c=n(94680),d=n(12709),h=n(94776),p=n(82319),f=n(24043),m=n(51640),g=n(23382),v=n(75651),y=n(67151),b=n(51183),x=n(56839),w=n(18817),S=n(16351),C=n(87143),k=n(24246);const _=(0,d.ZP)(v.Z,{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]}})((0,p.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${C.Z.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${C.Z.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]})))),M=(0,d.ZP)("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${(0,m.Z)(n.placement.split("-")[0])}`]]}})((0,p.Z)((({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,s.Fq)(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,[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${C.Z.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${C.Z.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(t=16/14,Math.round(1e5*t)/1e5)+"em",fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${C.Z.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${C.Z.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t}))),T=(0,d.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((0,p.Z)((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,s.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))));let P=!1;const R=new i.V;let I={x:0,y:0};function D(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const O=r.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiTooltip"}),{arrow:s=!1,children:d,classes:p,components:O={},componentsProps:A={},describeChild:E=!1,disableFocusListener:L=!1,disableHoverListener:Z=!1,disableInteractive:F=!1,disableTouchListener:j=!1,enterDelay:N=100,enterNextDelay:z=0,enterTouchDelay:B=700,followCursor:V=!1,id:$,leaveDelay:H=0,leaveTouchDelay:W=1500,onClose:G,onOpen:U,open:q,placement:K="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Q={},slots:J={},title:ee,TransitionComponent:te,TransitionProps:ne,...re}=n,oe=r.isValidElement(d)?d:(0,k.jsx)("span",{children:d}),ie=(0,h.Z)(),ae=(0,l.V)(),[se,le]=r.useState(),[ue,ce]=r.useState(null),de=r.useRef(!1),he=F||V,pe=(0,i.Z)(),fe=(0,i.Z)(),me=(0,i.Z)(),ge=(0,i.Z)(),[ve,ye]=(0,w.Z)({controlled:q,default:!1,name:"Tooltip",state:"open"});let be=ve;const xe=(0,x.Z)($),we=r.useRef(),Se=(0,y.Z)((()=>{void 0!==we.current&&(document.body.style.WebkitUserSelect=we.current,we.current=void 0),ge.clear()}));r.useEffect((()=>Se),[Se]);const Ce=e=>{R.clear(),P=!0,ye(!0),U&&!be&&U(e)},ke=(0,y.Z)((e=>{R.start(800+H,(()=>{P=!1})),ye(!1),G&&be&&G(e),pe.start(ie.transitions.duration.shortest,(()=>{de.current=!1}))})),_e=e=>{de.current&&"touchstart"!==e.type||(se&&se.removeAttribute("title"),fe.clear(),me.clear(),N||P&&z?fe.start(P?z:N,(()=>{Ce(e)})):Ce(e))},Me=e=>{fe.clear(),me.start(H,(()=>{ke(e)}))},[,Te]=r.useState(!1),Pe=e=>{(0,u.Z)(e.target)||(Te(!1),Me(e))},Re=e=>{se||le(e.currentTarget),(0,u.Z)(e.target)&&(Te(!0),_e(e))},Ie=e=>{de.current=!0;const t=oe.props;t.onTouchStart&&t.onTouchStart(e)},De=e=>{Ie(e),me.clear(),pe.clear(),Se(),we.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ge.start(B,(()=>{document.body.style.WebkitUserSelect=we.current,_e(e)}))},Oe=e=>{oe.props.onTouchEnd&&oe.props.onTouchEnd(e),Se(),me.start(W,(()=>{ke(e)}))};r.useEffect((()=>{if(be)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&ke(e)}}),[ke,be]);const Ae=(0,b.Z)((0,c.Z)(oe),le,t);ee||0===ee||(be=!1);const Ee=r.useRef(),Le={},Ze="string"==typeof ee;E?(Le.title=be||!Ze||Z?null:ee,Le["aria-describedby"]=be?xe:null):(Le["aria-label"]=Ze?ee:null,Le["aria-labelledby"]=be&&!Ze?xe:null);const Fe={...Le,...re,...oe.props,className:(0,o.Z)(re.className,oe.props.className),onTouchStart:Ie,ref:Ae,...V?{onMouseMove:e=>{const t=oe.props;t.onMouseMove&&t.onMouseMove(e),I={x:e.clientX,y:e.clientY},Ee.current&&Ee.current.update()}}:{}};const je={};j||(Fe.onTouchStart=De,Fe.onTouchEnd=Oe),Z||(Fe.onMouseOver=D(_e,Fe.onMouseOver),Fe.onMouseLeave=D(Me,Fe.onMouseLeave),he||(je.onMouseOver=_e,je.onMouseLeave=Me)),L||(Fe.onFocus=D(Re,Fe.onFocus),Fe.onBlur=D(Pe,Fe.onBlur),he||(je.onFocus=Re,je.onBlur=Pe));const Ne={...n,isRtl:ae,arrow:s,disableInteractive:he,placement:K,PopperComponentProp:Y,touch:de.current},ze="function"==typeof Q.popper?Q.popper(Ne):Q.popper,Be=r.useMemo((()=>{let e=[{name:"arrow",enabled:Boolean(ue),options:{element:ue,padding:4}}];return X.popperOptions?.modifiers&&(e=e.concat(X.popperOptions.modifiers)),ze?.popperOptions?.modifiers&&(e=e.concat(ze.popperOptions.modifiers)),{...X.popperOptions,...ze?.popperOptions,modifiers:e}}),[ue,X.popperOptions,ze?.popperOptions]),Ve=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,m.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,a.Z)(s,C.Q,t)})(Ne),$e="function"==typeof Q.transition?Q.transition(Ne):Q.transition,He={slots:{popper:O.Popper,transition:O.Transition??te,tooltip:O.Tooltip,arrow:O.Arrow,...J},slotProps:{arrow:Q.arrow??A.arrow,popper:{...X,...ze??A.popper},tooltip:Q.tooltip??A.tooltip,transition:{...ne,...$e??A.transition}}},[We,Ge]=(0,S.Z)("popper",{elementType:_,externalForwardedProps:He,ownerState:Ne,className:(0,o.Z)(Ve.popper,X?.className)}),[Ue,qe]=(0,S.Z)("transition",{elementType:g.Z,externalForwardedProps:He,ownerState:Ne}),[Ke,Ye]=(0,S.Z)("tooltip",{elementType:M,className:Ve.tooltip,externalForwardedProps:He,ownerState:Ne}),[Xe,Qe]=(0,S.Z)("arrow",{elementType:T,className:Ve.arrow,externalForwardedProps:He,ownerState:Ne,ref:ce});return(0,k.jsxs)(r.Fragment,{children:[r.cloneElement(oe,Fe),(0,k.jsx)(We,{as:Y??v.Z,placement:K,anchorEl:V?{getBoundingClientRect:()=>({top:I.y,left:I.x,right:I.x,bottom:I.y,width:0,height:0})}:se,popperRef:Ee,open:!!se&&be,id:xe,transition:!0,...je,...Ge,popperOptions:Be,children:({TransitionProps:e})=>(0,k.jsx)(Ue,{timeout:ie.transitions.duration.shorter,...e,...qe,children:(0,k.jsxs)(Ke,{...Ye,children:[ee,s?(0,k.jsx)(Xe,{...Qe}):null]})})})]})}))},87143:function(e,t,n){"use strict";n.d(t,{Q:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTooltip",e)}const a=(0,r.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"])},52054:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(16577),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(90433),h=n(67488),p=n(24246);const f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},m=(0,a.u7)(),g=(0,s.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,c.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((0,l.Z)((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${(0,c.Z)(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y=r.forwardRef((function(e,t){const{color:n,...r}=(0,u.i)({props:e,name:"MuiTypography"}),a=m({...r,...!f[n]&&{color:n}}),{align:s="inherit",className:l,component:d,gutterBottom:y=!1,noWrap:b=!1,paragraph:x=!1,variant:w="body1",variantMapping:S=v,...C}=a,k={...a,align:s,color:n,className:l,component:d,gutterBottom:y,noWrap:b,paragraph:x,variant:w,variantMapping:S},_=d||(x?"p":S[w]||v[w])||"span",M=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:s}=e,l={root:["root",a,"inherit"!==e.align&&`align${(0,c.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,i.Z)(l,h.f,s)})(k);return(0,p.jsx)(g,{as:_,ref:t,className:(0,o.Z)(M.root,l),...C,ownerState:k,style:{..."inherit"!==s&&{"--Typography-textAlign":s},...C.style}})}))},67488:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTypography",e)}const a=(0,r.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},25188:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(27378),o=n(97048),i=n(94680),a=n(80668),s=n(24246);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function u(e){const t=[],n=[];return Array.from(e.querySelectorAll(l)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function c(){return!0}const d=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:l=!1,disableRestoreFocus:d=!1,getTabbable:h=u,isEnabled:p=c,open:f}=e,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(null),y=r.useRef(null),b=r.useRef(null),x=r.useRef(!1),w=r.useRef(null),S=(0,o.Z)((0,i.Z)(t),w),C=r.useRef(null);r.useEffect((()=>{f&&w.current&&(x.current=!n)}),[n,f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current);return w.current.contains(e.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),x.current&&w.current.focus()),()=>{d||(y.current&&y.current.focus&&(m.current=!0,y.current.focus()),y.current=null)}}),[f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current),t=t=>{C.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===w.current&&t.shiftKey&&(m.current=!0,v.current&&v.current.focus())},n=()=>{const t=w.current;if(null===t)return;if(!e.hasFocus()||!p()||m.current)return void(m.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==v.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!x.current)return;let n=[];if(e.activeElement!==g.current&&e.activeElement!==v.current||(n=h(w.current)),n.length>0){const e=Boolean(C.current?.shiftKey&&"Tab"===C.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,l,d,p,f,h]);const k=e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0};return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:k,ref:g,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:S,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:k,ref:v,"data-testid":"sentinelEnd"})]})}},99140:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(82267),i=n(51640),a=n(73037),s=n(12709),l=n(18817),u=n(36683),c=n(14544),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,d.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var f=n(16351),m=n(24246);const g=(0,s.ZP)(c.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),v=(0,s.ZP)("input",{shouldForwardProp:a.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=r.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:a,defaultChecked:s,disabled:c,disableFocusRipple:d=!1,edge:h=!1,icon:y,id:b,inputProps:x,inputRef:w,name:S,onBlur:C,onChange:k,onFocus:_,readOnly:M,required:T=!1,tabIndex:P,type:R,value:I,slots:D={},slotProps:O={},...A}=e,[E,L]=(0,l.Z)({controlled:r,default:Boolean(s),name:"SwitchBase",state:"checked"}),Z=(0,u.Z)();let F=c;Z&&void 0===F&&(F=Z.disabled);const j="checkbox"===R||"radio"===R,N={...e,checked:E,disabled:F,disableFocusRipple:d,edge:h},z=(e=>{const{classes:t,checked:n,disabled:r,edge:a}=e,s={root:["root",n&&"checked",r&&"disabled",a&&`edge${(0,i.Z)(a)}`],input:["input"]};return(0,o.Z)(s,p,t)})(N),B={slots:D,slotProps:{input:x,...O}},[V,$]=(0,f.Z)("root",{ref:t,elementType:g,className:z.root,shouldForwardComponentProp:!0,externalForwardedProps:{...B,component:"span",...A},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{_&&_(e),Z&&Z.onFocus&&Z.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{C&&C(e),Z&&Z.onBlur&&Z.onBlur(e)})(t)}}),ownerState:N,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:F,role:void 0,tabIndex:null}}),[H,W]=(0,f.Z)("input",{ref:w,elementType:v,className:z.input,externalForwardedProps:B,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;L(t),k&&k(e,t)})(t)}}),ownerState:N,additionalProps:{autoFocus:n,checked:r,defaultChecked:s,disabled:F,id:j?b:void 0,name:S,readOnly:M,required:T,tabIndex:P,type:R,..."checkbox"===R&&void 0===I?{}:{value:I}}});return(0,m.jsxs)(V,{...$,children:[(0,m.jsx)(H,{...W}),E?a:y]})}))},97686:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},23049:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.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")},67665:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},63633:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},45178:function(e,t,n){"use strict";n.d(t,{Z:()=>Q});var r=n(62220),o=n(61170),i=n(16838);const a={black:"#000",white:"#fff"},s={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"},l={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"},u={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"},c={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"},d={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"},h={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"},p={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"};function f(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:a.white,default:a.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const m=f();function g(){return{text:{primary:a.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:a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const v=g();function y(e,t,n,r){const o=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,i.$n)(e.main,o):"dark"===t&&(e.dark=(0,i._j)(e.main,a)))}function b(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:b=.2,...x}=e,w=e.primary||function(e="light"){return"dark"===e?{main:d[200],light:d[50],dark:d[400]}:{main:d[700],light:d[400],dark:d[800]}}(t),S=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),C=e.error||function(e="light"){return"dark"===e?{main:u[500],light:u[300],dark:u[700]}:{main:u[700],light:u[400],dark:u[800]}}(t),k=e.info||function(e="light"){return"dark"===e?{main:h[400],light:h[300],dark:h[700]}:{main:h[700],light:h[500],dark:h[900]}}(t),_=e.success||function(e="light"){return"dark"===e?{main:p[400],light:p[300],dark:p[700]}:{main:p[800],light:p[500],dark:p[900]}}(t),M=e.warning||function(e="light"){return"dark"===e?{main:c[400],light:c[300],dark:c[700]}:{main:"#ed6c02",light:c[500],dark:c[900]}}(t);function T(e){return(0,i.mi)(e,v.text.primary)>=n?v.text.primary:m.text.primary}const P=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,r.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,r.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return y(e,"light",o,b),y(e,"dark",i,b),e.contrastText||(e.contrastText=T(e.main)),e};let R;"light"===t?R=f():"dark"===t&&(R=g());return(0,o.Z)({common:{...a},mode:t,primary:P({color:w,name:"primary"}),secondary:P({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:P({color:C,name:"error"}),warning:P({color:M,name:"warning"}),info:P({color:k,name:"info"}),success:P({color:_,name:"success"}),grey:s,contrastThreshold:n,getContrastText:T,augmentColor:P,tonalOffset:b,...R},x)}function x(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}var w=n(4715),S=n(82664);function C(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const k=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function _(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),k(i,e,`var(${r})`,s),k(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const M=function(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...u}=e,{vars:c,css:d,varsWithDefaults:h}=_(u,t);let p=h;const f={},{[l]:m,...g}=a;if(Object.entries(g||{}).forEach((([e,n])=>{const{vars:r,css:i,varsWithDefaults:a}=_(n,t);p=(0,o.Z)(p,a),f[e]={css:i,vars:r}})),m){const{css:e,vars:n,varsWithDefaults:r}=_(m,t);p=(0,o.Z)(p,r),f[l]={css:e,vars:n}}function v(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(f).forEach((([,{vars:t}])=>{e=(0,o.Z)(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}i(n(void 0,{...d}),d);const{[o]:s,...l}=f;if(s){const{css:e}=s,t=a[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};i(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=a[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};i(n(e,{...s}),s)})),t}}};var T=n(40273),P=n(11652),R=n(6798);var I=n(50971);function D(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const O=["none",D(0,2,1,-1,0,1,1,0,0,1,3,0),D(0,3,1,-2,0,2,2,0,0,1,5,0),D(0,3,3,-2,0,3,4,0,0,1,8,0),D(0,2,4,-1,0,4,5,0,0,1,10,0),D(0,3,5,-1,0,5,8,0,0,1,14,0),D(0,3,5,-1,0,6,10,0,0,1,18,0),D(0,4,5,-2,0,7,10,1,0,2,16,1),D(0,5,5,-3,0,8,10,1,0,3,14,2),D(0,5,6,-3,0,9,12,1,0,3,16,2),D(0,6,6,-3,0,10,14,1,0,4,18,3),D(0,6,7,-4,0,11,15,1,0,4,20,3),D(0,7,8,-4,0,12,17,2,0,5,22,4),D(0,7,8,-4,0,13,19,2,0,5,24,4),D(0,7,9,-4,0,14,21,2,0,5,26,4),D(0,8,9,-5,0,15,22,2,0,6,28,5),D(0,8,10,-5,0,16,24,2,0,6,30,5),D(0,8,11,-5,0,17,26,2,0,6,32,5),D(0,9,11,-5,0,18,28,2,0,7,34,6),D(0,9,12,-6,0,19,29,2,0,7,36,6),D(0,10,13,-6,0,20,31,3,0,8,38,7),D(0,10,13,-6,0,21,33,3,0,8,40,7),D(0,10,14,-6,0,22,35,3,0,8,42,7),D(0,11,14,-7,0,23,36,3,0,9,44,8),D(0,11,15,-7,0,24,38,3,0,9,46,8)];var A=n(39508);const E={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function L(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let i=0;i(0,o.Z)(e,t)),f),f.unstable_sxConfig={...T.Z,...d?.unstable_sxConfig},f.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},f.toRuntimeSource=L,f}const F=Z;var j=n(8505);const N=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=(0,j.Z)(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function z(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function B(e){return"dark"===e?N:[]}function V(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const $=e=>[...[...Array(25)].map(((t,n)=>`--${e?`${e}-`:""}overlays-${n}`)),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],H=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return $(e.cssVarPrefix).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function W(e,t,n){!e[t]&&n&&(e[t]=n)}function G(e){return"string"==typeof e&&e.startsWith("hsl")?(0,i.ve)(e):e}function U(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,i.LR)(G(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const q=e=>{try{return e()}catch(e){}},K=(e="mui")=>x(e);function Y(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=b(t);return{palette:i,opacity:{...z(i.mode),...n},overlays:r||B(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=F({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...z(o),...t?.opacity},overlays:t?.overlays||B(o)},a}function X(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:b({...!0===n?{}:n.palette,mode:t})})}function Q(e={},...t){const{palette:n,cssVariables:a=!1,colorSchemes:s=(n?void 0:{light:!0}),defaultColorScheme:l=n?.mode,...u}=e,c=l||"light",d=s?.[c],h={...s,...n?{[c]:{..."boolean"!=typeof d&&d,palette:n}}:void 0};if(!1===a){if(!("colorSchemes"in e))return F(e,...t);let r=n;"palette"in e||h[c]&&(!0!==h[c]?r=h[c].palette:"dark"===c&&(r={mode:"dark"}));const o=F({...e,palette:r},...t);return o.defaultColorScheme=c,o.colorSchemes=h,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==h.light&&h.light,palette:o.palette},X(o,"dark",h.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==h.dark&&h.dark,palette:o.palette},X(o,"light",h.light)),o}return n||"light"in h||"light"!==c||(h.light=!0),function(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:a,disableCssColorScheme:s=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:u=V,colorSchemeSelector:c=(n.light&&n.dark?"media":void 0),rootSelector:d=":root",...h}=e,p=Object.keys(n)[0],f=a||(n.light&&"light"!==p?"light":p),m=K(l),{[f]:g,light:v,dark:y,...b}=n,x={...b};let k=g;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(k=!0),!k)throw new Error((0,r.Z)(21,f));const _=Y(x,k,h,f);v&&!x.light&&Y(x,v,void 0,"light"),y&&!x.dark&&Y(x,y,void 0,"dark");let R={defaultColorScheme:f,..._,cssVarPrefix:l,colorSchemeSelector:c,rootSelector:d,getCssVar:m,colorSchemes:x,font:{...C(_.typography),..._.font},spacing:(I=h.spacing,"number"==typeof I?`${I}px`:"string"==typeof I||"function"==typeof I||Array.isArray(I)?I:"8px")};var I;Object.keys(R.colorSchemes).forEach((e=>{const t=R.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return m(e,t[r][o])};var r;if("light"===t.mode&&(W(t.common,"background","#fff"),W(t.common,"onBackground","#000")),"dark"===t.mode&&(W(t.common,"background","#000"),W(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){W(t.Alert,"errorColor",(0,i.q8)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.q8)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.q8)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.q8)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-main")),W(t.Alert,"infoFilledBg",n("palette-info-main")),W(t.Alert,"successFilledBg",n("palette-success-main")),W(t.Alert,"warningFilledBg",n("palette-warning-main")),W(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.main)))),W(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.main)))),W(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.main)))),W(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.main)))),W(t.Alert,"errorStandardBg",(0,i.ux)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.ux)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.ux)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.ux)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-100")),W(t.Avatar,"defaultBg",n("palette-grey-400")),W(t.Button,"inheritContainedBg",n("palette-grey-300")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),W(t.Chip,"defaultBorder",n("palette-grey-400")),W(t.Chip,"defaultAvatarColor",n("palette-grey-700")),W(t.Chip,"defaultIconColor",n("palette-grey-700")),W(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.ux)(t.primary.main,.62)),W(t.LinearProgress,"secondaryBg",(0,i.ux)(t.secondary.main,.62)),W(t.LinearProgress,"errorBg",(0,i.ux)(t.error.main,.62)),W(t.LinearProgress,"infoBg",(0,i.ux)(t.info.main,.62)),W(t.LinearProgress,"successBg",(0,i.ux)(t.success.main,.62)),W(t.LinearProgress,"warningBg",(0,i.ux)(t.warning.main,.62)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),W(t.Slider,"primaryTrack",(0,i.ux)(t.primary.main,.62)),W(t.Slider,"secondaryTrack",(0,i.ux)(t.secondary.main,.62)),W(t.Slider,"errorTrack",(0,i.ux)(t.error.main,.62)),W(t.Slider,"infoTrack",(0,i.ux)(t.info.main,.62)),W(t.Slider,"successTrack",(0,i.ux)(t.success.main,.62)),W(t.Slider,"warningTrack",(0,i.ux)(t.warning.main,.62));const e=(0,i.fk)(t.background.default,.8);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-400")),W(t.StepContent,"border",n("palette-grey-400")),W(t.Switch,"defaultColor",n("palette-common-white")),W(t.Switch,"defaultDisabledColor",n("palette-grey-100")),W(t.Switch,"primaryDisabledColor",(0,i.ux)(t.primary.main,.62)),W(t.Switch,"secondaryDisabledColor",(0,i.ux)(t.secondary.main,.62)),W(t.Switch,"errorDisabledColor",(0,i.ux)(t.error.main,.62)),W(t.Switch,"infoDisabledColor",(0,i.ux)(t.info.main,.62)),W(t.Switch,"successDisabledColor",(0,i.ux)(t.success.main,.62)),W(t.Switch,"warningDisabledColor",(0,i.ux)(t.warning.main,.62)),W(t.TableCell,"border",(0,i.ux)((0,i.zp)(t.divider,1),.88)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}if("dark"===t.mode){W(t.Alert,"errorColor",(0,i.ux)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.ux)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.ux)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.ux)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-dark")),W(t.Alert,"infoFilledBg",n("palette-info-dark")),W(t.Alert,"successFilledBg",n("palette-success-dark")),W(t.Alert,"warningFilledBg",n("palette-warning-dark")),W(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.dark)))),W(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.dark)))),W(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.dark)))),W(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.dark)))),W(t.Alert,"errorStandardBg",(0,i.q8)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.q8)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.q8)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.q8)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-900")),W(t.AppBar,"darkBg",n("palette-background-paper")),W(t.AppBar,"darkColor",n("palette-text-primary")),W(t.Avatar,"defaultBg",n("palette-grey-600")),W(t.Button,"inheritContainedBg",n("palette-grey-800")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),W(t.Chip,"defaultBorder",n("palette-grey-700")),W(t.Chip,"defaultAvatarColor",n("palette-grey-300")),W(t.Chip,"defaultIconColor",n("palette-grey-300")),W(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.q8)(t.primary.main,.5)),W(t.LinearProgress,"secondaryBg",(0,i.q8)(t.secondary.main,.5)),W(t.LinearProgress,"errorBg",(0,i.q8)(t.error.main,.5)),W(t.LinearProgress,"infoBg",(0,i.q8)(t.info.main,.5)),W(t.LinearProgress,"successBg",(0,i.q8)(t.success.main,.5)),W(t.LinearProgress,"warningBg",(0,i.q8)(t.warning.main,.5)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),W(t.Slider,"primaryTrack",(0,i.q8)(t.primary.main,.5)),W(t.Slider,"secondaryTrack",(0,i.q8)(t.secondary.main,.5)),W(t.Slider,"errorTrack",(0,i.q8)(t.error.main,.5)),W(t.Slider,"infoTrack",(0,i.q8)(t.info.main,.5)),W(t.Slider,"successTrack",(0,i.q8)(t.success.main,.5)),W(t.Slider,"warningTrack",(0,i.q8)(t.warning.main,.5));const e=(0,i.fk)(t.background.default,.98);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-600")),W(t.StepContent,"border",n("palette-grey-600")),W(t.Switch,"defaultColor",n("palette-grey-300")),W(t.Switch,"defaultDisabledColor",n("palette-grey-600")),W(t.Switch,"primaryDisabledColor",(0,i.q8)(t.primary.main,.55)),W(t.Switch,"secondaryDisabledColor",(0,i.q8)(t.secondary.main,.55)),W(t.Switch,"errorDisabledColor",(0,i.q8)(t.error.main,.55)),W(t.Switch,"infoDisabledColor",(0,i.q8)(t.info.main,.55)),W(t.Switch,"successDisabledColor",(0,i.q8)(t.success.main,.55)),W(t.Switch,"warningDisabledColor",(0,i.q8)(t.warning.main,.55)),W(t.TableCell,"border",(0,i.q8)((0,i.zp)(t.divider,1),.68)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}U(t.background,"default"),U(t.background,"paper"),U(t.common,"background"),U(t.common,"onBackground"),U(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&W(t[e],"mainChannel",(0,i.LR)(G(n.main))),n.light&&W(t[e],"lightChannel",(0,i.LR)(G(n.light))),n.dark&&W(t[e],"darkChannel",(0,i.LR)(G(n.dark))),n.contrastText&&W(t[e],"contrastTextChannel",(0,i.LR)(G(n.contrastText))),"text"===e&&(U(t[e],"primary"),U(t[e],"secondary")),"action"===e&&(n.active&&U(t[e],"active"),n.selected&&U(t[e],"selected")))}))})),R=t.reduce(((e,t)=>(0,o.Z)(e,t)),R);const D={prefix:l,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:H(R)},{vars:O,generateThemeVars:A,generateStyleSheets:E}=M(R,D);return R.vars=O,Object.entries(R.colorSchemes[R.defaultColorScheme]).forEach((([e,t])=>{R[e]=t})),R.generateThemeVars=A,R.generateStyleSheets=E,R.generateSpacing=function(){return(0,w.Z)(h.spacing,(0,S.hB)(this))},R.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(c),R.spacing=R.generateSpacing(),R.shouldSkipGeneratingVar=u,R.unstable_sxConfig={...T.Z,...h?.unstable_sxConfig},R.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},R.toRuntimeSource=L,R}({...u,colorSchemes:h,defaultColorScheme:c,..."boolean"!=typeof a&&a},...t)}},39508:function(e,t,n){"use strict";n.d(t,{ZP:()=>s,x9:()=>o});const r={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)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return`${Math.round(e)}ms`}function a(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function s(e){const t={...r,...e.easing},n={...o,...e.duration};return{getAutoHeightDuration:a,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:s=0,...l}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:i(o)} ${a} ${"string"==typeof s?s:i(s)}`)).join(",")},...e,easing:t,duration:n}}},50971:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(61170);const o={textTransform:"uppercase"},i='"Roboto", "Helvetica", "Arial", sans-serif';function a(e,t){const{fontFamily:n=i,fontSize:a=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:h,pxToRem:p,...f}="function"==typeof t?t(e):t;const m=a/14,g=p||(e=>e/d*m+"rem"),v=(e,t,r,o,a)=>{return{fontFamily:n,fontWeight:e,fontSize:g(t),lineHeight:r,...n===i?{letterSpacing:(s=o/t,Math.round(1e5*s)/1e5)+"em"}:{},...a,...h};var s},y={h1:v(s,96,1.167,-1.5),h2:v(s,60,1.2,-.5),h3:v(l,48,1.167,0),h4:v(l,34,1.235,.25),h5:v(l,24,1.334,0),h6:v(u,20,1.6,.15),subtitle1:v(l,16,1.75,.15),subtitle2:v(u,14,1.57,.1),body1:v(l,16,1.5,.15),body2:v(l,14,1.43,.15),button:v(u,14,1.75,.4,o),caption:v(l,12,1.66,.4),overline:v(l,12,2.66,1,o),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,r.Z)({htmlFontSize:d,pxToRem:g,fontFamily:n,fontSize:a,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:u,fontWeightBold:c,...y},f,{clone:!1})}},53126:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(45178).Z)()},8505:function(e,t,n){"use strict";function r(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}n.d(t,{Z:()=>r})},92994:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r="$$material"},73037:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(4005);const o=e=>(0,r.Z)(e)&&"classes"!==e},4005:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},12709:function(e,t,n){"use strict";n.d(t,{ZP:()=>s});var r=n(35315),o=n(53126),i=n(92994),a=n(73037);const s=(0,r.ZP)({themeId:i.Z,defaultTheme:o.Z,rootShouldForwardProp:a.Z})},94776:function(e,t,n){"use strict";n.d(t,{Z:()=>a});n(27378);var r=n(38971),o=n(53126),i=n(92994);function a(){const e=(0,r.Z)(o.Z);return e[i.Z]||e}},68014:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(22179),o=n(53126),i=n(92994);function a({props:e,name:t}){return(0,r.Z)({props:e,name:t,defaultTheme:o.Z,themeId:i.Z})}},42777:function(e,t,n){"use strict";n.d(t,{C:()=>o,n:()=>r});const r=e=>e.scrollTop;function o(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}},70678:function(e,t,n){"use strict";n.d(t,{D:()=>c,Z:()=>m});var r=n(27378),o=n(5056),i=n(9831),a=n(7860),s=n(81925),l=n(85817);function u(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function c(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=u(c));const d=c?e.filter((e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=u(r)),"start"===o?r.startsWith(c):r.includes(c)})):e;return"number"==typeof r?d.slice(0,r):d}}const d=c(),h=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),p=[];function f(e,t,n){if(t||null==e)return"";const r=n(e);return"string"==typeof r?r:""}const m=function(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:n="Mui",autoComplete:u=!1,autoHighlight:c=!1,autoSelect:m=!1,blurOnSelect:g=!1,clearOnBlur:v=!e.freeSolo,clearOnEscape:y=!1,componentName:b="useAutocomplete",defaultValue:x=(e.multiple?p:null),disableClearable:w=!1,disableCloseOnSelect:S=!1,disabled:C,disabledItemsFocusable:k=!1,disableListWrap:_=!1,filterOptions:M=d,filterSelectedOptions:T=!1,freeSolo:P=!1,getOptionDisabled:R,getOptionKey:I,getOptionLabel:D=e=>e.label??e,groupBy:O,handleHomeEndKeys:A=!e.freeSolo,id:E,includeInputInList:L=!1,inputValue:Z,isOptionEqualToValue:F=(e,t)=>e===t,multiple:j=!1,onChange:N,onClose:z,onHighlightChange:B,onInputChange:V,onOpen:$,open:H,openOnFocus:W=!1,options:G,readOnly:U=!1,selectOnFocus:q=!e.freeSolo,value:K}=e,Y=(0,o.Z)(E);let X=D;X=e=>{const t=D(e);return"string"!=typeof t?String(t):t};const Q=r.useRef(!1),J=r.useRef(!0),ee=r.useRef(null),te=r.useRef(null),[ne,re]=r.useState(null),[oe,ie]=r.useState(-1),ae=c?0:-1,se=r.useRef(ae),le=r.useRef(f(x,j,X)).current,[ue,ce]=(0,i.Z)({controlled:K,default:x,name:b}),[de,he]=(0,i.Z)({controlled:Z,default:le,name:b,state:"inputValue"}),[pe,fe]=r.useState(!1),me=r.useCallback(((e,t,n)=>{if(!(j?ue.length!T||!(j?ue:[ue]).some((t=>null!==t&&F(e,t))))),{inputValue:xe&&ye?"":de,getOptionLabel:X}):[],Ce=(0,a.Z)({filteredOptions:Se,value:ue,inputValue:de});r.useEffect((()=>{const e=ue!==Ce.value;pe&&!e||P&&!e||me(null,ue,"reset")}),[ue,me,pe,Ce.value,P]);const ke=ge&&Se.length>0&&!U,_e=(0,s.Z)((e=>{-1===e?ee.current.focus():ne.querySelector(`[data-tag-index="${e}"]`).focus()}));r.useEffect((()=>{j&&oe>ue.length-1&&(ie(-1),_e(-1))}),[ue,j,oe,_e]);const Me=(0,s.Z)((({event:e,index:t,reason:r="auto"})=>{if(se.current=t,-1===t?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Y}-option-${t}`),B&&B(e,-1===t?null:Se[t],r),!te.current)return;const o=te.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=te.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(O?1.3:0){if(!we)return;const o=function(e,t){if(!te.current||e<0||e>=Se.length)return-1;let n=e;for(;;){const r=te.current.querySelector(`[data-option-index="${n}"]`),o=!k&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%Se.length:(n-1+Se.length)%Se.length,n===e)return-1}}((()=>{const e=Se.length-1;if("reset"===t)return ae;if("start"===t)return 0;if("end"===t)return e;const n=se.current+t;return n<0?-1===n&&L?-1:_&&-1!==se.current||Math.abs(t)>1?0:e:n>e?n===e+1&&L?-1:_||Math.abs(t)>1?e:0:n})(),n);if(Me({index:o,reason:r,event:e}),u&&"reset"!==t)if(-1===o)ee.current.value=de;else{const e=X(Se[o]);ee.current.value=e;0===e.toLowerCase().indexOf(de.toLowerCase())&&de.length>0&&ee.current.setSelectionRange(de.length,e.length)}})),Pe=r.useCallback((()=>{if(!we)return;const e=(()=>{if(-1!==se.current&&Ce.filteredOptions&&Ce.filteredOptions.length!==Se.length&&Ce.inputValue===de&&(j?ue.length===Ce.value.length&&Ce.value.every(((e,t)=>X(ue[t])===X(e))):(e=Ce.value,t=ue,(e?X(e):"")===(t?X(t):"")))){const e=Ce.filteredOptions[se.current];if(e)return Se.findIndex((t=>X(t)===X(e)))}var e,t;return-1})();if(-1!==e)return void(se.current=e);const t=j?ue[0]:ue;if(0!==Se.length&&null!=t){if(te.current)if(null==t)se.current>=Se.length-1?Me({index:Se.length-1}):Me({index:se.current});else{const e=Se[se.current];if(j&&e&&-1!==ue.findIndex((t=>F(e,t))))return;const n=Se.findIndex((e=>F(e,t)));-1===n?Te({diff:"reset"}):Me({index:n})}}else Te({diff:"reset"})}),[Se.length,!j&&ue,T,Te,Me,we,de,j]),Re=(0,s.Z)((e=>{(0,l.Z)(te,e),e&&Pe()}));r.useEffect((()=>{Pe()}),[Pe]);const Ie=e=>{ge||(ve(!0),be(!0),$&&$(e))},De=(e,t)=>{ge&&(ve(!1),z&&z(e,t))},Oe=(e,t,n,r)=>{if(j){if(ue.length===t.length&&ue.every(((e,n)=>e===t[n])))return}else if(ue===t)return;N&&N(e,t,n,r),ce(t)},Ae=r.useRef(!1),Ee=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(j){i=Array.isArray(ue)?ue.slice():[];const e=i.findIndex((e=>F(t,e)));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}me(e,i,o),Oe(e,i,o,{option:t}),S||e&&(e.ctrlKey||e.metaKey)||De(e,o),(!0===g||"touch"===g&&Ae.current||"mouse"===g&&!Ae.current)&&ee.current.blur()},Le=(e,t)=>{if(!j)return;""===de&&De(e,"toggleInput");let n=oe;-1===oe?""===de&&"previous"===t&&(n=ue.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===ue.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===ue.length||"previous"===t&&-1===n)return-1;const e=ne.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ie(n),_e(n)},Ze=e=>{Q.current=!0,he(""),V&&V(e,"","clear"),Oe(e,j?[]:null,"clear")},Fe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===oe||["ArrowLeft","ArrowRight"].includes(t.key)||(ie(-1),_e(-1)),229!==t.which))switch(t.key){case"Home":we&&A&&(t.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":we&&A&&(t.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Te({diff:-5,direction:"previous",reason:"keyboard",event:t}),Ie(t);break;case"PageDown":t.preventDefault(),Te({diff:5,direction:"next",reason:"keyboard",event:t}),Ie(t);break;case"ArrowDown":t.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:t}),Ie(t);break;case"ArrowUp":t.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:t}),Ie(t);break;case"ArrowLeft":Le(t,"previous");break;case"ArrowRight":Le(t,"next");break;case"Enter":if(-1!==se.current&&we){const e=Se[se.current],n=!!R&&R(e);if(t.preventDefault(),n)return;Ee(t,e,"selectOption"),u&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else P&&""!==de&&!1===xe&&(j&&t.preventDefault(),Ee(t,de,"createOption","freeSolo"));break;case"Escape":we?(t.preventDefault(),t.stopPropagation(),De(t,"escape")):y&&(""!==de||j&&ue.length>0)&&(t.preventDefault(),t.stopPropagation(),Ze(t));break;case"Backspace":if(j&&!U&&""===de&&ue.length>0){const e=-1===oe?ue.length-1:oe,n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})}break;case"Delete":if(j&&!U&&""===de&&ue.length>0&&-1!==oe){const e=oe,n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})}}},je=e=>{fe(!0),W&&!Q.current&&Ie(e)},Ne=e=>{t(te)?ee.current.focus():(fe(!1),J.current=!0,Q.current=!1,m&&-1!==se.current&&we?Ee(e,Se[se.current],"blur"):m&&P&&""!==de?Ee(e,de,"blur","freeSolo"):v&&me(e,ue,"blur"),De(e,"blur"))},ze=e=>{const t=e.target.value;de!==t&&(he(t),be(!1),V&&V(e,t,"input")),""===t?w||j||Oe(e,null,"clear"):Ie(e)},Be=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));se.current!==t&&Me({event:e,index:t,reason:"mouse"})},Ve=e=>{Me({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Ae.current=!0},$e=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Ee(e,Se[t],"selectOption"),Ae.current=!1},He=e=>t=>{const n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})},We=e=>{ge?De(e,"toggleInput"):Ie(e)},Ge=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Y&&e.preventDefault()},Ue=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),q&&J.current&&ee.current.selectionEnd-ee.current.selectionStart==0&&ee.current.select(),J.current=!1)},qe=e=>{C||""!==de&&ge||We(e)};let Ke=P&&de.length>0;Ke=Ke||(j?ue.length>0:null!==ue);let Ye=Se;if(O){new Map;Ye=Se.reduce(((e,t,n)=>{const r=O(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return C&&pe&&Ne(),{getRootProps:(e={})=>({...e,onKeyDown:Fe(e),onMouseDown:Ge,onClick:Ue}),getInputLabelProps:()=>({id:`${Y}-label`,htmlFor:Y}),getInputProps:()=>({id:Y,value:de,onBlur:Ne,onFocus:je,onChange:ze,onMouseDown:qe,"aria-activedescendant":we?"":null,"aria-autocomplete":u?"both":"list","aria-controls":ke?`${Y}-listbox`:void 0,"aria-expanded":ke,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:C}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ze}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:We}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!U&&{onDelete:He(e)}}),getListboxProps:()=>({role:"listbox",id:`${Y}-listbox`,"aria-labelledby":`${Y}-label`,ref:Re,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(j?ue:[ue]).some((e=>null!=e&&F(t,e))),r=!!R&&R(t);return{key:I?.(t)??X(t),tabIndex:-1,role:"option",id:`${Y}-option-${e}`,onMouseMove:Be,onClick:$e,onTouchStart:Ve,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:Y,inputValue:de,value:ue,dirty:Ke,expanded:we&&ne,popupOpen:we,focused:pe||-1!==oe,anchorEl:ne,setAnchorEl:re,focusedTag:oe,groupedOptions:Ye}}},76439:function(e,t,n){"use strict";n.d(t,{Z:()=>h});var r=n(27378),o=n.t(r,2),i=n(96858),a=n(49267),s=n(24105);function l(e,t,n,o,a){const[s,l]=r.useState((()=>a&&n?n(e).matches:o?o(e).matches:t));return(0,i.Z)((()=>{if(!n)return;const t=n(e),r=()=>{l(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}}),[e,n]),s}const u={...o}.useSyncExternalStore;function c(e,t,n,o,i){const a=r.useCallback((()=>t),[t]),s=r.useMemo((()=>{if(i&&n)return()=>n(e).matches;if(null!==o){const{matches:t}=o(e);return()=>t}return a}),[a,e,o,i,n]),[l,c]=r.useMemo((()=>{if(null===n)return[a,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]}),[a,n,e]);return u(c,l,s)}function d(e={}){const{themeId:t}=e;return function(e,n={}){let r=(0,s.Z)();r&&t&&(r=r[t]||r);const o="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:i=!1,matchMedia:d=(o?window.matchMedia:null),ssrMatchMedia:h=null,noSsr:p=!1}=(0,a.Z)({name:"MuiUseMediaQuery",props:n,theme:r});let f="function"==typeof e?e(r):e;f=f.replace(/^@media( ?)/m,"");return(void 0!==u?c:l)(f,i,d,h,p)}}d();const h=d({themeId:n(92994).Z})},51640:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(3150).Z},65698:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(38543).Z},90433:function(e,t,n){"use strict";function r(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}n.d(t,{Z:()=>r})},90247:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(51640),s=n(12709),l=n(82319),u=n(24043),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiSvgIcon",e)}(0,c.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(24246);const f=(0,s.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,a.Z)(n.color)}`],t[`fontSize${(0,a.Z)(n.fontSize)}`]]}})((0,l.Z)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),m=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:c="inherit",component:d="svg",fontSize:m="medium",htmlColor:g,inheritViewBox:v=!1,titleAccess:y,viewBox:b="0 0 24 24",...x}=n,w=r.isValidElement(s)&&"svg"===s.type,S={...n,color:c,component:d,fontSize:m,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:b,hasSvgAsChild:w},C={};v||(C.viewBox=b);const k=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&`color${(0,a.Z)(t)}`,`fontSize${(0,a.Z)(n)}`]};return(0,i.Z)(o,h,r)})(S);return(0,p.jsxs)(f,{as:d,className:(0,o.Z)(k.root,l),focusable:"false",color:g,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t,...C,...x,...w&&s.props,ownerState:S,children:[w?s.props.children:s,y?(0,p.jsx)("title",{children:y}):null]})}));m.muiName="SvgIcon";const g=m;function v(e,t){function n(n,r){return(0,p.jsx)(g,{"data-testid":`${t}Icon`,ref:r,...n,children:e})}return n.muiName=g.muiName,r.memo(r.forwardRef(n))}},77999:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(24384).Z},87554:function(e,t,n){"use strict";n.r(t),n.d(t,{requirePropFactory:()=>p,unstable_useEnhancedEffect:()=>m.Z,ownerDocument:()=>d.Z,setRef:()=>f,useControlled:()=>y.Z,unstable_ClassNameGenerator:()=>S,isMuiElement:()=>u.Z,unstable_memoTheme:()=>c.Z,ownerWindow:()=>h.Z,useEventCallback:()=>b.Z,deprecatedPropType:()=>l,useForkRef:()=>x.Z,createSvgIcon:()=>a.Z,capitalize:()=>o.Z,debounce:()=>s.Z,unsupportedProp:()=>v,mergeSlotProps:()=>w.Z,unstable_useId:()=>g.Z,createChainedFunction:()=>i.Z});var r=n(70544),o=n(51640),i=n(65698),a=n(90247),s=n(77999);const l=function(e,t){return()=>null};var u=n(70777),c=n(82319),d=n(2444),h=n(24255);const p=function(e,t){return()=>null};const f=n(85817).Z;var m=n(16758),g=n(56839);const v=function(e,t,n,r,o){return null};var y=n(18817),b=n(67151),x=n(51183),w=n(27834);const S={configure:e=>{r.Z.configure(e)}}},88653:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"string"==typeof e}},70777:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(11104).Z},82319:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(83606);const o={theme:void 0};const i=function(e){let t,n;return function(i){let a=t;return void 0!==a&&i.theme===n||(o.theme=i.theme,a=(0,r.Z)(e(o)),t=a,n=i.theme),a}}},27834:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(90496);function o(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const o="function"==typeof t?t(n):t,i="function"==typeof e?e({...n,...o}):e,a=(0,r.Z)(n?.className,o?.className,i?.className);return{...o,...i,...!!a&&{className:a},...o?.style&&i?.style&&{style:{...o.style,...i.style}},...o?.sx&&i?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(i.sx)?i.sx:[i.sx]]}}};const n=t,o=(0,r.Z)(n?.className,e?.className);return{...t,...e,...!!o&&{className:o},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}},2444:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(80668).Z},24255:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(33205).Z},18817:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(9831).Z},16758:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(96858).Z},67151:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(81925).Z},51183:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(97048).Z},56839:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(5056).Z},16351:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(97048),o=n(60206),i=n(85480),a=n(92729);function s(e,t){const{className:n,elementType:s,ownerState:l,externalForwardedProps:u,internalForwardedProps:c,shouldForwardComponentProp:d=!1,...h}=t,{component:p,slots:f={[e]:void 0},slotProps:m={[e]:void 0},...g}=u,v=f[e]||s,y=(0,i.Z)(m[e],l),{props:{component:b,...x},internalRef:w}=(0,a.Z)({className:n,...h,externalForwardedProps:"root"===e?g:void 0,externalSlotProps:y}),S=(0,r.Z)(w,y?.ref,t.ref),C="root"===e?b||p:b;return[v,(0,o.Z)(v,{..."root"===e&&!p&&!f[e]&&c,..."root"!==e&&!f[e]&&c,...x,...C&&!d&&{as:C},...C&&d&&{component:C},ref:S},l)]}},16577:function(e,t,n){"use strict";n.d(t,{zY:()=>d,u7:()=>h});n(27378);var r=n(93772),o=n(69118),i=n(38971),a=n(24246);const s=function({styles:e,themeId:t,defaultTheme:n={}}){const r=(0,i.Z)(n),s="function"==typeof e?e(t&&r[t]||r):e;return(0,a.jsx)(o.Z,{styles:s})};var l=n(53126),u=n(92994);const c=function(e){return(0,a.jsx)(s,{...e,defaultTheme:l.Z,themeId:u.Z})};function d(e){return function(t){return(0,a.jsx)(c,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}function h(){return r.Z}},69118:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(10043),o=n(24246);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.Global,{styles:i})}},89966:function(e,t,n){"use strict";n.d(t,{ZP:()=>i,bu:()=>l,nf:()=>a});var r=n(51958),o=n(42747);function i(e,t){return(0,r.default)(e,t)}function a(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const s=[];function l(e){return s[0]=e,(0,o.O)(s)}},34807:function(e,t,n){"use strict";n.d(t,{Z:()=>l,i:()=>s});var r=n(27378),o=n(16819),i=n(24246);const a=r.createContext(void 0);function s({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.Z)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.Z)(i,r)}({props:e,name:t,theme:{components:r.useContext(a)}})}const l=function({value:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}},6595:function(e,t,n){"use strict";n.d(t,{V:()=>a,Z:()=>s});var r=n(27378),o=n(24246);const i=r.createContext();const a=()=>r.useContext(i)??!1,s=function({value:e,...t}){return(0,o.jsx)(i.Provider,{value:e??!0,...t})}},79886:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(61170),a=n(6749),s=n(82267),l=n(4560),u=n(22179),c=n(93772),d=n(6798),h=n(13890),p=n(82664),f=n(24246);const m=(0,d.Z)(),g=(0,l.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function v(e){return(0,u.Z)({props:e,name:"MuiStack",defaultTheme:m})}function y(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i{let n={display:"flex",flexDirection:"column",...(0,h.k9)({theme:t},(0,h.P$)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e})))};if(e.spacing){const r=(0,p.hB)(t),o=Object.keys(t.breakpoints.values).reduce(((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t)),{}),a=(0,h.P$)({values:e.direction,base:o}),s=(0,h.P$)({values:e.spacing,base:o});"object"==typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const l=(t,n)=>{return e.useFlexGap?{gap:(0,p.NA)(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=n?a[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,p.NA)(r,t)}};var o};n=(0,i.Z)(n,(0,h.k9)({theme:t},s,l))}return n=(0,h.dt)(t.breakpoints,n),n};function x(e={}){const{createStyledComponent:t=g,useThemeProps:n=v,componentName:i="MuiStack"}=e,l=t(b);return r.forwardRef((function(e,t){const r=n(e),u=(0,c.Z)(r),{component:d="div",direction:h="column",spacing:p=0,divider:m,children:g,className:v,useFlexGap:b=!1,...x}=u,w={direction:h,spacing:p,useFlexGap:b},S=(0,s.Z)({root:["root"]},(e=>(0,a.ZP)(i,e)),{});return(0,f.jsx)(l,{as:d,ownerState:w,ref:t,className:(0,o.Z)(S.root,v),...x,children:m?y(g,m):g})}))}},13890:function(e,t,n){"use strict";n.d(t,{L7:()=>c,P$:()=>h,VO:()=>i,W8:()=>u,dt:()=>d,k9:()=>l});var r=n(61170),o=n(58787);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`},s={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:i[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function l(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||a;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||a;return Object.keys(t).reduce(((a,l)=>{if((0,o.WX)(e.keys,l)){const e=(0,o.ue)(r.containerQueries?r:s,l);e&&(a[e]=n(t[l],l))}else if(Object.keys(e.values||i).includes(l)){a[e.up(l)]=n(t[l],l)}else{const e=l;a[e]=t[e]}return a}),{})}return n(t)}function u(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function d(e,...t){const n=u(e),o=[n,...t].reduce(((e,t)=>(0,r.Z)(e,t)),{});return c(Object.keys(n),o)}function h({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}},16838:function(e,t,n){"use strict";n.d(t,{q8:()=>m,_j:()=>f,mi:()=>d,wy:()=>l,$n:()=>g,zp:()=>p,LR:()=>s,fk:()=>b,ux:()=>v,Fq:()=>h,tB:()=>a,ve:()=>u,_4:()=>y});var r=n(62220);const o=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function i(e,t=0,n=1){return o(e,t,n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error((0,r.Z)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error((0,r.Z)(10,o))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:o}}const s=(e,t)=>{try{return(e=>{const t=a(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(t){return e}};function l(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function u(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let u="rgb";const c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}function c(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(u(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function h(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function p(e,t,n){try{return h(e,t)}catch(t){return e}}function f(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function m(e,t,n){try{return f(e,t)}catch(t){return e}}function g(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}function v(e,t,n){try{return g(e,t)}catch(t){return e}}function y(e,t=.15){return c(e)>.5?f(e,t):g(e,t)}function b(e,t,n){try{return y(e,t)}catch(t){return e}}},35315:function(e,t,n){"use strict";n.d(t,{ZP:()=>p,x9:()=>u});var r=n(89966),o=n(61170),i=n(6798),a=n(11652),s=n(83606);const l=(0,i.Z)();function u(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function c(e){return e?(t,n)=>n[e]:null}function d(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>d(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return h(e,n.variants,[t])}return n?.isProcessed?n.style:n}function h(e,t,n=[]){let r;e:for(let o=0;o{(0,r.nf)(e,(e=>e.filter((e=>e!==a.Z))));const{name:n,slot:l,skipVariantsResolver:v,skipSx:y,overridesResolver:b=c(m(l)),...x}=t,w=void 0!==v?v:l&&"Root"!==l&&"root"!==l||!1,S=y||!1;let C=u;"Root"===l||"root"===l?C=i:l?C=p:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const k=(0,r.ZP)(e,{shouldForwardProp:C,label:f(n,l),...x}),_=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return d(t,e)};if((0,o.P)(e)){const t=(0,s.Z)(e);return t.variants?function(e){return d(e,t)}:t.style}return e},M=(...t)=>{const r=[],o=t.map(_),i=[];if(r.push(g),n&&b&&i.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=d(e,r[t]);return b(e,o)})),n&&!w&&i.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?h(e,r):null})),S||i.push(a.Z),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(i.length).fill("");let a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}const s=[...r,...o,...i],l=k(...s);return e.muiName&&(l.muiName=e.muiName),l};return k.withConfig&&(M.withConfig=k.withConfig),M}}function f(e,t){}function m(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}},4715:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(82664);function o(e=8,t=(0,r.hB)({spacing:e})){if(e.mui)return e;const n=(...e)=>{return(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}},6798:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(61170);function o(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:u,only:function(e){return a.indexOf(e)+1(0,r.Z)(e,t)),v),v.unstable_sxConfig={...u.Z,...f?.unstable_sxConfig},v.unstable_sx=function(e){return(0,l.Z)({sx:e,theme:this})},v}},58787:function(e,t,n){"use strict";function r(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}function o(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}function i(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function a(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}n.d(t,{WX:()=>o,ZP:()=>a,ar:()=>r,ue:()=>i})},76360:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(61170);const o=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},83606:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(89966);function o(e){const{variants:t,...n}=e,o={variants:t,style:(0,r.bu)(n),isProcessed:!0};return o.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=(0,r.bu)(e.style))})),o}},82664:function(e,t,n){"use strict";n.d(t,{hB:()=>f,eI:()=>p,NA:()=>m,e6:()=>y,o3:()=>b});var r=n(13890),o=n(33160),i=n(76360);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...c,...d];function p(e,t,n,r){const i=(0,o.DW)(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e);const n=i[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof i?i:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){return"string"==typeof t||null==t?t:e(t)}function g(e,t,n,o){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(u(n),o),a=e[n];return(0,r.k9)(e,a,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.Z,{})}function y(e){return v(e,c)}function b(e){return v(e,d)}function x(e){return v(e,h)}y.propTypes={},y.filterProps=c,b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=h},33160:function(e,t,n){"use strict";n.d(t,{DW:()=>i,Jq:()=>a,ZP:()=>s});var r=n(3150),o=n(13890);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(o=t(o,r,e)),o}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],c=i(e.theme,s)||{};return(0,o.k9)(e,u,(e=>{let o=a(c,l,e);return e===o&&"string"==typeof e&&(o=a(c,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?o:{[n]:o}}))};return u.propTypes={},u.filterProps=[t],u}},40273:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(82664),o=n(33160),i=n(76360);const a=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?(0,i.Z)(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var s=n(13890);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,o.ZP)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),d=u("borderTop",l),h=u("borderRight",l),p=u("borderBottom",l),f=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),x=u("outline",l),w=u("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(c,d,h,p,f,m,g,v,y,b,S,x,w);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.gap,n)}return null};C.propTypes={},C.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const _=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.rowGap,n)}return null};_.propTypes={},_.filterProps=["rowGap"];a(C,k,_,(0,o.ZP)({prop:"gridColumn"}),(0,o.ZP)({prop:"gridRow"}),(0,o.ZP)({prop:"gridAutoFlow"}),(0,o.ZP)({prop:"gridAutoColumns"}),(0,o.ZP)({prop:"gridAutoRows"}),(0,o.ZP)({prop:"gridTemplateColumns"}),(0,o.ZP)({prop:"gridTemplateRows"}),(0,o.ZP)({prop:"gridTemplateAreas"}),(0,o.ZP)({prop:"gridArea"}));function M(e,t){return"grey"===t?t:e}a((0,o.ZP)({prop:"color",themeKey:"palette",transform:M}),(0,o.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,o.ZP)({prop:"backgroundColor",themeKey:"palette",transform:M}));function T(e){return e<=1&&0!==e?100*e+"%":e}const P=(0,o.ZP)({prop:"width",transform:T}),R=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||s.VO[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:T(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};R.filterProps=["maxWidth"];const I=(0,o.ZP)({prop:"minWidth",transform:T}),D=(0,o.ZP)({prop:"height",transform:T}),O=(0,o.ZP)({prop:"maxHeight",transform:T}),A=(0,o.ZP)({prop:"minHeight",transform:T}),E=((0,o.ZP)({prop:"size",cssProperty:"width",transform:T}),(0,o.ZP)({prop:"size",cssProperty:"height",transform:T}),a(P,R,I,D,O,A,(0,o.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},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:C},rowGap:{style:_},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:T},maxWidth:{style:R},minWidth:{transform:T},height:{transform:T},maxHeight:{transform:T},minHeight:{transform:T},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},93772:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(61170),o=n(40273);const i=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??o.Z;return Object.keys(e).forEach((r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t};function a(e){const{sx:t,...n}=e,{systemProps:o,otherProps:a}=i(n);let s;return s=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return(0,r.P)(n)?{...o,...n}:o}:{...o,...t},{...a,sx:s}}},11652:function(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n(3150),o=n(76360),i=n(33160),a=n(13890),s=n(58787),l=n(40273);const u=function(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:d,style:h}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const p=(0,i.DW)(n,c)||{};if(h)return h(s);return(0,a.k9)(s,t,(t=>{let n=(0,i.Jq)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,i.Jq)(p,d,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===u?n:{[u]:n}}))}return function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const u=i.unstable_sxConfig??l.Z;function c(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const l=(0,a.W8)(i.breakpoints),c=Object.keys(l);let d=l;return Object.keys(r).forEach((n=>{const s=(l=r[n],c=i,"function"==typeof l?l(c):l);var l,c;if(null!=s)if("object"==typeof s)if(u[n])d=(0,o.Z)(d,e(n,s,i,u));else{const e=(0,a.k9)({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,s)?d=(0,o.Z)(d,e):d[n]=t({sx:s,theme:i})}else d=(0,o.Z)(d,e(n,s,i,u))})),(0,s.ar)(i,(0,a.L7)(c,d))}return Array.isArray(r)?r.map(c):c(r)}}();u.filterProps=["sx"];const c=u},4560:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(35315).ZP)()},38971:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(6798),o=n(24105);const i=(0,r.Z)();const a=function(e=i){return(0,o.Z)(e)}},49267:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(16819);function o(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}},22179:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(49267),o=n(38971);function i({props:e,name:t,defaultTheme:n,themeId:i}){let a=(0,o.Z)(n);return i&&(a=a[i]||a),(0,r.Z)({theme:a,name:t,props:e})}},24105:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(13726);const i=function(e=null){const t=r.useContext(o.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},70544:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},60206:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=function(e){return"string"==typeof e};const o=function(e,t,n){return void 0===e||r(e)?t:{...t,ownerState:{...t.ownerState,...n}}}},3150:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(62220);function o(e){if("string"!=typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},82267:function(e,t,n){"use strict";function r(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;er})},38543:function(e,t,n){"use strict";function r(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}n.d(t,{Z:()=>r})},24384:function(e,t,n){"use strict";function r(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{Z:()=>r})},61170:function(e,t,n){"use strict";n.d(t,{P:()=>i,Z:()=>s});var r=n(27378),o=n(41453);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(r.isValidElement(e)||(0,o.isValidElementType)(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t,n={clone:!0}){const l=n.clone?{...e}:e;return i(e)&&i(t)&&Object.keys(t).forEach((u=>{r.isValidElement(t[u])||(0,o.isValidElementType)(t[u])?l[u]=t[u]:i(t[u])&&Object.prototype.hasOwnProperty.call(e,u)&&i(e[u])?l[u]=s(e[u],t[u],n):n.clone?l[u]=i(t[u])?a(t[u]):t[u]:l[u]=t[u]})),l}},92438:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},62220:function(e,t,n){"use strict";function r(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}n.d(t,{Z:()=>r})},6749:function(e,t,n){"use strict";n.d(t,{ZP:()=>i});var r=n(70544);const o={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 i(e,t,n="Mui"){const i=o[t];return i?`${n}-${i}`:`${r.Z.generate(e)}-${t}`}},44124:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(6749);function o(e,t,n="Mui"){const o={};return t.forEach((t=>{o[t]=(0,r.ZP)(e,t,n)})),o}},94680:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e){return parseInt(r.version,10)>=19?e?.props?.ref||null:e?.ref||null}},16046:function(e,t,n){"use strict";function r(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}n.d(t,{Z:()=>r})},65124:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e){return r.Children.toArray(e).filter((e=>r.isValidElement(e)))}},74111:function(e,t,n){"use strict";function r(e){try{return e.matches(":focus-visible")}catch(e){0}return!1}n.d(t,{Z:()=>r})},11104:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}},92729:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(90496),o=n(92438);const i=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const a=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:s,className:l}=e;if(!t){const e=(0,r.Z)(n?.className,l,s?.className,a?.className),t={...n?.style,...s?.style,...a?.style},o={...n,...s,...a};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}const u=(0,o.Z)({...s,...a}),c=i(a),d=i(s),h=t(u),p=(0,r.Z)(h?.className,n?.className,l,s?.className,a?.className),f={...h?.style,...n?.style,...s?.style,...a?.style},m={...h,...n,...d,...c};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:h.ref}}},80668:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>r})},33205:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(80668);function o(e){return(0,r.Z)(e).defaultView||window}},85480:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n){return"function"==typeof e?e(t,n):e}},16819:function(e,t,n){"use strict";function r(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){n[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;n[i][t]=r(o[t],a[t])}}else n[i]=a;else n[i]=o||{}}else void 0===n[i]&&(n[i]=e[i])}return n}n.d(t,{Z:()=>r})},85817:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>r})},9831:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o({controlled:e,default:t,name:n,state:o="value"}){const{current:i}=r.useRef(void 0!==e),[a,s]=r.useState(t);return[i?e:a,r.useCallback((e=>{i||s(e)}),[])]}},96858:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},81925:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(96858);const i=function(e){const t=r.useRef(e);return(0,o.Z)((()=>{t.current=e})),r.useRef(((...e)=>(0,t.current)(...e))).current}},97048:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(85817);function i(...e){return r.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.Z)(e,t)}))}),e)}},5056:function(e,t,n){"use strict";var r;n.d(t,{Z:()=>s});var o=n(27378);let i=0;const a={...r||(r=n.t(o,2))}.useId;function s(e){if(void 0!==a){const t=a();return e??t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),r}(e)}},99565:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378);const o={};function i(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}},28154:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378);const o=[];function i(e){r.useEffect(e,o)}},7860:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);const o=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},25399:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(97048),o=n(60206),i=n(92729),a=n(85480);const s=function(e){const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:l=!1,...u}=e,c=l?{}:(0,a.Z)(n,s),{props:d,internalRef:h}=(0,i.Z)({...u,externalSlotProps:c}),p=(0,r.Z)(h,c?.ref,e.additionalProps?.ref);return(0,o.Z)(t,{...d,ref:p},s)}},60203:function(e,t,n){"use strict";n.d(t,{V:()=>i,Z:()=>a});var r=n(99565),o=n(28154);class i{static create(){return new i}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function a(){const e=(0,r.Z)(i.create).current;return(0,o.Z)(e.disposeEffect),e}},41453:function(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case p:case h:case s:return e;default:return t}}case r:return t}}}t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===c||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)}},40253:function(e,t,n){"use strict";n.d(t,{_:()=>ns});var r=n(70252),o=n(27378),i=n(23615),a=n.n(i),s=n(27874),l=n(97784),u=n(90496),c=n(3150),d=n(82267),h=n(97048),p=n(18669),f=n(16838),m=n(12709),g=n(44949),v=n(30505),y=n(62186);const b={[`& .${g._.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${g._.menuIcon}`]:{width:"auto",visibility:"visible"}},x={width:3,rx:1.5,x:10.5},w=e=>e.dimensions.hasScrollX&&(!e.dimensions.hasScrollY||0===e.dimensions.scrollbarSize),S=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${g._.autoHeight}`]:t.autoHeight},{[`&.${g._.autosizing}`]:t.autosizing},{[`&.${g._["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${g._["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${g._["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${g._["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${g._["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${g._.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${g._.actionsCell}`]:t.actionsCell},{[`& .${g._.booleanCell}`]:t.booleanCell},{[`& .${g._.cell}`]:t.cell},{[`& .${g._["cell--editable"]}`]:t["cell--editable"]},{[`& .${g._["cell--editing"]}`]:t["cell--editing"]},{[`& .${g._["cell--flex"]}`]:t["cell--flex"]},{[`& .${g._["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${g._["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${g._["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${g._["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${g._["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${g._["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${g._["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${g._["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${g._["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${g._["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${g._["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${g._["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${g._.cellCheckbox}`]:t.cellCheckbox},{[`& .${g._.cellEmpty}`]:t.cellEmpty},{[`& .${g._.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${g._.cellSkeleton}`]:t.cellSkeleton},{[`& .${g._.checkboxInput}`]:t.checkboxInput},{[`& .${g._.columnHeader}`]:t.columnHeader},{[`& .${g._["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${g._["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${g._["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${g._["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${g._["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${g._["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${g._["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${g._["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${g._["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${g._["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${g._["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${g._["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${g._["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${g._["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${g._["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${g._["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${g._["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${g._["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${g._.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${g._.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${g._.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${g._.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${g._.columnSeparator}`]:t.columnSeparator},{[`& .${g._["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${g._["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${g._["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${g._["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${g._["container--bottom"]}`]:t["container--bottom"]},{[`& .${g._["container--top"]}`]:t["container--top"]},{[`& .${g._.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${g._["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${g._.editBooleanCell}`]:t.editBooleanCell},{[`& .${g._.filterIcon}`]:t.filterIcon},{[`& .${g._["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${g._["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${g._["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${g._.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${g._.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${g._.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${g._.headerFilterRow}`]:t.headerFilterRow},{[`& .${g._.iconSeparator}`]:t.iconSeparator},{[`& .${g._.menuIcon}`]:t.menuIcon},{[`& .${g._.menuIconButton}`]:t.menuIconButton},{[`& .${g._.menuList}`]:t.menuList},{[`& .${g._.menuOpen}`]:t.menuOpen},{[`& .${g._.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${g._.pinnedRows}`]:t.pinnedRows},{[`& .${g._["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${g._["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${g._.row}`]:t.row},{[`& .${g._["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${g._["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${g._["row--dragging"]}`]:t["row--dragging"]},{[`& .${g._["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${g._["row--editable"]}`]:t["row--editable"]},{[`& .${g._["row--editing"]}`]:t["row--editing"]},{[`& .${g._["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${g._["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${g._.rowReorderCell}`]:t.rowReorderCell},{[`& .${g._["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${g._.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${g._.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${g._.rowSkeleton}`]:t.rowSkeleton},{[`& .${g._.scrollbar}`]:t.scrollbar},{[`& .${g._["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${g._["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${g._.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${g._["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${g._["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${g._["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${g._["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${g._.sortIcon}`]:t.sortIcon},{[`& .${g._.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${g._.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${g._.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${g._.withBorderColor}`]:t.withBorderColor}]})((({theme:e})=>{const t=(0,y.$)(),n=(0,v.Pp)(t,w),o=(i=e).vars?i.vars.palette.TableCell.border:"light"===i.palette.mode?(0,f.$n)((0,f.Fq)(i.palette.divider,1),.88):(0,f._j)((0,f.Fq)(i.palette.divider,1),.68);var i;const a=e.shape.borderRadius,s=e.vars?e.vars.palette.background.default:e.mixins.MuiDataGrid?.containerBackground??e.palette.background.default,l=e.mixins.MuiDataGrid?.pinnedBackground??s,u=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,f.Fq)(e.palette.background.default,e.palette.action.disabledOpacity),c=(e.vars||e).palette.action.hoverOpacity,d=(e.vars||e).palette.action.hover,h=(e.vars||e).palette.action.selectedOpacity,p=e.vars?`calc(${c} + ${h})`:c+h,m=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${h})`:(0,f.Fq)(e.palette.primary.main,h),S=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${p})`:(0,f.Fq)(e.palette.primary.main,p),k=e.vars?_:C,M=e=>({[`& .${g._["cell--pinnedLeft"]}, & .${g._["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:k(e,m,h),"&:hover":{backgroundColor:k(e,m,p)}}}}),T=M(k(l,d,c)),P=k(l,m,h),R=M(P),I=M(k(l,S,p)),D={backgroundColor:m,"&:hover":{backgroundColor:S,"@media (hover: none)":{backgroundColor:m}}};return(0,r.Z)({"--unstable_DataGrid-radius":"number"==typeof a?`${a}px`:a,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":u,"--DataGrid-containerBackground":s,"--DataGrid-pinnedBackground":l,"--DataGrid-rowBorderColor":o,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:o,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",overflow:"hidden",overflowAnchor:"none",[`.${g._.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${g._.autoHeight}`]:{height:"auto"},[`&.${g._.autosizing}`]:{[`& .${g._.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${g._.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${g._.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${g._.groupingCriteriaCell}`]:{width:"unset"},[`& .${g._.treeDataGroupingCell}`]:{width:"unset"}},[`& .${g._.columnHeader}, & .${g._.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${g._.columnHeader}:focus-within, & .${g._.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:(0,f.Fq)(e.palette.primary.main,.5)} 1px`,outlineOffset:-1},[`& .${g._.columnHeader}:focus, & .${g._.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`,outlineOffset:-1},[`& .${g._.columnHeader}:focus,\n & .${g._["columnHeader--withLeftBorder"]},\n & .${g._["columnHeader--withRightBorder"]},\n & .${g._["columnHeader--siblingFocused"]},\n & .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--lastUnpinned"]},\n & .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--last"]}\n `]:{[`& .${g._.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${g._["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${g._["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${g._["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${g._["root--noToolbar"]} [aria-rowindex="1"] .${g._["columnHeader--last"]}`]:{borderTopRightRadius:n?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${g._.columnHeaderCheckbox}, & .${g._.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${g._.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${g._["columnHeader--sorted"]} .${g._.iconButtonContainer}, & .${g._["columnHeader--filtered"]} .${g._.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${g._.columnHeader}:not(.${g._["columnHeader--sorted"]}) .${g._.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${g._.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${g._.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${g._["columnHeader--filledGroup"]} .${g._.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${g._.sortIcon}, & .${g._.filterIcon}`]:{fontSize:"inherit"},[`& .${g._["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${g._["columnHeader--alignCenter"]} .${g._.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${g._["columnHeader--alignRight"]} .${g._.columnHeaderDraggableContainer}, & .${g._["columnHeader--alignRight"]} .${g._.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${g._["columnHeader--alignCenter"]} .${g._.menuIcon}`]:{marginLeft:"auto"},[`& .${g._["columnHeader--alignRight"]} .${g._.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${g._["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${g._["columnHeader--pinnedLeft"]}, & .${g._["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${g._.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:o},[`& .${g._.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${g._.columnHeader}:hover`]:b,[`& .${g._.columnHeader}:not(.${g._["columnHeader--sorted"]}):hover .${g._.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${g._.columnHeader}`]:b,[`& .${g._.columnHeader}:focus,\n & .${g._["columnHeader--siblingFocused"]}`]:{[`.${g._["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${g._["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${g._["columnSeparator--sideRight"]}`]:{right:-5},[`& .${g._["columnHeader--withRightBorder"]} .${g._["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${g._["columnHeader--withRightBorder"]} .${g._["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${g._["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${g._["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${g._.iconSeparator} rect`]:x},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${g._.iconSeparator} rect`]:x}},"& svg":{pointerEvents:"none"}},[`& .${g._.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${g._.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${g._.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${g._.headerFilterRow}`]:{[`& .${g._.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${g._["row--borderBottom"]} .${g._.columnHeader},\n & .${g._["row--borderBottom"]} .${g._.filler},\n & .${g._["row--borderBottom"]} .${g._.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${g._["row--borderBottom"]} .${g._.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${g._.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${g._["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g._.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":D},[`& .${g._["container--top"]}, & .${g._["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${g._.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":D},[`& .${g._["virtualScrollerContent--overflowed"]} .${g._["row--lastVisible"]} .${g._.cell}`]:{borderTopColor:"transparent"},[`& .${g._["pinnedRows--top"]} :first-of-type`]:{[`& .${g._.cell}, .${g._.scrollbarFiller}`]:{borderTop:"none"}},[`&.${g._["root--disableUserSelection"]} .${g._.cell}`]:{userSelect:"none"},[`& .${g._["row--dynamicHeight"]} > .${g._.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${g._.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${g._.cell}.${g._["cell--selectionMode"]}`]:{cursor:"default"},[`& .${g._.cell}.${g._["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`1px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:-1}},[`& .${g._["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${g._["row--editing"]} .${g._.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${g._.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${g._.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${g._.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${g._.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${g._.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${g._["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${g._.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${g._.withBorderColor}`]:{borderColor:o},[`& .${g._["cell--withLeftBorder"]}, & .${g._["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${g._["cell--withRightBorder"]}, & .${g._["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${g._["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${g._["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${g._["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${g._["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${g._["cell--pinnedLeft"]}, & .${g._["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:P}},[`& .${g._.virtualScrollerContent} .${g._.row}`]:{"&:hover":T,"&.Mui-selected":R,"&.Mui-selected:hover":I},[`& .${g._.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${g._.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${g._.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${g._.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${g._["columnHeader--dragging"]}, & .${g._["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${g._["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${g._.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${g._.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${g._.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${g._.treeDataGroupingCellLoadingContainer}, .${g._.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${g._.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${g._.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${g._.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${g._["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${g._["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${g._["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${g._.filler}`]:{flex:"1 0 auto"},[`& .${g._["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${g._["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${g._.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${g._["scrollbar--vertical"]}, & .${g._.pinnedRows}, & .${g._.virtualScroller} > .${g._.filler}`]:{display:"none"}}})}));function C(e,t,n,r=1){const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=(0,f.tB)(e),a=(0,f.tB)(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return(0,f.wy)({type:"rgb",values:s})}const k=e=>`rgb(from ${e} r g b / 1)`;function _(e,t,n){return`color-mix(in srgb,${e}, ${k(t)} calc(${n} * 100%))`}var M=n(99967),T=n(50986),P=n(70644);const R=()=>()=>{},I=()=>!1,D=()=>!0;var O=n(4257),A=n(6764),E=n(55332),L=n(47700),Z=n(24246);function F(){const e=(0,L.l)(),t=(0,v.Pp)(e,O.d$),n=(0,M.B)(),o=(0,v.Pp)(e,A.e),i=e.current.unstable_applyPipeProcessors("preferencePanel",null,o.openedPanelValue??E.y.filters);return(0,Z.jsx)(n.slots.panel,(0,r.Z)({as:n.slots.basePopper,open:t.length>0&&o.open,id:o.panelId,"aria-labelledby":o.labelId},n.slotProps?.panel,n.slotProps?.basePopper,{children:i}))}function j(){const e=(0,M.B)();return(0,Z.jsxs)(o.Fragment,{children:[(0,Z.jsx)(F,{}),e.slots.toolbar&&(0,Z.jsx)(e.slots.toolbar,(0,r.Z)({},e.slotProps?.toolbar))]})}var N=n(4560),z=n(55311),B=n(81925),V=n(1446),$=n(60203),H=n(27221),W=n(89363);const G=(0,N.Z)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${g._["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${g._["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${g._["scrollArea--left"]}`]:{left:0},[`&.${g._["scrollArea--right"]}`]:{right:0}}))),U=(0,W.bG)(z.jY,((e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0));function q(e){const{scrollDirection:t,scrollPosition:n}=e,i=o.useRef(null),a=(0,L.l)(),s=(0,$.Z)(),l=(0,v.Pp)(a,T.CD),c=(0,v.Pp)(a,z.iD),h=(0,v.AC)(a,U,t),p=()=>{const e=(0,z.jY)(a.current.state);if("left"===t)return n.current.left>0;if("right"===t){const t=c-e.viewportInnerSize.width;return n.current.left{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return(0,d.Z)(r,g.d,n)})(b),w=(0,H.Jb)(a,y),S=Math.floor(y.columnHeaderHeight*l),C={height:S,top:w-S};"left"===t?C.left=h:"right"===t&&(C.right=h);const k=(0,B.Z)((e=>{let r;if(e.preventDefault(),"left"===t)r=e.clientX-i.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI X: Wrong drag direction");r=Math.max(1,e.clientX-i.current.getBoundingClientRect().left)}r=1.5*(r-1)+1,s.start(0,(()=>{a.current.scroll({left:n.current.left+r,top:n.current.top})}))}));return(0,V.zn)(a,"scrollPositionChange",(()=>{m(p)})),f?(0,Z.jsx)(G,{ref:i,className:(0,u.Z)(x.root),ownerState:b,onDragOver:k,style:C}):null}const K=(0,p.X)((function(e){const t=(0,L.l)(),[n,i]=o.useState(!1);return(0,V.zn)(t,"columnHeaderDragStart",(()=>i(!0))),(0,V.zn)(t,"columnHeaderDragEnd",(()=>i(!1))),n?(0,Z.jsx)(q,(0,r.Z)({},e)):null}));var Y=n(50864),X=n(57035),Q=n(62995);var J=n(20268);const ee=(0,N.Z)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e,overridesResolver:(e,t)=>t.overlayWrapper})((({overlayType:e,loadingOverlayVariant:t})=>"skeleton"!==t?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}:{})),te=(0,N.Z)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function ne(e){const t=(0,L.l)(),n=(0,M.B)(),o=(0,v.Pp)(t,z.jY);let i=Math.max(o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0),0);0===i&&(i=J.m1);const a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},g.d,t)})((0,r.Z)({},e,{classes:n.classes}));return(0,Z.jsx)(ee,(0,r.Z)({className:(0,u.Z)(a.root)},e,{children:(0,Z.jsx)(te,(0,r.Z)({className:(0,u.Z)(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function re(e){const{overlayType:t}=e,n=(0,M.B)();if(!t)return null;const o=n.slots?.[t],i=n.slotProps?.[t];return(0,Z.jsx)(ne,(0,r.Z)({},e,{children:(0,Z.jsx)(o,(0,r.Z)({},i))}))}var oe=n(4874),ie=n(24102),ae=n(32812);const se=e=>e.columnMenu;const le=(0,p.X)((function(){const e=(0,y.$)(),t=(0,M.B)(),n=(0,v.Pp)(e,O.FE),o=(0,v.Pp)(e,X.AF),i=(0,v.Pp)(e,oe.Nl),a=(0,v.Pp)(e,ie.X5),s=(0,v.Pp)(e,(()=>null===(0,ie.d6)(e))),l=(0,v.Pp)(e,ie.jc),u=(0,v.Pp)(e,ie.ud),c=(0,v.Pp)(e,ie.jC),d=(0,v.Pp)(e,ae.uW),h=(0,v.Pp)(e,se),p=(0,v.Pp)(e,O.g0),f=(0,v.Pp)(e,ae.WT),m=!(null===l&&null===a&&s),g=e.current.columnHeadersContainerRef;return(0,Z.jsx)(t.slots.columnHeaders,(0,r.Z)({ref:g,visibleColumns:n,filterColumnLookup:o,sortColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:u,columnGroupHeaderFocus:c,headerGroupingMaxDepth:d,columnMenuState:h,columnVisibility:p,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m},t.slotProps?.columnHeaders))}));var ue=n(97601);const ce=(0,N.Z)("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),de=(0,N.Z)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],"skeleton"===n.loadingOverlayVariant&&t["main--hasSkeletonLoadingOverlay"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),he=(0,s.G)(((e,t)=>{const{ownerState:n}=e,o=(0,M.B)(),i=(0,ue.x)().hooks.useGridAriaAttributes();return(0,Z.jsxs)(de,(0,r.Z)({ownerState:n,className:e.className,tabIndex:-1},i,o.slotProps?.main,{ref:t,children:[(0,Z.jsx)(ce,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))})),pe=(0,N.Z)("div")({position:"sticky",zIndex:4,top:0});function fe(e){const t=(0,d.Z)({root:["topContainer"]},g.d,{});return(0,Z.jsx)(pe,(0,r.Z)({},e,{className:(0,u.Z)(t.root,g._["container--top"]),role:"presentation"}))}const me=(0,N.Z)("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function ge(e){const t=(0,d.Z)({root:["bottomContainer"]},g.d,{});return(0,Z.jsx)(me,(0,r.Z)({},e,{className:(0,u.Z)(t.root,g._["container--bottom"]),role:"presentation"}))}const ve=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),ye=(0,s.G)((function(e,t){const n=(0,M.B)(),o=!n.autoHeight&&"auto"===e.style?.minHeight,i=((e,t)=>{const{classes:n}=e,r={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,d.Z)(r,g.d,n)})(n,o),a={classes:n.classes,overflowedContent:o};return(0,Z.jsx)(ve,(0,r.Z)({},e,{ownerState:a,className:(0,u.Z)(i.root,e.className),ref:t}))})),be=(0,N.Z)("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),xe=(0,N.Z)("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),we=(0,N.Z)(xe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),Se=(0,N.Z)(xe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),Ce=(0,N.Z)("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});const ke=(0,p.X)((function({rowsLength:e}){const t=(0,L.l)(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=(0,v.Pp)(t,z.jY),u=o?a:0,c=n.height-r.height>0;return 0!==u||c?(0,Z.jsxs)(be,{className:g._.filler,role:"presentation",style:{height:u,"--rowBorderColor":0===e?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&(0,Z.jsx)(we,{className:g._["filler--pinnedLeft"],style:{width:s}}),(0,Z.jsx)(Ce,{}),l>0&&(0,Z.jsx)(Se,{className:g._["filler--pinnedRight"],style:{width:l+(i?a:0)}})]}):null}));var _e=n(21484),Me=n(24414);const Te=["className"],Pe=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Re=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,Te),i=(0,L.l)(),a=(0,M.B)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["virtualScrollerRenderZone"]},g.d,t)})(a),c=(0,v.Pp)(i,(()=>{const e=(0,Me.r8)(i);return(0,_e.k)(i.current.state).positions[e.firstRowIndex]??0}));return(0,Z.jsx)(Pe,(0,r.Z)({className:(0,u.Z)(s.root,n),ownerState:a,style:{transform:`translate3d(0, ${c}px, 0)`}},o,{ref:t}))}));var Ie=n(28154);const De=(0,N.Z)("div")({position:"absolute",display:"inline-block",zIndex:6,"&:hover":{zIndex:7},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),Oe=(0,N.Z)(De)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),Ae=(0,N.Z)(De)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),Ee=(0,s.G)((function(e,t){const n=(0,y.$)(),r=(0,M.B)(),i=o.useRef(!1),a=o.useRef(0),s=o.useRef(null),l=o.useRef(null),u=((e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return(0,d.Z)(r,g.d,n)})(r,e.position),c=(0,v.Pp)(n,z.jY),p="vertical"===e.position?"height":"width",f="vertical"===e.position?"scrollTop":"scrollLeft",m="vertical"===e.position?"top":"left",b="vertical"===e.position?c.hasScrollX:c.hasScrollY,x=c.minimumSize[p]+(b?c.scrollbarSize:0),w=("vertical"===e.position?c.viewportInnerSize.height:c.viewportOuterSize.width)*(x/c.viewportOuterSize[p]),S=(0,B.Z)((()=>{const t=s.current,n=e.scrollPosition.current;if(!t)return;if(n[m]===a.current)return;if(a.current=n[m],i.current)return void(i.current=!1);i.current=!0;const r=n[m]/x;t[f]=r*w})),C=(0,B.Z)((()=>{const e=n.current.virtualScrollerRef.current,t=s.current;if(!t)return;if(i.current)return void(i.current=!1);i.current=!0;const r=t[f]/w;e[f]=r*x}));(0,Ie.Z)((()=>{const e=n.current.virtualScrollerRef.current,t=s.current,r={passive:!0};return e.addEventListener("scroll",S,r),t.addEventListener("scroll",C,r),()=>{e.removeEventListener("scroll",S,r),t.removeEventListener("scroll",C,r)}})),o.useEffect((()=>{l.current.style.setProperty(p,`${w}px`)}),[w,p]);const k="vertical"===e.position?Oe:Ae;return(0,Z.jsx)(k,{ref:(0,h.Z)(t,s),className:u.root,style:"vertical"===e.position&&r.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:(0,Z.jsx)("div",{ref:l,className:u.content})})})),Le=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),Ze=e=>e.dimensions.rightPinnedWidth>0;function Fe(e){const t=(0,L.l)(),n=(0,M.B)(),o=(0,v.Pp)(t,z.Wp),i=(0,v.Pp)(t,z.H4),a=(0,v.Pp)(t,Ze),s=(0,v.Pp)(t,z.D6),l=(()=>{const e=(0,L.l)(),t=(0,M.B)(),n=(0,v.Pp)(e,Q.hh),r=(0,v.Pp)(e,X.IQ),o=(0,v.Pp)(e,Q.J5),i=0===n&&0===o,a=(0,v.Pp)(e,Q.Vk);let s=null,l=null;return!a&&i&&(s="noRowsOverlay"),!a&&n>0&&0===r&&(s="noResultsOverlay"),a&&(s="loadingOverlay",l=t.slotProps?.loadingOverlay?.[i?"noRowsVariant":"variant"]||null),{overlayType:s,loadingOverlayVariant:l}})(),u={classes:n.classes,hasScrollX:i,hasPinnedRight:a,loadingOverlayVariant:l.loadingOverlayVariant},c=(e=>{const{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o}=e,i={root:["main",r&&"main--hasPinnedRight","skeleton"===o&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]};return(0,d.Z)(i,g.d,t)})(u),h=(0,Y.cD)(),{getContainerProps:p,getScrollerProps:f,getContentProps:m,getRenderZoneProps:y,getScrollbarVerticalProps:b,getScrollbarHorizontalProps:x,getRows:w,getScrollAreaProps:S}=h,C=w();return(0,Z.jsxs)(he,(0,r.Z)({className:c.root},p(),{ownerState:u,children:[(0,Z.jsx)(K,(0,r.Z)({scrollDirection:"left"},S())),(0,Z.jsx)(K,(0,r.Z)({scrollDirection:"right"},S())),(0,Z.jsxs)(Le,(0,r.Z)({className:c.scroller},f(),{ownerState:u,children:[(0,Z.jsxs)(fe,{children:[!n.unstable_listView&&(0,Z.jsx)(le,{}),(0,Z.jsx)(n.slots.pinnedRows,{position:"top",virtualScroller:h})]}),(0,Z.jsx)(re,(0,r.Z)({},l)),(0,Z.jsx)(ye,(0,r.Z)({},m(),{children:(0,Z.jsxs)(Re,(0,r.Z)({},y(),{children:[C,(0,Z.jsx)(n.slots.detailPanels,{virtualScroller:h})]}))})),s&&(0,Z.jsx)(ke,{rowsLength:C.length}),(0,Z.jsx)(ge,{children:(0,Z.jsx)(n.slots.pinnedRows,{position:"bottom",virtualScroller:h})})]})),i&&!n.unstable_listView&&(0,Z.jsx)(Ee,(0,r.Z)({position:"horizontal"},x())),o&&(0,Z.jsx)(Ee,(0,r.Z)({position:"vertical"},b())),e.children]}))}function je(){const e=(0,M.B)();return e.hideFooter?null:(0,Z.jsx)(e.slots.footer,(0,r.Z)({},e.slotProps?.footer))}const Ne=["className","children"],ze=(0,s.G)((function(e,t){const n=(0,M.B)(),{className:i,children:a}=e,s=(0,l.Z)(e,Ne),p=(0,y.$)(),f=(0,v.Pp)(p,T.EH),m=p.current.rootElementRef,b=o.useCallback((e=>{null!==e&&p.current.publishEvent("rootMount",e)}),[p]),x=(0,h.Z)(m,t,b),w=n,C=((e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${(0,c.Z)(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return(0,d.Z)(i,g.d,r)})(w,f);return(0,P.useSyncExternalStore)(R,I,D)?null:(0,Z.jsxs)(S,(0,r.Z)({className:(0,u.Z)(C.root,i),ownerState:w},s,{ref:x,children:[(0,Z.jsx)(j,{}),(0,Z.jsx)(Fe,{children:a}),(0,Z.jsx)(je,{})]}))})),Be=(0,p.X)(ze);var Ve=n(28594);var $e=n(85422);var He=n(92623),We=n(92302),Ge=n(93014);function Ue({privateApiRef:e,configuration:t,props:n,children:r}){const i=o.useRef(e.current.getPublicApi());return(0,Z.jsx)(Ge.s.Provider,{value:t,children:(0,Z.jsx)(We.G.Provider,{value:n,children:(0,Z.jsx)(y.j.Provider,{value:e,children:(0,Z.jsx)(He.r.Provider,{value:i,children:r})})})})}var qe=n(6595);var Ke=n(48383),Ye=n(94757);const Xe=(0,Ke.Vu)()&&null!=window.localStorage.getItem("DEBUG"),Qe=()=>{},Je={debug:Qe,info:Qe,warn:Qe,error:Qe},et=["debug","info","warn","error"];function tt(e,t,n=console){const r=et.indexOf(t);if(-1===r)throw new Error(`MUI X: Log level ${t} not recognized.`);return et.reduce(((t,o,i)=>(t[o]=i>=r?(...t)=>{const[r,...i]=t;n[o](`MUI X: ${e} - ${r}`,...i)}:Qe,t)),{})}class nt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const r=Array.from(n.highPriority.keys()),o=Array.from(n.regular.keys());for(let e=r.length-1;e>=0;e-=1){const o=r[e];n.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}const ot=Symbol("mui.api_private");let it=0;function at(e,t){const n=o.useRef(null),r=o.useRef(null);r.current||(r.current=function(e){const t=e.current?.[ot];if(t)return t;const n={},r={state:n,store:rt.create(n),instanceId:{id:it}};return it+=1,r.getPublicApi=()=>e.current,r.register=(t,n)=>{Object.keys(n).forEach((o=>{const i=n[o],a=r[o];if(!0===a?.spying?a.target=i:r[o]=i,"public"===t){const t=e.current,n=t[o];!0===n?.spying?n.target=i:t[o]=i}}))},r.register("private",{caches:{},eventManager:new nt}),r}(n)),n.current||(n.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[ot]:e.current}}(r));const i=o.useCallback(((...e)=>{const[n,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const a=t.signature===V.cG.DataGridPro||t.signature===V.cG.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(n,o,i,a)}),[r,t.signature]),a=o.useCallback(((e,t,n)=>{r.current.eventManager.on(e,t,n);const o=r.current;return()=>{o.eventManager.removeListener(e,t)}}),[r]);return(0,Ye.h)(r,{subscribeEvent:a,publishEvent:i},"public"),e&&!e.current?.state&&(e.current=n.current),o.useImperativeHandle(e,(()=>n.current),[n]),o.useEffect((()=>{const e=r.current;return()=>{e.publishEvent("unmount")}}),[r]),r}var st=n(91510);const lt="none",ut={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},ct=(e,t)=>(0,r.Z)({},e,{props:{getRowId:t.getRowId}}),dt=(e,t)=>{const n=at(e,t);return(e=>{const t=o.useRef(null),n=o.useRef(null),r=o.useRef(null),i=o.useRef(null),a=o.useRef(null),s=o.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:i,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:s})})(n),((e,t)=>{o.useEffect((()=>{e.current.setState((e=>(0,r.Z)({},e,{props:{getRowId:t.getRowId}})))}),[e,t.getRowId])})(n,t),(e=>{const t=(0,qe.V)();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const n=o.useRef(!0);o.useEffect((()=>{n.current?n.current=!1:e.current.setState((e=>(0,r.Z)({},e,{isRtl:t})))}),[e,t])})(n),((e,t)=>{const n=o.useCallback((e=>Xe?tt(e,"debug",t.logger):t.logLevel?tt(e,t.logLevel.toString(),t.logger):Je),[t.logLevel,t.logger]);(0,Ye.h)(e,{getLogger:n},"private")})(n,t),(e=>{const t=o.useRef({}),n=o.useCallback((e=>{t.current[e.stateId]=e}),[]),i=o.useCallback(((n,r)=>{let o;if(o=(0,Ke.mf)(n)?n(e.current.state):n,e.current.state===o)return!1;let i=!1;const a=[];if(Object.keys(t.current).forEach((n=>{const r=t.current[n],s=r.stateSelector(e.current.state,e.current.instanceId),l=r.stateSelector(o,e.current.instanceId);l!==s&&(a.push({stateId:r.stateId,hasPropChanged:l!==r.propModel}),void 0!==r.propModel&&l!==r.propModel&&(i=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=o,e.current.publishEvent("stateChange",o),e.current.store.update(o)),1===a.length){const{stateId:n,hasPropChanged:s}=a[0],l=t.current[n],u=l.stateSelector(o,e.current.instanceId);l.propOnChange&&s&&l.propOnChange(u,{reason:r,api:e.current}),i||e.current.publishEvent(l.changeEvent,u,{reason:r})}return!i}),[e]),a=o.useCallback(((t,n,o)=>e.current.setState((e=>(0,r.Z)({},e,{[t]:n(e[t])})),o)),[e]),s={setState:i,forceUpdate:o.useCallback((()=>{}),[])},l={updateControlState:a,registerControlState:n};(0,Ye.h)(e,s,"public"),(0,Ye.h)(e,l,"private")})(n),(e=>{const t=o.useRef({}),n=o.useRef(!1),r=o.useCallback((e=>{!n.current&&e&&(n.current=!0,Object.values(e.appliers).forEach((e=>{e()})),n.current=!1)}),[]),i={registerPipeProcessor:o.useCallback(((e,n,o)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}});const i=t.current[e];return i.processors.get(n)!==o&&(i.processors.set(n,o),i.processorsAsArray=Array.from(t.current[e].processors.values()),r(i)),()=>{t.current[e].processors.delete(n),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values())}}),[r]),registerPipeApplier:o.useCallback(((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[e].appliers[n]=r,()=>{const r=t.current[e].appliers,o=(0,l.Z)(r,[n].map(st.Z));t.current[e].appliers=o})),[]),requestPipeProcessorsApplication:o.useCallback((e=>{r(t.current[e])}),[r])},a={unstable_applyPipeProcessors:o.useCallback(((...e)=>{const[n,r,o]=e;if(!t.current[n])return r;const i=t.current[n].processorsAsArray;let a=r;for(let e=0;e{const t=o.useRef(new Map),n=o.useRef({}),r={registerStrategyProcessor:o.useCallback(((t,r,o)=>{const i=()=>{const e=n.current[r],o=(0,l.Z)(e,[t].map(st.Z));n.current[r]=o};n.current[r]||(n.current[r]={});const a=n.current[r],s=a[t];return a[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(ut[r])&&e.current.publishEvent("activeStrategyProcessorChange",r),i):i}),[e]),applyStrategyProcessor:o.useCallback(((t,r)=>{const o=e.current.getActiveStrategy(ut[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=n.current[t];if(!i||!i[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,i[o])(r)}),[e]),getActiveStrategy:o.useCallback((e=>{const n=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return n?.[0]??lt}),[]),setStrategyAvailability:o.useCallback(((n,r,o)=>{t.current.set(r,{group:n,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e])};(0,Ye.h)(e,r,"private")})(n),((e,t)=>{const n=o.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:n})})(n,t),n.current.register("private",{rootProps:t}),n},ht=(e,t,n)=>{const r=o.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function pt(e,t){const n=o.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const ft=(e,t,n,r,o)=>{const i=pt(e,"useNativeEventListener");(0,V.x3)(e,"rootMount",(()=>{const e="function"==typeof t?t():t.current;if(e&&n&&r)return i.debug(`Binding native ${n} event`),e.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),e.removeEventListener(n,r,o)}}))};var mt=n(10854);function gt(e,t){if(null==e)return"";const n="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some((e=>n.includes(e)))?`"${e}"`:e}return n}const vt=(e,t)=>{const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const t=e.colDef.type;o="number"===t?String(e.value):"date"===t||"dateTime"===t?e.value?.toISOString():"function"==typeof e.value?.toString?e.value.toString():e.value}else o=e.formattedValue;return gt(o,n)};class yt{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function bt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce(((e,n)=>`${e}${(({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new yt({csvOptions:r});return t.forEach((t=>{const a=n(e,t.field);i.addValue(vt(a,{ignoreValueFormatter:o,csvOptions:r}))})),i.getRowString()})({id:n,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r\n`),"").trim();if(!r.includeHeaders)return a;const s=t.filter((e=>e.field!==mt.n.field)),l=[];if(r.includeColumnGroupsHeaders){const e=i.current.getAllGroupDetails();let t=0;const n=s.reduce(((e,n)=>{const r=i.current.getColumnGroupPath(n.field);return e[n.field]=r,t=Math.max(t,r.length),e}),{});for(let o=0;o{const i=(n[r.field]||[])[o],a=e[i];t.addValue(a?a.headerName||a.groupId:"")}))}}const u=new yt({csvOptions:r,sanitizeCellValue:gt});s.forEach((e=>{u.addValue(e.headerName||e.field)})),l.push(u);return`${`${l.map((e=>e.getRowString())).join("\r\n")}\r\n`}${a}`.trim()}function xt(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const wt=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,St=e=>"Tab"===e||"Escape"===e;function Ct(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}function kt(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)}}const _t=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=("object"==typeof n?n?.clipboardExport:n)||!1,i=t.clipboardCopyCellDelimiter,a=o.useCallback((t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(n=t.target,window.getSelection()?.toString()||n&&(n.selectionEnd||0)-(n.selectionStart||0)>0)return;var n;let o="";if(e.current.getSelectedRows().size>0)o=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=(0,ie.TR)(e);if(t){const n=e.current.getCellParams(t.id,t.field);o=vt(n,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}var a;o=e.current.unstable_applyPipeProcessors("clipboardCopy",o),o&&(a=o,navigator.clipboard?navigator.clipboard.writeText(a).catch((()=>{kt(a)})):kt(a),e.current.publishEvent("clipboardCopy",o))}),[e,r,i]);ft(e,(()=>e.current.rootElementRef.current),"keydown",a),(0,V.x3)(e,"clipboardCopy",t.onClipboardCopy)},Mt=e=>(0,r.Z)({},e,{columnMenu:{open:!1}}),Tt=e=>{const t=o.useRef(!0);t.current&&(t.current=!1,e())},Pt=(e,t,n,r=!0)=>{const i=o.useRef(null),a=o.useRef(`mui-${Math.round(1e9*Math.random())}`),s=o.useCallback((()=>{i.current=e.current.registerPipeProcessor(t,a.current,n)}),[e,n,t]);Tt((()=>{r&&s()}));const l=o.useRef(!0);o.useEffect((()=>(l.current?l.current=!1:r&&s(),()=>{i.current&&(i.current(),i.current=null)})),[s,r])},Rt=(e,t,n)=>{const r=o.useRef(null),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback((()=>{r.current=e.current.registerPipeApplier(t,i.current,n)}),[e,n,t]);Tt((()=>{a()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])};var It=n(76045);const Dt=(e,t,n)=>{const o=(0,H.QC)({apiRef:n,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return(0,r.Z)({},e,{columns:o,pinnedColumns:e.pinnedColumns??It.J})};function Ot(e){return t=>(0,r.Z)({},t,{columns:e})}const At=(e,t)=>(0,r.Z)({},e,{density:t.initialState?.density??t.density??"standard"});const Et=({apiRef:e,options:t})=>{const n=(0,O.d$)(e);if(t.fields)return t.fields.reduce(((e,t)=>{const r=n.find((e=>e.field===t));return r&&e.push(r),e}),[]);return(t.allColumns?n:(0,O.FE)(e)).filter((e=>!e.disableExport))},Lt=({apiRef:e})=>{const t=(0,X.Lp)(e),n=(0,Q.Kd)(e),r=e.current.getSelectedRows(),o=t.filter((e=>"footer"!==n[e].type)),i=(0,Q.Kf)(e),a=i?.top?.map((e=>e.id))||[],s=i?.bottom?.map((e=>e.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter((e=>r.has(e))):o};var Zt=n(30743),Ft=n(5056),jt=n(18873),Nt=n(45183);const zt=(0,s.G)((function(e,t){const{children:n,slotProps:i={}}=e,a=i.button||{},s=i.tooltip||{},l=(0,L.l)(),u=(0,M.B)(),c=(0,Ft.Z)(),d=(0,Ft.Z)(),[p,f]=o.useState(!1),m=o.useRef(null),v=(0,h.Z)(t,m),y=()=>f(!1);return null==n?null:(0,Z.jsxs)(o.Fragment,{children:[(0,Z.jsx)(u.slots.baseTooltip,(0,r.Z)({title:l.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},u.slotProps?.baseTooltip,s,{children:(0,Z.jsx)(u.slots.baseButton,(0,r.Z)({size:"small",startIcon:(0,Z.jsx)(u.slots.exportIcon,{}),"aria-expanded":p,"aria-label":l.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":p?d:void 0,id:c},u.slotProps?.baseButton,a,{onClick:e=>{f((e=>!e)),a.onClick?.(e)},ref:v,children:l.current.getLocaleText("toolbarExport")}))})),(0,Z.jsx)(Nt.r,{open:p,target:m.current,onClose:y,position:"bottom-start",children:(0,Z.jsx)(jt.Z,{id:d,className:g._.menuList,"aria-labelledby":c,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),St(e.key)&&y()},autoFocusItem:p,children:o.Children.map(n,(e=>o.isValidElement(e)?o.cloneElement(e,{hideMenu:y}):e))})})]})})),Bt=["hideMenu","options"],Vt=["hideMenu","options"],$t=["csvOptions","printOptions","excelOptions"];function Ht(e){const t=(0,L.l)(),{hideMenu:n,options:o}=e,i=(0,l.Z)(e,Bt);return(0,Z.jsx)(Zt.Z,(0,r.Z)({onClick:()=>{t.current.exportDataAsCsv(o),n?.()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Wt(e){const t=(0,L.l)(),{hideMenu:n,options:o}=e,i=(0,l.Z)(e,Vt);return(0,Z.jsx)(Zt.Z,(0,r.Z)({onClick:()=>{t.current.exportDataAsPrint(o),n?.()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}(0,s.G)((function(e,t){const n=e,{csvOptions:i={},printOptions:a={},excelOptions:s}=n,u=(0,l.Z)(n,$t),c=(0,L.l)().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:s,csvOptions:i,printOptions:a}).sort(((e,t)=>e.componentName>t.componentName?1:-1));return 0===c.length?null:(0,Z.jsx)(zt,(0,r.Z)({},u,{ref:t,children:c.map(((e,t)=>o.cloneElement(e.component,{key:t})))}))}));const Gt=(e,t)=>{const n=pt(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,i=("object"==typeof r?r?.csvExport:r)||!1,a=o.useCallback(((t={})=>{n.debug("Get data as CSV");return bt({columns:Et({apiRef:e,options:t}),rowIds:(t.getRowsToExport??Lt)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:i,apiRef:e})}),[n,e,i]),s=o.useCallback((e=>{n.debug("Export data as CSV");const t=a(e);!function(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=r,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI X: exportAs not supported.")}(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",e?.fileName)}),[n,a]),l={getDataAsCsv:a,exportDataAsCsv:s};(0,Ye.h)(e,l,"public");const u=o.useCallback(((e,t)=>t.csvOptions?.disableToolbarButton?e:[...e,{component:(0,Z.jsx)(Ht,{options:t.csvOptions}),componentName:"csvExport"}]),[]);Pt(e,"exportMenu",u)};var Ut=n(80668),qt=n(2883),Kt=n(21942);const Yt=(e,t,n)=>{let o=e.paginationModel;const i=e.rowCount,a=n?.pageSize??o.pageSize,s=n?.page??o.page,l=(0,Kt.tR)(i,a,s);!n||n?.page===o.page&&n?.pageSize===o.pageSize||(o=n);const u=-1===a?0:(0,Kt.NZ)(o.page,l);return u!==o.page&&(o=(0,r.Z)({},o,{page:u})),(0,Kt.Ip)(o.pageSize,t),o};const Xt=(e,t)=>{const n=null!==e.current.rootElementRef.current,i=pt(e,"useGridPrintExport"),a=o.useRef(null),s=o.useRef(null),l=o.useRef({}),u=o.useRef([]),c=o.useRef(null);o.useEffect((()=>{a.current=(0,Ut.Z)(e.current.rootElementRef.current)}),[e,n]);const d=o.useCallback(((t,n,r)=>new Promise((o=>{const i=Et({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),a=(0,O.d$)(e),s={};a.forEach((e=>{s[e.field]=i.includes(e.field)})),r&&(s[mt.n.field]=!0),e.current.setColumnVisibilityModel(s),o()}))),[e]),h=o.useCallback((t=>{const n=t({apiRef:e}).reduce(((t,n)=>{const r=e.current.getRow(n);return r[J._1]||t.push(r),t}),[]);e.current.setRows(n)}),[e]),p=o.useCallback(((n,o)=>{const i=(0,r.Z)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),s=n.contentDocument;if(!s)return;const l=(0,_e.k)(e.current.state),u=e.current.rootElementRef.current,c=u.cloneNode(!0);c.querySelector(`.${g._.main}`).style.overflow="visible",c.style.contain="size";let d=u.querySelector(`.${g._.toolbarContainer}`)?.offsetHeight||0,h=u.querySelector(`.${g._.footerContainer}`)?.offsetHeight||0;i.hideToolbar&&(c.querySelector(`.${g._.toolbarContainer}`)?.remove(),d=0),i.hideFooter&&(c.querySelector(`.${g._.footerContainer}`)?.remove(),h=0);const p=l.currentPageTotalHeight+(0,H.Jb)(e,t)+d+h;if(c.style.height=`${p}px`,c.style.boxSizing="content-box",!i.hideFooter){const e=c.querySelector(`.${g._.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=p-h+"px"}const f=document.createElement("div");f.appendChild(c),s.body.style.marginTop="0px",s.body.innerHTML=f.innerHTML;const m="function"==typeof i.pageStyle?i.pageStyle():i.pageStyle;if("string"==typeof m){const e=s.createElement("style");e.appendChild(s.createTextNode(m)),s.head.appendChild(e)}i.bodyClassName&&s.body.classList.add(...i.bodyClassName.split(" "));const v=[];if(i.copyStyles){const e=u.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:a.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e{e.addEventListener("load",(()=>t()))}))),s.head.appendChild(e)}}}Promise.all(v).then((()=>{n.contentWindow.print()}))}),[e,a,t]),f=o.useCallback((t=>{a.current.body.removeChild(t),e.current.restoreState(s.current||{}),s.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(l.current),e.current.setState((e=>(0,r.Z)({},e,{virtualization:c.current}))),e.current.setRows(u.current),s.current=null,l.current={},u.current=[]}),[e]),m={exportDataAsPrint:o.useCallback((async n=>{if(i.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(s.current=e.current.exportState(),l.current=(0,O.g0)(e),u.current=e.current.getSortedRows().filter((e=>!e[J._1])),t.pagination){const t={page:0,pageSize:(0,X.IQ)(e)};e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,"DataGridPro",t)})})))}c.current=e.current.state.virtualization,e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabled:!1,enabledForColumns:!1})}))),await d(n?.fields,n?.allColumns,n?.includeCheckboxes),h(n?.getRowsToExport??Lt),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const o=function(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}(n?.fileName);o.onload=()=>{p(o,n);o.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&f(o)}))},a.current.body.appendChild(o)}),[t,i,e,p,f,d,h])};(0,Ye.h)(e,m,"public");const v=o.useCallback(((e,t)=>t.printOptions?.disableToolbarButton?e:[...e,{component:(0,Z.jsx)(Wt,{options:t.printOptions}),componentName:"printExport"}]),[]);Pt(e,"exportMenu",v)};var Qt=n(42849),Jt=n(96858),en=n(99565),tn=n(74914);const nn=(e,t,n,r)=>{const i=o.useCallback((()=>{e.current.registerStrategyProcessor(t,n,r)}),[e,r,n,t]);Tt((()=>{i()}));const a=o.useRef(!0);o.useEffect((()=>{a.current?a.current=!1:i()}),[i])};var rn=n(50928);const on=(e,t,n)=>{const o=t.filterModel??t.initialState?.filter?.filterModel??(0,tn.c)();return(0,r.Z)({},e,{filter:(0,r.Z)({filterModel:(0,rn.NF)(o,t.disableMultipleColumnsFiltering,n)},tn.R),visibleRowsLookup:{}})},an=e=>e.filteredRowsLookup;function sn(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function ln(){return(0,Qt.PP)(Object.values)}var un=n(57418);const cn=e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});var dn=n(91652);var hn=n(87269),pn=n(94106),fn=n(96824),mn=n(41862);const gn=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},vn=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e(t.top||[]).concat(e.rows,t.bottom||[]))),xn=(e,t)=>{const n=pt(e,"useGridKeyboardNavigation"),r=(0,qe.V)(),i=t.unstable_listView,a=o.useCallback((()=>bn(e)),[e]),s="DataGrid"!==t.signature&&t.headerFilters,l=o.useCallback(((t,r,o="left",a="up")=>{const s=(0,X.D7)(e),l=e.current.unstable_getCellColSpanInfo(r,t);l&&l.spannedByColSpan&&("left"===o?t=l.leftVisibleCellIndex:"right"===o&&(t=l.rightVisibleCellIndex));const u=i?(0,yn.z)(e.current.state).field:(0,O.pK)(e)[t],c=function(e,t,n,r){const o=(0,mn.mf)(e);if(!o[t]?.[n])return t;const i=(0,X.Lp)(e);let a=i.indexOf(t)+("down"===r?1:-1);for(;a>=0&&ae.id===c));n.debug(`Navigating to cell row ${d}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:d}),e.current.setCellFocus(c,u)}),[e,n,i]),u=o.useCallback(((t,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,r)}),[e,n]),c=o.useCallback(((t,r)=>{n.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,r)}),[e,n]),d=o.useCallback(((t,r,o)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:i}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(i,r,o)}),[e,n]),h=o.useCallback((e=>a()[e]?.id),[a]),p=o.useCallback(((t,n)=>{const o=n.currentTarget.querySelector(`.${g._.columnHeaderTitleContainerContent}`);if(!!o&&o.contains(n.target)&&t.field!==mt.n.field)return;const i=a(),p=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,m=i.length>0?0:null,v=i.length-1,y=(0,O.FE)(e).length-1,b=(0,ae.uW)(e);let x=!0;switch(n.key){case"ArrowDown":s?c(f,n):null!==m&&l(f,h(m));break;case"ArrowRight":{const e=vn({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&u(e,n);break}case"ArrowLeft":{const e=gn({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&u(e,n);break}case"ArrowUp":b>0&&d(f,b-1,n);break;case"PageDown":null!==m&&null!==v&&l(f,h(Math.min(m+p,v)));break;case"Home":u(0,n);break;case"End":u(y,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:x=!1}x&&n.preventDefault()}),[e,a,s,c,l,h,r,u,d]),f=o.useCallback(((t,n)=>{const o=(0,pn.tr)(e)===t.field,i=(0,pn.xs)(e)===t.field;if(o||i||!wt(n.key))return;const s=a(),d=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,f=s.length-1,m=(0,O.FE)(e).length-1;let g=!0;switch(n.key){case"ArrowDown":{const e=h(0);null!=e&&l(p,e);break}case"ArrowRight":{const e=vn({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:r});null!==e&&c(e,n);break}case"ArrowLeft":{const o=gn({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:r});null!==o?c(o,n):e.current.setColumnHeaderFilterFocus(t.field,n);break}case"ArrowUp":u(p,n);break;case"PageDown":null!==f&&l(p,h(Math.min(0+d,f)));break;case"Home":c(0,n);break;case"End":c(m,n);break;case" ":break;default:g=!1}g&&n.preventDefault()}),[e,a,c,r,u,l,h]),m=o.useCallback(((t,n)=>{const r=(0,ie.jC)(e);if(null===r)return;const{field:o,depth:i}=r,{fields:s,depth:c,maxDepth:p}=t,f=a(),m=e.current.getViewportPageSize(),g=e.current.getColumnIndex(o),v=o?e.current.getColumnIndex(o):0,y=f.length-1,b=(0,O.FE)(e).length-1;let x=!0;switch(n.key){case"ArrowDown":c===p-1?u(g,n):d(g,i+1,n);break;case"ArrowUp":c>0&&d(g,i-1,n);break;case"ArrowRight":{const e=s.length-s.indexOf(o)-1;g+e+1<=b&&d(g+e+1,i,n);break}case"ArrowLeft":{const e=s.indexOf(o);g-e-1>=0&&d(g-e-1,i,n);break}case"PageDown":null!==y&&l(v,h(Math.min(0+m,y)));break;case"Home":d(0,i,n);break;case"End":d(b,i,n);break;case" ":break;default:x=!1}x&&n.preventDefault()}),[e,a,u,d,l,h]),v=o.useCallback(((t,n)=>{if((0,fn.q_)(n))return;const o=e.current.getCellParams(t.id,t.field);if(o.cellMode===hn.Vl.Edit||!wt(n.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:o}))return;const d=a();if(0===d.length)return;const p=e.current.getViewportPageSize(),f=i?()=>0:e.current.getColumnIndex,m=t.field?f(t.field):0,g=d.findIndex((e=>e.id===t.id)),v=d.length-1,y=(i?[(0,yn.z)(e.current.state)]:(0,O.FE)(e)).length-1;let b=!0;switch(n.key){case"ArrowDown":g0?l(m,h(g-1)):s?c(m,n):u(m,n);break;case"ArrowRight":{const e=vn({currentColIndex:m,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&l(e,h(g),r?"left":"right");break}case"ArrowLeft":{const e=gn({currentColIndex:m,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&l(e,h(g),r?"right":"left");break}case"Tab":n.shiftKey&&m>0?l(m-1,h(g),"left"):!n.shiftKey&&me===dn.KK||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(e))(e.field)))break;!n.shiftKey&&g=0?l(m,h(e)):u(m,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?l(0,h(0)):l(0,h(g));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?l(y,h(v)):l(y,h(g));break;default:b=!1}b&&n.preventDefault()}),[e,a,r,l,h,s,c,u,i]),y=o.useCallback(((e,{event:t})=>" "!==t.key&&e),[]);Pt(e,"canStartEditing",y),(0,V.zn)(e,"columnHeaderKeyDown",p),(0,V.zn)(e,"headerFilterKeyDown",f),(0,V.zn)(e,"columnGroupHeaderKeyDown",m),(0,V.zn)(e,"cellKeyDown",v)},wn=(e,t)=>{const n=(0,r.Z)({},(0,Kt.Xd)(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);(0,Kt.Ip)(n.pageSize,t.signature);const o=t.rowCount??t.initialState?.pagination?.rowCount??("client"===t.paginationMode?e.rows?.totalRowCount:void 0),i=t.paginationMeta??t.initialState?.pagination?.meta??{};return(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:n,rowCount:o,meta:i,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},Sn=(e,t)=>{((e,t)=>{const n=pt(e,"useGridPaginationMeta"),i=(0,v.Pp)(e,qt.OR);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:qt.OR,changeEvent:"paginationMetaChange"});const a={setPaginationMeta:o.useCallback((t=>{i!==t&&(n.debug("Setting 'paginationMeta' to",t),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{meta:t})}))))}),[e,n,i])};(0,Ye.h)(e,a,"public");const s=o.useCallback(((n,o)=>{const i=(0,qt.OR)(e);return o.exportOnlyDirtyModels&&null==t.paginationMeta&&null==t.initialState?.pagination?.meta?n:(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{meta:i})})}),[e,t.paginationMeta,t.initialState?.pagination?.meta]),l=o.useCallback(((t,n)=>{const o=n.stateToRestore.pagination?.meta?n.stateToRestore.pagination.meta:(0,qt.OR)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{meta:o})}))),t}),[e]);Pt(e,"exportState",s),Pt(e,"restoreState",l),o.useEffect((()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)}),[e,t.paginationMeta])})(e,t),((e,t)=>{const n=pt(e,"useGridPaginationModel"),i=(0,v.Pp)(e,T.CD),a=o.useRef((0,X.uf)(e)),s=Math.floor(t.rowHeight*i);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:qt.O$,changeEvent:"paginationModelChange"});const l={setPage:o.useCallback((t=>{const r=(0,qt.O$)(e);t!==r.page&&(n.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:r.pageSize}))}),[e,n]),setPageSize:o.useCallback((t=>{const r=(0,qt.O$)(e);t!==r.pageSize&&(n.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:r.page}))}),[e,n]),setPaginationModel:o.useCallback((o=>{const i=(0,qt.O$)(e);o!==i&&(n.debug("Setting 'paginationModel' to",o),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,o)})})),"setPaginationModel"))}),[e,n,t.signature])};(0,Ye.h)(e,l,"public");const u=o.useCallback(((n,o)=>{const i=(0,qt.O$)(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=t.initialState?.pagination?.paginationModel||0!==i.page&&i.pageSize!==(0,Kt.dG)(t.autoPageSize)?(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{paginationModel:i})}):n}),[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),c=o.useCallback(((n,o)=>{const i=o.stateToRestore.pagination?.paginationModel?(0,r.Z)({},(0,Kt.Xd)(t.autoPageSize),o.stateToRestore.pagination?.paginationModel):(0,qt.O$)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,i)})})),"stateRestorePreProcessing"),n}),[e,t.autoPageSize,t.signature]);Pt(e,"exportState",u),Pt(e,"restoreState",c);const d=o.useCallback((()=>{if(!t.autoPageSize)return;const n=e.current.getRootDimensions(),r=Math.floor(n.viewportInnerSize.height/s);e.current.setPageSize(r)}),[e,t.autoPageSize,s]),h=o.useCallback((t=>{if(null==t)return;const n=(0,qt.O$)(e);if(0===n.page)return;const r=(0,qt.UB)(e);n.page>r-1&&e.current.setPage(Math.max(0,r-1))}),[e]),p=o.useCallback((()=>{0!==(0,qt.O$)(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})}),[e]),f=o.useCallback((t=>{const n=(0,r.Z)({},t,{items:(0,X.DY)(e)});(0,Ke.xb)(n,a.current)||(a.current=n,p())}),[e,p]);(0,V.zn)(e,"viewportInnerSizeChange",d),(0,V.zn)(e,"paginationModelChange",(()=>{const t=(0,qt.O$)(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})})),(0,V.zn)(e,"rowCountChange",h),(0,V.zn)(e,"sortModelChange",(0,Ke.d$)(t.resetPageOnSortFilter,p)),(0,V.zn)(e,"filterModelChange",(0,Ke.d$)(t.resetPageOnSortFilter,f));const m=o.useRef(!0);o.useEffect((()=>{m.current?m.current=!1:t.pagination&&e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,t.paginationModel)})})))}),[e,t.paginationModel,t.signature,t.pagination]),o.useEffect((()=>{e.current.setState((e=>{const n=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===n?e:(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})}))}),[e,t.paginationMode,t.pagination]),o.useEffect(d,[d])})(e,t),((e,t)=>{const n=pt(e,"useGridRowCount"),i=(0,v.Pp)(e,X.xf),a=(0,v.Pp)(e,qt.RM),s=(0,v.Pp)(e,qt.OR),l=(0,v.Pp)(e,qt.O$),u=(0,en.Z)((()=>(0,qt.O$)(e).pageSize));e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:qt.RM,changeEvent:"rowCountChange"});const c={setRowCount:o.useCallback((t=>{a!==t&&(n.debug("Setting 'rowCount' to",t),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{rowCount:t})}))))}),[e,n,a])};(0,Ye.h)(e,c,"public");const d=o.useCallback(((n,o)=>{const i=(0,qt.RM)(e);return o.exportOnlyDirtyModels&&null==t.rowCount&&null==t.initialState?.pagination?.rowCount?n:(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{rowCount:i})})}),[e,t.rowCount,t.initialState?.pagination?.rowCount]),h=o.useCallback(((t,n)=>{const o=n.stateToRestore.pagination?.rowCount?n.stateToRestore.pagination.rowCount:(0,qt.RM)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{rowCount:o})}))),t}),[e]);Pt(e,"exportState",d),Pt(e,"restoreState",h);const p=o.useCallback((n=>{"client"!==t.paginationMode&&u.current&&n.pageSize!==u.current&&(u.current=n.pageSize,-1===a&&e.current.setPage(0))}),[t.paginationMode,u,a,e]);(0,V.zn)(e,"paginationModelChange",p),o.useEffect((()=>{"client"===t.paginationMode?e.current.setRowCount(i):null!=t.rowCount&&e.current.setRowCount(t.rowCount)}),[e,t.paginationMode,i,t.rowCount]);const f=!1===s.hasNextPage;o.useEffect((()=>{f&&-1===a&&e.current.setRowCount(l.pageSize*l.page+i)}),[e,i,f,a,l])})(e,t)},Cn=(e,t)=>(0,r.Z)({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}});var kn=n(47052),_n=n(17418);const Mn=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},Tn=["id","field"],Pn=["id","field"];var Rn=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Rn||{}),In=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(In||{}),Dn=n(16002);const On=["id"],An=["id"],En=e=>(0,r.Z)({},e,{editRows:{}}),Ln=(e,t)=>{((e,t)=>{const[n,i]=o.useState({}),a=o.useRef(n),s=o.useRef({}),{processRowUpdate:u,onProcessRowUpdateError:c,cellModesModel:d,onCellModesModelChange:h}=t,p=e=>(...n)=>{t.editMode===hn.r2.Cell&&e(...n)},f=o.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),m=o.useCallback(((t,n,r)=>{if(e.current.getCellMode(t,n)!==r)throw new Error(`MUI X: The cell with id=${t} and field=${n} is not in ${r} mode.`)}),[e]),g=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===hn.Vl.Edit)return;const o=(0,r.Z)({},t,{reason:_n.b.cellDoubleClick});e.current.publishEvent("cellEditStart",o,n)}),[e]),v=o.useCallback(((t,n)=>{if(t.cellMode===hn.Vl.View)return;if(e.current.getCellMode(t.id,t.field)===hn.Vl.View)return;const o=(0,r.Z)({},t,{reason:_n.r.cellFocusOut});e.current.publishEvent("cellEditStop",o,n)}),[e]),y=o.useCallback(((t,n)=>{if(t.cellMode===hn.Vl.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=_n.r.escapeKeyDown:"Enter"===n.key?o=_n.r.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?_n.r.shiftTabKeyDown:_n.r.tabKeyDown,n.preventDefault()),o){const i=(0,r.Z)({},t,{reason:o});e.current.publishEvent("cellEditStop",i,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"cell"}))return;if(xt(n)?o=_n.b.printableKeyDown:Ct(n)?o=_n.b.pasteKeyDown:"Enter"===n.key?o=_n.b.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(o=_n.b.deleteKeyDown),o){const i=(0,r.Z)({},t,{reason:o,key:n.key});e.current.publishEvent("cellEditStart",i,n)}}}),[e]),b=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,i={id:n,field:r};o!==_n.b.printableKeyDown&&o!==_n.b.deleteKeyDown&&o!==_n.b.pasteKeyDown||(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),x=o.useCallback((t=>{const{id:n,field:r,reason:o}=t;let i;e.current.runPendingEditCellValueMutation(n,r),o===_n.r.enterKeyDown?i="below":o===_n.r.tabKeyDown?i="right":o===_n.r.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===o;e.current.stopCellEditMode({id:n,field:r,ignoreModifications:a,cellToFocusAfter:i})}),[e]);var w;(0,V.zn)(e,"cellDoubleClick",p(g)),(0,V.zn)(e,"cellFocusOut",p(v)),(0,V.zn)(e,"cellKeyDown",p(y)),(0,V.zn)(e,"cellEditStart",p(b)),(0,V.zn)(e,"cellEditStop",p(x)),(0,V.x3)(e,"cellEditStart",t.onCellEditStart),(0,V.x3)(e,"cellEditStop",(w=t.onCellEditStop,async(...t)=>{if(w){const{id:n,field:r}=t[0],o=e.current.state.editRows,i=o[n][r]?.error;i||w(...t)}}));const S=o.useCallback(((t,n)=>{const r=(0,kn.bj)(e.current.state);return r[t]&&r[t][n]?hn.Vl.Edit:hn.Vl.View}),[e]),C=(0,B.Z)((n=>{const r=n!==t.cellModesModel;h&&r&&h(n,{api:e.current}),t.cellModesModel&&r||(i(n),a.current=n,e.current.publishEvent("cellModesModelChange",n))})),k=o.useCallback(((e,t,n)=>{const o=(0,r.Z)({},a.current);if(null!==n)o[e]=(0,r.Z)({},o[e],{[t]:(0,r.Z)({},n)});else{const n=o[e],r=(0,l.Z)(n,[t].map(st.Z));o[e]=r,0===Object.keys(o[e]).length&&delete o[e]}C(o)}),[C]),_=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const i=(0,r.Z)({},e.editRows);return null!==o?i[t]=(0,r.Z)({},i[t],{[n]:(0,r.Z)({},o)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,r.Z)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),M=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,l.Z)(e,Tn);f(t,n),m(t,n,hn.Vl.View),k(t,n,(0,r.Z)({mode:hn.Vl.Edit},o))}),[f,m,k]),T=(0,B.Z)((async t=>{const{id:n,field:o,deleteValue:i,initialValue:a}=t,s=e.current.getCellValue(n,o);let l=s;i?l=Mn(e.current.getColumn(o)):a&&(l=a);const u=e.current.getColumn(o),c=!!u.preProcessEditCellProps&&i;let d={value:l,error:!1,isProcessingProps:c};if(_(n,o,d),e.current.setCellFocus(n,o),c&&(d=await Promise.resolve(u.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:d,hasChanged:l!==s})),e.current.getCellMode(n,o)===hn.Vl.Edit)){const t=(0,kn.bj)(e.current.state);_(n,o,(0,r.Z)({},d,{value:t[n][o].value,isProcessingProps:!1}))}})),P=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,l.Z)(e,Pn);m(t,n,hn.Vl.Edit),k(t,n,(0,r.Z)({mode:hn.Vl.View},o))}),[m,k]),R=(0,B.Z)((async t=>{const{id:n,field:r,ignoreModifications:o,cellToFocusAfter:i="none"}=t;m(n,r,hn.Vl.Edit),e.current.runPendingEditCellValueMutation(n,r);const a=()=>{_(n,r,null),k(n,r,null),"none"!==i&&e.current.moveFocusToRelativeCell(n,r,i)};if(o)return void a();const l=(0,kn.bj)(e.current.state),{error:d,isProcessingProps:h}=l[n][r];if(d||h)return s.current[n][r].mode=hn.Vl.Edit,void k(n,r,{mode:hn.Vl.Edit});const p=e.current.getRowWithUpdatedValuesFromCellEditing(n,r);if(u){const t=e=>{s.current[n][r].mode=hn.Vl.Edit,k(n,r,{mode:hn.Vl.Edit}),c&&c(e)};try{const r=e.current.getRow(n);Promise.resolve(u(p,r,{rowId:n})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([p]),a()})),I={getCellMode:S,startCellEditMode:M,stopCellEditMode:P},D={setCellEditingEditCellValue:o.useCallback((async t=>{const{id:n,field:o,value:i,debounceMs:a,unstable_skipValueParser:s}=t;f(n,o),m(n,o,hn.Vl.Edit);const l=e.current.getColumn(o),u=e.current.getRow(n);let c=i;l.valueParser&&!s&&(c=l.valueParser(i,u,l,e));let d=(0,kn.bj)(e.current.state),h=(0,r.Z)({},d[n][o],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});if(l.preProcessEditCellProps){const e=i!==d[n][o].value;h=(0,r.Z)({},h,{isProcessingProps:!0}),_(n,o,h),h=await Promise.resolve(l.preProcessEditCellProps({id:n,row:u,props:h,hasChanged:e}))}return e.current.getCellMode(n,o)!==hn.Vl.View&&(d=(0,kn.bj)(e.current.state),h=(0,r.Z)({},h,{isProcessingProps:!1}),h.value=l.preProcessEditCellProps?d[n][o].value:c,_(n,o,h),d=(0,kn.bj)(e.current.state),!d[n]?.[o]?.error)}),[e,f,m,_]),getRowWithUpdatedValuesFromCellEditing:o.useCallback(((t,n)=>{const o=e.current.getColumn(n),i=(0,kn.bj)(e.current.state),a=e.current.getRow(t);if(!i[t]||!i[t][n])return e.current.getRow(t);const{value:s}=i[t][n];return o.valueSetter?o.valueSetter(s,a,o,e):(0,r.Z)({},a,{[n]:s})}),[e])};(0,Ye.h)(e,I,"public"),(0,Ye.h)(e,D,"private"),o.useEffect((()=>{d&&C(d)}),[d,C]),(0,Jt.Z)((()=>{const t=(0,Q.J4)(e),o=s.current;s.current=(0,Ke.I8)(n),Object.entries(n).forEach((([n,i])=>{Object.entries(i).forEach((([i,a])=>{const s=o[n]?.[i]?.mode||hn.Vl.View,l=t[n]?e.current.getRowId(t[n]):n;a.mode===hn.Vl.Edit&&s===hn.Vl.View?T((0,r.Z)({id:l,field:i},a)):a.mode===hn.Vl.View&&s===hn.Vl.Edit&&R((0,r.Z)({id:l,field:i},a))}))}))}),[e,n,T,R])})(e,t),((e,t)=>{const[n,i]=o.useState({}),a=o.useRef(n),s=o.useRef({}),u=o.useRef(void 0),c=o.useRef(null),{processRowUpdate:d,onProcessRowUpdateError:h,rowModesModel:p,onRowModesModelChange:f}=t,m=e=>(...n)=>{t.editMode===hn.r2.Row&&e(...n)},g=o.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),v=o.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI X: The row with id=${t} is not in ${n} mode.`)}),[e]),y=o.useCallback((t=>{const n=(0,kn.bj)(e.current.state);return Object.values(n[t]).some((e=>e.error))}),[e]),b=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===hn.se.Edit)return;const o=e.current.getRowParams(t.id),i=(0,r.Z)({},o,{field:t.field,reason:Rn.cellDoubleClick});e.current.publishEvent("rowEditStart",i,n)}),[e]),x=o.useCallback((e=>{c.current=e}),[]),w=o.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==hn.se.View&&(c.current=null,u.current=setTimeout((()=>{if(c.current?.id!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===hn.se.View)return;if(y(t.id))return;const o=e.current.getRowParams(t.id),i=(0,r.Z)({},o,{field:t.field,reason:In.rowFocusOut});e.current.publishEvent("rowEditStop",i,n)}})))}),[e,y]);o.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const S=o.useCallback(((t,n)=>{if(t.cellMode===hn.se.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=In.escapeKeyDown;else if("Enter"===n.key)o=In.enterKeyDown;else if("Tab"===n.key){const r=(0,O.pK)(e).filter((n=>e.current.getColumn(n).type===Dn.W||e.current.isCellEditable(e.current.getCellParams(t.id,n))));if(n.shiftKey?t.field===r[0]&&(o=In.shiftTabKeyDown):t.field===r[r.length-1]&&(o=In.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex((e=>e===t.field)),i=r[n.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,i)}}if(o){if(o!==In.escapeKeyDown&&y(t.id))return;const i=(0,r.Z)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",i,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"row"}))return;if(xt(n)||Ct(n)?o=Rn.printableKeyDown:"Enter"===n.key?o=Rn.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(o=Rn.deleteKeyDown),o){const i=e.current.getRowParams(t.id),a=(0,r.Z)({},i,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",a,n)}}}),[e,y]),C=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,i={id:n,fieldToFocus:r};o!==Rn.printableKeyDown&&o!==Rn.deleteKeyDown||(i.deleteValue=!!r),e.current.startRowEditMode(i)}),[e]),k=o.useCallback((t=>{const{id:n,reason:r,field:o}=t;let i;e.current.runPendingEditCellValueMutation(n),r===In.enterKeyDown?i="below":r===In.tabKeyDown?i="right":r===In.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===r;e.current.stopRowEditMode({id:n,ignoreModifications:a,field:o,cellToFocusAfter:i})}),[e]);(0,V.zn)(e,"cellDoubleClick",m(b)),(0,V.zn)(e,"cellFocusIn",m(x)),(0,V.zn)(e,"cellFocusOut",m(w)),(0,V.zn)(e,"cellKeyDown",m(S)),(0,V.zn)(e,"rowEditStart",m(C)),(0,V.zn)(e,"rowEditStop",m(k)),(0,V.x3)(e,"rowEditStart",t.onRowEditStart),(0,V.x3)(e,"rowEditStop",t.onRowEditStop);const _=o.useCallback((n=>(0,kn.uR)(e,{rowId:n,editMode:t.editMode})?hn.se.Edit:hn.se.View),[e,t.editMode]),M=(0,B.Z)((n=>{const r=n!==t.rowModesModel;f&&r&&f(n,{api:e.current}),t.rowModesModel&&r||(i(n),a.current=n,e.current.publishEvent("rowModesModelChange",n))})),T=o.useCallback(((e,t)=>{const n=(0,r.Z)({},a.current);null!==t?n[e]=(0,r.Z)({},t):delete n[e],M(n)}),[M]),P=o.useCallback(((t,n)=>{e.current.setState((e=>{const o=(0,r.Z)({},e.editRows);return null!==n?o[t]=n:delete o[t],(0,r.Z)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),R=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const i=(0,r.Z)({},e.editRows);return null!==o?i[t]=(0,r.Z)({},i[t],{[n]:(0,r.Z)({},o)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,r.Z)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),I=o.useCallback((e=>{const{id:t}=e,n=(0,l.Z)(e,On);v(t,hn.se.View),T(t,(0,r.Z)({mode:hn.se.Edit},n))}),[v,T]),D=(0,B.Z)((t=>{const{id:n,fieldToFocus:o,deleteValue:i,initialValue:a}=t,s=(0,O.Zi)(e),l=s.reduce(((t,r)=>{if(!e.current.getCellParams(n,r).isEditable)return t;const s=e.current.getColumn(r);let l=e.current.getCellValue(n,r);return o===r&&(i||a)&&(i?l=Mn(s):a&&(l=a)),t[r]={value:l,error:!1,isProcessingProps:!!s.preProcessEditCellProps&&i},t}),{});P(n,l),o&&e.current.setCellFocus(n,o),s.filter((t=>!!e.current.getColumn(t).preProcessEditCellProps&&i)).forEach((t=>{const o=e.current.getColumn(t),s=e.current.getCellValue(n,t),u=i?Mn(o):a??s;Promise.resolve(o.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:l[t],hasChanged:u!==s})).then((o=>{if(e.current.getRowMode(n)===hn.se.Edit){const i=(0,kn.bj)(e.current.state);R(n,t,(0,r.Z)({},o,{value:i[n][t].value,isProcessingProps:!1}))}}))}))})),A=o.useCallback((e=>{const{id:t}=e,n=(0,l.Z)(e,An);v(t,hn.se.Edit),T(t,(0,r.Z)({mode:hn.se.View},n))}),[v,T]),E=(0,B.Z)((t=>{const{id:n,ignoreModifications:r,field:o,cellToFocusAfter:i="none"}=t;e.current.runPendingEditCellValueMutation(n);const a=()=>{"none"!==i&&o&&e.current.moveFocusToRelativeCell(n,o,i),P(n,null),T(n,null)};if(r)return void a();const l=(0,kn.bj)(e.current.state),u=e.current.getRow(n);if(Object.values(l[n]).some((e=>e.isProcessingProps)))return void(s.current[n].mode=hn.se.Edit);if(y(n))return s.current[n].mode=hn.se.Edit,void T(n,{mode:hn.se.Edit});const c=e.current.getRowWithUpdatedValuesFromRowEditing(n);if(d){const t=e=>{s.current[n].mode=hn.se.Edit,T(n,{mode:hn.se.Edit}),h&&h(e)};try{Promise.resolve(d(c,u,{rowId:n})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([c]),a()})),L={getRowMode:_,startRowEditMode:I,stopRowEditMode:A},Z={setRowEditingEditCellValue:o.useCallback((t=>{const{id:n,field:o,value:i,debounceMs:a,unstable_skipValueParser:s}=t;g(n,o);const u=e.current.getColumn(o),c=e.current.getRow(n);let d=i;u.valueParser&&!s&&(d=u.valueParser(i,c,u,e));let h=(0,kn.bj)(e.current.state),p=(0,r.Z)({},h[n][o],{value:d,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return u.preProcessEditCellProps||R(n,o,p),new Promise((t=>{const i=[];if(u.preProcessEditCellProps){const a=p.value!==h[n][o].value;p=(0,r.Z)({},p,{isProcessingProps:!0}),R(n,o,p);const s=h[n],f=(0,l.Z)(s,[o].map(st.Z)),m=Promise.resolve(u.preProcessEditCellProps({id:n,row:c,props:p,hasChanged:a,otherFieldsProps:f})).then((i=>{e.current.getRowMode(n)!==hn.se.View?(h=(0,kn.bj)(e.current.state),(i=(0,r.Z)({},i,{isProcessingProps:!1})).value=u.preProcessEditCellProps?h[n][o].value:d,R(n,o,i)):t(!1)}));i.push(m)}Object.entries(h[n]).forEach((([a,s])=>{if(a===o)return;const u=e.current.getColumn(a);if(!u.preProcessEditCellProps)return;s=(0,r.Z)({},s,{isProcessingProps:!0}),R(n,a,s),h=(0,kn.bj)(e.current.state);const d=h[n],p=(0,l.Z)(d,[a].map(st.Z)),f=Promise.resolve(u.preProcessEditCellProps({id:n,row:c,props:s,hasChanged:!1,otherFieldsProps:p})).then((o=>{e.current.getRowMode(n)!==hn.se.View?(o=(0,r.Z)({},o,{isProcessingProps:!1}),R(n,a,o)):t(!1)}));i.push(f)})),Promise.all(i).then((()=>{e.current.getRowMode(n)===hn.se.Edit?(h=(0,kn.bj)(e.current.state),t(!h[n][o].error)):t(!1)}))}))}),[e,g,R]),getRowWithUpdatedValuesFromRowEditing:o.useCallback((t=>{const n=(0,kn.bj)(e.current.state),o=e.current.getRow(t);if(!n[t])return e.current.getRow(t);let i=(0,r.Z)({},o);return Object.entries(n[t]).forEach((([t,n])=>{const r=e.current.getColumn(t);r.valueSetter?i=r.valueSetter(n.value,i,r,e):i[t]=n.value})),i}),[e])};(0,Ye.h)(e,L,"public"),(0,Ye.h)(e,Z,"private"),o.useEffect((()=>{p&&M(p)}),[p,M]),(0,Jt.Z)((()=>{const t=(0,Q.J4)(e),o=s.current;s.current=(0,Ke.I8)(n);const i=new Set([...Object.keys(n),...Object.keys(o)]);Array.from(i).forEach((i=>{const a=n[i]??{mode:hn.se.View},s=o[i]?.mode||hn.se.View,l=t[i]?e.current.getRowId(t[i]):i;a.mode===hn.se.Edit&&s===hn.se.View?D((0,r.Z)({id:l},a)):a.mode===hn.se.View&&s===hn.se.Edit&&E((0,r.Z)({id:l},a))}))}),[e,n,D,E])})(e,t);const n=o.useRef({}),{isCellEditable:i}=t,a=o.useCallback((e=>!(0,J.I7)(e.rowNode)&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(!i||i(e))))),[i]);o.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[r]=e[t][n];clearTimeout(r),delete e[t][n]}))}))}}),[]);const s=o.useCallback(((e,t)=>{if(n.current[e])if(t){if(n.current[e][t]){const[,r]=n.current[e][t];r()}}else Object.keys(n.current[e]).forEach((t=>{const[,r]=n.current[e][t];r()}))}),[]),u={isCellEditable:a,setEditCellValue:o.useCallback((r=>{const{id:o,field:i,debounceMs:a}=r;return new Promise((s=>{((e,t,r,o)=>{if(!r)return void o();if(n.current[e]||(n.current[e]={}),n.current[e][t]){const[r]=n.current[e][t];clearTimeout(r)}const i=setTimeout((()=>{o(),delete n.current[e][t]}),r);n.current[e][t]=[i,()=>{const[r]=n.current[e][t];clearTimeout(r),o(),delete n.current[e][t]}]})(o,i,a,(async()=>{const n=t.editMode===hn.r2.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,i)===hn.Vl.Edit){const e=await n(r);s(e)}}))}))}),[e,t.editMode]),getRowWithUpdatedValues:o.useCallback(((n,r)=>t.editMode===hn.r2.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(n,r):e.current.getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),unstable_getEditCellMeta:o.useCallback(((t,n)=>{const r=(0,kn.bj)(e.current.state);return r[t]?.[n]??null}),[e])},c={runPendingEditCellValueMutation:s};(0,Ye.h)(e,u,"public"),(0,Ye.h)(e,c,"private")};var Zn=n(97442);const Fn=(e,t,n)=>{const o=!!t.unstable_dataSource;return n.current.caches.rows=(0,J.PO)({rows:o?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,r.Z)({},e,{rows:(0,J.IX)({apiRef:n,rowCountProp:t.rowCount,loadingProp:!!o||t.loading,previousTree:null,previousTreeDepths:null})})},jn=e=>"full"===e.updates.type?(e=>{const t={[J.U5]:(0,r.Z)({},(0,J.E2)(),{children:e})};for(let n=0;n{const n=(0,r.Z)({},e),o={};for(let e=0;e!o[e]))),n[J.U5]=(0,r.Z)({},i,{children:a}),{groupingName:lt,tree:n,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions});class Nn extends Error{}const zn=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],Bn=(e,t)=>(0,r.Z)({},e,{rowSelection:t.rowSelection?zn(t.rowSelectionModel)??[]:[]}),Vn=(e,t)=>{const n=pt(e,"useGridSelection"),i=o.useCallback((e=>(...n)=>{t.rowSelection&&e(...n)}),[t.rowSelection]),a=t.signature!==V.cG.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.descendants),s=o.useMemo((()=>zn(t.rowSelectionModel,(0,$e.Y1)(e.current.state))),[e,t.rowSelectionModel]),l=o.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:s,propOnChange:t.onRowSelectionModelChange,stateSelector:$e.Y1,changeEvent:"rowSelectionChange"});const{checkboxSelection:u,disableRowSelectionOnClick:c,isRowSelectable:d}=t,h=(0,Ve.Hs)(t),p=(0,v.Pp)(e,Q.Kd),f=(0,v.Pp)(e,Q.Lq)>1,m=o.useCallback((t=>{let n=t;const r=l.current??t,o=e.current.isRowSelected(t);if(o){const t=(0,X.zn)(e),o=t.findIndex((e=>e===r)),i=t.findIndex((e=>e===n));if(o===i)return;n=o>i?t[i+1]:t[i-1]}l.current=t,e.current.selectRowRange({startId:r,endId:n},!o)}),[e]),y=o.useCallback((o=>{if(t.signature===V.cG.DataGrid&&!h&&Array.isArray(o)&&o.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));(0,$e.Y1)(e.current.state)!==o&&(n.debug("Setting selection model"),e.current.setState((e=>(0,r.Z)({},e,{rowSelection:t.rowSelection?o:[]}))),e.current.forceUpdate())}),[e,n,t.rowSelection,t.signature,h]),b=o.useCallback((t=>(0,$e.Y1)(e.current.state).includes(t)),[e]),x=o.useCallback((n=>{if(!1===t.rowSelection)return!1;if(d&&!d(e.current.getRowParams(n)))return!1;const r=(0,Q.Kd)(e)[n];return"footer"!==r?.type&&"pinnedRow"!==r?.type}),[e,t.rowSelection,d]),w=o.useCallback((()=>(0,$e.bR)(e)),[e]),S=o.useCallback(((r,o=!0,i=!1)=>{if(e.current.isRowSelectable(r))if(l.current=r,i){n.debug(`Setting selection for row ${r}`);const i=[],s=e=>{i.push(e)};o&&(s(r),a&&(0,Ve.SJ)(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,s)),e.current.setRowSelectionModel(i)}else{n.debug(`Toggling selection for row ${r}`);const i=(0,$e.Y1)(e.current.state),s=new Set(i);s.delete(r);const l=e=>{s.add(e)},u=e=>{s.delete(e)};o?(l(r),a&&(0,Ve.SJ)(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,l)):a&&(0,Ve.HR)(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,u);(s.size<2||h)&&e.current.setRowSelectionModel(Array.from(s))}}),[e,n,a,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,h]),C=o.useCallback(((r,o=!0,i=!1)=>{n.debug("Setting selection for several rows");const s=r.filter((t=>e.current.isRowSelectable(t)));let l;if(i){if(o){if(l=new Set(s),a){const n=e=>{l.add(e)};s.forEach((r=>{(0,Ve.SJ)(e,p,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)}))}}else l=new Set;const n=(0,$e.z8)(e);if(l.size===Object.keys(n).length&&Array.from(l).every((e=>n[e]===e)))return}else{l=new Set(Object.values((0,$e.z8)(e)));const n=e=>{l.add(e)},r=e=>{l.delete(e)};s.forEach((i=>{o?(l.add(i),a&&(0,Ve.SJ)(e,p,i,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,n)):(r(i),a&&(0,Ve.HR)(e,p,i,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,r))}))}(l.size<2||h)&&e.current.setRowSelectionModel(Array.from(l))}),[n,a,h,e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents]),k=o.useCallback((({startId:t,endId:r},o=!0,i=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(r))return;n.debug(`Expanding selection from row ${t} to row ${r}`);const a=(0,X.zn)(e),s=a.indexOf(t),l=a.indexOf(r),[u,c]=s>l?[l,s]:[s,l],d=a.slice(u,c+1);e.current.selectRows(d,o,i)}),[e,n]),_={selectRow:S,setRowSelectionModel:y,getSelectedRows:w,isRowSelected:b,isRowSelectable:x},M={selectRows:C,selectRowRange:k};(0,Ye.h)(e,_,"public"),(0,Ye.h)(e,M,t.signature===V.cG.DataGrid?"private":"public");const T=o.useCallback(((n=!1)=>{const o=(0,$e.Y1)(e.current.state),i=(0,Q.J4)(e),a=(0,X._g)(e),s=(0,r.Z)({},(0,$e.z8)(e));let l=!1;o.forEach((e=>{if((e=>"server"===t.filterMode?!i[e]:!i[e]||!1===a[e])(e)){if(t.keepNonExistentRowsSelected)return;return delete s[e],void(l=!0)}if(!t.rowSelectionPropagation?.parents)return;const n=p[e];if("group"===n.type){if(n.isAutoGenerated)return delete s[e],void(l=!0);n.children.every((e=>!1===a[e]))||(delete s[e],l=!0)}}));const u=f&&t.rowSelectionPropagation?.parents&&Object.keys(s).length>0;if(l||u&&!n){const t=Object.values(s);u?e.current.selectRows(t,!0,!0):e.current.setRowSelectionModel(t)}}),[e,f,t.rowSelectionPropagation?.parents,t.keepNonExistentRowsSelected,t.filterMode,p]),P=o.useCallback(((t,n)=>{const r=n.metaKey||n.ctrlKey,o=!u&&!r&&!(e=>!!e.key)(n),i=!h||o,a=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!a,!0):e.current.selectRow(t,!a,!1)}),[e,h,u]),R=o.useCallback(((t,n)=>{if(c)return;const r=n.target.closest(`.${g._.cell}`)?.getAttribute("data-field");if(r===mt.n.field)return;if(r===dn.u9)return;if(r){const t=e.current.getColumn(r);if(t?.type===Dn.W)return}"pinnedRow"!==(0,Q.Kd)(e)[t.id].type&&(n.shiftKey&&h?m(t.id):P(t.id,n))}),[c,h,e,m,P]),I=o.useCallback(((e,t)=>{h&&t.shiftKey&&window.getSelection()?.removeAllRanges()}),[h]),D=o.useCallback(((t,n)=>{h&&n.nativeEvent.shiftKey?m(t.id):e.current.selectRow(t.id,t.value,!h)}),[e,m,h]),O=o.useCallback((n=>{const r=t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?(0,qt.Yp)(e):(0,X.zn)(e);e.current.selectRows(r,n.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),A=o.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==hn.Vl.Edit&&!(0,fn.q_)(n)){if(wt(n.key)&&n.shiftKey){const r=(0,ie.TR)(e);if(r&&r.id!==t.id){n.preventDefault();const o=e.current.isRowSelected(r.id);if(!h)return void e.current.selectRow(r.id,!o,!0);const i=e.current.getRowIndexRelativeToVisibleRows(r.id),a=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;i>a?o?(s=a,l=i-1):(s=a,l=i):o?(s=i+1,l=a):(s=i,l=a);const u=(0,un.j)(e).rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(u,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void P(t.id,n);"A"===String.fromCharCode(n.keyCode)&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),C(e.current.getAllRowIds(),!0))}}),[e,P,C,h]);(0,V.zn)(e,"sortedRowsSet",i((()=>T(!0)))),(0,V.zn)(e,"filteredRowsSet",i(T)),(0,V.zn)(e,"rowClick",i(R)),(0,V.zn)(e,"rowSelectionCheckboxChange",i(D)),(0,V.zn)(e,"headerSelectionCheckboxChange",O),(0,V.zn)(e,"cellMouseDown",i(I)),(0,V.zn)(e,"cellKeyDown",i(A)),o.useEffect((()=>{void 0!==s&&e.current.setRowSelectionModel(s)}),[e,s,t.rowSelection]),o.useEffect((()=>{t.rowSelection||e.current.setRowSelectionModel([])}),[e,t.rowSelection]);const E=null!=s;o.useEffect((()=>{if(E||!t.rowSelection)return;const n=(0,$e.Y1)(e.current.state);if(x){const t=n.filter((e=>x(e)));t.length{if(!t.rowSelection||E)return;const n=(0,$e.Y1)(e.current.state);!h&&n.length>1&&e.current.setRowSelectionModel([])}),[e,h,u,E,t.rowSelection]),o.useEffect((()=>{i(T)}),[T,i])},$n=(e,t)=>{const n=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,d.Z)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},g.d,t)),[t])})({classes:t.classes}),i=o.useCallback((o=>{const i=(0,r.Z)({},mt.n,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,s=null!=o.lookup[mt.e];return a&&!s?(o.lookup[mt.e]=i,o.orderedFields=[mt.e,...o.orderedFields]):!a&&s?(delete o.lookup[mt.e],o.orderedFields=o.orderedFields.filter((e=>e!==mt.e))):a&&s&&(o.lookup[mt.e]=(0,r.Z)({},i,o.lookup[mt.e])),o}),[e,n,t.checkboxSelection]);Pt(e,"hydrateColumns",i)};var Hn=n(71607);const Wn=(e,t)=>{const n=t.sortModel??t.initialState?.sorting?.sortModel??[];return(0,r.Z)({},e,{sorting:{sortModel:(0,Hn.Te)(n,t.disableMultipleColumnsSorting),sortedRows:[]}})};function Gn(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;return r>t?o:i-t>n?i-t:o{const o=Qn,i=(0,T.CD)(n);return(0,r.Z)({},e,{dimensions:(0,r.Z)({},o,rr(t,n,i,(0,O.s3)(n)))})},er=(0,W.P1)(O.FE,O.Ag,((e,t)=>{const n=e.length;return 0===n?0:(0,Kn.T)(t[n-1]+e[n-1].computedWidth,1)}));function tr(e,t){const n=pt(e,"useResizeContainer"),i=o.useRef(!1),a=o.useRef(Xn),s=(0,v.Pp)(e,O.s3),l=(0,v.Pp)(e,T.CD),u=(0,v.Pp)(e,er),c=o.useRef(!0),{rowHeight:d,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,headersTotalHeight:m,leftPinnedWidth:g,rightPinnedWidth:y}=rr(t,e,l,s),b=o.useRef(void 0),x=o.useCallback((()=>(0,z.jY)(e.current.state)),[e]),w=o.useCallback((t=>{e.current.setState((e=>(0,r.Z)({},e,{dimensions:t}))),e.current.rootElementRef.current&&nr(e.current.rootElementRef.current,(0,z.jY)(e.current.state))}),[e]),S=o.useCallback((()=>{const t=e.current.mainElementRef.current;if(!t)return;const n=(0,Un.Z)(t).getComputedStyle(t),r={width:parseFloat(n.width)||0,height:parseFloat(n.height)||0};b.current&&ir(b.current,r)||(e.current.publishEvent("resize",r),b.current=r)}),[e]),C=o.useCallback((()=>{const n=(0,z.jY)(e.current.state);if(!n.isReady)return 0;const r=(0,un.j)(e);if(t.getRowHeight){const t=(0,Me.r8)(e),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,r.rows.length)}const o=Math.floor(n.viewportInnerSize.height/d);return Math.min(o,r.rows.length)}),[e,t.getRowHeight,d]),k=o.useCallback((()=>{if(c.current)return;const n=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const n=or.get(e);if(void 0!==n)return n;const r=(0,Ut.Z)(e).createElement("div");r.style.width="99px",r.style.height="99px",r.style.position="absolute",r.style.overflow="scroll",r.className="scrollDiv",e.appendChild(r);const o=r.offsetWidth-r.clientWidth;return e.removeChild(r),or.set(e,o),o}(e.current.mainElementRef.current,t.scrollbarSize),r=(0,_e.k)(e.current.state),o=m+r.pinnedTopRowsTotalHeight,i=r.pinnedBottomRowsTotalHeight,s={width:u-g-y,height:(0,Kn.T)(r.currentPageTotalHeight,1)};let l,v,b=!1,x=!1;if(t.autoHeight)x=!1,b=Math.round(u)>Math.round(a.current.width),l={width:a.current.width,height:o+i+s.height},v={width:Math.max(0,l.width-(x?n:0)),height:Math.max(0,l.height-(b?n:0))};else{l={width:a.current.width,height:a.current.height},v={width:Math.max(0,l.width-g-y),height:Math.max(0,l.height-o-i)};const e=s,t=v,r=e.width>t.width,u=e.height>t.height;(r||u)&&(x=u,b=e.width+(x?n:0)>t.width,b&&(x=e.height+n>t.height)),x&&(v.width-=n),b&&(v.height-=n)}const S=Math.max(l.width,u+(x?n:0)),C={width:u,height:o+s.height+i},k={isReady:!0,root:a.current,viewportOuterSize:l,viewportInnerSize:v,contentSize:s,minimumSize:C,hasScrollX:b,hasScrollY:x,scrollbarSize:n,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,rowWidth:S,rowHeight:d,columnsTotalWidth:u,leftPinnedWidth:g,rightPinnedWidth:y,headersTotalHeight:m,topContainerHeight:o,bottomContainerHeight:i},_=e.current.state.dimensions;(0,Ke.xb)(_,k)||(w(k),ir(k.viewportInnerSize,_.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",k.viewportInnerSize),e.current.updateRenderContext?.())}),[e,w,t.scrollbarSize,t.autoHeight,d,h,p,f,u,m,g,y]),_=(0,B.Z)(k),M=o.useMemo((()=>t.resizeThrottleMs>0?function(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...e){r=e,void 0===n&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}((()=>{_(),e.current.publishEvent("debouncedResize",a.current)}),t.resizeThrottleMs):void 0),[e,t.resizeThrottleMs,_]);o.useEffect((()=>M?.clear),[M]);const P={resize:S,getRootDimensions:x},R={updateDimensions:k,getViewportPageSize:C};(0,Jt.Z)(k,[k]),(0,Ye.h)(e,P,"public"),(0,Ye.h)(e,R,"private");const I=o.useCallback((t=>{nr(t,(0,z.jY)(e.current.state))}),[e]),D=o.useCallback((e=>{if(a.current=e,0!==e.height||i.current||t.autoHeight||Yn.P||(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("\n")),i.current=!0),0!==e.width||i.current||Yn.P||(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("\n")),i.current=!0),c.current||!M)return c.current=!1,void k();M()}),[k,t.autoHeight,M,n]);(0,V.x3)(e,"rootMount",I),(0,V.x3)(e,"resize",D),(0,V.x3)(e,"debouncedResize",t.onResize)}function nr(e,t){const n=(t,n)=>e.style.setProperty(t,n);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function rr(e,t,n,r){const o=(0,J.qJ)(e.rowHeight,qn.rowHeight,J.bm);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:er(t),headersTotalHeight:(0,H.Jb)(t,e),leftPinnedWidth:r.left.reduce(((e,t)=>e+t.computedWidth),0),rightPinnedWidth:r.right.reduce(((e,t)=>e+t.computedWidth),0)}}const or=new WeakMap;function ir(e,t){return e.width===t.width&&e.height===t.height}const ar=void 0!==globalThis.ResizeObserver?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}};var sr=n(63799);const lr=(e,t,n)=>{n.current.caches.rowsMeta={heights:new Map};const o=(0,z.E$)(n.current.state),i=(0,Q.hh)(n),a=(0,qt.fL)(n.current.state),s=Math.min(a.enabled?a.paginationModel.pageSize:i,i);return(0,r.Z)({},e,{rowsMeta:{currentPageTotalHeight:s*o,positions:Array.from({length:s},((e,t)=>t*o)),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function ur(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,u=s[r],c=t.current.getRow(o),d=t.current.getRowValue(c,u),h="function"==typeof u.colSpan?u.colSpan(d,c,u,t):u.colSpan;if(!h||1===h)return cr(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let p=u.computedWidth;for(let e=1;e=i&&t{if(dr(e)){if(void 0!==n[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:r,children:o}=e;o.forEach((e=>{hr(e,[...t,r],n)}))},pr=e=>{if(!e)return{};const t={};return e.forEach((e=>{hr(e,[],t)})),t},fr=(e,t,n)=>{const r=e=>t[e]??[],o=[],i=Math.max(...e.map((e=>r(e).length))),a=(e,t,n)=>(0,Ke.xb)(r(e).slice(0,n+1),r(t).slice(0,n+1));for(let t=0;t{const i=r(o)[t]??null;if(0===e.length)return[{columnFields:[o],groupId:i}];const s=e[e.length-1],l=s.columnFields[s.columnFields.length-1];return s.groupId!==i||!a(l,o,t)||(u=l,c=o,n?.left&&n.left.includes(u)&&!n.left.includes(c)||n?.right&&!n.right.includes(u)&&n.right.includes(c))?[...e,{columnFields:[o],groupId:i}]:[...e.slice(0,e.length-1),{columnFields:[...s.columnFields,o],groupId:i}];var u,c}),[]);o.push(i)}return o},mr=["groupId","children"],gr=e=>{let t={};return e.forEach((e=>{if(dr(e))return;const{groupId:n,children:o}=e,i=(0,l.Z)(e,mr);if(!n)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=(0,r.Z)({},i,{groupId:n}),s=gr(o);if(void 0!==s[n]||void 0!==t[n])throw new Error(`MUI X: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=(0,r.Z)({},t,s,{[n]:a})})),(0,r.Z)({},t)},vr=(e,t,n)=>{if(!t.columnGroupingModel)return e;const o=(0,O.Zi)(n),i=(0,O.pK)(n),a=gr(t.columnGroupingModel??[]),s=pr(t.columnGroupingModel??[]),l=fr(o,s,n.current.state.pinnedColumns??{}),u=0===i.length?0:Math.max(...i.map((e=>s[e]?.length??0)));return(0,r.Z)({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:s,headerStructure:l,maxDepth:u}})};var yr=n(42591);const br={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0};function xr(e,t){if(void 0!==t&&e.changedTouches){for(let n=0;n(0,Me.IC)(e),r=(0,v.Pp)(e,n);o.useEffect((()=>{t.current&&!1===r&&(t.current.resolve(),t.current=void 0)}));return()=>{if(!t.current){if(!1===n())return Promise.resolve();t.current=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}()}return t.current}}function kr(e,t,n){const r={},o=e.current.rootElementRef.current;return o.classList.add(g._.autosizing),n.forEach((n=>{const o=(0,fn.m5)(e.current,n.field).map((e=>e.getBoundingClientRect().width??0)),i=t.includeOutliers?o:function(e,t){if(e.length<4)return e;const n=e.slice();n.sort(((e,t)=>e-t));const r=n[Math.floor(.25*n.length)],o=n[Math.floor(.75*n.length)-1],i=o-r,a=i<5?5:i*t;return n.filter((e=>e>r-a&&e(0,r.Z)({},e,{columnResize:{resizingColumnField:""}});function Mr(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const Tr=(e,t)=>{const n=(0,qe.V)(),i=pt(e,"useGridColumnResize"),a=(0,en.Z)(Mr).current,s=o.useRef(null),l=o.useRef(null),u=(0,$.Z)(),c=o.useRef(void 0),d=t=>{i.debug(`Updating width to ${t} for col ${a.colDef.field}`);const n=a.columnHeaderElement.offsetWidth,r=t-n,o=t-a.initialColWidth;if(o>0){const t=a.initialTotalWidth+o;e.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${t}px`)}a.colDef.computedWidth=t,a.colDef.width=t,a.colDef.flex=0,a.columnHeaderElement.style.width=`${t}px`;const s=a.headerFilterElement;s&&(s.style.width=`${t}px`),a.groupHeaderElements.forEach((e=>{const n=e;let o;o="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+r}px`,n.style.width=o})),a.cellElements.forEach((e=>{const n=e;let o;o="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+r}px`,n.style.setProperty("--width",o)}));const l=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,a.colDef.field);l===It.I.LEFT&&(Pr(a.fillerLeft,"width",r),a.leftPinnedCellsAfter.forEach((e=>{Pr(e,"left",r)})),a.leftPinnedHeadersAfter.forEach((e=>{Pr(e,"left",r)}))),l===It.I.RIGHT&&(Pr(a.fillerRight,"width",r),a.rightPinnedCellsBefore.forEach((e=>{Pr(e,"right",r)})),a.rightPinnedHeadersBefore.forEach((e=>{Pr(e,"right",r)})))},h=t=>{if(x(),a.previousMouseClickEvent){const n=a.previousMouseClickEvent,r=n.timeStamp,o=n.clientX,i=n.clientY;if(t.timeStamp-r<300&&t.clientX===o&&t.clientY===i)return a.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(a.colDef){e.current.setColumnWidth(a.colDef.field,a.colDef.width),i.debug(`Updating col ${a.colDef.field} with new width: ${a.colDef.width}`);const t=(0,O.wH)(e.current.state);a.groupHeaderElements.forEach((e=>{const n=e,r=`${(0,fn.R2)(e).reduce(((e,n)=>!1!==t.columnVisibilityModel[n]?e+t.lookup[n].computedWidth:e),0)}px`;n.style.width=r}))}u.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},p=(t,r,o)=>{const i=e.current.rootElementRef.current;a.initialColWidth=t.computedWidth,a.initialTotalWidth=e.current.getRootDimensions().rowWidth,a.colDef=t,a.columnHeaderElement=(0,fn.K5)(e.current.columnHeadersContainerRef.current,t.field);const u=i.querySelector(`.${g._.headerFilterRow} [data-field="${(0,fn.z6)(t.field)}"]`);u&&(a.headerFilterElement=u),a.groupHeaderElements=(0,fn.Y$)(e.current.columnHeadersContainerRef?.current,t.field),a.cellElements=(0,fn.oF)(a.columnHeaderElement,e.current),a.fillerLeft=(0,fn.mi)(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),a.fillerRight=(0,fn.mi)(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const c=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,a.colDef.field);a.leftPinnedCellsAfter=c!==It.I.LEFT?[]:(0,fn.z$)(e.current,a.columnHeaderElement,n),a.rightPinnedCellsBefore=c!==It.I.RIGHT?[]:(0,fn.JF)(e.current,a.columnHeaderElement,n),a.leftPinnedHeadersAfter=c!==It.I.LEFT?[]:(0,fn.bp)(e.current,a.columnHeaderElement,n),a.rightPinnedHeadersBefore=c!==It.I.RIGHT?[]:(0,fn.a9)(e.current,a.columnHeaderElement,n),l.current=function(e,t){const n=e.classList.contains(g._["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(n):n}(r,n),s.current=function(e,t,n){return"Left"===n?e-t.left:t.right-e}(o,a.columnHeaderElement.getBoundingClientRect(),l.current)},f=(0,B.Z)(h),m=(0,B.Z)((t=>{if(0===t.buttons)return void f(t);let n=wr(s.current,t.clientX,a.columnHeaderElement.getBoundingClientRect(),l.current);n=(0,Ke.uZ)(n,a.colDef.minWidth,a.colDef.maxWidth),d(n);const r={element:a.columnHeaderElement,colDef:a.colDef,width:n};e.current.publishEvent("columnResize",r,t)})),v=(0,B.Z)((e=>{xr(e,c.current)&&h(e)})),y=(0,B.Z)((t=>{const n=xr(t,c.current);if(!n)return;if("mousemove"===t.type&&0===t.buttons)return void v(t);let r=wr(s.current,n.x,a.columnHeaderElement.getBoundingClientRect(),l.current);r=(0,Ke.uZ)(r,a.colDef.minWidth,a.colDef.maxWidth),d(r);const o={element:a.columnHeaderElement,colDef:a.colDef,width:r};e.current.publishEvent("columnResize",o,t)})),b=(0,B.Z)((t=>{const n=(0,fn.w5)(t.target,g._["columnSeparator--resizable"]);if(!n)return;const r=t.changedTouches[0];null!=r&&(c.current=r.identifier);const o=(0,fn.w5)(t.target,g._.columnHeader),a=(0,fn.WI)(o),s=e.current.getColumn(a);i.debug(`Start Resize on col ${s.field}`),e.current.publishEvent("columnResizeStart",{field:a},t),p(s,n,r.clientX);const l=(0,Ut.Z)(t.currentTarget);l.addEventListener("touchmove",y),l.addEventListener("touchend",v)})),x=o.useCallback((()=>{const t=(0,Ut.Z)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",m),t.removeEventListener("mouseup",f),t.removeEventListener("touchmove",y),t.removeEventListener("touchend",v),setTimeout((()=>{t.removeEventListener("click",Sr,!0)}),100),a.columnHeaderElement&&(a.columnHeaderElement.style.pointerEvents="unset")}),[e,a,m,f,y,v]),w=o.useCallback((({field:t})=>{e.current.setState((e=>(0,r.Z)({},e,{columnResize:(0,r.Z)({},e.columnResize,{resizingColumnField:t})}))),e.current.forceUpdate()}),[e]),S=o.useCallback((()=>{e.current.setState((e=>(0,r.Z)({},e,{columnResize:(0,r.Z)({},e.columnResize,{resizingColumnField:""})}))),e.current.forceUpdate()}),[e]),C=(0,B.Z)((({colDef:t},n)=>{if(0!==n.button)return;if(!n.currentTarget.classList.contains(g._["columnSeparator--resizable"]))return;n.preventDefault(),i.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},n),p(t,n.currentTarget,n.clientX);const r=(0,Ut.Z)(e.current.rootElementRef.current);r.body.style.cursor="col-resize",a.previousMouseClickEvent=n.nativeEvent,r.addEventListener("mousemove",m),r.addEventListener("mouseup",f),r.addEventListener("click",Sr,!0)})),k=(0,B.Z)(((n,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const i=e.current.state.columns.lookup[n.field];!1!==i.resizable&&e.current.autosizeColumns((0,r.Z)({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[i.field]}))})),_=Cr(e),M=o.useRef(!1),T=o.useCallback((async n=>{const o=e.current.rootElementRef?.current;if(!o)return;if(M.current)return;M.current=!0;const i=(0,O.wH)(e.current.state),a=(0,r.Z)({},br,n,{columns:n?.columns??i.orderedFields});a.columns=a.columns.filter((e=>!1!==i.columnVisibilityModel[e]));const s=a.columns.map((t=>e.current.state.columns.lookup[t]));try{!t.disableVirtualization&&a.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await _());const n=kr(e,a,s),o=s.map((e=>(0,r.Z)({},e,{width:n[e.field],computedWidth:n[e.field],flex:0})));if(a.expand){const t=i.orderedFields.map((e=>i.lookup[e])).filter((e=>!1!==i.columnVisibilityModel[e.field])).reduce(((e,t)=>e+(n[t.field]??t.computedWidth??t.width)),0),r=e.current.getRootDimensions(),a=r.viewportInnerSize.width-t;if(a>0){const e=a/(o.length||1);o.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}e.current.updateColumns(o),o.forEach(((t,n)=>{if(t.width!==s[n].width){const n=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:n})}}))}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),M.current=!1}}),[e,_,t.disableVirtualization]);o.useEffect((()=>x),[x]),(0,Ie.Z)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),ft(e,(()=>e.current.columnHeadersContainerRef?.current),"touchstart",b,{passive:!0}),(0,Ye.h)(e,{autosizeColumns:T},"public"),(0,V.zn)(e,"columnResizeStop",S),(0,V.zn)(e,"columnResizeStart",w),(0,V.zn)(e,"columnSeparatorMouseDown",C),(0,V.zn)(e,"columnSeparatorDoubleClick",k),(0,V.x3)(e,"columnResize",t.onColumnResize),(0,V.x3)(e,"columnWidthChange",t.onColumnWidthChange)};function Pr(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function Rr(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const Ir=(e,t,n)=>{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},Dr={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Or={firstRowIndex:0,lastRowIndex:0},Ar=new Set([mt.e,"__reorder__",dn.u9]),Er=(e,t,n,o,i,a,s)=>{const l=a?{}:(0,r.Z)({},e.current.state.rowSpanning.spannedCells),u=a?{}:(0,r.Z)({},e.current.state.rowSpanning.hiddenCells),c=a?{}:(0,r.Z)({},e.current.state.rowSpanning.hiddenCellOriginMap);return a&&(s=Or),t.forEach((t=>{if(!Ar.has(t.field)){for(let r=i.firstRowIndex;r=o.firstRowIndex&&a&&Ir(a.model,t,e)===s;){const e=n[i+1];u[e.id]?u[e.id][t.field]=!0:u[e.id]={[t.field]:!0},f.push(r),p+=1,d=a.id,h=i,i-=1,a=n[i]}}f.forEach((e=>{c[e]?c[e][t.field]=h:c[e]={[t.field]:h}}));let m=r+1;for(;m<=o.lastRowIndex&&n[m]&&Ir(n[m].model,t,e)===s;){const e=n[m];u[e.id]?u[e.id][t.field]=!0:u[e.id]={[t.field]:!0},c[m]?c[m][t.field]=h:c[m]={[t.field]:h},m+=1,p+=1}p>0&&(l[d]?l[d][t.field]=p+1:l[d]={[t.field]:p+1})}s={firstRowIndex:Math.min(s.firstRowIndex,i.firstRowIndex),lastRowIndex:Math.max(s.lastRowIndex,i.lastRowIndex)}}})),{spannedCells:l,hiddenCells:u,hiddenCellOriginMap:c,processedRange:s}},Lr=(e,t)=>{const n=(0,Q.yM)(t).length;if(e.pagination){const e=(0,qt.B_)(t);let r=20;return e>0&&(r=e-1),{firstRowIndex:0,lastRowIndex:Math.min(r,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,n)}},Zr=(e,t,n)=>{if(!t.unstable_rowSpanning)return(0,r.Z)({},e,{rowSpanning:Dr});const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=Boolean(e.filter.filterModel.items.length)||Boolean(e.filter.filterModel.quickFilterValues?.length);if(!o.length||!i.length||!a||!s||l)return(0,r.Z)({},e,{rowSpanning:Dr});const u=Lr(t,n),c=o.map((e=>({id:e,model:a[e]}))),d=i.map((e=>s[e])),{spannedCells:h,hiddenCells:p,hiddenCellOriginMap:f}=Er(n,d,c,u,u,!0,Or);return(0,r.Z)({},e,{rowSpanning:{spannedCells:h,hiddenCells:p,hiddenCellOriginMap:f}})};new Set;const Fr=(e,t,n)=>(0,r.Z)({},e,{listViewColumn:t.unstable_listColumn?(0,r.Z)({},t.unstable_listColumn,{computedWidth:jr(n)}):void 0});function jr(e){return(0,z.jY)(e.current.state).viewportInnerSize.width}const Nr=(e,t)=>{const n=dt(e,t);return $n(n,t),(e=>{nn(e,lt,"rowTreeCreation",jn)})(n),ht(ct,n,t),ht(Bn,n,t),ht(Dt,n,t),ht(Fn,n,t),ht(wn,n,t),ht(En,n,t),ht(cn,n,t),ht(Wn,n,t),ht(Cn,n,t),ht(on,n,t),ht(Zr,n,t),ht(At,n,t),ht(_r,n,t),ht(Mt,n,t),ht(vr,n,t),ht(yr.Nn,n,t),ht(Jn,n,t),ht(lr,n,t),ht(Fr,n,t),xn(n,t),Vn(n,t),function(e,t){const n=pt(e,"useGridColumns"),i=o.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:O.g0,changeEvent:"columnVisibilityModelChange"});const a=o.useCallback((t=>{n.debug("Updating columns state."),e.current.setState(Ot(t)),e.current.publishEvent("columnsChange",t.orderedFields),e.current.updateRenderContext?.(),e.current.forceUpdate()}),[n,e]),s=o.useCallback((t=>(0,O.WH)(e)[t]),[e]),l=o.useCallback((()=>(0,O.d$)(e)),[e]),u=o.useCallback((()=>(0,O.FE)(e)),[e]),c=o.useCallback(((t,n=!0)=>(n?(0,O.FE)(e):(0,O.d$)(e)).findIndex((e=>e.field===t))),[e]),d=o.useCallback((t=>{const n=c(t);return(0,O.Ag)(e)[n]}),[e,c]),h=o.useCallback((t=>{(0,O.g0)(e)!==t&&(e.current.setState((n=>(0,r.Z)({},n,{columns:(0,H.QC)({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.updateRenderContext?.(),e.current.forceUpdate())}),[e]),p=o.useCallback((t=>{const n=(0,H.QC)({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1});a(n)}),[e,a]),f=o.useCallback(((t,n)=>{const o=(0,O.g0)(e);if(n!==(o[t]??!0)){const i=(0,r.Z)({},o,{[t]:n});e.current.setColumnVisibilityModel(i)}}),[e]),m=o.useCallback((t=>(0,O.Zi)(e).findIndex((e=>e===t))),[e]),g=o.useCallback(((t,o)=>{const i=(0,O.Zi)(e),s=m(t);if(s===o)return;n.debug(`Moving column ${t} to index ${o}`);const l=[...i],u=l.splice(s,1)[0];l.splice(o,0,u),a((0,r.Z)({},(0,O.wH)(e.current.state),{orderedFields:l}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:s};e.current.publishEvent("columnIndexChange",c)}),[e,n,a,m]),v=o.useCallback(((t,o)=>{n.debug(`Updating column ${t} width to ${o}`);const i=(0,O.wH)(e.current.state),s=i.lookup[t],l=(0,r.Z)({},s,{width:o,hasBeenResized:!0});a((0,H.eH)((0,r.Z)({},i,{lookup:(0,r.Z)({},i.lookup,{[t]:l})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:l,width:o})}),[e,n,a]),y={getColumn:s,getAllColumns:l,getColumnIndex:c,getColumnPosition:d,getVisibleColumns:u,getColumnIndexRelativeToVisibleColumns:m,updateColumns:p,setColumnVisibilityModel:h,setColumnVisibility:f,setColumnWidth:v},b={setColumnIndex:g};(0,Ye.h)(e,y,"public"),(0,Ye.h)(e,b,t.signature===V.cG.DataGrid?"private":"public");const x=o.useCallback(((n,o)=>{const i={},a=(0,O.g0)(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(t.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(a).length>0)&&(i.columnVisibilityModel=a),i.orderedFields=(0,O.Zi)(e);const s=(0,O.d$)(e),l={};return s.forEach((e=>{if(e.hasBeenResized){const t={};H.VU.forEach((n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r})),l[e.field]=t}})),Object.keys(l).length>0&&(i.dimensions=l),(0,r.Z)({},n,{columns:i})}),[e,t.columnVisibilityModel,t.initialState?.columns]),w=o.useCallback(((t,n)=>{const r=n.stateToRestore.columns?.columnVisibilityModel,o=n.stateToRestore.columns;if(null==r&&null==o)return t;const i=(0,H.QC)({apiRef:e,columnsToUpsert:[],initialState:o,columnVisibilityModel:r,keepOnlyColumnsToUpsert:!1});return e.current.setState(Ot(i)),null!=o&&e.current.publishEvent("columnsChange",i.orderedFields),t}),[e]),S=o.useCallback(((e,n)=>{if(n===E.y.columns){const e=t.slots.columnsPanel;return(0,Z.jsx)(e,(0,r.Z)({},t.slotProps?.columnsPanel))}return e}),[t.slots.columnsPanel,t.slotProps?.columnsPanel]),C=o.useCallback((e=>t.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[t.disableColumnSelector]);Pt(e,"columnMenu",C),Pt(e,"exportState",x),Pt(e,"restoreState",w),Pt(e,"preferencePanel",S);const k=o.useRef(null);(0,V.zn)(e,"viewportInnerSizeChange",(t=>{if(k.current!==t.width){if(k.current=t.width,!(0,O.FE)(e).some((e=>e.flex&&e.flex>0)))return;a((0,H.eH)((0,O.wH)(e.current.state),e.current.getRootDimensions()))}}));const _=o.useCallback((()=>{n.info("Columns pipe processing have changed, regenerating the columns");const t=(0,H.QC)({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});a(t)}),[e,n,a]);Rt(e,"hydrateColumns",_);const M=o.useRef(!0);o.useEffect((()=>{if(M.current)return void(M.current=!1);if(n.info(`GridColumns have changed, new length ${t.columns.length}`),i.current===t.columns)return;const r=(0,H.QC)({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});i.current=t.columns,a(r)}),[n,e,a,t.columns]),o.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,n,t.columnVisibilityModel])}(n,t),((e,t)=>{const n=pt(e,"useGridRows"),i=o.useRef(Date.now()),a=o.useRef(t.rowCount),s=(0,$.Z)(),l=o.useCallback((t=>{const n=(0,Q.J4)(e)[t];if(n)return n;const r=e.current.getRowNode(t);return r&&(0,J.I7)(r)?{[J._1]:t}:null}),[e]),u=o.useCallback((t=>(0,Zn.X)(e.current.state,t)),[e]),c=o.useCallback((({cache:n,throttle:o})=>{const a=()=>{i.current=Date.now(),e.current.setState((n=>(0,r.Z)({},n,{rows:(0,J.IX)({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,Q.Kd)(e),previousTreeDepths:(0,Q.i$)(e),previousGroupsToFetch:(0,Q.GG)(e)})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(s.clear(),e.current.caches.rows=n,!o)return void a();const l=t.throttleRowsMs-(Date.now()-i.current);l>0?s.start(l,a):a()}),[t.throttleRowsMs,t.rowCount,t.loading,e,s]),d=o.useCallback((r=>{n.debug(`Updating all rows, new length ${r.length}`);const o=(0,J.PO)({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),i=e.current.caches.rows;o.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,c({cache:o,throttle:!0})}),[n,t.getRowId,t.loading,t.rowCount,c,e]),h=o.useCallback((n=>{if(t.signature===V.cG.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const r=(0,J.Wj)(e,n,t.getRowId),o=(0,J.vn)({updates:r,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:o,throttle:!0})}),[t.signature,t.getRowId,c,e]),p=o.useCallback(((n,r)=>{const o=(0,J.Wj)(e,n,t.getRowId),i=(0,J.vn)({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:r??[]});c({cache:i,throttle:!1})}),[t.getRowId,c,e]),f=o.useCallback((o=>{o!==t.loading&&(n.debug(`Setting loading to ${o}`),e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{loading:o})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=o)}),[t.loading,e,n]),m=o.useCallback((()=>{const t=(0,Q.yM)(e),n=(0,Q.J4)(e);return new Map(t.map((e=>[e,n[e]??{}])))}),[e]),g=o.useCallback((()=>(0,Q.hh)(e)),[e]),v=o.useCallback((()=>(0,Q.yM)(e)),[e]),y=o.useCallback((t=>{const n=e.current.getRow(t),{rowToIndexMap:r}=(0,un.j)(e);return r.get(n)}),[e]),b=o.useCallback(((t,n)=>{const o=e.current.getRowNode(t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==o.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const i=(0,r.Z)({},o,{childrenExpanded:n});e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{tree:(0,r.Z)({},e.rows.tree,{[t]:i})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",i)}),[e]),x=o.useCallback((t=>(0,Q.Kd)(e)[t]??null),[e]),w=o.useCallback((({skipAutoGeneratedRows:t=!0,groupId:n,applySorting:r,applyFiltering:o})=>{const i=(0,Q.Kd)(e);let a;if(r){const r=i[n];if(!r)return[];const o=(0,oe.aV)(e);a=[];for(let e=o.findIndex((e=>e===n))+1;er.depth;e+=1){const n=o[e];t&&(0,J.I7)(i[n])||a.push(n)}}else a=(0,J.u4)(i,n,t);if(o){const t=(0,X._g)(e);a=a.filter((e=>!1!==t[e]))}return a}),[e]),S=o.useCallback(((t,o)=>{const i=e.current.getRowNode(t);if(!i)throw new Error(`MUI X: No row with id #${t} found.`);if(i.parent!==J.U5)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==i.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState((i=>{const a=(0,Q.Kd)(i,e.current.instanceId)[J.U5],s=a.children,l=s.findIndex((e=>e===t));if(-1===l||l===o)return i;n.debug(`Moving row ${t} to index ${o}`);const u=[...s];return u.splice(o,0,u.splice(l,1)[0]),(0,r.Z)({},i,{rows:(0,r.Z)({},i.rows,{tree:(0,r.Z)({},i.rows.tree,{[J.U5]:(0,r.Z)({},a,{children:u})})})})})),e.current.publishEvent("rowsSet")}),[e,n]),C={getRow:l,setLoading:f,getRowId:u,getRowModels:m,getRowsCount:g,getAllRowIds:v,setRows:d,updateRows:h,getRowNode:x,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:o.useCallback(((n,o)=>{if(t.signature===V.cG.DataGrid&&o.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if((0,Q.Lq)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const i=(0,r.Z)({},(0,Q.Kd)(e)),a=(0,r.Z)({},(0,Q.J4)(e)),s=(0,r.Z)({},(0,Q.Qr)(e)),l=i[J.U5],u=[...l.children],c=new Set;for(let e=0;e"leaf"===i[e]?.type));e.current.caches.rows.dataRowIdToModelLookup=a,e.current.caches.rows.dataRowIdToIdLookup=s,e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,dataRowIds:d,tree:i})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},k={setRowIndex:S,setRowChildrenExpansion:b,getRowGroupChildren:w},_={updateServerRows:p},M=o.useCallback((()=>{let o;n.info("Row grouping pre-processing have changed, regenerating the row tree"),o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,r.Z)({},e.current.caches.rows,{updates:{type:"full",rows:(0,Q.yM)(e)}}):(0,J.PO)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:o,throttle:!1})}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),T=(0,en.Z)((()=>t.unstable_dataSource)),P=o.useCallback((e=>{t.unstable_dataSource&&t.unstable_dataSource!==T.current?T.current=t.unstable_dataSource:"rowTreeCreation"===e&&M()}),[M,T,t.unstable_dataSource]),R=o.useCallback((()=>{e.current.getActiveStrategy("rowTree")!==(0,Q.Le)(e)&&M()}),[e,M]);(0,V.zn)(e,"activeStrategyProcessorChange",P),(0,V.zn)(e,"strategyAvailabilityChange",R);const I=o.useCallback((()=>{e.current.setState((n=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,Q.Kd)(n,e.current.instanceId),treeDepths:(0,Q.i$)(n,e.current.instanceId),dataRowIds:(0,Q.yM)(n,e.current.instanceId),dataRowIdToModelLookup:(0,Q.J4)(n,e.current.instanceId),dataRowIdToIdLookup:(0,Q.Qr)(n,e.current.instanceId)});return(0,r.Z)({},n,{rows:(0,r.Z)({},n.rows,o,{totalTopLevelRowCount:(0,J.ZD)({tree:o.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e,t.rowCount]);Rt(e,"hydrateRows",I),(0,Ye.h)(e,C,"public"),(0,Ye.h)(e,k,t.signature===V.cG.DataGrid?"private":"public"),(0,Ye.h)(e,_,"private");const D=o.useRef(!0);o.useEffect((()=>{if(D.current)return void(D.current=!1);let o=!1;t.rowCount!==a.current&&(o=!0,a.current=t.rowCount);const i=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,s=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,l=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;i&&(s||(e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),l||(e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!o)||(n.debug(`Updating all rows, new length ${t.rows?.length}`),c({cache:(0,J.PO)({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])})(n,t),((e,t)=>{const n=(0,en.Z)((()=>e.current.state.rowSpanning!==Dr?Lr(t,e):Or)),i=o.useCallback(((o,i=!1)=>{const{range:a,rows:s}=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(null===a||!Rr(o))return;i&&(n.current=Or);const l=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex(0,r.Z)({},e,{rowSpanning:{spannedCells:c,hiddenCells:d,hiddenCellOriginMap:h}})))}),[e,n,t.pagination,t.paginationMode]),a=o.useCallback((()=>{const t=(0,Me.r8)(e);Rr(t)&&i(t,!0)}),[e,i]);(0,V.zn)(e,"renderedRowsIntervalChange",(0,Ke.d$)(t.unstable_rowSpanning,i)),(0,V.zn)(e,"sortedRowsSet",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"paginationModelChange",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"filteredRowsSet",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"columnsChange",(0,Ke.d$)(t.unstable_rowSpanning,a)),o.useEffect((()=>{t.unstable_rowSpanning?e.current.state.rowSpanning===Dr&&a():e.current.state.rowSpanning!==Dr&&e.current.setState((e=>(0,r.Z)({},e,{rowSpanning:Dr})))}),[e,a,t.unstable_rowSpanning])})(n,t),function(e,t){const n=o.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),r=o.useCallback((t=>{const n=e.current.getRow(t);if(!n)throw new Nn(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n}}),[e]),i=o.useCallback(((t,n,r,{cellMode:o,colDef:i,hasFocus:a,rowNode:s,tabIndex:l})=>{const u=r[n],c=i?.valueGetter?i.valueGetter(u,r,i,e):u,d={id:t,field:n,row:r,rowNode:s,colDef:i,cellMode:o,hasFocus:a,tabIndex:l,value:c,formattedValue:c,isEditable:!1,api:null};return i&&i.valueFormatter&&(d.formattedValue=i.valueFormatter(c,r,i,e)),d.isEditable=i&&e.current.isCellEditable(d),d}),[e]),a=o.useCallback(((n,r)=>{const o=e.current.getRow(n),i=e.current.getRowNode(n);if(!o||!i)throw new Nn(`No row with id #${n} found`);const a=(0,ie.TR)(e),s=(0,ie.d6)(e),l=e.current.getCellMode(n,r);return e.current.getCellParamsForRow(n,r,o,{colDef:t.unstable_listView&&t.unstable_listColumn?.field===r?(0,yn.z)(e.current.state):e.current.getColumn(r),rowNode:i,hasFocus:null!==a&&a.field===r&&a.id===n,tabIndex:s&&s.field===r&&s.id===n?0:-1,cellMode:l})}),[e,t.unstable_listView,t.unstable_listColumn?.field]),s=o.useCallback(((t,n)=>{const r=e.current.getColumn(n),o=e.current.getRow(t);if(!o)throw new Nn(`No row with id #${t} found`);return r&&r.valueGetter?r.valueGetter(o[r.field],o,r,e):o[n]}),[e]),l=o.useCallback(((t,n)=>{const r=n.field;if(!n||!n.valueGetter)return t[r];const o=t[n.field];return n.valueGetter(o,t,n,e)}),[e]),u=o.useCallback(((t,n)=>{const r=l(t,n);return n&&n.valueFormatter?n.valueFormatter(r,t,n,e):r}),[e,l]),c=o.useCallback((t=>e.current.rootElementRef.current?(0,fn.qk)(e.current.rootElementRef.current,t):null),[e]),d=o.useCallback((t=>e.current.rootElementRef.current?(0,fn.Q6)(e.current.rootElementRef.current,t):null),[e]),h={getCellValue:s,getCellParams:a,getCellElement:o.useCallback(((t,n)=>e.current.rootElementRef.current?(0,fn.ct)(e.current.rootElementRef.current,{id:t,field:n}):null),[e]),getRowValue:l,getRowFormattedValue:u,getRowParams:r,getRowElement:d,getColumnHeaderParams:n,getColumnHeaderElement:c},p={getCellParamsForRow:i};(0,Ye.h)(e,h,"public"),(0,Ye.h)(e,p,"private")}(n,t),(e=>{const t=o.useRef({}),n=()=>{t.current={}},r={unstable_getCellColSpanInfo:(e,n)=>t.current[e]?.[n]},i={resetColSpan:n,calculateColSpan:o.useCallback((({rowId:n,minFirstColumn:r,maxLastColumn:o,columns:i})=>{for(let a=r;a1&&(a+=s.colSpan-1)}}),[e])};(0,Ye.h)(e,r,"public"),(0,Ye.h)(e,i,"private"),(0,V.zn)(e,"columnOrderChange",n)})(n),((e,t)=>{const n={getColumnGroupPath:o.useCallback((t=>(0,ae.Cv)(e)[t]??[]),[e]),getAllGroupDetails:o.useCallback((()=>(0,ae.XS)(e)),[e])};(0,Ye.h)(e,n,"public");const i=o.useCallback((()=>{const n=pr(t.columnGroupingModel??[]);e.current.setState((e=>{const t=e.columns?.orderedFields??[],o=e.pinnedColumns??{},i=fr(t,n,o);return(0,r.Z)({},e,{columnGrouping:(0,r.Z)({},e.columnGrouping,{headerStructure:i})})}))}),[e,t.columnGroupingModel]),a=o.useCallback((t=>{const n=e.current.getPinnedColumns?.()??{},o=(0,O.Zi)(e),i=(0,O.pK)(e),a=gr(t??[]),s=pr(t??[]),l=fr(o,s,n),u=0===i.length?0:Math.max(...i.map((e=>s[e]?.length??0)));e.current.setState((e=>(0,r.Z)({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:s,headerStructure:l,maxDepth:u}})))}),[e]);(0,V.zn)(e,"columnIndexChange",i),(0,V.zn)(e,"columnsChange",(()=>{a(t.columnGroupingModel)})),(0,V.zn)(e,"columnVisibilityModelChange",(()=>{a(t.columnGroupingModel)})),o.useEffect((()=>{a(t.columnGroupingModel)}),[a,t.columnGroupingModel])})(n,t),Ln(n,t),((e,t)=>{const n=pt(e,"useGridFocus"),i=o.useRef(null),a=null!==e.current.rootElementRef.current,s=o.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),l=o.useCallback(((t,o)=>{const i=(0,ie.TR)(e);i?.id===t&&i?.field===o||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${o}`),(0,r.Z)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(i&&s(i,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))}),[e,n,s]),u=o.useCallback(((t,o={})=>{const i=(0,ie.TR)(e);s(i,o),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),(0,r.Z)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,s]),c=o.useCallback(((t,o={})=>{const i=(0,ie.TR)(e);s(i,o),e.current.setState((e=>(n.debug(`Focusing on column header filter with colIndex=${t}`),(0,r.Z)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,s]),d=o.useCallback(((t,n,o={})=>{const i=(0,ie.TR)(e);i&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(i.id,i.field),o),e.current.setState((e=>(0,r.Z)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))),e.current.forceUpdate()}),[e]),h=o.useCallback((()=>(0,ie.jC)(e)),[e]),p=o.useCallback(((n,r,o)=>{let i=e.current.getColumnIndex(r);const a=(0,O.FE)(e),s=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode}),l=(0,Q.Kf)(e),u=[].concat(l.top||[],s.rows,l.bottom||[]);let c=u.findIndex((e=>e.id===n));"right"===o?i+=1:"left"===o?i-=1:c+=1,i>=a.length?(c+=1,c=0&&(i=a.length-1)),c=(0,Ke.uZ)(c,0,u.length-1);const d=u[c];if(!d)return;const h=e.current.unstable_getCellColSpanInfo(d.id,i);h&&h.spannedByColSpan&&("left"===o||"below"===o?i=h.leftVisibleCellIndex:"right"===o&&(i=h.rightVisibleCellIndex)),i=(0,Ke.uZ)(i,0,a.length-1);const p=a[i];e.current.setCellFocus(d.id,p.field)}),[e,t.pagination,t.paginationMode]),f=o.useCallback((({id:t,field:n})=>{e.current.setCellFocus(t,n)}),[e]),m=o.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||wt(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),v=o.useCallback((({field:t},n)=>{n.target===n.currentTarget&&e.current.setColumnHeaderFocus(t,n)}),[e]),y=o.useCallback((({fields:t,depth:n},r)=>{if(r.target!==r.currentTarget)return;const o=(0,ie.jC)(e);null!==o&&o.depth===n&&t.includes(o.field)||e.current.setColumnGroupHeaderFocus(t[0],n,r)}),[e]),b=o.useCallback(((t,o)=>{o.relatedTarget?.getAttribute("class")?.includes(g._.columnHeader)||(n.debug("Clearing focus"),e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[n,e]),x=o.useCallback((e=>{i.current=e}),[]),w=o.useCallback((t=>{const n=i.current;i.current=null;const o=(0,ie.TR)(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:n}))return;if(!o)return void(n&&e.current.setCellFocus(n.id,n.field));if(n?.id===o.id&&n?.field===o.field)return;const a=e.current.getCellElement(o.id,o.field);a?.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),s(o,t)))}),[e,s]),S=o.useCallback((t=>{if("view"===t.cellMode)return;const n=(0,ie.TR)(e);n?.id===t.id&&n?.field===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),C=o.useCallback((()=>{const n=(0,ie.TR)(e);if(n&&!e.current.getRow(n.id)){const o=n.id;let i=null;if(void 0!==o){const n=e.current.getRowElement(o),r=n?.dataset.rowindex?Number(n?.dataset.rowindex):0,a=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode}),s=a.rows[(0,Ke.uZ)(r,0,a.rows.length-1)];i=s?.id??null}e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null===i?null:{id:i,field:n.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}}),[e,t.pagination,t.paginationMode]),k=(0,B.Z)((()=>{const n=(0,ie.TR)(e);if(!n)return;const o=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(o.rows.find((e=>e.id===n.id)))return;const i=(0,O.FE)(e);e.current.setState((e=>(0,r.Z)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))})),_={setCellFocus:l,setColumnHeaderFocus:u,setColumnHeaderFilterFocus:c},M={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:d,getColumnGroupHeaderFocus:h};(0,Ye.h)(e,_,"public"),(0,Ye.h)(e,M,"private"),o.useEffect((()=>{const t=(0,Ut.Z)(e.current.rootElementRef.current);return t.addEventListener("mouseup",w),()=>{t.removeEventListener("mouseup",w)}}),[e,a,w]),(0,V.zn)(e,"columnHeaderBlur",b),(0,V.zn)(e,"cellDoubleClick",f),(0,V.zn)(e,"cellMouseDown",x),(0,V.zn)(e,"cellKeyDown",m),(0,V.zn)(e,"cellModeChange",S),(0,V.zn)(e,"columnHeaderFocus",v),(0,V.zn)(e,"columnGroupHeaderFocus",y),(0,V.zn)(e,"rowsSet",C),(0,V.zn)(e,"paginationModelChange",k)})(n,t),((e,t)=>{const n=pt(e,"useGridPreferencesPanel"),i=o.useCallback((()=>{e.current.setState((t=>{if(!t.preferencePanel.open)return t;n.debug("Hiding Preferences Panel");const o=(0,A.e)(t);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:o.openedPanelValue}),(0,r.Z)({},t,{preferencePanel:{open:!1}})}))}),[e,n]),a=o.useCallback(((t,o,i)=>{n.debug("Opening Preferences Panel"),e.current.setState((e=>(0,r.Z)({},e,{preferencePanel:(0,r.Z)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:o,labelId:i})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})}),[n,e]);(0,Ye.h)(e,{showPreferences:a,hidePreferences:i},"public");const s=o.useCallback(((n,o)=>{const i=(0,A.e)(e.current.state);return!o.exportOnlyDirtyModels||null!=t.initialState?.preferencePanel||i.open?(0,r.Z)({},n,{preferencePanel:i}):n}),[e,t.initialState?.preferencePanel]),l=o.useCallback(((t,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&e.current.setState((e=>(0,r.Z)({},e,{preferencePanel:o}))),t}),[e]);Pt(e,"exportState",s),Pt(e,"restoreState",l)})(n,t),((e,t)=>{const n=pt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:X.uf,changeEvent:"filterModelChange"});const i=o.useCallback((()=>{e.current.setState((t=>{const n=(0,X.uf)(t,e.current.instanceId),o=e.current.getFilterState(n),i=(0,r.Z)({},t,{filter:(0,r.Z)({},t.filter,o)}),a=sn(e,i);return(0,r.Z)({},i,{visibleRowsLookup:a})})),e.current.publishEvent("filteredRowsSet")}),[e]),a=o.useCallback(((e,n)=>null==n||!1===n.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),s=o.useCallback((()=>{i(),e.current.forceUpdate()}),[e,i]),l=o.useCallback((t=>{const n=(0,X.uf)(e),o=[...n.items],i=o.findIndex((e=>e.id===t.id));-1===i?o.push(t):o[i]=t,e.current.setFilterModel((0,r.Z)({},n,{items:o}),"upsertFilterItem")}),[e]),u=o.useCallback((t=>{const n=(0,X.uf)(e),o=[...n.items];t.forEach((e=>{const t=o.findIndex((t=>t.id===e.id));-1===t?o.push(e):o[t]=e})),e.current.setFilterModel((0,r.Z)({},n,{items:o}),"upsertFilterItems")}),[e]),c=o.useCallback((t=>{const n=(0,X.uf)(e),o=n.items.filter((e=>e.id!==t.id));o.length!==n.items.length&&e.current.setFilterModel((0,r.Z)({},n,{items:o}),"deleteFilterItem")}),[e]),d=o.useCallback(((o,i,a)=>{if(n.debug("Displaying filter panel"),o){const n=(0,X.uf)(e),i=n.items.filter((t=>{if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const n=e.current.getColumn(t.field),r=n.filterOperators?.find((e=>e.value===t.operator));return!(void 0===r?.requiresFilterValue||r?.requiresFilterValue)}));let a;const s=i.find((e=>e.field===o)),l=e.current.getColumn(o);a=s?i:t.disableMultipleColumnsFiltering?[(0,rn.p3)({field:o,operator:l.filterOperators[0].value},e)]:[...i,(0,rn.p3)({field:o,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,r.Z)({},n,{items:a}))}e.current.showPreferences(E.y.filters,i,a)}),[e,n,t.disableMultipleColumnsFiltering]),h=o.useCallback((()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,n]),p=o.useCallback((t=>{const n=(0,X.uf)(e);n.logicOperator!==t&&e.current.setFilterModel((0,r.Z)({},n,{logicOperator:t}),"changeLogicOperator")}),[e]),f=o.useCallback((t=>{const n=(0,X.uf)(e);(0,Ke.xb)(n.quickFilterValues,t)||e.current.setFilterModel((0,r.Z)({},n,{quickFilterValues:[...t]}))}),[e]),m=o.useCallback(((r,o)=>{(0,X.uf)(e)!==r&&(n.debug("Setting filter model"),e.current.updateControlState("filter",(0,rn.S)(r,t.disableMultipleColumnsFiltering,e),o),e.current.unstable_applyFilters())}),[e,n,t.disableMultipleColumnsFiltering]),g=o.useCallback((n=>{const o=(0,rn.NF)(n,t.disableMultipleColumnsFiltering,e),i="client"===t.filterMode?(0,rn.tY)(o,e,t.disableEval):null,a=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:o??(0,tn.c)()});return(0,r.Z)({},a,{filterModel:o})}),[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),v={setFilterLogicOperator:p,unstable_applyFilters:s,deleteFilterItem:c,upsertFilterItem:l,upsertFilterItems:u,setFilterModel:m,showFilterPanel:d,hideFilterPanel:h,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:g};(0,Ye.h)(e,v,"public");const y=o.useCallback(((n,o)=>{const i=(0,X.uf)(e);return o.exportOnlyDirtyModels&&null==t.filterModel&&null==t.initialState?.filter?.filterModel&&(0,Ke.xb)(i,(0,tn.c)())?n:(0,r.Z)({},n,{filter:{filterModel:i}})}),[e,t.filterModel,t.initialState?.filter?.filterModel]),b=o.useCallback(((n,o)=>{const i=o.stateToRestore.filter?.filterModel;return null==i?n:(e.current.updateControlState("filter",(0,rn.S)(i,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,r.Z)({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),x=o.useCallback(((e,n)=>{if(n===E.y.filters){const e=t.slots.filterPanel;return(0,Z.jsx)(e,(0,r.Z)({},t.slotProps?.filterPanel))}return e}),[t.slots.filterPanel,t.slotProps?.filterPanel]),{getRowId:w}=t,S=(0,en.Z)(ln),C=o.useCallback((n=>{if("client"!==t.filterMode||!n.isRowMatchingFilters||!n.filterModel.items.length&&!n.filterModel.quickFilterValues?.length)return tn.R;const r=(0,Q.J4)(e),o={},{isRowMatchingFilters:i}=n,a={},s={passingFilterItems:null,passingQuickFilterValues:null},l=S.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t{n.debug("onColUpdated - GridColumns changed, applying filters");const t=(0,X.uf)(e),o=(0,O.WH)(e),i=t.items.filter((e=>e.field&&o[e.field]));i.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),M=o.useCallback((()=>{e.current.setState((t=>(0,r.Z)({},t,{visibleRowsLookup:sn(e,t)}))),e.current.forceUpdate()}),[e]);(0,V.zn)(e,"rowsSet",i),(0,V.zn)(e,"columnsChange",k),(0,V.zn)(e,"activeStrategyProcessorChange",_),(0,V.zn)(e,"rowExpansionChange",M),(0,V.zn)(e,"columnVisibilityModelChange",(()=>{const t=(0,X.uf)(e);t.quickFilterValues&&(0,rn.Tv)(t)&&e.current.unstable_applyFilters()})),Tt((()=>{e.current.unstable_applyFilters()})),(0,Jt.Z)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,n,t.filterModel])})(n,t),((e,t)=>{const n=pt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:oe.Gm,changeEvent:"sortModelChange"});const i=o.useCallback(((t,n)=>{const r=(0,oe.Gm)(e),o=r.findIndex((e=>e.field===t));let i=[...r];return o>-1?null==n?.sort?i.splice(o,1):i.splice(o,1,n):i=[...r,n],i}),[e]),a=o.useCallback(((n,o)=>{const i=(0,oe.Gm)(e).find((e=>e.field===n.field));if(i){const e=void 0===o?(0,Hn.vY)(n.sortingOrder??t.sortingOrder,i.sort):o;return void 0===e?void 0:(0,r.Z)({},i,{sort:e})}return{field:n.field,sort:void 0===o?(0,Hn.vY)(n.sortingOrder??t.sortingOrder):o}}),[e,t.sortingOrder]),s=o.useCallback(((e,n)=>null==n||!1===n.sortable||t.disableColumnSorting?e:(n.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder,t.disableColumnSorting]),l=o.useCallback((()=>{e.current.setState((o=>{if("server"===t.sortingMode)return n.debug("Skipping sorting rows as sortingMode = server"),(0,r.Z)({},o,{sorting:(0,r.Z)({},o.sorting,{sortedRows:(0,J.u4)((0,Q.Kd)(e),J.U5,!1)})});const i=(0,oe.Gm)(o,e.current.instanceId),a=(0,Hn.oX)(i,e),s=e.current.applyStrategyProcessor("sorting",{sortRowList:a});return(0,r.Z)({},o,{sorting:(0,r.Z)({},o.sorting,{sortedRows:s})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,n,t.sortingMode]),u=o.useCallback((r=>{(0,oe.Gm)(e)!==r&&(n.debug("Setting sort model"),e.current.setState((0,Hn.E8)(r,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,n,t.disableMultipleColumnsSorting]),c=o.useCallback(((n,r,o)=>{const s=e.current.getColumn(n),l=a(s,r);let u;u=!o||t.disableMultipleColumnsSorting?null==l?.sort?[]:[l]:i(s.field,l),e.current.setSortModel(u)}),[e,i,a,t.disableMultipleColumnsSorting]),d={getSortModel:o.useCallback((()=>(0,oe.Gm)(e)),[e]),getSortedRows:o.useCallback((()=>(0,oe.sX)(e).map((e=>e.model))),[e]),getSortedRowIds:o.useCallback((()=>(0,oe.aV)(e)),[e]),getRowIdFromRowIndex:o.useCallback((t=>e.current.getSortedRowIds()[t]),[e]),setSortModel:u,sortColumn:c,applySorting:l};(0,Ye.h)(e,d,"public");const h=o.useCallback(((n,o)=>{const i=(0,oe.Gm)(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=t.initialState?.sorting?.sortModel||i.length>0?(0,r.Z)({},n,{sorting:{sortModel:i}}):n}),[e,t.sortModel,t.initialState?.sorting?.sortModel]),p=o.useCallback(((n,o)=>{const i=o.stateToRestore.sorting?.sortModel;return null==i?n:(e.current.setState((0,Hn.E8)(i,t.disableMultipleColumnsSorting)),(0,r.Z)({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),f=o.useCallback((t=>{const n=(0,Q.Kd)(e),r=n[J.U5],o=t.sortRowList?t.sortRowList(r.children.map((e=>n[e]))):[...r.children];return null!=r.footerId&&o.push(r.footerId),o}),[e]);Pt(e,"exportState",h),Pt(e,"restoreState",p),nn(e,lt,"sorting",f);const m=o.useCallback((({field:e,colDef:n},r)=>{if(!n.sortable||t.disableColumnSorting)return;const o=r.shiftKey||r.metaKey||r.ctrlKey;c(e,void 0,o)}),[c,t.disableColumnSorting]),g=o.useCallback((({field:e,colDef:n},r)=>{n.sortable&&!t.disableColumnSorting&&("Enter"!==r.key||r.ctrlKey||r.metaKey||c(e,void 0,r.shiftKey))}),[c,t.disableColumnSorting]),v=o.useCallback((()=>{const t=(0,oe.Gm)(e),n=(0,O.WH)(e);if(t.length>0){const r=t.filter((e=>n[e.field]));r.length{"sorting"===t&&e.current.applySorting()}),[e]);Pt(e,"columnMenu",s),(0,V.zn)(e,"columnHeaderClick",m),(0,V.zn)(e,"columnHeaderKeyDown",g),(0,V.zn)(e,"rowsSet",e.current.applySorting),(0,V.zn)(e,"columnsChange",v),(0,V.zn)(e,"activeStrategyProcessorChange",y),Tt((()=>{e.current.applySorting()})),(0,Jt.Z)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(n,t),((e,t)=>{const n=pt(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:T.EH,changeEvent:"densityChange"});const i={setDensity:(0,B.Z)((t=>{(0,T.EH)(e.current.state)!==t&&(n.debug(`Set grid density to ${t}`),e.current.setState((e=>(0,r.Z)({},e,{density:t}))))}))};(0,Ye.h)(e,i,"public");const a=o.useCallback(((n,o)=>{const i=(0,T.EH)(e.current.state);return o.exportOnlyDirtyModels&&null==t.density&&null==t.initialState?.density?n:(0,r.Z)({},n,{density:i})}),[e,t.density,t.initialState?.density]),s=o.useCallback(((t,n)=>{const o=n.stateToRestore?.density?n.stateToRestore.density:(0,T.EH)(e.current.state);return e.current.setState((e=>(0,r.Z)({},e,{density:o}))),t}),[e]);Pt(e,"exportState",a),Pt(e,"restoreState",s),o.useEffect((()=>{t.density&&e.current.setDensity(t.density)}),[e,t.density])})(n,t),Tr(n,t),Sn(n,t),((e,t)=>{const{getRowHeight:n,getRowSpacing:i,getEstimatedRowHeight:a}=t,s=e.current.caches.rowsMeta.heights,l=o.useRef(-1),u=o.useRef(!1),c=o.useRef(!1),d=(0,v.Pp)(e,T.CD),h=(0,un.y)(e,t),p=(0,v.Pp)(e,Q.Kf),f=(0,v.Pp)(e,z.E$),m=o.useCallback((t=>{const o=(0,z.jY)(e.current.state).rowHeight;(0,Ke.eV)(f);const s=e.current.getRowHeightEntry(t.id);if(n){const e=n((0,r.Z)({},t,{densityFactor:d}));if("auto"===e){if(s.needsFirstMeasurement){const e=a?a((0,r.Z)({},t,{densityFactor:d})):o;s.content=e??o}u.current=!0,s.autoHeight=!0}else s.content=(0,J.qJ)(e,o,J.JX),s.needsFirstMeasurement=!1,s.autoHeight=!1}else s.content=o,s.needsFirstMeasurement=!1;if(i){const n=e.current.getRowIndexRelativeToVisibleRows(t.id),o=i((0,r.Z)({},t,{isFirstVisible:0===n,isLastVisible:n===h.rows.length-1,indexRelativeToCurrentPage:n}));s.spacingTop=o.top??0,s.spacingBottom=o.bottom??0}else s.spacingTop=0,s.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",s,t),s}),[e,h.rows,n,a,f,i,d]),g=o.useCallback((()=>{u.current=!1;const t=p.top.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),n=p.bottom.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),o=[],i=h.rows.reduce(((e,t)=>{o.push(e);const n=m(t);return e+(n.content+n.spacingTop+n.spacingBottom+n.detail)}),0);u.current||(l.current=1/0);const a=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||n!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||i!==e.current.state.rowsMeta.currentPageTotalHeight,s={currentPageTotalHeight:i,positions:o,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:n};e.current.setState((e=>(0,r.Z)({},e,{rowsMeta:s}))),a&&e.current.updateDimensions(),c.current=!0}),[e,p,h.rows,m]),y=(0,en.Z)((()=>new ar((t=>{for(let n=0;n0?r.borderBoxSize[0].blockSize:r.contentRect.height,i=r.target.__mui_id,a=(0,sr.l)(e)?.id;if(a===i&&0===o)return;e.current.unstable_storeRowHeightMeasurement(i,o)}c.current||e.current.requestPipeProcessorsApplication("rowHeight")})))).current;Rt(e,"rowHeight",g),(0,Jt.Z)((()=>{g()}),[g]);const b={unstable_getRowHeight:e=>s.get(e)?.content??f,unstable_setLastMeasuredRowIndex:e=>{u.current&&e>l.current&&(l.current=e)},unstable_storeRowHeightMeasurement:(t,n)=>{const r=e.current.getRowHeightEntry(t),o=r.content!==n;r.needsFirstMeasurement=!1,r.content=n,c.current&&=!o},resetRowHeights:()=>{s.clear(),g()}},x={hydrateRowsMeta:g,observeRowHeight:(e,t)=>(e.__mui_id=t,y.observe(e),()=>y.unobserve(e)),rowHasAutoHeight:e=>s.get(e)?.autoHeight??!1,getRowHeightEntry:e=>{let t=s.get(e);return void 0===t&&(t={content:f,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},s.set(e,t)),t},getLastMeasuredRowIndex:()=>l.current};(0,Ye.h)(e,b,"public"),(0,Ye.h)(e,x,"private")})(n,t),((e,t)=>{const n=(0,qe.V)(),r=pt(e,"useGridScroll"),i=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,s=(0,v.Pp)(e,X.D7),l=o.useCallback((n=>{const o=(0,z.jY)(e.current.state),i=(0,Q.hh)(e),l=t.unstable_listView?[(0,yn.z)(e.current.state)]:(0,O.FE)(e);if(null!=n.rowIndex&&0===i||0===l.length)return!1;r.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let u={};if(void 0!==n.colIndex){const t=(0,O.Ag)(e);let r;if(void 0!==n.rowIndex){const t=s[n.rowIndex]?.id,o=e.current.unstable_getCellColSpanInfo(t,n.colIndex);o&&!o.spannedByColSpan&&(r=o.cellProps.width)}void 0===r&&(r=l[n.colIndex].computedWidth),u.left=Gn({containerSize:o.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:r,elementOffset:t[n.colIndex]})}if(void 0!==n.rowIndex){const r=(0,_e.k)(e.current.state),i=(0,qt.bu)(e),s=(0,qt.B_)(e),l=t.pagination?n.rowIndex-i*s:n.rowIndex,c=r.positions[l+1]?r.positions[l+1]-r.positions[l]:r.currentPageTotalHeight-r.positions[l];u.top=Gn({containerSize:o.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:c,elementOffset:r.positions[l]})}return u=e.current.unstable_applyPipeProcessors("scrollToIndexes",u,n),(void 0!==typeof u.left||void 0!==typeof u.top)&&(e.current.scroll(u),!0)}),[r,e,a,t.pagination,s,t.unstable_listView]),u={scroll:o.useCallback((e=>{if(a.current&&void 0!==e.left&&i.current){const t=n?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}a.current&&void 0!==e.top&&(a.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[a,n,i,r]),scrollToIndexes:l,getScrollPosition:o.useCallback((()=>a?.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0}),[a])};(0,Ye.h)(e,u,"public")})(n,t),(e=>{const t=pt(e,"useGridColumnMenu"),n=o.useCallback((n=>{const o=se(e.current.state),i=n;(!0!==o.open||i!==o.field)&&(e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),(0,r.Z)({},e,{columnMenu:{open:!0,field:n}})))),e.current.hidePreferences())}),[e,t]),i=o.useCallback((()=>{const n=se(e.current.state);if(n.field){const t=(0,O.WH)(e),r=(0,O.g0)(e),o=(0,O.Zi)(e);let i=n.field;if(t[i]||(i=o[0]),!1===r[i]){const e=o.filter((e=>e===i||!1!==r[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(i)}const o={open:!1,field:void 0};(o.open!==n.open||o.field!==n.field)&&e.current.setState((e=>(t.debug("Hiding Column Menu"),(0,r.Z)({},e,{columnMenu:o}))))}),[e,t]),a=o.useCallback((r=>{t.debug("Toggle Column Menu");const o=se(e.current.state);o.open&&o.field===r?i():n(r)}),[e,t,n,i]),s={showColumnMenu:n,hideColumnMenu:i,toggleColumnMenu:a};(0,Ye.h)(e,s,"public"),(0,V.zn)(e,"columnResizeStart",i),(0,V.zn)(e,"virtualScrollerWheel",e.current.hideColumnMenu),(0,V.zn)(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(n),Gt(n,t),Xt(n,t),_t(n,t),tr(n,t),function(e,t){(0,V.x3)(e,"columnHeaderClick",t.onColumnHeaderClick),(0,V.x3)(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),(0,V.x3)(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),(0,V.x3)(e,"columnHeaderOver",t.onColumnHeaderOver),(0,V.x3)(e,"columnHeaderOut",t.onColumnHeaderOut),(0,V.x3)(e,"columnHeaderEnter",t.onColumnHeaderEnter),(0,V.x3)(e,"columnHeaderLeave",t.onColumnHeaderLeave),(0,V.x3)(e,"cellClick",t.onCellClick),(0,V.x3)(e,"cellDoubleClick",t.onCellDoubleClick),(0,V.x3)(e,"cellKeyDown",t.onCellKeyDown),(0,V.x3)(e,"preferencePanelClose",t.onPreferencePanelClose),(0,V.x3)(e,"preferencePanelOpen",t.onPreferencePanelOpen),(0,V.x3)(e,"menuOpen",t.onMenuOpen),(0,V.x3)(e,"menuClose",t.onMenuClose),(0,V.x3)(e,"rowDoubleClick",t.onRowDoubleClick),(0,V.x3)(e,"rowClick",t.onRowClick),(0,V.x3)(e,"stateChange",t.onStateChange)}(n,t),(e=>{const t={exportState:o.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),restoreState:o.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e])};(0,Ye.h)(e,t,"public")})(n),(0,yr.fO)(n,t),function(e,t){const n=()=>{e.current.setState((t=>t.listViewColumn?(0,r.Z)({},t,{listViewColumn:(0,r.Z)({},t.listViewColumn,{computedWidth:jr(e)})}):t))},i=o.useRef(null);(0,V.zn)(e,"viewportInnerSizeChange",(e=>{i.current!==e.width&&(i.current=e.width,n())})),(0,V.zn)(e,"columnVisibilityModelChange",n),(0,Jt.Z)((()=>{const n=t.unstable_listColumn;n&&e.current.setState((t=>(0,r.Z)({},t,{listViewColumn:(0,r.Z)({},n,{computedWidth:jr(e)})})))}),[e,t.unstable_listColumn]),o.useEffect((()=>{t.unstable_listView&&t.unstable_listColumn}),[t.unstable_listView,t.unstable_listColumn])}(n,t),n};var zr=n(68014);const Br={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=>1!==e?`${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",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",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=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${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"};var Vr=n(66224);const $r=["field","type","align","width","height","empty","style","className"],Hr="1.3em",Wr=[40,80],Gr={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Ur=(0,Ke.iR)(12345);const qr=(0,p.X)((function(e){const{field:t,type:n,align:i,width:a,height:s,empty:h=!1,style:p,className:f}=e,m=(0,l.Z)(e,$r),v=(e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?(0,c.Z)(t):"Left"}`,r&&"cellEmpty"]};return(0,d.Z)(o,g.d,n)})({classes:(0,M.B)().classes,align:i,empty:h}),y=o.useMemo((()=>{if("boolean"===n||"actions"===n)return{variant:"circular",width:Hr,height:Hr};const[e,t]=n?Gr[n]??Wr:Wr;return{variant:"text",width:`${Math.round(Ur(e,t))}%`,height:"1.2em"}}),[n]);return(0,Z.jsx)("div",(0,r.Z)({"data-field":t,className:(0,u.Z)(v.root,f),style:(0,r.Z)({height:s,maxWidth:a,minWidth:a},p)},m,{children:!h&&(0,Z.jsx)(Vr.Z,(0,r.Z)({},y))}))})),Kr=["className"],Yr=(0,N.Z)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Xr=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,Kr),i=(0,M.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["iconButtonContainer"]},g.d,t)})(i);return(0,Z.jsx)(Yr,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))}));function Qr(e){const{counter:t,field:n,onClick:i}=e,a=(0,L.l)(),s=(0,M.B)(),l=(e=>{const{classes:t}=e;return(0,d.Z)({icon:["filterIcon"]},g.d,t)})((0,r.Z)({},e,{classes:s.classes})),u=(0,Ft.Z)(),c=(0,v.AC)(a,A.R,u),h=(0,Ft.Z)(),p=o.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=(0,A.e)(a.current.state);t&&r===E.y.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,h,u),i&&i(a.current.getColumnHeaderParams(n),e)}),[a,n,i,h,u]);if(!t)return null;const f=(0,Z.jsx)(s.slots.baseIconButton,(0,r.Z)({id:u,onClick:p,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?h:void 0},s.slotProps?.baseIconButton,{children:(0,Z.jsx)(s.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return(0,Z.jsx)(s.slots.baseTooltip,(0,r.Z)({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},s.slotProps?.baseTooltip,{children:(0,Z.jsxs)(Xr,{children:[t>1&&(0,Z.jsx)(s.slots.baseBadge,{badgeContent:t,color:"default",children:f}),1===t&&f]})}))}const Jr=["direction","index","sortingOrder","disabled"];function eo(e){const{direction:t,index:n,sortingOrder:o,disabled:i}=e,a=(0,l.Z)(e,Jr),s=(0,L.l)(),u=(0,M.B)(),c=(e=>{const{classes:t}=e;return(0,d.Z)({icon:["sortIcon"]},g.d,t)})((0,r.Z)({},e,{classes:u.classes})),h=function(e,t,n,o){let i;const a={};return"asc"===t?i=e.columnSortedAscendingIcon:"desc"===t?i=e.columnSortedDescendingIcon:(i=e.columnUnsortedIcon,a.sortingOrder=o),i?(0,Z.jsx)(i,(0,r.Z)({fontSize:"small",className:n},a)):null}(u.slots,t,c.icon,o);if(!h)return null;const p=(0,Z.jsx)(u.slots.baseIconButton,(0,r.Z)({tabIndex:-1,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:i},u.slotProps?.baseIconButton,a,{children:h}));return(0,Z.jsxs)(Xr,{children:[null!=n&&(0,Z.jsx)(u.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:p}),null==n&&p]})}const to=o.memo(eo),no=["className","selectedRowCount"],ro=(0,N.Z)("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"}}))),oo=(0,s.G)((function(e,t){const{className:n,selectedRowCount:o}=e,i=(0,l.Z)(e,no),a=(0,L.l)(),s=(0,M.B)(),c=(e=>{const{classes:t}=e;return(0,d.Z)({root:["selectedRowCount"]},g.d,t)})(s),h=a.current.getLocaleText("footerRowSelected")(o);return(0,Z.jsx)(ro,(0,r.Z)({className:(0,u.Z)(c.root,n),ownerState:s},i,{ref:t,children:h}))})),io=["className"],ao=(0,N.Z)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),so=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,io),i=(0,M.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["footerContainer","withBorderColor"]},g.d,t)})(i);return(0,Z.jsx)(ao,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))})),lo=(0,s.G)((function(e,t){const n=(0,L.l)(),o=(0,M.B)(),i=(0,v.Pp)(n,Q.G$),a=(0,v.Pp)(n,$e.xD),s=(0,v.Pp)(n,X.xf),l=!o.hideFooterSelectedRowCount&&a>0?(0,Z.jsx)(oo,{selectedRowCount:a}):(0,Z.jsx)("div",{}),u=o.hideFooterRowCount||o.pagination?null:(0,Z.jsx)(o.slots.footerRowCount,(0,r.Z)({},o.slotProps?.footerRowCount,{rowCount:i,visibleRowCount:s})),c=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&(0,Z.jsx)(o.slots.pagination,(0,r.Z)({},o.slotProps?.pagination));return(0,Z.jsxs)(so,(0,r.Z)({},e,{ref:t,children:[l,u,c]}))})),uo=["className","rowCount","visibleRowCount"],co=(0,N.Z)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)}))),ho=(0,s.G)((function(e,t){const{className:n,rowCount:o,visibleRowCount:i}=e,a=(0,l.Z)(e,uo),s=(0,L.l)(),c=(0,M.B)(),h=(e=>{const{classes:t}=e;return(0,d.Z)({root:["rowCount"]},g.d,t)})(c);if(0===o)return null;const p=it.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),vo=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,mo),i=(0,M.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["overlay"]},g.d,t)})(i);return(0,Z.jsx)(go,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))}));var yo=n(82207),bo=n(59566),xo=n(71680),wo=n(55749),So=n(83100);const Co=(0,N.Z)("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),ko=e=>parseInt(e.getAttribute("data-colindex"),10),_o=(0,s.G)((function(e,t){const n=(0,M.B)(),{slots:i}=n,a=(0,qe.V)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["skeletonLoadingOverlay"]},g.d,t)})({classes:n.classes}),l=o.useRef(null),c=(0,h.Z)(l,t),p=(0,L.l)(),f=(0,v.Pp)(p,z.jY),m=f?.viewportInnerSize.height??0,y=Math.ceil(m/f.rowHeight),b=(0,v.Pp)(p,z.iD),x=(0,v.Pp)(p,O.Ag),w=o.useMemo((()=>x.filter((e=>e<=b)).length),[b,x]),S=(0,v.Pp)(p,O.FE),C=o.useMemo((()=>S.slice(0,w)),[S,w]),k=(0,v.Pp)(p,O.s3),_=o.useCallback((e=>-1!==k.left.findIndex((t=>t.field===e))?dn.FX.LEFT:-1!==k.right.findIndex((t=>t.field===e))?dn.FX.RIGHT:void 0),[k.left,k.right]),T=o.useMemo((()=>{const e=[];for(let t=0;te.field===s.field)):e-k.left.length,v=f.hasScrollY?f.scrollbarSize:0,y=(0,So.Q)({},a,l,(0,yo.a)(l,s.computedWidth,e,x,f.columnsTotalWidth,v)),b=f.columnsTotalWidth0},`skeleton-scrollbar-filler-${t}`))}e.push((0,Z.jsx)("div",{className:(0,u.Z)(g._.row,g._.rowSkeleton,0===t&&g._["row--firstVisible"]),children:o},`skeleton-row-${t}`))}return e}),[i,C,k,y,n.showCellVerticalBorder,f,x,_,a]);return(0,V.zn)(p,"columnResize",(e=>{const{colDef:t,width:n}=e,r=l.current?.querySelectorAll(`[data-field="${(0,fn.z6)(t.field)}"]`);if(!r)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const o=C.findIndex((e=>e.field===t.field)),i=_(t.field),a=i===dn.FX.LEFT,s=i===dn.FX.RIGHT,u=getComputedStyle(r[0]).getPropertyValue("--width"),c=parseInt(u,10)-n;if(r&&r.forEach((e=>{e.style.setProperty("--width",`${n}px`)})),a){const e=l.current?.querySelectorAll(`.${g._["cell--pinnedLeft"]}`);e?.forEach((e=>{ko(e)>o&&(e.style.left=parseInt(getComputedStyle(e).left,10)-c+"px")}))}if(s){const e=l.current?.querySelectorAll(`.${g._["cell--pinnedRight"]}`);e?.forEach((e=>{ko(e)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Do.Z.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Do.Z.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),Ao=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${-1!==n?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${-1!==n?n:`more than ${t}`}`,Eo=(0,s.G)((function(e,t){const n=(0,L.l)(),i=(0,M.B)(),a=(0,v.Pp)(n,qt.O$),s=(0,v.Pp)(n,qt.RM),l=(0,v.Pp)(n,qt.UB),{paginationMode:u,loading:c,estimatedRowCount:d}=i,h=o.useMemo((()=>-1===s&&"server"===u&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{}),[c,u,s]),p=o.useMemo((()=>Math.max(0,l-1)),[l]),f=o.useMemo((()=>-1===s||a.page<=p?a.page:p),[p,a.page,s]),m=o.useCallback((e=>{const t=Number(e.target.value);n.current.setPageSize(t)}),[n]),g=o.useCallback(((e,t)=>{n.current.setPage(t)}),[n]);const y=(e=>{for(let t=0;tw({from:e,to:t,count:n,page:r,estimated:S}));var w,S;return(0,Z.jsx)(Oo,(0,r.Z)({component:"div",count:s,page:f,rowsPerPageOptions:y,rowsPerPage:a.pageSize,onPageChange:g,onRowsPerPageChange:m},h,b,{labelDisplayedRows:x},e,{ref:t}))}));var Lo=n(43780);const Zo=["className"],Fo=(0,N.Z)("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function jo(e){const{className:t}=e,n=(0,l.Z)(e,Zo),o=(0,M.B)(),i=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelContent"]},g.d,t)})(o);return(0,Z.jsx)(Fo,(0,r.Z)({className:(0,u.Z)(i.root,t),ownerState:o},n))}const No=["className"],zo=(0,N.Z)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"})));function Bo(e){const{className:t}=e,n=(0,l.Z)(e,No),o=(0,M.B)(),i=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelFooter"]},g.d,t)})(o);return(0,Z.jsx)(zo,(0,r.Z)({className:(0,u.Z)(i.root,t),ownerState:o},n))}var Vo=n(25188);const $o=["className","slotProps"],Ho=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),Wo=()=>!0,Go=(0,s.G)((function(e,t){const{className:n,slotProps:o={}}=e,i=(0,l.Z)(e,$o),a=(0,M.B)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelWrapper"]},g.d,t)})(a);return(0,Z.jsx)(Vo.Z,(0,r.Z)({open:!0,disableEnforceFocus:!0,isEnabled:Wo},o.TrapFocus,{children:(0,Z.jsx)(Ho,(0,r.Z)({tabIndex:-1,className:(0,u.Z)(s.root,n),ownerState:a},i,{ref:t}))}))}));var Uo=n(38443);const qo=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Ko=["InputComponentProps"],Yo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((({theme:e})=>({display:"flex",padding:e.spacing(1)}))),Xo=(0,m.ZP)("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)}))),Qo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),Jo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),ei=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),ti=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),ni=e=>e.headerName||e.field,ri=new Intl.Collator,oi=(0,s.G)((function(e,t){const{item:n,hasMultipleFilters:i,deleteFilter:a,applyFilterChanges:s,showMultiFilterOperators:h,disableMultiFilterOperator:p,applyMultiFilterOperatorChanges:f,focusElementRef:m,logicOperators:y=[Lo.G.And,Lo.G.Or],columnsSort:b,filterColumns:x,deleteIconProps:w={},logicOperatorInputProps:S={},operatorInputProps:C={},columnInputProps:k={},valueInputProps:_={},readOnly:T}=e,P=(0,l.Z)(e,qo),R=(0,L.l)(),I=(0,v.Pp)(R,O.WH),D=(0,v.Pp)(R,O.qH),A=(0,v.Pp)(R,X.uf),E=(0,Ft.Z)(),F=(0,Ft.Z)(),j=(0,Ft.Z)(),N=(0,Ft.Z)(),z=(0,M.B)(),B=(e=>{const{classes:t}=e;return(0,d.Z)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},g.d,t)})(z),V=o.useRef(null),$=o.useRef(null),H=A.logicOperator??Lo.G.And,W=i&&y.length>0,G=z.slotProps?.baseFormControl||{},U=(z.slotProps?.baseSelect||{}).native??!1,q=z.slotProps?.baseInputLabel||{},K=z.slotProps?.baseSelectOption||{},{InputComponentProps:Y}=_,Q=(0,l.Z)(_,Ko),{filteredColumns:J,selectedField:ee}=o.useMemo((()=>{let e=n.field;const t=!1===I[n.field].filterable?I[n.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(void 0===x||"function"!=typeof x)return{filteredColumns:D,selectedField:e};const r=x({field:n.field,columns:D,currentFilters:A?.items||[]});return{filteredColumns:D.filter((t=>{const o=r.includes(t.field);return t.field!==n.field||o||(e=void 0),o})),selectedField:e}}),[x,A?.items,D,n.field,I]),te=o.useMemo((()=>{switch(b){case"asc":return J.sort(((e,t)=>ri.compare(ni(e),ni(t))));case"desc":return J.sort(((e,t)=>-ri.compare(ni(e),ni(t))));default:return J}}),[J,b]),ne=n.field?R.current.getColumn(n.field):null,re=o.useMemo((()=>n.operator&&ne?ne.filterOperators?.find((e=>e.value===n.operator)):null),[n,ne]),oe=o.useCallback((e=>{const t=e.target.value,o=R.current.getColumn(t);if(o.field===ne.field)return;const i=o.filterOperators.find((e=>e.value===n.operator))||o.filterOperators[0];let a=!i.InputComponent||i.InputComponent!==re?.InputComponent||o.type!==ne.type?void 0:n.value;if("singleSelect"===o.type&&void 0!==a){const e=o,t=(0,Uo.sf)(e);Array.isArray(a)?a=a.filter((n=>void 0!==(0,Uo.sk)(n,t,e?.getOptionValue))):void 0===(0,Uo.sk)(n.value,t,e?.getOptionValue)&&(a=void 0)}s((0,r.Z)({},n,{field:t,operator:i.value,value:a}))}),[R,s,n,ne,re]),ie=o.useCallback((e=>{const t=e.target.value,o=ne?.filterOperators.find((e=>e.value===t)),i=!o?.InputComponent||o?.InputComponent!==re?.InputComponent;s((0,r.Z)({},n,{operator:t,value:i?void 0:n.value}))}),[s,n,ne,re]),ae=o.useCallback((e=>{const t=e.target.value===Lo.G.And.toString()?Lo.G.And:Lo.G.Or;f(t)}),[f]);return o.useImperativeHandle(m,(()=>({focus:()=>{re?.InputComponent?V?.current?.focus():$.current.focus()}})),[re]),(0,Z.jsxs)(Yo,(0,r.Z)({className:B.root,"data-id":n.id,ownerState:z},P,{ref:t,children:[(0,Z.jsx)(Xo,(0,r.Z)({variant:"standard",as:z.slots.baseFormControl},G,w,{className:(0,u.Z)(B.deleteIcon,G.className,w.className),ownerState:z,children:(0,Z.jsx)(z.slots.baseIconButton,(0,r.Z)({"aria-label":R.current.getLocaleText("filterPanelDeleteIconLabel"),title:R.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{a(n)},size:"small",disabled:T},z.slotProps?.baseIconButton,{children:(0,Z.jsx)(z.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,Z.jsx)(Qo,(0,r.Z)({variant:"standard",as:z.slots.baseFormControl},G,S,{sx:[W?{display:"flex"}:{display:"none"},h?{visibility:"visible"}:{visibility:"hidden"},G.sx,S.sx],className:(0,u.Z)(B.logicOperatorInput,G.className,S.className),ownerState:z,children:(0,Z.jsx)(z.slots.baseSelect,(0,r.Z)({inputProps:{"aria-label":R.current.getLocaleText("filterPanelLogicOperator")},value:H??"",onChange:ae,disabled:!!p||1===y.length,native:U},z.slotProps?.baseSelect,{children:y.map((e=>(0,o.createElement)(z.slots.baseSelectOption,(0,r.Z)({},K,{native:U,key:e.toString(),value:e.toString()}),R.current.getLocaleText((e=>{switch(e){case Lo.G.And:return"filterPanelOperatorAnd";case Lo.G.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))}))})),(0,Z.jsxs)(Jo,(0,r.Z)({variant:"standard",as:z.slots.baseFormControl},G,k,{className:(0,u.Z)(B.columnInput,G.className,k.className),ownerState:z,children:[(0,Z.jsx)(z.slots.baseInputLabel,(0,r.Z)({},q,{htmlFor:E,id:F,children:R.current.getLocaleText("filterPanelColumns")})),(0,Z.jsx)(z.slots.baseSelect,(0,r.Z)({labelId:F,id:E,label:R.current.getLocaleText("filterPanelColumns"),value:ee??"",onChange:oe,native:U,disabled:T},z.slotProps?.baseSelect,{children:te.map((e=>(0,o.createElement)(z.slots.baseSelectOption,(0,r.Z)({},K,{native:U,key:e.field,value:e.field}),ni(e))))}))]})),(0,Z.jsxs)(ei,(0,r.Z)({variant:"standard",as:z.slots.baseFormControl},G,C,{className:(0,u.Z)(B.operatorInput,G.className,C.className),ownerState:z,children:[(0,Z.jsx)(z.slots.baseInputLabel,(0,r.Z)({},q,{htmlFor:j,id:N,children:R.current.getLocaleText("filterPanelOperator")})),(0,Z.jsx)(z.slots.baseSelect,(0,r.Z)({labelId:N,label:R.current.getLocaleText("filterPanelOperator"),id:j,value:n.operator,onChange:ie,native:U,inputRef:$,disabled:T},z.slotProps?.baseSelect,{children:ne?.filterOperators?.map((e=>(0,o.createElement)(z.slots.baseSelectOption,(0,r.Z)({},K,{native:U,key:e.value,value:e.value}),e.label||R.current.getLocaleText(`filterOperator${(0,c.Z)(e.value)}`))))}))]})),(0,Z.jsx)(ti,(0,r.Z)({variant:"standard",as:z.slots.baseFormControl},G,Q,{className:(0,u.Z)(B.valueInput,G.className,Q.className),ownerState:z,children:re?.InputComponent?(0,Z.jsx)(re.InputComponent,(0,r.Z)({apiRef:R,item:n,applyValue:s,focusElementRef:V,disabled:T},re.InputComponentProps,Y),n.field):null}))]}))})),ii=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],ai=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),si=(0,s.G)((function(e,t){const n=(0,L.l)(),i=(0,M.B)(),a=(0,v.Pp)(n,X.uf),s=(0,v.Pp)(n,O.qH),u=(0,v.Pp)(n,O.xs),c=o.useRef(null),d=o.useRef(null),{logicOperators:h=[Lo.G.And,Lo.G.Or],columnsSort:p,filterFormProps:f,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:y=!1}=e,b=(0,l.Z)(e,ii),x=n.current.upsertFilterItem,w=o.useCallback((e=>{n.current.setFilterLogicOperator(e)}),[n]),S=o.useCallback((()=>{let e;if(m&&"function"==typeof m){const t=m({currentFilters:a?.items||[],columns:s});if(null===t)return null;e=s.find((({field:e})=>e===t))}else e=s.find((e=>e.filterOperators?.length));return e?ai(e):null}),[a?.items,s,m]),C=o.useCallback((()=>{if(void 0===m||"function"!=typeof m)return S();const e=a.items.length?a.items:[S()].filter(Boolean),t=m({currentFilters:e,columns:s});if(null===t)return null;const n=s.find((({field:e})=>e===t));return n?ai(n):null}),[a.items,s,m,S]),k=o.useMemo((()=>a.items.length?a.items:(d.current||(d.current=S()),d.current?[d.current]:[])),[a.items,S]),_=k.length>1,{readOnlyFilters:T,validFilters:P}=o.useMemo((()=>k.reduce(((e,t)=>(u[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e)),{readOnlyFilters:[],validFilters:[]})),[k,u]),R=o.useCallback((()=>{const e=C();e&&n.current.upsertFilterItems([...k,e])}),[n,C,k]),I=o.useCallback((e=>{const t=1===P.length;n.current.deleteFilterItem(e),t&&n.current.hideFilterPanel()}),[n,P.length]),D=o.useCallback((()=>1===P.length&&void 0===P[0].value?(n.current.deleteFilterItem(P[0]),n.current.hideFilterPanel()):n.current.setFilterModel((0,r.Z)({},a,{items:T}),"removeAllFilterItems")),[n,T,a,P]);return o.useEffect((()=>{h.length>0&&a.logicOperator&&!h.includes(a.logicOperator)&&w(h[0])}),[h,w,a.logicOperator]),o.useEffect((()=>{P.length>0&&c.current.focus()}),[P.length]),(0,Z.jsxs)(Go,(0,r.Z)({},b,{ref:t,children:[(0,Z.jsxs)(jo,{children:[T.map(((e,t)=>(0,Z.jsx)(oi,(0,r.Z)({item:e,applyFilterChanges:x,deleteFilter:I,hasMultipleFilters:_,showMultiFilterOperators:t>0,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:w,focusElementRef:null,readOnly:!0,logicOperators:h,columnsSort:p},f),null==e.id?t:e.id))),P.map(((e,t)=>(0,Z.jsx)(oi,(0,r.Z)({item:e,applyFilterChanges:x,deleteFilter:I,hasMultipleFilters:_,showMultiFilterOperators:T.length+t>0,disableMultiFilterOperator:T.length+t!==1,applyMultiFilterOperatorChanges:w,focusElementRef:t===P.length-1?c:null,logicOperators:h,columnsSort:p},f),null==e.id?t+T.length:e.id)))]}),i.disableMultipleColumnsFiltering||g&&y?null:(0,Z.jsxs)(Bo,{children:[g?(0,Z.jsx)("span",{}):(0,Z.jsx)(i.slots.baseButton,(0,r.Z)({onClick:R,startIcon:(0,Z.jsx)(i.slots.filterPanelAddIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelAddFilter")})),!y&&P.length>0?(0,Z.jsx)(i.slots.baseButton,(0,r.Z)({onClick:D,startIcon:(0,Z.jsx)(i.slots.filterPanelRemoveAllIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))}));var li=n(28797),ui=n(8695),ci=n(3597);const di=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,hi=new Intl.Collator;const pi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})((({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"}))),fi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})((({theme:e})=>({padding:e.spacing(1.5,3)}))),mi=(0,m.ZP)(ui.Z,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput",overridesResolver:(e,t)=>t.columnsManagementSearchInput})((({theme:e})=>({[`& .${ci.Z.root}`]:{padding:e.spacing(0,1.5,0,1.5)},[`& .${ci.Z.input}::-webkit-search-decoration,\n & .${ci.Z.input}::-webkit-search-cancel-button,\n & .${ci.Z.input}::-webkit-search-results-button,\n & .${ci.Z.input}::-webkit-search-results-decoration`]:{display:"none"}}))),gi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})((({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`}))),vi=(0,m.ZP)("div")((({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]})));var yi=n(44124),bi=n(70313),xi=n(28866),wi=n(75651);const Si=["children","className","classes"],Ci=(0,yi.Z)("MuiDataGrid",["panel","paper"]),ki=(0,m.ZP)(wi.Z,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((({theme:e})=>({zIndex:e.zIndex.modal}))),_i=(0,m.ZP)(xi.Z,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"}))),Mi=(0,s.G)(((e,t)=>{const{children:n,className:i}=e,a=(0,l.Z)(e,Si),s=(0,L.l)(),c=(0,M.B)(),d=Ci,[h,p]=o.useState(!1),f=o.useCallback((()=>{s.current.hidePreferences()}),[s]),m=o.useCallback((e=>{"Escape"===e.key&&s.current.hidePreferences()}),[s]),g=o.useMemo((()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{p(!0)},effect:()=>()=>{p(!1)}}]),[]),[v,y]=o.useState(null);return o.useEffect((()=>{const e=s.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');e&&y(e)}),[s]),v?(0,Z.jsx)(ki,(0,r.Z)({placement:"bottom-start",className:(0,u.Z)(d.panel,i),ownerState:c,anchorEl:v,modifiers:g},a,{ref:t,children:(0,Z.jsx)(bi.d,{mouseEvent:"onPointerUp",touchEvent:!1,onClickAway:f,children:(0,Z.jsx)(_i,{className:d.paper,ownerState:c,elevation:8,onKeyDown:m,children:h&&n})})})):null}));var Ti=n(13546);let Pi;const Ri=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Ii=["changeReason","unstable_updateValueOnRender"];dn.FX.LEFT,It.I.LEFT,dn.FX.RIGHT,It.I.RIGHT,dn.FX.NONE,dn.FX.VIRTUAL;const Di=(0,s.G)((function(e,t){const{column:n,row:i,rowId:a,rowNode:s,align:p,colIndex:f,width:m,className:b,style:x,colSpan:w,disableDragEvents:S,isNotVisible:C,pinnedOffset:k,pinnedPosition:_,showRightBorder:T,showLeftBorder:P,onClick:R,onDoubleClick:I,onMouseDown:D,onMouseUp:O,onMouseOver:A,onKeyDown:E,onKeyUp:L,onDragEnter:F,onDragOver:j}=e,N=(0,l.Z)(e,Ri),z=(0,y.$)(),B=(0,M.B)(),V=(0,qe.V)(),$=n.field,H=(0,v.AC)(z,kn.Am,{rowId:a,field:$}),W=H?hn.Vl.Edit:hn.Vl.View,G=z.current.getCellParamsForRow(a,$,i,{colDef:n,cellMode:W,rowNode:s,tabIndex:(0,v.Pp)(z,(()=>{const e=(0,ie.d6)(z);return e&&e.field===$&&e.id===a?0:-1})),hasFocus:(0,v.Pp)(z,(()=>{const e=(0,ie.TR)(z);return e?.id===a&&e.field===$}))});G.api=z.current;const U=(0,v.Pp)(z,(()=>z.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:$}))),q=(0,v.Pp)(z,mn.mf),K=(0,v.Pp)(z,mn.zq),{hasFocus:Y,isEditable:X=!1,value:Q}=G,J="actions"===n.type&&n.getActions?.(z.current.getRowParams(a)).some((e=>!e.props.disabled)),ee="view"!==W&&X||J?-1:G.tabIndex,{classes:te,getCellClassName:ne}=B,re=[(0,v.Pp)(z,(()=>z.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:$}).filter(Boolean).join(" ")))];n.cellClassName&&re.push("function"==typeof n.cellClassName?n.cellClassName(G):n.cellClassName),"flex"===n.display&&re.push(g._["cell--flex"]),ne&&re.push(ne(G));const oe=G.formattedValue??Q,ae=o.useRef(null),se=(0,h.Z)(t,ae),le=o.useRef(null),ue=B.cellSelection??!1,ce=(e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,u={root:["cell",`cell--text${(0,c.Z)(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===dn.FX.LEFT&&"cell--pinnedLeft",o===dn.FX.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return(0,d.Z)(u,g.d,l)})({align:p,showLeftBorder:P,showRightBorder:T,isEditable:X,classes:B.classes,pinnedPosition:_,isSelected:U,isSelectionMode:ue}),de=o.useCallback((e=>t=>{const n=z.current.getCellParams(a,$||"");z.current.publishEvent(e,n,t),O&&O(t)}),[z,$,O,a]),he=o.useCallback((e=>t=>{const n=z.current.getCellParams(a,$||"");z.current.publishEvent(e,n,t),D&&D(t)}),[z,$,D,a]),pe=o.useCallback(((e,t)=>n=>{if(!z.current.getRow(a))return;const r=z.current.getCellParams(a,$||"");z.current.publishEvent(e,r,n),t&&t(n)}),[z,$,a]),fe=q[a]?.[$]??!1,me=K[a]?.[$]??1,ge=o.useMemo((()=>{if(C)return{padding:0,opacity:0,width:0,height:0,border:0};const e=(0,So.Q)((0,r.Z)({"--width":`${m}px`},x),V,_,k),t=_===dn.FX.LEFT,n=_===dn.FX.RIGHT;return me>1&&(e.height=`calc(var(--height) * ${me})`,e.zIndex=5,(t||n)&&(e.zIndex=6)),e}),[m,C,x,k,_,V,me]);if(o.useEffect((()=>{if(!Y||W===hn.Vl.Edit)return;const e=(0,Ut.Z)(z.current.rootElementRef.current);if(ae.current&&!ae.current.contains(e.activeElement)){const e=ae.current.querySelector('[tabindex="0"]'),t=le.current||e||ae.current;if(void 0===Pi&&document.createElement("div").focus({get preventScroll(){return Pi=!0,!1}}),Pi)t.focus({preventScroll:!0});else{const e=z.current.getScrollPosition();t.focus(),z.current.scroll(e)}}}),[Y,W,z]),fe)return(0,Z.jsx)("div",{"data-colindex":f,role:"presentation",style:(0,r.Z)({width:"var(--width)"},ge)});let ve,ye,be=N.onFocus;if(null===H&&n.renderCell&&(ve=n.renderCell(G)),null!==H&&n.renderEditCell){const e=z.current.getRowWithUpdatedValues(a,n.field),t=(0,l.Z)(H,Ii),o=n.valueFormatter?n.valueFormatter(H.value,e,n,z):G.formattedValue,i=(0,r.Z)({},G,{row:e,formattedValue:o},t);ve=n.renderEditCell(i),re.push(g._["cell--editing"]),re.push(te?.["cell--editing"])}if(void 0===ve){const e=oe?.toString();ve=e,ye=e}o.isValidElement(ve)&&J&&(ve=o.cloneElement(ve,{focusElementRef:le}));const xe=S?null:{onDragEnter:pe("cellDragEnter",F),onDragOver:pe("cellDragOver",j)};return(0,Z.jsx)("div",(0,r.Z)({className:(0,u.Z)(ce.root,re,b),role:"gridcell","data-field":$,"data-colindex":f,"aria-colindex":f+1,"aria-colspan":w,"aria-rowspan":me,style:ge,title:ye,tabIndex:ee,onClick:pe("cellClick",R),onDoubleClick:pe("cellDoubleClick",I),onMouseOver:pe("cellMouseOver",A),onMouseDown:he("cellMouseDown"),onMouseUp:de("cellMouseUp"),onKeyDown:pe("cellKeyDown",E),onKeyUp:pe("cellKeyUp",L)},xe,N,{onFocus:be,ref:se,children:ve}))})),Oi=(0,p.X)(Di);var Ai=n(2824);const Ei=["displayOrder"],Li=["hideMenu","colDef","id","labelledby","className","children","open"],Zi=(0,m.ZP)(jt.Z)((()=>({minWidth:248}))),Fi=(0,s.G)((function(e,t){const{hideMenu:n,id:i,labelledby:a,className:s,children:c,open:d}=e,h=(0,l.Z)(e,Li),p=o.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),St(e.key)&&n(e)}),[n]);return(0,Z.jsx)(Zi,(0,r.Z)({id:i,className:(0,u.Z)(g._.menuList,s),"aria-labelledby":a,onKeyDown:p,autoFocus:d},h,{ref:t,children:c}))}));var ji=n(12211),Ni=n(12577);function zi(e){const{colDef:t,onClick:n}=e,r=(0,L.l)(),i=(0,M.B)(),a=1===(0,O.FE)(r).filter((e=>!0!==e.disableColumnMenu)).length,s=o.useCallback((e=>{a||(r.current.setColumnVisibility(t.field,!1),n(e))}),[r,t.field,n,a]);return i.disableColumnSelector||!1===t.hideable?null:(0,Z.jsxs)(Zt.Z,{onClick:s,disabled:a,children:[(0,Z.jsx)(ji.Z,{children:(0,Z.jsx)(i.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,Z.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function Bi(e){const{onClick:t}=e,n=(0,L.l)(),r=(0,M.B)(),i=o.useCallback((e=>{t(e),n.current.showPreferences(E.y.columns)}),[n,t]);return r.disableColumnSelector?null:(0,Z.jsxs)(Zt.Z,{onClick:i,children:[(0,Z.jsx)(ji.Z,{children:(0,Z.jsx)(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,Z.jsx)(Ni.Z,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}const Vi=["defaultSlots","defaultSlotProps","slots","slotProps"],$i={columnMenuSortItem:function(e){const{colDef:t,onClick:n}=e,r=(0,L.l)(),i=(0,v.Pp)(r,oe.Gm),a=(0,M.B)(),s=o.useMemo((()=>{if(!t)return null;const e=i.find((e=>e.field===t.field));return e?.sort}),[t,i]),l=t.sortingOrder??a.sortingOrder,u=o.useCallback((e=>{n(e);const o=e.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,o===s?null:o)}),[r,t,n,s]);if(a.disableColumnSorting||!t||!t.sortable||!l.some((e=>!!e)))return null;const c=e=>{const n=r.current.getLocaleText(e);return"function"==typeof n?n(t):n};return(0,Z.jsxs)(o.Fragment,{children:[l.includes("asc")&&"asc"!==s?(0,Z.jsxs)(Zt.Z,{onClick:u,"data-value":"asc",children:[(0,Z.jsx)(ji.Z,{children:(0,Z.jsx)(a.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,Z.jsx)(Ni.Z,{children:c("columnMenuSortAsc")})]}):null,l.includes("desc")&&"desc"!==s?(0,Z.jsxs)(Zt.Z,{onClick:u,"data-value":"desc",children:[(0,Z.jsx)(ji.Z,{children:(0,Z.jsx)(a.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,Z.jsx)(Ni.Z,{children:c("columnMenuSortDesc")})]}):null,l.includes(null)&&null!=s?(0,Z.jsxs)(Zt.Z,{onClick:u,children:[(0,Z.jsx)(ji.Z,{}),(0,Z.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:n}=e,r=(0,L.l)(),i=(0,M.B)(),a=o.useCallback((e=>{n(e),r.current.showFilterPanel(t.field)}),[r,t.field,n]);return i.disableColumnFilter||!t.filterable?null:(0,Z.jsxs)(Zt.Z,{onClick:a,children:[(0,Z.jsx)(ji.Z,{children:(0,Z.jsx)(i.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,Z.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(e){return(0,Z.jsxs)(o.Fragment,{children:[(0,Z.jsx)(zi,(0,r.Z)({},e)),(0,Z.jsx)(Bi,(0,r.Z)({},e))]})}},Hi={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Wi=(0,s.G)((function(e,t){const{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:s}=e,u=(0,l.Z)(e,Vi),c=(e=>{const t=(0,y.$)(),n=(0,M.B)(),{defaultSlots:i,defaultSlotProps:a,slots:s={},slotProps:u={},hideMenu:c,colDef:d,addDividers:h=!0}=e,p=o.useMemo((()=>(0,r.Z)({},i,s)),[i,s]),f=o.useMemo((()=>{if(!u||0===Object.keys(u).length)return a;const e=(0,r.Z)({},u);return Object.entries(a).forEach((([t,n])=>{e[t]=(0,r.Z)({},n,u[t]||{})})),e}),[a,u]),m=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),g=o.useMemo((()=>{const e=Object.keys(i);return Object.keys(s).filter((t=>!e.includes(t)))}),[s,i]);return o.useMemo((()=>{const e=Array.from(new Set([...m,...g])).filter((e=>null!=p[e])).sort(((e,t)=>{const n=f[e],r=f[t];return(Number.isFinite(n?.displayOrder)?n.displayOrder:100)-(Number.isFinite(r?.displayOrder)?r.displayOrder:100)}));return e.reduce(((t,o,i)=>{let a={colDef:d,onClick:c};const s=f[o];if(s){const e=(0,l.Z)(s,Ei);a=(0,r.Z)({},a,e)}return h&&i!==e.length-1?[...t,[p[o],a],[n.slots.baseDivider,{}]]:[...t,[p[o],a]]}),[])}),[h,d,m,c,p,f,g,n.slots.baseDivider])})((0,r.Z)({},u,{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:s}));return(0,Z.jsx)(Fi,(0,r.Z)({},u,{ref:t,children:c.map((([e,t],n)=>(0,Z.jsx)(e,(0,r.Z)({},t),n)))}))})),Gi=(0,s.G)((function(e,t){return(0,Z.jsx)(Wi,(0,r.Z)({},e,{ref:t,defaultSlots:$i,defaultSlotProps:Hi}))}));const Ui=(0,s.G)((function(e,t){const n=(0,L.l)().current.getLocaleText("noResultsOverlayLabel");return(0,Z.jsx)(vo,(0,r.Z)({},e,{ref:t,children:n}))}));var qi=n(7860),Ki=n(25399);const Yi=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=(0,qi.Z)({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}};var Xi=n(82319),Qi=n(90433),Ji=n(24043),ea=n(51640),ta=n(6749);function na(e){return(0,ta.ZP)("MuiBadge",e)}const ra=(0,yi.Z)("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"]),oa=(0,m.ZP)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),ia=(0,m.ZP)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${(0,ea.Z)(n.anchorOrigin.vertical)}${(0,ea.Z)(n.anchorOrigin.horizontal)}${(0,ea.Z)(n.overlap)}`],"default"!==n.color&&t[`color${(0,ea.Z)(n.color)}`],n.invisible&&t.invisible]}})((0,Xi.Z)((({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter((0,Qi.Z)(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}))));function aa(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const sa=o.forwardRef((function(e,t){const n=(0,Ji.i)({props:e,name:"MuiBadge"}),{anchorOrigin:r,className:o,classes:i,component:a,components:s={},componentsProps:l={},children:c,overlap:h="rectangular",color:p="default",invisible:f=!1,max:m=99,badgeContent:g,slots:v,slotProps:y,showZero:b=!1,variant:x="standard",...w}=n,{badgeContent:S,invisible:C,max:k,displayValue:_}=Yi({max:m,invisible:f,badgeContent:g,showZero:b}),M=(0,qi.Z)({anchorOrigin:aa(r),color:p,overlap:h,variant:x,badgeContent:g}),T=C||null==S&&"dot"!==x,{color:P=p,overlap:R=h,anchorOrigin:I,variant:D=x}=T?M:n,O=aa(I),A="dot"!==D?_:void 0,E={...n,badgeContent:S,invisible:T,max:k,displayValue:A,showZero:b,anchorOrigin:O,color:P,overlap:R,variant:D},L=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${(0,ea.Z)(n.vertical)}${(0,ea.Z)(n.horizontal)}`,`anchorOrigin${(0,ea.Z)(n.vertical)}${(0,ea.Z)(n.horizontal)}${(0,ea.Z)(o)}`,`overlap${(0,ea.Z)(o)}`,"default"!==t&&`color${(0,ea.Z)(t)}`]};return(0,d.Z)(s,na,a)})(E),F=v?.root??s.Root??oa,j=v?.badge??s.Badge??ia,N=y?.root??l.root,z=y?.badge??l.badge,B=(0,Ki.Z)({elementType:F,externalSlotProps:N,externalForwardedProps:w,additionalProps:{ref:t,as:a},ownerState:E,className:(0,u.Z)(N?.className,L.root,o)}),V=(0,Ki.Z)({elementType:j,externalSlotProps:z,ownerState:E,className:(0,u.Z)(L.badge,z?.className)});return(0,Z.jsxs)(F,{...B,children:[c,(0,Z.jsx)(j,{...V,children:A})]})}));var la=n(82707),ua=n(79119),ca=n(90192),da=n(63767),ha=n(48565),pa=n(75094),fa=n(76992),ma=n(32964),ga=n(68808),va=n(52889);const ya=["sortingOrder"],ba=o.memo((function(e){const{sortingOrder:t}=e,n=(0,l.Z)(e,ya),o=(0,M.B)(),[i]=t,a="asc"===i?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?(0,Z.jsx)(a,(0,r.Z)({},n)):null}));var xa=n(90247);const wa=(0,xa.Z)((0,Z.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Sa=(0,xa.Z)((0,Z.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Ca=(0,xa.Z)((0,Z.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),ka=(0,xa.Z)((0,Z.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),_a=(0,xa.Z)((0,Z.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Ma=(0,xa.Z)((0,Z.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"),Ta=(0,xa.Z)((0,Z.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"),Pa=((0,xa.Z)((0,Z.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,xa.Z)((0,Z.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"),(0,xa.Z)((0,Z.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")),Ra=(0,xa.Z)((0,Z.jsx)("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),Ia=(0,xa.Z)((0,Z.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Da=(0,xa.Z)((0,Z.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Oa=(0,xa.Z)((0,Z.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Aa=(0,xa.Z)((0,Z.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"),Ea=(0,xa.Z)((0,Z.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"),La=(0,xa.Z)((0,Z.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Za=(0,xa.Z)((0,Z.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Fa=(0,xa.Z)((0,Z.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"),ja=(0,xa.Z)((0,Z.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"),Na=(0,xa.Z)((0,Z.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"),za=(0,xa.Z)((0,Z.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ba=(0,xa.Z)((0,Z.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"),Va=(0,xa.Z)((0,Z.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"),$a=(0,xa.Z)((0,Z.jsx)("g",{children:(0,Z.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Ha=(0,xa.Z)((0,Z.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"),Wa=((0,xa.Z)((0,Z.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"),(0,xa.Z)((0,Z.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")),Ga=["native"];const Ua={booleanCellTrueIcon:za,booleanCellFalseIcon:Ea,columnMenuIcon:Aa,openFilterButtonIcon:_a,filterPanelDeleteIcon:Ea,columnFilteredIcon:Ma,columnSelectorIcon:Pa,columnUnsortedIcon:ba,columnSortedAscendingIcon:wa,columnSortedDescendingIcon:Sa,columnResizeIcon:Ra,densityCompactIcon:Ia,densityStandardIcon:Da,densityComfortableIcon:Oa,exportIcon:Na,moreActionsIcon:Ba,treeDataCollapseIcon:ka,treeDataExpandIcon:Ca,groupingCriteriaCollapseIcon:ka,groupingCriteriaExpandIcon:Ca,detailPanelExpandIcon:La,detailPanelCollapseIcon:Za,rowReorderIcon:ja,quickFilterIcon:Ta,quickFilterClearIcon:Ea,columnMenuHideIcon:Va,columnMenuSortAscendingIcon:wa,columnMenuSortDescendingIcon:Sa,columnMenuFilterIcon:Ma,columnMenuManageColumnsIcon:$a,columnMenuClearIcon:Ha,loadIcon:Fa,filterPanelAddIcon:La,filterPanelRemoveAllIcon:Wa,columnReorderIcon:ja},qa=(0,r.Z)({},Ua,{baseBadge:sa,baseCheckbox:la.Z,baseDivider:ua.Z,baseTextField:ui.Z,baseFormControl:ca.Z,baseSelect:da.Z,baseButton:ha.Z,baseIconButton:pa.Z,baseInputAdornment:fa.Z,baseTooltip:ma.Z,basePopper:wi.Z,baseInputLabel:ga.Z,baseSelectOption:function(e){let{native:t}=e,n=(0,l.Z)(e,Ga);return t?(0,Z.jsx)("option",(0,r.Z)({},n)):(0,Z.jsx)(Zt.Z,(0,r.Z)({},n))},baseChip:va.Z}),Ka=(0,r.Z)({},qa,{cell:Oi,skeletonCell:qr,columnHeaderFilterIconButton:function(e){return e.counter?(0,Z.jsx)(Qr,(0,r.Z)({},e)):null},columnHeaderSortIcon:to,columnMenu:Gi,columnHeaders:Ai.n,detailPanels:function(e){return null},footer:lo,footerRowCount:ho,toolbar:null,pinnedRows:function(e){return null},loadingOverlay:Po,noResultsOverlay:Ui,noRowsOverlay:Ro,pagination:Eo,filterPanel:si,columnsPanel:function(e){const t=(0,M.B)();return(0,Z.jsx)(Go,(0,r.Z)({},e,{children:(0,Z.jsx)(t.slots.columnsManagement,(0,r.Z)({},t.slotProps?.columnsManagement))}))},columnsManagement:function(e){const t=(0,L.l)(),n=o.useRef(null),i=(0,v.Pp)(t,O.d$),a=(0,en.Z)((()=>(0,O.g0)(t))).current,s=(0,v.Pp)(t,O.g0),l=(0,M.B)(),[u,c]=o.useState(""),h=(e=>{const{classes:t}=e;return(0,d.Z)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},g.d,t)})(l),{sort:p,searchPredicate:f=di,autoFocusSearchField:m=!0,disableShowHideToggle:y=!1,disableResetButton:b=!1,toggleAllMode:x="all",getTogglableColumns:w,searchInputProps:S}=e,C=o.useMemo((()=>((e,t)=>{const n=new Set(Object.keys(e).filter((t=>!1===e[t]))),r=new Set(Object.keys(t).filter((e=>!1===t[e])));if(n.size!==r.size)return!1;let o=!0;return n.forEach((e=>{r.has(e)||(o=!1)})),o})(s,a)),[s,a]),k=o.useMemo((()=>{switch(p){case"asc":return[...i].sort(((e,t)=>hi.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...i].sort(((e,t)=>-hi.compare(e.headerName||e.field,t.headerName||t.field)));default:return i}}),[i,p]),_=e=>{const{name:n}=e.target;t.current.setColumnVisibility(n,!1===s[n])},T=o.useMemo((()=>{const e=w?w(k):null,t=e?k.filter((({field:t})=>e.includes(t))):k;return u?t.filter((e=>f(e,u.toLowerCase()))):t}),[k,u,f,w]),P=o.useCallback((e=>{const n=(0,O.g0)(t),o=(0,r.Z)({},n),a=w?w(i):null;return("filteredOnly"===x?T:i).forEach((t=>{t.hideable&&(null==a||a.includes(t.field))&&(e?delete o[t.field]:o[t.field]=!1)})),t.current.setColumnVisibilityModel(o)}),[t,i,w,x,T]),R=o.useCallback((e=>{c(e.target.value)}),[]),I=o.useMemo((()=>T.filter((e=>e.hideable))),[T]),D=o.useMemo((()=>I.every((e=>null==s[e.field]||!1!==s[e.field]))),[s,I]),A=o.useMemo((()=>I.every((e=>!1===s[e.field]))),[s,I]),E=o.useRef(null);o.useEffect((()=>{m?n.current.focus():E.current&&"function"==typeof E.current.focus&&E.current.focus()}),[m]);let F=!1;const j=e=>!1===F&&!1!==e.hideable&&(F=!0,!0),N=o.useCallback((()=>{c(""),n.current.focus()}),[]);return(0,Z.jsxs)(o.Fragment,{children:[(0,Z.jsx)(fi,{className:h.header,ownerState:l,children:(0,Z.jsx)(mi,(0,r.Z)({as:l.slots.baseTextField,ownerState:l,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:h.searchInput,value:u,onChange:R,variant:"outlined",size:"small",type:"search",InputProps:{startAdornment:(0,Z.jsx)(l.slots.baseInputAdornment,{position:"start",children:(0,Z.jsx)(l.slots.quickFilterIcon,{})}),endAdornment:(0,Z.jsx)(l.slots.baseIconButton,(0,r.Z)({"aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),size:"small",sx:[u?{visibility:"visible"}:{visibility:"hidden"}],tabIndex:-1,onClick:N},l.slotProps?.baseIconButton,{children:(0,Z.jsx)(l.slots.quickFilterClearIcon,{fontSize:"small"})}))},inputProps:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")},autoComplete:"off",fullWidth:!0},l.slotProps?.baseTextField,S))}),(0,Z.jsxs)(pi,{className:h.root,ownerState:l,children:[T.map((e=>(0,Z.jsx)(li.Z,{className:h.row,control:(0,Z.jsx)(l.slots.baseCheckbox,(0,r.Z)({disabled:!1===e.hideable,checked:!1!==s[e.field],onClick:_,name:e.field,sx:{p:.5},inputRef:j(e)?E:void 0},l.slotProps?.baseCheckbox)),label:e.headerName||e.field},e.field))),0===T.length&&(0,Z.jsx)(vi,{ownerState:l,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),y&&b||!(T.length>0)?null:(0,Z.jsxs)(gi,{ownerState:l,className:h.footer,children:[y?(0,Z.jsx)("span",{}):(0,Z.jsx)(li.Z,{control:(0,Z.jsx)(l.slots.baseCheckbox,(0,r.Z)({disabled:0===I.length,checked:D,indeterminate:!D&&!A,onClick:()=>P(!D),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},l.slotProps?.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),b?null:(0,Z.jsx)(l.slots.baseButton,(0,r.Z)({onClick:()=>t.current.setColumnVisibilityModel(a),disabled:C},l.slotProps?.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]})]})},panel:Mi,row:Ti.J});function Ya(e){return o.useMemo((()=>function(e){if(e.slotProps?.root)return e;const t=Object.keys(e);if(!t.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const n={},r=e.forwardedProps??{};for(let o=0;o{const t=Ya((0,zr.Z)({props:e,name:"MuiDataGrid"})),n=o.useMemo((()=>(0,r.Z)({},Br,t.localeText)),[t.localeText]),i=o.useMemo((()=>function({defaultSlots:e,slots:t}){const n=t;if(!n||0===Object.keys(n).length)return e;const o=(0,r.Z)({},e);return Object.keys(n).forEach((e=>{const t=e;void 0!==n[t]&&(o[t]=n[t])})),o}({defaultSlots:Qa,slots:t.slots})),[t.slots]),a=o.useMemo((()=>Object.keys(qn).reduce(((e,n)=>(e[n]=t[n]??qn[n],e)),{})),[t]);return o.useMemo((()=>(0,r.Z)({},t,a,{localeText:n,slots:i},Xa)),[t,n,i,a])},es={hooks:{useGridAriaAttributes:()=>{const e=(0,y.$)(),t=(0,M.B)(),n=(0,v.Pp)(e,O.FE),r=(0,v.Pp)(e,X.IQ),o=(0,v.Pp)(e,ae.uW),i=(0,v.Pp)(e,Q.J5);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":(0,Ve.Hs)(t)}},useGridRowAriaAttributes:()=>{const e=(0,y.$)(),t=(0,v.Pp)(e,$e.z8),n=(0,v.Pp)(e,ae.uW);return o.useCallback(((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=void 0!==t[r.id]),i}),[e,t,n])}}},ts=(0,s.G)((function(e,t){const n=Ja(e),o=Nr(n.apiRef,n);return(0,Z.jsx)(Ue,{privateApiRef:o,configuration:es,props:n,children:(0,Z.jsx)(Be,(0,r.Z)({className:n.className,style:n.style,sx:n.sx},n.forwardedProps,n.slotProps?.root,{ref:t}))})})),ns=o.memo(ts);ts.propTypes={apiRef:a().shape({current:a().object.isRequired}),"aria-label":a().string,"aria-labelledby":a().string,autoHeight:a().bool,autoPageSize:a().bool,autosizeOnMount:a().bool,autosizeOptions:a().shape({columns:a().arrayOf(a().string),disableColumnVirtualization:a().bool,expand:a().bool,includeHeaders:a().bool,includeOutliers:a().bool,outliersFactor:a().number}),cellModesModel:a().object,checkboxSelection:a().bool,classes:a().object,clipboardCopyCellDelimiter:a().string,columnBufferPx:a().number,columnGroupHeaderHeight:a().number,columnGroupingModel:a().arrayOf(a().object),columnHeaderHeight:a().number,columns:a().arrayOf(a().object).isRequired,columnVisibilityModel:a().object,density:a().oneOf(["comfortable","compact","standard"]),disableAutosize:a().bool,disableColumnFilter:a().bool,disableColumnMenu:a().bool,disableColumnResize:a().bool,disableColumnSelector:a().bool,disableColumnSorting:a().bool,disableDensitySelector:a().bool,disableEval:a().bool,disableMultipleRowSelection:a().bool,disableRowSelectionOnClick:a().bool,disableVirtualization:a().bool,editMode:a().oneOf(["cell","row"]),estimatedRowCount:a().number,experimentalFeatures:a().shape({warnIfFocusStateIsNotSynced:a().bool}),filterDebounceMs:a().number,filterMode:a().oneOf(["client","server"]),filterModel:a().shape({items:a().arrayOf(a().shape({field:a().string.isRequired,id:a().oneOfType([a().number,a().string]),operator:a().string.isRequired,value:a().any})).isRequired,logicOperator:a().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:a().bool,quickFilterLogicOperator:a().oneOf(["and","or"]),quickFilterValues:a().array}),forwardedProps:a().object,getCellClassName:a().func,getDetailPanelContent:a().func,getEstimatedRowHeight:a().func,getRowClassName:a().func,getRowHeight:a().func,getRowId:a().func,getRowSpacing:a().func,hideFooter:a().bool,hideFooterPagination:a().bool,hideFooterSelectedRowCount:a().bool,ignoreDiacritics:a().bool,ignoreValueFormatterDuringExport:a().oneOfType([a().shape({clipboardExport:a().bool,csvExport:a().bool}),a().bool]),indeterminateCheckboxAction:a().oneOf(["deselect","select"]),initialState:a().object,isCellEditable:a().func,isRowSelectable:a().func,keepNonExistentRowsSelected:a().bool,loading:a().bool,localeText:a().object,logger:a().shape({debug:a().func.isRequired,error:a().func.isRequired,info:a().func.isRequired,warn:a().func.isRequired}),logLevel:a().oneOf(["debug","error","info","warn",!1]),nonce:a().string,onCellClick:a().func,onCellDoubleClick:a().func,onCellEditStart:a().func,onCellEditStop:a().func,onCellKeyDown:a().func,onCellModesModelChange:a().func,onClipboardCopy:a().func,onColumnHeaderClick:a().func,onColumnHeaderContextMenu:a().func,onColumnHeaderDoubleClick:a().func,onColumnHeaderEnter:a().func,onColumnHeaderLeave:a().func,onColumnHeaderOut:a().func,onColumnHeaderOver:a().func,onColumnOrderChange:a().func,onColumnResize:a().func,onColumnVisibilityModelChange:a().func,onColumnWidthChange:a().func,onDensityChange:a().func,onFilterModelChange:a().func,onMenuClose:a().func,onMenuOpen:a().func,onPaginationMetaChange:a().func,onPaginationModelChange:a().func,onPreferencePanelClose:a().func,onPreferencePanelOpen:a().func,onProcessRowUpdateError:a().func,onResize:a().func,onRowClick:a().func,onRowCountChange:a().func,onRowDoubleClick:a().func,onRowEditStart:a().func,onRowEditStop:a().func,onRowModesModelChange:a().func,onRowSelectionModelChange:a().func,onSortModelChange:a().func,onStateChange:a().func,pageSizeOptions:a().arrayOf(a().oneOfType([a().number,a().shape({label:a().string.isRequired,value:a().number.isRequired})]).isRequired),pagination:a().oneOf([!0]),paginationMeta:a().shape({hasNextPage:a().bool}),paginationMode:a().oneOf(["client","server"]),paginationModel:a().shape({page:a().number.isRequired,pageSize:a().number.isRequired}),processRowUpdate:a().func,resetPageOnSortFilter:a().bool,resizeThrottleMs:a().number,rowBufferPx:a().number,rowCount:a().number,rowHeight:a().number,rowModesModel:a().object,rowPositionsDebounceMs:a().number,rows:a().arrayOf(a().object),rowSelection:a().bool,rowSelectionModel:a().oneOfType([a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),a().number,a().string]),rowSpacingType:a().oneOf(["border","margin"]),scrollbarSize:a().number,showCellVerticalBorder:a().bool,showColumnVerticalBorder:a().bool,slotProps:a().object,slots:a().object,sortingMode:a().oneOf(["client","server"]),sortingOrder:a().arrayOf(a().oneOf(["asc","desc"])),sortModel:a().arrayOf(a().shape({field:a().string.isRequired,sort:a().oneOf(["asc","desc"])})),sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object]),unstable_rowSpanning:a().bool,virtualizeColumnsWithAutoRowHeight:a().bool}},16002:function(e,t,n){"use strict";n.d(t,{w:()=>y,W:()=>v});var r=n(70252),o=n(65169),i=n(97784),a=n(27378),s=n(18873),l=n(6595),u=n(5056),c=n(44949),d=n(45183),h=n(99967),p=n(47700),f=n(24246);const m=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function g(e){const{colDef:t,id:n,hasFocus:o,tabIndex:g,position:v="bottom-end",focusElementRef:y}=e,b=(0,i.Z)(e,m),[x,w]=a.useState(-1),[S,C]=a.useState(!1),k=(0,p.l)(),_=a.useRef(null),M=a.useRef(null),T=a.useRef(!1),P=a.useRef({}),R=(0,l.V)(),I=(0,u.Z)(),D=(0,u.Z)(),O=(0,h.B)();if(!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const A=t.getActions(k.current.getRowParams(n)),E=A.filter((e=>!e.props.showInMenu)),L=A.filter((e=>e.props.showInMenu)),Z=E.length+(L.length?1:0);a.useLayoutEffect((()=>{o||Object.entries(P.current).forEach((([e,t])=>{t?.stop({},(()=>{delete P.current[e]}))}))}),[o]),a.useEffect((()=>{if(x<0||!_.current)return;if(x>=_.current.children.length)return;_.current.children[x].focus({preventScroll:!0})}),[x]),a.useEffect((()=>{o||(w(-1),T.current=!1)}),[o]),a.useImperativeHandle(y,(()=>({focus(){if(!T.current){const e=A.findIndex((e=>!e.props.disabled));w(e)}}})),[A]),a.useEffect((()=>{x>=Z&&w(Z-1)}),[x,Z]);const F=()=>{C(!1)},j=e=>t=>{P.current[e]=t},N=(e,t)=>n=>{w(e),T.current=!0,t&&t(n)};return(0,f.jsxs)("div",(0,r.Z)({role:"menu",ref:_,tabIndex:-1,className:c._.actionsCell,onKeyDown:e=>{if(Z<=1)return;const t=(e,n)=>{if(e<0||e>A.length)return e;const r=("left"===n?-1:1)*(R?-1:1);return A[e+r]?.props.disabled?t(e+r,n):e+r};let n=x;"ArrowRight"===e.key?n=t(x,"right"):"ArrowLeft"===e.key&&(n=t(x,"left")),n<0||n>=Z||n!==x&&(e.preventDefault(),e.stopPropagation(),w(n))}},b,{children:[E.map(((e,t)=>a.cloneElement(e,{key:t,touchRippleRef:j(t),onClick:N(t,e.props.onClick),tabIndex:x===t?g:-1}))),L.length>0&&D&&(0,f.jsx)(O.slots.baseIconButton,(0,r.Z)({ref:M,id:D,"aria-label":k.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":S,"aria-controls":S?I:void 0,role:"menuitem",size:"small",onClick:()=>{S?F():(C(!0),w(Z-1),T.current=!0)},touchRippleRef:j(D),tabIndex:x===E.length?g:-1},O.slotProps?.baseIconButton,{children:(0,f.jsx)(O.slots.moreActionsIcon,{fontSize:"small"})})),L.length>0&&(0,f.jsx)(d.r,{open:S,target:M.current,position:v,onClose:F,children:(0,f.jsx)(s.Z,{id:I,className:c._.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&F()},"aria-labelledby":D,variant:"menu",autoFocusItem:!0,children:L.map(((e,t)=>a.cloneElement(e,{key:t,closeMenu:F})))})})]}))}const v="actions",y=(0,r.Z)({},o.z,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,f.jsx)(g,(0,r.Z)({},e)),getApplyQuickFilterFn:void 0})},25484:function(e,t,n){"use strict";n.d(t,{p:()=>I});var r=n(70252),o=n(65169),i=n(97784),a=n(27378),s=n(82267),l=n(30505),u=n(62995),c=n(44949),d=n(99967),h=n(47700),p=n(20268),f=n(91652),m=n(24246);const g=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function v(e){const{value:t,rowNode:n}=e,o=(0,i.Z)(e,g),p=(0,h.l)(),f=(0,d.B)(),v=(e=>{const{classes:t}=e;return(0,s.Z)({root:["booleanCell"]},c.d,t)})({classes:f.classes}),y=(0,l.Pp)(p,u.Lq)>0&&"group"===n.type&&!1===f.treeData,b=a.useMemo((()=>t?f.slots.booleanCellTrueIcon:f.slots.booleanCellFalseIcon),[f.slots.booleanCellFalseIcon,f.slots.booleanCellTrueIcon,t]);return y&&void 0===t?null:(0,m.jsx)(b,(0,r.Z)({fontSize:"small",className:v.root,titleAccess:p.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},o))}const y=a.memo(v);var b=n(90496),x=n(5056),w=n(96858);const S=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function C(e){const{id:t,value:n,field:o,className:l,hasFocus:u,onValueChange:p}=e,f=(0,i.Z)(e,S),g=(0,h.l)(),v=a.useRef(null),y=(0,x.Z)(),[C,k]=a.useState(n),_=(0,d.B)(),M=(e=>{const{classes:t}=e;return(0,s.Z)({root:["editBooleanCell"]},c.d,t)})({classes:_.classes}),T=a.useCallback((async e=>{const n=e.target.checked;p&&await p(e,n),k(n),await g.current.setEditCellValue({id:t,field:o,value:n},e)}),[g,o,t,p]);return a.useEffect((()=>{k(n)}),[n]),(0,w.Z)((()=>{u&&v.current.focus()}),[u]),(0,m.jsx)("label",(0,r.Z)({htmlFor:y,className:(0,b.Z)(M.root,l)},f,{children:(0,m.jsx)(_.slots.baseCheckbox,(0,r.Z)({id:y,inputRef:v,checked:Boolean(C),onChange:T,size:"small"},_.slotProps?.baseCheckbox))}))}var k=n(71607),_=n(12709);const M=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],T=e=>"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0,P=(0,_.ZP)("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function R(e){const{item:t,applyValue:n,apiRef:o,focusElementRef:s,clearButton:l,tabIndex:u,label:c,variant:h="standard"}=e,p=(0,i.Z)(e,M),[f,g]=a.useState(T(t.value)),v=(0,d.B)(),y=(0,x.Z)(),b=(0,x.Z)(),w=v.slotProps?.baseSelect||{},S=w.native??!1,C=v.slotProps?.baseSelectOption||{},k=a.useCallback((e=>{const o=T(e.target.value);g(o),n((0,r.Z)({},t,{value:o}))}),[n,t]);a.useEffect((()=>{g(T(t.value))}),[t.value]);const _=c??o.current.getLocaleText("filterPanelInputLabel");return(0,m.jsxs)(P,{children:[(0,m.jsxs)(v.slots.baseFormControl,{fullWidth:!0,children:[(0,m.jsx)(v.slots.baseInputLabel,(0,r.Z)({},v.slotProps?.baseInputLabel,{id:y,shrink:!0,variant:h,children:_})),(0,m.jsxs)(v.slots.baseSelect,(0,r.Z)({labelId:y,id:b,label:_,value:void 0===f?"":String(f),onChange:k,variant:h,notched:"outlined"===h||void 0,native:S,displayEmpty:!0,inputProps:{ref:s,tabIndex:u}},p,w,{children:[(0,m.jsx)(v.slots.baseSelectOption,(0,r.Z)({},C,{native:S,value:"",children:o.current.getLocaleText("filterValueAny")})),(0,m.jsx)(v.slots.baseSelectOption,(0,r.Z)({},C,{native:S,value:"true",children:o.current.getLocaleText("filterValueTrue")})),(0,m.jsx)(v.slots.baseSelectOption,(0,r.Z)({},C,{native:S,value:"false",children:o.current.getLocaleText("filterValueFalse")}))]}))]}),l]})}const I=(0,r.Z)({},o.z,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:e=>e.field!==f.KK&&(0,p.I7)(e.rowNode)?"":(0,m.jsx)(y,(0,r.Z)({},e)),renderEditCell:e=>(0,m.jsx)(C,(0,r.Z)({},e)),sortComparator:k.GH,valueFormatter:(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=T(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:R}],getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>(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}})(e)})},10854:function(e,t,n){"use strict";n.d(t,{n:()=>M,e:()=>_});var r=n(70252),o=n(27378),i=n(97784),a=n(82267),s=n(97048),l=n(27874),u=n(47700),c=n(99967),d=n(44949),h=n(30505),p=n(28594),f=n(24246);const m=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],g=(0,l.G)((function(e,t){const{field:n,id:l,rowNode:g,hasFocus:v,tabIndex:y}=e,b=(0,i.Z)(e,m),x=(0,u.l)(),w=(0,c.B)(),S=(e=>{const{classes:t}=e;return(0,a.Z)({root:["checkboxInput"]},d.d,t)})({classes:w.classes}),C=o.useRef(null),k=o.useRef(null),_=(0,s.Z)(C,t);o.useLayoutEffect((()=>{if(0===y){const e=x.current.getCellElement(l,n);e&&(e.tabIndex=-1)}}),[x,y,l,n]),o.useEffect((()=>{if(v){const e=C.current?.querySelector("input");e?.focus({preventScroll:!0})}else k.current&&k.current.stop({})}),[v]);const M=o.useCallback((e=>{" "===e.key&&e.stopPropagation()}),[]),T=x.current.isRowSelectable(l),P=(0,p.m8)(l,w.rowSelectionPropagation?.parents??!1),{isIndeterminate:R,isChecked:I}=(0,h.Pp)(x,P,h.vV);if("footer"===g.type||"pinnedRow"===g.type)return null;const D="select"===w.indeterminateCheckboxAction?I&&!R:I,O=x.current.getLocaleText(D?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,f.jsx)(w.slots.baseCheckbox,(0,r.Z)({tabIndex:y,checked:D,onChange:e=>{const t={value:e.target.checked,id:l};x.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:S.root,inputProps:{"aria-label":O,name:"select_row"},onKeyDown:M,indeterminate:R,disabled:!T,touchRippleRef:k},w.slotProps?.baseCheckbox,b,{ref:_}))}));var v=n(24102),y=n(85422),b=n(57035),x=n(2883);const w=["field","colDef"],S=(0,l.G)((function(e,t){const n=(0,i.Z)(e,w),[,s]=o.useState(!1),l=(0,u.l)(),m=(0,c.B)(),g=(e=>{const{classes:t}=e;return(0,a.Z)({root:["checkboxInput"]},d.d,t)})({classes:m.classes}),S=(0,h.Pp)(l,v.X5),C=(0,h.Pp)(l,y.Y1),k=(0,h.Pp)(l,b.zn),_=(0,h.Pp)(l,x.Yp),M=o.useMemo((()=>"function"!=typeof m.isRowSelectable?C:C.filter((e=>!!m.keepNonExistentRowsSelected||!!l.current.getRow(e)&&m.isRowSelectable(l.current.getRowParams(e))))),[l,m.isRowSelectable,C,m.keepNonExistentRowsSelected]),T=o.useMemo((()=>(m.pagination&&m.checkboxSelectionVisibleOnly?_:k).reduce(((e,t)=>(e[t]=!0,e)),{})),[m.pagination,m.checkboxSelectionVisibleOnly,_,k]),P=o.useMemo((()=>M.filter((e=>T[e])).length),[M,T]),R=P>0&&P0,D=null!==S&&S.field===e.field?0:-1;o.useLayoutEffect((()=>{const t=l.current.getColumnHeaderElement(e.field);0===D&&t&&(t.tabIndex=-1)}),[D,l,e.field]);const O=o.useCallback((e=>{" "===e.key&&l.current.publishEvent("headerSelectionCheckboxChange",{value:!I})}),[l,I]),A=o.useCallback((()=>{s((e=>!e))}),[]);o.useEffect((()=>l.current.subscribeEvent("rowSelectionChange",A)),[l,A]);const E="select"===m.indeterminateCheckboxAction?I&&!R:I,L=l.current.getLocaleText(E?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,f.jsx)(m.slots.baseCheckbox,(0,r.Z)({indeterminate:R,checked:E,onChange:e=>{const t={value:e.target.checked};l.current.publishEvent("headerSelectionCheckboxChange",t)},className:g.root,inputProps:{"aria-label":L,name:"select_all_rows"},tabIndex:D,onKeyDown:O,disabled:!(0,p.Hs)(m)},m.slotProps?.baseCheckbox,n,{ref:t}))}));var C=n(25484),k=n(97442);const _="__check__",M=(0,r.Z)({},C.p,{type:"custom",field:_,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>void 0!==(0,y.z8)(r)[(0,k.X)(r.current.state,t)],renderHeader:e=>(0,f.jsx)(S,(0,r.Z)({},e)),renderCell:e=>(0,f.jsx)(g,(0,r.Z)({},e))})},65169:function(e,t,n){"use strict";n.d(t,{z:()=>M});var r=n(97784),o=n(70252),i=n(27378),a=n(82267),s=n(96858),l=n(12709),u=n(55879),c=n(27874),d=n(44949),h=n(99967),p=n(47700),f=n(24246);const m=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],g=(0,l.ZP)(u.ZP,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((({theme:e})=>(0,o.Z)({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}))),v=(0,c.G)(((e,t)=>{const n=(0,h.B)(),{id:l,value:u,field:c,colDef:v,hasFocus:y,debounceMs:b=200,isProcessingProps:x,onValueChange:w}=e,S=(0,r.Z)(e,m),C=(0,p.l)(),k=i.useRef(null),[_,M]=i.useState(u),T=(e=>{const{classes:t}=e;return(0,a.Z)({root:["editInputCell"]},d.d,t)})(n),P=i.useCallback((async e=>{const t=e.target.value;w&&await w(e,t);const n=C.current.getColumn(c);let r=t;n.valueParser&&(r=n.valueParser(t,C.current.getRow(l),n,C)),M(r),C.current.setEditCellValue({id:l,field:c,value:r,debounceMs:b,unstable_skipValueParser:!0},e)}),[C,b,c,l,w]),R=C.current.unstable_getEditCellMeta(l,c);return i.useEffect((()=>{"debouncedSetEditCellValue"!==R?.changeReason&&M(u)}),[R,u]),(0,s.Z)((()=>{y&&k.current.focus()}),[y]),(0,f.jsx)(g,(0,o.Z)({inputRef:k,className:T.root,ownerState:n,fullWidth:!0,type:"number"===v.type?v.type:"text",value:_??"",onChange:P,endAdornment:x?(0,f.jsx)(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},S,{ref:t}))}));var y=n(71607),b=n(21008),x=n(48383),w=n(10436),S=n(50928);const C=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp((0,x.hr)(r),"i");return e=>{if(null==e)return t;const n=o.test(String(e));return t?!n:n}},k=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const n=0===o.compare(r,e.toString());return t?!n:n}},_=e=>()=>t=>{const n=""===t||null==t;return e?!n:n},M={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:y.Id,type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:C(e,!1),InputComponent:b.r},{value:"doesNotContain",getApplyFilterFn:C(e,!0),InputComponent:b.r},{value:"equals",getApplyFilterFn:k(e,!1),InputComponent:b.r},{value:"doesNotEqual",getApplyFilterFn:k(e,!0),InputComponent:b.r},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${(0,x.hr)(n)}.*$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:b.r},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${(0,x.hr)(n)}$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:b.r},{value:"isEmpty",getApplyFilterFn:_(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:_(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map((e=>e.trim())),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some((t=>0===r.compare(t,e.toString()||"")))},InputComponent:w.S}])(),renderEditCell:e=>(0,f.jsx)(v,(0,o.Z)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp((0,x.hr)(e),"i");return(e,n,r,o)=>{let i=o.current.getRowFormattedValue(n,r);return o.current.ignoreDiacritics&&(i=(0,S.GS)(i)),null!=i&&t.test(i.toString())}}}},92623:function(e,t,n){"use strict";n.d(t,{r:()=>r});const r=n(27378).createContext(void 0)},2824:function(e,t,n){"use strict";n.d(t,{n:()=>ne});var r=n(70252),o=n(97784),i=n(27378),a=n(18669),s=n(27874),l=n(90496),u=n(12709),c=n(30505),d=n(99967),h=n(62186),p=n(1446),f=n(82267),m=n(5056),g=n(6595),v=n(47700),y=n(44949),b=n(24246);const x=i.memo((e=>{const{colDef:t,open:n,columnMenuId:o,columnMenuButtonId:a,iconButtonRef:s}=e,l=(0,v.l)(),u=(0,d.B)(),c=(e=>{const{classes:t,open:n}=e,r={root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]};return(0,f.Z)(r,y.d,t)})((0,r.Z)({},e,{classes:u.classes})),h=i.useCallback((e=>{e.preventDefault(),e.stopPropagation(),l.current.toggleColumnMenu(t.field)}),[l,t.field]);return(0,b.jsx)("div",{className:c.root,children:(0,b.jsx)(u.slots.baseTooltip,(0,r.Z)({title:l.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},u.slotProps?.baseTooltip,{children:(0,b.jsx)(u.slots.baseIconButton,(0,r.Z)({ref:s,tabIndex:-1,className:c.button,"aria-label":l.current.getLocaleText("columnMenuLabel"),size:"small",onClick:h,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?o:void 0,id:a},u.slotProps?.baseIconButton,{children:(0,b.jsx)(u.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})}));var w=n(81925),S=n(45183);function C({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:o,field:i,open:a,target:s,onExited:l}){const u=(0,v.l)(),c=u.current.getColumn(i),d=(0,w.Z)((e=>{e&&(e.stopPropagation(),s?.contains(e.target))||u.current.hideColumnMenu()}));return s&&c?(0,b.jsx)(S.r,{placement:"bottom-"+("right"===c.align?"start":"end"),open:a,target:s,onClose:d,onExited:l,children:(0,b.jsx)(n,(0,r.Z)({colDef:c,hideMenu:d,open:a,id:e,labelledby:t},o))}):null}var k=n(97048),_=n(4560),M=n(96824);const T=["className","aria-label"],P=(0,_.Z)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),R=(0,s.G)((function(e,t){const{className:n}=e,i=(0,o.Z)(e,T),a=(0,d.B)(),s=(e=>{const{classes:t}=e;return(0,f.Z)({root:["columnHeaderTitle"]},y.d,t)})(a);return(0,b.jsx)(P,(0,r.Z)({className:(0,l.Z)(s.root,n),ownerState:a},i,{ref:t}))}));function I(e){const{label:t,description:n}=e,o=(0,d.B)(),a=i.useRef(null),[s,l]=i.useState(""),u=i.useCallback((()=>{if(!n&&a?.current){const e=(0,M.OF)(a.current);l(e?t:"")}}),[n,t]);return(0,b.jsx)(o.slots.baseTooltip,(0,r.Z)({title:n||s},o.slotProps?.baseTooltip,{children:(0,b.jsx)(R,{onMouseOver:u,ref:a,children:t})}))}var D=n(3150);const O=["resizable","resizing","height","side"];var A=function(e){return e.Left="left",e.Right="right",e}(A||{});function E(e){const{height:t,side:n=A.Right}=e,a=(0,o.Z)(e,O),s=(0,d.B)(),l=(e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,D.Z)(o)}`],icon:["iconSeparator"]};return(0,f.Z)(i,y.d,r)})((0,r.Z)({},e,{side:n,classes:s.classes})),u=i.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,b.jsx)("div",(0,r.Z)({className:l.root,style:{minHeight:t}},a,{onClick:u,children:(0,b.jsx)(s.slots.columnResizeIcon,{className:l.icon})}))}const L=i.memo(E),Z=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],F=(0,s.G)((function(e,t){const{classes:n,colIndex:a,height:s,isResizing:u,sortDirection:c,hasFocus:p,tabIndex:f,separatorSide:m,isDraggable:g,headerComponent:v,description:y,width:x,columnMenuIconButton:w=null,columnMenu:S=null,columnTitleIconButtons:C=null,headerClassName:_,label:M,resizable:T,draggableContainerProps:P,columnHeaderSeparatorProps:R,style:D}=e,O=(0,o.Z)(e,Z),A=(0,h.$)(),E=(0,d.B)(),F=i.useRef(null),j=(0,k.Z)(F,t);let N="none";return null!=c&&(N="asc"===c?"ascending":"descending"),i.useLayoutEffect((()=>{const e=A.current.state.columnMenu;if(p&&!e.open){const e=F.current.querySelector('[tabindex="0"]')||F.current;e?.focus(),A.current.columnHeadersContainerRef?.current&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[A,p]),(0,b.jsxs)("div",(0,r.Z)({className:(0,l.Z)(n.root,_),style:(0,r.Z)({},D,{height:s,width:x}),role:"columnheader",tabIndex:f,"aria-colindex":a+1,"aria-sort":N},O,{ref:j,children:[(0,b.jsxs)("div",(0,r.Z)({className:n.draggableContainer,draggable:g,role:"presentation"},P,{children:[(0,b.jsxs)("div",{className:n.titleContainer,role:"presentation",children:[(0,b.jsx)("div",{className:n.titleContainerContent,children:void 0!==v?v:(0,b.jsx)(I,{label:M,description:y,columnWidth:x})}),C]}),w]})),(0,b.jsx)(L,(0,r.Z)({resizable:!E.disableColumnResize&&!!T,resizing:u,height:s,side:m},R)),S]}))}));var j=n(91652),N=n(83100);const z=(0,a.X)((function(e){const{colDef:t,columnMenuOpen:n,colIndex:o,headerHeight:a,isResizing:s,isLast:u,sortDirection:c,sortIndex:p,filterItemsCounter:v,hasFocus:w,tabIndex:S,disableReorder:k,separatorSide:_,showLeftBorder:T,showRightBorder:P,pinnedPosition:R,pinnedOffset:I}=e,D=(0,h.$)(),O=(0,d.B)(),A=(0,g.V)(),E=i.useRef(null),L=(0,m.Z)(),Z=(0,m.Z)(),z=i.useRef(null),[B,V]=i.useState(n),$=i.useMemo((()=>!O.disableColumnReorder&&!k&&!t.disableReorder),[O.disableColumnReorder,k,t.disableReorder]);let H;t.renderHeader&&(H=t.renderHeader(D.current.getColumnHeaderParams(t.field)));const W=(e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:u,isSiblingFocused:c}=e,d=null!=o,h=null!=s&&s>0,p="number"===t.type,m={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",h&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l===j.FX.LEFT&&"columnHeader--pinnedLeft",l===j.FX.RIGHT&&"columnHeader--pinnedRight",u&&"columnHeader--lastUnpinned",c&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,f.Z)(m,y.d,n)})((0,r.Z)({},e,{classes:O.classes,showRightBorder:P,showLeftBorder:T})),G=i.useCallback((e=>n=>{(0,M.q_)(n)||D.current.publishEvent(e,D.current.getColumnHeaderParams(t.field),n)}),[D,t.field]),U=i.useMemo((()=>({onClick:G("columnHeaderClick"),onContextMenu:G("columnHeaderContextMenu"),onDoubleClick:G("columnHeaderDoubleClick"),onMouseOver:G("columnHeaderOver"),onMouseOut:G("columnHeaderOut"),onMouseEnter:G("columnHeaderEnter"),onMouseLeave:G("columnHeaderLeave"),onKeyDown:G("columnHeaderKeyDown"),onFocus:G("columnHeaderFocus"),onBlur:G("columnHeaderBlur")})),[G]),q=i.useMemo((()=>$?{onDragStart:G("columnHeaderDragStart"),onDragEnter:G("columnHeaderDragEnter"),onDragOver:G("columnHeaderDragOver"),onDragEnd:G("columnHeaderDragEnd")}:{}),[$,G]),K=i.useMemo((()=>({onMouseDown:G("columnSeparatorMouseDown"),onDoubleClick:G("columnSeparatorDoubleClick")})),[G]);i.useEffect((()=>{B||V(n)}),[B,n]);const Y=i.useCallback((()=>{V(!1)}),[]),X=!O.disableColumnMenu&&!t.disableColumnMenu&&(0,b.jsx)(x,{colDef:t,columnMenuId:L,columnMenuButtonId:Z,open:B,iconButtonRef:z}),Q=(0,b.jsx)(C,{columnMenuId:L,columnMenuButtonId:Z,field:t.field,open:n,target:z.current,ContentComponent:O.slots.columnMenu,contentComponentProps:O.slotProps?.columnMenu,onExited:Y}),J=t.sortingOrder??O.sortingOrder,ee=(t.sortable||null!=c)&&!t.hideSortIcons&&!O.disableColumnSorting,te=(0,b.jsxs)(i.Fragment,{children:[!O.disableColumnFilter&&(0,b.jsx)(O.slots.columnHeaderFilterIconButton,(0,r.Z)({field:t.field,counter:v},O.slotProps?.columnHeaderFilterIconButton)),ee&&(0,b.jsx)(O.slots.columnHeaderSortIcon,(0,r.Z)({field:t.field,direction:c,index:p,sortingOrder:J,disabled:!t.sortable},O.slotProps?.columnHeaderSortIcon))]});i.useLayoutEffect((()=>{const e=D.current.state.columnMenu;if(w&&!e.open){const e=E.current.querySelector('[tabindex="0"]')||E.current;e?.focus(),D.current.columnHeadersContainerRef?.current&&(D.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[D,w]);const ne="function"==typeof t.headerClassName?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,re=t.headerName??t.field,oe=i.useMemo((()=>(0,N.Q)((0,r.Z)({},e.style),A,R,I)),[R,I,e.style,A]);return(0,b.jsx)(F,(0,r.Z)({ref:E,classes:W,columnMenuOpen:n,colIndex:o,height:a,isResizing:s,sortDirection:c,hasFocus:w,tabIndex:S,separatorSide:_,isDraggable:$,headerComponent:H,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:X,columnTitleIconButtons:te,headerClassName:(0,l.Z)(ne,u&&y._["columnHeader--last"]),label:re,resizable:!O.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:Q,draggableContainerProps:q,columnHeaderSeparatorProps:K,style:oe},U))}));var B=n(55311),V=n(24414),$=n(50864),H=n(32812);function W(e){const{groupId:t,width:n,depth:o,maxDepth:a,fields:s,height:l,colIndex:u,hasFocus:h,tabIndex:p,isLastColumn:x,pinnedPosition:w,pinnedOffset:S}=e,C=(0,d.B)(),k=(0,g.V)(),_=i.useRef(null),T=(0,v.l)(),P=(0,c.Pp)(T,H.XS),R=t?P[t]:{},{headerName:I=t??"",description:D="",headerAlign:O}=R;let A;const E=t&&P[t]?.renderHeaderGroup,L=i.useMemo((()=>({groupId:t,headerName:I,description:D,depth:o,maxDepth:a,fields:s,colIndex:u,isLastColumn:x})),[t,I,D,o,a,s,u,x]);t&&E&&(A=E(L));const Z=(0,r.Z)({},e,{classes:C.classes,headerAlign:O,depth:o,isDragging:!1}),z=I??t,B=(0,m.Z)(),V=null===t?`empty-group-cell-${B}`:t,$=(e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e,u={root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===s?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===j.FX.LEFT&&"columnHeader--pinnedLeft",l===j.FX.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,f.Z)(u,y.d,t)})(Z);i.useLayoutEffect((()=>{if(h){const e=_.current.querySelector('[tabindex="0"]')||_.current;e?.focus()}}),[T,h]);const W=i.useCallback((e=>t=>{(0,M.q_)(t)||T.current.publishEvent(e,L,t)}),[T,L]),G=i.useMemo((()=>({onKeyDown:W("columnGroupHeaderKeyDown"),onFocus:W("columnGroupHeaderFocus"),onBlur:W("columnGroupHeaderBlur")})),[W]),U="function"==typeof R.headerClassName?R.headerClassName(L):R.headerClassName,q=i.useMemo((()=>(0,N.Q)((0,r.Z)({},e.style),k,w,S)),[w,S,e.style,k]);return(0,b.jsx)(F,(0,r.Z)({ref:_,classes:$,columnMenuOpen:!1,colIndex:u,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:p,isDraggable:!1,headerComponent:A,headerClassName:U,description:D,elementId:V,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:z,"aria-colspan":s.length,"data-fields":`|-${s.join("-|-")}-|`,style:q},G))}var G=n(4257),U=n(71680),q=n(82207),K=n(59566);const Y=(0,u.ZP)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),X=["className"],Q=(0,_.Z)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),J=(0,s.G)((function(e,t){const{className:n}=e,i=(0,o.Z)(e,X),a=(0,d.B)(),s=(e=>{const{classes:t}=e;return(0,f.Z)({root:["columnHeaders"]},y.d,t)})(a);return(0,b.jsx)(Q,(0,r.Z)({className:(0,l.Z)(s.root,n),ownerState:a},i,{role:"presentation",ref:t}))})),ee=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],te=(0,s.G)((function(e,t){const{visibleColumns:n,sortColumnLookup:a,filterColumnLookup:s,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:f,columnHeaderFocus:m,columnGroupHeaderFocus:g,headerGroupingMaxDepth:v,columnMenuState:x,columnVisibility:w,columnGroupsHeaderStructure:S,hasOtherElementInTabSequence:C}=e,k=(0,o.Z)(e,ee),{getInnerProps:_,getColumnHeadersRow:M,getColumnGroupHeadersRows:T}=(e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:u,columnGroupHeaderFocus:f,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:v,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:w}=e,[S,C]=i.useState(""),[k,_]=i.useState(""),M=(0,h.$)(),T=(0,d.B)(),P=(0,c.Pp)(M,H.Cv),R=(0,c.Pp)(M,G.Ag),I=(0,c.Pp)(M,V.VK),D=(0,c.Pp)(M,G.s3),O=(0,c.Pp)(M,G.WH),E=(0,$.Ty)(R,I,D.left.length),L=(0,c.Pp)(M,B.iD),Z=(0,c.Pp)(M,B.Xu),F=(0,c.Pp)(M,B.rA),N=(0,c.Pp)(M,B.Oz),X=(0,c.Pp)(M,B.hh),Q=i.useCallback((e=>_(e.field)),[]),J=i.useCallback((()=>_("")),[]),ee=i.useCallback((e=>C(e.field)),[]),te=i.useCallback((()=>C("")),[]),ne=i.useMemo((()=>D.left.length?{firstColumnIndex:0,lastColumnIndex:D.left.length}:null),[D.left.length]),re=i.useMemo((()=>D.right.length?{firstColumnIndex:t.length-D.right.length,lastColumnIndex:t.length}:null),[D.right.length,t.length]);(0,p.zn)(M,"columnResizeStart",Q),(0,p.zn)(M,"columnResizeStop",J),(0,p.zn)(M,"columnHeaderDragStart",ee),(0,p.zn)(M,"columnHeaderDragEnd",te);const oe=e=>{const{renderContext:n=I}=e||{},r=n.firstColumnIndex,o=n.lastColumnIndex;return{renderedColumns:t.slice(r,o),firstColumnToRender:r,lastColumnToRender:o}},ie=(e,t,n,r=!1)=>{const o=e?.position===j.FX.RIGHT,a=void 0===e?.position,s=D.right.length>0&&o||0===D.right.length&&a,u=E-n;return(0,b.jsxs)(i.Fragment,{children:[a&&(0,b.jsx)("div",{role:"presentation",style:{width:u}}),t,a&&(0,b.jsx)("div",{role:"presentation",className:(0,l.Z)(y._.filler,r&&y._["filler--borderBottom"])}),s&&(0,b.jsx)(U.V,{header:!0,pinnedRight:o,borderBottom:r,borderTop:!1})]})},ae=(e,t={})=>{const{renderedColumns:i,firstColumnToRender:s}=oe(e),l=[];for(let c=0;c{const o=oe(n);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:i,lastColumnToRender:a}=o,l=x[e],u=t[i].field,c=P[u]?.[e]??null,d=l.findIndex((({groupId:e,columnFields:t})=>e===c&&t.includes(u))),h=t[a-1].field,p=P[h]?.[e]??null,g=l.findIndex((({groupId:e,columnFields:t})=>e===p&&t.includes(h))),y=l.slice(d,g+1).map((e=>(0,r.Z)({},e,{columnFields:e.columnFields.filter((e=>!1!==v[e]))}))).filter((e=>e.columnFields.length>0)),w=y[0].columnFields.indexOf(u),S=y[0].columnFields.slice(0,w).reduce(((e,t)=>e+(O[t].computedWidth??0)),0);let C=i;const k=y.map((({groupId:t,columnFields:r},o)=>{const i=null!==f&&f.depth===e&&r.includes(f.field),a=null!==s&&s.depth===e&&r.includes(s.field)?0:-1,l={groupId:t,width:r.reduce(((e,t)=>e+O[t].computedWidth),0),fields:r,colIndex:C,hasFocus:i,tabIndex:a},u=n.position,c=(0,q.a)(u,l.width,C,R,L,X);C+=r.length;let d=o;return u===j.FX.LEFT&&(d=C-1),(0,b.jsx)(W,{groupId:t,width:l.width,fields:l.fields,colIndex:l.colIndex,depth:e,isLastColumn:o===y.length-1,maxDepth:m,height:N,hasFocus:i,tabIndex:a,pinnedPosition:u,pinnedOffset:c,showLeftBorder:(0,K.S)(u,d),showRightBorder:(0,K.y)(u,d,y.length,T.showColumnVerticalBorder,Z)},o)}));return ie(n,k,S)};return{renderContext:I,leftRenderContext:ne,rightRenderContext:re,pinnedColumns:D,visibleColumns:t,columnPositions:R,getFillers:ie,getColumnHeadersRow:()=>(0,b.jsxs)(Y,{role:"row","aria-rowindex":m+1,ownerState:T,className:y._["row--borderBottom"],children:[ne&&ae({position:j.FX.LEFT,renderContext:ne},{disableReorder:!0}),ae({renderContext:I}),re&&ae({position:j.FX.RIGHT,renderContext:re},{disableReorder:!0,separatorSide:A.Left})]}),getColumnsToRender:oe,getColumnGroupHeadersRows:()=>{if(0===m)return null;const e=[];for(let t=0;t({role:"rowgroup"})}})({visibleColumns:n,sortColumnLookup:a,filterColumnLookup:s,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:f,columnHeaderFocus:m,columnGroupHeaderFocus:g,headerGroupingMaxDepth:v,columnMenuState:x,columnVisibility:w,columnGroupsHeaderStructure:S,hasOtherElementInTabSequence:C});return(0,b.jsxs)(J,(0,r.Z)({},k,_(),{ref:t,children:[T(),M()]}))})),ne=(0,a.X)(te)},93014:function(e,t,n){"use strict";n.d(t,{s:()=>r});const r=n(27378).createContext(void 0)},13546:function(e,t,n){"use strict";n.d(t,{J:()=>E});var r=n(70252),o=n(97784),i=n(27378),a=n(90496),s=n(97048),l=n(18669),u=n(27874);var c=n(87269),d=n(44949),h=n(82267);var p=n(99967),f=n(59566),m=n(4257),g=n(30505),v=n(57418),y=n(96824),b=n(10854),x=n(16002),w=n(91652),S=n(4874),C=n(62995),k=n(47052),_=n(71680),M=n(82207),T=n(97601),P=n(62186),R=n(89363),I=n(24246);const D=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],O=(0,R.bG)(k.bj,((e,t)=>{if(!t)return!1;return!!function(e){for(const t in e)return!1;return!0}(e)})),A=(0,u.G)((function(e,t){const{selected:n,rowId:l,row:u,index:R,style:A,rowHeight:E,className:L,visibleColumns:Z,pinnedColumns:F,offsetLeft:j,columnsTotalWidth:N,firstColumnIndex:z,lastColumnIndex:B,focusedColumnIndex:V,isFirstVisible:$,isLastVisible:H,isNotVisible:W,showBottomBorder:G,scrollbarWidth:U,gridHasFiller:q,onClick:K,onDoubleClick:Y,onMouseEnter:X,onMouseLeave:Q,onMouseOut:J,onMouseOver:ee}=e,te=(0,o.Z)(e,D),ne=(0,P.$)(),re=(0,T.x)(),oe=i.useRef(null),ie=(0,p.B)(),ae=(0,v.y)(ne,ie),se=(0,g.Pp)(ne,S.Gm),le=(0,g.Pp)(ne,C.Lq),ue=(0,g.Pp)(ne,m.Ag),ce=ie.rowReordering,de=(0,g.AC)(ne,O,ce),he=(0,s.Z)(oe,t),pe=ne.current.getRowNode(l),fe=(0,g.AC)(ne,k.uR,{rowId:l,editMode:ie.editMode}),me=ie.editMode===c.r2.Row,ge=void 0!==V,ve=ge&&V>=F.left.length&&V=B,be=function(e,t){return(0,h.Z)(t,d.d,e)}(ie.classes,{root:["row",n&&"selected",me&&"row--editable",fe&&"row--editing",$&&"row--firstVisible",H&&"row--lastVisible",G&&"row--borderBottom","auto"===E&&"row--dynamicHeight"]}),xe=re.hooks.useGridRowAriaAttributes();i.useLayoutEffect((()=>{if(ae.range){const e=ne.current.getRowIndexRelativeToVisibleRows(l);void 0!==e&&ne.current.unstable_setLastMeasuredRowIndex(e)}if(oe.current&&"auto"===E)return ne.current.observeRowHeight(oe.current,l)}),[ne,ae.range,E,l]);const we=i.useCallback(((e,t)=>n=>{(0,y.q_)(n)||ne.current.getRow(l)&&(ne.current.publishEvent(e,ne.current.getRowParams(l),n),t&&t(n))}),[ne,l]),Se=i.useCallback((e=>{const t=(0,y.w5)(e.target,d._.cell),n=t?.getAttribute("data-field");if(n){if(n===b.n.field)return;if(n===w.u9)return;if("__reorder__"===n)return;if(ne.current.getCellMode(l,n)===c.Vl.Edit)return;const e=ne.current.getColumn(n);if(e?.type===x.W)return}we("rowClick",K)(e)}),[ne,K,we,l]),{slots:Ce,slotProps:ke,disableColumnReorder:_e}=ie,Me=(0,g.Pp)(ne,(()=>(0,r.Z)({},ne.current.getRowHeightEntry(l))),g.vV),Te=i.useMemo((()=>{if(W)return{opacity:0,width:0,height:0};const e=(0,r.Z)({},A,{maxHeight:"auto"===E?"none":E,minHeight:E,"--height":"number"==typeof E?`${E}px`:E});if(Me.spacingTop){e["border"===ie.rowSpacingType?"borderTopWidth":"marginTop"]=Me.spacingTop}if(Me.spacingBottom){const t="border"===ie.rowSpacingType?"borderBottomWidth":"marginBottom";let n=e[t];"number"!=typeof n&&(n=parseInt(n||"0",10)),n+=Me.spacingBottom,e[t]=n}return e}),[W,E,A,Me,ie.rowSpacingType]),Pe=ne.current.unstable_applyPipeProcessors("rowClassName",[],l),Re=pe?xe(pe,R):void 0;if("function"==typeof ie.getRowClassName){const e=R-(ae.range?.firstRowIndex||0),t=(0,r.Z)({},ne.current.getRowParams(l),{isFirstVisible:0===e,isLastVisible:e===ae.rows.length-1,indexRelativeToCurrentPage:e});Pe.push(ie.getRowClassName(t))}if(!pe)return null;const Ie=(e,t,n,o,i=w.FX.NONE)=>{const a=ne.current.unstable_getCellColSpanInfo(l,n);if(a?.spannedByColSpan)return null;const s=a?.cellProps.width??e.computedWidth,c=a?.cellProps.colSpan??1,d=(0,M.a)(i,e.computedWidth,n,ue,N,U);if("skeletonRow"===pe?.type)return(0,I.jsx)(Ce.skeletonCell,{type:e.type,width:s,height:E,field:e.field,align:e.align},e.field);const h="__reorder__"===e.field,p=!(_e||e.disableReorder),m=de&&!se.length&&le<=1,g=!(p||h&&m),v=i===w.FX.VIRTUAL,y=(0,f.S)(i,t),b=(0,f.y)(i,t,o,ie.showCellVerticalBorder,q);return(0,I.jsx)(Ce.cell,(0,r.Z)({column:e,width:s,rowId:l,align:e.align||"left",colIndex:n,colSpan:c,disableDragEvents:g,isNotVisible:v,pinnedOffset:d,pinnedPosition:i,showLeftBorder:y,showRightBorder:b,row:u,rowNode:pe},ke?.cell),e.field)},De=F.left.map(((e,t)=>Ie(e,t,t,F.left.length,w.FX.LEFT))),Oe=F.right.map(((e,t)=>{const n=Z.length-F.right.length+t;return Ie(e,t,n,F.right.length,w.FX.RIGHT)})),Ae=Z.length-F.left.length-F.right.length,Ee=[];ve&&Ee.push(Ie(Z[V],V-F.left.length,V,Ae,w.FX.VIRTUAL));for(let e=z;e0,borderTop:!$})]}))})),E=(0,l.X)(A)},71680:function(e,t,n){"use strict";n.d(t,{V:()=>s});n(27378);var r=n(90496),o=n(44949),i=n(24246);const a={root:o._.scrollbarFiller,header:o._["scrollbarFiller--header"],borderTop:o._["scrollbarFiller--borderTop"],borderBottom:o._["scrollbarFiller--borderBottom"],pinnedRight:o._["scrollbarFiller--pinnedRight"]};function s({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:o}){return(0,i.jsx)("div",{role:"presentation",className:(0,r.Z)(a.root,e&&a.header,t&&a.borderTop,n&&a.borderBottom,o&&a.pinnedRight)})}},45183:function(e,t,n){"use strict";n.d(t,{r:()=>S});var r=n(70252),o=n(97784),i=n(27378),a=n(90496),s=n(70313),l=n(82267),u=n(96858),c=n(23382),d=n(28866),h=n(75651),p=n(12709),f=n(44949),m=n(99967),g=n(47700),v=n(24246);const y=["open","target","onClose","children","position","className","onExited"],b=e=>{const{classes:t}=e;return(0,l.Z)({root:["menu"]},f.d,t)},x=(0,p.ZP)(h.Z,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((({theme:e})=>({zIndex:e.zIndex.modal,[`& .${f._.menuList}`]:{outline:0}}))),w={"bottom-start":"top left","bottom-end":"top right"};function S(e){const{open:t,target:n,onClose:l,children:h,position:p,className:f,onExited:S}=e,C=(0,o.Z)(e,y),k=(0,g.l)(),_=(0,m.B)(),M=b(_),T=i.useRef(null);(0,u.Z)((()=>{t?T.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(T.current?.focus?.(),T.current=null)}),[t]),i.useEffect((()=>{const e=t?"menuOpen":"menuClose";k.current.publishEvent(e,{target:n})}),[k,t,n]);const P=e=>{e.target&&(n===e.target||n?.contains(e.target))||l(e)};return(0,v.jsx)(x,(0,r.Z)({as:_.slots.basePopper,className:(0,a.Z)(M.root,f),ownerState:_,open:t,anchorEl:n,transition:!0,placement:p},C,_.slotProps?.basePopper,{children:({TransitionProps:e,placement:t})=>{return(0,v.jsx)(s.d,{onClickAway:P,mouseEvent:"onMouseDown",children:(0,v.jsx)(c.Z,(0,r.Z)({},e,{style:{transformOrigin:w[t]},onExited:(n=e?.onExited,e=>{n&&n(),S&&S(e)}),children:(0,v.jsx)(d.Z,{children:h})}))});var n}}))}},10436:function(e,t,n){"use strict";n.d(t,{S:()=>h});var r=n(70252),o=n(97784),i=n(27378),a=n(11774),s=n(5056),l=n(99967),u=n(24246);const c=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],d=["key"];function h(e){const{item:t,applyValue:n,type:h,apiRef:p,focusElementRef:f,color:m,error:g,helperText:v,size:y,variant:b="standard"}=e,x=(0,o.Z)(e,c),w={color:m,error:g,helperText:v,size:y,variant:b},[S,C]=i.useState(t.value||[]),k=(0,s.Z)(),_=(0,l.B)();i.useEffect((()=>{const e=t.value??[];C(e.map(String))}),[t.value]);const M=i.useCallback(((e,o)=>{C(o.map(String)),n((0,r.Z)({},t,{value:[...o.map((e=>"number"===h?Number(e):e))]}))}),[n,t,h]);return(0,u.jsx)(a.Z,(0,r.Z)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:k,value:S,onChange:M,renderTags:(e,t)=>e.map(((e,n)=>{const i=t({index:n}),{key:a}=i,s=(0,o.Z)(i,d);return(0,u.jsx)(_.slots.baseChip,(0,r.Z)({variant:"outlined",size:"small",label:e},s),a)})),renderInput:e=>(0,u.jsx)(_.slots.baseTextField,(0,r.Z)({},e,{label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.Z)({},e.InputLabelProps,{shrink:!0}),inputRef:f,type:h||"text"},w,_.slotProps?.baseTextField))},x))}},21008:function(e,t,n){"use strict";n.d(t,{r:()=>d});var r=n(70252),o=n(97784),i=n(27378),a=n(5056),s=n(60203),l=n(99967),u=n(24246);const c=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function d(e){const{item:t,applyValue:n,type:d,apiRef:p,focusElementRef:f,tabIndex:m,disabled:g,clearButton:v,InputProps:y,variant:b="standard"}=e,x=(0,o.Z)(e,c),w=(0,s.Z)(),[S,C]=i.useState(h(t.value)),[k,_]=i.useState(!1),M=(0,a.Z)(),T=(0,l.B)(),P=i.useCallback((e=>{const o=h(e.target.value);C(o),_(!0),w.start(T.filterDebounceMs,(()=>{const e=(0,r.Z)({},t,{value:"number"!==d||Number.isNaN(Number(o))?o:Number(o),fromInput:M});n(e),_(!1)}))}),[w,T.filterDebounceMs,t,d,M,n]);return i.useEffect((()=>{t.fromInput===M&&null!=t.value||C(h(t.value))}),[M,t]),(0,u.jsx)(T.slots.baseTextField,(0,r.Z)({id:M,label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),value:S??"",onChange:P,variant:b,type:d||"text",InputProps:(0,r.Z)({},k||v?{endAdornment:k?(0,u.jsx)(T.slots.loadIcon,{fontSize:"small",color:"action"}):v}:{},{disabled:g},y,{inputProps:(0,r.Z)({tabIndex:m},y?.inputProps)}),InputLabelProps:{shrink:!0},inputRef:f},x,T.slotProps?.baseTextField))}function h(e){if(null!=e&&""!==e)return String(e)}},38443:function(e,t,n){"use strict";n.d(t,{jv:()=>o,sf:()=>i,sk:()=>a});var r=n(70252);function o(e){return"singleSelect"===e?.type}function i(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions((0,r.Z)({field:e.field},t)):e.valueOptions}function a(e,t,n){if(void 0===t)return;const r=t.find((t=>{const r=n(t);return String(r)===String(e)}));return n(r)}},44949:function(e,t,n){"use strict";n.d(t,{_:()=>i,d:()=>o});var r=n(6749);function o(e){return(0,r.ZP)("MuiDataGrid",e)}const i=(0,n(44124).Z)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},92302:function(e,t,n){"use strict";n.d(t,{G:()=>r});const r=n(27378).createContext(void 0)},97442:function(e,t,n){"use strict";n.d(t,{X:()=>o});var r=n(20268);const o=(e,t)=>r._1 in t?t[r._1]:e.props.getRowId?e.props.getRowId(t):t.id},32812:function(e,t,n){"use strict";n.d(t,{Cv:()=>i,WT:()=>s,XS:()=>a,uW:()=>l});var r=n(89363);const o=e=>e.columnGrouping,i=(0,r.Xw)(o,(e=>e?.unwrappedGroupingModel??{})),a=(0,r.Xw)(o,(e=>e?.lookup??{})),s=(0,r.Xw)(o,(e=>e?.headerStructure??[])),l=(0,r.P1)(o,(e=>e?.maxDepth??0))},76045:function(e,t,n){"use strict";n.d(t,{I:()=>r,J:()=>o});let r=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const o={left:[],right:[]}},4257:function(e,t,n){"use strict";n.d(t,{d$:()=>l,xs:()=>m,ph:()=>g,pK:()=>d,s3:()=>h,FE:()=>c,WH:()=>s,qH:()=>f,Zi:()=>a,wH:()=>i,g0:()=>u,Ag:()=>p});var r=n(89363),o=n(76045);const i=e=>e.columns,a=(0,r.P1)(i,(e=>e.orderedFields)),s=(0,r.P1)(i,(e=>e.lookup)),l=(0,r.Xw)(a,s,((e,t)=>e.map((e=>t[e])))),u=(0,r.P1)(i,(e=>e.columnVisibilityModel)),c=(0,r.Xw)(l,u,((e,t)=>e.filter((e=>!1!==t[e.field])))),d=(0,r.Xw)(c,(e=>e.map((e=>e.field)))),h=(0,r.Xw)(i,(e=>e.pinnedColumns),d,(e=>e.isRtl),((e,t,n,r)=>{const i=function(e,t,n){if(!Array.isArray(e.left)&&!Array.isArray(e.right))return o.J;if(0===e.left?.length&&0===e.right?.length)return o.J;const r=(e,t)=>Array.isArray(e)?e.filter((e=>t.includes(e))):[],i=r(e.left,t),a=t.filter((e=>!i.includes(e))),s=r(e.right,a);if(n)return{left:s,right:i};return{left:i,right:s}}(t,n,r);return{left:i.left.map((t=>e.lookup[t])),right:i.right.map((t=>e.lookup[t]))}}));const p=(0,r.Xw)(c,(e=>{const t=[];let n=0;for(let r=0;re.filter((e=>e.filterable)))),m=(0,r.Xw)(l,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{}))),g=(0,r.Xw)(l,(e=>e.some((e=>void 0!==e.colSpan))))},27221:function(e,t,n){"use strict";n.d(t,{bc:()=>he,eH:()=>ue,VU:()=>se,QC:()=>de,Jb:()=>pe});var r=n(70252),o=n(16819),i=n(65169),a=n(71607),s=n(48383),l=n(21008),u=n(10436);const c=e=>null==e?null:Number(e),d=(0,r.Z)({},i.z,{type:"number",align:"right",headerAlign:"right",sortComparator:a.GH,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>(0,s.hj)(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>c(t)===e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>c(t)!==e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)>e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)>=e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)<=e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:u.S,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>c(t)===c(e)});var h=n(97784),p=n(27378),f=n(5056),m=n(60203),g=n(99967),v=n(24246);const y=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function b(e,t){if(null==e)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":"date"===t?n.toISOString().substring(0,10):"datetime-local"===t?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function x(e){const{item:t,applyValue:n,type:o,apiRef:i,focusElementRef:a,InputProps:s,clearButton:l,tabIndex:u,disabled:c}=e,d=(0,h.Z)(e,y),x=(0,m.Z)(),[w,S]=p.useState((()=>b(t.value,o))),[C,k]=p.useState(!1),_=(0,f.Z)(),M=(0,g.B)(),T=p.useCallback((e=>{x.clear();const o=e.target.value;S(o),k(!0),x.start(M.filterDebounceMs,(()=>{const e=new Date(o);n((0,r.Z)({},t,{value:Number.isNaN(e.getTime())?void 0:e})),k(!1)}))}),[n,t,M.filterDebounceMs,x]);return p.useEffect((()=>{const e=b(t.value,o);S(e)}),[t.value,o]),(0,v.jsx)(M.slots.baseTextField,(0,r.Z)({fullWidth:!0,id:_,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),value:w,onChange:T,variant:"standard",type:o||"text",InputLabelProps:{shrink:!0},inputRef:a,InputProps:(0,r.Z)({},C||l?{endAdornment:C?(0,v.jsx)(M.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:c},s,{inputProps:(0,r.Z)({max:"datetime-local"===o?"9999-12-31T23:59":"9999-12-31",tabIndex:u},s?.inputProps)})},d,M.slotProps?.baseTextField))}function w(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return e=>{if(!e)return!1;if(r)return t(e.getTime(),i);const o=new Date(e);return n?o.setSeconds(0,0):o.setHours(0,0,0,0),t(o.getTime(),i)}}const S=e=>[{value:"is",getApplyFilterFn:t=>w(t,((e,t)=>e===t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>w(t,((e,t)=>e!==t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>w(t,((e,t)=>e>t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>w(t,((e,t)=>e>=t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>w(t,((e,t)=>ew(t,((e,t)=>e<=t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}];var C=n(82267),k=n(96858),_=n(55879),M=n(12709),T=n(44949),P=n(47700);const R=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],I=(0,M.ZP)(_.ZP)({fontSize:"inherit"});function D(e){const{id:t,value:n,field:o,colDef:i,hasFocus:a,inputProps:s,onValueChange:l}=e,u=(0,h.Z)(e,R),c="dateTime"===i.type,d=(0,P.l)(),f=p.useRef(null),m=p.useMemo((()=>{let e,t;if(e=null==n?null:n instanceof Date?n:new Date((n??"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,c?16:10)}return{parsed:e,formatted:t}}),[n,c]),[y,b]=p.useState(m),x=(e=>{const{classes:t}=e;return(0,C.Z)({root:["editInputCell"]},T.d,t)})({classes:(0,g.B)().classes}),w=p.useCallback((e=>{if(""===e)return null;const[t,n]=e.split("T"),[r,o,i]=t.split("-"),a=new Date;if(a.setFullYear(Number(r),Number(o)-1,Number(i)),a.setHours(0,0,0,0),n){const[e,t]=n.split(":");a.setHours(Number(e),Number(t),0,0)}return a}),[]),S=p.useCallback((async e=>{const n=e.target.value,r=w(n);l&&await l(e,r),b({parsed:r,formatted:n}),d.current.setEditCellValue({id:t,field:o,value:r},e)}),[d,o,t,l,w]);return p.useEffect((()=>{b((e=>m.parsed!==e.parsed&&m.parsed?.getTime()!==e.parsed?.getTime()?m:e))}),[m]),(0,k.Z)((()=>{a&&f.current.focus()}),[a]),(0,v.jsx)(I,(0,r.Z)({inputRef:f,fullWidth:!0,className:x.root,type:c?"datetime-local":"date",inputProps:(0,r.Z)({max:c?"9999-12-31T23:59":"9999-12-31"},s),value:y.formatted,onChange:S},u))}const O=e=>(0,v.jsx)(D,(0,r.Z)({},e));var A=n(97442);function E({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join("\n"))}const L=(0,r.Z)({},i.z,{type:"date",sortComparator:a.mA,valueFormatter:(e,t,n,r)=>{if(!e)return"";return E({value:e,columnType:"date",rowId:(0,A.X)(r.current.state,t),field:n.field}),e.toLocaleDateString()},filterOperators:S(),renderEditCell:O,pastedValueParser:e=>new Date(e)}),Z=(0,r.Z)({},i.z,{type:"dateTime",sortComparator:a.mA,valueFormatter:(e,t,n,r)=>{if(!e)return"";return E({value:e,columnType:"dateTime",rowId:(0,A.X)(r.current.state,t),field:n.field}),e.toLocaleString()},filterOperators:S(!0),renderEditCell:O,pastedValueParser:e=>new Date(e)});var F=n(25484),j=n(17418),N=n(87269),z=n(38443);const B=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],V=["MenuProps"];function $(e){const t=(0,g.B)(),{id:n,value:o,field:i,row:a,colDef:s,hasFocus:l,error:u,onValueChange:c,initialOpen:d=t.editMode===N.r2.Cell}=e,f=(0,h.Z)(e,B),m=(0,P.l)(),y=p.useRef(null),b=p.useRef(null),[x,w]=p.useState(d),S=(t.slotProps?.baseSelect||{}).native??!1,C=t.slotProps?.baseSelect||{},{MenuProps:_}=C,M=(0,h.Z)(C,V);if((0,k.Z)((()=>{l&&b.current?.focus()}),[l]),!(0,z.jv)(s))return null;const T=(0,z.sf)(s,{id:n,row:a});if(!T)return null;const R=s.getOptionValue,I=s.getOptionLabel;return T&&s?(0,v.jsx)(t.slots.baseSelect,(0,r.Z)({ref:y,inputRef:b,value:o,onChange:async e=>{if(!(0,z.jv)(s)||!T)return;w(!1);const t=e.target,r=(0,z.sk)(t.value,T,R);c&&await c(e,r),await m.current.setEditCellValue({id:n,field:i,value:r},e)},open:x,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||w(!0)},MenuProps:(0,r.Z)({onClose:(e,o)=>{if(t.editMode!==N.r2.Row){if("backdropClick"===o||"Escape"===e.key){const t=m.current.getCellParams(n,i);m.current.publishEvent("cellEditStop",(0,r.Z)({},t,{reason:"Escape"===e.key?j.r.escapeKeyDown:j.r.cellFocusOut}))}}else w(!1)}},_),error:u,native:S,fullWidth:!0},f,M,{children:T.map((e=>{const n=R(e);return(0,p.createElement)(t.slots.baseSelectOption,(0,r.Z)({},t.slotProps?.baseSelectOption||{},{native:S,key:n,value:n}),I(e))}))})):null}const H=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],W=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:o,isSelectNative:i,baseSelectOptionProps:a})=>["",...(0,z.sf)(e)||[]].map((e=>{const s=o(e);let l=n(e);return""===l&&(l=" "),(0,p.createElement)(t,(0,r.Z)({},a,{native:i,key:s,value:s}),l)})),G=(0,M.ZP)("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function U(e){const{item:t,applyValue:n,type:o,apiRef:i,focusElementRef:a,placeholder:s,tabIndex:l,label:u,variant:c="standard",clearButton:d}=e,m=(0,h.Z)(e,H),y=t.value??"",b=(0,f.Z)(),x=(0,f.Z)(),w=(0,g.B)(),S=w.slotProps?.baseSelect?.native??!1;let C=null;if(t.field){const e=i.current.getColumn(t.field);(0,z.jv)(e)&&(C=e)}const k=C?.getOptionValue,_=C?.getOptionLabel,M=p.useMemo((()=>(0,z.sf)(C)),[C]),T=p.useCallback((e=>{let o=e.target.value;o=(0,z.sk)(o,M,k),n((0,r.Z)({},t,{value:o}))}),[M,k,n,t]);if(!(0,z.jv)(C))return null;const P=u??i.current.getLocaleText("filterPanelInputLabel");return(0,v.jsxs)(G,{children:[(0,v.jsxs)(w.slots.baseFormControl,{fullWidth:!0,children:[(0,v.jsx)(w.slots.baseInputLabel,(0,r.Z)({},w.slotProps?.baseInputLabel,{id:x,htmlFor:b,shrink:!0,variant:c,children:P})),(0,v.jsx)(w.slots.baseSelect,(0,r.Z)({id:b,label:P,labelId:x,value:y,onChange:T,variant:c,type:o||"text",inputProps:{tabIndex:l,ref:a,placeholder:s??i.current.getLocaleText("filterPanelInputPlaceholder")},native:S,notched:"outlined"===c||void 0},m,w.slotProps?.baseSelect,{children:W({column:C,OptionComponent:w.slots.baseSelectOption,getOptionLabel:_,getOptionValue:k,isSelectNative:S,baseSelectOptionProps:w.slotProps?.baseSelectOption})}))]}),d]})}var q=n(70678),K=n(11774);const Y=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],X=["key"],Q=(0,q.D)();function J(e){const{item:t,applyValue:n,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:u,variant:c="standard"}=e,d=(0,h.Z)(e,Y),m={color:a,error:s,helperText:l,size:u,variant:c},y=(0,f.Z)(),b=(0,g.B)();let x=null;if(t.field){const e=o.current.getColumn(t.field);(0,z.jv)(e)&&(x=e)}const w=x?.getOptionValue,S=x?.getOptionLabel,C=p.useCallback(((e,t)=>w(e)===w(t)),[w]),k=p.useMemo((()=>(0,z.sf)(x)||[]),[x]),_=p.useMemo((()=>Array.isArray(t.value)?t.value.reduce(((e,t)=>{const n=k.find((e=>w(e)===t));return null!=n&&e.push(n),e}),[]):[]),[w,t.value,k]),M=p.useCallback(((e,o)=>{n((0,r.Z)({},t,{value:o.map(w)}))}),[n,t,w]);return(0,v.jsx)(K.Z,(0,r.Z)({multiple:!0,options:k,isOptionEqualToValue:C,filterOptions:Q,id:y,value:_,onChange:M,getOptionLabel:S,renderTags:(e,t)=>e.map(((e,n)=>{const o=t({index:n}),{key:i}=o,a=(0,h.Z)(o,X);return(0,v.jsx)(b.slots.baseChip,(0,r.Z)({variant:"outlined",size:"small",label:S(e)},a),i)})),renderInput:e=>(0,v.jsx)(b.slots.baseTextField,(0,r.Z)({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.Z)({},e.InputLabelProps,{shrink:!0}),inputRef:i,type:"singleSelect"},m,b.slotProps?.baseTextField))},d))}const ee=e=>null!=e&&(0,s.Kn)(e)?e.value:e,te=(0,r.Z)({},i.z,{type:"singleSelect",getOptionLabel:e=>(0,s.Kn)(e)?e.label:String(e),getOptionValue:e=>(0,s.Kn)(e)?e.value:e,valueFormatter(e,t,n,r){const o=(0,A.X)(r.current.state,t);if(!(0,z.jv)(n))return"";const i=(0,z.sf)(n,{id:o,row:t});if(null==e)return"";if(!i)return e;if(!(e=>"object"==typeof e[0])(i))return n.getOptionLabel(e);const a=i.find((t=>n.getOptionValue(t)===e));return a?n.getOptionLabel(a):""},renderEditCell:e=>(0,v.jsx)($,(0,r.Z)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>ee(t)===ee(e.value),InputComponent:U},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>ee(t)!==ee(e.value),InputComponent:U},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(ee);return e=>t.includes(ee(e))},InputComponent:J}],pastedValueParser:(e,t,n)=>{const r=n,o=(0,z.sf)(r)||[],i=r.getOptionValue;if(o.find((t=>i(t)===e)))return e}});var ne=n(16002);var re=n(4257),oe=n(50986),ie=n(94106),ae=n(32812);const se=["maxWidth","minWidth","width","flex"],le={string:i.z,number:d,date:L,dateTime:Z,boolean:F.p,singleSelect:te,[ne.W]:ne.w,custom:i.z};const ue=(e,t)=>{const n={};let o=0,a=0;const l=[];e.orderedFields.forEach((t=>{let u=e.lookup[t],c=0,d=!1;!1!==e.columnVisibilityModel[t]&&(u.flex&&u.flex>0?(o+=u.flex,d=!0):c=(0,s.uZ)(u.width||i.z.width,u.minWidth||i.z.minWidth,u.maxWidth||i.z.maxWidth),a+=c),u.computedWidth!==c&&(u=(0,r.Z)({},u,{computedWidth:c})),d&&l.push(u),n[t]=u}));const u=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),c=Math.max(u-a,0);if(o>0&&u>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map((e=>e.field))),o={all:{},frozenFields:[],freeze:e=>{const t=o.all[e];t&&!0!==t.frozen&&(o.all[e].frozen=!0,o.frozenFields.push(e))}};return function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,u=0;o.frozenFields.forEach((e=>{s-=o.all[e].computedWidth,l-=o.all[e].flex}));for(let e=0;et.maxWidth&&(u+=t.maxWidth-r,r=t.maxWidth,a.max[t.field]=!0),o.all[t.field]={frozen:!1,computedWidth:r,flex:t.flex}}u<0?Object.keys(a.max).forEach((e=>{o.freeze(e)})):u>0?Object.keys(a.min).forEach((e=>{o.freeze(e)})):n.forEach((({field:e})=>{o.freeze(e)})),i()}(),o.all}({initialFreeSpace:c,totalFlexUnits:o,flexColumns:l});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return(0,r.Z)({},e,{lookup:n})};function ce(e){let t=le.string;return e&&le[e]&&(t=le[e]),t}const de=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:i=(0,re.g0)(e),keepOnlyColumnsToUpsert:a=!1})=>{const s=!e.current.state.columns;let l;if(s)l={orderedFields:[],lookup:{},columnVisibilityModel:i};else{const t=(0,re.wH)(e.current.state);l={orderedFields:a?[]:[...t.orderedFields],lookup:(0,r.Z)({},t.lookup),columnVisibilityModel:i}}let u={};a&&!s&&(u=Object.keys(l.lookup).reduce(((e,t)=>(0,r.Z)({},e,{[t]:!1})),{}));const c={};t.forEach((e=>{const{field:t}=e;c[t]=!0,u[t]=!0;let n=l.lookup[t];null==n?(n=(0,r.Z)({},ce(e.type),{field:t,hasBeenResized:!1}),l.orderedFields.push(t)):a&&l.orderedFields.push(t),n&&n.type!==e.type&&(n=(0,r.Z)({},ce(e.type),{field:t}));let i=n.hasBeenResized;se.forEach((t=>{void 0!==e[t]&&(i=!0,-1===e[t]&&(e[t]=1/0))})),l.lookup[t]=(0,o.Z)(n,(0,r.Z)({},e,{hasBeenResized:i}))})),a&&!s&&Object.keys(l.lookup).forEach((e=>{u[e]||delete l.lookup[e]}));const d=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,i=Object.keys(o);if(0===i.length&&0===n.length)return e;const a={},s=[];for(let t=0;t!a[e]))],u=(0,r.Z)({},e.lookup);for(let e=0;e{n[e]=-1===t?1/0:t})),u[t]=n}return(0,r.Z)({},e,{orderedFields:l,lookup:u})})(e.current.unstable_applyPipeProcessors("hydrateColumns",l),n);return ue(d,e.current.getRootDimensions?.()??void 0)};function he({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;aa,EH:()=>i});var r=n(89363);const o={compact:.7,comfortable:1.3,standard:1},i=e=>e.density,a=(0,r.P1)(i,(e=>o[e]))},55311:function(e,t,n){"use strict";n.d(t,{D6:()=>f,E$:()=>a,H4:()=>l,Oz:()=>h,RS:()=>s,Wp:()=>u,Xu:()=>c,hh:()=>p,iD:()=>i,jY:()=>o,rA:()=>d});var r=n(89363);const o=e=>e.dimensions,i=(0,r.P1)(o,(e=>e.columnsTotalWidth)),a=e=>e.dimensions.rowHeight,s=e=>e.dimensions.contentSize.height,l=e=>e.dimensions.hasScrollX,u=e=>e.dimensions.hasScrollY,c=e=>e.dimensions.columnsTotalWidthe.dimensions.headerHeight,h=e=>e.dimensions.groupHeaderHeight,p=e=>e.dimensions.hasScrollY?e.dimensions.scrollbarSize:0,f=e=>{const t=e.dimensions.hasScrollX?e.dimensions.scrollbarSize:0,n=e.dimensions.viewportOuterSize.height-e.dimensions.minimumSize.height>0;return!(0===t&&!n)}},47052:function(e,t,n){"use strict";n.d(t,{Am:()=>s,bj:()=>i,uR:()=>a});var r=n(89363),o=n(87269);const i=e=>e.editRows,a=(0,r.bG)(i,((e,{rowId:t,editMode:n})=>n===o.r2.Row&&Boolean(e[t]))),s=(0,r.bG)(i,((e,{rowId:t,field:n})=>e[t]?.[n]??null))},57035:function(e,t,n){"use strict";n.d(t,{AF:()=>x,Az:()=>u,D7:()=>d,DY:()=>b,IQ:()=>g,Lp:()=>f,_g:()=>c,a4:()=>m,uf:()=>l,xf:()=>v,zn:()=>h});var r=n(89363),o=n(4874),i=n(4257),a=n(62995);const s=e=>e.filter,l=(0,r.P1)(s,(e=>e.filterModel)),u=(0,r.P1)(l,(e=>e.quickFilterValues)),c=(0,r.P1)(s,(e=>e.filteredRowsLookup)),d=((0,r.P1)(s,(e=>e.filteredChildrenCountLookup)),(0,r.P1)(s,(e=>e.filteredDescendantCountLookup)),(0,r.Xw)((e=>e.visibleRowsLookup),o.sX,a.Lq,l,u,((e,t,n,r,o)=>n<2&&!r.items.length&&!o?.length?t:t.filter((t=>!1!==e[t.id]))))),h=(0,r.Xw)(d,(e=>e.map((e=>e.id)))),p=(0,r.Xw)(c,o.sX,((e,t)=>t.filter((t=>!1!==e[t.id])))),f=(0,r.Xw)(p,(e=>e.map((e=>e.id)))),m=((0,r.Xw)(h,a.Kd,((e,t)=>{const n={};let r=0;return e.reduce(((e,o)=>{const i=t[o];return n[i.depth]||(n[i.depth]=0),i.depth>r&&(n[i.depth]=0),r=i.depth,n[i.depth]+=1,e[o]=n[i.depth],e}),{})})),(0,r.Xw)(d,a.Kd,a.Lq,((e,t,n)=>n<2?e:e.filter((e=>0===t[e.id]?.depth))))),g=(0,r.P1)(d,(e=>e.length)),v=(0,r.P1)(m,(e=>e.length)),y=(0,r.P1)(p,(e=>e.length)),b=((0,r.P1)(y,v,((e,t)=>e-t)),(0,r.Xw)(l,i.WH,((e,t)=>e.items?.filter((e=>{if(!e.field)return!1;const n=t[e.field];if(!n?.filterOperators||0===n?.filterOperators?.length)return!1;const r=n.filterOperators.find((t=>t.value===e.operator));return!!r&&(!r.InputComponent||null!=e.value&&""!==e.value?.toString())}))))),x=(0,r.Xw)(b,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{})))},74914:function(e,t,n){"use strict";n.d(t,{R:()=>o,c:()=>i});var r=n(43780);const o={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},i=()=>({items:[],logicOperator:r.G.And,quickFilterValues:[],quickFilterLogicOperator:r.G.And})},50928:function(e,t,n){"use strict";n.d(t,{p3:()=>u,S:()=>d,Tv:()=>g,GS:()=>h,NF:()=>c,tY:()=>v,W$:()=>b});var r=n(70252),o=n(43780),i=n(74914);function a(e){return{current:e.current.getPublicApi()}}var s=n(4257);let l;const u=(e,t)=>{const n=(0,r.Z)({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=(0,s.WH)(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},c=(e,t,n)=>{const o=e.items.length>1;let i;i=o&&t?[e.items[0]]:e.items;const a=o&&i.some((e=>null==e.id));return i.some((e=>null==e.operator))||a?(0,r.Z)({},e,{items:i.map((e=>u(e,n)))}):e.items!==i?(0,r.Z)({},e,{items:i}):e},d=(e,t,n)=>o=>(0,r.Z)({},o,{filterModel:c(e,t,n)}),h=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,p=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){const r=n.valueParser;o=Array.isArray(e.value)?e.value?.map((e=>r(e,void 0,n,t))):r(e.value,void 0,n,t)}else o=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(o=h(o));const s=(0,r.Z)({},e,{value:o}),l=n.filterOperators;if(!l?.length)throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const u=l.find((e=>e.value===s.operator));if(!u)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${s.operator}'.`);const c=a(t),d=u.getApplyFilterFn(s,n);return"function"!=typeof d?null:{item:s,fn:e=>{let r=t.current.getRowValue(e,n);return i&&(r=h(r)),d(r,e,n,c)}}};let f=1;const m=(e,t,n)=>{const{items:r}=e,o=r.map((e=>p(e,t))).filter((e=>!!e));if(0===o.length)return null;if(n||!function(){if(void 0!==l)return l;try{l=new Function("return true")()}catch(e){l=!1}return l}())return(e,t)=>{const n={};for(let r=0;r`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\nconst result$$ = {\n${o.map(((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`)).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(f)));f+=1;return(e,t)=>i(o,e,t)},g=e=>e.quickFilterExcludeHiddenColumns??!0,v=(e,t,n)=>{const r=m(e,t,n),o=((e,t)=>{const n=e.quickFilterValues?.filter(Boolean)??[];if(0===n.length)return null;const r=g(e)?(0,s.pK)(t):(0,s.Zi)(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,l=a(t);return r.forEach((e=>{const r=t.current.getColumn(e),a=r?.getApplyQuickFilterFn;a&&o.push({column:r,appliers:n.map((e=>{const t=i?h(e):e;return{fn:a(t,r,l)}}))})})),function(e,r){const a={};e:for(let s=0;snull!=e,b=(e,t,n,r,a)=>{const s=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==p(e,t)))),e.cleanedFilterItems))(a,r,n.items),l=e.filter(y),u=t.filter(y);if(l.length>0){const e=e=>l.some((t=>t[e.id]));if((n.logicOperator??(0,i.c)().logicOperator)===o.G.And){if(!s.every(e))return!1}else{if(!s.some(e))return!1}}if(u.length>0&&null!=n.quickFilterValues){const e=e=>u.some((t=>t[e]));if((n.quickFilterLogicOperator??(0,i.c)().quickFilterLogicOperator)===o.G.And){if(!n.quickFilterValues.every(e))return!1}else{if(!n.quickFilterValues.some(e))return!1}}return!0}},24102:function(e,t,n){"use strict";n.d(t,{TR:()=>i,X5:()=>c,d6:()=>u,jC:()=>s,jc:()=>d,ud:()=>a});var r=n(89363);const o=e=>e.focus,i=(0,r.P1)(o,(e=>e.cell)),a=(0,r.P1)(o,(e=>e.columnHeader)),s=((0,r.P1)(o,(e=>e.columnHeaderFilter)),(0,r.P1)(o,(e=>e.columnGroupHeader))),l=e=>e.tabIndex,u=(0,r.P1)(l,(e=>e.cell)),c=(0,r.P1)(l,(e=>e.columnHeader)),d=((0,r.P1)(l,(e=>e.columnHeaderFilter)),(0,r.P1)(l,(e=>e.columnGroupHeader)))},94106:function(e,t,n){"use strict";n.d(t,{WT:()=>i,tr:()=>a,xs:()=>s});var r=n(89363);const o=e=>e.headerFiltering,i=(0,r.P1)(o,(e=>e?.enabled??!1)),a=(0,r.P1)(o,(e=>e.editing)),s=(0,r.P1)(o,(e=>e.menuOpen))},86585:function(e,t,n){"use strict";n.d(t,{z:()=>r});const r=e=>e.listViewColumn},2883:function(e,t,n){"use strict";n.d(t,{B_:()=>p,O$:()=>u,OR:()=>d,RM:()=>c,UB:()=>f,Yp:()=>v,bu:()=>h,fL:()=>s,iJ:()=>y});var r=n(89363),o=n(57035),i=n(62995),a=n(21942);const s=e=>e.pagination,l=(0,r.P1)(s,(e=>e.enabled&&"client"===e.paginationMode)),u=(0,r.P1)(s,(e=>e.paginationModel)),c=(0,r.P1)(s,(e=>e.rowCount)),d=(0,r.P1)(s,(e=>e.meta)),h=(0,r.P1)(u,(e=>e.page)),p=(0,r.P1)(u,(e=>e.pageSize)),f=(0,r.P1)(u,c,((e,t)=>(0,a.tR)(t,e.pageSize,e.page))),m=(0,r.Xw)(l,u,i.Kd,i.Lq,o.D7,o.a4,((e,t,n,r,o,i)=>{if(!e)return null;const a=i.length,s=Math.min(t.pageSize*t.page,a-1),l=-1===t.pageSize?a-1:Math.min(s+t.pageSize-1,a-1);if(-1===s||-1===l)return null;if(r<2)return{firstRowIndex:s,lastRowIndex:l};const u=i[s],c=l-s+1,d=o.findIndex((e=>e.id===u.id));let h=d,p=0;for(;h0)&&(h+=1),0===t&&(p+=1))}return{firstRowIndex:d,lastRowIndex:h-1}})),g=(0,r.Xw)(o.D7,m,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),v=(0,r.Xw)(o.zn,m,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),y=(0,r.Xw)(l,m,g,o.D7,((e,t,n,r)=>e?{rows:n,range:t,rowToIndexMap:n.reduce(((e,t,n)=>(e.set(t.model,n),e)),new Map)}:{rows:r,range:0===r.length?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowToIndexMap:r.reduce(((e,t,n)=>(e.set(t.model,n),e)),new Map)}))},21942:function(e,t,n){"use strict";n.d(t,{Ip:()=>l,NZ:()=>s,Xd:()=>a,dG:()=>o,tR:()=>i});var r=n(1446);const o=e=>e?0:100,i=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):-1===e?n+2:0,a=e=>({page:0,pageSize:e?0:100}),s=(e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0),l=(e,t)=>{if(t===r.cG.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))}},6764:function(e,t,n){"use strict";n.d(t,{R:()=>i,e:()=>o});var r=n(89363);const o=e=>e.preferencePanel,i=(0,r.bG)(o,((e,t)=>!(!e.open||e.labelId!==t)))},55332:function(e,t,n){"use strict";n.d(t,{y:()=>r});var r=function(e){return e.filters="filters",e.columns="columns",e}(r||{})},85422:function(e,t,n){"use strict";n.d(t,{Y1:()=>i,bR:()=>s,xD:()=>a,z8:()=>l});var r=n(89363),o=n(62995);const i=e=>e.rowSelection,a=(0,r.P1)(i,(e=>e.length)),s=(0,r.Xw)(i,o.J4,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),l=(0,r.Xw)(i,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{})))},28594:function(e,t,n){"use strict";n.d(t,{HR:()=>f,Hs:()=>h,SJ:()=>p,m8:()=>d});var r=n(1446),o=n(20268),i=n(57035),a=n(4874),s=n(85422),l=n(62995),u=n(89363);function c(e,t){const n=(0,l.Kd)(e),r=(0,a.aV)(e),o=(0,i._g)(e),s=n[t];if(!s||"group"!==s.type)return[];const u=[];for(let i=r.findIndex((e=>e===t))+1;is.depth;i+=1){const t=r[i];!1!==o[t]&&e.current.isRowSelectable(t)&&u.push(t)}return u}function d(e,t){return(0,u.P1)(l.Kd,a.aV,i._g,s.z8,((n,r,o,i)=>{const a=n[e];if(!a||"group"!==a.type)return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;for(let t=r.findIndex((t=>t===e))+1;ta.depth;t+=1){const e=r[t];!1!==o[e]&&(s+=1,void 0!==i[e]&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}}))}function h(e){return e.signature===r.cG.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const p=(e,t,n,r,a,l)=>{const u=(0,i._g)(e),d=(0,s.z8)(e),h=new Set([]);if(r||a){if(r){const r=t[n];if("group"===r?.type){c(e,n).forEach((e=>{l(e),h.add(e)}))}}if(a){const r=e=>{if(d[e]!==e&&!h.has(e))return!1;const n=t[e];return"group"!==n?.type||n.children.every(r)},i=n=>{const a=((e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return null==o?[]:e[o].children.filter((e=>e!==n&&!1!==t[e]))})(t,u,n);if(0===a.length||a.every(r)){const r=t[n].parent;null!=r&&r!==o.U5&&e.current.isRowSelectable(r)&&(l(r),h.add(r),i(r))}};i(n)}}},f=(e,t,n,r,i,a)=>{const l=(0,s.z8)(e);if(i||r){if(i){const e=((e,t)=>{const n=[];let r=t;for(;null!=r&&r!==o.U5;){const t=e[r];if(!t)return n;n.push(r),r=t.parent}return n})(t,n);e.forEach((e=>{l[e]===e&&a(e)}))}if(r){const r=t[n];if("group"===r?.type){c(e,n).forEach((e=>{a(e)}))}}}}},41862:function(e,t,n){"use strict";n.d(t,{mf:()=>i,uR:()=>s,zq:()=>a});var r=n(89363);const o=e=>e.rowSpanning,i=(0,r.P1)(o,(e=>e.hiddenCells)),a=(0,r.P1)(o,(e=>e.spannedCells)),s=(0,r.P1)(o,(e=>e.hiddenCellOriginMap))},21484:function(e,t,n){"use strict";n.d(t,{k:()=>r});const r=e=>e.rowsMeta},62995:function(e,t,n){"use strict";n.d(t,{G$:()=>s,GG:()=>d,J4:()=>l,J5:()=>y,Kd:()=>c,Kf:()=>v,Le:()=>h,Lq:()=>f,Qr:()=>u,Vk:()=>a,hh:()=>i,i$:()=>p,yM:()=>m});var r=n(89363);const o=e=>e.rows,i=(0,r.P1)(o,(e=>e.totalRowCount)),a=(0,r.P1)(o,(e=>e.loading)),s=(0,r.P1)(o,(e=>e.totalTopLevelRowCount)),l=(0,r.P1)(o,(e=>e.dataRowIdToModelLookup)),u=(0,r.P1)(o,(e=>e.dataRowIdToIdLookup)),c=(0,r.P1)(o,(e=>e.tree)),d=(0,r.P1)(o,(e=>e.groupsToFetch)),h=(0,r.P1)(o,(e=>e.groupingName)),p=(0,r.P1)(o,(e=>e.treeDepths)),f=(0,r.Xw)(o,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter((([,e])=>e>0)).map((([e])=>Number(e))).sort(((e,t)=>t-e))[0]??0)+1})),m=(0,r.P1)(o,(e=>e.dataRowIds)),g=(0,r.P1)(o,(e=>e?.additionalRowGroups)),v=(0,r.Xw)(g,(e=>{const t=e?.pinnedRows;return{bottom:t?.bottom?.map((e=>({id:e.id,model:e.model??{}})))??[],top:t?.top?.map((e=>({id:e.id,model:e.model??{}})))??[]}})),y=(0,r.P1)(v,(e=>(e?.top?.length||0)+(e?.bottom?.length||0)))},20268:function(e,t,n){"use strict";n.d(t,{E2:()=>a,I7:()=>d,IX:()=>c,JX:()=>y,PO:()=>l,U5:()=>o,Wj:()=>m,ZD:()=>u,_1:()=>i,bm:()=>v,jI:()=>s,m1:()=>f,qJ:()=>g,u4:()=>h,vn:()=>p});var r=n(70252);const o="auto-generated-group-node-root",i=Symbol("mui.id_autogenerated"),a=()=>({type:"group",id:o,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});const s=(e,t,n)=>{const r=t?t(e):e.id;return function(e,t,n="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join("\n"))}(r,e,n),r},l=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let n=0;n{const n=e[o];return Math.max(t,n.children.length+(null==n.footerId?0:1))},c=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:o,previousTreeDepths:i,previousGroupsToFetch:a})=>{const s=e.current.caches.rows,{tree:l,treeDepths:c,dataRowIds:d,groupingName:h,groupsToFetch:p=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:i,updates:s.updates,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIdToModelLookup:s.dataRowIdToModelLookup,previousGroupsToFetch:a}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:l,treeDepths:c,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIds:d,dataRowIdToModelLookup:s.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,r.Z)({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:u({tree:f.tree,rowCountProp:t}),groupingName:h,loading:n,groupsToFetch:p})},d=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,h=(e,t,n)=>{const r=e[t];if("group"!==r.type)return[];const o=[];for(let t=0;t{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;n.forEach((e=>{const n=s(e,t,"A row was provided without id when calling updateRows():");i.has(n)?i.set(n,(0,r.Z)({},i.get(n),e)):i.set(n,e)}));const a={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:(0,r.Z)({},e.updates.idToActionLookup),groupKeys:o},l=(0,r.Z)({},e.dataRowIdToModelLookup),u=(0,r.Z)({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};i.forEach(((e,t)=>{const n=a.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!l[t])return;return null!=n&&(c[n][t]=!0),a.actions.remove.push(t),delete l[t],void delete u[t]}const o=l[t];if(o)return"remove"===n?(c.remove[t]=!0,a.actions.modify.push(t)):null==n&&a.actions.modify.push(t),void(l[t]=(0,r.Z)({},o,e));"remove"===n?(c.remove[t]=!0,a.actions.insert.push(t)):null==n&&a.actions.insert.push(t),l[t]=e,u[t]=t}));const d=Object.keys(c);for(let e=0;e0&&(a.actions[t]=a.actions[t].filter((e=>!n[e])))}return{dataRowIdToModelLookup:l,dataRowIdToIdLookup:u,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},f="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function m(e,t,n){const o=[];return t.forEach((t=>{const i=s(t,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if("pinnedRow"===a?.type){const n=e.current.caches.pinnedRows,o=n.idLookup[i];o&&(n.idLookup[i]=(0,r.Z)({},o,t))}else o.push(t)})),o}const g=(e,t,n)=>"number"==typeof e&&e>0?e:t,v=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),y=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n")},4874:function(e,t,n){"use strict";n.d(t,{Gm:()=>u,Nl:()=>c,aV:()=>s,sX:()=>l});var r=n(89363),o=n(62995),i=n(20268);const a=e=>e.sorting,s=(0,r.P1)(a,(e=>e.sortedRows)),l=(0,r.Xw)(s,o.J4,o.Kd,((e,t,n)=>e.reduce(((e,r)=>{const o=t[r];if(o)e.push({id:r,model:o});else{const t=n[r];t&&(0,i.I7)(t)&&e.push({id:r,model:{[i._1]:r}})}return e}),[]))),u=(0,r.P1)(a,(e=>e.sortModel)),c=(0,r.Xw)(u,(e=>e.reduce(((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t)),{})));(0,r.Xw)(s,(e=>e.reduce(((e,t,n)=>(e[t]=n,e)),Object.create(null))))},71607:function(e,t,n){"use strict";n.d(t,{E8:()=>a,GH:()=>h,Id:()=>d,Te:()=>i,mA:()=>p,oX:()=>s,vY:()=>l});var r=n(70252),o=n(62995);const i=(e,t)=>t&&e.length>1?[e[0]]:e,a=(e,t)=>n=>(0,r.Z)({},n,{sorting:(0,r.Z)({},n.sorting,{sortModel:i(e,t)})}),s=(e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);if(!n||null===e.sort)return null;let r;return r=n.getSortComparator?n.getSortComparator(e.sort):"desc"===e.sort?(...e)=>-1*n.sortComparator(...e):n.sortComparator,r?{getSortCellParams:e=>({id:e,field:n.field,rowNode:(0,o.Kd)(t)[e],value:t.current.getCellValue(e,n.field),api:t.current}),comparator:r}:null})(e,t))).filter((e=>!!e));return 0===n.length?null:e=>e.map((e=>({node:e,params:n.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>{return r=e,o=t,n.reduce(((e,t,n)=>{if(0!==e)return e;const i=r.params[n],a=o.params[n];return t.comparator(i.value,a.value,i,a)}),0);var r,o})).map((e=>e.node.id))},l=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},u=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,c=new Intl.Collator,d=(e,t)=>{const n=u(e,t);return null!==n?n:"string"==typeof e?c.compare(e.toString(),t.toString()):e-t},h=(e,t)=>{const n=u(e,t);return null!==n?n:Number(e)-Number(t)},p=(e,t)=>{const n=u(e,t);return null!==n?n:e>t?1:eh});var r=n(70252),o=n(42849),i=n(89363),a=n(4257),s=n(24414),l=n(24102),u=n(2883),c=n(62995);const d=(0,o.P1)(l.TR,s.r8,u.iJ,a.FE,c.J4,((e,t,n,r,o)=>{if(!e)return!1;const i=o[e.id];if(!i)return!1;const a=n.rowToIndexMap.get(i),s=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex((t=>t.field===e.field));return!(void 0!==a&&-1!==s&&a>=t.firstRowIndex&&a<=t.lastRowIndex)})),h=(0,i.Xw)(d,a.FE,u.iJ,c.J4,l.TR,((e,t,n,o,i)=>{if(!e)return null;const a=o[i.id];if(!a)return null;const s=n.rowToIndexMap.get(a);if(void 0===s)return null;const l=t.findIndex((e=>e.field===i.field));return-1===l?null:(0,r.Z)({},i,{rowIndex:s,columnIndex:l})}))},24414:function(e,t,n){"use strict";n.d(t,{IC:()=>i,VK:()=>l,pf:()=>a,r8:()=>s});var r=n(89363);const o=e=>e.virtualization,i=((0,r.P1)(o,(e=>e.enabled)),(0,r.P1)(o,(e=>e.enabledForColumns))),a=(0,r.P1)(o,(e=>e.enabledForRows)),s=(0,r.P1)(o,(e=>e.renderContext)),l=(0,r.Xw)((e=>e.virtualization.renderContext.firstColumnIndex),(e=>e.virtualization.renderContext.lastColumnIndex),((e,t)=>({firstColumnIndex:e,lastColumnIndex:t})))},50864:function(e,t,n){"use strict";n.d(t,{Ty:()=>G,cD:()=>N});var r=n(70252),o=n(27378),i=n(31542),a=n(81925),s=n(96858),l=n(99565),u=n(60203),c=n(6595),d=n(23418),h=n(55311),p=n(62186),f=n(99967),m=n(30505);const g=()=>{};var v=n(4257),y=n(62995),b=n(57418),x=n(1446);const w=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox");var S=n(48383),C=n(85422),k=n(21484),_=n(27221),M=n(24414),T=n(42591),P=n(41862),R=n(86585),I=n(20268),D=n(76045),O=n(63799),A=n(31346),E=n(86382),L=n(24246);var Z=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(Z||{});const F={top:0,left:0},j=Object.freeze(new Map),N=()=>{const e=(0,p.$)(),t=(0,f.B)(),{unstable_listView:n}=t,k=(0,m.Pp)(e,(()=>n?[(0,R.z)(e.current.state)]:(0,v.FE)(e))),_=(0,m.Pp)(e,M.pf)&&!E.P,P=(0,m.Pp)(e,M.IC)&&!E.P,N=(0,m.Pp)(e,y.Kf),$=(0,v.s3)(e),H=n?D.J:$,W=N.bottom.length>0,[q,K]=o.useState(j),Y=(0,c.V)(),X=(0,m.Pp)(e,C.z8),Q=(0,b.y)(e),J=e.current.mainElementRef,ee=e.current.virtualScrollerRef,te=e.current.virtualScrollbarVerticalRef,ne=e.current.virtualScrollbarHorizontalRef,re=(0,m.Pp)(e,v.ph),oe=o.useRef(!1),ie=(0,m.Pp)(e,h.E$),ae=(0,m.Pp)(e,h.RS),se=(0,m.Pp)(e,h.iD),le=(0,m.Pp)(e,z),ue=(0,m.Pp)(e,h.hh),ce=(0,m.Pp)(e,h.Xu),de=o.useRef(null),he=o.useCallback((t=>{if(J.current=t,!t)return;const n=t.getBoundingClientRect();let r={width:(0,A.T)(n.width,1),height:(0,A.T)(n.height,1)};if((!de.current||r.width!==de.current.width&&r.height!==de.current.height)&&(de.current=r,e.current.publishEvent("resize",r)),"undefined"==typeof ResizeObserver)return;const o=new ResizeObserver((t=>{const n=t[0];if(!n)return;const o={width:(0,A.T)(n.contentRect.width,1),height:(0,A.T)(n.contentRect.height,1)};o.width===r.width&&o.height===r.height||(e.current.publishEvent("resize",o),r=o)}));return o.observe(t),d.default>=19?()=>{J.current=null,o.disconnect()}:void 0}),[e,J]),pe=o.useRef(t.initialState?.scroll??F),fe=o.useRef(!1),me=o.useRef(F),ge=o.useRef(T.bH),ve=(0,m.Pp)(e,M.r8),ye=(0,m.Pp)(e,O.l),be=(0,u.Z)(),xe=o.useRef(void 0),we=(0,l.Z)((()=>((e,t,n,r,o)=>({direction:Z.NONE,buffer:U(e,Z.NONE,t,n,r,o)}))(Y,t.rowBufferPx,t.columnBufferPx,15*ie,300))).current,Se=o.useCallback((t=>{if(function(e,t){if(e===t)return!0;return e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}(t,e.current.state.virtualization.renderContext))return;const n=t.firstRowIndex!==ge.current.firstRowIndex||t.lastRowIndex!==ge.current.lastRowIndex;e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{renderContext:t})})));(0,h.jY)(e.current.state).isReady&&n&&(ge.current=t,e.current.publishEvent("renderedRowsIntervalChange",t)),me.current=pe.current}),[e]),Ce=(0,a.Z)((()=>{const n=ee.current;if(!n)return;const r=(0,h.jY)(e.current.state),o=Math.ceil(r.minimumSize.height-r.viewportOuterSize.height),a=Math.ceil(r.minimumSize.width-r.viewportInnerSize.width),s={top:(0,S.uZ)(n.scrollTop,0,o),left:Y?(0,S.uZ)(n.scrollLeft,-a,0):(0,S.uZ)(n.scrollLeft,0,a)},l=s.left-pe.current.left,u=s.top-pe.current.top,c=0!==l||0!==u;pe.current=s;const d=c?function(e,t){if(0===e&&0===t)return Z.NONE;return Math.abs(t)>=Math.abs(e)?t>0?Z.DOWN:Z.UP:e>0?Z.RIGHT:Z.LEFT}(l,u):Z.NONE,p=Math.abs(pe.current.top-me.current.top),f=Math.abs(pe.current.left-me.current.left),m=p>=ie||f>=50,g=we.direction!==d;if(!(m||g))return ve;if(g)switch(d){case Z.NONE:case Z.LEFT:case Z.RIGHT:xe.current=void 0;break;default:xe.current=ve}we.direction=d,we.buffer=U(Y,d,t.rowBufferPx,t.columnBufferPx,15*ie,300);const v=V(B(e,t,_,P),pe.current,we);return i.flushSync((()=>{Se(v)})),be.start(1e3,Ce),v})),ke=()=>{if(!(0,h.jY)(e.current.state).isReady&&(_||P))return;const n=V(B(e,t,_,P),pe.current,we);xe.current=void 0,Se(n)},_e=(0,a.Z)((()=>{if(fe.current)return void(fe.current=!1);const t=Ce();e.current.publishEvent("scrollPositionChange",{top:pe.current.top,left:pe.current.left,renderContext:t})})),Me=(0,a.Z)((t=>{e.current.publishEvent("virtualScrollerWheel",{},t)})),Te=(0,a.Z)((t=>{e.current.publishEvent("virtualScrollerTouchMove",{},t)})),Pe=o.useMemo((()=>({overflowX:!le||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0})),[le,t.autoHeight,n]),Re=o.useMemo((()=>{const e={width:le?se:"auto",flexBasis:ae,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=I.m1),e}),[se,ae,le]),Ie=o.useCallback((t=>{t&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:se,contentHeight:ae})}),[e,se,ae]);return(0,s.Z)((()=>{oe.current&&e.current.updateRenderContext?.()}),[e,P,_]),(0,s.Z)((()=>{n&&(ee.current.scrollLeft=0)}),[n,ee]),((e,t)=>{const n=o.useRef(!1);(0,s.Z)((()=>n.current||!e?g:(n.current=!0,t())),[n.current||e])})(ve!==T.bH,(()=>{if(e.current.publishEvent("scrollPositionChange",{top:pe.current.top,left:pe.current.left,renderContext:ve}),oe.current=!0,t.initialState?.scroll&&ee.current){const n=ee.current,{top:r,left:o}=t.initialState.scroll,i={top:!(r>0),left:!(o>0)};if(!i.left&&se&&(n.scrollLeft=o,fe.current=!0,i.left=!0),!i.top&&ae&&(n.scrollTop=r,fe.current=!0,i.top=!0),!i.top||!i.left){const t=e.current.subscribeEvent("virtualScrollerContentSizeChange",(e=>{!i.left&&e.columnsTotalWidth&&(n.scrollLeft=o,fe.current=!0,i.left=!0),!i.top&&e.contentHeight&&(n.scrollTop=r,fe.current=!0,i.top=!0),i.left&&i.top&&t()}));return t}}})),e.current.register("private",{updateRenderContext:ke}),(0,x.x3)(e,"sortedRowsSet",ke),(0,x.x3)(e,"paginationModelChange",ke),(0,x.x3)(e,"columnsChange",ke),{renderContext:ve,setPanels:K,getRows:(n={})=>{if(!n.rows&&!Q.range)return[];let o=ve;n.renderContext&&(o=n.renderContext,o.firstColumnIndex=ve.firstColumnIndex,o.lastColumnIndex=ve.lastColumnIndex);const i=!W&&void 0===n.position||W&&"bottom"===n.position,a=void 0!==n.position;let s;switch(n.position){case"top":s=0;break;case"bottom":s=N.top.length+Q.rows.length;break;case void 0:s=N.top.length}const l=n.rows??Q.rows,u=o.firstRowIndex,c=Math.min(o.lastRowIndex,l.length),d=n.rows?(0,S.w6)(0,n.rows.length):(0,S.w6)(u,c);let h=-1;!a&&ye&&(ye.rowIndexc&&(d.push(ye.rowIndex),h=ye.rowIndex));const p=[],f=t.slotProps?.row,m=(0,v.Ag)(e);return d.forEach((u=>{const{id:c,model:d}=l[u],g=(Q?.range?.firstRowIndex||0)+s+u;if(re){const t=H.left.length,n=k.length-H.right.length;e.current.calculateColSpan({rowId:c,minFirstColumn:t,maxLastColumn:n,columns:k}),H.left.length>0&&e.current.calculateColSpan({rowId:c,minFirstColumn:0,maxLastColumn:H.left.length,columns:k}),H.right.length>0&&e.current.calculateColSpan({rowId:c,minFirstColumn:k.length-H.right.length,maxLastColumn:k.length,columns:k})}const v=e.current.rowHasAutoHeight(c)?"auto":e.current.unstable_getRowHeight(c);let y;y=null!=X[c]&&e.current.isRowSelectable(c);let b=!1;void 0===n.position&&(b=0===u);let x=!1;const w=u===l.length-1;if(i)if(a)x=w;else{u===Q.rows.length-1&&(x=!0)}let S=o;xe.current&&u>=xe.current.firstRowIndex&&u({ref:he}),getScrollerProps:()=>({ref:ee,onScroll:_e,onWheel:Me,onTouchMove:Te,style:Pe,role:"presentation",tabIndex:w?-1:void 0}),getContentProps:()=>({style:Re,role:"presentation",ref:Ie}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:te,scrollPosition:pe}),getScrollbarHorizontalProps:()=>({ref:ne,scrollPosition:pe}),getScrollAreaProps:()=>({scrollPosition:pe})}};function z(e){return e.dimensions.viewportOuterSize.width>0&&e.dimensions.columnsTotalWidth>e.dimensions.viewportOuterSize.width}function B(e,t,n,r){const o=(0,h.jY)(e.current.state),i=(0,b.j)(e,t),a=t.unstable_listView?[(0,R.z)(e.current.state)]:(0,v.FE)(e),s=(0,P.uR)(e),l=e.current.state.rows.dataRowIds.at(-1),u=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:void 0!==l?e.current.unstable_getRowHeight(l):0,lastColumnWidth:u?.computedWidth??0,rowsMeta:(0,k.k)(e.current.state),columnPositions:(0,v.Ag)(e),rows:i.rows,range:i.range,pinnedColumns:(0,v.s3)(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function V(e,t,n){const o={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length};if(e.listView)return(0,r.Z)({},o,{lastColumnIndex:1});const{top:i,left:a}=t,s=Math.abs(a)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min($(e,i,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const n=e.hiddenCellsOriginMap[t];if(n){const e=Math.min(...Object.values(n));t=Math.min(t,e)}const r=e.autoHeight?t+e.rows.length:$(e,i+e.viewportInnerHeight);o.firstRowIndex=t,o.lastRowIndex=r}if(e.enabledForColumns){let t=0,r=e.columnPositions.length,i=!1;const[a,l]=W({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let t=a;t=e.range.lastRowIndex);const i=(0,S.uZ)(r-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?H(t,e.rowsMeta.positions,n):function(e,t,n,r){let o=1;for(;n=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n?.atStart){s=e-((i===t.length-1?n.lastPosition:t[i+1])-a)s,bH:()=>a,fO:()=>l});var r=n(70252),o=n(27378),i=n(94757);const a={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},s=(e,t)=>{const{disableVirtualization:n,autoHeight:o}=t,i={enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!o,renderContext:a};return(0,r.Z)({},e,{virtualization:i})};function l(e,t){const n=n=>{e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabled:n,enabledForColumns:n,enabledForRows:n&&!t.autoHeight})})))},a={unstable_setVirtualization:n,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabledForColumns:t})})))}};(0,i.h)(e,a,"public"),o.useEffect((()=>{n(!t.disableVirtualization)}),[t.disableVirtualization,t.autoHeight])}},47700:function(e,t,n){"use strict";n.d(t,{l:()=>i});var r=n(27378),o=n(92623);function i(){const e=r.useContext(o.r);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},1446:function(e,t,n){"use strict";n.d(t,{cG:()=>a,zn:()=>u,x3:()=>d});var r=n(27378);class o{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,n){this.timeouts||(this.timeouts=new Map);const r=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,r)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach(((e,t)=>{this.unregister({cleanupToken:t})})),this.timeouts=void 0)}}class i{constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}register(e,t,n){this.registry.register(e,t,n)}unregister(e){this.registry.unregister(e)}reset(){}}var a=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(a||{});class s{}const l={registry:null},u=function(e){let t=0;return function(n,a,l,u){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new i:new o);const[c]=r.useState(new s),d=r.useRef(null),h=r.useRef(null);h.current=l;const p=r.useRef(null);if(!d.current&&h.current){const r=(e,t,n)=>{t.defaultMuiPrevented||h.current?.(e,t,n)};d.current=n.current.subscribeEvent(a,r,u),t+=1,p.current={cleanupToken:t},e.registry.register(c,(()=>{d.current?.(),d.current=null,p.current=null}),p.current)}else!h.current&&d.current&&(d.current(),d.current=null,p.current&&(e.registry.unregister(p.current),p.current=null));r.useEffect((()=>{if(!d.current&&h.current){const e=(e,t,n)=>{t.defaultMuiPrevented||h.current?.(e,t,n)};d.current=n.current.subscribeEvent(a,e,u)}return p.current&&e.registry&&(e.registry.unregister(p.current),p.current=null),()=>{d.current?.(),d.current=null}}),[n,a,u])}}(l),c={isFirst:!0};function d(e,t,n){u(e,t,n,c)}},94757:function(e,t,n){"use strict";n.d(t,{h:()=>i});var r=n(27378),o=n(96858);function i(e,t,n){const i=r.useRef(!0);(0,o.Z)((()=>{i.current=!1,e.current.register(n,t)}),[e,n,t]),i.current&&e.current.register(n,t)}},97601:function(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(27378),o=n(93014);const i=()=>{const e=r.useContext(o.s);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},62186:function(e,t,n){"use strict";n.d(t,{$:()=>i,j:()=>o});var r=n(27378);const o=r.createContext(void 0);function i(){const e=r.useContext(o);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},99967:function(e,t,n){"use strict";n.d(t,{B:()=>i});var r=n(27378),o=n(92302);const i=()=>{const e=r.useContext(o.G);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},30505:function(e,t,n){"use strict";n.d(t,{AC:()=>v,Pp:()=>g,vV:()=>d});var r=n(27378),o=n(44473),i=n(70644),a=n(99565);function s(e){return e.acceptsApiRef}function l(e,t){return s(t)?t(e):t(e.current.state)}function u(e,t,n,r){return s(t)?t(e,n):t(e.current.state,r)}const c=Object.is,d=o.w,h=(e,t)=>e===t||e.length===t.length&&e.every(((e,n)=>e===t[n])),p=()=>({state:null,equals:null,selector:null,args:void 0}),f=[],m=()=>null,g=(e,t,n=c)=>{const o=(0,a.Z)(p),s=null!==o.current.selector,[u,d]=r.useState(s?null:l(e,t));o.current.state=u,o.current.equals=n,o.current.selector=t;const h=r.useCallback((()=>(o.current.subscription||(o.current.subscription=e.current.store.subscribe((()=>{const t=l(e,o.current.selector);o.current.equals(o.current.state,t)||(o.current.state=t,d(t))}))),null)),f),g=r.useCallback((()=>()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)}),f);return(0,i.useSyncExternalStore)(g,h,m),u},v=(e,t,n=void 0,o=c)=>{const s=(0,a.Z)(p),l=null!==s.current.selector,[g,v]=r.useState(l?null:u(e,t,n,e.current.instanceId));s.current.state=g,s.current.equals=o,s.current.selector=t;const y=s.current.args;if(s.current.args=n,l&&!((e,t)=>{let n=Object.is;return t instanceof Array?n=h:t instanceof Object&&(n=d),n(e,t)})(y,n)){const t=u(e,s.current.selector,s.current.args,e.current.instanceId);s.current.equals(s.current.state,t)||(s.current.state=t,v(t))}const b=r.useCallback((()=>(s.current.subscription||(s.current.subscription=e.current.store.subscribe((()=>{const t=u(e,s.current.selector,s.current.args,e.current.instanceId);s.current.equals(s.current.state,t)||(s.current.state=t,v(t))}))),null)),f),x=r.useCallback((()=>()=>{s.current.subscription&&(s.current.subscription(),s.current.subscription=void 0)}),f);return(0,i.useSyncExternalStore)(x,b,m),g}},57418:function(e,t,n){"use strict";n.d(t,{j:()=>i,y:()=>a});var r=n(2883),o=n(30505);const i=(e,t)=>(0,r.iJ)(e),a=(e,t)=>(0,o.Pp)(e,r.iJ)},91652:function(e,t,n){"use strict";n.d(t,{FX:()=>a,KK:()=>o,QG:()=>r,u9:()=>i});const r="__tree_data_group__",o="__row_group_by_columns_group__",i="__detail_panel_toggle__";let a=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({})},83100:function(e,t,n){"use strict";n.d(t,{Q:()=>o});var r=n(55749);function o(e,t,n,o){const i=(0,r.b)(n,t);return i&&void 0!==o?(e[i]=o,e):e}},82207:function(e,t,n){"use strict";n.d(t,{a:()=>o});var r=n(91652);const o=(e,t,n,o,i,a)=>{let s;switch(e){case r.FX.LEFT:s=o[n];break;case r.FX.RIGHT:s=i-o[n]-t+a;break;default:s=void 0}return s}},87269:function(e,t,n){"use strict";n.d(t,{Vl:()=>o,r2:()=>r,se:()=>i});var r=function(e){return e.Cell="cell",e.Row="row",e}(r||{}),o=function(e){return e.Edit="edit",e.View="view",e}(o||{}),i=function(e){return e.Edit="edit",e.View="view",e}(i||{})},43780:function(e,t,n){"use strict";n.d(t,{G:()=>r});var r=function(e){return e.And="and",e.Or="or",e}(r||{})},17418:function(e,t,n){"use strict";n.d(t,{b:()=>r,r:()=>o});var r=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(r||{}),o=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(o||{})},59566:function(e,t,n){"use strict";n.d(t,{S:()=>i,y:()=>o});var r=n(91652);const o=(e,t,n,o,i)=>{const a=t===n-1;return!(e!==r.FX.LEFT||!a)||!!o&&(e===r.FX.LEFT||(e===r.FX.RIGHT?!a:!a||i))},i=(e,t)=>e===r.FX.RIGHT&&0===t},89363:function(e,t,n){"use strict";n.d(t,{P1:()=>l,Xw:()=>c,bG:()=>u});var r=n(42849);const o=(0,r.wN)({memoize:r.PP,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),i=new WeakMap;function a(e){return"current"in e&&"instanceId"in e.current}const s={id:"default"},l=(e,t,n,r,o,i,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let u;if(e&&t&&n&&r&&o&&i)u=(l,u)=>{const c=a(l),d=u??(c?l.current.instanceId:s),h=c?l.current.state:l,p=e(h,d),f=t(h,d),m=n(h,d),g=r(h,d),v=o(h,d);return i(p,f,m,g,v)};else if(e&&t&&n&&r&&o)u=(i,l)=>{const u=a(i),c=l??(u?i.current.instanceId:s),d=u?i.current.state:i,h=e(d,c),p=t(d,c),f=n(d,c),m=r(d,c);return o(h,p,f,m)};else if(e&&t&&n&&r)u=(o,i)=>{const l=a(o),u=i??(l?o.current.instanceId:s),c=l?o.current.state:o,d=e(c,u),h=t(c,u),p=n(c,u);return r(d,h,p)};else if(e&&t&&n)u=(r,o)=>{const i=a(r),l=o??(i?r.current.instanceId:s),u=i?r.current.state:r,c=e(u,l),d=t(u,l);return n(c,d)};else{if(!e||!t)throw new Error("Missing arguments");u=(n,r)=>{const o=a(n),i=r??(o?n.current.instanceId:s),l=o?n.current.state:n,u=e(l,i);return t(u)}}return u.acceptsApiRef=!0,u},u=(e,t,n,r,o,i,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let u;if(e&&t&&n&&r&&o&&i)u=(l,u,c)=>{const d=a(l),h=c??(d?l.current.instanceId:s),p=d?l.current.state:l,f=e(p,u,h),m=t(p,u,h),g=n(p,u,h),v=r(p,u,h),y=o(p,u,h);return i(f,m,g,v,y,u)};else if(e&&t&&n&&r&&o)u=(i,l,u)=>{const c=a(i),d=u??(c?i.current.instanceId:s),h=c?i.current.state:i,p=e(h,l,d),f=t(h,l,d),m=n(h,l,d),g=r(h,l,d);return o(p,f,m,g,l)};else if(e&&t&&n&&r)u=(o,i,l)=>{const u=a(o),c=l??(u?o.current.instanceId:s),d=u?o.current.state:o,h=e(d,i,c),p=t(d,i,c),f=n(d,i,c);return r(h,p,f,i)};else if(e&&t&&n)u=(r,o,i)=>{const l=a(r),u=i??(l?r.current.instanceId:s),c=l?r.current.state:r,d=e(c,o,u),h=t(c,o,u);return n(d,h,o)};else{if(!e||!t)throw new Error("Missing arguments");u=(n,r,o)=>{const i=a(n),l=o??(i?n.current.instanceId:s),u=i?n.current.state:n,c=e(u,r,l);return t(c,r)}}return u.acceptsApiRef=!0,u},c=(...e)=>{const t=(t,n)=>{const r=a(t),l=r?t.current.instanceId:n??s,u=r?t.current.state:t;const c=i.get(l),d=c??new Map,h=d?.get(e);if(d&&h)return h(u,l);const p=o(...e);return c||i.set(l,d),d.set(e,p),p(u,l)};return t.acceptsApiRef=!0,t}},96824:function(e,t,n){"use strict";n.d(t,{IA:()=>k,JF:()=>x,K5:()=>p,OF:()=>o,Q6:()=>u,R2:()=>f,WI:()=>h,Y$:()=>m,a9:()=>C,bp:()=>S,ct:()=>c,m5:()=>_,mi:()=>v,oF:()=>g,q_:()=>d,qk:()=>s,w5:()=>i,z$:()=>b,z6:()=>a});var r=n(44949);function o(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function i(e,t){return e.closest(`.${t}`)}function a(e){return e.replace(/["\\]/g,"\\$&")}function s(e,t){return e.querySelector(`[role="columnheader"][data-field="${a(t)}"]`)}function l(e){return`.${r._.row}[data-id="${a(String(e))}"]`}function u(e,t){return e.querySelector(l(t))}function c(e,{id:t,field:n}){const o=`${l(t)} ${`.${r._.cell}[data-field="${a(n)}"]`}`;return e.querySelector(o)}function d(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function h(e){return e.getAttribute("data-field")}function p(e,t){return e.querySelector(`[data-field="${a(t)}"]`)}function f(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function m(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${a(t)}-|"]`)??[])}function g(e,t){if(!i(e,r._.root))throw new Error("MUI X: The root element is not found.");const n=e.getAttribute("aria-colindex");if(!n)return[];const o=Number(n)-1,a=[];return t.virtualScrollerRef?.current?(M(t).forEach((e=>{const n=e.getAttribute("data-id");if(!n)return;let r=o;const i=t.unstable_getCellColSpanInfo(n,o);i&&i.spannedByColSpan&&(r=i.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${r}"]`);s&&a.push(s)})),a):[]}function v(e,t){return e.rootElementRef.current.querySelector(`.${r._[t]}`)}const y=({api:e,colIndex:t,position:n,filterFn:o})=>{if(null===t)return[];const i=[];return M(e).forEach((e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${r._["left"===n?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach((e=>{const t=T(e);null!==t&&o(t)&&i.push(e)}))})),i};function b(e,t,n){const r=T(t);return y({api:e,colIndex:r,position:n?"right":"left",filterFn:e=>n?er})}function x(e,t,n){const r=T(t);return y({api:e,colIndex:r,position:n?"left":"right",filterFn:e=>n?e>r:e{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const i=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${r._["left"===n?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach((e=>{const t=T(e);null!==t&&o(t,e)&&i.push(e)})),i};function S(e,t,n){const r=T(t);return w({api:e,position:n?"right":"left",colIndex:r,filterFn:e=>n?er})}function C(e,t,n){const o=T(t);return w({api:e,position:n?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(r._["columnHeader--last"])&&(n?e>o:e div > [data-field="${a(t)}"][role="columnheader"]`)}function _(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${a(t)}"][role="gridcell"]`))}function M(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${r._.row}`)}function T(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}},86382:function(e,t,n){"use strict";n.d(t,{P:()=>r});const r="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent)},31346:function(e,t,n){"use strict";function r(e,t){return Math.round(e*10**t)/10**t}n.d(t,{T:()=>r})},55749:function(e,t,n){"use strict";n.d(t,{b:()=>o});var r=n(91652);const o=(e,t)=>{if(e)if(t){if(e===r.FX.LEFT)return"right";if(e===r.FX.RIGHT)return"left"}else{if(e===r.FX.LEFT)return"left";if(e===r.FX.RIGHT)return"right"}}},48383:function(e,t,n){"use strict";function r(e){return"number"==typeof e&&!Number.isNaN(e)}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}function s(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}n.d(t,{I8:()=>h,Kn:()=>i,Vu:()=>a,d$:()=>f,eV:()=>p,hj:()=>r,hr:()=>s,iR:()=>d,mf:()=>o,uZ:()=>l,w6:()=>u,xb:()=>c});const l=(e,t,n)=>Math.max(t,Math.min(n,e));function u(e,t){return Array.from({length:t-e}).map(((t,n)=>e+n))}function c(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return(e,n)=>e+(n-e)*t()}function h(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}function p(e){}const f=(e,t)=>n=>{e&&t(n)}},18669:function(e,t,n){"use strict";n.d(t,{X:()=>i});var r=n(27378),o=n(44473);function i(e){return r.memo(e,o.w)}},44473:function(e,t,n){"use strict";n.d(t,{w:()=>o});const r=Object.is;function o(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,o=0;for(const o in e){if(n+=1,!r(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return n===o}},27874:function(e,t,n){"use strict";n.d(t,{G:()=>i});var r=n(27378);const o=parseInt(r.version,10),i=e=>{if(o>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return r.forwardRef(e)}},23418:function(e,t,n){"use strict";var r=n(35574).default;t.default=void 0;var o=r(n(27378));t.default=parseInt(o.version,10)},15879:function(e,t,n){"use strict";n.r(t),n.d(t,{SeriesLabelsStack:()=>bae,getTooltipStyles:()=>Bae,TimeRangeSelector:()=>vae,ChartsThemeContext:()=>Q,DiscardChangesConfirmationDialog:()=>jd,DEFAULT_TOOLTIP_CONFIG:()=>Eae,OptionsEditorGrid:()=>Yd,TOOLTIP_BG_COLOR_FALLBACK:()=>Rae,DEFAULT_PINNED_CROSSHAIR:()=>Pn,FontSizeSelector:()=>VW,TOOLTIP_MAX_WIDTH:()=>wae,InfoTooltip:()=>Gd,TOOLTIP_MIN_WIDTH:()=>xae,SortSelector:()=>u7,SettingsAutocomplete:()=>eh,getClosestTimestamp:()=>Xn,DragButton:()=>vp,useDeepMemo:()=>Zo,NEARBY_SERIES_DESCRIPTION:()=>Tae,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>$ae,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>kae,SHOW_FEWER_SERIES_LIMIT:()=>Hae,useId:()=>er,getNearbySeriesData:()=>Uae,legacyCheckforNearbySeries:()=>Gae,ColorPicker:()=>U,TooltipHeader:()=>ese,checkforNearbyTimeSeries:()=>Wae,FALLBACK_CHART_WIDTH:()=>Mae,getYBuffer:()=>Yae,SortSelectorButtons:()=>c7,YAxisLabel:()=>use,handleMoveDown:()=>gp,OptionsEditorGroup:()=>Xd,TOOLTIP_DATE_FORMAT:()=>Iae,dateFormatOptionsWithTimeZone:()=>To,mockChartsContext:()=>hse,assembleTransform:()=>zae,restoreChart:()=>Gn,EMPTY_TOOLTIP_DATA:()=>Oae,persesColumnsToTanstackColumns:()=>Ac,TextField:()=>md,OptionsColorPicker:()=>zo,useLocalStorage:()=>_n,TimeChartTooltip:()=>nse,buildRelativeTimeOption:()=>Hn,useMousePosition:()=>Aae,PINNED_CROSSHAIR_SERIES_NAME:()=>Tn,batchDispatchNearbySeriesActions:()=>Kn,getClosestTimestampInFullDataset:()=>Qn,DEFAULT_COLUMN_WIDTH:()=>Ic,ModeSelector:()=>r7,ThresholdsEditor:()=>v7,DragAndDropElement:()=>dp,useSnackbar:()=>jt,useTimeZone:()=>No,getPointInGrid:()=>qn,isWithinPercentageRange:()=>Kae,clearHighlightedSeries:()=>Un,PIN_TOOLTIP_HELP_TEXT:()=>Lae,ContentWithLegend:()=>hd,FormActions:()=>HW,OPTIMIZED_MODE_SERIES_LIMIT:()=>Mn,getTableCellLayout:()=>Oc,getFormattedAxis:()=>kn,useMemoized:()=>Lo,EMPHASIZED_SERIES_DESCRIPTION:()=>Pae,FormatControls:()=>lse,ErrorAlert:()=>NW,OptionsEditorControl:()=>Kd,formatWithTimeZone:()=>Po,testChartsTheme:()=>dse,combineSx:()=>Jn,ErrorBoundary:()=>zW.ErrorBoundary,LoadingOverlay:()=>s7,TransformsEditor:()=>Yse,legacyGetNearbySeriesData:()=>qae,SnackbarProvider:()=>Ft,SeriesInfo:()=>Fae,Table:()=>td,UNPIN_TOOLTIP_HELP_TEXT:()=>Zae,getTheme:()=>Fse,SeriesMarker:()=>yae,LinksEditor:()=>e7,LinkEditorForm:()=>J8,TimeZoneContext:()=>Fo,DEFAULT_COLUMN_HEIGHT:()=>Dc,TOOLTIP_PADDING:()=>_ae,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>Vae,ToolbarIconButton:()=>ise,enableDataZoom:()=>Wn,NoDataOverlay:()=>a7,RefreshIntervalPicker:()=>Xse,AlignSelector:()=>s,TOOLTIP_MAX_HEIGHT:()=>Sae,DensitySelector:()=>nh,DropIndicator:()=>rh,TextOverlay:()=>i7,Drawer:()=>Lp,TooltipContent:()=>tse,getDateAndTime:()=>Io,useChartsContext:()=>J,typography:()=>Lse,isLegendItemVisuallySelected:()=>uu,EChart:()=>FW,JSONEditor:()=>q8,TOOLTIP_LABELS_MAX_WIDTH:()=>Cae,Legend:()=>sd,OptionsEditorColumn:()=>zd,ValueMappingsEditor:()=>tle,Dialog:()=>Fd,TimeZoneProvider:()=>jo,ChartsProvider:()=>X,useChartsTheme:()=>ee,handleMoveUp:()=>mp,getFormattedAxisLabel:()=>Ro,useDragAndDropMonitor:()=>cp,checkCrosshairPinnedStatus:()=>Yn,generateChartsTheme:()=>Oo,defaultCursorData:()=>Dae,DateTimeRangePicker:()=>gae});var r={};n.r(r),n.d(r,{Arc:()=>FP,BezierCurve:()=>EP,BoundingRect:()=>rg,Circle:()=>YT,CompoundPath:()=>NP,Ellipse:()=>JT,Group:()=>$y,Image:()=>Rw,IncrementalDisplayable:()=>YP,Line:()=>RP,LinearGradient:()=>BP,OrientedBoundingRect:()=>UP,Path:()=>Sw,Point:()=>Um,Polygon:()=>SP,Polyline:()=>_P,RadialGradient:()=>VP,Rect:()=>Fw,Ring:()=>yP,Sector:()=>mP,Text:()=>Qw,applyTransform:()=>fR,clipPointsByRect:()=>yR,clipRectByRect:()=>bR,createIcon:()=>xR,extendPath:()=>nR,extendShape:()=>eR,getShapeClass:()=>oR,getTransform:()=>pR,groupTransition:()=>vR,initProps:()=>JS,isElementRemoved:()=>eC,lineLineIntersect:()=>SR,linePolygonIntersect:()=>wR,makeImage:()=>aR,makePath:()=>iR,mergePath:()=>lR,registerShape:()=>rR,removeElement:()=>tC,removeElementWithFadeOut:()=>rC,resizePath:()=>uR,setTooltipConfig:()=>kR,subPixelOptimize:()=>hR,subPixelOptimizeLine:()=>cR,subPixelOptimizeRect:()=>dR,transformDirection:()=>mR,traverseElements:()=>MR,updateProps:()=>QS});var o=n(24246),i=n(10970),a=n(48565);function s({onChange:e,value:t="left",...n}){const r=t=>{e(t)};return(0,o.jsxs)(i.Z,{"aria-label":"Alignement",...n,children:[(0,o.jsx)(a.Z,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,o.jsx)(a.Z,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,o.jsx)(a.Z,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var l=n(25283),u=n(75094),c=n(8695),d=n(27378);function h(){return(h=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function f(e){var t=(0,d.useRef)(e),n=(0,d.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var m=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(y(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=v(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(b(t),!function(e,t){return t&&!g(e)}(t,l.current)&&r)){if(g(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(y(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],m=u[1],x=u[2];return(0,d.useEffect)((function(){return x}),[x]),d.createElement("div",h({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:m,tabIndex:0,role:"slider"}))})),w=function(e){return e.filter(Boolean).join(" ")},S=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=w(["react-colorful__pointer",e.className]);return d.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},d.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},C=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},k=(Math.PI,function(e){return O(_(e))}),_=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?C(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?C(parseInt(e.substring(6,8),16)/255,2):1}},M=function(e){return D(R(e))},T=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:C(e.h),s:C(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:C(o/2),a:C(r,2)}},P=function(e){var t=T(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},R=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:C(255*[r,s,a,a,l,r][u]),g:C(255*[l,r,r,s,a,a][u]),b:C(255*[a,a,l,r,r,s][u]),a:C(o,2)}},I=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},D=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o<1?I(C(255*o)):"";return"#"+I(t)+I(n)+I(r)+i},O=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:C(60*(s<0?s+6:s)),s:C(i?a/i*100:0),v:C(i/255*100),a:o}},A=d.memo((function(e){var t=e.hue,n=e.onChange,r=w(["react-colorful__hue",e.className]);return d.createElement("div",{className:r},d.createElement(x,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:m(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":C(t),"aria-valuemax":"360","aria-valuemin":"0"},d.createElement(S,{className:"react-colorful__hue-pointer",left:t/360,color:P({h:t,s:100,v:100,a:1})})))})),E=d.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:P({h:t.h,s:100,v:100,a:1})};return d.createElement("div",{className:"react-colorful__saturation",style:r},d.createElement(x,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:m(t.s+100*e.left,0,100),v:m(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+C(t.s)+"%, Brightness "+C(t.v)+"%"},d.createElement(S,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:P(t)})))})),L=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Z=function(e,t){return e.toLowerCase()===t.toLowerCase()||L(_(e),_(t))};function F(e,t,n){var r=f(n),o=(0,d.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,d.useRef)({color:t,hsva:i});(0,d.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,d.useEffect)((function(){var t;L(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,d.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var j,N="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,z=new Map,B=function(e){N((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!z.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',z.set(t,r);var o=j||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},V=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=p(e,["className","colorModel","color","onChange"]),s=(0,d.useRef)(null);B(s);var l=F(n,o,i),u=l[0],c=l[1],f=w(["react-colorful",t]);return d.createElement("div",h({},a,{ref:s,className:f}),d.createElement(E,{hsva:u,onChange:c}),d.createElement(A,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},$={defaultColor:"000",toHsva:k,fromHsva:function(e){return M({h:e.h,s:e.s,v:e.v,a:1})},equal:Z},H=function(e){return d.createElement(V,h({},e,{colorModel:$}))},W=n(20791),G=n(80354);const U=({color:e,onChange:t,onClear:n,palette:r})=>{const[i,a]=(0,d.useState)(e),s=e=>{a(e),t?.(e)};return(0,o.jsxs)(l.Z,{spacing:1,children:[(0,o.jsx)(H,{color:e,onChange:s,style:{width:"100%"}}),(0,o.jsx)(l.Z,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map(((e,t)=>(0,o.jsx)(u.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>s(e),children:(0,o.jsx)(W.default,{})},t)))}),(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(c.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:i,onChange:e=>{const n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);a(`#${n}`),q(e.target.value)&&t?.(e.target.value)}}),n&&(0,o.jsx)(u.Z,{onClick:n,children:(0,o.jsx)(G.default,{})})]})]})},q=(e,t)=>{const n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var K=n(6714),Y=n(12709);function X(e){const{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:i=!0}=e,[a,s]=(0,d.useState)(null),l=(0,d.useMemo)((()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:a,enableSyncGrouping:i,setLastTooltipPinnedCoords:s})),[n,r,i,a,s]);return(0,o.jsx)(Q.Provider,{value:l,children:t})}const Q=(0,d.createContext)(void 0);function J(){const e=(0,d.useContext)(Q);if(void 0===e)throw new Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function ee(){return J().chartsTheme}var te=n(31542);function ne(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||oe},ae=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,se=/\/\*[^]*?\*\/| +/g,le=/\n+/g,ue=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?ue(a,i):i+"{"+ue(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=ue(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ue.p?ue.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ce={},de=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+de(e[n]);return t}return e};function he(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=de(e),a=ce[i]||(ce[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!ce[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=ae.exec(e.replace(se,""));)t[4]?r.shift():t[3]?(n=t[3].replace(le," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(le," ").trim();return r[0]})(e);ce[a]=ue(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&ce.g?ce.g:null;return n&&(ce.g=ce[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(ce[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ue(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,ie(t.target),t.g,t.o,t.k)}he.bind({g:1}),he.bind({k:1});function pe(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var be=function(){return""},xe=d.createContext({enqueueSnackbar:be,closeSnackbar:be}),we="@media (max-width:599.95px)",Se="@media (min-width:600px)",Ce=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ke=function(e){return""+Ce(e.vertical)+Ce(e.horizontal)},_e=function(e){return!!e||0===e},Me="unmounted",Te="exited",Pe="entering",Re="entered",Ie="exiting",De=function(e){function t(t){var n;n=e.call(this,t)||this;var r,o=t.appear;return n.appearStatus=null,t.in?o?(r=Te,n.appearStatus=Pe):r=Re:r=t.unmountOnExit||t.mountOnEnter?Me:Te,n.state={status:r},n.nextCallback=null,n}ge(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Me?{status:Te}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Pe&&n!==Re&&(t=Pe):n!==Pe&&n!==Re||(t=Ie)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Pe?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===Te&&this.setState({status:Me})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,o=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:Pe},(function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(o.enter,(function(){t.safeSetState({status:Re},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))}))}))):this.safeSetState({status:Re},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:Ie},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Te},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:Te},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Me)return null;var t=this.props;return(0,t.children)(e,ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},fe(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(d.Component);function Oe(){}function Ae(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Ee(e,t){return(0,d.useMemo)((function(){return null==e&&null==t?null:function(n){Ae(e,n),Ae(t,n)}}),[e,t])}function Le(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,o=e.mode;return{duration:"object"==typeof t?t[o]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}De.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Oe,onEntering:Oe,onEntered:Oe,onExit:Oe,onExiting:Oe,onExited:Oe};var Ze="cubic-bezier(0.4, 0, 0.2, 1)",Fe="cubic-bezier(0.0, 0, 0.2, 1)",je="cubic-bezier(0.4, 0, 0.6, 1)",Ne=function(e){e.scrollTop=e.scrollTop},ze=function(e){return Math.round(e)+"ms"};function Be(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?Ze:i,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"==typeof o?o:ze(o),n="string"==typeof l?l:ze(l);return e+" "+t+" "+a+" "+n})).join(",")}function Ve(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function $e(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),o=Ve(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=o.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var He=(0,d.forwardRef)((function(e,t){var n=e.children,r=e.direction,o=void 0===r?"down":r,i=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,h=e.onExit,p=e.onExited,f=ve(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,d.useRef)(null),g=Ee(n.ref,m),v=Ee(g,t),y=(0,d.useCallback)((function(){m.current&&$e(o,m.current)}),[o]);return(0,d.useEffect)((function(){if(!i&&"down"!==o&&"right"!==o){var e=function(e,t){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(me({},e,{queue:[].concat(e.queue,[d])}))})),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?me({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?me({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),me({},e,{open:!1})):me({},e,{requestClose:!0}))}));return me({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!_e(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===r?me({},e,{entered:!0}):me({},e)}))}}))},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.id===r?e.entered?me({},e,{open:!1}):me({},e,{requestClose:!0}):me({},e)})),queue:n.filter((function(e){return e.id!==r}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));_e(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!_e(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var r=n.processQueue(me({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===r.queue.length?r:n.handleDismissOldest(r)}))},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ye(n)),closeSnackbar:n.closeSnackbar.bind(ye(n))}},n}return ge(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,o=n.children,i=n.dense,a=void 0!==i&&i,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce((function(e,t){var n,r=ke(t.anchorOrigin),o=e[r]||[];return me({},e,((n={})[r]=[].concat(o,[t]),n))}),{}),h=Object.keys(c).map((function(t){var n=c[t],r=n[0];return d.createElement(At,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map((function(t){return d.createElement(Tt,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:ct([e.handleExitedSnack,e.props.onExited],t.id),onEntered:ct([e.handleEnteredSnack,e.props.onEntered],t.id)})})))}));return d.createElement(xe.Provider,{value:t},o,r?(0,te.createPortal)(h,r):h)},fe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Ye.maxSnack}}]),t}(d.Component),Zt=function(){return(0,d.useContext)(xe)};function Ft({children:e,...t}){return(0,o.jsx)(Lt,{...t,Components:{error:(0,Y.ZP)(_t)((()=>({"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}})))},children:e})}function jt(){const{enqueueSnackbar:e,closeSnackbar:t}=Zt(),n=Nt(e,"error"),r=Nt(e,"info"),o=Nt(e,"warning"),i=Nt(e,"success"),a=(0,d.useCallback)(((e,t)=>{const r=e instanceof Error?e.message:`An unexpected error occurred: ${e}`;return n(r,t)}),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:o,successSnackbar:i,exceptionSnackbar:a}}function Nt(e,t){return(0,d.useCallback)(((n,r)=>{const o={...r,variant:t};return e(n,o)}),[e,t])}var zt=n(15409),Bt=n.n(zt),Vt=n(74638);const $t=3;function Ht(e){return!1!==e}function Wt(e){return"number"==typeof e}function Gt(e){return e?(e<0?e=0:e>20&&(e=20),e):e}const Ut=2;function qt(e,{unit:t="bytes",shortValues:n,decimalPlaces:r}){const o="decbytes"===t,i=o?1e3:1024;if(!Ht(n)||Math.abs(e){const r={unit:t,style:"unit"};Wt(n)?(r.minimumFractionDigits=Gt(n),r.maximumFractionDigits=Gt(n)):r.maximumSignificantDigits=$t;const o="celsius"===t?"en-GB":"en-US";return Intl.NumberFormat(o,r).format(e)},rn="Time",on={nanoseconds:{group:rn,label:"Nanoseconds"},microseconds:{group:rn,label:"Microseconds"},milliseconds:{group:rn,label:"Milliseconds"},seconds:{group:rn,label:"Seconds"},minutes:{group:rn,label:"Minutes"},hours:{group:rn,label:"Hours"},days:{group:rn,label:"Days"},weeks:{group:rn,label:"Weeks"},months:{group:rn,label:"Months"},years:{group:rn,label:"Years"}};var an=function(e){return e.nanoseconds="nanosecond",e.microseconds="microsecond",e.milliseconds="millisecond",e.seconds="second",e.minutes="minute",e.hours="hour",e.days="day",e.weeks="week",e.months="month",e.years="year",e}({});const sn={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},ln=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function un(e){return"months"===e||"years"===e}function cn(e,{unit:t,decimalPlaces:n}){if(0===e)return"0s";const r=function(e,t){const n=e*sn[t],r=ln[0]||"years";let o=r,i=n/sn[r];for(o of ln)if(i=n/sn[o],i>=1)return{value:i,unit:o};return{value:i,unit:o}}(e,t??"seconds"),o={style:"unit",unit:an[r.unit],unitDisplay:un(r.unit)?"long":"narrow"};Wt(n)?(o.minimumFractionDigits=Gt(n),o.maximumFractionDigits=Gt(n)):o.maximumSignificantDigits=$t;return Intl.NumberFormat("en-US",o).format(r.value)}const dn="Throughput",hn={"bits/sec":{group:dn,label:"Bits/sec (IEC)"},"decbits/sec":{group:dn,label:"Bits/sec (SI)"},"bytes/sec":{group:dn,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:dn,label:"Bytes/sec (SI)"},"counts/sec":{group:dn,label:"Counts/sec"},"events/sec":{group:dn,label:"Events/sec"},"messages/sec":{group:dn,label:"Messages/sec"},"ops/sec":{group:dn,label:"Ops/sec"},"packets/sec":{group:dn,label:"Packets/sec"},"reads/sec":{group:dn,label:"Reads/sec"},"requests/sec":{group:dn,label:"Requests/sec"},"records/sec":{group:dn,label:"Records/sec"},"rows/sec":{group:dn,label:"Rows/sec"},"writes/sec":{group:dn,label:"Writes/sec"}};var pn=n(98784);const fn="Currency";const mn="Date";const gn=()=>{if("undefined"!=typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){const e=navigator.languages[0];if(e)return e}const e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"};function vn(e,t={}){const n=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:r="datetime-local",locale:o=gn(),timeZone:i=n,referenceTime:a=Date.now()}=t;if("unix-timestamp"===r){return(e>1e12?Math.floor(e/1e3):e).toString()}if("unix-timestamp-ms"===r){const t=e<1e11?1e3*e:e;return Math.floor(t).toString()}const s=function(e){if(e<0)return Math.abs(e)>1e10?new Date(e):new Date(1e3*e);if(e>=25e10&&e<=26e10){const t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return e<1e10?new Date(1e3*e):new Date(e)}(e);if("relative-time"===r)return function(e,t,n){const r=new Date(t),o=e.getTime()-r.getTime(),i=[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];for(const{unit:e,ms:t}of i){const r=Math.round(o/t);if(Math.abs(r)>=1)return new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(r,e)}return new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"second")}(s,a,o);const l={timeZone:i};switch(r){case"datetime-iso":return s.toISOString();case"datetime-us":l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0;return new Intl.DateTimeFormat("en-US",l).format(s);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return s.toISOString().split("T")[0];case"date-us":l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit";return new Intl.DateTimeFormat("en-US",l).format(s);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return s.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);default:throw new Error(`Unknown date unit: ${r}`)}return new Intl.DateTimeFormat(o,l).format(s)}const yn={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Bits:{label:"Bits",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0},Currency:{label:"Currency",decimalPlaces:!0},Temperature:en,Date:{label:"Date & Time"}},bn={...on,...Qt,decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"},bits:{group:"Bits",label:"Bits (IEC)"},decbits:{group:"Bits",label:"Bits (SI)"},...hn,...{aud:{group:fn,label:"Australian Dollar (A$)"},cad:{group:fn,label:"Canadian Dollar (CA$)"},chf:{group:fn,label:"Swiss Franc (CHF)"},cny:{group:fn,label:"Renminbi (CN¥)"},eur:{group:fn,label:"Euro (€)"},gbp:{group:fn,label:"Pound (£)"},hkd:{group:fn,label:"Hong Kong Dollar (HK$)"},inr:{group:fn,label:"Indian Rupee (₹)"},jpy:{group:fn,label:"Yen (¥)"},krw:{group:fn,label:"South Korean Won (₩)"},nok:{group:fn,label:"Norwegian Krone (NOK)"},nzd:{group:fn,label:"New Zealand Dollar (NZ$)"},sek:{group:fn,label:"Swedish Krona (SEK)"},sgd:{group:fn,label:"Singapore Dollar (S$)"},usd:{group:fn,label:"US Dollar ($)"}},...tn,...{"datetime-iso":{group:mn,label:"DateTime (GMT)"},"datetime-us":{group:mn,label:"DateTime (US-East)"},"datetime-local":{group:mn,label:"DateTime (Browser Local)"},"date-iso":{group:mn,label:"Date (GMT)"},"date-us":{group:mn,label:"Date (US-East)"},"date-local":{group:mn,label:"Date (Browser Local)"},"time-local":{group:mn,label:"Time (Browser Local)"},"time-iso":{group:mn,label:"Time (GMT)"},"time-us":{group:mn,label:"Time (US-East)"},"relative-time":{group:mn,label:"Relative Time"},"unix-timestamp":{group:mn,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:mn,label:"Unix Timestamp (ms)"}}};function xn(e,t){if(!t)return e.toString();if(function(e){return"Bytes"===Sn(e)}(t))return qt(e,t);if(function(e){return"Bits"===Sn(e)}(t))return Yt(e,t);if(function(e){return"Decimal"===Sn(e)}(t))return function(e,{shortValues:t,decimalPlaces:n}){const r={style:"decimal",useGrouping:!0};return Ht(t)&&(r.notation="compact"),Wt(n)?(r.minimumFractionDigits=Gt(n),r.maximumFractionDigits=Gt(n)):Ht(t)&&(r.maximumSignificantDigits=$t),Intl.NumberFormat("en-US",r).format(e)}(e,t);if(function(e){return"Percent"===Sn(e)}(t))return function(e,{unit:t,decimalPlaces:n}){const r={style:"percent",useGrouping:!0};return Wt(n)?(r.minimumFractionDigits=Gt(n),r.maximumFractionDigits=Gt(n)):r.maximumSignificantDigits=$t,"percent"===t&&(e/=100),Intl.NumberFormat("en-US",r).format(e)}(e,t);if(function(e){return"Time"===Sn(e)}(t))return cn(e,t);if(function(e){return"Throughput"===Sn(e)}(t))return function(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bits/sec"===t){const t=Math.abs(e)<1024?"sec":"s";return Yt(e,{unit:"bits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbits/sec"===t){const t=Math.abs(e)<1e3?"sec":"s";return Yt(e,{unit:"decbits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbytes/sec"===t){const t=Math.abs(e)<1e3?"sec":"s";return qt(e,{unit:"decbytes",shortValues:n,decimalPlaces:r})+"/"+t}if("bytes/sec"===t){const t=Math.abs(e)<1024?"sec":"s";return qt(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}const o={style:"decimal",useGrouping:!0};return Ht(n)&&(o.notation="compact"),Wt(r)?(o.minimumFractionDigits=Gt(r),o.maximumFractionDigits=Gt(r)):Ht(n)&&(o.maximumSignificantDigits=$t),Intl.NumberFormat("en-US",o).format(e)+" "+t}(e,t);if(function(e){return"Currency"===Sn(e)}(t))return function(e,{unit:t,decimalPlaces:n}){const r={style:"currency",currency:(0,pn.toUpper)(t),currencyDisplay:"symbol"};return Wt(n)?(r.minimumFractionDigits=Gt(n),r.maximumFractionDigits=Gt(n)):r.maximumSignificantDigits=$t,Intl.NumberFormat("en-US",r).format(e)}(e,t);if(function(e){return"Date"===Sn(e)}(t))return vn(e,t);if(function(e){return"Temperature"===Sn(e)}(t))return nn(e,t);throw new Error(`Unknown unit options ${t}`)}function wn(e){const t=e.unit??"decimal";return bn[t]}function Sn(e){return wn(e).group??"Decimal"}function Cn(e){const t=wn(e);return yn[t.group??"Decimal"]}function kn(e,t){const n={type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>xn(e,t)}};return[Bt()(n,e)]}function _n(e,t){const{value:n,setValueAndStore:r}=function(e,t,n){const[r,o]=(0,d.useState)((()=>{try{const n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n})),i=(0,d.useCallback)((n=>{o(n),e.setItem(t,JSON.stringify(n))}),[o,e,t]);return{value:r,setValue:o,setValueAndStore:i}}(window.localStorage,e,t);return[n,r]}const Mn=1e3,Tn="Pinned Crosshair",Pn={name:Tn,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var Rn=n(9563);function In(e){return void 0!==e.pastDuration}const Dn=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function On(e){const t=Dn.exec(e);if(null===t)throw new Error(`Invalid duration string '${e}'`);return{years:parseInt(t[1]??"0"),months:0,weeks:parseInt(t[2]??"0"),days:parseInt(t[3]??"0"),hours:parseInt(t[4]??"0"),minutes:parseInt(t[5]??"0"),seconds:parseInt(t[6]??"0")+parseInt(t[7]??"0")/1e3}}const An={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function En(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ln={date:En({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:En({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:En({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Zn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fn(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function jn(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;ne.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(a)));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(a.length)}}}var Nn;const zn={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=An[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ln,formatRelative:(e,t,n,r)=>Zn[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Fn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Fn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Fn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Nn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Nn.matchPattern);if(!n)return null;const r=n[0],o=e.match(Nn.parsePattern);if(!o)return null;let i=Nn.valueCallback?Nn.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:jn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:jn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:jn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:jn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:jn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Bn=n(85095);const Vn=["years","months","weeks","days","hours","minutes","seconds"];function $n(e,t){const n=(0,Bn.j)(),r=t?.locale??n.locale??zn,o=t?.format??Vn,i=t?.zero??!1,a=t?.delimiter??" ";if(!r.formatDistance)return"";return o.reduce(((t,n)=>{const o=`x${n.replace(/(^.)/,(e=>e.toUpperCase()))}`,a=e[n];return void 0!==a&&(i||e[n])?t.concat(r.formatDistance(o,a)):t}),[]).join(a)}function Hn(e){return{value:{pastDuration:e},display:`Last ${$n(On(e),{delimiter:", "})}`}}function Wn(e){const t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function Gn(e){e.dispatchAction({type:"restore"})}function Un(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function qn(e,t,n){if(void 0===n)return null;const r=[e,t];if(!n.containPixel("grid",r))return null;return n.convertFromPixel("grid",r)}function Kn(e,t,n,r,o,i){const a=i.length>0?i[i.length-1]:o[o.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function Yn(e){return e[e.length-1]?.name===Tn}function Xn(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(const[o]of e){const e=Math.abs(o-t);e0?e[o]:null;if(!i)break;r=Xn(i.values,t)}return r}function Jn(...e){return e.flatMap((e=>void 0===e?[]:Array.isArray(e)?e:[e]))}function er(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);const t=(0,d.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var tr=n(56512),nr=n(55753);function rr(e,t){const n=(0,nr.Q)(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function or(e,t){const n=(0,nr.Q)(e,t?.in);return(0,tr.w)(n,rr(n))+1}var ir=n(25274),ar=n(5149);function sr(e,t){return(0,ar.z)(e,{...t,weekStartsOn:1})}var lr=n(63879);function ur(e,t){const n=(0,nr.Q)(e,t?.in),r=n.getFullYear(),o=(0,lr.L)(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=sr(o),a=(0,lr.L)(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=sr(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function cr(e,t){const n=ur(e,t),r=(0,lr.L)(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sr(r)}function dr(e,t){const n=(0,nr.Q)(e,t?.in),r=+sr(n)-+cr(n);return Math.round(r/ir.jE)+1}function hr(e,t){const n=(0,nr.Q)(e,t?.in),r=n.getFullYear(),o=(0,Bn.j)(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=(0,lr.L)(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=(0,ar.z)(a,t),l=(0,lr.L)(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=(0,ar.z)(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function pr(e,t){const n=(0,Bn.j)(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=hr(e,t),i=(0,lr.L)(t?.in||e,0);i.setFullYear(o,0,r),i.setHours(0,0,0,0);return(0,ar.z)(i,t)}function fr(e,t){const n=(0,nr.Q)(e,t?.in),r=+(0,ar.z)(n,t)-+pr(n,t);return Math.round(r/ir.jE)+1}function mr(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const gr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return mr("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):mr(n+1,2)},d:(e,t)=>mr(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>mr(e.getHours()%12||12,t.length),H:(e,t)=>mr(e.getHours(),t.length),m:(e,t)=>mr(e.getMinutes(),t.length),s:(e,t)=>mr(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return mr(Math.trunc(r*Math.pow(10,n-3)),t.length)}},vr="midnight",yr="noon",br="morning",xr="afternoon",wr="evening",Sr="night",Cr={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return gr.y(e,t)},Y:function(e,t,n,r){const o=hr(e,r),i=o>0?o:1-o;if("YY"===t){return mr(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):mr(i,t.length)},R:function(e,t){return mr(ur(e),t.length)},u:function(e,t){return mr(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return mr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return mr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return gr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return mr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=fr(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):mr(o,t.length)},I:function(e,t,n){const r=dr(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):mr(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):gr.d(e,t)},D:function(e,t,n){const r=or(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):mr(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return mr(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return mr(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return mr(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?yr:0===r?vr:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?wr:r>=12?xr:r>=4?br:Sr,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return gr.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):gr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):mr(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):mr(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gr.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gr.s(e,t)},S:function(e,t){return gr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return _r(r);case"XXXX":case"XX":return Mr(r);default:return Mr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _r(r);case"xxxx":case"xx":return Mr(r);default:return Mr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kr(r,":");default:return"GMT"+Mr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kr(r,":");default:return"GMT"+Mr(r,":")}},t:function(e,t,n){return mr(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return mr(+e,t.length)}};function kr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+mr(i,2)}function _r(e,t){if(e%60==0){return(e>0?"-":"+")+mr(Math.abs(e)/60,2)}return Mr(e,t)}function Mr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+mr(Math.trunc(r/60),2)+t+mr(r%60,2)}const Tr=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Pr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Rr={p:Pr,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Tr(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Tr(r,t)).replace("{{time}}",Pr(o,t))}},Ir=/^D+$/,Dr=/^Y+$/,Or=["D","DD","YY","YYYY"];function Ar(e){return Ir.test(e)}function Er(e){return Dr.test(e)}function Lr(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Or.includes(e))throw new RangeError(r)}var Zr=n(95090);function Fr(e){return!(!(0,Zr.J)(e)&&"number"!=typeof e||isNaN(+(0,nr.Q)(e)))}const jr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zr=/^'([^]*?)'?$/,Br=/''/g,Vr=/[a-zA-Z]/;function $r(e,t,n){const r=(0,Bn.j)(),o=n?.locale??r.locale??zn,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=(0,nr.Q)(e,n?.in);if(!Fr(s))throw new RangeError("Invalid time value");let l=t.match(Nr).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Rr[t])(e,o.formatLong)}return e})).join("").match(jr).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Hr(e)};if(Cr[t])return{isToken:!0,value:e};if(t.match(Vr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&Er(i)||!n?.useAdditionalDayOfYearTokens&&Ar(i))&&Lr(i,t,String(e));return(0,Cr[i[0]])(s,i,o.localize,u)})).join("")}function Hr(e){const t=e.match(zr);return t?t[1].replace(Br,"'"):e}function Wr(){return Object.assign({},(0,Bn.j)())}function Gr(e,t,n){const r=Wr(),o=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value;return}(o,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(o,t)}function Ur(e,t){const n=function(e){Kr[e]||(Kr[e]=Xr?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));return Kr[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e=0?i:1e3+i,r-o}function oo(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const io={};const ao={X:function(e,t,n){const r=so(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return co(r);case"XXXX":case"XX":return uo(r);default:return uo(r,":")}},x:function(e,t,n){const r=so(n.timeZone,e);switch(t){case"x":return co(r);case"xxxx":case"xx":return uo(r);default:return uo(r,":")}},O:function(e,t,n){const r=so(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);return n+String(o)+t+lo(i,2)}(r,":");default:return"GMT"+uo(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return Gr("short",e,n);default:return Gr("long",e,n)}}};function so(e,t){const n=e?no(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function lo(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length0?"-":"+",r=Math.abs(e);return n+lo(Math.floor(r/60),2)+t+lo(Math.floor(r%60),2)}function co(e,t){if(e%60==0){return(e>0?"-":"+")+lo(Math.abs(e)/60,2)}return uo(e,t)}function ho(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const po=36e5,fo=6e4,mo=2,go={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function vo(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?mo:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=go.dateTimePattern.exec(e);r?(t.date=r[1],n=r[3]):(r=go.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e));if(n){const e=go.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:o,restDateString:i}=function(e,t){if(e){const n=go.YYY[t],r=go.YYYYY[t];let o=go.YYYY.exec(e)||r.exec(e);if(o){const t=o[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(o=go.YY.exec(e)||n.exec(e),o){const t=o[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),a=function(e,t){if(null===t)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let i=go.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,So(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=go.DDD.exec(e),i){n=new Date(0);const e=parseInt(i[1],10);return function(e,t){if(t<1)return!1;const n=wo(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(i=go.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const e=parseInt(i[2],10);return So(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(i=go.Www.exec(e),i)return o=parseInt(i[1],10)-1,Co(o)?yo(t,o):new Date(NaN);if(i=go.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const e=parseInt(i[2],10)-1;return Co(o,e)?yo(t,o,e):new Date(NaN)}return null}(i,o);if(null===a||isNaN(a.getTime()))return new Date(NaN);if(a){const e=a.getTime();let n,o=0;if(r.time&&(o=function(e){let t,n,r=go.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),ko(t)?t%24*po:NaN;if(r=go.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),ko(t,n)?t%24*po+n*fo:NaN;if(r=go.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return ko(t,n,e)?t%24*po+n*fo+1e3*e:NaN}return null}(r.time),null===o||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=no(r.timeZone||t.timeZone,new Date(e+o)),isNaN(n))return new Date(NaN)}else n=ho(new Date(e+o)),n=ho(new Date(e+o+n));return new Date(e+o+n)}return new Date(NaN)}function yo(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}const bo=[31,28,31,30,31,30,31,31,30,31,30,31],xo=[31,29,31,30,31,30,31,31,30,31,30,31];function wo(e){return e%400==0||e%4==0&&e%100!=0}function So(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=wo(e);if(r&&n>xo[t])return!1;if(!r&&n>bo[t])return!1}return!0}function Co(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function ko(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}const _o=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Mo(e,t,n,r){return function(e,t,n={}){const r=(t=String(t)).match(_o);if(r){const o=vo(n.originalDate||e,n);t=r.reduce((function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),i="'"===e[r-1],a=e.replace(t,"'"+ao[t[0]](o,t,n)+"'");return i?a.substring(0,r-1)+a.substring(r+1):a}),t)}return $r(e,t,n)}(function(e,t,n){const r=no(t,e=vo(e,n),!0),o=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}function To(e,t){if(t){const n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function Po(e,t,n){const r=n?.toLowerCase();return n&&"local"!==r&&"browser"!==r?Mo(e,"utc"===r?"UTC":n,t):$r(e,t)}function Ro(e){const t=864e5,n=31536e6;return e>5*n?"{yyyy}":e>2*n?"{MMM} {yyyy}":e>5*t&&e<1577664e4?"{MM}/{dd}":e>2*t&&e<=5*t?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}const Io=e=>{if(!e)return{formattedDate:"",formattedTime:""};const t=new Date(e);return{formattedDate:$r(t,"MMM dd, yyyy - "),formattedTime:$r(t,"HH:mm:ss")}},Do="#222";function Oo(e,t){const n=e.palette.text?.primary??Do,r={title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}};return Bt()({echartsTheme:r,noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}var Ao=n(56141),Eo=n.n(Ao);function Lo(e,t){const n=(0,d.useRef)();let r=!0;for(let e=0;ePo(t,n,e),dateFormatOptionsWithUserTimeZone:t=>To(t,e)}}function zo({label:e,color:t,onColorChange:n,onClear:r}){const[i,a]=(0,d.useState)(null),s=Boolean(i),{thresholds:{defaultColor:l,palette:u}}=ee();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Bo,{size:"small","aria-label":`change ${e} color`,isSelected:s,iconColor:t,onClick:e=>{a(e.currentTarget)},children:(0,o.jsx)(W.default,{})}),(0,o.jsx)(K.ZP,{"data-testid":"options color picker",open:s,anchorEl:i,onClose:()=>{a(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,o.jsx)(U,{color:t,palette:[l,...u],onChange:n,onClear:r})})]})}const Bo=(0,Y.ZP)(u.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})((({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e})));var Vo=n(94776),$o=n(36372);const Ho=["list","table"],Wo=["small","medium"];const Go={position:"bottom",mode:"list",size:"medium"};function Uo(e){return e&&function(e){return Ho.includes(e)}(e)?e:Go.mode}function qo(e){return e&&function(e){return Wo.includes(e)}(e)?e:Go.size}var Ko=n(75586);function Yo(e){return()=>e}function Xo(e){e()}function Qo(e,t){return n=>e(t(n))}function Jo(e,t){return()=>e(t)}function ei(e){return void 0!==e}function ti(){}function ni(e,t){return t(e),e}function ri(e,t){return t(e)}function oi(...e){return e}function ii(e,t){return e(1,t)}function ai(e,t){e(0,t)}function si(e){e(2)}function li(e){return e(4)}function ui(e,t){return ii(e,function(e,t){return n=>e(t,n)}(t,0))}function ci(e,t){const n=e(1,(e=>{n(),t(e)}));return n}function di(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout((()=>{r(t)}),e)}}function hi(e,t){return e===t}function pi(e=hi){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function fi(e){return t=>n=>{e(n)&&t(n)}}function mi(e){return t=>Qo(t,e)}function gi(e){return t=>()=>{t(e)}}function vi(e,...t){const n=function(...e){return t=>e.reduceRight(ri,t)}(...t);return(t,r)=>{switch(t){case 2:return void si(e);case 1:return ii(e,n(r))}}}function yi(e,t){return n=>r=>{n(t=e(t,r))}}function bi(e){return t=>n=>{e>0?e--:t(n)}}function xi(e){let t,n=null;return r=>o=>{n=o,!t&&(t=setTimeout((()=>{t=void 0,r(n)}),e))}}function wi(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);ii(e,(e=>{const s=n;n|=a,t[i]=e,s!==o&&n===o&&r&&(r(),r=null)}))})),e=>i=>{const a=()=>{e([i].concat(t))};n===o?a():r=a}}function Si(e){let t=e;const n=ki();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function Ci(e,t){return ni(Si(t),(t=>ui(e,t)))}function ki(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach((e=>{e(n)}));case 2:return void e.splice(0,e.length);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function _i(e){return ni(ki(),(t=>ui(e,t)))}function Mi(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Ti(),singleton:n}}const Ti=()=>Symbol();function Pi(...e){const t=ki(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);ii(e,(e=>{n[i]=e,r|=a,r===o&&ai(t,n)}))})),function(e,i){switch(e){case 2:return void si(t);case 1:return r===o&&i(n),ii(t,i)}}}function Ri(e,t=hi){return vi(e,pi(t))}function Ii(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(Xo)}}(...e.map((e=>ii(e,n))))}}}var Di=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Di||{});const Oi={0:"debug",3:"error",1:"log",2:"warn"},Ai=Mi((()=>{const e=Si(3);return{log:Si(((t,n,r=1)=>{var o;r>=(null!=(o=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?o:li(e))&&console[Oi[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)})),logLevel:e}}),[],{singleton:!0});function Ei(e,t,n){return Li(e,t,n).callbackRef}function Li(e,t,n){const r=d.useRef(null);let o=e=>{};const i=d.useMemo((()=>typeof ResizeObserver<"u"?new ResizeObserver((t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)})):null),[e,n]);return o=e=>{e&&t?(null==i||i.observe(e),r.current=e):(r.current&&(null==i||i.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function Zi(e,t,n,r,o,i,a,s,l){const u=d.useCallback((n=>{const l=function(e,t,n,r){const o=e.length;if(0===o)return null;const i=[];for(let a=0;a{if(null==n||!n.offsetParent)return;const o=n.getBoundingClientRect(),i=o.width;let s,l;if(t){const e=t.getBoundingClientRect(),n=o.top-e.top;l=e.height-Math.max(0,n),s=n+t.scrollTop}else{const e=a.current.ownerDocument.defaultView;l=e.innerHeight-Math.max(0,o.top),s=o.top+e.scrollY}r.current={offsetTop:s,visibleHeight:l,visibleWidth:i},e(r.current)}),[e,t]),{callbackRef:i,ref:a}=Li(o,!0,n),s=d.useCallback((()=>{o(a.current)}),[o,a]);return d.useEffect((()=>{var e;if(t){t.addEventListener("scroll",s);const e=new ResizeObserver((()=>{requestAnimationFrame(s)}));return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}{const t=null==(e=a.current)?void 0:e.ownerDocument.defaultView;return null==t||t.addEventListener("scroll",s),null==t||t.addEventListener("resize",s),()=>{null==t||t.removeEventListener("scroll",s),null==t||t.removeEventListener("resize",s)}}}),[s,t,a]),i}const Ni=Mi((()=>{const e=ki(),t=ki(),n=Si(0),r=ki(),o=Si(0),i=ki(),a=ki(),s=Si(0),l=Si(0),u=Si(0),c=Si(0),d=ki(),h=ki(),p=Si(!1),f=Si(!1),m=Si(!1);return ui(vi(e,mi((({scrollTop:e})=>e))),t),ui(vi(e,mi((({scrollHeight:e})=>e))),a),ui(t,o),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}}),[],{singleton:!0}),zi={lvl:0};function Bi(e,t){const n=e.length;if(0===n)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a({index:e,value:t})))}(Yi(e,Hi(e,t)[0],n))}function qi(e,t){if(Vi(e))return zi;const{k:n,l:r,r:o}=e;if(t===n){if(Vi(r))return o;if(Vi(o))return r;{const[t,n]=ta(r);return Xi(Qi(e,{k:t,l:Ji(r),v:n}))}}return Xi(Qi(e,tt&&(s=s.concat(Yi(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(Yi(i,t,n))),s}function Xi(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(ea(t))return oa(Qi(e,{lvl:n-1}));if(!Vi(t)&&!Vi(t.r))return Qi(t.r,{l:Qi(t,{r:t.r.l}),lvl:n,r:Qi(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(ea(e))return ia(Qi(e,{lvl:n-1}));if(Vi(r)||Vi(r.l))throw new Error("Unexpected empty nodes");{const t=r.l,o=ea(t)?r.lvl-1:r.lvl;return Qi(t,{l:Qi(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:ia(Qi(r,{l:t.r,lvl:o}))})}}function Qi(e,t){return na(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function Ji(e){return Vi(e.r)?e.l:Xi(Qi(e,{r:Ji(e.r)}))}function ea(e){return Vi(e)||e.lvl>e.r.lvl}function ta(e){return Vi(e.r)?[e.k,e.v]:ta(e.r)}function na(e,t,n,r=zi,o=zi){return{k:e,l:r,lvl:n,r:o,v:t}}function ra(e){return ia(oa(e))}function oa(e){const{l:t}=e;return Vi(t)||t.lvl!==e.lvl?e:Qi(t,{r:Qi(e,{l:t.r})})}function ia(e){const{lvl:t,r:n}=e;return Vi(n)||Vi(n.r)||n.lvl!==t||n.r.lvl!==t?e:Qi(n,{l:Qi(e,{r:n.l}),lvl:t+1})}function aa(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function sa(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const la=Mi((()=>({recalcInProgress:Si(!1)})),[],{singleton:!0});function ua(e,t,n){return e[ca(e,t,n)]}function ca(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function da(e,t){return Math.round(e.getBoundingClientRect()[t])}function ha(e){return!Vi(e.groupOffsetTree)}function pa({index:e},t){return t===e?0:t0?s+n:s}function ga(e,t){if(!ha(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function va(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let r=ga("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function ya(e,t,n,r=0){return r>0&&(t=Math.max(t,ua(e,r,pa).offset)),Bi(function(e,t,n,r){const o=ca(e,t,r),i=ca(e,n,r,o);return e.slice(o,i+1)}(e,t,n,fa),Sa)}function ba(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Di.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&Vi(i)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce(((t,n)=>Wi(Wi(t,n,e),n+1,r)),a)}else[a,s]=function(e,t){let n=Vi(e)?0:1/0;for(const r of t){const{endIndex:t,size:o,startIndex:i}=r;if(n=Math.min(n,i),Vi(e)){e=Wi(e,0,o);continue}const a=Ui(e,i-1,t+1);if(a.some(Ca(r)))continue;let s=!1,l=!1;for(const{end:n,start:r,value:i}of a)s?(t>=r||o===i)&&(e=qi(e,r)):(l=i!==o,s=!0),n>t&&t>=r&&i!==o&&(e=Wi(e,t+1,i));l&&(e=Wi(e,i,o))}return[e,n]}(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=wa(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce(((e,t)=>Wi(e,t,ma(t,d,o))),Gi()),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function xa(e,t){let n=0,r=0;for(;ne.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const ka={offsetHeight:"height",offsetWidth:"width"},_a=Mi((([{log:e},{recalcInProgress:t}])=>{const n=ki(),r=ki(),o=Ci(r,0),i=ki(),a=ki(),s=Si(0),l=Si([]),u=Si(void 0),c=Si(void 0),d=Si(void 0),h=Si(void 0),p=Si(((e,t)=>da(e,ka[t]))),f=Si(void 0),m=Si(0),g={groupIndices:[],groupOffsetTree:Gi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Gi()},v=Ci(vi(n,wi(l,e,m),yi(ba,g),pi()),g),y=Ci(vi(l,pi(),yi(((e,t)=>({current:t,prev:e.current})),{current:[],prev:[]}),mi((({prev:e})=>e))),[]);ui(vi(l,fi((e=>e.length>0)),wi(v,m),mi((([e,t,n])=>{const r=e.reduce(((e,r,o)=>Wi(e,r,ma(r,t.offsetTree,n)||o)),Gi());return{...t,groupIndices:e,groupOffsetTree:r}}))),v),ui(vi(r,wi(v),fi((([e,{lastIndex:t}])=>e[{endIndex:t,size:n,startIndex:e}]))),n),ui(u,c);const b=Ci(vi(u,mi((e=>void 0===e))),!0);ui(vi(c,fi((e=>void 0!==e&&Vi(li(v).sizeTree))),mi((e=>{const t=li(d),n=li(l).length>0;return t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]}))),n),ui(vi(h,fi((e=>void 0!==e&&e.length>0&&Vi(li(v).sizeTree))),mi((e=>{const t=[];let n=e[0],r=0;for(let o=1;ovoid 0!==e&&void 0!==t)),mi((([e,t,n])=>{const r=[];for(let o=0;o({changed:n!==e,sizes:n})),{changed:!1,sizes:g}),mi((e=>e.changed))));ii(vi(s,yi(((e,t)=>({diff:e.prev-t,prev:t})),{diff:0,prev:0}),mi((e=>e.diff))),(e=>{const{groupIndices:n}=li(v);if(e>0)ai(t,!0),ai(i,e+xa(e,n));else if(e<0){const t=li(y);t.length>0&&(e-=xa(-e,t)),ai(a,e)}})),ii(vi(s,wi(e)),(([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Di.ERROR)}));const w=_i(i);ui(vi(i,wi(v),mi((([e,t])=>{const n=t.groupIndices.length>0,r=[],o=t.lastSize;if(n){const n=$i(t.sizeTree,0);let i=0,a=0;for(;i{let o=t.ranges;return 0!==t.prevSize&&(o=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:o}}),{prevIndex:e,prevSize:0,ranges:r}).ranges}return Ki(t.sizeTree).reduce(((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]})),{prevIndex:0,prevSize:o,ranges:[]}).ranges}))),n);const S=_i(vi(a,wi(v,m),mi((([e,{offsetTree:t},n])=>ma(-e,t,n)))));return ui(vi(a,wi(v,m),mi((([e,t,n])=>{if(t.groupIndices.length>0){if(Vi(t.sizeTree))return t;let r=Gi();const o=li(y);let i=0,a=0,s=0;for(;i<-e;){s=o[a];const e=o[a+1]-s-1;a++,i+=e+1}if(r=Ki(t.sizeTree).reduce(((t,{k:n,v:r})=>Wi(t,Math.max(0,n+e),r)),r),i!==-e){r=Wi(r,0,$i(t.sizeTree,s));r=Wi(r,1,Hi(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...wa(t.offsetTree,0,r,n)}}{const r=Ki(t.sizeTree).reduce(((t,{k:n,v:r})=>Wi(t,Math.max(0,n+e),r)),Gi());return{...t,sizeTree:r,...wa(t.offsetTree,0,r,n)}}}))),v),{beforeUnshiftWith:w,data:f,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}}),oi(Ai,la),{singleton:!0});function Ma(e){return e.reduce(((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e)),{groupIndices:[],totalCount:0})}const Ta=Mi((([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=ki(),a=ki(),s=_i(vi(i,mi(Ma)));return ui(vi(s,mi((e=>e.totalCount))),n),ui(vi(s,mi((e=>e.groupIndices))),e),ui(vi(Pi(o,t,r),fi((([e,t])=>ha(t))),mi((([e,t,n])=>Hi(t.groupOffsetTree,Math.max(e-n,0),"v")[0])),pi(),mi((e=>[e]))),a),{groupCounts:i,topItemsIndexes:a}}),oi(_a,Ni)),Pa=Mi((([{log:e}])=>{const t=Si(!1),n=_i(vi(t,fi((e=>e)),pi()));return ii(t,(t=>{t&&li(e)("props updated",{},Di.DEBUG)})),{didMount:n,propsReady:t}}),oi(Ai),{singleton:!0}),Ra=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ia(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Ra)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Da=Mi((([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{const p=ki(),f=ki(),m=Si(0);let g=null,v=null,y=null;function b(){g&&(g(),g=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),ai(l,!1)}return ui(vi(p,wi(n,d,r,m,s,a,h),wi(e,i,o),mi((([[e,n,r,o,i,a,s,u],d,h,m])=>{const x=Ia(e),{align:w,behavior:S,offset:C}=x,k=o-1,_=va(x,n,k);let M=ma(_,n.offsetTree,d)+a;"end"===w?(M+=h+Hi(n.sizeTree,_)[1]-r+m,_===k&&(M+=s)):"center"===w?M+=(h+Hi(n.sizeTree,_)[1]-r+m)/2:M-=i,C&&(M+=C);const T=t=>{b(),t?(u("retrying to scroll to",{location:e},Di.DEBUG),ai(p,e)):(ai(f,!0),u("list did not change, scroll successful",{},Di.DEBUG))};if(b(),"smooth"===S){let e=!1;y=ii(t,(t=>{e=e||t})),g=ci(c,(()=>{T(e)}))}else g=ci(vi(t,function(e){return t=>{const n=setTimeout((()=>{t(!1)}),e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),T);return v=setTimeout((()=>{b()}),1200),ai(l,!0),u("scrolling from index to",{behavior:S,index:_,top:M},Di.DEBUG),{behavior:S,top:M}}))),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:m}}),oi(_a,Ni,Ai),{singleton:!0});function Oa(e,t){0==e?t():requestAnimationFrame((()=>{Oa(e-1,t)}))}function Aa(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const Ea=Mi((([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=Si(!0),l=Si(0),u=Si(!0);return ui(vi(a,wi(l),fi((([e,t])=>!!t)),gi(!1)),s),ui(vi(a,wi(l),fi((([e,t])=>!!t)),gi(!1)),u),ii(vi(Pi(t,a),wi(s,n,e,u),fi((([[,e],t,{sizeTree:n},r,o])=>e&&(!Vi(n)||ei(r))&&!t&&!o)),wi(l)),(([,e])=>{ci(o,(()=>{ai(u,!0)})),Oa(4,(()=>{ci(r,(()=>{ai(s,!0)})),ai(i,e)}))})),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}}),oi(_a,Ni,Da,Pa),{singleton:!0});function La(e,t){return Math.abs(e-t)<1.01}const Za="up",Fa="down",ja={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Na=Mi((([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=Si(!1),s=Si(!0),l=ki(),u=ki(),c=Si(4),d=Si(0),h=Ci(vi(Ii(vi(Ri(o),bi(1),gi(!0)),vi(Ri(o),bi(1),gi(!1),di(100))),pi()),!1),p=Ci(vi(Ii(vi(n,gi(!0)),vi(n,gi(!1),di(200))),pi()),!1);ui(vi(Pi(Ri(o),Ri(d)),mi((([e,t])=>e<=t)),pi()),s),ui(vi(s,xi(50)),u);const f=_i(vi(Pi(r,Ri(i),Ri(t),Ri(e),Ri(c)),yi(((e,[{scrollHeight:t,scrollTop:n},r,o,i,a])=>{const s={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:s}}let l;return l=s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":re&&e.atBottom===t.atBottom)))),m=Ci(vi(r,yi(((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(La(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{const o=t-(n+r)<1;return e.scrollTop!==n&&o?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}}),{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fi((e=>e.changed)),mi((e=>e.jump))),0);ui(vi(f,mi((e=>e.atBottom))),a),ui(vi(a,xi(50)),l);const g=Si(Fa);ui(vi(r,mi((({scrollTop:e})=>e)),pi(),yi(((e,t)=>li(p)?{direction:e.direction,prevScrollTop:t}:{direction:te.direction))),g),ui(vi(r,xi(50),gi("none")),g);const v=Si(0);return ui(vi(h,fi((e=>!e)),gi(0)),v),ui(vi(o,xi(100),wi(h),fi((([e,t])=>!!t)),yi((([e,t],[n])=>[t,n]),[0,0]),mi((([e,t])=>t-e))),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:m,scrollDirection:g,scrollVelocity:v}}),oi(Ni)),za="top",Ba="bottom",Va="none";function $a(e,t,n){return"number"==typeof e?n===Za&&t===za||n===Fa&&t===Ba?e:0:n===Za?t===za?e.main:e.reverse:t===Ba?e.main:e.reverse}function Ha(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}const Wa=Mi((([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=ki(),a=Si(0),s=Si(0),l=Si(0);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:Ci(vi(Pi(Ri(r),Ri(o),Ri(n),Ri(i,sa),Ri(l),Ri(a),Ri(t),Ri(e),Ri(s)),mi((([e,t,n,[r,o],i,a,s,l,u])=>{const c=e-l,d=a+s,h=Math.max(n-c,0);let p=Va;const f=Ha(u,za),m=Ha(u,Ba);return r-=l,o+=n+s,(r+=n+s)>e+d-f&&(p=Za),(o-=l)null!=e)),pi(sa)),[0,0])}}),oi(Ni),{singleton:!0});const Ga={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ua(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let u=0,c=0;if(e.length>0){u=e[0].offset;const t=e[e.length-1];c=t.offset+t.size}const d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:i,items:Ka(e,o,i),offsetBottom:p,offsetTop:u,top:h,topItems:Ka(t,o,i),topListHeight:t.reduce(((e,t)=>t.size+e),0),totalCount:n}}function qa(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-a>=e)break;a++}const s=e+a,l=Aa(t,s);return Ua(Array.from({length:s}).map(((e,t)=>({data:i[t+l],index:t+l,offset:0,size:0}))),[],s,o,n,r)}function Ka(e,t,n){if(0===e.length)return[];if(!ha(t))return e.map((e=>({...e,index:e.index+n,originalIndex:e.index})));const r=e[0].index,o=e[e.length-1].index,i=[],a=Ui(t.groupOffsetTree,r,o);let s,l=0;for(const r of e){let e;(!s||s.end{const m=Si([]),g=Si(0),v=ki();ui(i.topItemsIndexes,m);const y=Ci(vi(Pi(p,f,Ri(l,sa),Ri(o),Ri(r),Ri(u),c,Ri(m),Ri(t),Ri(n),e),fi((([e,t,,n,,,,,,,r])=>{const o=r&&r.length!==n;return e&&!t&&!o})),mi((([,,[e,t],n,r,o,i,a,s,l,u])=>{const c=r,{offsetTree:d,sizeTree:h}=c,p=li(g);if(0===n)return{...Ga,totalCount:n};if(0===e&&0===t)return 0===p?{...Ga,totalCount:n}:qa(p,o,r,s,l,u||[]);if(Vi(h))return p>0?null:Ua(function(e,t,n){if(ha(t)){const r=ga(e,t);return[{index:Hi(t.groupOffsetTree,r)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:r,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(Aa(o,n),c,u),[],n,l,c,s);const f=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of Ui(h,e,t)){const o=r.value,i=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=i;e<=a;e++)f.push({data:null==u?void 0:u[e],index:e,offset:n,size:o}),n+=o}}if(!i)return Ua([],f,n,l,c,s);const m=a.length>0?a[a.length-1]+1:0,v=ya(d,e,t,m);if(0===v.length)return null;const y=n-1;return Ua(ni([],(n=>{for(const r of v){const o=r.value;let i=o.offset,a=r.start;const s=o.size;if(o.offset=t);e++)n.push({data:null==u?void 0:u[e],index:e,offset:i,size:s}),i+=s+l}})),f,n,l,c,s)})),fi((e=>null!==e)),pi()),Ga);ui(vi(e,fi(ei),mi((e=>null==e?void 0:e.length))),o),ui(vi(y,mi((e=>e.topListHeight))),d),ui(d,s),ui(vi(y,mi((e=>[e.top,e.bottom]))),a),ui(vi(y,mi((e=>e.items))),v);const b=_i(vi(y,fi((({items:e})=>e.length>0)),wi(o,e),fi((([{items:e},t])=>e[e.length-1].originalIndex===t-1)),mi((([,e,t])=>[e-1,t])),pi(sa),mi((([e])=>e)))),x=_i(vi(y,xi(200),fi((({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length)),mi((({items:e})=>e[0].index)),pi())),w=_i(vi(y,fi((({items:e})=>e.length>0)),mi((({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&tt;)n--;return{endIndex:e[n].index,startIndex:e[t].index}})),pi(aa)));return{endReached:b,initialItemCount:g,itemsRendered:v,listState:y,rangeChanged:w,startReached:x,topItemsIndexes:m,...h}}),oi(_a,Ta,Wa,Ea,Da,Na,Pa,la),{singleton:!0}),Xa=Mi((([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=ki(),a=Ci(vi(Pi(n,e,r,t,o),mi((([e,t,n,r,o])=>e+t+n+r+o.offsetBottom+o.bottom))),0);return ui(Ri(a),i),{totalListHeight:a,totalListHeightChanged:i}}),oi(Ni,Ya),{singleton:!0}),Qa=Mi((([{viewportHeight:e},{totalListHeight:t}])=>{const n=Si(!1);return{alignToBottom:n,paddingTopAddition:Ci(vi(Pi(n,e,t),fi((([e])=>e)),mi((([,e,t])=>Math.max(0,e-t))),xi(0),pi()),0)}}),oi(Ni,Xa),{singleton:!0}),Ja=Mi((()=>({context:Si(null)}))),es=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>ti?{...o,align:null!=n?n:"end",behavior:r}:null,ts=Mi((([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{const c=ki();return ui(vi(c,wi(t,l,n,i,o,r,s),wi(e),mi((([[e,t,n,r,o,i,s,l],u])=>{const{align:c,behavior:d,calculateViewLocation:h=es,done:p,...f}=e,m=va(e,t,r-1),g=ma(m,t.offsetTree,u)+o+i,v=h({itemBottom:g+Hi(t.sizeTree,m)[1],itemTop:g,locationParams:{align:c,behavior:d,...f},viewportBottom:l+n-s,viewportTop:l+i});return v?p&&ci(vi(a,fi((e=>!e)),bi(li(a)?1:2)),p):p&&p(),v})),fi((e=>null!==e))),u),{scrollIntoView:c}}),oi(_a,Ni,Da,Ya,Ai),{singleton:!0});function ns(e){return!!e&&("smooth"===e?"smooth":"auto")}const rs=Mi((([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{const f=Si(!1),m=ki();let g=null;function v(e){ai(a,{align:"end",behavior:e,index:"LAST"})}function y(e){const t=ci(o,(t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!g&&(li(c)("scrolling to bottom due to increased size",{},Di.DEBUG),v("auto"))}));setTimeout(t,100)}ii(vi(Pi(vi(Ri(t),bi(1)),l),wi(Ri(f),i,s,d),mi((([[e,t],n,r,o,i])=>{let a=t&&o,s="auto";return a&&(s=((e,t)=>"function"==typeof e?ns(e(t)):t&&ns(e))(n,r||i),a=a&&!!s),{followOutputBehavior:s,shouldFollow:a,totalCount:e}})),fi((({shouldFollow:e})=>e))),(({followOutputBehavior:t,totalCount:r})=>{g&&(g(),g=null),li(n)?requestAnimationFrame((()=>{li(c)("following output to ",{totalCount:r},Di.DEBUG),v(t)})):g=ci(e,(()=>{li(c)("following output to ",{totalCount:r},Di.DEBUG),v(t),g=null}))})),ii(vi(Pi(Ri(f),t,u),fi((([e,,t])=>e&&t)),yi((({value:e},[,t])=>({refreshed:e===t,value:t})),{refreshed:!1,value:0}),fi((({refreshed:e})=>e)),wi(f,t)),(([,e])=>{li(s)&&y(!1!==e)})),ii(m,(()=>{y(!1!==li(f))})),ii(Pi(Ri(f),o),(([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}));const b=Si(null),x=ki();return ui(Ii(vi(Ri(r),mi((e=>{var t;return null!=(t=null==e?void 0:e.length)?t:0}))),vi(Ri(t))),x),ii(vi(Pi(vi(x,bi(1)),l),wi(Ri(b),s,d,h),mi((([[e,t],n,r,o,i])=>t&&r&&(null==n?void 0:n({context:i,totalCount:e,scrollingInProgress:o})))),fi((e=>!!e)),xi(0)),(t=>{g&&(g(),g=null),li(n)?requestAnimationFrame((()=>{li(c)("scrolling into view",{}),ai(p,t)})):g=ci(e,(()=>{li(c)("scrolling into view",{}),ai(p,t),g=null}))})),{autoscrollToBottom:m,followOutput:f,scrollIntoViewOnChange:b}}),oi(_a,Na,Da,Ea,Pa,Ai,Ni,Ja,ts)),os=Mi((([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(ui(vi(s,wi(i),fi((([,e])=>0!==e)),wi(o,r,t,n,e),mi((([[,e],t,n,r,o,i=[]])=>qa(e,t,n,r,o,i)))),a),{})),oi(_a,Ea,Ya,Pa),{singleton:!0}),is=Mi((([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Si(0);return ii(vi(e,wi(r),fi((([,e])=>0!==e)),mi((([,e])=>({top:e})))),(e=>{ci(vi(n,bi(1),fi((e=>e.items.length>1))),(()=>{requestAnimationFrame((()=>{ai(t,e)}))}))})),{initialScrollTop:r}}),oi(Pa,Ni,Ya),{singleton:!0}),as=Mi((([{scrollVelocity:e}])=>{const t=Si(!1),n=ki(),r=Si(!1);return ui(vi(e,wi(r,t,n),fi((([e,t])=>!!t)),mi((([e,t,n,r])=>{const{enter:o,exit:i}=t;if(n){if(i(e,r))return!1}else if(o(e,r))return!0;return n})),pi()),t),ii(vi(Pi(t,e,n),wi(r)),(([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)})),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}}),oi(Na),{singleton:!0}),ss=Mi((([{scrollContainerState:e,scrollTo:t}])=>{const n=ki(),r=ki(),o=ki(),i=Si(!1),a=Si(void 0);return ui(vi(Pi(n,r),mi((([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n})))),e),ui(vi(t,wi(r),mi((([e,{offsetTop:t}])=>({...e,top:e.top+t})))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}}),oi(Ni)),ls=Mi((([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const u=ki(),c=Si(void 0),d=Si(null),h=Si(null);return ui(s,d),ui(l,h),ii(vi(u,wi(t,r,a,d,h,n)),(([e,t,n,r,o,i,a])=>{const s=function(e){return Ki(e).map((({k:e,v:t},n,r)=>{const o=r[n+1];return{endIndex:o?o.k-1:1/0,size:t,startIndex:e}}))}(t.sizeTree);r&&null!==o&&null!==i&&(n=o.scrollTop-i.offsetTop),e({ranges:s,scrollTop:n-=a})})),ui(vi(c,fi(ei),mi(us)),o),ui(vi(i,wi(c),fi((([,e])=>void 0!==e)),pi(),mi((([,e])=>e.ranges))),e),{getState:u,restoreStateFrom:c}}),oi(_a,Ni,Ea,Pa,ss));function us(e){return{align:"start",index:0,offset:e.scrollTop}}const cs=Mi((([{topItemsIndexes:e}])=>{const t=Si(0);return ui(vi(t,fi((e=>e>=0)),mi((e=>Array.from({length:e}).map(((e,t)=>t))))),e),{topItemCount:t}}),oi(Ya));function ds(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const hs=ds((()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent))),ps=Mi((([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{const m=_i(vi(l,wi(a),yi((([,e,t,n],[{bottom:r,items:o,offsetBottom:i,totalCount:a},s])=>{const l=r+i;let u=0;return t===a&&e.length>0&&o.length>0&&(0===o[0].originalIndex&&0===e[0].originalIndex||(u=l-n,0!==u&&(u+=s))),[u,o,a,l]}),[0,[],0,0]),fi((([e])=>0!==e)),wi(r,s,n,o,p,f),fi((([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===Za)),mi((([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Di.DEBUG),e)))));function g(n){n>0?(ai(t,{behavior:"auto",top:-n}),ai(e,0)):(ai(e,0),ai(t,{behavior:"auto",top:-n}))}return ii(vi(m,wi(e,i)),(([t,n,r])=>{r&&hs()?ai(e,n-t):g(-t)})),ii(vi(Pi(Ci(i,!1),e,f),fi((([e,t,n])=>!e&&!n&&0!==t)),mi((([e,t])=>t)),xi(1)),g),ui(vi(d,mi((e=>({top:-e})))),t),ii(vi(u,wi(h,c),mi((([e,{groupIndices:t,lastSize:n,sizeTree:r},o])=>{function i(e){return e*(n+o)}if(0===t.length)return i(e);{let n=0;const o=$i(r,0);let a=0,s=0;for(;ae&&(n-=o,r=e-a+1),a+=r,n+=i(r),s++}return n}}))),(n=>{ai(e,n),requestAnimationFrame((()=>{ai(t,{top:n}),requestAnimationFrame((()=>{ai(e,0),ai(f,!1)}))}))})),{deviation:e}}),oi(Ni,Na,Ya,_a,Ai,la)),fs=Mi((([e,t,n,r,o,i,a,s,l,u,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...u,...c})),oi(Wa,os,Pa,as,Xa,is,Qa,ss,ts,Ai,Ja)),ms=Mi((([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:d,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g},v,y,b,{listState:x,topItemsIndexes:w,...S},{scrollToIndex:C},k,{topItemCount:_},{groupCounts:M},T])=>(ui(S.rangeChanged,T.scrollSeekRangeChanged),ui(vi(T.windowViewportRect,mi((e=>e.visibleHeight))),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:M,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g,sizeRanges:u,topItemCount:_,topItemsIndexes:w,totalCount:h,...b,groupIndices:a,itemSize:l,listState:x,scrollToIndex:C,statefulTotalCount:d,trackItemSizes:p,...S,...T,...v,sizes:c,...y})),oi(_a,Ea,Ni,ls,rs,Ya,Da,ps,cs,Ta,fs));function gs(e,t){const n={},r={};let o=0;const i=e.length;for(;o(n[r]=function(e){let t,n;const r=()=>null==t?void 0:t();return function(o,i){switch(o){case 1:return i?n===i?void 0:(r(),n=i,t=ii(e,i),t):(r(),ti);case 2:return r(),void(n=null)}}}(e[t.events[r]]),n)),{})}const h=d.forwardRef(((h,p)=>{const{children:f,...m}=h,[g]=d.useState((()=>ni(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:o,singleton:i})=>{if(i&&t.has(o))return t.get(o);const a=e(r.map((e=>n(e))));return i&&t.set(o,a),a};return n(e)}(e),(e=>{u(e,m)})))),[v]=d.useState(Jo(c,g));vs((()=>{for(const e of s)e in m&&ii(v[e],m[e]);return()=>{Object.values(v).map(si)}}),[m,v,g]),vs((()=>{u(g,m)})),d.useImperativeHandle(p,Yo(function(e){return a.reduce(((n,r)=>(n[r]=n=>{ai(e[t.methods[r]],n)},n)),{})}(g)));const y=n;return(0,o.jsx)(l.Provider,{value:g,children:n?(0,o.jsx)(y,{...gs([...r,...i,...s],m),children:f}):f})}));return{Component:h,useEmitter:(e,t)=>{const n=d.useContext(l)[e];vs((()=>ii(n,t)),[t,n])},useEmitterValue:d.version.startsWith("18")?e=>{const t=d.useContext(l)[e],n=d.useCallback((e=>ii(t,e)),[t]);return d.useSyncExternalStore(n,(()=>li(t)),(()=>li(t)))}:e=>{const t=d.useContext(l)[e],[n,r]=d.useState(Jo(li,t));return vs((()=>ii(t,(e=>{e!==n&&r(Yo(e))}))),[t,n]),n},usePublisher:e=>{const t=d.useContext(l);return d.useCallback((n=>{ai(t[e],n)}),[t,e])}}}const bs=d.createContext(void 0),xs=d.createContext(void 0),ws=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Ss(e){return"self"in e}function Cs(e,t,n,r=ti,o,i){const a=d.useRef(null),s=d.useRef(null),l=d.useRef(null),u=d.useCallback((n=>{let r,o,a;const u=n.target;if(function(e){return"body"in e}(u)||Ss(u)){const e=Ss(u)?u:u.defaultView;a=i?e.scrollX:e.scrollY,r=i?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,o=i?e.innerWidth:e.innerHeight}else a=i?u.scrollLeft:u.scrollTop,r=i?u.scrollWidth:u.scrollHeight,o=i?u.offsetWidth:u.offsetHeight;const c=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:o})};n.suppressFlushSync?c():te.flushSync(c),null!==s.current&&(a===s.current||a<=0||a===r-o)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))}),[e,t,i]);return d.useEffect((()=>{const e=o||a.current;return r(o||a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",u)}}),[a,u,n,r,o]),{scrollByCallback:function(e){i&&(e={behavior:e.behavior,left:e.top}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){const r=a.current;if(!r||(i?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const o="smooth"===n.behavior;let u,c,d;Ss(r)?(c=Math.max(da(r.document.documentElement,i?"width":"height"),i?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),u=i?r.innerWidth:r.innerHeight,d=i?window.scrollX:window.scrollY):(c=r[i?"scrollWidth":"scrollHeight"],u=da(r,i?"width":"height"),d=r[i?"scrollLeft":"scrollTop"]);const h=c-u;if(n.top=Math.ceil(Math.max(Math.min(h,n.top),0)),La(u,c)||n.top===d)return e({scrollHeight:c,scrollTop:d,viewportHeight:u}),void(o&&t(!0));o?(s.current=n.top,l.current&&clearTimeout(l.current),l.current=setTimeout((()=>{l.current=null,s.current=null,t(!0)}),1e3)):s.current=null,i&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}}}const ks="-webkit-sticky",_s="sticky",Ms=ds((()=>{if(typeof document>"u")return _s;const e=document.createElement("div");return e.style.position=ks,e.style.position===ks?ks:_s}));function Ts(e){return e}const Ps=Mi((([e,t])=>({...e,...t})),oi(ms,Mi((()=>{const e=Si((e=>`Item ${e}`)),t=Si((e=>`Group ${e}`)),n=Si({}),r=Si(Ts),o=Si("div"),i=Si(ti),a=(e,t=null)=>Ci(vi(n,mi((t=>t[e])),pi()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}})))),Rs=({height:e})=>(0,o.jsx)("div",{style:{height:e}}),Is={overflowAnchor:"none",position:Ms(),zIndex:1},Ds={overflowAnchor:"none"},Os={...Ds,display:"inline-block",height:"100%"},As=d.memo((function({showTopList:e=!1}){const t=Ys("listState"),n=Xs("sizeRanges"),r=Ys("useWindowScroll"),i=Ys("customScrollParent"),a=Xs("windowScrollContainerState"),s=Xs("scrollContainerState"),l=i||r?a:s,u=Ys("itemContent"),c=Ys("context"),h=Ys("groupContent"),p=Ys("trackItemSizes"),f=Ys("itemSize"),m=Ys("log"),g=Xs("gap"),v=Ys("horizontalDirection"),{callbackRef:y}=Zi(n,f,p,e?ti:l,m,g,i,v,Ys("skipAnimationFrameInResizeObserver")),[b,x]=d.useState(0);Ks("deviation",(e=>{b!==e&&x(e)}));const w=Ys("EmptyPlaceholder"),S=Ys("ScrollSeekPlaceholder")||Rs,C=Ys("ListComponent"),k=Ys("ItemComponent"),_=Ys("GroupComponent"),M=Ys("computeItemKey"),T=Ys("isSeeking"),P=Ys("groupIndices").length>0,R=Ys("alignToBottom"),I=Ys("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==b?b:R?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==b?b:R?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&w?(0,o.jsx)(w,{...js(w,c)}):(0,o.jsx)(C,{...js(C,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:D,children:(e?t.topItems:t.items).map((e=>{const n=e.originalIndex,r=M(n+t.firstItemIndex,e.data,c);return T?(0,d.createElement)(S,{...js(S,c),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,d.createElement)(_,{...js(_,c),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Is},h(e.index,c)):(0,d.createElement)(k,{...js(k,c),...Ns(k,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:v?Os:Ds},P?u(e.index,e.groupIndex,e.data,c):u(e.index,e.data,c))}))})})),Es={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ls={outline:"none",overflowX:"auto",position:"relative"},Zs=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Fs={position:Ms(),top:0,width:"100%",zIndex:1};function js(e,t){if("string"!=typeof e)return{context:t}}function Ns(e,t){return{item:"string"==typeof e?void 0:t}}const zs=d.memo((function(){const e=Ys("HeaderComponent"),t=Xs("headerHeight"),n=Ys("HeaderFooterTag"),r=Ei(d.useMemo((()=>e=>{t(da(e,"height"))}),[t]),!0,Ys("skipAnimationFrameInResizeObserver")),i=Ys("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...js(e,i)})}):null})),Bs=d.memo((function(){const e=Ys("FooterComponent"),t=Xs("footerHeight"),n=Ys("HeaderFooterTag"),r=Ei(d.useMemo((()=>e=>{t(da(e,"height"))}),[t]),!0,Ys("skipAnimationFrameInResizeObserver")),i=Ys("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...js(e,i)})}):null}));function Vs({useEmitter:e,useEmitterValue:t,usePublisher:n}){return d.memo((function({children:r,style:i,context:a,...s}){const l=n("scrollContainerState"),u=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),d=t("scrollerRef"),h=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=Cs(l,c,u,d,void 0,h);return e("scrollTo",m),e("scrollBy",p),(0,o.jsx)(u,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?Ls:Es,...i},tabIndex:0,...s,...js(u,a),children:r})}))}function $s({useEmitter:e,useEmitterValue:t,usePublisher:n}){return d.memo((function({children:r,style:i,context:a,...s}){const l=n("windowScrollContainerState"),u=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),h=t("totalListHeight"),p=t("deviation"),f=t("customScrollParent"),m=d.useRef(null),g=t("scrollerRef"),{scrollByCallback:v,scrollerRef:y,scrollToCallback:b}=Cs(l,c,u,g,f);return ws((()=>{var e;return y.current=f||(null==(e=m.current)?void 0:e.ownerDocument.defaultView),()=>{y.current=null}}),[y,f]),e("windowScrollTo",b),e("scrollBy",v),(0,o.jsx)(u,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0!==h?{height:h+p}:{}},...s,...js(u,a),children:r})}))}const Hs=({children:e})=>{const t=d.useContext(bs),n=Xs("viewportHeight"),r=Xs("fixedItemHeight"),i=Ys("alignToBottom"),a=Ys("horizontalDirection"),s=Ei(d.useMemo((()=>Qo(n,(e=>da(e,a?"width":"height")))),[n,a]),!0,Ys("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:s,style:Zs(i),children:e})},Ws=({children:e})=>{const t=d.useContext(bs),n=Xs("windowViewportRect"),r=Xs("fixedItemHeight"),i=Ys("customScrollParent"),a=ji(n,i,Ys("skipAnimationFrameInResizeObserver")),s=Ys("alignToBottom");return d.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:a,style:Zs(s),children:e})},Gs=({children:e})=>{const t=Ys("TopItemListComponent")||"div",n=Ys("headerHeight"),r={...Fs,marginTop:`${n}px`},i=Ys("context");return(0,o.jsx)(t,{style:r,...js(t,i),children:e})},Us=d.memo((function(e){const t=Ys("useWindowScroll"),n=Ys("topItemsIndexes").length>0,r=Ys("customScrollParent"),i=Ys("context");return(0,o.jsxs)(r||t?Js:Qs,{...e,context:i,children:[n&&(0,o.jsx)(Gs,{children:(0,o.jsx)(As,{showTopList:!0})}),(0,o.jsxs)(r||t?Ws:Hs,{children:[(0,o.jsx)(zs,{}),(0,o.jsx)(As,{}),(0,o.jsx)(Bs,{})]})]})})),{Component:qs,useEmitter:Ks,useEmitterValue:Ys,usePublisher:Xs}=ys(Ps,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Us),Qs=Vs({useEmitter:Ks,useEmitterValue:Ys,usePublisher:Xs}),Js=$s({useEmitter:Ks,useEmitterValue:Ys,usePublisher:Xs}),el=qs,tl=Mi((([e,t])=>({...e,...t})),oi(ms,Mi((()=>{const e=Si((e=>(0,o.jsxs)("td",{children:["Item $",e]}))),t=Si(null),n=Si((e=>(0,o.jsxs)("td",{colSpan:1e3,children:["Group ",e]}))),r=Si(null),i=Si(null),a=Si({}),s=Si(Ts),l=Si(ti),u=(e,t=null)=>Ci(vi(a,mi((t=>t[e])),pi()),t);return{components:a,computeItemKey:s,context:t,EmptyPlaceholder:u("EmptyPlaceholder"),FillerRow:u("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:u("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:u("ScrollSeekPlaceholder"),TableBodyComponent:u("TableBody","tbody"),TableComponent:u("Table","table"),TableFooterComponent:u("TableFoot","tfoot"),TableHeadComponent:u("TableHead","thead"),TableRowComponent:u("TableRow","tr"),GroupComponent:u("Group","tr")}})))),nl=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{height:e}})}),rl=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{border:0,height:e,padding:0}})}),ol={overflowAnchor:"none"},il={position:Ms(),zIndex:2,overflowAnchor:"none"},al=d.memo((function({showTopList:e=!1}){const t=pl("listState"),n=pl("computeItemKey"),r=pl("firstItemIndex"),i=pl("context"),a=pl("isSeeking"),s=pl("fixedHeaderHeight"),l=pl("groupIndices").length>0,u=pl("itemContent"),c=pl("groupContent"),h=pl("ScrollSeekPlaceholder")||nl,p=pl("GroupComponent"),f=pl("TableRowComponent"),m=(e?t.topItems:[]).reduce(((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e)),[]),g=(e?t.topItems:t.items).map((t=>{const o=t.originalIndex,g=n(o+r,t.data,i),v=e?0===o?0:m[o-1]:0;return a?(0,d.createElement)(h,{...js(h,i),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,d.createElement)(p,{...js(p,i),"data-index":o,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...il,top:s}},c(t.index,i)):(0,d.createElement)(f,{...js(f,i),...Ns(f,t.data),"data-index":o,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...il,top:s+v}:ol},l?u(t.index,t.groupIndex,t.data,i):u(t.index,t.data,i))}));return(0,o.jsx)(o.Fragment,{children:g})})),sl=d.memo((function(){const e=pl("listState"),t=pl("topItemsIndexes").length>0,n=fl("sizeRanges"),r=pl("useWindowScroll"),i=pl("customScrollParent"),a=fl("windowScrollContainerState"),s=fl("scrollContainerState"),l=i||r?a:s,u=pl("trackItemSizes"),c=pl("itemSize"),h=pl("log"),{callbackRef:p,ref:f}=Zi(n,c,u,l,h,void 0,i,!1,pl("skipAnimationFrameInResizeObserver")),[m,g]=d.useState(0);hl("deviation",(e=>{m!==e&&(f.current.style.marginTop=`${e}px`,g(e))}));const v=pl("EmptyPlaceholder"),y=pl("FillerRow")||rl,b=pl("TableBodyComponent"),x=pl("paddingTopAddition"),w=pl("statefulTotalCount"),S=pl("context");if(0===w&&v)return(0,o.jsx)(v,{...js(v,S)});const C=(t?e.topItems:[]).reduce(((e,t)=>e+t.size),0),k=e.offsetTop+x+m-C,_=e.offsetBottom,M=k>0?(0,o.jsx)(y,{context:S,height:k},"padding-top"):null,T=_>0?(0,o.jsx)(y,{context:S,height:_},"padding-bottom"):null;return(0,o.jsxs)(b,{"data-testid":"virtuoso-item-list",ref:p,...js(b,S),children:[M,t&&(0,o.jsx)(al,{showTopList:!0}),(0,o.jsx)(al,{}),T]})})),ll=({children:e})=>{const t=d.useContext(bs),n=fl("viewportHeight"),r=fl("fixedItemHeight"),i=Ei(d.useMemo((()=>Qo(n,(e=>da(e,"height")))),[n]),!0,pl("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:i,style:Zs(!1),children:e})},ul=({children:e})=>{const t=d.useContext(bs),n=fl("windowViewportRect"),r=fl("fixedItemHeight"),i=pl("customScrollParent"),a=ji(n,i,pl("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:a,style:Zs(!1),children:e})},cl=d.memo((function(e){const t=pl("useWindowScroll"),n=pl("customScrollParent"),r=fl("fixedHeaderHeight"),i=fl("fixedFooterHeight"),a=pl("fixedHeaderContent"),s=pl("fixedFooterContent"),l=pl("context"),u=Ei(d.useMemo((()=>Qo(r,(e=>da(e,"height")))),[r]),!0,pl("skipAnimationFrameInResizeObserver")),c=Ei(d.useMemo((()=>Qo(i,(e=>da(e,"height")))),[i]),!0,pl("skipAnimationFrameInResizeObserver")),h=n||t?gl:ml,p=n||t?ul:ll,f=pl("TableComponent"),m=pl("TableHeadComponent"),g=pl("TableFooterComponent"),v=a?(0,o.jsx)(m,{ref:u,style:{position:"sticky",top:0,zIndex:2},...js(m,l),children:a()},"TableHead"):null,y=s?(0,o.jsx)(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...js(g,l),children:s()},"TableFoot"):null;return(0,o.jsx)(h,{...e,...js(h,l),children:(0,o.jsx)(p,{children:(0,o.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:"none"},...js(f,l),children:[v,(0,o.jsx)(sl,{},"TableBody"),y]})})})})),{Component:dl,useEmitter:hl,useEmitterValue:pl,usePublisher:fl}=ys(tl,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},cl),ml=Vs({useEmitter:hl,useEmitterValue:pl,usePublisher:fl}),gl=$s({useEmitter:hl,useEmitterValue:pl,usePublisher:fl}),vl=dl,yl={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},bl={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xl,floor:wl,max:Sl,min:Cl,round:kl}=Math;function _l(e,t,n){return Array.from({length:t-e+1}).map(((t,r)=>({data:null===n?null:n[r+e],index:r+e})))}function Ml(e,t){return e&&e.width===t.width&&e.height===t.height}function Tl(e,t){return e&&e.column===t.column&&e.row===t.row}const Pl=Mi((([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:m},{customScrollParent:g,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x},w])=>{const S=Si(0),C=Si(0),k=Si(yl),_=Si({height:0,width:0}),M=Si({height:0,width:0}),T=ki(),P=ki(),R=Si(0),I=Si(null),D=Si({column:0,row:0}),O=ki(),A=ki(),E=Si(!1),L=Si(0),Z=Si(!0),F=Si(!1),j=Si(!1);ii(vi(f,wi(L),fi((([e,t])=>!!t))),(()=>{ai(Z,!1)})),ii(vi(Pi(f,Z,M,_,L,F),fi((([e,t,n,r,,o])=>e&&!t&&0!==n.height&&0!==r.height&&!o))),(([,,,,e])=>{ai(F,!0),Oa(1,(()=>{ai(T,e)})),ci(vi(u),(()=>{ai(t,[0,0]),ai(Z,!0)}))})),ui(vi(A,fi((e=>null!=e&&e.scrollTop>0)),gi(0)),C),ii(vi(f,wi(A),fi((([,e])=>null!=e))),(([,e])=>{e&&(ai(_,e.viewport),ai(M,e.item),ai(D,e.gap),e.scrollTop>0&&(ai(E,!0),ci(vi(u,bi(1)),(e=>{ai(E,!1)})),ai(l,{top:e.scrollTop})))})),ui(vi(_,mi((({height:e})=>e))),d),ui(vi(Pi(Ri(_,Ml),Ri(M,Ml),Ri(D,((e,t)=>e&&e.column===t.column&&e.row===t.row)),Ri(u)),mi((([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e})))),O),ui(vi(Pi(Ri(S),r,Ri(D,Tl),Ri(M,Ml),Ri(_,Ml),Ri(I),Ri(C),Ri(E),Ri(Z),Ri(L)),fi((([,,,,,,,e])=>!e)),mi((([e,[t,n],r,o,i,a,s,,l,u])=>{const{column:c,row:d}=r,{height:h,width:p}=o,{width:f}=i;if(0===s&&(0===e||0===f))return yl;if(0===p){const t=Aa(u,e);return function(e){return{...bl,items:e}}(_l(t,t+Math.max(s-1,0),a))}const m=Rl(f,p,c);let g,v;l?0===t&&0===n&&s>0?(g=0,v=s-1):(g=m*wl((t+d)/(h+d)),v=m*xl((n+d)/(h+d))-1,v=Cl(e-1,Sl(v,m-1)),g=Cl(v,Sl(0,g))):(g=0,v=-1);const y=_l(g,v,a),{bottom:b,top:x}=Il(i,r,o,y),w=xl(e/m);return{bottom:b,itemHeight:h,items:y,itemWidth:p,offsetBottom:w*h+(w-1)*d-b,offsetTop:x,top:x}}))),k),ui(vi(I,fi((e=>null!==e)),mi((e=>e.length))),S),ui(vi(Pi(_,M,k,D),fi((([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height)),mi((([e,t,{items:n},r])=>{const{bottom:o,top:i}=Il(e,r,t,n);return[i,o]})),pi(sa)),t);const N=Si(!1);ui(vi(u,wi(N),mi((([e,t])=>t||0!==e))),N);const z=_i(vi(Pi(k,S),fi((([{items:e}])=>e.length>0)),wi(N),fi((([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r})),mi((([[,e]])=>e-1)),pi())),B=_i(vi(Ri(k),fi((({items:e})=>e.length>0&&0===e[0].index)),gi(0),pi())),V=_i(vi(Ri(k),wi(E),fi((([{items:e},t])=>e.length>0&&!t)),mi((([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index}))),pi(aa),xi(0)));ui(V,p.scrollSeekRangeChanged),ui(vi(T,wi(_,M,S,D),mi((([e,t,n,r,o])=>{const i=Ia(e),{align:a,behavior:s,offset:l}=i;let u=i.index;"LAST"===u&&(u=r-1),u=Sl(0,u,Cl(r-1,u));let c=Dl(t,o,n,u);return"end"===a?c=kl(c-t.height+n.height):"center"===a&&(c=kl(c-t.height/2+n.height/2)),l&&(c+=l),{behavior:s,top:c}}))),l);const $=Ci(vi(k,mi((e=>e.offsetBottom+e.bottom))),0);return ui(vi(x,mi((e=>({height:e.visibleHeight,width:e.visibleWidth})))),_),{customScrollParent:g,data:I,deviation:R,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:M,overscan:n,restoreStateFrom:A,scrollBy:a,scrollContainerState:s,scrollHeight:P,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:_,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x,...p,gridState:k,horizontalDirection:j,initialTopMostItemIndex:L,totalListHeight:$,...h,endReached:z,propsReady:m,rangeChanged:V,startReached:B,stateChanged:O,stateRestoreInProgress:E,...w}}),oi(Wa,Ni,Na,as,Pa,ss,Ai));function Rl(e,t,n){return Sl(1,wl((e+n)/(wl(t)+n)))}function Il(e,t,n,r){const{height:o}=n;if(void 0===o||0===r.length)return{bottom:0,top:0};const i=Dl(e,t,n,r[0].index);return{bottom:Dl(e,t,n,r[r.length-1].index)+o,top:i}}function Dl(e,t,n,r){const o=Rl(e.width,n.width,t.column),i=wl(r/o),a=i*n.height+Sl(0,i-1)*t.row;return a>0?a+t.row:a}const Ol=Mi((([e,t])=>({...e,...t})),oi(Pl,Mi((()=>{const e=Si((e=>`Item ${e}`)),t=Si({}),n=Si(null),r=Si("virtuoso-grid-item"),o=Si("virtuoso-grid-list"),i=Si(Ts),a=Si("div"),s=Si(ti),l=(e,n=null)=>Ci(vi(t,mi((t=>t[e])),pi()),n),u=Si(!1),c=Si(!1);return ui(Ri(c),u),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}})))),Al=d.memo((function(){const e=Bl("gridState"),t=Bl("listClassName"),n=Bl("itemClassName"),r=Bl("itemContent"),i=Bl("computeItemKey"),a=Bl("isSeeking"),s=Vl("scrollHeight"),l=Bl("ItemComponent"),u=Bl("ListComponent"),c=Bl("ScrollSeekPlaceholder"),h=Bl("context"),p=Vl("itemDimensions"),f=Vl("gap"),m=Bl("log"),g=Bl("stateRestoreInProgress"),v=Vl("reportReadyState"),y=Ei(d.useMemo((()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(n){const{height:e,width:t}=n.getBoundingClientRect();p({height:e,width:t})}f({column:Wl("column-gap",getComputedStyle(e).columnGap,m),row:Wl("row-gap",getComputedStyle(e).rowGap,m)})}),[s,p,f,m]),!0,!1);return ws((()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)}),[e]),g?null:(0,o.jsx)(u,{className:t,ref:y,...js(u,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map((t=>{const s=i(t.index,t.data,h);return a?(0,o.jsx)(c,{...js(c,h),height:e.itemHeight,index:t.index,width:e.itemWidth},s):(0,d.createElement)(l,{...js(l,h),className:n,"data-index":t.index,key:s},r(t.index,t.data,h))}))})})),El=d.memo((function(){const e=Bl("HeaderComponent"),t=Vl("headerHeight"),n=Bl("headerFooterTag"),r=Ei(d.useMemo((()=>e=>{t(da(e,"height"))}),[t]),!0,!1),i=Bl("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...js(e,i)})}):null})),Ll=d.memo((function(){const e=Bl("FooterComponent"),t=Vl("footerHeight"),n=Bl("headerFooterTag"),r=Ei(d.useMemo((()=>e=>{t(da(e,"height"))}),[t]),!0,!1),i=Bl("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...js(e,i)})}):null})),Zl=({children:e})=>{const t=d.useContext(xs),n=Vl("itemDimensions"),r=Vl("viewportDimensions"),i=Ei(d.useMemo((()=>e=>{r(e.getBoundingClientRect())}),[r]),!0,!1);return d.useEffect((()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))}),[t,r,n]),(0,o.jsx)("div",{ref:i,style:Zs(!1),children:e})},Fl=({children:e})=>{const t=d.useContext(xs),n=Vl("windowViewportRect"),r=Vl("itemDimensions"),i=Bl("customScrollParent"),a=ji(n,i,!1);return d.useEffect((()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))}),[t,n,r]),(0,o.jsx)("div",{ref:a,style:Zs(!1),children:e})},jl=d.memo((function({...e}){const t=Bl("useWindowScroll"),n=Bl("customScrollParent"),r=n||t?Hl:$l,i=n||t?Fl:Zl,a=Bl("context");return(0,o.jsx)(r,{...e,...js(r,a),children:(0,o.jsxs)(i,{children:[(0,o.jsx)(El,{}),(0,o.jsx)(Al,{}),(0,o.jsx)(Ll,{})]})})})),{Component:Nl,useEmitter:zl,useEmitterValue:Bl,usePublisher:Vl}=ys(Ol,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},jl),$l=Vs({useEmitter:zl,useEmitterValue:Bl,usePublisher:Vl}),Hl=$s({useEmitter:zl,useEmitterValue:Bl,usePublisher:Vl});function Wl(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Di.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var Gl=n(90496),Ul=n(82267),ql=n(16838),Kl=n(82319),Yl=n(24043),Xl=n(73037),Ql=n(14544),Jl=n(16758),eu=n(51183),tu=n(78849),nu=n(3552);const ru=(0,Y.ZP)(Ql.Z,{shouldForwardProp:e=>(0,Xl.Z)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,Kl.Z)((({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${nu.Z.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,ql.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${nu.Z.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,ql.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${nu.Z.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,ql.Fq)(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})`:(0,ql.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${nu.Z.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${nu.Z.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]})))),ou=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:h,selected:p=!1,className:f,...m}=n,g=d.useContext(tu.Z),v=d.useMemo((()=>({dense:l||g.dense||!1,alignItems:r,disableGutters:u})),[r,g.dense,l,u]),y=d.useRef(null);(0,Jl.Z)((()=>{i&&y.current&&y.current.focus()}),[i]);const b={...n,alignItems:r,dense:v.dense,disableGutters:u,divider:c,selected:p},x=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,l={root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},u=(0,Ul.Z)(l,nu.t,n);return{...n,...u}})(b),w=(0,eu.Z)(y,t);return(0,o.jsx)(tu.Z.Provider,{value:v,children:(0,o.jsx)(ru,{ref:w,href:m.href||m.to,component:(m.href||m.to)&&"div"===a?"button":a,focusVisibleClassName:(0,Gl.Z)(x.focusVisible,h),ownerState:b,className:(0,Gl.Z)(x.root,f),...m,classes:x,children:s})})}));var iu=n(12577);const au=(0,d.memo)((function({color:e,sx:t,...n}){return(0,o.jsx)($o.Z,{...n,sx:Jn({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})})),su=(0,d.forwardRef)((function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:i,onMouseOver:a,onMouseOut:s,index:l,...u},c){const[h,p]=(0,d.useState)(n);return(0,o.jsxs)(ou,{...u,role:"listitem",sx:Jn({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(t,e.id),e.onClick?.(t)},onMouseOver:t=>a?.(t,{id:e.id,index:l}),onMouseOut:t=>s?.(t,{id:e.id,index:l}),selected:i,ref:c,children:[(0,o.jsx)($o.Z,{sx:{display:"flex",alignItems:"center"},children:(0,o.jsx)(au,{color:e.color})}),(0,o.jsx)(iu.Z,{primary:e.label,primaryTypographyProps:{noWrap:h},onMouseOver:function(){n&&p(!1)},onMouseOut:function(){n&&p(!0)}})]})})),lu=(0,d.memo)(su);function uu(e,t){return"ALL"!==t&&!!t[e.id]}function cu({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:a,onItemMouseOut:s}){const l=e.length>5;return(0,o.jsx)(el,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,o.jsx)(lu,{item:t,index:e,truncateLabel:l,isVisuallySelected:uu(t,r),onClick:i,onMouseOver:a,onMouseOut:s,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function du({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:a}){return(0,o.jsx)($o.Z,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map(((e,t)=>(0,o.jsx)(lu,{item:e,index:t,isVisuallySelected:uu(e,n),onMouseOver:i,onMouseOut:a,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id)))})}function hu(e,t){return"function"==typeof e?e(t):e}function pu(e,t){return n=>{t.setState((t=>({...t,[e]:hu(n,t[e])})))}}function fu(e){return e instanceof Function}function mu(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}function gu(e,t,n){let r,o=[];return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==o.length||s.some(((e,t)=>o[t]!==e))))return r;let l;if(o=s,n.key&&n.debug&&(l=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const yu="debugHeaders";function bu(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const xu={createTable:e=>{e.getHeaderGroups=gu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,a;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],l=null!=(a=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[];return wu(t,[...s,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...l],e)}),vu(e.options,yu)),e.getCenterHeaderGroups=gu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>wu(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),vu(e.options,yu)),e.getLeftHeaderGroups=gu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return wu(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),vu(e.options,yu)),e.getRightHeaderGroups=gu((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return wu(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),vu(e.options,yu)),e.getFooterGroups=gu((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),vu(e.options,yu)),e.getLeftFooterGroups=gu((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),vu(e.options,yu)),e.getCenterFooterGroups=gu((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),vu(e.options,yu)),e.getRightFooterGroups=gu((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),vu(e.options,yu)),e.getFlatHeaders=gu((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),vu(e.options,yu)),e.getLeftFlatHeaders=gu((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),vu(e.options,yu)),e.getCenterFlatHeaders=gu((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),vu(e.options,yu)),e.getRightFlatHeaders=gu((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),vu(e.options,yu)),e.getCenterLeafHeaders=gu((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),vu(e.options,yu)),e.getLeftLeafHeaders=gu((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),vu(e.options,yu)),e.getRightLeafHeaders=gu((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),vu(e.options,yu)),e.getLeafHeaders=gu((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,a,s,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),vu(e.options,yu))}};function wu(e,t,n,r){var o,i;let a=0;const s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)}),0)};s(e);let l=[];const u=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let s,l=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,l=!0),a&&(null==a?void 0:a.column)===s)a.subHeaders.push(e);else{const o=bu(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&u(i,t-1)},c=t.map(((e,t)=>bu(n,e,{depth:a,index:t})));u(c,a-1),l.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}const Su=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:()=>mu(s.subRows,(e=>e.subRows)),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:gu((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:gu((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),vu(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),vu(e.options,"debugRows")),_getAllCellsByColumnId:gu((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),vu(e.options,"debugRows"))};for(let t=0;t{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ku=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(i))};ku.autoRemove=e=>Eu(e);const _u=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};_u.autoRemove=e=>Eu(e);const Mu=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};Mu.autoRemove=e=>Eu(e);const Tu=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};Tu.autoRemove=e=>Eu(e);const Pu=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));Pu.autoRemove=e=>Eu(e)||!(null!=e&&e.length);const Ru=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));Ru.autoRemove=e=>Eu(e)||!(null!=e&&e.length);const Iu=(e,t,n)=>e.getValue(t)===n;Iu.autoRemove=e=>Eu(e);const Du=(e,t,n)=>e.getValue(t)==n;Du.autoRemove=e=>Eu(e);const Ou=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Ou.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},Ou.autoRemove=e=>Eu(e)||Eu(e[0])&&Eu(e[1]);const Au={includesString:ku,includesStringSensitive:_u,equalsString:Mu,arrIncludes:Tu,arrIncludesAll:Pu,arrIncludesSome:Ru,equals:Iu,weakEquals:Du,inNumberRange:Ou};function Eu(e){return null==e||""===e}const Lu={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:pu("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?Au.includesString:"number"==typeof r?Au.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?Au.equals:Array.isArray(r)?Au.arrIncludes:Au.weakEquals},e.getFilterFn=()=>{var n,r;return fu(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:Au[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=hu(n,o?o.value:void 0);var a;if(Zu(r,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const s={id:e.id,value:i};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?l:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=hu(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(Zu(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Zu(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const Fu={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),i=n.sort(((e,t)=>e-t));return n.length%2!=0?i[o]:(i[o-1]+i[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},ju={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:pu("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?Fu.sum:"[object Date]"===Object.prototype.toString.call(r)?Fu.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return fu(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:Fu[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const Nu={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:pu("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=gu((e=>[Wu(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),vu(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Wu(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Wu(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=gu((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),vu(e.options,"debugTable"))}},zu={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:pu("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,a,s,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=gu((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),vu(t.options,"debugRows")),e.getLeftVisibleCells=gu((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),vu(t.options,"debugRows")),e.getRightVisibleCells=gu((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),vu(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(i=r.right)?void 0:i.length))},e.getLeftLeafColumns=gu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),vu(e.options,"debugColumns")),e.getRightLeafColumns=gu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),vu(e.options,"debugColumns")),e.getCenterLeafColumns=gu((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),vu(e.options,"debugColumns"))}};const Bu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Vu={getDefaultColumnDef:()=>Bu,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:pu("columnSizing",e),onColumnSizingInfoChange:pu("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Bu.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:Bu.size),null!=(o=e.columnDef.maxSize)?o:Bu.maxSize)},e.getStart=gu((e=>[e,Wu(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),vu(t.options,"debugColumns")),e.getAfter=gu((e=>[e,Wu(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),vu(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o)return;if(null==i.persist||i.persist(),Hu(i)&&i.touches&&i.touches.length>1)return;const a=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=Hu(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100})),{...e,deltaOffset:a,deltaPercentage:s}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...u}))))},d=e=>c("move",e),h=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||("undefined"!=typeof document?document:null);const f={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),h(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof $u)return $u;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return $u=e,$u}()&&{passive:!1};Hu(i)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",f.moveHandler,g),null==p||p.addEventListener("mouseup",f.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let $u=null;function Hu(e){return"touchstart"===e.type}function Wu(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Gu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:pu("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{Uu(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=gu((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?qu(e,n):{rows:[],flatRows:[],rowsById:{}}),vu(e.options,"debugTable")),e.getFilteredSelectedRowModel=gu((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?qu(e,n):{rows:[],flatRows:[],rowsById:{}}),vu(e.options,"debugTable")),e.getGroupedSelectedRowModel=gu((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?qu(e,n):{rows:[],flatRows:[],rowsById:{}}),vu(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var a;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return Uu(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ku(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===Yu(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===Yu(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},Uu=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach((t=>Uu(e,t.id,n,r,o)))};function qu(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const a=Ku(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Ku(e,t){var n;return null!=(n=t[e.id])&&n}function Yu(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(Ku(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=Yu(e,t);"all"===n?i=!0:"some"===n?(i=!0,o=!1):o=!1}})),o?"all":!!i&&"some"}const Xu=/([0-9]+)/gm;function Qu(e,t){return e===t?0:e>t?1:-1}function Ju(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function ec(e,t){const n=e.split(Xu).filter(Boolean),r=t.split(Xu).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const tc={alphanumeric:(e,t,n)=>ec(Ju(e.getValue(n)).toLowerCase(),Ju(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>ec(Ju(e.getValue(n)),Ju(t.getValue(n))),text:(e,t,n)=>Qu(Ju(e.getValue(n)).toLowerCase(),Ju(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>Qu(Ju(e.getValue(n)),Ju(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rQu(e.getValue(n),t.getValue(n))},nc=[xu,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:pu("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=gu((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),vu(t.options,"debugRows")),e.getVisibleCells=gu((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),vu(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>gu((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),vu(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},Nu,zu,Cu,Lu,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:pu("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Au.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return fu(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:Au[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:pu("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return tc.datetime;if("string"==typeof n&&(r=!0,n.split(Xu).length>1))return tc.alphanumeric}return r?tc.text:tc.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return fu(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:tc[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=null!=n;t.setSorting((a=>{const s=null==a?void 0:a.find((t=>t.id===e.id)),l=null==a?void 0:a.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===o;var h;(u=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&l!==a.length-1?"replace":s?"toggle":"replace","toggle"===u&&(i||o||(u="remove")),"add"===u)?(c=[...a,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(h=t.options.maxMultiSortColCount)?h:Number.MAX_SAFE_INTEGER))):c="toggle"===u?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ju,{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:pu("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const i=!0===r||!(null==r||!r[e.id]);let a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:pu("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>hu(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=hu(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,hu(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=hu(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=gu((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),vu(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&te.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:pu("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,a,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(i=r.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=gu((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),vu(e.options,"debugRows")),e.getBottomRows=gu((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),vu(e.options,"debugRows")),e.getCenterRows=gu((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),vu(e.options,"debugRows"))}},Gu,Vu];function rc(e){var t,n;const r=[...nc,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let a={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a}));const s=[];let l=!1;const u={_features:r,options:{...i,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=hu(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:gu((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),vu(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:gu((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},s=a.accessorKey;let l,u=null!=(o=null!=(i=a.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?l=a.accessorFn:s&&(l=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[a.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:l,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:gu((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),vu(e.options,"debugColumns")),getLeafColumns:gu((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=c.columns)&&t.length){let t=c.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[c]}),vu(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(o,e,r,n),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),vu(e,"debugColumns")),getAllFlatColumns:gu((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),vu(e,"debugColumns")),_getAllFlatColumnsById:gu((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),vu(e,"debugColumns")),getAllLeafColumns:gu((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),vu(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,u);for(let e=0;e{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function ic(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?d.createElement(e,t):e:null;var n}var ac=n(14968),sc=n(30575);const lc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(ac.Z,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,ql.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})}));var uc=n(56174);const cc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(uc.Z,{...e,ref:t})}));var dc=n(90190);const hc=(0,Y.ZP)(dc.Z)((({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default}))),pc={compact:"small",standard:"medium",comfortable:"medium"},fc=(0,d.forwardRef)((function({density:e,...t},n){return(0,o.jsx)(hc,{...t,tabIndex:-1,size:pc[e],ref:n,sx:{width:"100%"}})}));var mc=n(31889);const gc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(mc.Z,{...e,ref:t})}));var vc=n(52054),yc=n(90247);const bc=(0,yc.Z)((0,o.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var xc=n(51640),wc=n(44124),Sc=n(6749);function Cc(e){return(0,Sc.ZP)("MuiTableSortLabel",e)}const kc=(0,wc.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);var _c=n(16351);const Mc=(0,Y.ZP)(Ql.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,Kl.Z)((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${kc.icon}`]:{opacity:.5}},[`&.${kc.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${kc.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),Tc=(0,Y.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,xc.Z)(n.direction)}`]]}})((0,Kl.Z)((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),Pc=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:a,direction:s="asc",hideSortIcon:l=!1,IconComponent:u=bc,slots:c={},slotProps:d={},...h}=n,p={...n,active:r,direction:s,hideSortIcon:l,IconComponent:u},f=(e=>{const{classes:t,direction:n,active:r}=e,o={root:["root",r&&"active",`direction${(0,xc.Z)(n)}`],icon:["icon",`iconDirection${(0,xc.Z)(n)}`]};return(0,Ul.Z)(o,Cc,t)})(p),m={slots:c,slotProps:d},[g,v]=(0,_c.Z)("root",{elementType:Mc,externalForwardedProps:m,ownerState:p,className:(0,Gl.Z)(f.root,a),ref:t}),[y,b]=(0,_c.Z)("icon",{elementType:Tc,externalForwardedProps:m,ownerState:p,className:f.icon});return(0,o.jsxs)(g,{disableRipple:!0,component:"span",...v,...h,children:[i,l&&!r?null:(0,o.jsx)(y,{as:u,...b})]})}));var Rc=n(96205);const Ic=150,Dc=40;function Oc(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:o,defaultColumnHeight:i}={}){let a=e.spacing(1),s=e.spacing(1.25),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize;"compact"===t&&(a=e.spacing(.5),s=e.spacing(.5),l=e.spacing(1),u=o?l:s,c=r?l:s,d=e.typography.body2.lineHeight,h=e.typography.body2.fontSize),"comfortable"===t&&(a=e.spacing(2),s=e.spacing(1.5),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize);const p=n||!i||"auto"===i?function(e,t){return("string"==typeof e?parseInt(e,10):e??0)+2*("string"==typeof t?parseInt(t,10):t)}(d,a):i;return{padding:`${a} ${c} ${a} ${u}`,height:p,fontSize:h,lineHeight:d}}function Ac(e){return e.map((({width:e,align:t,headerDescription:n,cellDescription:r,enableSorting:o,...i})=>({...i,..."auto"===e||void 0===e?{size:0,minSize:0,maxSize:0}:{size:e},enableSorting:!!o,meta:{align:t,headerDescription:n,cellDescription:r}})))}const Ec=(0,Y.ZP)(Rc.Z)((({theme:e})=>({padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:e.palette.background.default},"&:focus-visible":{outline:`solid 1px ${e.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}})));function Lc({children:e,density:t,variant:n,width:r,defaultColumnHeight:i,focusState:a="none",onFocusTrigger:s,isFirstColumn:l,isLastColumn:u,description:c,align:h,color:p,backgroundColor:f,...m}){const g=(0,Vo.Z)(),v=(0,d.useRef)(),y="head"===n;(0,d.useEffect)((()=>{"trigger-focus"===a&&v.current&&v.current.focus()}),[a]);const b=e=>{s?.(e)};return(0,o.jsx)(Ec,{...m,tabIndex:"none"!==a?0:-1,onFocus:e=>{const t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()},onClick:b,onKeyUp:b,style:{width:r},sx:{position:"relative",borderBottom:y?`solid 1px ${g.palette.grey[100]}`:`solid 1px ${g.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${f??g.palette.background.default} !important`,outline:`solid 1px ${g.palette.info.main}`,outlineOffset:"-1px"}},ref:v,children:(0,o.jsx)($o.Z,{id:"original-cell",sx:{...Oc(g,t,{isHeader:y,isLastColumn:u,isFirstColumn:l,defaultColumnHeight:i}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:f??"inherit",color:p??"inherit"},title:c,"aria-label":c,textAlign:h,children:e})})}function Zc({onSort:e,sortDirection:t,nextSortDirection:n,children:r,...i}){const a=!!e,s=(0,o.jsx)(vc.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:r}),l=!!t,u=l?t:n;return(0,o.jsx)(Lc,{...i,children:a?(0,o.jsx)(Pc,{onClick:e,direction:u,active:l,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${kc.icon}`]:{opacity:l?1:.5}}},children:s}):s})}var Fc=n(59019);const jc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(Fc.Z,{...e,tabIndex:-1,ref:t})})),Nc={row:0,column:0},zc=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];function Bc({maxRows:e,maxColumns:t,onActiveCellChange:n}){const[r,o]=(0,d.useState)(Nc),[i,a]=(0,d.useState)(!1),s=(0,d.useCallback)((r=>{const i=r.key;(function(e){return zc.includes(e)}(i)||"Home"===i||"End"===i||"PageDown"===i||"PageUp"===i)&&o((o=>{let a=o.row,s=o.column;"ArrowRight"===i&&s0?(r.preventDefault(),s-=1):"ArrowDown"===i&&a0?(r.preventDefault(),a-=1):"Home"===i?(r.preventDefault(),a=0,s=0):"End"===i&&(r.preventDefault(),a=e-1,s=t-1);const l={column:s,row:a},u=n?.(r,o,l)||l;return u.row===o.row&&u.column===o.column?o:u}))}),[t,e,n]);return{activeCell:r,isActive:i,onTableKeyDown:s,onCellFocus:e=>{e.column===r.column&&e.row===r.row&&i||(a(!0),o(e))}}}var Vc=n(32641);function $c(e){return(0,Sc.ZP)("MuiTableFooter",e)}(0,wc.Z)("MuiTableFooter",["root"]);const Hc=(0,Y.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),Wc={variant:"footer"},Gc="tfoot",Uc=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiTableFooter"}),{className:r,component:i=Gc,...a}=n,s={...n,component:i},l=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},$c,t)})(s);return(0,o.jsx)(Vc.Z.Provider,{value:Wc,children:(0,o.jsx)(Hc,{as:i,className:(0,Gl.Z)(l.root,r),ref:t,role:i===Gc?null:"rowgroup",ownerState:s,...a})})})),qc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(Uc,{...e,ref:t})}));function Kc({width:e,height:t,density:n,defaultColumnWidth:r,defaultColumnHeight:i,onRowClick:a,onRowMouseOver:s,onRowMouseOut:l,rows:u,columns:c,headers:h,cellConfigs:p,pagination:f,onPaginationChange:m,rowCount:g}){const v=(0,d.useRef)(null),y=(0,d.useRef)({startIndex:0,endIndex:0}),b=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:r}){return Bc({maxRows:n,maxColumns:r,onActiveCellChange:(r,o,i)=>{const a=r.key,s=i&&(o.column!==i.column||o.row!==i.row),l=i?.row??o.row;if("ArrowDown"===a&&s)(l-1e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"end"});else if("ArrowUp"===a&&s)(l-1e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"start"});else if(!s||"Home"!==a&&"End"!==a){if("PageDown"===a){r.preventDefault();let i=o.row;return i=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:i-1,align:"start"}),{row:i,column:o.column}}if("PageUp"===a){let n=o.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:o.column}}}else t.current?.scrollToIndex({index:Math.max(l-1,0),align:"start"});return i}})}({visibleRange:y,virtualTable:v,maxRows:u.length+1,maxColumns:c.length}),x=e=>e.row===b.activeCell.row&&e.column===b.activeCell.column?b.isActive?"trigger-focus":"focus-next":"none",w=(0,d.useMemo)((()=>({Scroller:jc,Table:t=>(0,o.jsx)(fc,{...t,width:e,density:n,onKeyDown:b.onTableKeyDown}),TableHead:gc,TableFoot:qc,TableRow:({item:e,...t})=>{const r=t["data-index"],i=u[r];if(!i)return null;const c={id:i.id,index:i.index};return(0,o.jsx)(lc,{...t,onClick:e=>a(e,i.id),density:n,onMouseOver:e=>{s?.(e,c)},onMouseOut:e=>{l?.(e,c)}})},TableBody:cc})),[n,b.onTableKeyDown,a,l,s,u,e]),S=(e,t)=>{f&&m&&m({...f,pageIndex:t})},C=e=>{f&&m&&m({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,o.jsx)($o.Z,{style:{width:e,height:t},children:(0,o.jsx)(vl,{ref:v,totalCount:u.length,components:w,rangeChanged:e=>{y.current=e},fixedHeaderContent:()=>(0,o.jsx)(o.Fragment,{children:h.map((e=>(0,o.jsx)(lc,{density:n,children:e.headers.map(((e,t,a)=>{const s=e.column,l={row:0,column:t},u=s.getIsSorted(),c=s.getNextSortingOrder();return(0,o.jsx)(Zc,{onSort:s.getCanSort()?s.getToggleSortingHandler():void 0,sortDirection:"string"==typeof u?u:void 0,nextSortDirection:"string"==typeof c?c:void 0,width:s.getSize()||r,defaultColumnHeight:i,align:s.columnDef.meta?.align,variant:"head",density:n,description:s.columnDef.meta?.headerDescription,focusState:x(l),onFocusTrigger:()=>b.onCellFocus(l),isFirstColumn:0===t,isLastColumn:t===a.length-1,children:ic(s.columnDef.header,e.getContext())},e.id)}))},e.id)))}),fixedFooterContent:f?()=>(0,o.jsx)(ac.Z,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,o.jsx)(sc.Z,{colSpan:c.length,count:g,page:f.pageIndex,rowsPerPage:f.pageSize,onPageChange:S,onRowsPerPageChange:C})}):void 0,itemContent:e=>{const t=u[e];return t?(0,o.jsx)(o.Fragment,{children:t.getVisibleCells().map(((t,a,s)=>{const l={row:e+1,column:a},u=t.getContext(),c=p?.[u.cell.id],d=t.column.columnDef.cell,h="function"==typeof d?d(u):null,f=t.column.columnDef.meta?.cellDescription;let m;return"function"==typeof f?m=f(u):f&&"string"==typeof h&&(m=h),(0,o.jsx)(Lc,{"data-testid":t.id,title:m||c?.text||h,width:t.column.getSize()||r,defaultColumnHeight:i,align:t.column.columnDef.meta?.align,density:n,focusState:x(l),onFocusTrigger:()=>b.onCellFocus(l),isFirstColumn:0===a,isLastColumn:a===s.length-1,description:m,color:c?.textColor??void 0,backgroundColor:c?.backgroundColor??void 0,children:c?.text||h},t.id)}))}):null}})})}var Yc=n(82707);function Xc({color:e,density:t,...n}){const r="compact"===t;return(0,o.jsx)(Yc.Z,{size:r?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(r?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,ql.Fq)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:r?16:18}}})}const Qc=(e,t)=>`${t}`,Jc={},ed=[];function td({data:e,columns:t,cellConfigs:n,density:r="standard",defaultColumnWidth:i=Ic,defaultColumnHeight:a="auto",checkboxSelection:s,onRowSelectionChange:l,onSortingChange:u,getCheckboxColor:c,getRowId:h=Qc,rowSelection:p=Jc,sorting:f=ed,pagination:m,onPaginationChange:g,rowSelectionVariant:v="standard",...y}){const b=(0,Vo.Z)(),x=(0,d.useCallback)(((e,t,n)=>{"standard"===v||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():l?.({[t.id]:!0})}),[l,v]),w=(0,d.useCallback)(((e,t,n)=>{const r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;x(t,n,!!r?.metaKey||!!r?.shiftKey)}),[x]),S=(0,d.useMemo)((()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,o.jsx)(Xc,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:b.palette.text.primary,density:r}),cell:({row:e,table:t})=>(0,o.jsx)(Xc,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{w(n,t,e)},color:c?.(e.original),density:r}),enableSorting:!1})),[b.palette.text.primary,r,c,w]),C=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=d.useState((()=>({current:rc(t)}))),[r,o]=d.useState((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:e,columns:(0,d.useMemo)((()=>{const e=Ac(t);return s&&e.unshift(S),e}),[S,s,t]),getRowId:h,getCoreRowModel:e=>gu((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;le._autoResetPageIndex()))),getSortedRowModel:e=>gu((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),vu(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:m?e=>gu((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:i,flatRows:a,rowsById:s}=n;const l=r*o,u=l+r;let c;i=i.slice(l,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:s}:oc({rows:i,flatRows:a,rowsById:s}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),vu(e.options,"debugTable")):void 0,manualPagination:!m,enableRowSelection:!!s,onRowSelectionChange:e=>{const t="function"==typeof e?e(p):e;l?.(t)},onSortingChange:e=>{const t="function"==typeof e?e(f):e;u?.(t)},sortDescFirst:!0,state:{rowSelection:p,sorting:f,...m?{pagination:m}:{}}}),k=(0,d.useCallback)(((e,t)=>{const n=C.getRow(t),r=e.metaKey||e.shiftKey;x(C,n,r)}),[x,C]);return(0,o.jsx)(Kc,{...y,density:r,defaultColumnWidth:i,defaultColumnHeight:a,onRowClick:k,rows:C.getRowModel().rows,columns:C.getAllFlatColumns(),headers:C.getHeaderGroups(),cellConfigs:n,pagination:m,onPaginationChange:g,rowCount:C.getRowCount()})}const nd=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:({getValue:e})=>(0,o.jsx)("span",{title:e(),children:e()})}],rd=e=>e.id,od=e=>e.color;function id({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:r,onItemMouseOut:i,height:a,width:s,columns:l=[],sorting:u,onSortingChange:c}){const h=(0,d.useMemo)((()=>"string"!=typeof t?t:e.reduce(((e,t,n)=>(e[rd(t,n)]=!0,e)),{})),[t,e]),p=(0,d.useMemo)((()=>[...nd,...l]),[l]);return(0,o.jsx)(td,{height:a,width:s,rowSelection:h,onRowSelectionChange:n,onRowMouseOver:r,onRowMouseOut:i,sorting:u,onSortingChange:c,data:e,columns:p,density:"compact",defaultColumnWidth:"auto",getRowId:rd,getCheckboxColor:od,checkboxSelection:!0,rowSelectionVariant:"legend"})}const ad=500;function sd({width:e,height:t,options:n,data:r,selectedItems:i,onSelectedItemsChange:a,onItemMouseOver:s,onItemMouseOut:l,tableProps:u}){const c=(e,t)=>{const n=e.metaKey||e.shiftKey,r=(0,Ko.Uy)(i,(e=>{if("ALL"===e)return{[t]:!0};const r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}));a(r)},d=Uo(n.mode),h=r.length>=ad,p={height:t,items:r,selectedItems:i,onLegendItemClick:c,onItemMouseOver:s,onItemMouseOut:l};let f;return f="table"===d?(0,o.jsx)(id,{...p,onSelectedItemsChange:a,width:e,...u}):"right"===n.position||h?(0,o.jsx)(cu,{...p,width:e,onLegendItemClick:c}):(0,o.jsx)(du,{...p,onLegendItemClick:c}),"right"===n.position?(0,o.jsx)($o.Z,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0,backgroundColor:e=>`${e.palette.background.default}`},children:f}):(0,o.jsx)($o.Z,{style:{width:e,height:t},sx:{position:"absolute",bottom:0,backgroundColor:e=>`${e.palette.background.default}`},children:f})}const ld={medium:{bottom:6,right:250},small:{bottom:4,right:150}},ud=300,cd=40,dd=100;function hd({children:e,legendProps:t,width:n,height:r,spacing:i=0,legendSize:a,minChildrenWidth:s=100,minChildrenHeight:l=100}){const u=(0,Vo.Z)(),{content:c,legend:d,margin:h}=function({width:e,height:t,legendProps:n,legendSize:r,minChildrenHeight:o,minChildrenWidth:i,spacing:a,theme:s}){const l=n?.options,u={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!l)return u;const{position:c}=l;let d,h;if("list"===Uo(l.mode))d="right"===c?200:e,h=cd,"right"===c?h=t:t>=ud&&(h=dd);else{const o=Oc(s,"compact"),i=(n?.tableProps?.columns||[]).reduce(((e,t)=>("number"==typeof t.width&&(e+=t.width),e)),0);d="right"===c?ld[r].right+i:e;const a=Math.min(ld[r].bottom,n.data.length+1);h="bottom"===c?a*o.height:t}const p="right"===c?e-d-a:e,f="bottom"===c?t-h-a:t;return"right"===c&&p{n?.(e)}),[n]),u=(0,d.useMemo)((()=>fd()(l,e)),[e,l]);return(0,o.jsx)(c.Z,{ref:i,value:a,onChange:function(e){s(e.target.value),u(e.target.value)},...r})}));md.displayName="TextField";var gd=n(51602),vd=n(19978),yd=n(5056),bd=n(80058),xd=n(69761),wd=n(28866);function Sd(e){return(0,Sc.ZP)("MuiDialog",e)}const Cd=(0,wc.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var kd=n(56484),_d=n(19090);const Md=(0,Y.ZP)(_d.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Td=(0,Y.ZP)(bd.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Pd=(0,Y.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,xc.Z)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Rd=(0,Y.ZP)(wd.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,xc.Z)(n.scroll)}`],t[`paperWidth${(0,xc.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,Kl.Z)((({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Cd.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter((e=>"xs"!==e)).map((t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Cd.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Cd.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),Id=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiDialog"}),r=(0,Vo.Z)(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:h,className:p,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:v="sm",onBackdropClick:y,onClick:b,onClose:x,open:w,PaperComponent:S=wd.Z,PaperProps:C={},scroll:k="paper",slots:_={},slotProps:M={},TransitionComponent:T=xd.Z,transitionDuration:P=i,TransitionProps:R,...I}=n,D={...n,disableEscapeKeyDown:f,fullScreen:m,fullWidth:g,maxWidth:v,scroll:k},O=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${(0,xc.Z)(n)}`],paper:["paper",`paperScroll${(0,xc.Z)(n)}`,`paperWidth${(0,xc.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,Ul.Z)(a,Sd,t)})(D),A=d.useRef(),E=(0,yd.Z)(s),L=d.useMemo((()=>({titleId:E})),[E]),Z={slots:{transition:T,..._},slotProps:{transition:R,paper:C,backdrop:c,...M}},[F,j]=(0,_c.Z)("root",{elementType:Td,shouldForwardComponentProp:!0,externalForwardedProps:Z,ownerState:D,className:(0,Gl.Z)(O.root,p),ref:t}),[N,z]=(0,_c.Z)("backdrop",{elementType:Md,shouldForwardComponentProp:!0,externalForwardedProps:Z,ownerState:D}),[B,V]=(0,_c.Z)("paper",{elementType:Rd,shouldForwardComponentProp:!0,externalForwardedProps:Z,ownerState:D,className:(0,Gl.Z)(O.paper,C.className)}),[$,H]=(0,_c.Z)("container",{elementType:Pd,externalForwardedProps:Z,ownerState:D,className:(0,Gl.Z)(O.container)}),[W,G]=(0,_c.Z)("transition",{elementType:xd.Z,externalForwardedProps:Z,ownerState:D,additionalProps:{appear:!0,in:w,timeout:P,role:"presentation"}});return(0,o.jsx)(F,{closeAfterTransition:!0,slots:{backdrop:N},slotProps:{backdrop:{transitionDuration:P,as:u,...z}},disableEscapeKeyDown:f,onClose:x,open:w,onClick:e=>{b&&b(e),A.current&&(A.current=null,y&&y(e),x&&x(e,"backdropClick"))},...j,...I,children:(0,o.jsx)(W,{...G,children:(0,o.jsx)($,{onMouseDown:e=>{A.current=e.target===e.currentTarget},...H,children:(0,o.jsx)(B,{as:S,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":E,"aria-modal":l,...V,children:(0,o.jsx)(kd.Z.Provider,{value:L,children:h})})})})})}));function Dd(e){return(0,Sc.ZP)("MuiDialogActions",e)}(0,wc.Z)("MuiDialogActions",["root","spacing"]);const Od=(0,Y.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ad=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1,...a}=n,s={...n,disableSpacing:i},l=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,Ul.Z)(r,Dd,t)})(s);return(0,o.jsx)(Od,{className:(0,Gl.Z)(l.root,r),ownerState:s,ref:t,...a})}));var Ed=n(10763);const Ld=(0,Y.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),Zd=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),Fd=({children:e,...t})=>(0,o.jsx)(Id,{...t,children:e});Fd.Header=({children:e,onClose:t,...n})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(gd.Z,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,o.jsx)(u.Z,{"aria-label":"Close",onClick:t,sx:Zd,children:(0,o.jsx)(Ed.default,{})})]}),Fd.Form=Ld,Fd.Content=({children:e,sx:t,...n})=>(0,o.jsx)(vd.Z,{dividers:!0,...n,sx:Jn({minWidth:"500px",textWrap:"balance"},t),children:e}),Fd.PrimaryButton=({children:e,...t})=>(0,o.jsx)(a.Z,{variant:"contained",type:"submit",...t,children:e}),Fd.SecondaryButton=({children:e,...t})=>(0,o.jsx)(a.Z,{variant:"outlined",color:"secondary",...t,children:e}),Fd.Actions=Ad;const jd=e=>{const{description:t,isOpen:n,onCancel:r,onDiscardChanges:i}=e;return(0,o.jsxs)(Fd,{open:n,"aria-labelledby":"discard-dialog",children:[(0,o.jsx)(Fd.Header,{children:"Discard Changes"}),(0,o.jsx)(Fd.Content,{children:t}),(0,o.jsxs)(Fd.Actions,{children:[(0,o.jsx)(a.Z,{variant:"contained",onClick:i,children:"Discard Changes"}),(0,o.jsx)(a.Z,{variant:"outlined",color:"secondary",onClick:r,children:"Cancel"})]})]})};var Nd=n(38359);const zd=({children:e})=>(0,o.jsx)(Nd.ZP,{item:!0,xs:4,children:(0,o.jsx)(l.Z,{spacing:3,children:e})});var Bd=n(90192),Vd=n(23626),$d=n(39398),Hd=n(32964),Wd=n(87143);const Gd=({id:e,title:t,description:n,placement:r,children:i,enterDelay:a,enterNextDelay:s})=>{const l=(0,o.jsx)("span",{children:i});return(0,o.jsx)(qd,{arrow:!0,id:e,placement:r??"top",title:(0,o.jsx)(Ud,{title:t,description:n}),enterDelay:a??500,enterNextDelay:s??500,children:l})},Ud=({title:e,description:t})=>(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(vc.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,o.jsx)(vc.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),qd=(0,Y.ZP)((({className:e,...t})=>(0,o.jsx)(Hd.Z,{...t,classes:{popper:e}})))((({theme:e})=>({[`& .${Wd.Z.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${Wd.Z.arrow}`]:{color:e.palette.background.tooltip}}))),Kd=({label:e,control:t,description:n})=>{const r=`${er("EditorSectionControl")}-control`,i={id:r};return(0,o.jsx)(Bd.Z,{children:(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,o.jsx)(Vd.Z,{htmlFor:r,children:e}),n&&(0,o.jsx)(Gd,{description:n,enterDelay:100,children:(0,o.jsx)(u.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,o.jsx)($d.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,o.jsxs)($o.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",d.cloneElement(t,i)]})]})})},Yd=({children:e})=>(0,o.jsx)(Nd.ZP,{container:!0,spacing:8,children:e}),Xd=({title:e,children:t,icon:n})=>(0,o.jsxs)($o.Z,{children:[(0,o.jsxs)($o.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,o.jsx)(vc.Z,{variant:"overline",component:"h4",children:e}),n&&(0,o.jsx)($o.Z,{sx:{marginLeft:"auto"},children:n})]}),(0,o.jsx)(l.Z,{spacing:1,children:t})]});var Qd=n(11774),Jd=n(70678);function eh({options:e,renderInput:t=e=>(0,o.jsx)(c.Z,{...e}),...n}){const r=e=>e.label??e.id;return(0,o.jsx)(Qd.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:r,options:e,renderInput:t,renderOption:({key:e,...t},n)=>(0,o.jsx)("li",{...t,children:(0,o.jsxs)("div",{children:[(0,o.jsx)(vc.Z,{variant:"body1",component:"div",children:r(n)}),n.description&&(0,o.jsx)(vc.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,Jd.D)({stringify:e=>`${r(e)} ${e.description||""}`}),...n})}const th=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function nh({onChange:e,value:t="standard"}){return(0,o.jsx)(Kd,{label:"Density",control:(0,o.jsx)(eh,{value:th.find((e=>e.id===t)),options:th,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function rh(){return(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)($o.Z,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:e=>e.palette.background.default,border:e=>`2px solid ${e.palette.info.main}`,borderRadius:"50%"}}),(0,o.jsx)($o.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function oh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0||(t.unmount(),Lh.delete(e.typeKey))}}function Fh(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Vh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=i.length)return s;for(var l=$h(i),u=$h(s),c=[],d=0;d=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}({client:t,clientRect:r}))n.remove();else var i=(0,uh.bindAll)(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0});function a(){i(),n.remove()}}}({initial:i})}if("onDrop"===n){var a,s=r.location.current.input;null===(a=e)||void 0===a||a({current:{x:s.clientX,y:s.clientY}}),e=null,Qh=null}}}}),ep=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,o=e.onPostDispatch,i=e.defaultDropEffect,a=qh(),s=Hh({typeKey:t,defaultDropEffect:i});function l(e){null==r||r(e),s.dispatchEvent(e),a.dispatchEvent(e),null==o||o(e)}function u(e){var t=e.event,n=e.dragType;Eh.start({event:t,dragType:n,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){return Zh({typeKey:t,mount:function(){var e={canStart:Eh.canStart,start:u};return n(e)}})},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return Fh(Jh.bindEvents(),(0,uh.bind)(document,{type:"dragstart",listener:function(t){var n,r,o,i,a,s;if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var l=t.target;if(l instanceof HTMLElement){var u=Xh.get(l);if(u){var c=_h(t),d={element:u.element,dragHandle:null!==(n=u.dragHandle)&&void 0!==n?n:null,input:c};if(!u.canDrag||u.canDrag(d)){if(u.dragHandle){var h=hh({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(h))return void t.preventDefault()}var p=null!==(r=null===(o=u.getInitialDataForExternal)||void 0===o?void 0:o.call(u,d))&&void 0!==r?r:null;if(p)for(var f=0,m=Object.entries(p);fnp({onDrop({location:o,source:i}){const a=o.current.dropTargets[0];if(!a)return;const s=i.data,l=a.data,u=e.findIndex((e=>e[t]===s[t])),c=e.findIndex((e=>e[t]===l[t]));if(c<0||u<0)return;const d=lp(l);r(lh({list:e,startIndex:u,indexOfTarget:c,closestEdgeOfTarget:d,axis:n}))}})),[t,n,e,r])}function dp({children:e,data:t}){const n=(0,d.useRef)(null),[r,i]=(0,d.useState)(up);return(0,d.useEffect)((()=>{const e=n.current;if(e)return Fh(rp({element:e,getInitialData:()=>t,onDragStart(){i({type:"is-dragging"})},onDrop(){i(up)}}),tp({element:e,canDrop:({source:t})=>t.element!==e,getData:({input:n})=>function(e,t){var n,r,o=t.element,i=t.input,a=t.allowedEdges,s={x:i.clientX,y:i.clientY},l=o.getBoundingClientRect(),u=null!==(n=null===(r=a.map((function(e){return{edge:e,value:ap[e](l,s)}})).sort((function(e,t){return e.value-t.value}))[0])||void 0===r?void 0:r.edge)&&void 0!==n?n:null;return ip(ip({},e),{},fh({},sp,u))}(t,{element:e,input:n,allowedEdges:["top","bottom"]}),getIsSticky:()=>!0,onDragEnter({self:e}){const t=lp(e.data);i({type:"is-dragging-over",closestEdge:t})},onDrag({self:e}){const t=lp(e.data);i((e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t}))},onDragLeave(){i(up)},onDrop(){i(up)}}))}),[t]),(0,o.jsxs)(l.Z,{ref:n,spacing:1,style:{opacity:"is-dragging"===r.type?.5:"unset"},children:["is-dragging-over"===r.type&&"top"===r.closestEdge?(0,o.jsx)(rh,{}):null,e,"is-dragging-over"===r.type&&"bottom"===r.closestEdge?(0,o.jsx)(rh,{}):null]})}var hp=n(5549),pp=n(30743),fp=n(11682);function mp(e,t){const n=t.indexOf(e);if(0===n)return t;const r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function gp(e,t){const n=t.indexOf(e);if(n===t.length-1)return t;const r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}const vp=(0,d.forwardRef)((function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:r,menuSx:i,...a},s){const[l,c]=(0,d.useState)(null),h=Boolean(l);function p(e){c(null),e?.()}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.Z,{...a,ref:s,"aria-label":"move","aria-haspopup":!0,"aria-expanded":h,size:"small",onClick:function(e){c(e.currentTarget)},children:(0,o.jsx)(fp.default,{})}),(e||t||n||r)&&(0,o.jsxs)(hp.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:l,open:h,onClose:()=>p(void 0),sx:i,children:[e&&(0,o.jsx)(pp.Z,{onClick:()=>p(e),children:"Move Up"}),t&&(0,o.jsx)(pp.Z,{onClick:()=>p(t),children:"Move Down"}),n&&(0,o.jsx)(pp.Z,{onClick:()=>p(n),children:"Move Left"}),r&&(0,o.jsx)(pp.Z,{onClick:()=>p(r),children:"Move Right"}),r&&(0,o.jsx)(pp.Z,{onClick:()=>p(r),children:"Move Right"})]})]})}));var yp=n(76439),bp=n(6595),xp=n(41825),wp=n(94680),Sp=n(77999),Cp=n(42777),kp=n(24255);function _p(e,t,n){var r;const o=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=(0,kp.Z)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"==typeof(r=n)?r():r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const Mp=d.forwardRef((function(e,t){const n=(0,Vo.Z)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:u,direction:c="down",easing:h=r,in:p,onEnter:f,onEntered:m,onEntering:g,onExit:v,onExited:y,onExiting:b,style:x,timeout:w=i,TransitionComponent:S=xp.ZP,...C}=e,k=d.useRef(null),_=(0,eu.Z)((0,wp.Z)(l),k,t),M=e=>t=>{e&&(void 0===t?e(k.current):e(k.current,t))},T=M(((e,t)=>{_p(c,e,u),(0,Cp.n)(e),f&&f(e,t)})),P=M(((e,t)=>{const r=(0,Cp.C)({timeout:w,style:x,easing:h},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)})),R=M(m),I=M(b),D=M((e=>{const t=(0,Cp.C)({timeout:w,style:x,easing:h},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),_p(c,e,u),v&&v(e)})),O=M((e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)})),A=d.useCallback((()=>{k.current&&_p(c,k.current,u)}),[c,u]);return d.useEffect((()=>{if(p||"down"===c||"right"===c)return;const e=(0,Sp.Z)((()=>{k.current&&_p(c,k.current,u)})),t=(0,kp.Z)(k.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[c,p,u]),d.useEffect((()=>{p||A()}),[p,A]),(0,o.jsx)(S,{nodeRef:k,onEnter:T,onEntered:R,onEntering:P,onExit:D,onExited:O,onExiting:I,addEndListener:e=>{a&&a(k.current,e)},appear:s,in:p,timeout:w,...C,children:(e,{ownerState:t,...n})=>d.cloneElement(l,{ref:_,style:{visibility:"exited"!==e||p?void 0:"hidden",...x,...l.props.style},...n})})}));function Tp(e){return(0,Sc.ZP)("MuiDrawer",e)}(0,wc.Z)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var Pp=n(27834);const Rp=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Ip=(0,Y.ZP)(bd.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:Rp})((0,Kl.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})))),Dp=(0,Y.ZP)("div",{shouldForwardProp:Xl.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Rp})({flex:"0 0 auto"}),Op=(0,Y.ZP)(wd.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,xc.Z)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,xc.Z)(n.anchor)}`]]}})((0,Kl.Z)((({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]})))),Ap={left:"right",right:"left",top:"down",bottom:"up"};const Ep=d.forwardRef((function(e,t){const n=(0,Yl.i)({props:e,name:"MuiDrawer"}),r=(0,Vo.Z)(),i=(0,bp.V)(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:u,className:c,elevation:h=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:f,...m}={},onClose:g,open:v=!1,PaperProps:y={},SlideProps:b,TransitionComponent:x,transitionDuration:w=a,variant:S="temporary",slots:C={},slotProps:k={},..._}=n,M=d.useRef(!1);d.useEffect((()=>{M.current=!0}),[]);const T=function({direction:e},t){return"rtl"===e&&function(e){return["left","right"].includes(e)}(t)?Ap[t]:t}({direction:i?"rtl":"ltr"},s),P=s,R={...n,anchor:P,elevation:h,open:v,variant:S,..._},I=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${(0,xc.Z)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,xc.Z)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,xc.Z)(n)}`]};return(0,Ul.Z)(o,Tp,t)})(R),D={slots:{transition:x,...C},slotProps:{paper:y,transition:b,...k,backdrop:(0,Pp.Z)(k.backdrop||{...l,...f},{transitionDuration:w})}},[O,A]=(0,_c.Z)("root",{ref:t,elementType:Ip,className:(0,Gl.Z)(I.root,I.modal,c),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...D,..._,...m},additionalProps:{open:v,onClose:g,hideBackdrop:p,slots:{backdrop:D.slots.backdrop},slotProps:{backdrop:D.slotProps.backdrop}}}),[E,L]=(0,_c.Z)("paper",{elementType:Op,shouldForwardComponentProp:!0,className:(0,Gl.Z)(I.paper,y.className),ownerState:R,externalForwardedProps:D,additionalProps:{elevation:"temporary"===S?h:0,square:!0}}),[Z,F]=(0,_c.Z)("docked",{elementType:Dp,ref:t,className:(0,Gl.Z)(I.root,I.docked,c),ownerState:R,externalForwardedProps:D,additionalProps:_}),[j,N]=(0,_c.Z)("transition",{elementType:Mp,ownerState:R,externalForwardedProps:D,additionalProps:{in:v,direction:Ap[T],timeout:w,appear:M.current}}),z=(0,o.jsx)(E,{...L,children:u});if("permanent"===S)return(0,o.jsx)(Z,{...F,children:z});const B=(0,o.jsx)(j,{...N,children:z});return"persistent"===S?(0,o.jsx)(Z,{...F,children:B}):(0,o.jsx)(O,{...A,children:B})})),Lp=({anchor:e="right",isOpen:t,onClose:n,PaperProps:r,children:i,...a})=>{const s=(0,yp.Z)("(max-width:1080px)");return(0,o.jsx)(Ep,{...a,open:t,onClose:n,anchor:e,PaperProps:{...r,sx:Jn({width:s?"100%":"1080px",overflow:"hidden"},r?.sx)},"aria-hidden":!t,children:i})};var Zp=function(e,t){return Zp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zp(e,t)};function Fp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Zp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var jp=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Np=new function(){this.browser=new jp,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Np.wxa=!0,Np.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Np.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(Np.node=!0,Np.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Np);const zp=Np;var Bp="12px sans-serif";var Vp,$p,Hp=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n=0)i=o*e.length;else for(var a=0;a>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&i&&h===i[d]&&p===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?xm(s,a):xm(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function km(e){return"CANVAS"===e.nodeName.toUpperCase()}var _m=/([&<>"'])/g,Mm={"&":"&","<":"<",">":">",'"':""","'":"'"};function Tm(e){return null==e?"":(e+"").replace(_m,(function(e,t){return Mm[t]}))}var Pm=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Rm=[],Im=zp.browser.firefox&&+zp.browser.version.split(".")[0]<39;function Dm(e,t,n,r){return n=n||{},r?Om(e,t,n):Im&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Om(e,t,n),n}function Om(e,t,n){if(zp.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(km(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(Cm(Rm,e,r,o))return n.zrX=Rm[0],void(n.zrY=Rm[1])}n.zrX=n.zrY=0}function Am(e){return e||window.event}function Em(e,t,n){if(null!=(t=Am(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&Dm(e,o,t,n)}else{Dm(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Pm.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Lm(e,t,n,r){e.addEventListener(t,n,r)}var Zm=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Fm(e){return 2===e.which||3===e.which}var jm=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i1&&o&&o.length>1){var a=Nm(o)/Nm(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Bm(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Vm(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function $m(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function Hm(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Wm(e,t,n,r){void 0===r&&(r=[0,0]);var o=t[0],i=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=o*d+s*c,e[1]=-o*c+s*d,e[2]=i*d+l*c,e[3]=-i*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function Gm(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}const Um=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}();var qm=Math.min,Km=Math.max,Ym=new Um,Xm=new Um,Qm=new Um,Jm=new Um,eg=new Um,tg=new Um,ng=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=qm(e.x,this.x),n=qm(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Km(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Km(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return Hm(o,o,[-t.x,-t.y]),function(e,t,n){var r=n[0],o=n[1];e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o}(o,o,[n,r]),Hm(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(if&&(f=b,mf&&(f=x,v=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Ym.x=Qm.x=n.x,Ym.y=Jm.y=n.y,Xm.x=Jm.x=n.x+n.width,Xm.y=Qm.y=n.y+n.height,Ym.transform(r),Jm.transform(r),Xm.transform(r),Qm.transform(r),t.x=qm(Ym.x,Xm.x,Qm.x,Jm.x),t.y=qm(Ym.y,Xm.y,Qm.y,Jm.y);var l=Km(Ym.x,Xm.x,Qm.x,Jm.x),u=Km(Ym.y,Xm.y,Qm.y,Jm.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}();const rg=ng;var og="silent";function ig(){Zm(this.event)}var ag=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Qf(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(vm),sg=function(e,t){this.x=e,this.y=t},lg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ug=new rg(0,0,0,0),cg=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new sg(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new ag,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new mm(a),a}return Qf(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(ff(lg,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=pg(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new sg(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new sg(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ig}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new sg(e,t);if(hg(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new rg(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(ug.copy(c.getBoundingRect()),c.transform&&ug.applyTransform(c.transform),ug.intersect(l)&&i.push(c))}if(i.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=dg(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==og)){t.target=a;break}}}function pg(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}ff(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){cg.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=pg(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||lm(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));const fg=cg;function mg(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o=0;)o++;return o-t}function gg(e,t,n,r,o){for(r===t&&r++;r>>1])<0?l=i:s=i+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function vg(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function yg(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function bg(e,t){var n,r,o=7,i=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var h=yg(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=vg(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l=7||p>=7);if(f)break;m<0&&(m=0),m+=2}if((o=m)<1&&(o=1),1===r){for(l=0;l=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=o;for(;;){var m=0,g=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,g=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],g++,m=0,1==--s){v=!0;break}}while((m|g)=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!==(g=s-vg(e[u],a,0,s,s-1,t))){for(s-=g,p=(d-=g)+1,h=(c-=g)+1,l=0;l=7||g>=7);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]=32;)t|=1&e,e>>=1;return e+t}(o);do{if((i=mg(e,n,r,t))s&&(l=s),gg(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var wg=!1;function Sg(){wg||(wg=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Cg(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}const kg=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Cg}return e.prototype.traverse=function(e,t){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Sg(),u.z=0),isNaN(u.z2)&&(Sg(),u.z2=0),isNaN(u.zlevel)&&(Sg(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const _g=zp.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Mg={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Mg.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*Mg.bounceIn(2*e):.5*Mg.bounceOut(2*e-1)+.5}};const Tg=Mg;var Pg=Math.pow,Rg=Math.sqrt,Ig=1e-8,Dg=1e-4,Og=Rg(3),Ag=1/3,Eg=Jf(),Lg=Jf(),Zg=Jf();function Fg(e){return e>-1e-8&&eIg||e<-1e-8}function Ng(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function zg(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function Bg(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(Fg(c)&&Fg(d)){if(Fg(s))i[0]=0;else(k=-l/s)>=0&&k<=1&&(i[p++]=k)}else{var f=d*d-4*c*h;if(Fg(f)){var m=d/c,g=-m/2;(k=-s/a+m)>=0&&k<=1&&(i[p++]=k),g>=0&&g<=1&&(i[p++]=g)}else if(f>0){var v=Rg(f),y=c*s+1.5*a*(-d+v),b=c*s+1.5*a*(-d-v);(k=(-s-((y=y<0?-Pg(-y,Ag):Pg(y,Ag))+(b=b<0?-Pg(-b,Ag):Pg(b,Ag))))/(3*a))>=0&&k<=1&&(i[p++]=k)}else{var x=(2*c*s-3*a*d)/(2*Rg(c*c*c)),w=Math.acos(x)/3,S=Rg(c),C=Math.cos(w),k=(-s-2*S*C)/(3*a),_=(g=(-s+S*(C+Og*Math.sin(w)))/(3*a),(-s+S*(C-Og*Math.sin(w)))/(3*a));k>=0&&k<=1&&(i[p++]=k),g>=0&&g<=1&&(i[p++]=g),_>=0&&_<=1&&(i[p++]=_)}}return p}function Vg(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Fg(a)){if(jg(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(Fg(u))o[0]=-i/(2*a);else if(u>0){var c,d=Rg(u),h=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}function $g(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function Hg(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,m=Ng(e,n,o,a,f),g=Ng(t,r,i,s,f),v=m-u,y=g-c;d+=Math.sqrt(v*v+y*y),u=m,c=g}return d}function Wg(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function Gg(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Ug(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function qg(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function Kg(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=Wg(e,n,o,h),f=Wg(t,r,i,h),m=p-s,g=f-l;u+=Math.sqrt(m*m+g*g),s=p,l=f}return u}var Yg=/cubic-bezier\(([0-9,\.e ]+)\)/;function Xg(e){var t=e&&Yg.exec(e);if(t){var n=t[1].split(","),r=+jf(n[0]),o=+jf(n[1]),i=+jf(n[2]),a=+jf(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Bg(0,r,i,1,e,s)&&Ng(0,o,a,1,s[0])}}}const Qg=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Kf,this.ondestroy=e.ondestroy||Kf,this.onrestart=e.onrestart||Kf,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Sf(e)?e:Tg[e]||Xg(e)},e}();var Jg=function(e){this.value=e},ev=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Jg(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}();const tv=function(){function e(e){this._list=new ev,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Jg(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();var nv={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function rv(e){return(e=Math.round(e))<0?0:e>255?255:e}function ov(e){return e<0?0:e>1?1:e}function iv(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?rv(parseFloat(t)/100*255):rv(parseInt(t,10))}function av(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?ov(parseFloat(t)/100):ov(parseFloat(t))}function sv(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function lv(e,t,n){return e+(t-e)*n}function uv(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function cv(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var dv=new tv(20),hv=null;function pv(e,t){hv&&cv(hv,t),hv=dv.put(e,hv||t.slice())}function fv(e,t){if(e){t=t||[];var n=dv.get(e);if(n)return cv(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in nv)return cv(t,nv[r]),pv(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(uv(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),pv(e,t),t):void uv(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(uv(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),pv(e,t),t):void uv(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?uv(t,+u[0],+u[1],+u[2],1):uv(t,0,0,0,1);c=av(u.pop());case"rgb":return u.length>=3?(uv(t,iv(u[0]),iv(u[1]),iv(u[2]),3===u.length?c:av(u[3])),pv(e,t),t):void uv(t,0,0,0,1);case"hsla":return 4!==u.length?void uv(t,0,0,0,1):(u[3]=av(u[3]),mv(u,t),pv(e,t),t);case"hsl":return 3!==u.length?void uv(t,0,0,0,1):(mv(u,t),pv(e,t),t);default:return}}uv(t,0,0,0,1)}}function mv(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=av(e[1]),o=av(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return uv(t=t||[],rv(255*sv(a,i,n+1/3)),rv(255*sv(a,i,n)),rv(255*sv(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function gv(e,t){var n=fv(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return wv(n,4===n.length?"rgba":"rgb")}}function vv(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=rv(lv(a[0],s[0],l)),n[1]=rv(lv(a[1],s[1],l)),n[2]=rv(lv(a[2],s[2],l)),n[3]=ov(lv(a[3],s[3],l)),n}}function yv(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=fv(t[o]),s=fv(t[i]),l=r-o,u=wv([rv(lv(a[0],s[0],l)),rv(lv(a[1],s[1],l)),rv(lv(a[2],s[2],l)),ov(lv(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:i,value:r}:u}}function bv(e,t,n,r){var o,i=fv(e);if(e)return i=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;r===s?t=h-d:o===s?t=1/3+c-h:i===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(i),null!=t&&(i[0]=(o=t,(o=Math.round(o))<0?0:o>360?360:o)),null!=n&&(i[1]=av(n)),null!=r&&(i[2]=av(r)),wv(mv(i),"rgba")}function xv(e,t){var n=fv(e);if(n&&null!=t)return n[3]=ov(t),wv(n,"rgba")}function wv(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function Sv(e,t){var n=fv(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Cv=new tv(100);function kv(e){if(Cf(e)){var t=Cv.get(e);return t||(t=gv(e,-.1),Cv.put(e,t)),t}if(If(e)){var n=uf({},e);return n.colorStops=mf(e.colorStops,(function(e){return{offset:e.offset,color:gv(e.color,-.1)}})),n}return e}zp.hasGlobalWindow&&Sf(window.btoa);var _v=Array.prototype.slice;function Mv(e,t,n){return(t-e)*n+e}function Tv(e,t,n,r){for(var o=t.length,i=0;ir?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;sa)r.length=a;else for(var s=i;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,i=!1,a=6,s=t;if(pf(t)){var l=function(e){return pf(e&&e[0])?2:1}(t);a=l,(1===l&&!_f(t[0])||2===l&&!_f(t[0][0]))&&(i=!0)}else if(_f(t)&&!Df(t))a=0;else if(Cf(t))if(isNaN(+t)){var u=fv(t);u&&(s=u,a=3)}else a=0;else if(If(t)){var c=uf({},s);c.colorStops=mf(t.colorStops,(function(e){return{offset:e.offset,color:fv(e.color)}})),"linear"===t.type?a=4:function(e){return"radial"===e.type}(t)&&(a=5),s=c}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Sf(n)?n:Tg[n]||Xg(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=Lv(r),l=Ev(r),u=0;u=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;nt);n++);n=p(n-1,u-2)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,m=0===f?1:p((t-r.percent)/f,1);o.easingFunc&&(m=o.easingFunc(m));var g=i?this._additiveValue:d?Zv:e[c];if(!Lv(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:o.rawValue;else if(Lv(s))1===s?Tv(g,r[a],o[a],m):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a0&&s.addKeyframe(0,Ov(l),r),this._trackKeys.push(a)}s.addKeyframe(e,Ov(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();const Nv=jv;function zv(){return(new Date).getTime()}var Bv=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Qf(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=zv()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,_g((function t(){e._running&&(_g(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=zv(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=zv(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=zv()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Nv(e,t.loop);return this.addAnimator(n),n},t}(vm);const Vv=Bv;var $v,Hv,Wv=zp.domSupported,Gv=(Hv={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:$v=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:mf($v,(function(e){var t=e.replace("mouse","pointer");return Hv.hasOwnProperty(t)?t:e}))}),Uv=["mousemove","mouseup"],qv=["pointermove","pointerup"],Kv=!1;function Yv(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Xv(e){e&&(e.zrByTouch=!0)}function Qv(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Jv=function(e,t){this.stopPropagation=Kf,this.stopImmediatePropagation=Kf,this.preventDefault=Kf,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},ey={mousedown:function(e){e=Em(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Em(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Em(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Qv(this,(e=Em(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Kv=!0,e=Em(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Kv||(e=Em(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Xv(e=Em(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),ey.mousemove.call(this,e),ey.mousedown.call(this,e)},touchmove:function(e){Xv(e=Em(this.dom,e)),this.handler.processGesture(e,"change"),ey.mousemove.call(this,e)},touchend:function(e){Xv(e=Em(this.dom,e)),this.handler.processGesture(e,"end"),ey.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&ey.click.call(this,e)},pointerdown:function(e){ey.mousedown.call(this,e)},pointermove:function(e){Yv(e)||ey.mousemove.call(this,e)},pointerup:function(e){ey.mouseup.call(this,e)},pointerout:function(e){Yv(e)||ey.mouseout.call(this,e)}};ff(["click","dblclick","contextmenu"],(function(e){ey[e]=function(t){t=Em(this.dom,t),this.trigger(e,t)}}));var ty={pointermove:function(e){Yv(e)||ty.mousemove.call(this,e)},pointerup:function(e){ty.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function ny(e,t){var n=t.domHandlers;zp.pointerEventsSupported?ff(Gv.pointer,(function(r){oy(t,r,(function(t){n[r].call(e,t)}))})):(zp.touchEventsSupported&&ff(Gv.touch,(function(r){oy(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),ff(Gv.mouse,(function(r){oy(t,r,(function(o){o=Am(o),t.touching||n[r].call(e,o)}))})))}function ry(e,t){function n(n){oy(t,n,(function(r){r=Am(r),Qv(e,r.target)||(r=function(e,t){return Em(e.dom,new Jv(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}zp.pointerEventsSupported?ff(qv,n):zp.touchEventsSupported||ff(Uv,n)}function oy(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Lm(e.domTarget,t,n,r)}function iy(e){var t,n,r,o,i=e.mounted;for(var a in i)i.hasOwnProperty(a)&&(t=e.domTarget,n=a,r=i[a],o=e.listenerOpts[a],t.removeEventListener(n,r,o));e.mounted={}}var ay=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};const sy=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new ay(t,ey),Wv&&(r._globalHandlerScope=new ay(document,ty)),ny(r,r._localHandlerScope),r}return Qf(t,e),t.prototype.dispose=function(){iy(this._localHandlerScope),Wv&&iy(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Wv&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ry(this,t):iy(t)}},t}(vm);var ly=1;zp.hasGlobalWindow&&(ly=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var uy=ly,cy="#333",dy="#ccc",hy=Bm,py=5e-5;function fy(e){return e>py||e<-5e-5}var my=[],gy=[],vy=[1,0,0,1,0,0],yy=Math.abs,by=function(){function e(){}var t;return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return fy(this.rotation)||fy(this.x)||fy(this.y)||fy(this.scaleX-1)||fy(this.scaleY-1)||fy(this.skewX)||fy(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):hy(n),e&&(t?$m(n,e,n):Vm(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(hy(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(my);var n=my[0]<0?-1:1,r=my[1]<0?-1:1,o=((my[0]-n)*t+n)/my[0]||0,i=((my[1]-r)*t+r)/my[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],Gm(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],$m(gy,e.invTransform,t),t=gy);var n=this.originX,r=this.originY;(n||r)&&(vy[4]=n,vy[5]=r,$m(gy,t,vy),gy[4]-=n,gy[5]-=r,t=gy),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&dm(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&dm(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&yy(e[0]-1)>1e-10&&yy(e[3]-1)>1e-10?Math.sqrt(yy(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){!function(e,t){for(var n=0;n=0?parseFloat(e)/100*t:parseFloat(e):e}function Iy(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Ry(r[0],n.width),u+=Ry(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var Dy="__zr_normal__",Oy=xy.concat(["ignore"]),Ay=gf(xy,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Ey={},Ly=new rg(0,0,0,0),Zy=function(){function e(e){this.id=of(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=Ly;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ey,n,u):Iy(Ey,n,u),o.x=Ey.x,o.y=Ey.y,i=Ey.align,a=Ey.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=Ry(c[0],u.width),h=Ry(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+h+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var p=n.offset;p&&(o.x+=p[0],o.y+=p[1],l||(o.originX=-p[0],o.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=n.insideFill,v=n.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=n.outsideFill,v=n.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),(g=g||"#000")===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&a===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=a,t.setDefaultTextStyle(m)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?dy:cy},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&fv(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,wv(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},uf(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Mf(e))for(var n=yf(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Dy,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===Dy;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(df(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}af("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s0,p);var f=this._textContent,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),o=df(r,e),i=df(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,o=[],i=0;i0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var h=0;h0||o.force&&!a.length){var S,C=void 0,k=void 0,_=void 0;if(s){k={},h&&(C={});for(x=0;x=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=df(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=df(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=o)return a;if(e>=i)return s}else{if(e>=o)return a;if(e<=i)return s}else{if(e===o)return a;if(e===i)return s}return(e-o)/l*u+a}function Yy(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Cf(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Xy(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Qy(e){return e.sort((function(e,t){return e-t})),e}function Jy(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,o=n>0?n:t.length,i=t.indexOf("."),a=i<0?0:o-1-i;return Math.max(0,a-r)}(e)}function eb(e,t){var n=Math.log,r=Math.LN10,o=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-o+i,0),20);return isFinite(a)?a:20}function tb(e,t){var n=gf(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];for(var r=Math.pow(10,t),o=mf(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),i=100*r,a=mf(o,(function(e){return Math.floor(e)})),s=gf(a,(function(e,t){return e+t}),0),l=mf(o,(function(e,t){return e-a[t]}));su&&(u=l[d],c=d);++a[c],l[c]=0,++s}return mf(a,(function(e){return e/r}))}function nb(e,t){var n=Math.max(Jy(e),Jy(t)),r=e+t;return n>20?r:Xy(r,n)}function rb(e){var t=2*Math.PI;return(e%t+t)%t}function ob(e){return e>-1e-4&&e=10&&t++,t}function lb(e,t){var n=sb(e),r=Math.pow(10,n),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function ub(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,r=0;r=0||o&&df(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(i[e[a][0]]=l)}}return i}}var qb=Ub([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Kb=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return qb(this,e,t)},e}(),Yb=new tv(50);function Xb(e){if("string"==typeof e){var t=Yb.get(e);return t&&t.image}return e}function Qb(e,t,n,r,o){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var i=Yb.get(e),a={hostEl:n,cb:r,cbPayload:o};return i?!ex(t=i.image)&&i.pending.push(a):((t=Wp.loadImage(e,Jb,Jb)).__zrImageSrc=e,Yb.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function Jb(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=a;l++)s-=a;var u=Cy(n,t);return u>s&&(n="",u=0),s=e-u,o.ellipsis=n,o.ellipsisWidth=u,o.contentWidth=s,o.containerWidth=e,o}function ox(e,t){var n=t.containerWidth,r=t.font,o=t.contentWidth;if(!n)return"";var i=Cy(e,r);if(i<=n)return e;for(var a=0;;a++){if(i<=o||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?ix(e,o,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*o/i):0;i=Cy(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function ix(e,t,n,r){for(var o=0,i=0,a=e.length;i0&&f+r.accumWidth>r.width&&(i=t.split("\n"),d=!0),r.accumWidth=f}else{var m=hx(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+p,a=m.linesWidths,i=m.lines}}else i=t.split("\n");for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!cx[e]}function hx(e,t,n,r,o){for(var i=[],a=[],s="",l="",u=0,c=0,d=0;dn:o+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),i.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),i.push(s),a.push(c),s=h,c=p)):f?(i.push(l),a.push(u),l=h,u=p):(i.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}else l&&(s+=l,c+=u),i.push(s),a.push(c),s="",l="",u=0,c=0}return i.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),a.push(c)),1===i.length&&(c+=o),{accumWidth:c,lines:i,linesWidths:a}}var px="__zr_style_"+Math.round(10*Math.random()),fx={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},mx={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fx[px]=!0;var gx=["z","z2","invisible"],vx=["invisible"],yx=function(e){function t(t){return e.call(this,t)||this}var n;return Qf(t,e),t.prototype._init=function(t){for(var n=yf(t),r=0;r1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Px[0]=Mx(o)*n+e,Px[1]=_x(o)*r+t,Rx[0]=Mx(i)*n+e,Rx[1]=_x(i)*r+t,u(s,Px,Rx),c(l,Px,Rx),(o%=Tx)<0&&(o+=Tx),(i%=Tx)<0&&(i+=Tx),o>i&&!a?i+=Tx:oo&&(Ix[0]=Mx(p)*n+e,Ix[1]=_x(p)*r+t,u(s,Ix,s),c(l,Ix,l))}var Fx={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},jx=[],Nx=[],zx=[],Bx=[],Vx=[],$x=[],Hx=Math.min,Wx=Math.max,Gx=Math.cos,Ux=Math.sin,qx=Math.abs,Kx=Math.PI,Yx=2*Kx,Xx="undefined"!=typeof Float32Array,Qx=[];function Jx(e){return Math.round(e/Kx*1e8)/1e8%2*Kx}function ew(e,t){var n=Jx(e[0]);n<0&&(n+=Yx);var r=n-e[0],o=e[1];o+=r,!t&&o-n>=Yx?o=n+Yx:t&&n-o>=Yx?o=n-Yx:!t&&n>o?o=n+(Yx-Jx(n-o)):t&&n0&&(this._ux=qx(n/uy/e)||0,this._uy=qx(n/uy/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Fx.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=qx(e-this._xi),r=qx(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Fx.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){return this._drawPendingPt(),this.addData(Fx.C,e,t,n,r,o,i),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,i),this._xi=o,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Fx.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,o,i){this._drawPendingPt(),Qx[0]=r,Qx[1]=o,ew(Qx,i),r=Qx[0];var a=(o=Qx[1])-r;return this.addData(Fx.A,e,t,n,n,r,a,0,i?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,i),this._xi=Gx(o)*n+e,this._yi=Ux(o)*n+t,this},e.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Fx.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Fx.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!Xx||(this.data=new Float32Array(t));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){zx[0]=zx[1]=Vx[0]=Vx[1]=Number.MAX_VALUE,Bx[0]=Bx[1]=$x[0]=$x[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,o=0,i=0;for(e=0;en||qx(g)>r||d===t-1)&&(f=Math.sqrt(R*R+g*g),o=m,i=b);break;case Fx.C:var v=e[d++],y=e[d++],b=(m=e[d++],e[d++]),x=e[d++],w=e[d++];f=Hg(o,i,v,y,m,b,x,w,10),o=x,i=w;break;case Fx.Q:f=Kg(o,i,v=e[d++],y=e[d++],m=e[d++],b=e[d++],10),o=m,i=b;break;case Fx.A:var S=e[d++],C=e[d++],k=e[d++],_=e[d++],M=e[d++],T=e[d++],P=T+M;d+=1,p&&(a=Gx(M)*k+S,s=Ux(M)*_+C),f=Wx(k,_)*Hx(Yx,Math.abs(T)),o=Gx(P)*k+S,i=Ux(P)*_+C;break;case Fx.R:a=o=e[d++],s=i=e[d++],f=2*e[d++]+2*e[d++];break;case Fx.Z:var R=a-o;g=s-i;f=Math.sqrt(R*R+g*g),o=a,i=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,o,i,a,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,m=this._len,g=t<1,v=0,y=0,b=0;if(!g||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var x=0;x0&&(e.lineTo(c,d),b=0),w){case Fx.M:n=o=h[x++],r=i=h[x++],e.moveTo(o,i);break;case Fx.L:a=h[x++],s=h[x++];var C=qx(a-o),k=qx(s-i);if(C>p||k>f){if(g){if(v+(q=l[y++])>u){var _=(u-v)/q;e.lineTo(o*(1-_)+a*_,i*(1-_)+s*_);break e}v+=q}e.lineTo(a,s),o=a,i=s,b=0}else{var M=C*C+k*k;M>b&&(c=a,d=s,b=M)}break;case Fx.C:var T=h[x++],P=h[x++],R=h[x++],I=h[x++],D=h[x++],O=h[x++];if(g){if(v+(q=l[y++])>u){$g(o,T,R,D,_=(u-v)/q,jx),$g(i,P,I,O,_,Nx),e.bezierCurveTo(jx[1],Nx[1],jx[2],Nx[2],jx[3],Nx[3]);break e}v+=q}e.bezierCurveTo(T,P,R,I,D,O),o=D,i=O;break;case Fx.Q:T=h[x++],P=h[x++],R=h[x++],I=h[x++];if(g){if(v+(q=l[y++])>u){qg(o,T,R,_=(u-v)/q,jx),qg(i,P,I,_,Nx),e.quadraticCurveTo(jx[1],Nx[1],jx[2],Nx[2]);break e}v+=q}e.quadraticCurveTo(T,P,R,I),o=R,i=I;break;case Fx.A:var A=h[x++],E=h[x++],L=h[x++],Z=h[x++],F=h[x++],j=h[x++],N=h[x++],z=!h[x++],B=L>Z?L:Z,V=qx(L-Z)>.001,$=F+j,H=!1;if(g)v+(q=l[y++])>u&&($=F+j*(u-v)/q,H=!0),v+=q;if(V&&e.ellipse?e.ellipse(A,E,L,Z,N,F,$,z):e.arc(A,E,B,F,$,z),H)break e;S&&(n=Gx(F)*L+A,r=Ux(F)*Z+E),o=Gx($)*L+A,i=Ux($)*Z+E;break;case Fx.R:n=o=h[x],r=i=h[x+1],a=h[x++],s=h[x++];var W=h[x++],G=h[x++];if(g){if(v+(q=l[y++])>u){var U=u-v;e.moveTo(a,s),e.lineTo(a+Hx(U,W),s),(U-=W)>0&&e.lineTo(a+W,s+Hx(U,G)),(U-=G)>0&&e.lineTo(a+Wx(W-U,0),s+G),(U-=W)>0&&e.lineTo(a,s+Wx(G-U,0));break e}v+=q}e.rect(a,s,W,G);break;case Fx.Z:if(g){var q;if(v+(q=l[y++])>u){_=(u-v)/q;e.lineTo(o*(1-_)+n*_,i*(1-_)+r*_);break e}v+=q}e.closePath(),o=n,i=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Fx,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();const nw=tw;function rw(e,t,n,r,o,i,a){if(0===o)return!1;var s=o,l=0;if(a>t+s&&a>r+s||ae+s&&i>n+s||it+d&&c>r+d&&c>i+d&&c>s+d||ce+d&&u>n+d&&u>o+d&&u>a+d||u=0&&ft+u&&l>r+u&&l>i+u||le+u&&s>n+u&&s>o+u||s=0&&gn||c+uo&&(o+=lw);var h=Math.atan2(l,s);return h<0&&(h+=lw),h>=r&&h<=o||h+lw>=r&&h+lw<=o}function cw(e,t,n,r,o,i){if(i>t&&i>r||io?s:0}var dw=nw.CMD,hw=2*Math.PI;var pw=[-1,-1,-1],fw=[-1,-1];function mw(e,t,n,r,o,i,a,s,l,u){if(u>t&&u>r&&u>i&&u>s||u1&&(c=void 0,c=fw[0],fw[0]=fw[1],fw[1]=c),f=Ng(t,r,i,s,fw[0]),p>1&&(m=Ng(t,r,i,s,fw[1]))),2===p?vt&&s>r&&s>i||s=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*i*s;if(Fg(u))(c=-a/(2*i))>=0&&c<=1&&(o[l++]=c);else if(u>0){var c,d=Rg(u),h=(-a-d)/(2*i);(c=(-a+d)/(2*i))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}(t,r,i,s,pw);if(0===l)return 0;var u=Ug(t,r,i);if(u>=0&&u<=1){for(var c=0,d=Wg(t,r,i,u),h=0;hn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);pw[0]=-l,pw[1]=l;var u=Math.abs(r-o);if(u<1e-4)return 0;if(u>=hw-1e-4){r=0,o=hw;var c=i?1:-1;return a>=pw[0]+e&&a<=pw[1]+e?c:0}if(r>o){var d=r;r=o,o=d}r<0&&(r+=hw,o+=hw);for(var h=0,p=0;p<2;p++){var f=pw[p];if(f+e>a){var m=Math.atan2(s,f);c=i?1:-1;m<0&&(m=hw+m),(m>=r&&m<=o||m+hw>=r&&m+hw<=o)&&(m>Math.PI/2&&m<1.5*Math.PI&&(c=-c),h+=c)}}return h}function yw(e,t,n,r,o){for(var i,a,s=e.data,l=e.len(),u=0,c=0,d=0,h=0,p=0,f=0;f1&&(n||(u+=cw(c,d,h,p,r,o))),g&&(h=c=s[f],p=d=s[f+1]),m){case dw.M:c=h=s[f++],d=p=s[f++];break;case dw.L:if(n){if(rw(c,d,s[f],s[f+1],t,r,o))return!0}else u+=cw(c,d,s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case dw.C:if(n){if(ow(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=mw(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case dw.Q:if(n){if(iw(c,d,s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=gw(c,d,s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case dw.A:var v=s[f++],y=s[f++],b=s[f++],x=s[f++],w=s[f++],S=s[f++];f+=1;var C=!!(1-s[f++]);i=Math.cos(w)*b+v,a=Math.sin(w)*x+y,g?(h=i,p=a):u+=cw(c,d,i,a,r,o);var k=(r-v)*x/b+v;if(n){if(uw(v,y,x,w,w+S,C,t,k,o))return!0}else u+=vw(v,y,x,w,w+S,C,k,o);c=Math.cos(w+S)*b+v,d=Math.sin(w+S)*x+y;break;case dw.R:if(h=c=s[f++],p=d=s[f++],i=h+s[f++],a=p+s[f++],n){if(rw(h,p,i,p,t,r,o)||rw(i,p,i,a,t,r,o)||rw(i,a,h,a,t,r,o)||rw(h,a,h,p,t,r,o))return!0}else u+=cw(i,p,i,a,r,o),u+=cw(h,a,h,p,r,o);break;case dw.Z:if(n){if(rw(c,d,h,p,t,r,o))return!0}else u+=cw(c,d,h,p,r,o);c=h,d=p}}return n||function(e,t){return Math.abs(e-t)<1e-4}(d,p)||(u+=cw(c,d,h,p,r,o)||0),0!==u}var bw=cf({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fx),xw={style:cf({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},mx.style)},ww=xy.concat(["invisible","culling","z","z2","zlevel","parent"]);const Sw=function(e){function t(t){return e.call(this,t)||this}var n;return Qf(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(e){n.buildPath(e,n.shape)}),o.silent=!0;var i=o.style;for(var a in r)i[a]!==r[a]&&(i[a]=r[a]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s.5?cy:t>.2?"#eee":dy}if(e)return dy}return cy},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Cf(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Sv(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new nw(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||4&this.__dirty)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){i.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(i.width+=s/a,i.height+=s/a,i.x-=s/a/2,i.y-=s/a/2)}return i}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var i=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return yw(e,t,!0,n,r)}(i,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return yw(e,0,!1,t,n)}(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:uf(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Gf(bw,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=uf({},this.shape))},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.shape?i?o?s=n.shape:(s=uf({},r.shape),uf(s,n.shape)):(s=uf({},o?this.shape:r.shape),uf(s,n.shape)):l&&(s=r.shape),s)if(i){this.shape=uf({},this.shape);for(var u={},c=yf(s),d=0;d0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return Gf(Cw,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=_y(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Sx);kw.prototype.type="tspan";const _w=kw;var Mw=cf({x:0,y:0},fx),Tw={style:cf({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},mx.style)};var Pw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qf(t,e),t.prototype.createStyle=function(e){return Gf(Mw,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,o=(r=t.image)&&"string"!=typeof r&&r.width&&r.height?t.image:this.__image;if(!o)return 0;var i="width"===e?"height":"width",a=t[i];return null==a?o[e]:o[e]/o[i]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Tw},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new rg(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Sx);Pw.prototype.type="image";const Rw=Pw;var Iw=Math.round;function Dw(e,t,n){if(t){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;e.x1=r,e.x2=o,e.y1=i,e.y2=a;var s=n&&n.lineWidth;return s?(Iw(2*r)===Iw(2*o)&&(e.x1=e.x2=Aw(r,s,!0)),Iw(2*i)===Iw(2*a)&&(e.y1=e.y2=Aw(i,s,!0)),e):e}}function Ow(e,t,n){if(t){var r=t.x,o=t.y,i=t.width,a=t.height;e.x=r,e.y=o,e.width=i,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Aw(r,s,!0),e.y=Aw(o,s,!0),e.width=Math.max(Aw(r+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(Aw(o+a,s,!1)-e.y,0===a?0:1),e):e}}function Aw(e,t,n){if(!t)return e;var r=Iw(2*e);return(r+Iw(t))%2==0?r/2:(r+(n?1:-1))/2}var Ew=function(){this.x=0,this.y=0,this.width=0,this.height=0},Lw={},Zw=function(e){function t(t){return e.call(this,t)||this}return Qf(t,e),t.prototype.getDefaultShape=function(){return new Ew},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=Ow(Lw,t,this.style);n=a.x,r=a.y,o=a.width,i=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,o=t.width,i=t.height;t.r?function(e,t){var n,r,o,i,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=o=i=d:d instanceof Array?1===d.length?n=r=o=i=d[0]:2===d.length?(n=o=d[0],r=i=d[1]):3===d.length?(n=d[0],r=i=d[1],o=d[2]):(n=d[0],r=d[1],o=d[2],i=d[3]):n=r=o=i=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),o+i>u&&(o*=u/(a=o+i),i*=u/a),r+o>c&&(r*=c/(a=r+o),o*=c/a),n+i>c&&(n*=c/(a=n+i),i*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-o),0!==o&&e.arc(s+u-o,l+c-o,o,0,Math.PI/2),e.lineTo(s+i,l+c),0!==i&&e.arc(s+i,l+c-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,o,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Sw);Zw.prototype.type="rect";const Fw=Zw;var jw={fill:"#000"},Nw={style:cf({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},mx.style)},zw=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=jw,n.attr(t),n}return Qf(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;tp&&c){var f=Math.floor(p/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var m=rx(d,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g0,_=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,T=0;Tl&&ux(n,e.substring(l,u),t,s),ux(n,r[2],t,s,r[1]),l=tx.lastIndex}li){w>0?(y.tokens=y.tokens.slice(0,w),g(y,x,b),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var T=S.width,P=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))O.percentWidth=T,c.push(O),O.contentWidth=Cy(O.text,_);else{if(P){var R=S.backgroundColor,I=R&&R.image;I&&ex(I=Xb(I))&&(O.width=Math.max(O.width,I.width*M/I.height))}var D=f&&null!=o?o-x:null;null!=D&&D=0&&"right"===(T=b[M]).align;)this._placeToken(T,e,w,f,_,"right",g),S-=T.width,_-=T.width,M--;for(k+=(n-(k-p)-(m-_)-S)/2;C<=M;)T=b[C],this._placeToken(T,e,w,f,k+T.width/2,"center",g),k+=T.width,C++;f+=w}},t.prototype._placeToken=function(e,t,n,r,o,i,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&Xw(s)&&this._renderBackground(s,t,"right"===i?o-e.width:"center"===i?o-e.width/2:o,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(o=Kw(o,i,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(_w),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,m=!1,g=0,v=qw("fill"in s?s.fill:"fill"in t?t.fill:(m=!0,f.fill)),y=Uw("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!m?null:(g=2,f.stroke)),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=o,p.y=u,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=i,p.textBaseline="middle",p.font=e.font||Bp,p.opacity=Ef(s.opacity,t.opacity,1),Ww(p,s),y&&(p.lineWidth=Ef(s.lineWidth,t.lineWidth,g),p.lineDash=Af(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var x=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new rg(My(p.x,x,p.textAlign),Ty(p.y,w,p.textBaseline),x,w))},t.prototype._renderBackground=function(e,t,n,r,o,i){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,m=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(Fw)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=o,g.height=i,g.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Af(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(Rw)).onload=function(){m.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=o,v.height=i}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Af(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Ef(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return function(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}(e)&&(t=[e.fontStyle,e.fontWeight,Hw(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&jf(t)||e.textFont||e.font},t}(Sx),Bw={left:!0,right:1,center:1},Vw={top:1,bottom:1,middle:1},$w=["fontStyle","fontWeight","fontSize","fontFamily"];function Hw(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function Ww(e,t){for(var n=0;n<$w.length;n++){var r=$w[n],o=t[r];null!=o&&(e[r]=o)}}function Gw(e){if(e){e.font=zw.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Bw[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Vw[n]?n:"top",e.padding&&(e.padding=Zf(e.padding))}}function Uw(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function qw(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Kw(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function Yw(e){var t=e.text;return null!=t&&(t+=""),t}function Xw(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}const Qw=zw;var Jw=Rb(),eS=function(e,t,n,r){if(r){var o=Jw(r);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,o.ssrType="chart","group"===r.type&&r.traverse((function(r){var o=Jw(r);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"}))}},tS=1,nS={},rS=Rb(),oS=Rb(),iS=["emphasis","blur","select"],aS=["normal","emphasis","blur","select"],sS="highlight",lS="downplay",uS="select",cS="unselect",dS="toggleSelect";function hS(e){return null!=e&&"none"!==e}function pS(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function fS(e){pS(e,"emphasis",2)}function mS(e){2===e.hoverState&&pS(e,"normal",0)}function gS(e){pS(e,"blur",1)}function vS(e){1===e.hoverState&&pS(e,"normal",0)}function yS(e){e.selected=!0}function bS(e){e.selected=!1}function xS(e,t,n){t(e,n)}function wS(e,t,n){xS(e,t,n),e.isGroup&&e.traverse((function(e){xS(e,t,n)}))}function SS(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function CS(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var o=n&&df(n,"select")>=0,i=!1;if(e instanceof Sw){var a=rS(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(hS(s)||hS(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(i=!0,r=uf({},r),(u=uf({},u)).fill=s):!hS(u.fill)&&hS(s)?(i=!0,r=uf({},r),(u=uf({},u)).fill=kv(s)):!hS(u.stroke)&&hS(l)&&(i||(r=uf({},r),u=uf({},u)),u.stroke=kv(l)),r.style=u}}if(r&&null==r.z2){i||(r=uf({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=df(e.currentStates,t)>=0,o=e.style.opacity,i=r?null:function(e,t,n,r){for(var o=e.style,i={},a=0;a0){var i={dataIndex:o,seriesIndex:e.seriesIndex};null!=r&&(i.dataType=r),t.push(i)}}))})),t}function zS(e,t,n){WS(e,!0),wS(e,kS),function(e,t,n){var r=Jw(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function BS(e,t,n,r){r?function(e){WS(e,!1)}(e):zS(e,t,n)}var VS=["emphasis","blur","select"],$S={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function HS(e,t,n,r){n=n||"itemStyle";for(var o=0;o0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:i,force:!!i||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),i&&i()}function QS(e,t,n,r,o,i){XS("update",e,t,n,r,o,i)}function JS(e,t,n,r,o,i){XS("enter",e,t,n,r,o,i)}function eC(e){if(!e.__zr)return!0;for(var t=0;t-1?ZC:jC;function VC(e,t){e=e.toUpperCase(),zC[e]=new OC(t),NC[e]=t}VC(FC,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),VC(ZC,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var $C=1e3,HC=6e4,WC=36e5,GC=864e5,UC=31536e6,qC={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},KC="{yyyy}-{MM}-{dd}",YC={year:"{yyyy}",month:"{yyyy}-{MM}",day:KC,hour:KC+" "+qC.hour,minute:KC+" "+qC.minute,second:KC+" "+qC.second,millisecond:qC.none},XC=["year","month","day","hour","minute","second","millisecond"],QC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function JC(e,t){return"0000".substr(0,t-(e+="").length)+e}function ek(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function tk(e){return e===ek(e)}function nk(e,t,n,r){var o=ab(e),i=o[ik(n)](),a=o[ak(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[sk(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[lk(n)](),d=(c-1)%12+1,h=o[uk(n)](),p=o[ck(n)](),f=o[dk(n)](),m=r instanceof OC?r:function(e){return zC[e]}(r||BC)||zC[jC],g=m.getModel("time"),v=g.get("month"),y=g.get("monthAbbr"),b=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,JC(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,JC(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,JC(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,JC(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,JC(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,JC(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,JC(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,JC(f,3)).replace(/{S}/g,f+"")}function rk(e,t){var n=ab(e),r=n[ak(t)]()+1,o=n[sk(t)](),i=n[lk(t)](),a=n[uk(t)](),s=n[ck(t)](),l=0===n[dk(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===i,h=d&&1===o;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function ok(e,t,n){var r=_f(e)?ab(e):e;switch(t=t||rk(e,n)){case"year":return r[ik(n)]();case"half-year":return r[ak(n)]()>=6?1:0;case"quarter":return Math.floor((r[ak(n)]()+1)/4);case"month":return r[ak(n)]();case"day":return r[sk(n)]();case"half-day":return r[lk(n)]()/24;case"hour":return r[lk(n)]();case"minute":return r[uk(n)]();case"second":return r[ck(n)]();case"millisecond":return r[dk(n)]()}}function ik(e){return e?"getUTCFullYear":"getFullYear"}function ak(e){return e?"getUTCMonth":"getMonth"}function sk(e){return e?"getUTCDate":"getDate"}function lk(e){return e?"getUTCHours":"getHours"}function uk(e){return e?"getUTCMinutes":"getMinutes"}function ck(e){return e?"getUTCSeconds":"getSeconds"}function dk(e){return e?"getUTCMilliseconds":"getMilliseconds"}function hk(e){return e?"setUTCFullYear":"setFullYear"}function pk(e){return e?"setUTCMonth":"setMonth"}function fk(e){return e?"setUTCDate":"setDate"}function mk(e){return e?"setUTCHours":"setHours"}function gk(e){return e?"setUTCMinutes":"setMinutes"}function vk(e){return e?"setUTCSeconds":"setSeconds"}function yk(e){return e?"setUTCMilliseconds":"setMilliseconds"}function bk(e){if(isNaN(cb(e)))return Cf(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function xk(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var wk=Zf;function Sk(e,t,n){function r(e){return e&&jf(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var i="time"===t,a=e instanceof Date;if(i||a){var s=i?ab(e):e;if(!isNaN(+s))return nk(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return kf(e)?r(e):_f(e)&&o(e)?e+"":"-";var l=cb(e);return o(l)?bk(l):kf(e)?r(e):"boolean"==typeof e?e+"":"-"}var Ck=["a","b","c","d","e","f","g"],kk=function(e,t){return"{"+e+(null==t?"":t)+"}"};function _k(e,t,n){wf(t)||(t=[t]);var r=t.length;if(!r)return"";for(var o=t[0].$vars||[],i=0;ir||l.newline?(i=0,c=m,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);(d=a+g)>o||l.newline?(i+=s+n,a=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=i,l.y=a,l.markRedraw(),"horizontal"===e?i=c+n:a=d+n)}))}var Ok=Dk;xf(Dk,"vertical"),xf(Dk,"horizontal");function Ak(e,t,n){n=wk(n||0);var r=t.width,o=t.height,i=Yy(e.left,r),a=Yy(e.top,o),s=Yy(e.right,r),l=Yy(e.bottom,o),u=Yy(e.width,r),c=Yy(e.height,o),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-i),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/o?u=.8*r:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(i)&&(i=r-s-u-h),isNaN(a)&&(a=o-l-c-d),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-h}switch(e.top||e.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}i=i||0,a=a||0,isNaN(u)&&(u=r-h-i-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new rg(i+n[3],a+n[0],u,c);return f.margin=n,f}function Ek(e,t,n,r,o,i){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((i=i||e).x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new rg(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=Ak(cf({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(i.x=h,i.y=p):(i.x+=h,i.y+=p),i===e&&e.markRedraw(),!0}function Lk(e){var t=e.layoutMode||e.constructor.layoutMode;return Mf(t)?t:t?{type:t}:null}function Zk(e,t,n){var r=n&&n.ignoreSize;!wf(r)&&(r=[r,r]);var o=a(Ik[0],0),i=a(Ik[1],1);function a(n,o){var i={},a=0,u={},c=0;if(Pk(n,(function(t){u[t]=e[t]})),Pk(n,(function(e){s(t,e)&&(i[e]=u[e]=t[e]),l(i,e)&&a++,l(u,e)&&c++})),r[o])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return i;for(var d=0;d=0;a--)i=lf(i,n[a],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Lb(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(OC);Vb(Nk,OC),Gb(Nk),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=zb(e);t[r.main]=n},e.determineSubType=function(n,r){var o=r.type;if(!o){var i=zb(n).main;e.hasSubTypes(n)&&t[i]&&(o=t[i](r))}return o}}(Nk),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,o,i){if(e.length){var a=function(e){var r={},o=[];return ff(e,(function(i){var a=n(r,i),s=function(e,t){var n=[];return ff(e,(function(e){df(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(i),e);a.entryCount=s.length,0===a.entryCount&&o.push(i),ff(s,(function(e){df(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);df(t.successor,e)<0&&t.successor.push(i)}))})),{graph:r,noEntryList:o}}(r),s=a.graph,l=a.noEntryList,u={};for(ff(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(o.call(i,c,d.originalDeps.slice()),delete u[c]),ff(d.successor,h?f:p)}ff(u,(function(){throw new Error("")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(Nk,(function(e){var t=[];ff(Nk.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=mf(t,(function(e){return zb(e).main})),"dataset"!==e&&df(t,"dataset")<=0&&t.unshift("dataset");return t}));const zk=Nk;var Bk="";"undefined"!=typeof navigator&&(Bk=navigator.platform||"");var Vk="rgba(0, 0, 0, 0.2)";const $k={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Vk,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Vk,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Vk,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Vk,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Vk,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Vk,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Bk.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Hk=Wf(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Wk="original",Gk="arrayRows",Uk="objectRows",qk="keyedColumns",Kk="typedArray",Yk="unknown",Xk="column",Qk="row",Jk=1,e_=2,t_=3,n_=Rb();function r_(e,t,n){var r={},o=i_(t);if(!o||!e)return r;var i,a,s=[],l=[],u=t.ecModel,c=n_(u).datasetMap,d=o.uid+"_"+n.seriesLayoutBy;ff(e=e.slice(),(function(t,n){var o=Mf(t)?t:e[n]={name:t};"ordinal"===o.type&&null==i&&(i=n,a=f(o)),r[o.name]=[]}));var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var m_="\0_ec_inner";var g_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.init=function(e,t,n,r,o,i){r=r||{},this.option=null,this._theme=new OC(r),this._locale=new OC(o),this._optionManager=i},t.prototype.setOption=function(e,t,n){var r=b_(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,b_(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var o=r.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):d_(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=r.getTimelineOption(this);i&&(n=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&ff(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,o=this._componentsCount,i=[],a=Wf(),s=t&&t.replaceMergeMainTypeMap;n_(this).datasetMap=Wf(),ff(e,(function(e,t){null!=e&&(zk.hasClass(t)?t&&(i.push(t),a.set(t,!0)):n[t]=null==n[t]?sf(e):lf(n[t],e,!0))})),s&&s.each((function(e,t){zk.hasClass(t)&&!a.get(t)&&(i.push(t),a.set(t,!0))})),zk.topologicalTravel(i,zk.getAllClassMainTypes(),(function(t){var i=function(e,t,n){var r=l_.get(t);if(!r)return n;var o=r(e);return o?n.concat(o):n}(this,t,vb(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=Sb(a,i,l);(function(e,t,n){ff(e,(function(e){var r=e.newOption;Mf(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,zk),n[t]=null,r.set(t,null),o.set(t,0);var c,d=[],h=[],p=0;ff(u,(function(e,n){var r=e.existing,o=e.newOption;if(o){var i="series"===t,a=zk.getClass(t,e.keyInfo.subType,!i);if(!a)return;if("tooltip"===t){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var s=uf({componentIndex:n},e.keyInfo);uf(r=new a(o,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),h.push(r),p++):(d.push(void 0),h.push(void 0))}),this),n[t]=d,r.set(t,h),o.set(t,p),"series"===t&&u_(this)}),this),this._seriesIndices||u_(this)},t.prototype.getOption=function(){var e=sf(this.option);return ff(e,(function(t,n){if(zk.hasClass(n)){for(var r=vb(t),o=r.length,i=!1,a=o-1;a>=0;a--)r[a]&&!Tb(r[a])?i=!0:(r[a]=null,!i&&o--);r.length=o,e[n]=r}})),delete e[m_],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var o=0;o=t:"max"===n?e<=t:e===t})(r[a],e,i)||(o=!1)}})),o}const P_=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(ff(vb(e.series),(function(e){e&&e.data&&Pf(e.data)&&zf(e.data)})),ff(vb(e.dataset),(function(e){e&&e.source&&Pf(e.source)&&zf(e.source)}))),e=sf(e);var r=this._optionBackup,o=function(e,t,n){var r,o,i=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((d||c)&&(e.options=e.media=null),o=e);c&&wf(u)&&ff(u,(function(e){e&&e.option&&(e.query?i.push(e):r||(r=e))}));function h(e){ff(t,(function(t){t(e,n)}))}return h(o),ff(l,(function(e){return h(e)})),ff(i,(function(e){return h(e.option)})),{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}(e,t,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],sf(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=sf(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),o=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!i.length&&!a)return l;for(var u=0,c=i.length;u=0;m--){var g=e[m];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,d)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=nb(p,v),f=v;break}}}return r[0]=p,r[1]=f,r}))}))}var Y_,X_,Q_,J_,eM,tM=function(e){this.data=e.data||(e.sourceFormat===qk?{}:[]),this.sourceFormat=e.sourceFormat||Yk,this.seriesLayoutBy=e.seriesLayoutBy||Xk,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return xM(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function CM(e){var t,n;return Mf(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function kM(e){return new _M(e)}var _M=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||h1&&r>0?s:a}};return i;function a(){return t=e?null:it},gte:function(e,t){return e>=t}},DM=(function(){function e(e,t){if(!_f(t)){0,PM("")}this._opFn=IM[e],this._rvalFloat=cb(t)}e.prototype.evaluate=function(e){return _f(e)?this._opFn(e,this._rvalFloat):this._opFn(cb(e),this._rvalFloat)}}(),function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=_f(e)?e:cb(e),r=_f(t)?t:cb(t),o=isNaN(n),i=isNaN(r);if(o&&(n=this._incomparable),i&&(r=this._incomparable),o&&i){var a=Cf(e),s=Cf(t);a&&(n=s?e:0),s&&(r=a?t:0)}return nr?-this._resultLT:0},e}());!function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=cb(t)}e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=cb(e)===this._rvalFloat)}return this._isEQ?t:!t}}();var OM=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return RM(e,t)},e}();function AM(e){if(!NM(e.sourceFormat)){0,PM("")}return e.data}function EM(e){var t=e.sourceFormat,n=e.data;if(!NM(t)){0,PM("")}if(t===Gk){for(var r=[],o=0,i=n.length;o65535?VM:$M}function qM(e,t,n,r,o){var i=GM[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new i(r),u=0;um[1]&&(m[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,i=this._dimensions,a=i.length,s=this._rawExtent,l=mf(i,(function(e){return e.property})),u=0;ug[1]&&(g[1]=m)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return i;o=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var i=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(i=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var o=0;o=u&&b<=c||isNaN(b))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[r[0]];var g=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(m=0;m=u&&b<=c||isNaN(b))&&(x>=v&&x<=y||isNaN(x))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(m=0;m=u&&b<=c||isNaN(b))&&(a[s++]=w)}else for(m=0;me[k][1])&&(S=!1)}S&&(a[s++]=t.getRawIndex(m))}return sg[1]&&(g[1]=m)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,o,i=this.clone([e],!0),a=i._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(UM(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;hn&&(n=r,o=_)}k>0&&ku-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=g),d[h++]=v}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,i=this.count();oa&&(a=l)}return r=[i,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,o=0;o=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return RM(e[r],this._dimensions[r])}zM={arrayRows:e,objectRows:function(e,t,n,r){return RM(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var o=e&&(null==e.value?e:e.value);return RM(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}();const YM=KM;var XM=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(JM(n)){var i=n,a=void 0,s=void 0,l=void 0;if(o){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Pf(a=i.get("data",!0))?Kk:Wk,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Af(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Af(c.sourceHeader,d.sourceHeader),f=Af(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[rM(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var m=n;if(o){var g=this._applyTransform(r);e=g.sourceList,t=g.upstreamSignList}else{e=[rM(m.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&eT("")}var i,a=[],s=[];return ff(e,(function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||eT(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t){var n=vb(e),r=n.length;r||PM("");for(var o=0,i=r;o1||n>0&&!e.noHeader;return ff(e.blocks,(function(e){var n=lT(e);n>=t&&(t=n+ +(r&&(!n||aT(e)&&!e.noHeader)))})),t}return 0}function uT(e,t,n,r){var o,i=t.noHeader,a=(o=lT(t),{html:rT[o],richText:oT[o]}),s=[],l=t.blocks||[];Ff(!l||wf(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(qf(c,u)){var d=new DM(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}ff(l,(function(n,o){var i=t.valueFormatter,l=sT(n)(i?uf(uf({},e),{valueFormatter:i}):e,n,o>0?a.html:0,r);null!=l&&s.push(l)}));var h="richText"===e.renderMode?s.join(a.richText):hT(s.join(""),i?n:a.html);if(i)return h;var p=Sk(t.header,"ordinal",e.useUTC),f=nT(r,e.renderMode).nameStyle;return"richText"===e.renderMode?pT(e,p,f)+a.richText+h:hT('
'+Tm(p)+"
"+h,n)}function cT(e,t,n,r){var o=e.renderMode,i=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return mf(e=wf(e)?e:[e],(function(e,t){return Sk(e,wf(p)?p[t]:p,u)}))};if(!i||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",o),h=i?"":Sk(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),m=!s||!i,g=!s&&i,v=nT(r,o),y=v.nameStyle,b=v.valueStyle;return"richText"===o?(s?"":d)+(i?"":pT(e,h,y))+(a?"":function(e,t,n,r,o){var i=[o],a=r?10:20;return n&&i.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(wf(t)?t.join(" "):t,i)}(e,f,m,g,b)):hT((s?"":d)+(i?"":function(e,t,n){return''+Tm(e)+""}(h,!s,y))+(a?"":function(e,t,n,r){var o=n?"10px":"20px",i=t?"float:right;margin-left:"+o:"";return e=wf(e)?e:[e],''+mf(e,(function(e){return Tm(e)})).join("  ")+""}(f,m,g,b)),n)}}function dT(e,t,n,r,o,i){if(e)return sT(e)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,i)}function hT(e,t){return'
'+e+'
'}function pT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function fT(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var mT=function(){function e(){this.richTextStyles={},this._nextStyleNameId=db()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,o=function(e,t){var n=Cf(e)?{color:e,extraCssText:t}:e||{},r=n.color,o=n.type;t=n.extraCssText;var i=n.renderMode||"html";return r?"html"===i?"subItem"===o?'':'':{renderMode:i,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return Cf(o)?o:(this.richTextStyles[r]=o.style,o.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};wf(t)?ff(t,(function(e){return uf(n,e)})):uf(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function gT(e){var t,n,r,o,i=e.series,a=e.dataIndex,s=e.multipleSeries,l=i.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=i.getRawValue(a),h=wf(d),p=function(e,t){return Mk(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(i,a);if(c>1||h&&!c){var f=function(e,t,n,r,o){var i=t.getData(),a=gf(e,(function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(iT("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?ff(r,(function(e){c(xM(i,n,e),e)})):ff(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,i,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,o=f.inlineValues[0]}else if(c){var m=l.getDimensionInfo(u[0]);o=t=xM(l,a,u[0]),n=m.type}else o=t=h?d[0]:d;var g=Mb(i),v=g&&i.name||"",y=l.getName(a),b=s?v:y;return iT("section",{header:v,noHeader:s||!g,sortParam:o,blocks:[iT("nameValue",{markerType:"item",markerColor:p,name:b,noName:!jf(b),value:t,valueType:n,dataIndex:a})].concat(r||[])})}var vT=Rb();function yT(e,t){return e.getName(t)||e.getId(t)}var bT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Fp(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=kM({count:wT,reset:ST}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(vT(this).sourceManager=new XM(this)).prepareSource();var r=this.getInitialData(e,n);kT(r,this),this.dataTask.context.data=r,vT(this).dataBeforeProcessed=r,xT(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Lk(this),r=n?Fk(e):{},o=this.subType;zk.hasClass(o)&&(o+="Series"),lf(e,t.getTheme().get(this.subType)),lf(e,this.getDefaultOption()),yb(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Zk(e,r,n)},t.prototype.mergeOption=function(e,t){e=lf(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Lk(this);n&&Zk(this.option,e,n);var r=vT(this).sourceManager;r.dirty(),r.prepareSource();var o=this.getInitialData(e,t);kT(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,vT(this).dataBeforeProcessed=o,xT(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Pf(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,o=p_.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=r.getColorFromPalette(e,t,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,o=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i=0&&n.push(o)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[yT(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,o=this.option,i=o.selectedMode,a=t.length;if(i&&a)if("series"===i)o.selectedMap="all";else if("multiple"===i){Mf(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l0&&this._innerSelect(e,t)}},t.registerClass=function(e){return zk.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(zk);function xT(e){var t=e.name;Mb(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return ff(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function wT(e){return e.model.getRawData().count()}function ST(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),CT}function CT(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function kT(e,t){ff(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r1&&(a*=LT(f),s*=LT(f));var m=(o===i?-1:1)*LT((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,g=m*a*p/s,v=m*-s*h/a,y=(e+n)/2+FT(d)*g-ZT(d)*v,b=(t+r)/2+ZT(d)*g+FT(d)*v,x=BT([1,0],[(h-g)/a,(p-v)/s]),w=[(h-g)/a,(p-v)/s],S=[(-1*h-g)/a,(-1*p-v)/s],C=BT(w,S);if(zT(w,S)<=-1&&(C=jT),zT(w,S)>=1&&(C=0),C<0){var k=Math.round(C/jT*1e6)/1e6;C=2*jT+k%2*jT}c.addData(u,y,b,a,s,x,C,d,i)}var $T=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,HT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var WT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qf(t,e),t.prototype.applyTransform=function(e){},t}(Sw);function GT(e){return null!=e.setData}function UT(e,t){var n=function(e){var t=new nw;if(!e)return t;var n,r=0,o=0,i=r,a=o,s=nw.CMD,l=e.match($T);if(!l)return t;for(var u=0;uI*I+D*D&&(k=M,_=T),{cx:k,cy:_,x0:-c,y0:-d,x1:k*(o/w-1),y1:_*(o/w-1)}}function hP(e,t){var n,r=lP(t.r,0),o=lP(t.r0||0,0),i=r>0;if(i||o>0){if(i||(r=o,o=0),o>r){var a=r;r=o,o=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=aP(l-s),p=h>tP&&h%tP;if(p>cP&&(h=p),r>cP)if(h>tP-cP)e.moveTo(u+r*rP(s),c+r*nP(s)),e.arc(u,c,r,s,l,!d),o>cP&&(e.moveTo(u+o*rP(l),c+o*nP(l)),e.arc(u,c,o,l,s,d));else{var f=void 0,m=void 0,g=void 0,v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=void 0,k=void 0,_=void 0,M=void 0,T=void 0,P=void 0,R=void 0,I=r*rP(s),D=r*nP(s),O=o*rP(l),A=o*nP(l),E=h>cP;if(E){var L=t.cornerRadius;L&&(f=(n=function(e){var t;if(wf(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(L))[0],m=n[1],g=n[2],v=n[3]);var Z=aP(r-o)/2;if(y=uP(Z,g),b=uP(Z,v),x=uP(Z,f),w=uP(Z,m),k=S=lP(y,b),_=C=lP(x,w),(S>cP||C>cP)&&(M=r*rP(l),T=r*nP(l),P=o*rP(s),R=o*nP(s),hcP){var H=uP(g,k),W=uP(v,k),G=dP(P,R,I,D,r,H,d),U=dP(M,T,O,A,r,W,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),k0&&e.arc(u+G.cx,c+G.cy,H,iP(G.y0,G.x0),iP(G.y1,G.x1),!d),e.arc(u,c,r,iP(G.cy+G.y1,G.cx+G.x1),iP(U.cy+U.y1,U.cx+U.x1),!d),W>0&&e.arc(u+U.cx,c+U.cy,W,iP(U.y1,U.x1),iP(U.y0,U.x0),!d))}else e.moveTo(u+I,c+D),e.arc(u,c,r,s,l,!d);else e.moveTo(u+I,c+D);if(o>cP&&E)if(_>cP){H=uP(f,_),G=dP(O,A,M,T,o,-(W=uP(m,_)),d),U=dP(I,D,P,R,o,-H,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),_0&&e.arc(u+G.cx,c+G.cy,W,iP(G.y0,G.x0),iP(G.y1,G.x1),!d),e.arc(u,c,o,iP(G.cy+G.y1,G.cx+G.x1),iP(U.cy+U.y1,U.cx+U.x1),d),H>0&&e.arc(u+U.cx,c+U.cy,H,iP(U.y1,U.x1),iP(U.y0,U.x0),!d))}else e.lineTo(u+O,c+A),e.arc(u,c,o,l,s,d);else e.lineTo(u+O,c+A)}else e.moveTo(u,c);e.closePath()}}}var pP=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},fP=function(e){function t(t){return e.call(this,t)||this}return Qf(t,e),t.prototype.getDefaultShape=function(){return new pP},t.prototype.buildPath=function(e,t){hP(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Sw);fP.prototype.type="sector";const mP=fP;var gP=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},vP=function(e){function t(t){return e.call(this,t)||this}return Qf(t,e),t.prototype.getDefaultShape=function(){return new gP},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,o,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,o,!0)},t}(Sw);vP.prototype.type="ring";const yP=vP;function bP(e,t,n){var r=t.smooth,o=t.points;if(o&&o.length>=2){if(r){var i=function(e,t,n,r){var o,i,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;hHP[1]){if(a=!1,o)return a;var u=Math.abs(HP[0]-$P[1]),c=Math.abs($P[0]-HP[1]);Math.min(u,c)>r.len()&&(uMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function gR(e){return!e.isGroup}function vR(e,t,n){if(e&&t){var r,o=(r={},e.traverse((function(e){gR(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(gR(e)&&e.anid){var t=o[e.anid];if(t){var r=i(e);e.attr(i(t)),QS(e,r,n,Jw(e).dataIndex)}}}))}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=uf({},e.shape)),t}}function yR(e,t){return mf(e,(function(e){var n=e[0];n=XP(n,t.x),n=QP(n,t.x+t.width);var r=e[1];return r=XP(r,t.y),[n,r=QP(r,t.y+t.height)]}))}function bR(e,t){var n=XP(e.x,t.x),r=QP(e.x+e.width,t.x+t.width),o=XP(e.y,t.y),i=QP(e.y+e.height,t.y+t.height);if(r>=n&&i>=o)return{x:n,y:o,width:r-n,height:i-o}}function xR(e,t,n){var r=uf({rectHover:!0},t),o=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),cf(o,n),new Rw(r)):iR(e.replace("path://",""),r,n,"center")}function wR(e,t,n,r,o){for(var i=0,a=o[o.length-1];i=-1e-6)return!1;var f=e-o,m=t-i,g=CR(f,m,u,c)/p;if(g<0||g>1)return!1;var v=CR(f,m,d,h)/p;return!(v<0||v>1)}function CR(e,t,n,r){return e*r-n*t}function kR(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,o=Cf(t)?{formatter:t}:t,i=n.mainType,a=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=a;var l=e.formatterParamsExtra;l&&ff(yf(l),(function(e){qf(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=Jw(e.el);u.componentMainType=i,u.componentIndex=a,u.tooltipConfig={name:r,option:cf({content:r,formatterParams:s},o)}}function _R(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function MR(e,t){if(e)if(wf(e))for(var n=0;n=0?d():c=setTimeout(d,-o),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function zR(e,t,n,r){var o=e[t];if(o){var i=o[ZR]||o,a=o[jR];if(o[FR]!==n||a!==r){if(null==n||!r)return e[t]=i;(o=e[t]=NR(i,n,"debounce"===r))[ZR]=i,o[jR]=r,o[FR]=n}return o}}function BR(e,t){var n=e[t];n&&n[ZR]&&(n.clear&&n.clear(),e[t]=n[ZR])}var VR=Rb(),$R={itemStyle:Ub(PC,!0),lineStyle:Ub(_C,!0)},HR={lineStyle:"stroke",itemStyle:"fill"};function WR(e,t){var n=e.visualStyleMapper||$R[t];return n||(console.warn("Unknown style type '"+t+"'."),$R.itemStyle)}function GR(e,t){var n=e.visualDrawType||HR[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var UR={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=e.getModel(r),i=WR(e,r)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=GR(e,r),l=i[s],u=Sf(l)?l:null,c="auto"===i.fill||"auto"===i.stroke;if(!i[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());i[s]||(i[s]=d,n.setVisual("colorFromPalette",!0)),i.fill="auto"===i.fill||Sf(i.fill)?d:i.fill,i.stroke="auto"===i.stroke||Sf(i.stroke)?d:i.stroke}if(n.setVisual("style",i),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),o=uf({},i);o[s]=u(r),t.setItemVisual(n,"style",o)}}}},qR=new OC,KR={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=WR(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){qR.option=n[r];var a=o(qR);uf(e.ensureUniqueItemVisual(t,"style"),a),qR.option.decal&&(e.setItemVisual(t,"decal",qR.option.decal),qR.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},YR={performRawSeries:!0,overallReset:function(e){var t=Wf();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,o=t.get(r);o||(o={},t.set(r,o)),VR(e).scope=o}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},o=t.getData(),i=VR(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=GR(t,a);o.each((function(e){var t=o.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,i,c)}}))}}))}},XR=Math.PI;var QR=function(){function e(e,t,n,r){this._stageTaskMap=Wf(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,i=r&&r.modDataCount;return{step:o,modBy:null!=i?Math.ceil(i/o):null,modDataCount:i}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,i=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:i}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Wf();e.eachSeries((function(e){var r=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;ff(this._allHandlers,(function(r){var o=e.get(r.uid)||e.set(r.uid,{});Ff(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,i=o.context;i.model=t,i.ecModel=n,i.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var o=!1,i=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}ff(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),i.updatePayload(c,n);var p=i.getPerformArgs(c,r.block);h.each((function(e){e.perform(p)})),c.perform(p)&&(o=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=i.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(u)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var o=this,i=t.seriesTaskMap,a=t.seriesTaskMap=Wf(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,i&&i.get(s)||kM({plan:rI,reset:oI,count:sI}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var o=this,i=t.overallTask=t.overallTask||kM({reset:JR});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var a=i.agentStubMap,s=i.agentStubMap=Wf(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,kM({reset:eI,onDirty:nI})));n.context={model:e,overallProgress:c},n.agent=i,n.__block=c,o._pipe(e,n)}Ff(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,ff(n.getSeries(),h)),d&&i.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Sf(e)&&(e={overallReset:e,seriesType:lI(e)}),e.uid=EC("stageHandler"),t&&(e.visualType=t),e},e}();function JR(e){e.overallReset(e.ecModel,e.api,e.payload)}function eI(e){return e.overallProgress&&tI}function tI(){this.agent.dirty(),this.getDownstream().dirty()}function nI(){this.agent&&this.agent.dirty()}function rI(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function oI(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=vb(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?mf(t,(function(e,t){return aI(t)})):iI}var iI=aI(0);function aI(e){return function(t,n){var r=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var i=t.start;i0&&c===o.length-u.length){var d=o.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,i=n.model,a=n.view;if(!i||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,i,"mainType")&&u(s,i,"subType")&&u(s,i,"index","componentIndex")&&u(s,i,"name")&&u(s,i,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,o));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),CI=["symbol","symbolSize","symbolRotate","symbolOffset"],kI=CI.concat(["symbolKeepAspect"]),_I={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},o={},i=!1,a=0;a=0&&GI(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,o=null==t.x2?1:t.x2,i=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,o=o*n.width+n.x,i=i*n.height+n.y,a=a*n.height+n.y),r=GI(r)?r:0,o=GI(o)?o:1,i=GI(i)?i:0,a=GI(a)?a:0,e.createLinearGradient(r,i,o,a)}(e,t,n),o=t.colorStops,i=0;i0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:_f(t)?[t]:wf(t)?t:null:null),i=r.lineDashOffset;if(o){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=mf(o,(function(e){return e/a})),i/=a)}return[o,i]}var XI=new nw(!0);function QI(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function JI(e){return"string"==typeof e&&"none"!==e}function eD(e){var t=e.fill;return null!=t&&"none"!==t}function tD(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function nD(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function rD(e,t,n){var r=Qb(t.image,t.__image,n);if(ex(r)){var o=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*Yf),i.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(i)}return o}}var oD=["shadowBlur","shadowOffsetX","shadowOffsetY"],iD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function aD(e,t,n,r,o){var i=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){uD(e,o),i=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?fx.opacity:a}(r||t.blend!==n.blend)&&(i||(uD(e,o),i=!0),e.globalCompositeOperation=t.blend||fx.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[_D])if(this._disposed)nO(this.id);else{var r,o,i;if(Mf(t)&&(n=t.lazyUpdate,r=t.silent,o=t.replaceMerge,i=t.transition,t=t.notMerge),this[_D]=!0,!this._model||t){var a=new P_(this._api),s=this._theme,l=this._model=new x_;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},aO);var u={seriesTransition:i,optionChanged:!0};if(n)this[MD]={silent:r,updateParams:u},this[_D]=!1,this.getZr().wakeUp();else{try{AD(this),ZD.update.call(this,null,u)}catch(e){throw this[MD]=null,this[_D]=!1,e}this._ssr||this._zr.flush(),this[MD]=null,this[_D]=!1,zD.call(this,r),BD.call(this,r)}}},t.prototype.setTheme=function(){TM()},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||zp.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(zp.svgSupported){var e=this._zr;return ff(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],o=this;ff(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return ff(r,(function(e){e.group.ignore=!1})),i}nO(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,o=Math.max,i=1/0;if(dO[n]){var a=i,s=i,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();ff(cO,(function(i,d){if(i.group===n){var h=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(sf(e)),p=i.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=o(p.right,l),u=o(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}}));var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=Wp.createCanvas(),m=Uy(f,{renderer:t?"svg":"canvas"});if(m.resize({width:h,height:p}),t){var g="";return ff(c,(function(e){var t=e.left-a,n=e.top-s;g+=''+e.dom+""})),m.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Fw({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),ff(c,(function(e){var t=new Rw({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}nO(this.id)},t.prototype.convertToPixel=function(e,t){return FD(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return FD(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return ff(Db(this._model,e),(function(e,r){r.indexOf("Models")>=0&&ff(e,(function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}else 0}),this)}),this),!!n;nO(this.id)},t.prototype.getVisual=function(e,t){var n=Db(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?TI(r,o,t):PI(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;ff(tO,(function(e){var t=function(t){var n,o=r.getModel(),i=t.target;if("globalout"===e?n={}:i&&II(i,(function(e){var t=Jw(e);if(t&&null!=t.dataIndex){var r=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return n=uf({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];0,n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:i,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),ff(oO,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),ff(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(RI("map","selectchanged",t,r,e),RI("pie","selectchanged",t,r,e)):"select"===e.fromAction?(RI("map","selected",t,r,e),RI("pie","selected",t,r,e)):"unselect"===e.fromAction&&(RI("map","unselected",t,r,e),RI("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?nO(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)nO(this.id);else{this._disposed=!0,this.getDom()&&Zb(this.getDom(),fO,"");var e=this,t=e._api,n=e._model;ff(e._componentsViews,(function(e){e.dispose(n,t)})),ff(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete cO[e.id]}},t.prototype.resize=function(e){if(!this[_D])if(this._disposed)nO(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[MD]&&(null==r&&(r=this[MD].silent),n=!0,this[MD]=null),this[_D]=!0;try{n&&AD(this),ZD.update.call(this,{type:"resize",animation:uf({duration:0},e&&e.animation)})}catch(e){throw this[_D]=!1,e}this[_D]=!1,zD.call(this,r),BD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)nO(this.id);else if(Mf(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),uO[e]){var n=uO[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?nO(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=uf({},e);return t.type=oO[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)nO(this.id);else if(Mf(t)||(t={silent:!!t}),rO[e.type]&&this._model)if(this[_D])this._pendingActions.push(e);else{var n=t.silent;ND.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&zp.browser.weChat&&this._throttledZrFlush(),zD.call(this,n),BD.call(this,n)}},t.prototype.updateLabelLayout=function(){xD.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)nO(this.id);else{var t=e.seriesIndex;0,this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(eC(e))return;if(e instanceof Sw&&function(e){var t=rS(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(o){e.stateTransition=a;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&t(e)}}))}AD=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),ED(e,!0),ED(e,!1),t.plan()},ED=function(e,t){for(var n=e._model,r=e._scheduler,o=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;lt.get("hoverLayerThreshold")&&!zp.node&&!zp.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),xD.trigger("series:afterupdate",t,r,s)},KD=function(e){e[TD]=!0,e.getZr().wakeUp()},YD=function(e){e[TD]&&(e.getZr().storage.traverse((function(e){eC(e)||t(e)})),e[TD]=!1)},UD=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Fp(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){TS(t,n),KD(e)},n.prototype.leaveEmphasis=function(t,n){PS(t,n),KD(e)},n.prototype.enterBlur=function(t){RS(t),KD(e)},n.prototype.leaveBlur=function(t){IS(t),KD(e)},n.prototype.enterSelect=function(t){DS(t),KD(e)},n.prototype.leaveSelect=function(t){OS(t),KD(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(S_))(e)},qD=function(e){function t(e,t){for(var n=0;n=0)){SO.push(n);var i=pI.wrapStageHandler(n,o);i.__prio=t,i.__raw=n,e.push(i)}}function kO(e,t){uO[e]=t}var _O=function(e){var t=(e=sf(e)).type;t||PM("");var n=t.split(":");2!==n.length&&PM("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,FM.set(t,e)};wO(SD,UR),wO(CD,KR),wO(CD,YR),wO(SD,_I),wO(CD,MI),wO(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=gD(n,t))}));var o=r.getVisual("decal");if(o)r.getVisual("style").decal=gD(o,t)}}))})),vO(q_),yO(900,(function(e){var t=Wf();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),o=e.getData(),i={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(i)}})),t.each(K_)})),kO("default",(function(e,t){cf(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new $y,r=new Fw({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var o,i=new Qw({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Fw({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new FP({shape:{startAngle:-XR/2,endAngle:-XR/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*XR/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*XR/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),xO({type:sS,event:sS,update:sS},Kf),xO({type:lS,event:lS,update:lS},Kf),xO({type:uS,event:uS,update:uS},Kf),xO({type:cS,event:cS,update:cS},Kf),xO({type:dS,event:dS,update:dS},Kf),gO("light",mI),gO("dark",wI);var MO=[],TO={registerPreprocessor:vO,registerProcessor:yO,registerPostInit:function(e){bO("afterinit",e)},registerPostUpdate:function(e){bO("afterupdate",e)},registerUpdateLifecycle:bO,registerAction:xO,registerCoordinateSystem:function(e,t){__.register(e,t)},registerLayout:function(e,t){CO(sO,e,t,1e3,"layout")},registerVisual:wO,registerTransform:_O,registerLoading:kO,registerMap:function(e,t,n){var r=wD["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){wD[e]=t},PRIORITY:kD,ComponentModel:zk,ComponentView:RT,SeriesModel:TT,ChartView:LR,registerComponentModel:function(e){zk.registerClass(e)},registerComponentView:function(e){RT.registerClass(e)},registerSeriesModel:function(e){TT.registerClass(e)},registerChartView:function(e){LR.registerClass(e)},registerSubTypeDefaulter:function(e,t){zk.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Hy[e]=n}};function PO(e){wf(e)?ff(e,(function(e){PO(e)})):df(MO,e)>=0||(MO.push(e),Sf(e)&&(e={install:e}),e.install(TO))}var RO=Rb(),IO={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},DO=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=EO(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Af(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=lM(this.source),n=!LO(e),r="",o=[],i=0,a=0;i30}function ZO(e,t,n){var r,o,i,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!OO(e.schema)}(t)?(o=t.schema,r=o.dimensions,i=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(ff(r,(function(e,t){Cf(e)&&(r[t]=e={name:e}),h&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,m=0;ff(r,(function(e){e.coordDim===p&&m++}));var g={name:c,coordDim:p,coordDimIndex:m,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:m+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(i&&(g.storeDimIndex=i.ensureCalculationDimension(d,f),v.storeDimIndex=i.ensureCalculationDimension(c,f)),o.appendCalculationDimension(g),o.appendCalculationDimension(v)):(r.push(g),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function FO(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function jO(e,t){return FO(e,t)?e.getCalculationInfo("stackResultDimension"):t}var NO="undefined"!=typeof Float32Array,zO=NO?Float32Array:Array;function BO(e){return wf(e)?NO?new Float32Array(e):e:new zO(e)}var VO="__ec_stack_";function $O(e){return e.get("stack")||VO+e.seriesIndex}function HO(e){return e.dim+e.index}function WO(e,t){var n=[];return t.eachSeriesByType(e,(function(e){KO(e)&&n.push(e)})),n}function GO(e){var t=function(e){var t={};ff(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),o=n.dim+"_"+n.index,i=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}(e),n=[];return ff(e,(function(e){var r,o=e.coordinateSystem.getBaseAxis(),i=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(i[1]-i[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(i[1]-i[0])/d.count()}var h=Yy(e.get("barWidth"),r),p=Yy(e.get("barMaxWidth"),r),f=Yy(e.get("barMinWidth")||(YO(e)?.5:1),r),m=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:m,barCategoryGap:g,axisKey:HO(o),stackId:$O(e)})})),UO(n)}function UO(e){var t={};ff(e,(function(e,n){var r=e.axisKey,o=e.bandWidth,i=t[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=i.stacks;t[r]=i;var s=e.stackId;a[s]||i.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(i.gap=d);var h=e.barCategoryGap;null!=h&&(i.categoryGap=h)}));var n={};return ff(t,(function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=e.categoryGap;if(null==i){var a=yf(r).length;i=Math.max(35-4*a,15)+"%"}var s=Yy(i,o),l=Yy(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),ff(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&tr&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h,p=0;ff(r,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;ff(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}function qO(e,t){var n=WO(e,t),r=GO(n);ff(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=$O(e),i=r[HO(n)][o],a=i.offset,s=i.width;t.setLayout({bandWidth:i.bandWidth,offset:a,size:s})}))}function KO(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function YO(e){return e.pipelineContext&&e.pipelineContext.large}var XO={average:function(e){for(var t=0,n=0,r=0;rt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;nt&&(t=i,n=o)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},QO=function(e){return Math.round(e.length/2)};function JO(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),o=e.get("sampling"),i=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===i.type&&o){var s=i.getBaseAxis(),l=i.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===o&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var p=void 0;Cf(o)?p=XO[o]:Sf(o)&&(p=o),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,QO))}}}}}function eA(e){return null==e?0:e.length||1}function tA(e){return e}const nA=function(){function e(e,t,n,r,o,i){this._old=e,this._new=t,this._oldKeyGetter=n||tA,this._newKeyGetter=r||tA,this.context=o,this._diffModeMultiple="multiple"===i}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var i=0;i1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,i)}else 1===l?(n[a]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],i=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var h=0;h1)for(var a=0;a=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===Wk&&!n.pure)for(var i=[],a=e;a0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return null==o&&(wf(o=this.getVisual(t))?o=o.slice():pA(o)&&(o=uf({},o)),r[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,pA(t)?uf(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){pA(e)?uf(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?uf(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;eS(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){ff(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:fA(this.dimensions,this._getDimInfo,this),this.hostModel)),cA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Sf(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Lf(arguments)))})},e.internalField=(aA=function(e){var t=e._invertedIndicesMap;ff(t,(function(n,r){var o=e._dimInfos[r],i=o.ordinalMeta,a=e._store;if(i){n=t[r]=new mA(i.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[t]=s}})),e}();const bA=yA;function xA(e,t){nM(e)||(e=oM(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],o=Wf(),i=[],a=function(e,t,n,r){var o=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return ff(t,(function(e){var t;Mf(e)&&(t=e.dimsDef)&&(o=Math.max(o,t.length))})),o}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&LO(a),l=r===e.dimensionsDefine,u=l?EO(e):AO(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Wf(c),h=new HM(a),p=0;p0&&(r.name=o+(i-1)),i++,t.set(o,i)}}(i),new DO({source:e,dimensions:i,fullDimensionCount:a,dimensionOmitted:s})}function wA(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var SA=function(e){this.coordSysDims=[],this.axisMap=Wf(),this.categoryAxisMap=Wf(),this.coordSysName=e};var CA={cartesian2d:function(e,t,n,r){var o=e.getReferringComponents("xAxis",Ab).models[0],i=e.getReferringComponents("yAxis",Ab).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",i),kA(o)&&(r.set("x",o),t.firstCategoryDimIndex=0),kA(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var o=e.getReferringComponents("singleAxis",Ab).models[0];t.coordSysDims=["single"],n.set("single",o),kA(o)&&(r.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var o=e.getReferringComponents("polar",Ab).models[0],i=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",a),kA(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),kA(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var o=e.ecModel,i=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=i.dimensions.slice();ff(i.parallelAxisIndex,(function(e,i){var s=o.getComponent("parallelAxis",e),l=a[i];n.set(l,s),kA(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function kA(e){return"category"===e.get("type")}const _A=function(e,t,n){n=n||{};var r,o=t.getSourceManager(),i=!1;e?(i=!0,r=oM(e)):i=(r=o.getSource()).sourceFormat===Wk;var a=function(e){var t=e.get("coordinateSystem"),n=new SA(t),r=CA[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),o=__.get(r);return t&&t.coordSysDims&&(n=mf(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var o=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(o)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=Sf(l)?l:l?xf(r_,s,t):null,c=xA(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i}),d=function(e,t,n){var r,o;return n&&ff(e,(function(e,i){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)})),o||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),h=i?null:o.getSharedDataStore(c),p=ZO(t,{schema:c,store:h}),f=new bA(c,t);f.setCalculationInfo(p);var m=null!=d&&function(e){if(e.sourceFormat===Wk){return!wf(xb(function(e){var t=0;for(;ts){c=(p+u)/2;break}1===h&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),i[n]=e.toGlobalCoord(c)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;i[u]+=s+l/2}return i}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(TT);TT.registerClass(MA);const TA=MA;var PA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.getInitialData=function(){return _A(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=LC(TA.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(TA);const RA=PA;function IA(e,t,n,r,o){var i=e.getArea(),a=i.x,s=i.y,l=i.width,u=i.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new Fw({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var m=Sf(o)?function(e){o(e,d)}:null;JS(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,m)}return d}function DA(e,t,n){var r=e.getArea(),o=Xy(r.r0,1),i=Xy(r.r,1),a=new mP({shape:{cx:Xy(e.cx,1),cy:Xy(e.cy,1),r0:o,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=o,JS(a,{shape:{endAngle:r.endAngle,r:i}},n));return a}function OA(e,t,n,r,o){return e?"polar"===e.type?DA(e,t,n):"cartesian2d"===e.type?IA(e,t,n,r,o):null:null}var AA=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const EA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Fp(t,e),t.prototype.getDefaultShape=function(){return new AA},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r0||0,0),i=Math.max(t.r,0),a=.5*(i-o),s=o+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l=0&&r.push(t[i])}return r.join(" ")}function jA(e,t,n){return t*Math.sin(e)*(n?-1:1)}function NA(e,t,n){return t*Math.cos(e)*(n?1:-1)}function zA(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;wf(r)||(r=[r,r,r,r]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:mf(r,(function(e){return Ry(e,o)}))}}var BA=Math.max,VA=Math.min;var $A=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Fp(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){MR(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var o,i=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?o=u.isHorizontal():"polar"===l.type&&(o="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();0;if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(LA(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var o=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);i.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),v=g.get("borderRadius")||0,y=[],b=this._backgroundEls,x=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t=XA[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?mP:Fw;return new r({shape:oE(t,n,e),silent:!0,z2:0})}(l,o,t);return n.useStyle(g.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=XA[l.type](a,t,n);if(m&&S(t),a.hasValue(t)&&YA[l.type](r)){var s=!1;h&&(s=HA[l.type](p,r));var g=WA[l.type](e,a,t,r,o,c,u.model,!1,f);d&&(g.forceLabelAnimation=!0),JA(g,a,t,n,r,e,o,"polar"===l.type),x?g.attr({shape:r}):d?GA(d,c,g,r,t,o,!1,!1):JS(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),C=XA[l.type](a,t,r);if(m){var k=void 0;0===b.length?k=S(n):((k=b[n]).useStyle(g.getItemStyle()),"cartesian2d"===l.type?k.setShape("r",v):k.setShape("cornerRadius",v),y[t]=k);var _=XA[l.type](a,t);QS(k,{shape:oE(o,_,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&YA[l.type](C)){var T=!1;if(h&&(T=HA[l.type](p,C))&&i.remove(M),M?oC(M):M=WA[l.type](e,a,t,C,o,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),w){var P=M.getTextContent();if(P){var R=vC(P);null!=R.prevValue&&(R.prevValue=R.value)}}else JA(M,a,t,r,C,e,o,"polar"===l.type);x?M.attr({shape:C}):d?GA(d,c,M,C,t,o,!0,w):QS(M,{shape:C},e,t,null),a.setItemGraphicEl(t,M),M.ignore=T,i.add(M)}else i.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&rC(n,e,t)})).execute();var C=this._backgroundGroup||(this._backgroundGroup=new $y);C.removeAll();for(var k=0;ki)return!0;i=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),o=Math.max(0,r[0]),i=Math.min(r[1],n.getOrdinalMeta().categories.length-1);o<=i;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,o=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:o})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){rC(t,e,Jw(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(LR),HA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,i=e.y+e.height,a=BA(t.x,e.x),s=VA(t.x+t.width,o),l=BA(t.y,e.y),u=VA(t.y+t.height,i),c=so?s:a,t.y=d&&l>i?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var o=VA(t.r,e.r),i=BA(t.r0,e.r0);t.r=o,t.r0=i;var a=o-i<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},WA={cartesian2d:function(e,t,n,r,o,i,a,s,l){var u=new Fw({shape:uf({},r),z2:1});(u.__dataIndex=n,u.name="item",i)&&(u.shape[o?"height":"width"]=0);return u},polar:function(e,t,n,r,o,i,a,s,l){var u=!o&&l?EA:mP,c=new u({shape:r,z2:1});c.name="item";var d,h,p=QA(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===EA}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return Iy(e,t,n);var o=d(r),i=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,m=a.endAngle,g=(f+m)/2,v=h?Math.abs(u-c)/2:0,y=Math.cos,b=Math.sin,x=s+u*y(f),w=l+u*b(f),S="left",C="top";switch(o){case"startArc":x=s+(c-i)*y(g),w=l+(c-i)*b(g),S="center",C="top";break;case"insideStartArc":x=s+(c+i)*y(g),w=l+(c+i)*b(g),S="center",C="bottom";break;case"startAngle":x=s+p*y(f)+jA(f,i+v,!1),w=l+p*b(f)+NA(f,i+v,!1),S="right",C="middle";break;case"insideStartAngle":x=s+p*y(f)+jA(f,-i+v,!1),w=l+p*b(f)+NA(f,-i+v,!1),S="left",C="middle";break;case"middle":x=s+p*y(g),w=l+p*b(g),S="center",C="middle";break;case"endArc":x=s+(u+i)*y(g),w=l+(u+i)*b(g),S="center",C="bottom";break;case"insideEndArc":x=s+(u-i)*y(g),w=l+(u-i)*b(g),S="center",C="top";break;case"endAngle":x=s+p*y(m)+jA(m,i+v,!0),w=l+p*b(m)+NA(m,i+v,!0),S="left",C="middle";break;case"insideEndAngle":x=s+p*y(m)+jA(m,-i+v,!0),w=l+p*b(m)+NA(m,-i+v,!0),S="right",C="middle";break;default:return Iy(e,t,n)}return(e=e||{}).x=x,e.y=w,e.align=S,e.verticalAlign=C,e}),i){var f=o?"r":"endAngle",m={};c.shape[f]=o?r.r0:r.startAngle,m[f]=r[f],(s?QS:JS)(c,{shape:m},i)}return c}};function GA(e,t,n,r,o,i,a,s){var l,u;i?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?QS:JS)(n,{shape:l},t,o,null),(a?QS:JS)(n,{shape:u},t?e.baseAxis.model:null,o)}function UA(e,t){for(var n=0;n0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*o/2,y:r.y+a*o/2,width:r.width-i*o,height:r.height-a*o}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function QA(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function JA(e,t,n,r,o,i,a,s){var l=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var u=e.shape;uf(u,zA(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var h=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",p=uC(r);lC(e,p,{labelFetcher:i,labelDataIndex:n,defaultText:ZA(i.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var m=r.get(["label","position"]);e.textConfig.inside="middle"===m||null,function(e,t,n,r){if(_f(r))e.setTextConfig({rotation:r});else if(wf(t))e.setTextConfig({rotation:0});else{var o,i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,s=i.clockwise?i.endAngle:i.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-o;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===m?h:m,QA(a),r.get(["label","rotate"]))}yC(f,p,i.getRawValue(n),(function(e){return FA(t,e)}));var g=r.getModel(["emphasis"]);BS(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),HS(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(o)&&(e.style.fill="none",e.style.stroke="none",ff(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var eE=function(){},tE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Fp(t,e),t.prototype.getDefaultShape=function(){return new eE},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,o=1-this.baseDimIdx,i=[],a=[],s=this.barWidth,l=0;l=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);Jw(this).dataIndex=t>=0?t:null}),30,!1);function oE(e,t,n){if(LA(n,"cartesian2d")){var r=t,o=n.getArea();return{x:e?r.x:o.x,y:e?o.y:r.y,width:e?r.width:o.width,height:e?o.height:r.height}}var i=t;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:e?o.r0:i.r0,r:e?o.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:2*Math.PI}}const iE=$A;var aE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Fp(t,e),t.prototype.getInitialData=function(e){return _A(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new $y,n=$I("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),i="none"===r?"circle":r,a=.8*e.itemHeight,s=$I(i,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?o:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),i.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(TT);const sE=aE;var lE=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.updateData(t,n,r,o),i}return Fp(t,e),t.prototype._createSymbol=function(e,t,n,r,o){this.removeAll();var i=$I(e,-1,-1,2,2,null,o);i.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),i.drift=uE,this._symbolType=e,this.add(i)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){TS(this.childAt(0))},t.prototype.downplay=function(){PS(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,o){this.silent=!1;var i=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=i!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(i,e,n,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):QS(h,d,a,n),oC(h)}if(this._updateCommon(e,n,s,r,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,JS(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,o){var i,a,s,l,u,c,d,h,p,f=this.childAt(0),m=e.hostModel;if(r&&(i=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=g.getModel("emphasis");i=v.getModel("itemStyle").getItemStyle(),s=g.getModel(["select","itemStyle"]).getItemStyle(),a=g.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=uC(g),h=v.getShallow("scale"),p=g.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var b=WI(e.getItemVisual(t,"symbolOffset"),n);b&&(f.x=b[0],f.y=b[1]),p&&f.attr("cursor",p);var x=e.getItemVisual(t,"style"),w=x.fill;if(f instanceof Rw){var S=f.style;f.useStyle(uf({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},x))}else f.__isEmptyBrush?f.useStyle(uf({},x)):f.useStyle(x),f.style.decal=null,f.setColor(w,o&&o.symbolInnerColor),f.style.strokeNoScale=!0;var C=e.getItemVisual(t,"liftZ"),k=this._z2;null!=C?null==k&&(this._z2=f.z2,f.z2+=C):null!=k&&(f.z2=k,this._z2=null);var _=o&&o.useNameLabel;lC(f,d,{labelFetcher:m,labelDataIndex:t,defaultText:function(t){return _?e.getName(t):ZA(e,t)},inheritColor:w,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=i,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;M.scaleX=this._sizeX*T,M.scaleY=this._sizeY*T,this.setSymbolScale(1),BS(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),o=Jw(this).dataIndex,i=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&tC(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:i,cb:function(){r.removeTextContent()}})}else r.removeTextContent();tC(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return HI(e.getItemVisual(t,"symbolSize"))},t}($y);function uE(e,t){this.parent.drift(e,t)}const cE=lE;function dE(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function hE(e){return null==e||Mf(e)||(e={isIgnore:e}),e||{}}function pE(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:uC(t),cursorStyle:t.get("cursor")}}var fE=function(){function e(e){this.group=new $y,this._SymbolCtor=e||cE}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=hE(t);var n=this.group,r=e.hostModel,o=this._data,i=this._SymbolCtor,a=t.disableAnimation,s=pE(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add((function(r){var o=u(r);if(dE(e,o,r,t)){var a=new i(e,r,s,l);a.setPosition(o),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(dE(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==f)n.remove(h),(h=new i(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var g={x:p[0],y:p[1]};a?h.attr(g):QS(h,g,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pE(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=hE(n);for(var o=e.start;o0?n=r[0]:r[1]<0&&(n=r[1]);return n}(o,n),a=r.dim,s=o.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=mf(e.dimensions,(function(e){return t.mapDimension(e)})),h=!1,p=t.getCalculationInfo("stackResultDimension");return FO(t,d[0])&&(h=!0,d[0]=p),FO(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function vE(e,t,n,r){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(o)&&(o=e.valueStart);var i=e.baseDataOffset,a=[];return a[i]=n.get(e.baseDim,r),a[1-i]=o,t.dataToPoint(a)}var yE=Math.min,bE=Math.max;function xE(e,t){return isNaN(e)||isNaN(t)}function wE(e,t,n,r,o,i,a,s,l){for(var u,c,d,h,p,f,m=n,g=0;g=o||m<0)break;if(xE(v,y)){if(l){m+=i;continue}break}if(m===n)e[i>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var b=v-u,x=y-c;if(b*b+x*x<.5){m+=i;continue}if(a>0){for(var w=m+i,S=t[2*w],C=t[2*w+1];S===v&&C===y&&g=r||xE(S,C))p=v,f=y;else{M=S-u,T=C-c;var I=v-u,D=S-v,O=y-c,A=C-y,E=void 0,L=void 0;if("x"===s){var Z=M>0?1:-1;p=v-Z*(E=Math.abs(I))*a,f=y,P=v+Z*(L=Math.abs(D))*a,R=y}else if("y"===s){var F=T>0?1:-1;p=v,f=y-F*(E=Math.abs(O))*a,P=v,R=y+F*(L=Math.abs(A))*a}else E=Math.sqrt(I*I+O*O),p=v-M*a*(1-(_=(L=Math.sqrt(D*D+A*A))/(L+E))),f=y-T*a*(1-_),R=y+T*a*_,P=yE(P=v+M*a*_,bE(S,v)),R=yE(R,bE(C,y)),P=bE(P,yE(S,v)),f=y-(T=(R=bE(R,yE(C,y)))-y)*E/L,p=yE(p=v-(M=P-v)*E/L,bE(u,v)),f=yE(f,bE(c,y)),P=v+(M=v-(p=bE(p,yE(u,v))))*L/E,R=y+(T=y-(f=bE(f,yE(c,y))))*L/E}e.bezierCurveTo(d,h,p,f,v,y),d=P,h=R}else e.lineTo(v,y)}u=v,c=y,m+=i}return g}var SE=function(){this.smooth=0,this.smoothConstraint=!0},CE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Fp(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new SE},t.prototype.buildPath=function(e,t){var n=t.points,r=0,o=n.length/2;if(t.connectNulls){for(;o>0&&xE(n[2*o-2],n[2*o-1]);o--);for(;r=0){var g=a?(c-r)*m+r:(u-n)*m+n;return a?[e,g]:[g,e]}n=u,r=c;break;case i.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var v=a?Bg(n,u,d,p,e,s):Bg(r,c,h,f,e,s);if(v>0)for(var y=0;y=0){g=a?Ng(r,c,h,f,b):Ng(n,u,d,p,b);return a?[e,g]:[g,e]}}n=p,r=f}}},t}(Sw),kE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t}(SE),_E=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Fp(t,e),t.prototype.getDefaultShape=function(){return new kE},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,o=0,i=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;i>0&&xE(n[2*i-2],n[2*i-1]);i--);for(;o=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){i=r[a];break}}if(i){var l=t.getAxis(o),u=mf(i.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=function(e,t){var n,r,o=[],i=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:yv((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;st){r?o.push(a(r,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),r=l}}return o}(u,"x"===o?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,m=h[p-1].coord+10,g=m-f;if(g<.001)return"transparent";ff(h,(function(e){e.offset=(e.coord-f)/g})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new BP(0,0,0,0,h,!0);return v[o]=f,v[o+"2"]=m,v}}}function OE(e,t,n){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var i=n.getAxesByScale("ordinal")[0];if(i&&(!o||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var o=t.count(),i=Math.max(1,Math.round(o/5)),a=0;ar)return!1;return!0}(i,t))){var a=t.mapDimension(i.dim),s={};return ff(i.getViewLabels(),(function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function AE(e,t){return[e[2*t],e[2*t+1]]}function EE(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);Jw(p).seriesIndex=e.seriesIndex,BS(p,I,D,O);var A=RE(e.get("smooth")),E=e.get("smoothMonotone");if(p.setShape({smooth:A,smoothMonotone:E,connectNulls:S}),f){var L=a.getCalculationInfo("stackedOnSeries"),Z=0;f.useStyle(cf(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(Z=RE(L.get("smooth"))),f.setShape({smooth:A,stackedOnSmooth:Z,smoothMonotone:E,connectNulls:S}),HS(f,e,"areaStyle"),Jw(f).seriesIndex=e.seriesIndex,BS(f,I,D,O)}var F=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=F)})),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=o,this._stackedOnPoints=x,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){Jw(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var o=e.getData(),i=Pb(o,r);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(i);if(!s){var l=a[2*i],u=a[2*i+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new cE(o,i)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else LR.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var o=e.getData(),i=Pb(o,r);if(this._changePolyState("normal"),null!=i&&i>=0){var a=o.getItemGraphicEl(i);a&&(a.__temp?(o.setItemGraphicEl(i,null),this.group.remove(a)):a.downplay())}else LR.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;SS(this._polyline,e),t&&SS(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new CE({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new _E({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,o,i=t.getBaseAxis(),a=i.inverse;"cartesian2d"===t.type?(r=i.isHorizontal(),o=!1):"polar"===t.type&&(r="angle"===i.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");Sf(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Sf(u)?u(null):u;e.eachItemGraphicEl((function(e,i){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var m=n,g=t.pointToCoord(d);r?(h=m.startAngle,p=m.endAngle,f=-g[1]/180*Math.PI):(h=m.r0,p=m.r,f=g[0])}else{var v=n;r?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var b=Sf(u)?u(i):l*y+c,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:b}),x.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(EE(e)){var o=e.getData(),i=this._polyline,a=o.getLayout("points");if(!a)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Qw({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(lC(i,uC(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?FA(o,n):ZA(o,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,i=r?o?"right":"left":"center",a=r?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,o,i,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=i.get("precision"),p=i.get("distance")||0,f=a.getBaseAxis(),m=f.isHorizontal(),g=f.inverse,v=t.shape,y=g?m?v.x:v.y+v.height:m?v.x+v.width:v.y,b=(m?p:0)*(g?-1:1),x=(m?0:-p)*(g?-1:1),w=m?"x":"y",S=function(e,t,n){for(var r,o,i=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||r>=t&&o<=t){l=u;break}s=u,r=o}else r=o;return{range:[s,l],t:(t-r)/(o-r)}}(u,y,w),C=S.range,k=C[1]-C[0],_=void 0;if(k>=1){if(k>1&&!d){var M=AE(u,C[0]);s.attr({x:M[0]+b,y:M[1]+x}),o&&(_=c.getRawValue(C[0]))}else{(M=l.getPointOn(y,w))&&s.attr({x:M[0]+b,y:M[1]+x});var T=c.getRawValue(C[0]),P=c.getRawValue(C[1]);o&&(_=Fb(n,h,T,P,S.t))}r.lastFrameIndex=C[0]}else{var R=1===e||r.lastFrameIndex>0?C[0]:0;M=AE(u,R);o&&(_=c.getRawValue(R)),s.attr({x:M[0]+b,y:M[1]+x})}if(o){var I=vC(s);"function"==typeof I.setLabelText&&I.setLabelText(_)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,o,i,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,o,i,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],h=[],p=[],f=[],m=gE(o,t,a),g=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y3e3||l&&PE(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var m={shape:{points:p}};c.current!==d&&(m.shape.__points=c.next),s.stopAnimation(),QS(s,m,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),QS(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],v=c.status,y=0;y=o/3?1:2),l=t.y-r(a)*i*(i>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*i,t.y+r(a)*i),e.lineTo(t.x+n(t.angle)*o,t.y+r(t.angle)*o),e.lineTo(t.x-n(a)*i,t.y-r(a)*i),e.lineTo(s,l)},t}(Sw);function BE(e,t){var n=null==e?"":e+"";return t&&(Cf(t)?n=t.replace("{value}",n):Sf(t)&&(n=t(e))),n}var VE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),o=function(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o);return{cx:Yy(n[0],t.getWidth()),cy:Yy(n[1],t.getHeight()),r:Yy(e.get("radius"),i/2)}}(e,n);this._renderMain(e,t,n,r,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,o){var i=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?EA:mP,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];ew(f,!a);for(var m=(l=f[1])-(s=f[0]),g=s,v=[],y=0;d&&y=e&&(0===t?0:r[t-1][0])Math.PI/2&&(j+=Math.PI):"tangential"===F?j=-k-Math.PI/2:_f(F)&&(j=F*Math.PI/180),0===j?d.add(new Qw({style:cC(b,{text:A,x:L,y:Z,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):d.add(new Qw({style:cC(b,{text:A,x:L,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:L,originY:Z,rotation:j}))}if(y.get("show")&&I!==x){O=(O=y.get("distance"))?O+l:l;for(var N=0;N<=w;N++){u=Math.cos(k),c=Math.sin(k);var z=new RP({shape:{x1:u*(f-O)+h,y1:c*(f-O)+p,x2:u*(f-C-O)+h,y2:c*(f-C-O)+p},silent:!0,style:P});"auto"===P.stroke&&z.setStyle({stroke:r((I+N/w)/x)}),d.add(z),k+=M}k-=M}else k+=_}},t.prototype._renderPointer=function(e,t,n,r,o,i,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),m=f.get("show"),g=e.getData(),v=g.mapDimension("value"),y=+e.get("min"),b=+e.get("max"),x=[y,b],w=[i,a];function S(t,n){var r,i=g.getItemModel(t).getModel("pointer"),a=Yy(i.get("width"),o.r),s=Yy(i.get("length"),o.r),l=e.get(["pointer","icon"]),u=i.get("offsetCenter"),c=Yy(u[0],o.r),d=Yy(u[1],o.r),h=i.get("keepAspect");return(r=l?$I(l,c-a/2,d-s,a,s,null,h):new zE({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function C(e,t){var n=f.get("roundCap")?EA:mP,r=f.get("overlap"),a=r?f.get("width"):l/g.count(),u=r?o.r-a:o.r-(e+1)*a,c=r?o.r:o.r-e*a,d=new n({shape:{startAngle:i,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=b-g.get(v,e)%b),d}(m||p)&&(g.diff(c).add((function(t){var n=g.get(v,t);if(p){var r=S(t,i);JS(r,{rotation:-((isNaN(+n)?w[0]:Ky(n,x,w,!0))+Math.PI/2)},e),u.add(r),g.setItemGraphicEl(t,r)}if(m){var o=C(t,i),a=f.get("clip");JS(o,{shape:{endAngle:Ky(n,x,w,a)}},e),u.add(o),eS(e.seriesIndex,g.dataType,t,o),h[t]=o}})).update((function(t,n){var r=g.get(v,t);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:i,s=S(t,a);s.rotation=a,QS(s,{rotation:-((isNaN(+r)?w[0]:Ky(r,x,w,!0))+Math.PI/2)},e),u.add(s),g.setItemGraphicEl(t,s)}if(m){var l=d[n],y=C(t,l?l.shape.endAngle:i),b=f.get("clip");QS(y,{shape:{endAngle:Ky(r,x,w,b)}},e),u.add(y),eS(e.seriesIndex,g.dataType,t,y),h[t]=y}})).execute(),g.each((function(e){var t=g.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),i=n.get("blurScope"),a=n.get("disabled");if(p){var s=g.getItemGraphicEl(e),l=g.getItemVisual(e,"style"),u=l.fill;if(s instanceof Rw){var c=s.style;s.useStyle(uf({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(Ky(g.get(v,e),x,[0,1],!0))),s.z2EmphasisLift=0,HS(s,t),BS(s,o,i,a)}if(m){var d=h[e];d.useStyle(g.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,HS(d,t),BS(d,o,i,a)}})),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),i=n.get("offsetCenter"),a=n.get("keepAspect"),s=$I(o,t.cx-r/2+Yy(i[0],t.r),t.cy-r/2+Yy(i[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,o){var i=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new $y,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new Qw({silent:!0}),h[e]=new Qw({silent:!0})})).update((function(e,t){d[e]=i._titleEls[t],h[e]=i._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),i=a.get(s,t),m=new $y,g=r(Ky(i,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=o.cx+Yy(y[0],o.r),x=o.cy+Yy(y[1],o.r);(P=d[t]).attr({z2:f?0:2,style:cC(v,{x:b,y:x,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),m.add(P)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),C=o.cx+Yy(S[0],o.r),k=o.cy+Yy(S[1],o.r),_=Yy(w.get("width"),o.r),M=Yy(w.get("height"),o.r),T=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:g,P=h[t],R=w.get("formatter");P.attr({z2:f?0:2,style:cC(w,{x:C,y:k,text:BE(i,R),width:isNaN(_)?null:_,height:isNaN(M)?null:M,align:"center",verticalAlign:"middle"},{inheritColor:T})}),yC(P,{normal:w},i,(function(e){return BE(e,R)})),p&&function(e,t,n,r,o){var i=vC(e);if(i.valueAnimation&&i.prevValue!==i.value){var a=i.defaultInterpolatedText,s=Af(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?JS:QS)(e,{percent:1},r,t,null,(function(r){var u=Fb(n,i.precision,s,l,r);i.interpolatedValue=1===r?null:u;var c=sC({labelDataIndex:t,labelFetcher:o,defaultText:a?a(u):u+""},i.statesModels,u);aC(e,c)}))}}(P,t,a,e,{getFormattedLabel:function(e,t,n,r,o,a){return BE(a?a.interpolatedValue:i,R)}}),m.add(P)}c.add(m)})),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(LR);const $E=VE;function HE(e,t,n){t=wf(t)&&{coordDimensions:t}||uf({encodeDefine:e.getEncode()},t);var r=e.getSource(),o=xA(r,t).dimensions,i=new bA(o,e);return i.initData(r,n),i}var WE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Fp(t,e),t.prototype.getInitialData=function(e,t){return HE(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(TT);const GE=WE;var UE=2*Math.PI,qE=Math.PI/180;function KE(e,t){return Ak(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function YE(e,t){var n=KE(e,t),r=e.get("center"),o=e.get("radius");wf(o)||(o=[0,o]);var i,a,s=Yy(n.width,t.getWidth()),l=Yy(n.height,t.getHeight()),u=Math.min(s,l),c=Yy(o[0],u/2),d=Yy(o[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(r);i=p[0]||0,a=p[1]||0}else wf(r)||(r=[r,r]),i=Yy(r[0],s)+n.x,a=Yy(r[1],l)+n.y;return{cx:i,cy:a,r0:c,r:d}}function XE(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),o=KE(e,n),i=YE(e,n),a=i.cx,s=i.cy,l=i.r,u=i.r0,c=-e.get("startAngle")*qE,d=e.get("endAngle"),h=e.get("padAngle")*qE;d="auto"===d?c-UE:-d*qE;var p=e.get("minAngle")*qE+h,f=0;t.each(r,(function(e){!isNaN(e)&&f++}));var m=t.getSum(r),g=Math.PI/(m||f)*2,v=e.get("clockwise"),y=e.get("roseType"),b=e.get("stillShowZeroSum"),x=t.getDataExtent(r);x[0]=0;var w=v?1:-1,S=[c,d],C=w*h/2;ew(S,!v),c=S[0],d=S[1];var k=Math.abs(d-c),_=k,M=0,T=c;if(t.setLayout({viewRect:o,r:l}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(r="area"!==y?0===m&&b?g:e*g:k/f)r?c=i=T+w*r/2:(i=T+C,c=o-C),t.setItemLayout(n,{angle:r,startAngle:i,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?Ky(e,x,[u,l]):l}),T=o}})),_0){t=t/180*Math.PI,JE.fromArray(e[0]),eL.fromArray(e[1]),tL.fromArray(e[2]),Um.sub(nL,JE,eL),Um.sub(rL,tL,eL);var n=nL.len(),r=rL.len();if(!(n<.001||r<.001)){nL.scale(1/n),rL.scale(1/r);var o=nL.dot(rL);if(Math.cos(t)1&&Um.copy(iL,tL),iL.toArray(e[1])}}}}function sL(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,JE.fromArray(e[0]),eL.fromArray(e[1]),tL.fromArray(e[2]),Um.sub(nL,eL,JE),Um.sub(rL,tL,eL);var r=nL.len(),o=rL.len();if(!(r<.001||o<.001))if(nL.scale(1/r),rL.scale(1/o),nL.dot(t)=a)Um.copy(iL,tL);else{iL.scaleAndAdd(rL,i/Math.tan(Math.PI/2-s));var l=tL.x!==eL.x?(iL.x-eL.x)/(tL.x-eL.x):(iL.y-eL.y)/(tL.y-eL.y);if(isNaN(l))return;l<0?Um.copy(iL,eL):l>1&&Um.copy(iL,tL)}iL.toArray(e[1])}}}function lL(e,t,n,r){var o="normal"===n,i=o?e:e.ensureState(n);i.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();o?e.useStyle(s):i.style=s}function uL(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var o=lm(r[0],r[1]),i=lm(r[1],r[2]);if(!o||!i)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(o,i)*n,s=cm([],r[1],r[0],a/o),l=cm([],r[1],r[2],a/i),u=cm([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c0&&i&&S(-d/a,0,a);var g,v,y=e[0],b=e[a-1];return x(),g<0&&C(-g,.8),v<0&&C(v,.8),x(),w(g,v,1),w(v,g,-1),x(),g<0&&k(-g),v<0&&k(v),u}function x(){g=y.rect[t]-r,v=o-b.rect[t]-b.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var o=r+e;o<0&&C(-o*n,1)}else C(-e*n,1)}}function S(n,r,o){0!==n&&(u=!0);for(var i=r;i0)for(l=0;l0;l--){S(-(i[l-1]*d),l,a)}}}function k(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),(e-=n)<=0)return}}var dL=Math.PI/180;function hL(e,t,n,r,o,i,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;dn?a:i,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*o,h=r+l.len,f=Math.abs(d)e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var m=r.getBoundingRect();i.width=m.width;var g=(r.style.margin||0)+2.1;i.height=m.height+g,i.y-=(i.height-d)/2}}}function fL(e){return"center"===e.position}function mL(e){var t,n,r=e.getData(),o=[],i=!1,a=(e.get("minShowLabelAngle")||0)*dL,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each((function(e){var s=r.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),m=r.getItemModel(e),g=m.getModel("label"),v=g.get("position")||m.get(["emphasis","label","position"]),y=g.get("distanceToLabelLine"),b=g.get("alignTo"),x=Yy(g.get("edgeDistance"),u),w=g.get("bleedMargin"),S=m.getModel("labelLine"),C=S.get("length");C=Yy(C,u);var k=S.get("length2");if(k=Yy(k,u),Math.abs(d.endAngle-d.startAngle)0?"right":"left":I>0?"left":"right"}var j=Math.PI,N=0,z=g.get("rotate");if(_f(z))N=z*(j/180);else if("center"===v)N=0;else if("radial"===z||!0===z){N=I<0?-R+j:-R}else if("tangential"===z&&"outside"!==v&&"outer"!==v){var B=Math.atan2(I,D);B<0&&(B=2*j+B),D>0&&(B=j+B),N=B-j}if(i=!!N,h.x=_,h.y=M,h.rotation=N,h.setStyle({verticalAlign:"middle"}),O){h.setStyle({align:P});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var $=h.getBoundingRect().clone();$.applyTransform(h.getComputedTransform());var H=(h.style.margin||0)+2.1;$.y-=H/2,$.height+=H,o.push({label:h,labelLine:f,position:v,len:C,len2:k,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Um(I,D),linePoints:T,textAlign:P,labelDistance:y,labelAlignTo:b,edgeDistance:x,bleedMargin:w,rect:$,unconstrainedWidth:$.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:O})}})),!i&&e.get("avoidLabelOverlap")&&function(e,t,n,r,o,i,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h0){for(var l=i.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},t.type="pie",t}(LR);const yL=vL;const bL=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}();var xL=Rb(),wL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new bL(bf(this.getData,this),bf(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return HE(this,{coordDimensions:["value"],encodeDefaulter:xf(o_,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=xL(n),o=r.seats;if(!o){var i=[];n.each(n.mapDimension("value"),(function(e){i.push(e)})),o=r.seats=tb(i,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=o[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){yb(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(TT);const SL=wL;var CL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Fp(t,e),t.prototype.getInitialData=function(e,t){return _A(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(TT);const kL=CL;var _L=function(){},ML=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Fp(t,e),t.prototype.getDefaultShape=function(){return new _L},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,o=t.size,i=this.symbolProxy,a=i.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=r[l]-i/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+i&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,o=r[0],i=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();var PL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var o=jE("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new TL:new mE,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(LR);const RL=PL;var IL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(zk);const DL=IL;var OL=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),AL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ab).models[0]},t.type="cartesian2dAxis",t}(zk);hf(AL,OL);var EL={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},LL=lf({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},EL),ZL=lf({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},EL);const FL={category:LL,value:ZL,time:lf({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ZL),log:cf({logBase:10},ZL)};var jL=0;function NL(e){return Mf(e)&&null!=e.value?e.value:e+""}const zL=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++jL}return e.createByAxisModel=function(t){var n=t.option,r=n.data,o=r&&mf(r,NL);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Cf(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Wf(this.categories))},e}();var BL={value:1,category:1,time:1,log:1};function VL(e,t,n,r){ff(BL,(function(o,i){var a=lf(lf({},FL[i],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+i,n}return Fp(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=Lk(this),r=n?Fk(e):{};lf(e,t.getTheme().get(i+"Axis")),lf(e,this.getDefaultOption()),e.type=$L(e),n&&Zk(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=zL.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+i,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",$L)}function $L(e){return e.type||(e.data?"category":"value")}var HL=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Gb(HL);const WL=HL;function GL(e){return"interval"===e.type||"log"===e.type}function UL(e,t,n,r){var o={},i=e[1]-e[0],a=o.interval=lb(i/t,!0);null!=n&&ar&&(a=o.interval=r);var s=o.intervalPrecision=KL(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),YL(e,0,t),YL(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(o.niceTickExtent=[Xy(Math.ceil(e[0]/a)*a,s),Xy(Math.floor(e[1]/a)*a,s)],e),o}function qL(e){var t=Math.pow(10,sb(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Xy(n*t)}function KL(e){return Jy(e)+2}function YL(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function XL(e,t){return e>=t[0]&&e<=t[1]}function QL(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function JL(e,t){return e*(t[1]-t[0])+t[0]}var eZ=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new zL({})),wf(r)&&(r=new zL({categories:mf(r,(function(e){return Mf(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Fp(t,e),t.prototype.parse=function(e){return null==e?NaN:Cf(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return XL(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return QL(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(JL(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,i=this._ordinalMeta.categories.length,a=Math.min(i,t.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(WL);WL.registerClass(eZ);const tZ=eZ;var nZ=Xy,rZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return Fp(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return XL(e,this._extent)},t.prototype.normalize=function(e){return QL(e,this._extent)},t.prototype.scale=function(e){return JL(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=KL(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,i=[];if(!t)return i;n[0]1e4)return[];var s=i.length?i[i.length-1].value:r[1];return n[1]>s&&(e?i.push({value:nZ(s+t,o)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),o=1;or[0]&&c0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||a.none}if(wf(i)){var c=null==e.level?0:e.level>=0?e.level:i.length+e.level;i=i[c=Math.min(c,i.length-1)]}}return nk(new Date(e.value),i,o,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),o=function(e,t,n,r){var o=1e4,i=QC,a=0;function s(e,t,n,o,i,a,s){for(var l=new Date(t),u=t,c=l[o]();u1&&0===u&&i.unshift({value:i[0].value-h})}}for(u=0;u=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(m),d>y||e===i[p])break}c=[]}}0;var b=vf(mf(u,(function(e){return vf(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],w=b.length-1;for(p=0;pn&&(this._approxInterval=n);var i=aZ.length,a=Math.min(function(e,t,n,r){for(;n>>1;e[o][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function lZ(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function uZ(e){return(e/=WC)>12?12:e>6?6:e>3.5?4:e>2?2:1}function cZ(e,t){return(e/=t?HC:$C)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function dZ(e){return lb(e,!0)}function hZ(e,t,n){var r=new Date(e);switch(ek(t)){case"year":case"month":r[pk(n)](0);case"day":r[fk(n)](1);case"hour":r[mk(n)](0);case"minute":r[gk(n)](0);case"second":r[vk(n)](0),r[yk(n)](0)}return r.getTime()}WL.registerClass(iZ);const pZ=iZ;var fZ=WL.prototype,mZ=oZ.prototype,gZ=Xy,vZ=Math.floor,yZ=Math.ceil,bZ=Math.pow,xZ=Math.log,wZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new oZ,t._interval=0,t}return Fp(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return mf(mZ.getTicks.call(this,e),(function(e){var t=e.value,o=Xy(bZ(this.base,t));return o=t===n[0]&&this._fixMin?CZ(o,r[0]):o,{value:o=t===n[1]&&this._fixMax?CZ(o,r[1]):o}}),this)},t.prototype.setExtent=function(e,t){var n=xZ(this.base);e=xZ(Math.max(0,e))/n,t=xZ(Math.max(0,t))/n,mZ.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=fZ.getExtent.call(this);t[0]=bZ(e,t[0]),t[1]=bZ(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=CZ(t[0],n[0])),this._fixMax&&(t[1]=CZ(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=xZ(e[0])/xZ(t),e[1]=xZ(e[1])/xZ(t),fZ.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,o=(r=n,Math.pow(10,sb(r)));for(e/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var i=[Xy(yZ(t[0]/o)*o),Xy(vZ(t[1]/o)*o)];this._interval=o,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){mZ.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return XL(e=xZ(e)/xZ(this.base),this._extent)},t.prototype.normalize=function(e){return QL(e=xZ(e)/xZ(this.base),this._extent)},t.prototype.scale=function(e){return e=JL(e,this._extent),bZ(this.base,e)},t.type="log",t}(WL),SZ=wZ.prototype;function CZ(e,t){return gZ(e,Jy(t))}SZ.getMinorTicks=mZ.getMinorTicks,SZ.getLabel=mZ.getLabel,WL.registerClass(wZ);const kZ=wZ;var _Z=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[TZ[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[MZ[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),MZ={min:"_determinedMin",max:"_determinedMax"},TZ={min:"_dataMin",max:"_dataMax"};function PZ(e,t,n){var r=e.rawExtentInfo;return r||(r=new _Z(e,t,n),e.rawExtentInfo=r,r)}function RZ(e,t){return null==t?null:Df(t)?NaN:e.parse(t)}function IZ(e,t){var n=e.type,r=PZ(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var o=r.min,i=r.max,a=t.ecModel;if(a&&"time"===n){var s=WO("bar",a),l=!1;if(ff(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=GO(s),c=function(e,t,n,r){var o=n.axis.getExtent(),i=o[1]-o[0],a=function(e,t,n){if(e&&t){var r=e[HO(t)];return null!=r&&null!=n?r[$O(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;ff(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;ff(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/i)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(o,i,t,u);o=c.min,i=c.max}}return{extent:[o,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function DZ(e,t){var n=t,r=IZ(e,n),o=r.extent,i=n.get("splitNumber");e instanceof kZ&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function OZ(e){var t,n,r=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):Cf(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):Sf(r)?(t=r,function(n,r){return null!=o&&(r=n.value-o),t(AZ(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function AZ(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function EZ(e){var t=e.get("interval");return null==t?"auto":t}function LZ(e){return"category"===e.type&&0===EZ(e.getLabelModel())}function ZZ(e,t){var n={};return ff(e.mapDimensionsAll(t),(function(t){n[jO(e,t)]=!0})),yf(n)}var FZ=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return mf(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),vf(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}();var jZ=["x","y"];function NZ(e){return"interval"===e.type||"time"===e.type}var zZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=jZ,t}return Fp(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(NZ(e)&&NZ(t)){var n=e.getExtent(),r=t.getExtent(),o=this.dataToPoint([n[0],r[0]]),i=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(i[0]-o[0])/a,u=(i[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-r[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Gm([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),o=this.getArea(),i=new rg(n[0],n[1],r[0]-n[0],r[1]-n[1]);return o.intersect(i)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],o=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=o&&isFinite(o))return dm(n,e,this._transform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.toGlobalCoord(i.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,o=n.getExtent(),i=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return dm(n,e,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,i=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-o+e;return new rg(r,o,i,a)},t}(FZ);const BZ=zZ;var VZ=Rb();function $Z(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=WZ(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=OZ(e);return{labels:mf(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function HZ(e,t){return"category"===e.type?function(e,t){var n,r,o=GZ(e,"ticks"),i=EZ(t),a=UZ(o,i);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Sf(i))n=YZ(e,i,!0);else if("auto"===i){var s=WZ(e,e.getLabelModel());r=s.labelCategoryInterval,n=mf(s.labels,(function(e){return e.tickValue}))}else n=KZ(e,r=i,!0);return qZ(o,i,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:mf(e.scale.getTicks(),(function(e){return e.value}))}}function WZ(e,t){var n,r,o=GZ(e,"labels"),i=EZ(t),a=UZ(o,i);return a||(Sf(i)?n=YZ(e,i):(r="auto"===i?function(e){var t=VZ(e).autoInterval;return null!=t?t:VZ(e).autoInterval=e.calculateCategoryInterval()}(e):i,n=KZ(e,r)),qZ(o,i,{labels:n,labelCategoryInterval:r}))}function GZ(e,t){return VZ(e)[t]||(VZ(e)[t]=[])}function UZ(e,t){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=LZ(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==i[0]&&m(i[0]);for(var f=u;f<=i[1];f+=l)m(f);function m(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:e})}return p&&f-l!==i[1]&&m(i[1]),s}function YZ(e,t,n){var r=e.scale,o=OZ(e),i=[];return ff(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&i.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})})),i}var XZ=[0,1];function QZ(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}const JZ=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=o||"value",a.position=i||"bottom",a}return Fp(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return eb(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&QZ(n=n.slice(),r.count()),Ky(e,XZ,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&QZ(n=n.slice(),r.count());var o=Ky(e,n,XZ,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=mf(HZ(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var o=t.length;if(!e.onBand||n||!o)return;var i,a,s=e.getExtent();if(1===o)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[o-1].tickValue-t[0].tickValue,u=(t[o-1].coord-t[0].coord)/l;ff(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[o-1].tickValue,i={coord:t[o-1].coord+u*a},t.push(i)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],i.coord)&&(r?i.coord=s[1]:t.pop());r&&d(i.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Xy(e),t=Xy(t),c?e>t:e0&&e<100||(e=5),mf(this.scale.getMinorTicks(e),(function(e){return mf(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return $Z(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=OZ(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,i=o.getExtent(),a=o.count();if(i[1]-i[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=i[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),h=0,p=0;l<=i[1];l+=s){var f,m,g=_y(n({value:l}),t.font,"center","top");f=1.3*g.width,m=1.3*g.height,h=Math.max(h,f,7),p=Math.max(p,m,7)}var v=h/c,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(v,y))),x=VZ(e.model),w=e.getExtent(),S=x.lastAutoInterval,C=x.lastTickCount;return null!=S&&null!=C&&Math.abs(S-b)<=1&&Math.abs(C-a)<=1&&S>b&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?b=S:(x.lastTickCount=a,x.lastAutoInterval=b,x.axisExtent0=w[0],x.axisExtent1=w[1]),b}(this)},e}());function eF(e,t,n){n=n||{};var r=e.coordinateSystem,o=t.axis,i={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var m=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(m,f[1]),f[0])}i.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],i.rotation=Math.PI/2*("x"===u?0:1);i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],i.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Of(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var g=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-g:g,i.z2=1,i}function tF(e){return"cartesian2d"===e.get("coordinateSystem")}function nF(e){var t={xAxisModel:null,yAxisModel:null};return ff(t,(function(n,r){var o=r.replace(/Model$/,""),i=e.getReferringComponents(o,Ab).models[0];t[r]=i})),t}var rF=Math.log;var oF=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=jZ,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=yf(e),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var a=e[+n[i]],s=a.model,l=a.scale;GL(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(DZ(l,s),GL(l)&&(t=a))}o.length&&(t||DZ((t=o.pop()).scale,t.model),ff(o,(function(e){!function(e,t,n){var r=oZ.prototype,o=r.getTicks.call(n),i=r.getTicks.call(n,!0),a=o.length-1,s=r.getInterval.call(n),l=IZ(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=rF(e.base);u=[rF(u[0])/h,rF(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=r.getInterval.call(e),m=u[0],g=u[1];if(c&&d)f=(g-m)/a;else if(c)for(g=u[0]+f*a;gu[0]&&isFinite(m)&&isFinite(u[0]);)f=qL(f),m=u[1]-f*a;else{e.getTicks().length-1>a&&(f=qL(f));var v=f*a;(m=Xy((g=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(m=0,g=Xy(v)):g>0&&u[1]<=0&&(g=0,m=-Xy(v))}var y=(o[0].value-i[0].value)/s,b=(o[a].value-i[a].value)/s;r.setExtent.call(e,m+f*y,g+f*b),r.setInterval.call(e,f),(y||b)&&r.setNiceExtent.call(e,m+f,g-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var o={};ff(n.x,(function(e){aF(n,"y",e,o)})),ff(n.y,(function(e){aF(n,"x",e,o)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),i=Ak(r,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function s(){ff(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?i.x:i.y)}))}s(),o&&(ff(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,o,i=n.getExtent();o=n instanceof tZ?n.count():(r=n.getTicks()).length;var a,s,l,u,c,d,h,p=e.getLabelModel(),f=OZ(e),m=1;o>40&&(m=Math.ceil(o/40));for(var g=0;g0&&r>0||n<0&&r<0)}(e)}const lF=oF;var uF=Math.PI,cF=function(){function e(e,t){this.group=new $y,this.opt=t,this.axisModel=e,cf(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new $y({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!dF[e]},e.prototype.add=function(e){dF[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,o,i=rb(t-e);return ob(i)?(o=n>0?"top":"bottom",r="center"):ob(i-uF)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=i>0&&i0?"right":"left":n>0?"left":"right"),{rotation:i,textAlign:r,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),dF={axisLine:function(e,t,n,r){var o=t.get(["axisLine","show"]);if("auto"===o&&e.handleAutoShown&&(o=e.handleAutoShown("axisLine")),o){var i=t.axis.getExtent(),a=r.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];a&&(dm(s,s,a),dm(l,l,a));var c=uf({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new RP({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});cR(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);Cf(h)&&(h=[h,h]),(Cf(p)||_f(p))&&(p=[p,p]);var f=WI(t.get(["axisLine","symbolOffset"])||0,p),m=p[0],g=p[1];ff([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==h[r]&&null!=h[r]){var o=$I(h[r],-m/2,-g/2,m,g,c.stroke,!0),i=t.r+t.offset,a=u?l:s;o.attr({rotation:t.rotate,x:a[0]+i*Math.cos(e.rotation),y:a[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(e,t,n,r){var o=function(e,t,n,r){var o=n.axis,i=n.getModel("axisTick"),a=i.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=mF(o.getTicksCoords(),t.transform,l,cf(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cd[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,fF(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*uF/180),fF(s)?i=cF.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=function(e,t,n,r){var o,i,a=rb(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;ob(a-uF/2)?(i=l?"bottom":"top",o="center"):ob(a-1.5*uF)?(i=l?"top":"bottom",o="center"):(i="middle",o=a<1.5*uF&&a>uF/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:i}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var m=u.getFont(),g=t.get("nameTruncate",!0)||{},v=g.ellipsis,y=Of(e.nameTruncateMaxWidth,g.maxWidth,a),b=new Qw({x:p[0],y:p[1],rotation:i.rotation,silent:cF.isLabelSilent(t),style:cC(u,{text:o,font:m,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||i.textAlign,verticalAlign:u.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(kR({el:b,componentModel:t,itemName:o}),b.__fullText=o,b.anid="name",t.get("triggerEvent")){var x=cF.makeAxisEventDataBase(t);x.targetType="axisName",x.name=o,Jw(b).eventData=x}r.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function hF(e){e&&(e.ignore=!0)}function pF(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var o=Bm([]);return Wm(o,o,-e.rotation),n.applyTransform($m([],o,e.getLocalTransform())),r.applyTransform($m([],o,t.getLocalTransform())),n.intersect(r)}}function fF(e){return"middle"===e||"center"===e}function mF(e,t,n,r,o){for(var i=[],a=[],s=[],l=0;l=0||e===t}function bF(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[wF(e)]}function xF(e){return!!e.get(["handle","show"])}function wF(e){return e.type+"||"+e.id}var SF={},CF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(t,n,r,o){this.axisPointerClass&&function(e){var t=bF(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,o=n.option,i=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=xF(n);null==i&&(o.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=0,i=e.fill||"#000";GF(r,t);var a=null==r.textFill;return o?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=i),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,ff(t.rich,(function(e){GF(e,e)})),r}function GF(e,t){t&&(qf(t,"fill")&&(e.textFill=t.fill),qf(t,"stroke")&&(e.textStroke=t.fill),qf(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),qf(t,"font")&&(e.font=t.font),qf(t,"fontStyle")&&(e.fontStyle=t.fontStyle),qf(t,"fontWeight")&&(e.fontWeight=t.fontWeight),qf(t,"fontSize")&&(e.fontSize=t.fontSize),qf(t,"fontFamily")&&(e.fontFamily=t.fontFamily),qf(t,"align")&&(e.textAlign=t.align),qf(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),qf(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),qf(t,"width")&&(e.textWidth=t.width),qf(t,"height")&&(e.textHeight=t.height),qf(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),qf(t,"padding")&&(e.textPadding=t.padding),qf(t,"borderColor")&&(e.textBorderColor=t.borderColor),qf(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),qf(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),qf(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),qf(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),qf(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),qf(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),qf(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),qf(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),qf(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),qf(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var UF={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},qF=yf(UF),KF=(gf(xy,(function(e,t){return e[t]=1,e}),{}),xy.join(", "),["","style","shape","extra"]),YF=Rb();function XF(e,t,n,r,o){var i=e+"Animation",a=YS(e,r,o)||{},s=YF(t).userDuring;return a.duration>0&&(a.during=s?bf(rj,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),uf(a,n[i]),a}function QF(e,t,n,r){var o=(r=r||{}).dataIndex,i=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=YF(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var r=0;r=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!o&&(o=r.style={});var p=yf(n);for(u=0;u0&&e.animateFrom(h,p)}else!function(e,t,n,r,o){if(o){var i=XF("update",e,t,r,n);i.duration>0&&e.animateFrom(o,i)}}(e,t,o||0,n,c);!function(e,t){for(var n=YF(e).leaveToProps,r=0;r=0){!i&&(i=r[e]={});var h=yf(a);for(c=0;cr[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var o=t.dataToRadius(r[0]),i=n.dataToAngle(r[1]),a=e.coordToPoint([o,i]);return a.push(o,i*Math.PI/180),a},size:bf($F,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function xj(e){return e instanceof Sw}function wj(e){return e instanceof Sx}var Sj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._data,i=e.getData(),a=this.group,s=Pj(e,i,t,n);o||a.removeAll(),i.diff(o).add((function(t){Ij(n,null,t,s(t,r),e,a,i)})).remove((function(t){var n=o.getItemGraphicEl(t);n&&JF(n,FF(n).option,e)})).update((function(t,l){var u=o.getItemGraphicEl(l);Ij(n,u,t,s(t,r),e,a,i)})).execute();var l=e.get("clip",!0)?OA(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,o){var i=t.getData(),a=Pj(t,i,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u=0?t.getStore().get(o,n):void 0}var i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i},styleEmphasis:function(n,r){0;null==r&&(r=s);var o=y(r,cj).getItemStyle(),i=b(r,cj),a=cC(i,null,null,!0,!0);a.text=i.getShallow("show")?Ef(e.getFormattedLabel(r,cj),e.getFormattedLabel(r,dj),ZA(t,r)):null;var l=dC(i,null,!0);return w(n,o),o=WF(o,a,l),n&&x(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=s),qf(LF,e)){var r=t.getItemVisual(n,"style");return r?r[LF[e]]:null}if(qf(ZF,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===i.type){return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i=d;f--){var m=t.childAt(f);Zj(t,m,o)}}(e,d,n,r,o),a>=0?i.replaceAt(d,a):i.add(d),d}function Oj(e,t,n){var r,o=FF(e),i=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=i&&i!==o.customGraphicType||"path"===i&&((r=a)&&(qf(r,"pathData")||qf(r,"d")))&&zj(a)!==o.customPathData||"image"===i&&qf(s,"image")&&s.image!==o.customImagePath}function Aj(e,t,n){var r=t?Ej(e,t):e,o=t?Lj(e,r,cj):e.style,i=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?Ej(s,t):s:null;if(o&&(n.isLegacy||function(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||qf(e,"text")))}(o,i,!!a,!!l))){n.isLegacy=!0;var u=function(e,t,n){var r,o,i,a=e;if("text"===t)i=a;else{i={},qf(a,"text")&&(i.text=a.text),qf(a,"rich")&&(i.rich=a.rich),qf(a,"textFill")&&(i.fill=a.textFill),qf(a,"textStroke")&&(i.stroke=a.textStroke),qf(a,"fontFamily")&&(i.fontFamily=a.fontFamily),qf(a,"fontSize")&&(i.fontSize=a.fontSize),qf(a,"fontStyle")&&(i.fontStyle=a.fontStyle),qf(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={};var s=qf(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),qf(a,"textPosition")&&(r.position=a.textPosition),qf(a,"textOffset")&&(r.offset=a.textOffset),qf(a,"textRotation")&&(r.rotation=a.textRotation),qf(a,"textDistance")&&(r.distance=a.textDistance)}return HF(i,e),ff(i.rich,(function(e){HF(e,e)})),{textConfig:r,textContent:o}}(o,i,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function Ej(e,t){return t?e?e[t]:null:e}function Lj(e,t,n){var r=t&&t.style;return null==r&&n===cj&&e&&(r=e.styleEmphasis),r}function Zj(e,t,n){t&&JF(t,FF(e).option,n)}function Fj(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function jj(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;Dj(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function Nj(e){var t=this.context,n=t.oldChildren[e];n&&JF(n,FF(n).option,t.seriesModel)}function zj(e){return e&&(e.pathData||e.d)}const Bj=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Wp.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,o,i){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p0){var _=i(v)?s:l;v>0&&(v=v*C+S),b[x++]=_[k],b[x++]=_[k+1],b[x++]=_[k+2],b[x++]=_[k+3]*v*256}else x+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Wp.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),o=[0,0,0,0],i=0,a=0;a<256;a++)e[t](a/255,!0,o),r[i++]=o[0],r[i++]=o[1],r[i++]=o[2],r[i++]=o[3];return r},e}();function Vj(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var $j=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):Vj(o)&&this._renderOnGeo(o,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var o=t.coordinateSystem;o&&(Vj(o)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){MR(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,o){var i,a,s,l,u=e.coordinateSystem,c=LA(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");0,i=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),g=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),b=uC(e),x=e.getModel("emphasis"),w=x.get("focus"),S=x.get("blurScope"),C=x.get("disabled"),k=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],_=n;_s[1]||Rl[1])continue;var I=u.dataToPoint([P,R]);M=new Fw({shape:{x:I[0]-i/2,y:I[1]-a/2,width:i,height:a},style:T})}else{if(isNaN(f.get(k[1],_)))continue;M=new Fw({z2:1,shape:u.dataToRect([f.get(k[0],_)]).contentShape,style:T})}if(f.hasItemOption){var D=f.getItemModel(_),O=D.getModel("emphasis");m=O.getModel("itemStyle").getItemStyle(),g=D.getModel(["blur","itemStyle"]).getItemStyle(),v=D.getModel(["select","itemStyle"]).getItemStyle(),y=D.get(["itemStyle","borderRadius"]),w=O.get("focus"),S=O.get("blurScope"),C=O.get("disabled"),b=uC(D)}M.shape.r=y;var A=e.getRawValue(_),E="-";A&&null!=A[2]&&(E=A[2]+""),lC(M,b,{labelFetcher:e,labelDataIndex:_,defaultOpacity:T.opacity,defaultText:E}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=g,M.ensureState("select").style=v,BS(M,w,S,C),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),f.setItemGraphicEl(_,M),this._progressiveEls&&this._progressiveEls.push(M)}},t.prototype._renderOnGeo=function(e,t,n,r){var o=n.targetVisuals.inRange,i=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new Bj;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=h-c,m=p-d,g=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(g,(function(t,n,r){var o=e.dataToPoint([t,n]);return o[0]-=c,o[1]-=d,o.push(r),o})),y=n.getExtent(),b="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var r=e[1]-e[0],o=(t=mf(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,i=0;return function(e){var r;for(r=i;r=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}return r>=0&&r0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");ff([["start","startValue"],["end","endValue"]],(function(r,o){var i=null!=e[r[0]],a=null!=e[r[1]];i&&!a?t[o]="percent":!i&&a?t[o]="value":n?t[o]=n[o]:i&&(t[o]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(Xj(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){ff(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Xj(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;ff([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;ff(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;ri&&(t[1-r]=t[r]+u.sign*i),t}function uN(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function cN(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var dN="\0_ec_interaction_mutex";function hN(e,t){return!!pN(e)[t]}function pN(e){return e[dN]||(e[dN]={})}function fN(e,t,n,r,o){e.pointerChecker&&e.pointerChecker(r,o.originX,o.originY)&&(Zm(r.event),mN(e,t,n,r,o))}function mN(e,t,n,r,o){o.isAvailableBehavior=bf(gN,null,n,r),e.trigger(t,o)}function gN(e,t,n){var r=n[e];return!e||r&&(!Cf(r)||t.event[r+"Key"])}xO({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Kf);const vN=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=bf(n._mousedownHandler,n),o=bf(n._mousemoveHandler,n),i=bf(n._mouseupHandler,n),a=bf(n._mousewheelHandler,n),s=bf(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=cf(sf(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",o),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",o),t.off("mouseup",i),t.off("mousewheel",a),t.off("pinch",s)},n}return Fp(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Fm(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&gN("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!hN(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,o=this._y,i=t-r,a=n-o;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Zm(e.event),mN(this,"pan","moveOnMouseMove",e,{dx:i,dy:a,oldX:r,oldY:o,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Fm(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=gN("zoomOnMouseWheel",e,this._opt),n=gN("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,o=Math.abs(r),i=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;fN(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:i,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);fN(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:i,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){hN(this._zr,"globalPan")||fN(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(vm);var yN=Rb();function bN(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function xN(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function wN(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function SN(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=yN(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Wf());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){ff(Jj(e).infoList,(function(n){var o=n.model.uid,i=r.get(o)||r.set(o,function(e,t){var n={model:t,containsPoint:xf(wN,t),dispatchAction:xf(xN,e),dataZoomInfoMap:null,controller:null},r=n.controller=new vN(e.getZr());return ff(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(o){if(t.isAvailableBehavior(o.model.option)){var i=(o.getRange||{})[e],a=i&&i(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&r.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(i.dataZoomInfoMap||(i.dataZoomInfoMap=Wf())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var i=o.keys()[0];null!=i&&(t=o.get(i))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each((function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),zR(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else bN(r,e)}))}))}var CN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Fp(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){yN(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:bf(kN.pan,this),zoom:bf(kN.zoom,this),scrollMove:bf(kN.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=yN(e).coordSysRecordMap,r=n.keys(),o=0;o0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/r.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return lN(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1]?i:void 0}},pan:_N((function(e,t,n,r,o,i){var a=MN[r]([i.oldX,i.oldY],[i.newX,i.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:_N((function(e,t,n,r,o,i){return MN[r]([0,0],[i.scrollDelta,i.scrollDelta],t,o,n).signal*(e[1]-e[0])*i.scrollDelta}))};function _N(e){return function(t,n,r,o){var i=this.range,a=i.slice(),s=t.axisModels[0];if(s)return lN(e(a,s,t,n,r,o),a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}}var MN={grid:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=i.inverse?-1:1),a},polar:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=i.inverse?-1:1),a},singleAxis:function(e,t,n,r,o){var i=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=i.inverse?-1:1),s}};const TN=CN;var PN=ff,RN=Qy;const IN=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return df(Yj,t)>=0}(t)){var n=Xj(this._dimName),r=t.getReferringComponents(n,Ab).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return sf(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],s=[];PN(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===o[u]?(null==c&&(c=i[u]),d=r.parse(Ky(c,i,n))):(t=!0,c=Ky(d=null==d?n[u]:r.parse(d),n,i)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?i[u]:c})),RN(s),RN(a);var l=this._minMaxSpan;function u(e,t,n,o,i){var a=i?"Span":"ValueSpan";lN(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=Ky(e[s],n,o,!0),i&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,i,!1):u(a,s,i,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];PN(n,(function(e){!function(e,t,n){t&&ff(ZZ(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var o=e.getAxisModel(),i=PZ(o.axis.scale,o,r).calculate();return[i.min,i.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=e.get("filterMode"),i=this._valueWindow;"none"!==o&&PN(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var a=t.getStore(),s=mf(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,o,l=0;li[1];if(c&&!d&&!h)return!0;c&&(o=!0),d&&(t=!0),h&&(n=!0)}return o&&t&&n}))}else PN(r,(function(n){if("empty"===o)e.setData(t=t.map(n,(function(e){return function(e){return e>=i[0]&&e<=i[1]}(e)?e:NaN})));else{var r={};r[n]=i,t.selectRange(r)}}));PN(r,(function(e){t.setApproximateExtent(i,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;PN(["min","max"],(function(r){var o=t.get(r+"Span"),i=t.get(r+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?o=Ky(n[0]+i,n,[0,100],!0):null!=o&&(i=Ky(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=i}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=eb(n,[0,500]);r=Math.min(r,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},e}();const DN={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,o){var i=e.getComponent(Xj(r),o);t(r,o,i,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,o,i){o.__dzAxisProxy||(o.__dzAxisProxy=new IN(t,r,i,e),n.push(o.__dzAxisProxy))}));var r=Wf();return ff(n,(function(e){ff(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var ON=!1;function AN(e){ON||(ON=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,DN),function(e){e.registerAction("dataZoom",(function(e,t){ff(Qj(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function EN(e){AN(e),e.registerComponentModel(iN),e.registerComponentView(TN),SN(e)}var LN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=LC(rN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(rN);const ZN=LN;var FN=Fw,jN="horizontal",NN="vertical",zN=["line","bar","candlestick","scatter"],BN={easing:"cubicOut",duration:100,delay:0},VN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Fp(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=bf(this._onBrush,this),this._onBrushEnd=bf(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,o){if(e.prototype.render.apply(this,arguments),zR(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){BR(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new $y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},i=this._orient===jN?{right:o.width-r.x-r.width,top:o.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Fk(e.option);ff(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=i[e])}));var s=Ak(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===NN&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),i=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(n!==jN||o?n===jN&&o?{scaleY:a?1:-1,scaleX:-1}:n!==NN||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([i]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new FN({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new FN({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:bf(this._onClickPanel,this)}),i=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,o=r.getRawData(),i=r.getShadowDim&&r.getShadowDim(),a=i&&o.getDimensionInfo(i)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],m=[],g=p[1]/(o.count()-1),v=0,y=Math.round(o.count()/t[0]);o.each([a],(function(e,t){if(y>0&&t%y)v+=g;else{var n=null==e||isNaN(e)||""===e,r=n?0:Ky(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),m.push([m[m.length-1][0],0])):!n&&d&&(f.push([v,0]),m.push([v,0])),f.push([v,r]),m.push([v,r]),v+=g,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var b=this.dataZoomModel,x=0;x<3;x++){var w=S(1===x);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function S(e){var t=b.getModel(e?"selectedDataBackground":"dataBackground"),n=new $y,r=new SP({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new _P({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(o),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(o,i){ff(e.getAxisProxy(o,i).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&df(zN,e.get("type"))<0)){var a,s=r.getComponent(Xj(o),i).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],o=this._displayables.sliderGroup,i=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new FN({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new FN({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),ff([0,1],(function(t){var i=a.get("handleIcon");!zI[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=$I(i,-1,0,2,2,null,!0);s.attr({cursor:$N(this._orient),draggable:!0,drift:bf(this._onDragMove,this,t),ondragend:bf(this._onDragEnd,this),onmouseover:bf(this._showDataInfo,this,!0),onmouseout:bf(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Yy(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),zS(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new Qw({silent:!0,invisible:!0,style:cC(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var h=Yy(a.get("moveHandleSize"),i[1]),p=t.moveHandle=new Fw({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:h}}),f=.8*h,m=t.moveHandleIcon=$I(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);m.silent=!0,m.y=i[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(i[1]/2,Math.max(h,10));(d=t.moveZone=new Fw({invisible:!0,shape:{y:i[1]-g,height:h+g}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),o.add(p),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:$N(this._orient),drift:bf(this._onDragMove,this,"all"),ondragstart:bf(this._showDataInfo,this,!0),ondragend:bf(this._onDragEnd,this),onmouseover:bf(this._showDataInfo,this,!0),onmouseout:bf(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Ky(e[0],[0,100],t,!0),Ky(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),i=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];lN(t,r,o,n.get("zoomLock")?"all":e,null!=i.minSpan?Ky(i.minSpan,a,o,!0):null,null!=i.maxSpan?Ky(i.maxSpan,a,o,!0):null);var s=this._range,l=this._range=Qy([Ky(r[0],o,a,!0),Ky(r[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Qy(n.slice()),o=this._size;ff([0,1],(function(e){var r=t.handles[e],i=this._handleHeight;r.attr({scaleX:i/2,scaleY:i/2,x:n[e]+(e?-1:1),y:o[1]/2-i/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var i={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],o[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,i=this._updateInterval("all",n[0]-o);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Um(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=Qy([Ky(n.x,r,o,!0),Ky(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Zm(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new FN({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var i=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(i.x,i.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?BN:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Jj(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),o=this.api.getHeight();e={x:.2*r,y:.2*o,width:.6*r,height:.6*o}}return e},t.type="dataZoom.slider",t}(sN);function $N(e){return"vertical"===e?"ns-resize":"ew-resize"}const HN=VN;function WN(e){e.registerComponentModel(ZN),e.registerComponentView(HN),AN(e)}var GN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Fp(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),wf(t)&&ff(t,(function(e,r){Cf(e)&&(e={type:e}),t[r]=lf(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(zk);const UN=GN;function qN(e,t){var n=wk(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Fw({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var KN=xf,YN=ff,XN=$y,QN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Fp(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new XN),this.group.add(this._selectorGroup=new XN),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var o=e.get("align"),i=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===i?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(o,e,t,n,a,i,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Ak(l,u,c),h=this.layoutInner(e,o,d,r,a,s),p=Ak(cf({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=qN(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,o,i,a){var s=this.getContentGroup(),l=Wf(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),YN(t.getData(),(function(o,i){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new XN;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},m=p.getVisual("legendIcon"),g=p.getVisual("style"),v=this._createItem(h,a,i,o,t,e,f,g,m,u,r);v.on("click",KN(JN,a,null,r,c)).on("mouseover",KN(tz,h.name,null,r,c)).on("mouseout",KN(nz,h.name,null,r,c)),n.ssr&&v.eachChild((function(e){var t=Jw(e);t.seriesIndex=h.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),m=fv(p.fill);m&&0===m[3]&&(m[3]=.2,p=uf(uf({},p),{fill:wv(m,"rgba")}));var g=this._createItem(s,a,i,o,t,e,{},p,f,u,r);g.on("click",KN(JN,null,a,r,c)).on("mouseover",KN(tz,null,a,r,c)).on("mouseout",KN(nz,null,a,r,c)),n.ssr&&g.eachChild((function(e){var t=Jw(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),o&&this._createSelector(o,t,r,i,a)},t.prototype._createSelector=function(e,t,n,r,o){var i=this.getSelectorGroup();YN(e,(function(e){var r=e.type,o=new Qw({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});i.add(o),lC(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),zS(o)}))},t.prototype._createItem=function(e,t,n,r,o,i,a,s,l,u,c){var d=e.visualDrawType,h=o.get("itemWidth"),p=o.get("itemHeight"),f=o.isSelected(t),m=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,o,i,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),YN(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?gD(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[o]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?r:n).opacity);s(u,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!i){var f=t.get("inactiveBorderWidth"),m=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,c),b=new XN,x=r.getModel("textStyle");if(!Sf(e.getLegendIcon)||v&&"inherit"!==v){var w="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(function(e){var t=e.icon||"roundRect",n=$I(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:w,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}))}else b.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));var S="left"===i?h+5:-5,C=i,k=o.get("formatter"),_=t;Cf(k)&&k?_=k.replace("{name}",null!=t?t:""):Sf(k)&&(_=k(t));var M=f?x.getTextColor():r.get("inactiveColor");b.add(new Qw({style:cC(x,{text:_,x:S,y:p/2,fill:M,align:C,verticalAlign:"middle"},{inheritColor:M})}));var T=new Fw({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=r.getModel("tooltip");return P.get("show")&&kR({el:T,componentModel:o,itemName:t,itemTooltipOption:P.option}),b.add(T),b.eachChild((function(e){e.silent=!0})),T.silent=!u,this.getContentGroup().add(b),zS(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getContentGroup(),s=this.getSelectorGroup();Ok(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){Ok("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",m=0===p?"height":"width",g=0===p?"y":"x";"end"===i?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[m]/2-c[m]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+h+c[f],v[m]=Math.max(l[m],c[m]),v[g]=Math.min(0,c[g]+d[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(RT);function JN(e,t,n,r){nz(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),tz(e,t,n,r)}function ez(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,o=n.length;rn[o],f=[-d.x,-d.y];t||(f[r]=l[s]);var m=[0,0],g=[-h.x,-h.y],v=Af(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?g[r]+=n[o]-h[o]:m[r]+=h[o]+v);g[1-r]+=d[i]/2-h[i]/2,l.setPosition(f),u.setPosition(m),c.setPosition(g);var y={x:0,y:0};if(y[o]=p?n[o]:d[o],y[i]=Math.max(d[i],h[i]),y[a]=Math.min(0,h[a]+g[1-r]),u.__rectSize=n[o],p){var b={x:0,y:0};b[o]=Math.max(n[o]-h[o]-v,0),b[i]=y[i],u.setClipPath(new Fw({shape:b})),u.__rectSize=b[o]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&QS(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;ff(["pagePrev","pageNext"],(function(r){var o=null!=t[r+"DataIndex"],i=n.childOfName(r);i&&(i.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),i.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),o=e.get("pageFormatter"),i=t.pageIndex,a=null!=i?i+1:0,s=t.pageCount;r&&o&&r.setStyle("text",Cf(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=e.getOrient().index,i=dz[o],a=hz[o],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[o]=-p.s;for(var f=s+1,m=p,g=p,v=null;f<=c;++f)(!(v=y(l[f]))&&g.e>m.s+r||v&&!b(v,m.s))&&(m=g.i>m.i?g:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=m.i),++h.pageCount),g=v;for(f=s-1,m=p,g=p,v=null;f>=-1;--f)(v=y(l[f]))&&b(g,v.s)||!(m.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,o){var i=r.__legendDataIndex;null==n&&null!=i&&(n=o),i===e&&(t=o)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(rz);const fz=pz;function mz(e){PO(az),e.registerComponentModel(uz),e.registerComponentView(fz),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}var gz=Rb(),vz=sf,yz=bf;function bz(e,t,n,r){xz(gz(n).lastProp,r)||(gz(n).lastProp=r,t?QS(n,r,e):(n.stopAnimation(),n.attr(r)))}function xz(e,t){if(Mf(e)&&Mf(t)){var n=!0;return ff(t,(function(t,r){n=n&&xz(e[r],t)})),!!n}return e===t}function wz(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Sz(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Cz(e,t,n){var r=t.get("z"),o=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=o&&(e.zlevel=o),e.silent=n)}))}function kz(e,t,n,r,o){var i=_z(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=wk(a.get("padding")||0),l=a.getFont(),u=_y(i,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,r){var o=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,r);var m=a.get("backgroundColor");m&&"auto"!==m||(m=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:cC(a,{text:i,font:l,fill:a.getTextColor(),padding:s,backgroundColor:m}),z2:10}}function _z(e,t,n,r,o){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:AZ(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};ff(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,o=t&&t.getDataParams(r);o&&s.seriesData.push(o)})),Cf(a)?i=a.replace("{value}",i):Sf(a)&&(i=a(s))}return i}function Mz(e,t,n){var r=[1,0,0,1,0,0];return Wm(r,r,n.rotation),Hm(r,r,n.position),fR([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var Tz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.grid,s=r.get("type"),l=Pz(a,i).getOtherAxis(i).getGlobalExtent(),u=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=Rz[s](i,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,o,i){var a=gF.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),kz(t,r,o,i,{position:Mz(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,eF(a.model,n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=eF(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=Mz(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.grid,a=o.getGlobalExtent(!0),s=Pz(i,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var o=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==o||this._lastStatus!==i){this._lastValue=o,this._lastStatus=i;var a=this._group,s=this._handle;if(!i||"hide"===i)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=xf(bz,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new $y,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);Cz(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,o="category"===r.type,i=t.get("snap");if(!i&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(i){var s=bF(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,o){},e.prototype.createPointerEl=function(e,t,n,o){var i=t.pointer;if(i){var a=gz(e).pointerEl=new r[i.type](vz(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var o=gz(e).labelEl=new Qw(vz(t.label));e.add(o),wz(o,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=gz(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var o=gz(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),wz(o,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,i=n.getModel("handle"),a=n.get("status");if(!i.get("show")||!a||"hide"===a)return o&&r.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=xR(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Zm(e.event)},onmousedown:yz(this._onHandleDragMove,this,0,0),drift:yz(this._onHandleDragMove,this),ondragend:yz(this._onHandleDragEnd,this)}),r.add(o)),Cz(o,n,!1),o.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");wf(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,zR(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){bz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Sz(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Sz(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Sz(r)),gz(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),BR(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}());function Pz(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Rz={line:function(e,t,n){var r,o,i;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],o=[t,n[1]],i=Iz(e),{x1:r[i=i||0],y1:r[1-i],x2:o[i],y2:o[1-i]})}},shadow:function(e,t,n){var r,o,i,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],o=[a,s],i=Iz(e),{x:r[i=i||0],y:r[1-i],width:o[i],height:o[1-i]})}}};function Iz(e){return"x"===e.dim?0:1}const Dz=Tz;var Oz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(zk);const Az=Oz;var Ez=Rb(),Lz=ff;function Zz(e,t,n){if(!zp.node){var r=t.getZr();Ez(r).records||(Ez(r).records={}),function(e,t){if(Ez(e).initialized)return;function n(n,r){e.on(n,(function(n){var o=function(e){var t={showTip:[],hideTip:[]},n=function(r){var o=t[r.type];o?o.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);Lz(Ez(e).records,(function(e){e&&r(e,n,o.dispatchAction)})),function(e,t){var n,r=e.showTip.length,o=e.hideTip.length;r?n=e.showTip[r-1]:o&&(n=e.hideTip[o-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(o.pendings,t)}))}Ez(e).initialized=!0,n("click",xf(jz,"click")),n("mousemove",xf(jz,"mousemove")),n("globalout",Fz)}(r,t),(Ez(r).records[e]||(Ez(r).records[e]={})).handler=n}}function Fz(e,t,n){e.handler("leave",null,n)}function jz(e,t,n,r){t.handler(e,n,r)}function Nz(e,t){if(!zp.node){var n=t.getZr();(Ez(n).records||{})[e]&&(Ez(n).records[e]=null)}}var zz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),o=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Zz("axisPointer",n,(function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){Nz("axisPointer",t)},t.prototype.dispose=function(e,t){Nz("axisPointer",t)},t.type="axisPointer",t}(RT);const Bz=zz;function Vz(e,t){var n,r=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var i=n.getData(),a=Pb(i,e);if(null==a||a<0||wf(a))return{point:[]};var s=i.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,h="x"===c||"radius"===c?1:0,p=i.mapDimension(d),f=[];f[h]=i.get(p,a),f[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(i.getValues(mf(l.dimensions,(function(e){return i.mapDimension(e)})),a))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var $z=Rb();function Hz(e,t,n){var r=e.currTrigger,o=[e.x,e.y],i=e,a=e.dispatchAction||bf(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Kz(o)&&(o=Vz({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Kz(o),u=i.axesInfo,c=s.axesInfo,d="leave"===r||Kz(o),h={},p={},f={list:[],map:{}},m={showPointer:xf(Gz,p),showTooltip:xf(Uz,f)};ff(s.coordSysMap,(function(e,t){var n=l||e.containPoint(o);ff(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,i=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=r.pointToData(o)),null!=a&&Wz(e,a,m,!1,h)}}))}));var g={};return ff(c,(function(e,t){var n=e.linkGroup;n&&!p[t]&&ff(n.axesInfo,(function(t,r){var o=p[r];if(t!==e&&o){var i=o.value;n.mapper&&(i=e.axis.scale.parse(n.mapper(i,qz(t),qz(e)))),g[e.key]=i}}))})),ff(g,(function(e,t){Wz(c[t],e,m,!0,h)})),function(e,t,n){var r=n.axesInfo=[];ff(t,(function(t,n){var o=t.axisPointerModel.option,i=e[n];i?(!t.useHandle&&(o.status="show"),o.value=i.value,o.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})}))}(p,c,h),function(e,t,n,r){if(Kz(t)||!e.list.length)return void r({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(f,o,e,a),function(e,t,n){var r=n.getZr(),o="axisPointerLastHighlights",i=$z(r)[o]||{},a=$z(r)[o]={};ff(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&ff(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];ff(i,(function(e,t){!a[t]&&l.push(e)})),ff(a,(function(e,t){!i[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),h}}function Wz(e,t,n,r,o){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,o=e,i=[],a=Number.MAX_VALUE,s=-1;return ff(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,o=u,i.length=0),ff(c,(function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:i,snapToValue:o}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&uf(o,s[0]),!r&&e.snap&&i.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function Gz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Uz(e,t,n,r){var o=n.payloadBatch,i=t.axis,a=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,u=wF(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function qz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function Kz(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function Yz(e){kF.registerAxisPointerClass("CartesianAxisPointer",Dz),e.registerComponentModel(Az),e.registerComponentView(Bz),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!wf(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=vF(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Hz)}var Xz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Fp(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(zk),Qz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,o=e.getModel("textStyle"),i=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Af(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Qw({style:cC(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new Qw({style:cC(i,{text:c,fill:i.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){Tk(h,"_"+e.get("target"))})),p&&d.on("click",(function(){Tk(p,"_"+e.get("subtarget"))})),Jw(l).eventData=Jw(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var m=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=m.width,g.height=m.height;var v=Ak(g,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),m=r.getBoundingRect();var b=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var w=new Fw({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(RT);var Jz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.type="dataZoom.select",t}(rN);const eB=Jz;var tB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.type="dataZoom.select",t}(sN);const nB=tB;function rB(e){e.registerComponentModel(eB),e.registerComponentView(nB),AN(e)}var oB=function(){},iB={};function aB(e,t){iB[e]=t}function sB(e){return iB[e]}var lB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;ff(this.option.feature,(function(e,n){var r=sB(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),lf(e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(zk);const uB=lB;var cB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.render=function(e,t,n,r){var o=this.group;if(o.removeAll(),e.get("show")){var i=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];ff(s,(function(e,t){u.push(t)})),new nA(this._featureNames||[],u).add(c).update(c).remove(xf(c,null)).execute(),this._featureNames=u,function(e,t,n){var r=t.getBoxLayoutParams(),o=t.get("padding"),i={width:n.getWidth(),height:n.getHeight()},a=Ak(r,i,o);Ok(t.get("orient"),e,t.get("itemGap"),a.width,a.height),Ek(e,r,i,o)}(o,e,n),o.add(qN(o.getBoundingRect(),e)),a||o.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Sf(l)&&t){var u=l.style||(l.style={}),c=_y(t,Qw.makeFont(u)),d=e.x+o.x,h=!1;e.y+o.y+i+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:i+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,d){var h,p=u[c],f=u[d],m=s[p],g=new OC(m,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(m.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:g.option.onclick,featureName:p};else{var v=sB(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=EC("toolbox-feature"),h.model=g,h.ecModel=t,h.api=n;var y=h instanceof oB;p||!f?!g.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof oB&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};Cf(p)?(u={})[l]=p:u=p;Cf(f)?(c={})[l]=f:c=f;var m=r.iconPaths={};ff(u,(function(l,u){var p=xR(l,{},{x:-i/2,y:-i/2,width:i,height:i});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new Qw({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:gC({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),kR({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",u])?TS:PS)(p),o.add(p),p.on("click",bf(s.onclick,s,t,n,u)),m[u]=p}))}(g,h,p),g.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?TS:PS)(r[e])},h instanceof oB&&h.render&&h.render(g,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){ff(this._features,(function(e){e instanceof oB&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){ff(this._features,(function(n){n instanceof oB&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){ff(this._features,(function(n){n instanceof oB&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(RT);const dB=cB;var hB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),i=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:i,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=zp.browser;if(Sf(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+i,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=o?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=r+"."+i;if(window.navigator.msSaveOrOpenBlob){for(var f=h.length,m=new Uint8Array(f);f--;)m[f]=h.charCodeAt(f);var g=new Blob([m]);window.navigator.msSaveOrOpenBlob(g,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,b=y.document;b.open("image/svg+xml","replace"),b.write(h),b.close(),y.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var x=n.get("lang"),w='',S=window.open();S.document.write(w),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(oB);const pB=hB;var fB="__ec_magicType_stack__",mB=[["line","bar"],["stack"]],gB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return ff(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,o=r.get(["seriesIndex",n]);if(vB[n]){var i,a={series:[]};ff(mB,(function(e){df(e,n)>=0&&ff(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var t=e.subType,o=e.id,i=vB[n](t,o,e,r);i&&(cf(i,e.option),a.series.push(i));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,Ab).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(i=lf({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(oB),vB={line:function(e,t,n,r){if("bar"===e)return lf({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return lf({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var o=n.get("stack")===fB;if("line"===e||"bar"===e)return r.setIconStatus("stack",o?"normal":"emphasis"),lf({id:t,stack:o?"":fB},r.get(["option","stack"])||{},!0)}};xO({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));const yB=gB;var bB=new Array(60).join("-"),xB="\t";function wB(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var SB=new RegExp("[\t]+","g");function CB(e,t){var n=e.split(new RegExp("\n*"+bB+"\n*","g")),r={series:[]};return ff(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(xB)>=0)return!0}(e)){var o=function(e){for(var t=e.split(/\n+/g),n=[],r=mf(wB(t.shift()).split(SB),(function(e){return{name:e,data:[]}})),o=0;o6}(e)||i){if(a&&!i){"single"===s.brushMode&&YB(e);var l=sf(s);l.brushType=pV(l.brushType,a),l.panelId=a===OB?null:a.panelId,i=e._creatingCover=VB(e,l),e._covers.push(i)}if(i){var u=gV[pV(e._brushType,a)];i.__brushOption.range=u.getCreatingRange(uV(e,i,e._track)),r&&($B(e,i),u.updateCommon(e,i)),HB(e,i),o={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&qB(e,t,n)&&YB(e)&&(o={isEnd:r,removeOnClick:!0});return o}function pV(e,t){return"auto"===e?t.defaultBrushType:e}var fV={mousedown:function(e){if(this._dragging)mV(this,e);else if(!e.target||!e.target.draggable){cV(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=qB(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,o=e._covers,i=qB(e,t,n);if(!e._dragging)for(var a=0;a=0)&&e(o,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=DV[e.brushType](0,n,t);e.__rangeOffset={offset:AV[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){ff(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&ff(r.coordSyses,(function(r){var o=DV[e.brushType](1,r,e.range,!0);n(e,o.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){ff(e,(function(e){var n,r,o,i,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=DV[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?AV[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,o=LV(n),i=LV(r),a=[o[0]/i[0],o[1]/i[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return mf(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:xV(r),isTargetByCursor:SV(r,e,n.coordSysModel),getLinearBrushOtherExtent:wV(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&df(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=TV(t,e),o=0;oe[1]&&e.reverse(),e}function TV(e,t){return Db(e,t,{includeMainTypes:kV})}var PV={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,o=e.gridModels,i=Wf(),a={},s={};(n||r||o)&&(ff(n,(function(e){var t=e.axis.grid.model;i.set(t.id,t),a[t.id]=!0})),ff(r,(function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0})),ff(o,(function(e){i.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),i.each((function(e){var o=e.coordinateSystem,i=[];ff(o.getCartesians(),(function(e,t){(df(n,e.getAxis("x").model)>=0||df(r,e.getAxis("y").model)>=0)&&i.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:IV.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){ff(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:IV.geo})}))}},RV=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],IV={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(pR(e)),t}},DV={lineX:xf(OV,0),lineY:xf(OV,1),rect:function(e,t,n,r){var o=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),i=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[MV([o[0],i[0]]),MV([o[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:mf(n,(function(n){var i=e?t.pointToData(n,r):t.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function OV(e,t,n,r){var o=n.getAxis(["x","y"][e]),i=MV(mf([0,1],(function(e){return t?o.coordToData(o.toLocalCoord(r[e]),!0):o.toGlobalCoord(o.dataToCoord(r[e]))}))),a=[];return a[e]=i,a[1-e]=[NaN,NaN],{values:i,xyMinMax:a}}var AV={lineX:xf(EV,0),lineY:xf(EV,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return mf(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function EV(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function LV(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const ZV=_V;var FV,jV,NV=ff,zV=gb+"toolbox-dataZoom_",BV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fp(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new yV(n.getZr()),this._brushController.on("brush",bf(this._onBrush,this)).mount()),function(e,t,n,r,o){var i=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(i="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var a=new ZV($V(e),t,{include:["grid"]}),s=a.makePanelOpts(o,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!i||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return RB(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){VV[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new ZV($V(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=RB(e);TB(t,(function(t,r){for(var o=n.length-1;o>=0&&!n[o][r];o--);if(o<0){var i=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(i){var a=i.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function o(e,t,o){var i=t.getAxis(e),a=i.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=lN(0,o.slice(),i.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];NV(e,(function(e,n){t.push(sf(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(oB),VV={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=RB(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return TB(n,(function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){r[n]=e;break}})),r}(this.ecModel))}};function $V(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}FV="dataZoom",jV=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),o=[],i=Db(e,$V(r));return NV(i.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),NV(i.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),o}function a(e,t,n){var i=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:zV+t+i};a[n]=i,o.push(a)}},Ff(null==l_.get(FV)&&jV),l_.set(FV,jV);const HV=BV;var WV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(zk);const GV=WV;function UV(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function qV(e){if(zp.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,h=l+o,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+o+"px;";return'
'}(n,r,o)),Cf(e))i.innerHTML=e+a;else if(e){i.innerHTML="",wf(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!zp.node&&n.getDom()){var o=d$(r,n);this._ticket="";var i=r.dataByCoordSys,a=function(e,t,n){var r=Ob(e).queryOptionMap,o=r.keys()[0];if(!o||"series"===o)return;var i=Lb(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=i.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=Jw(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=l$;l.x=r.x,l.y=r.y,l.update(),Jw(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},o)}else if(i)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:i,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=Vz(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},o)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},o))}},t.prototype.manuallyHideTip=function(e,t,n,r){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(d$(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var o=r.seriesIndex,i=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=i&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===c$([s.getData().getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:i,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,i;if("legend"===Jw(n).ssrType)return;this._lastDataByCoordSys=null,II(n,(function(e){return null!=Jw(e).dataIndex?(o=e,!0):null!=Jw(e).tooltipConfig?(i=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=bf(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,o=[t.offsetX,t.offsetY],i=c$([t.tooltipOption],r),a=this._renderMode,s=[],l=iT("section",{blocks:[],noHeader:!0}),u=[],c=new mT;ff(e,(function(e){ff(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var i=_z(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=iT("section",{header:i,noHeader:!jf(i),sortBlocks:!0,blocks:[]});l.blocks.push(d),ff(e.seriesDataIndices,(function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=AZ(t.axis,{value:o}),f.axisValueLabel=i,f.marker=c.makeTooltipMarker("item",Mk(f.color),a);var m=CM(h.formatTooltip(p,!0,null)),g=m.frag;if(g){var v=c$([h],r).get("valueFormatter");d.blocks.push(v?uf({valueFormatter:v},g):g)}m.text&&u.push(m.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,h=i.get("order"),p=dT(l,c,a,h,n.get("useUTC"),i.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
",m=u.join(f);this._showOrMove(i,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(i,m,s,Math.random()+"",o[0],o[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,o=Jw(t),i=o.seriesIndex,a=r.getSeriesByIndex(i),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=c$([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var m=s.getDataParams(l,u),g=new mT;m.marker=g.makeTooltipMarker("item",Mk(m.color),d);var v=CM(s.formatTooltip(l,!1,u)),y=p.get("order"),b=p.get("valueFormatter"),x=v.frag,w=x?dT(b?uf({valueFormatter:b},x):x,g,d,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,w,m,S,e.offsetX,e.offsetY,e.position,e.target,g)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=Jw(t),o=r.tooltipConfig.option||{};if(Cf(o)){o={content:o,formatter:o}}var i=[o],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&i.push(a),i.push({formatter:o.content});var s=e.positionDefault,l=c$(i,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new mT;this._showOrMove(l,(function(){var n=sf(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,o,i,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([o,i],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(Cf(c)){var p=e.ecModel.get("useUTC"),f=wf(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=nk(f.axisValue,d,p)),d=_k(d,n,!0)}else if(Sf(c)){var m=bf((function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,o,i,u,n,s))}),this);this._ticket=r,d=c(n,r,m)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,o,i,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||wf(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:wf(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,o,i,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=o.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),Sf(t)&&(t=t([n,r],i,o.el,h,{viewSize:[s,l],contentSize:u.slice()})),wf(t))n=Yy(t[0],s),r=Yy(t[1],l);else if(Mf(t)){var p=t;p.width=u[0],p.height=u[1];var f=Ak(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(Cf(t)&&a){var m=function(e,t,n,r){var o=n[0],i=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-o/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-o/2,l=t.y-i-a;break;case"bottom":s=t.x+u/2-o/2,l=t.y+c+a;break;case"left":s=t.x-o-a,l=t.y+c/2-i/2;break;case"right":s=t.x+u+a,l=t.y+c/2-i/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=m[0],r=m[1]}else{m=function(e,t,n,r,o,i,a){var s=n.getSize(),l=s[0],u=s[1];null!=i&&(e+l+i+2>r?e-=l+i:e+=i);null!=a&&(t+u+a>o?t-=u+a:t+=a);return[e,t]}(n,r,o,s,l,c?null:20,d?null:20);n=m[0],r=m[1]}if(c&&(n-=h$(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=h$(d)?u[1]/2:"bottom"===d?u[1]:0),UV(e)){m=function(e,t,n,r,o){var i=n.getSize(),a=i[0],s=i[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,o)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,o,s,l);n=m[0],r=m[1]}o.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===e.length;return o&&ff(n,(function(n,i){var a=n.dataByAxis||[],s=(e[i]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&ff(a,(function(e,n){var i=s[n]||{},a=e.seriesDataIndices||[],l=i.seriesDataIndices||[];(o=o&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===l.length)&&ff(a,(function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&ff(e.seriesDataIndices,(function(e){var n=e.seriesIndex,i=t[n],a=r[n];i&&a&&a.data!==i.data&&(o=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!zp.node&&t.getDom()&&(BR(this,"_updatePosition"),this._tooltipContent.dispose(),Nz("itemTooltip",t))},t.type="tooltip",t}(RT);function c$(e,t,n){var r,o=t.ecModel;n?(r=new OC(n,o,o),r=new OC(t.option,r,o)):r=t;for(var i=e.length-1;i>=0;i--){var a=e[i];a&&(a instanceof OC&&(a=a.get("tooltip",!0)),Cf(a)&&(a={formatter:a}),a&&(r=new OC(a,r,o)))}return r}function d$(e,t){return e.dispatchAction||bf(t.dispatchAction,t)}function h$(e){return"center"===e||"middle"===e}const p$=u$;var f$={get:function(e,t,n){var r=sf((m$[e]||{})[t]);return n&&wf(r)?r[r.length-1]:r}},m$={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const g$=f$;var v$=ff,y$=Mf,b$=-1,x$=function(){function e(t){var n=t.mappingMethod,r=t.type,o=this.option=sf(t);this.type=r,this.mappingMethod=n,this._normalizeData=I$[n];var i=e.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[n],"piecewise"===n?(w$(o),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,ff(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(o)):"category"===n?o.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(v$(t,(function(e,t){n[e]=t})),!wf(r)){var o=[];Mf(r)?v$(r,(function(e,t){var r=n[t];o[null!=r?r:b$]=e})):o[-1]=r,r=R$(e,o)}for(var i=t.length-1;i>=0;i--)null==r[i]&&(delete n[t[i]],t.pop())}(o):w$(o,!0):(Ff("linear"!==n||o.dataExtent),w$(o))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return bf(this._normalizeData,this)},e.listVisualTypes=function(){return yf(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Mf(e)?ff(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var o,i=wf(t)?[]:Mf(t)?{}:(o=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);o?i=a:i[t]=a})),i},e.retrieveVisuals=function(t){var n,r={};return t&&v$(e.visualHandlers,(function(e,o){t.hasOwnProperty(o)&&(r[o]=t[o],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(wf(e))e=e.slice();else{if(!y$(e))return[];var t=[];v$(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,o=1/0,i=0,a=t.length;i"],wf(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return Cf(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):Sf(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=z$([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var o=n[r],i=e.getDimensionInfo(o);if(!i.isCalculationCoord)return i.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),o=t.controller||(t.controller={});lf(r,n),lf(o,n);var i=this.isCategory();function a(n){j$(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,o),function(e,t,n){var r=e[t],o=e[n];r&&!o&&(o=e[n]={},N$(r,(function(e,t){if(O$.isValidType(t)){var n=g$.get(t,"inactive",i);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";N$(this.stateList,(function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:i?r:[r]}),null==l.symbol&&(l.symbol=t&&sf(t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&sf(n)||(i?s[0]:[s[0],s[0]])),l.symbol=Z$(l.symbol,(function(e){return"none"===e?o:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;F$(u,(function(e){e>c&&(c=e)})),l.symbolSize=Z$(u,(function(e){return B$(e,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(zk);const $$=V$;var H$=[20,140],W$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=H$[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=H$[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):wf(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),ff(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Qy((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)}),this),t.push({seriesId:n.id,dataIndex:r})}),this),t},t.prototype.getVisualMeta=function(e){var t=G$(this,"outOfRange",this.getExtent()),n=G$(this,"inRange",this.option.range.slice()),r=[];function o(t,n){r.push({value:t,color:e(t,n)})}for(var i=0,a=0,s=n.length,l=t.length;ae[1])break;n.push({color:this.getControllerVisual(i,"color",t),offset:o/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new $y("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,o=n.handleThumbs,i=n.handleLabels,a=r.itemSize,s=r.getExtent();eH([0,1],(function(l){var u=o[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=J$(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=fR(n.handleLabelPoints[l],pR(u,this.group));i[l].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,r){var o=this.visualMapModel,i=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=J$(e,i,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var m=fR(l.indicatorLabelPoint,pR(u,this.group)),g=l.indicatorLabel;g.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;g.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var b={x:p,y:h,style:{fill:c}},x={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(b,w),g.animateTo(x,w)}else u.attr(b),g.attr(x);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Co[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||iH(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},r={};return o(e||[],n),o(t||[],r,n),[i(n),i(r)];function o(e,t,n){for(var r=0,o=e.length;r=0&&(o.dimension=i,r.push(o))}})),e.getData().setVisual("visualMeta",r)}}];function dH(e,t,n,r){for(var o=t.targetVisuals[r],i=O$.prepareVisualTypes(o),a={color:PI(e.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(lH,uH),ff(cH,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(pH))}function vH(e){e.registerComponentModel(U$),e.registerComponentView(sH),gH(e)}var yH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Fp(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],bH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var o=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=sf(o)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=mf(this._pieceList,(function(e){return e=sf(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=O$.listVisualTypes(),o=this.isCategory();function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}ff(t.pieces,(function(e){ff(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),ff(n,(function(e,n){var r=!1;ff(this.stateList,(function(e){r=r||i(t,e,n)||i(t.target,e,n)}),this),!r&&ff(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=g$.get(n,"inRange"===e?"active":"inactive",o)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,ff(r,(function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var i=!1;ff(r,(function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(i?o[n]=!1:i=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=sf(e)},t.prototype.getValueState=function(e){var t=O$.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var o=[],i=r.getData();i.each(this.getDataDimensionIndex(i),(function(t,r){O$.findPieceIndex(t,n)===e&&o.push(r)}),this),t.push({seriesId:r.id,dataIndex:o})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,o=this._pieceList.slice();if(o.length){var i=o[0].interval[0];i!==-1/0&&o.unshift({interval:[-1/0,i]}),(i=o[o.length-1].interval[1])!==1/0&&o.push({interval:[i,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return ff(o,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(o,i){var a=r.getRepresentValue({interval:o});i||(i=r.getValueState(a));var s=e(a,i);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=LC($$.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}($$),bH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var i=(r[1]-r[0])/o;+i.toFixed(n)!==i&&n<5;)n++;t.precision=n,i=+i.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function xH(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const wH=yH;var SH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,o=r.getFont(),i=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=Of(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),ff(l.viewPieceList,(function(r){var l=r.piece,u=new $y;u.onclick=bf(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var h=this.visualMapModel.getValueState(d);u.add(new Qw({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:i,opacity:"outOfRange"===h?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,a),Ok(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:Q$(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return X$(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,o){if(t){var i=new $y,a=this.visualMapModel.textStyleModel;i.add(new Qw({style:cC(a,{x:r?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?o:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=mf(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add($I(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var o=sf(n.selected),i=t.getSelectedMapKey(e);"single"===r||!0===r?(o[i]=!0,ff(o,(function(e,t){o[t]=t===i}))):o[i]=!o[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(K$);const CH=SH;function kH(e){e.registerComponentModel(wH),e.registerComponentView(CH),gH(e)}function _H(e,t){if(!e)return!1;for(var n=wf(e)?e:[e],r=0;r=0&&(a[i]=+a[i].toFixed(d)),[a,c]}var EH={min:xf(AH,"min"),max:xf(AH,"max"),average:xf(AH,"average"),median:xf(AH,"median")};function LH(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!wf(t.coord)&&wf(o)){var i=ZH(t,n,r,e);if((t=sf(t)).type&&EH[t.type]&&i.baseAxis&&i.valueAxis){var a=df(o,i.baseAxis.dim),s=df(o,i.valueAxis.dim),l=EH[t.type](n,i.baseDataDim,i.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&wf(o))for(var u=t.coord,c=0;c<2;c++)EH[u[c]]&&(u[c]=NH(n,n.mapDimension(o[c]),u[c]));else t.coord=[];return t}}function ZH(e,t,n,r){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(r,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=r.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function FH(e,t){return!(e&&e.containData&&t.coord&&!OH(t))||e.containData(t.coord)}function jH(e,t){return e?function(e,n,r,o){return RM(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,r,o){return RM(e.value,t[o])}}function NH(e,t,n){if("average"===n){var r=0,o=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,o++)})),r/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var zH=Rb(),BH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.init=function(){this.markerGroupMap=Wf()},t.prototype.render=function(e,t,n){var r=this,o=this.markerGroupMap;o.each((function(e){zH(e).keep=!1})),t.eachSeries((function(e){var o=RH.getMarkerModelFromSeries(e,r.type);o&&r.renderSeries(e,o,t,n)})),o.each((function(e){!zH(e).keep&&r.group.remove(e.group)}))},t.prototype.markKeep=function(e){zH(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;ff(e,(function(e){var r=RH.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl((function(e){e&&(t?RS(e):IS(e))}))}))},t.type="marker",t}(RT);const VH=BH;var $H=Rb(),HH=function(e,t,n,r){var o=r[0],i=r[1];if(o&&i){var a=LH(e,o),s=LH(e,i),l=a.coord,u=s.coord;l[0]=Of(l[0],-1/0),l[1]=Of(l[1],-1/0),u[0]=Of(u[0],1/0),u[1]=Of(u[1],1/0);var c=function(e,t){for(var n=e[0],r=1,o=e.length;rp[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],i=r.getMarkerPosition(f,n,!0)}else{var m=[y=e.get(n[0],t),b=e.get(n[1],t)];a.clampData&&a.clampData(m,m),i=a.dataToPoint(m,!0)}if(LA(a,"cartesian2d")){var g=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),b=e.get(n[1],t);WH(y)?i[0]=g.toGlobalCoord(g.getExtent()["x0"===n[0]?0:1]):WH(b)&&(i[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];return i}var KH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],YH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=RH.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var o=mf(KH,(function(o){return qH(r,t,o,e,n)}));r.setItemLayout(t,o),r.getItemGraphicEl(t).setShape("points",o)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new $y});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){var r,o,i=["x0","y0","x1","y1"];if(e){var a=mf(e&&e.dimensions,(function(e){var n=t.getData();return uf(uf({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}));o=mf(i,(function(e,t){return{name:e,type:a[t%2].type}})),r=new bA(o,n)}else r=new bA(o=[{name:"value",type:"float"}],n);var s=mf(n.get("data"),xf(HH,t,e,n));e&&(s=vf(s,xf(UH,e)));var l=e?function(e,t,n,r){return RM(e.coord[Math.floor(r/2)][r%2],o[r])}:function(e,t,n,r){return RM(e.value,o[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(o,e,t);t.setData(u),u.each((function(t){var n=mf(KH,(function(n){return qH(u,t,n,e,r)})),i=o.getAxis("x").scale,s=o.getAxis("y").scale,l=i.getExtent(),c=s.getExtent(),d=[i.parse(u.get("x0",t)),i.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];Qy(d),Qy(h);var p=!!(l[0]>d[1]||l[1]h[1]||c[1]0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var w=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*m+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*x+l[0],r.y=l[1]+S,d=v[0]<0?"right":"left",r.originX=-f*x,r.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=b[0],r.y=b[1]+S,d="center",r.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*x+u[0],r.y=u[1]+S,d=v[0]>=0?"right":"left",r.originX=f*x,r.originY=-S}r.scaleX=r.scaleY=o,r.setStyle({verticalAlign:r.__verticalAlign||h,align:r.__align||d})}}}function C(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}($y);const dW=cW;function hW(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:uC(t)}}function pW(e){return isNaN(e[0])||isNaN(e[1])}function fW(e){return e&&!pW(e[0])&&!pW(e[1])}const mW=function(){function e(e){this.group=new $y,this._LineCtor=e||dW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=e,o||r.removeAll();var i=hW(e);e.diff(o).add((function(n){t._doAdd(e,n,i)})).update((function(n,r){t._doUpdate(o,e,r,n,i)})).remove((function(e){r.remove(o.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=hW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r=0&&_f(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=l,o=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else o=[]}var m=[LH(e,o[0]),LH(e,o[1]),uf({},o[2])];return m[2].type=m[2].type||null,lf(m[2],m[0]),lf(m[2],m[1]),m};function yW(e){return!isNaN(e)&&!isFinite(e)}function bW(e,t,n,r){var o=1-e,i=r.dimensions[e];return yW(t[o])&&yW(n[o])&&t[e]===n[e]&&r.getAxis(i).containData(t[e])}function xW(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(bW(1,n,r,e)||bW(0,n,r,e)))return!0}return FH(e,t[0])&&FH(e,t[1])}function wW(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=Yy(s.get("x"),o.getWidth()),u=Yy(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)i=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);i=a.dataToPoint([d,h])}if(LA(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;yW(e.get(c[0],t))?i[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):yW(e.get(c[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];e.setItemLayout(t,i)}var SW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=RH.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),o=gW(t).from,i=gW(t).to;o.each((function(t){wW(o,t,!0,e,n),wW(i,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[o.getItemLayout(e),i.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new mW);this.group.add(l.group);var u=function(e,t,n){var r;r=e?mf(e&&e.dimensions,(function(e){return uf(uf({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new bA(r,n),i=new bA(r,n),a=new bA([],n),s=mf(n.get("data"),xf(vW,t,e,n));e&&(s=vf(s,xf(xW,e)));var l=jH(!!e,r);return o.initData(mf(s,(function(e){return e[0]})),null,l),i.initData(mf(s,(function(e){return e[1]})),null,l),a.initData(mf(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:o,to:i,line:a}}(o,e,t),c=u.from,d=u.to,h=u.line;gW(t).from=c,gW(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),m=t.get("symbolRotate"),g=t.get("symbolOffset");function v(t,n,o){var i=t.getItemModel(n);wW(t,n,o,e,r);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=PI(a,"color")),t.setItemVisual(n,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:Af(i.get("symbolOffset",!0),g[o?0:1]),symbolRotate:Af(i.get("symbolRotate",!0),m[o?0:1]),symbolSize:Af(i.get("symbolSize"),f[o?0:1]),symbol:Af(i.get("symbol",!0),p[o?0:1]),style:s})}wf(p)||(p=[p,p]),wf(f)||(f=[f,f]),wf(m)||(m=[m,m]),wf(g)||(g=[g,g]),u.from.each((function(e){v(c,e,!0),v(d,e,!1)})),h.each((function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})})),l.updateData(h),u.line.eachItemGraphicEl((function(e){Jw(e).dataModel=t,e.traverse((function(e){Jw(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(VH);const CW=SW;var kW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(RH);const _W=kW;function MW(e,t,n){var r=t.coordinateSystem;e.each((function(o){var i,a=e.getItemModel(o),s=Yy(a.get("x"),n.getWidth()),l=Yy(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(r){var u=e.get(r.dimensions[0],o),c=e.get(r.dimensions[1],o);i=r.dataToPoint([u,c])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(o,i)}))}var TW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Fp(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=RH.getMarkerModelFromSeries(e,"markPoint");t&&(MW(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new mE),u=function(e,t,n){var r;r=e?mf(e&&e.dimensions,(function(e){return uf(uf({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new bA(r,n),i=mf(n.get("data"),xf(LH,t));e&&(i=vf(i,xf(FH,e)));var a=jH(!!e,r);return o.initData(i,null,a),o}(o,e,t);t.setData(u),MW(t.getData(),e,r),u.each((function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),o=n.getShallow("symbolSize"),i=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Sf(r)||Sf(o)||Sf(i)||Sf(s)){var c=t.getRawValue(e),d=t.getDataParams(e);Sf(r)&&(r=r(c,d)),Sf(o)&&(o=o(c,d)),Sf(i)&&(i=i(c,d)),Sf(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=PI(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:r,symbolSize:o,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:h})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){Jw(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(VH);const PW=TW;function RW(e,t,n){var r=Wp.createCanvas(),o=t.getWidth(),i=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=o*n,r.height=i*n,r}const IW=function(e){function t(t,n,r){var o,i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,r=r||uy,"string"==typeof t?o=RW(t,n,r):Mf(t)&&(t=(o=t).id),i.id=t,i.dom=o;var a=o.style;return a&&(Uf(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),i.painter=n,i.dpr=r,i}return Qf(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=RW("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,i=[],a=this.maxRepaintRectCount,s=!1,l=new rg(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new rg(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,o=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=h.dpr,w=0;w0&&e>r[0]){for(s=0;se);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r0?AW:0),this._needsManuallyCompositing),u.__builtin__||af("ZLevel "+l+" has been used by unkown layer "+u.id),u!==i&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,t(o),i=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}t(o),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,ff(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?lf(n[e],t,!0):n[e]=t;for(var r=0;r{if(null!==p.current&&null===f.current&&(f.current=function(e,t,n){var r=!(n&&n.ssr);if(r){var o=mO(e);if(o)return o}var i=new JD(e,t,n);return i.id="ec_"+hO++,cO[i.id]=i,r&&Zb(e,fO,i.id),qD(i),xD.trigger("afterinit",i),i}(p.current,t,{renderer:n??"canvas"}),void 0!==f.current))return f.current.setOption(c.current,!0),u?.(f.current),void 0!==s&&(s.current=f.current),()=>{null!==f.current&&(f.current.dispose(),f.current=null)}}),[s,u,t,n]),(0,d.useEffect)((()=>{f.current&&l&&(f.current.group=l,function(e){if(wf(e)){var t=e;e=null,ff(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+pO++,ff(t,(function(t){t.group=e}))}dO[e]=!0}([f.current]))}),[l,f]),(0,d.useEffect)((()=>{void 0===h.current||Eo()(h.current,e)||f.current&&(f.current.setOption(e,!0),h.current=e)}),[e]),(0,d.useLayoutEffect)((()=>{const e=fd()((()=>{f.current&&f.current.resize()}),200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[]),(0,d.useEffect)((()=>{const e=f.current;if(e&&void 0!==a)return function(e,t){if(void 0===t)return;function n(t,n){"function"==typeof n&&(!function(e){return LW.includes(e)}(t)?!function(e){return ZW.includes(e)}(t)?e.on(t,(()=>n(null,e))):e.on(t,(e=>n(e))):e.on(t,(t=>n(t,e))))}for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const r=t[e]??null;r&&n(e,r)}}(e,a),()=>{if(void 0!==e&&!0!==e.isDisposed())for(const t in a)e.off(t)}}),[a]),(0,d.useEffect)((()=>{fd()((()=>{f.current&&f.current.resize()}),200,{leading:!0})()}),[r,i]),(0,o.jsx)($o.Z,{ref:p,sx:r,style:i})}));var jW=n(315);function NW(e){const{error:t}=e;return(0,o.jsx)(jW.Z,{severity:"error",children:t.message})}var zW=n(68715);const BW=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function VW({value:e,onChange:t}){return(0,o.jsx)(Kd,{label:"Font Size",control:(0,o.jsx)(eh,{value:BW.find((t=>t.value===e)),options:BW,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}var $W=n(79119);function HW({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:r,isValid:i,onActionChange:s,onSubmit:u,onDelete:c,onCancel:d,...h}){return(0,o.jsx)(l.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},...h,children:"read"===e?(0,o.jsxs)(o.Fragment,{children:[s&&(0,o.jsx)(a.Z,{disabled:r,variant:"contained",onClick:()=>s("update"),children:"Edit"}),c&&(0,o.jsx)(a.Z,{color:"error",disabled:r,variant:"outlined",onClick:c,children:"Delete"}),d&&(u||c)&&(0,o.jsx)($W.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey[500],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),d&&(0,o.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:d,children:n})]}):(0,o.jsxs)(o.Fragment,{children:[u&&(0,o.jsx)(a.Z,{variant:"contained",disabled:!i,onClick:u,children:t}),d&&(0,o.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:d,children:n})]})})}var WW=n(70252),GW=n(97784);let UW=[],qW=[];function KW(e){if(e<768)return!1;for(let t=0,n=UW.length;;){let r=t+n>>1;if(e=qW[r]))return!0;t=r+1}if(t==n)return!1}}function YW(e){return e>=127462&&e<=127487}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let t=0,n=0;t=0&&YW(eG(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function JW(e,t,n){for(;t>0;){let r=QW(e,t-2,n);if(r=56320&&e<57344}function nG(e){return e>=55296&&e<56320}function rG(e){return e<65536?1:2}class oG{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=pG(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),aG.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=pG(this,e,t);let n=[];return this.decompose(e,t,n,0),aG.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new uG(this),o=new uG(e);for(let e=t,i=t;;){if(r.next(e),o.next(e),e=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(i+=r.value.length,r.done||i>=n)return!0}}iter(e=1){return new uG(this,e)}iterRange(e,t=this.length){return new cG(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new dG(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new iG(e):aG.from(iG.split(e,[])):oG.empty}}class iG extends oG{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.text[o],a=r+i.length;if((t?n:a)>=e)return new hG(r,a,n,i);r=a+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new iG(lG(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=sG(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new iG(t,e.length+o.length));else{let e=t.length>>1;n.push(new iG(t.slice(0,e)),new iG(t.slice(e)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof iG))return super.replace(e,t,n);[e,t]=pG(this,e,t);let r=sG(this.text,sG(n.text,lG(this.text,0,e)),t),o=this.length+n.length-(t-e);return r.length<=32?new iG(r,o):aG.from(iG.split(r,[]),o)}sliceString(e,t=this.length,n="\n"){[e,t]=pG(this,e,t);let r="";for(let o=0,i=0;o<=t&&ie&&i&&(r+=n),eo&&(r+=a.slice(Math.max(0,e-o),t-o)),o=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let o of e)n.push(o),r+=o.length+1,32==n.length&&(t.push(new iG(n,r)),n=[],r=-1);return r>-1&&t.push(new iG(n,r)),t}}class aG extends oG{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.children[o],a=r+i.length,s=n+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,n,r);r=a+1,n=s+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o=i){let o=r&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?n.push(a):a.decompose(e-i,t-i,n,o)}i=s+1}}replace(e,t,n){if([e,t]=pG(this,e,t),n.lines=o&&t<=a){let s=i.replace(e-o,t-o,n),l=this.lines-i.lines+s.lines;if(s.lines>4&&s.lines>l>>6){let o=this.children.slice();return o[r]=s,new aG(o,this.length-(t-e)+n.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=pG(this,e,t);let r="";for(let o=0,i=0;oe&&o&&(r+=n),ei&&(r+=a.sliceString(e-i,t-i,n)),i=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof aG))return 0;let n=0,[r,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==i||o==a)return n;let s=this.children[r],l=e.children[o];if(s!=l)return n+s.scanIdentical(l,t);n+=s.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new iG(n,t)}let r=Math.max(32,n>>5),o=r<<1,i=r>>1,a=[],s=0,l=-1,u=[];function c(e){let t;if(e.lines>o&&e instanceof aG)for(let t of e.children)c(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof iG&&s&&(t=u[u.length-1])instanceof iG&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,u[u.length-1]=new iG(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&d(),s+=e.lines,l+=e.length+1,u.push(e))}function d(){0!=s&&(a.push(1==u.length?u[0]:aG.from(u,l)),l=-1,s=u.length=0)}for(let t of e)c(t);return d(),1==a.length?a[0]:new aG(a,t)}}function sG(e,t,n=0,r=1e9){for(let o=0,i=0,a=!0;i=n&&(l>r&&(s=s.slice(0,r-o)),o0?1:(e instanceof iG?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],o=this.offsets[n],i=o>>1,a=r instanceof iG?r.text.length:r.children.length;if(i==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof iG){let o=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof iG?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class cG{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new uG(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class dG{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(oG.prototype[Symbol.iterator]=function(){return this.iter()},uG.prototype[Symbol.iterator]=cG.prototype[Symbol.iterator]=dG.prototype[Symbol.iterator]=function(){return this});class hG{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function pG(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function fG(e,t,n=!0,r=!0){return XW(e,t,n,r)}function mG(e,t){let n=e.charCodeAt(t);if(!(r=n,r>=55296&&r<56320&&t+1!=e.length))return n;var r;let o=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(o)?o-56320+(n-55296<<10)+65536:n}function gG(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function vG(e){return e<65536?1:2}const yG=/\r\n?|\n/;var bG=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(bG||(bG={}));class xG{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return o+(e-r);o+=a}else{if(n!=bG.Simple&&l>=e&&(n==bG.TrackDel&&re||n==bG.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?o:o+s;o+=s}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&o>=e)return!(rt)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new xG(e)}static create(e){return new xG(e)}}class wG extends xG{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return kG(this,((t,n,r,o,i)=>e=e.replace(r,r+(n-t),i)),!1),e}mapDesc(e,t=!1){return _G(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,o=0;r=0){t[r]=a,t[r+1]=i;let s=r>>1;for(;n.length0&&CG(n,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a>1].toJSON()))}return e}static of(e,t,n){let r=[],o=[],i=0,a=null;function s(e=!1){if(!e&&!r.length)return;ia||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let c=u?"string"==typeof u?oG.of(u.split(n||yG)):u:oG.empty,d=c.length;if(e==a&&0==d)return;ei&&SG(r,e-i,-1),SG(r,a-e,d),CG(o,r,c),i=a}}(e),s(!a),a}static empty(e){return new wG(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;n.length=0&&n<=0&&n==e[o+1]?e[o]+=t:o>=0&&0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function CG(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,u,i,c,d),o=u,i=c}}}function _G(e,t,n,r=!1){let o=[],i=r?[]:null,a=new TG(e),s=new TG(t);for(let e=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);SG(o,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len=0&&e=0)){if(a.done&&s.done)return i?wG.createSet(o,i):xG.create(o);throw new Error("Mismatched change set lengths")}{let t=0,n=a.len;for(;n;)if(-1==s.ins){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else{if(!(0==s.ins&&s.lent||a.ins>=0&&a.len>t)&&(e||r.length>n),i.forward2(t),a.forward(t)}}else SG(r,0,a.ins,e),o&&CG(o,r,a.text),a.next()}}class TG{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?oG.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?oG.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class PG{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new PG(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return RG.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return RG.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return RG.range(e.anchor,e.head)}static create(e,t,n){return new PG(e,t,n)}}class RG{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:RG.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new RG(e.ranges.map((e=>PG.fromJSON(e))),e.main)}static single(e,t=e){return new RG([RG.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|o)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;nr.head?RG.range(a,i):RG.range(i,a))}}return new RG(e,t)}}function IG(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let DG=0;class OG{constructor(e,t,n,r,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=DG++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(e={}){return new OG(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:AG),!!e.static,e.enables)}of(e){return new EG([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new EG(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new EG(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function AG(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class EG{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=DG++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,u=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||u.push(e[n.id]);return{create:e=>(e.values[i]=n(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||ZG(e,u)){let t=n(e);if(a?!LG(t,e.values[i],r):!r(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=XG(t,l);if(this.dependencies.every((n=>n instanceof OG?t.facet(n)===e.facet(n):!(n instanceof NG)||t.field(n,!1)==e.field(n,!1)))||(a?LG(s=n(e),o,r):r(s=n(e),o)))return e.values[i]=o,0}else s=n(e);return e.values[i]=s,1}}}}function LG(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id])),o=n.map((e=>e.type)),i=r.filter((e=>!(1&e))),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(jG).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],o=this.updateF(r,n);return this.compareF(r,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>{let r,o=e.facet(jG),i=n.facet(jG);return(r=o.find((e=>e.field==this)))&&r!=i.find((e=>e.field==this))?(e.values[t]=r.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,jG.of({field:this,create:e})]}get extension(){return this}}const zG=4,BG=3,VG=2,$G=1;function HG(e){return t=>new GG(t,e)}const WG={highest:HG(0),high:HG($G),default:HG(VG),low:HG(BG),lowest:HG(zG)};class GG{constructor(e,t){this.inner=e,this.prec=t}}class UG{of(e){return new qG(this,e)}reconfigure(e){return UG.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class qG{constructor(e,t){this.compartment=e,this.inner=t}}class KG{constructor(e,t,n,r,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],o=Object.create(null),i=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],o=new Map;function i(e,a){let s=o.get(e);if(null!=s){if(s<=a)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof qG&&n.delete(e.compartment)}if(o.set(e,a),Array.isArray(e))for(let t of e)i(t,a);else if(e instanceof qG){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),i(r,a)}else if(e instanceof GG)i(e.inner,e.prec);else if(e instanceof NG)r[a].push(e),e.provides&&i(e.provides,a);else if(e instanceof EG)r[a].push(e),e.facet.extensions&&i(e.facet.extensions,VG);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(t,a)}}return i(e,VG),r.reduce(((e,t)=>e.concat(t)))}(e,t,i))n instanceof NG?r.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),s=[],l=[];for(let e of r)a[e.id]=l.length<<1,l.push((t=>e.slot(t)));let u=null==n?void 0:n.config.facets;for(let e in o){let t=o[e],r=t[0].facet,i=u&&u[e]||[];if(t.every((e=>0==e.type)))if(a[r.id]=s.length<<1|1,AG(i,t))s.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));s.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));a[r.id]=l.length<<1,l.push((e=>FG(e,r,t)))}}let c=l.map((e=>e(a)));return new KG(e,i,c,a,s,o)}}function YG(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function XG(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const QG=OG.define(),JG=OG.define({combine:e=>e.some((e=>e)),static:!0}),eU=OG.define({combine:e=>e.length?e[0]:void 0,static:!0}),tU=OG.define(),nU=OG.define(),rU=OG.define(),oU=OG.define({combine:e=>!!e.length&&e[0]});class iU{constructor(e,t){this.type=e,this.value=t}static define(){return new aU}}class aU{of(e){return new iU(this,e)}}class sU{constructor(e){this.map=e}of(e){return new lU(this,e)}}class lU{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new lU(this.type,t)}is(e){return this.type==e}static define(e={}){return new sU(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}lU.reconfigure=lU.define(),lU.appendConfig=lU.define();class uU{constructor(e,t,n,r,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&IG(n,t.newLength),o.some((e=>e.type==uU.time))||(this.annotations=o.concat(uU.time.of(Date.now())))}static create(e,t,n,r,o,i){return new uU(e,t,n,r,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(uU.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function cU(e,t){let n=[];for(let r=0,o=0;;){let i,a;if(r=e[r]))i=e[r++],a=e[r++];else{if(!(o=0;o--){let i=n[o](e);i&&Object.keys(i).length&&(r=dU(r,hU(t,i,e.changes.newLength),!0))}return r==e?e:uU.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(tU)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:cU(n,t))}if(!0!==n){let r,o;if(!1===n)o=e.changes.invertedDesc,r=wG.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=uU.create(t,r,e.selection&&e.selection.map(o),lU.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let r=t.facet(nU);for(let n=r.length-1;n>=0;n--){let o=r[n](e);e=o instanceof uU?o:Array.isArray(o)&&1==o.length&&o[0]instanceof uU?o[0]:pU(t,mU(o),!1)}return e}(o):o)}uU.time=iU.define(),uU.userEvent=iU.define(),uU.addToHistory=iU.define(),uU.remote=iU.define();const fU=[];function mU(e){return null==e?fU:Array.isArray(e)?e:[e]}var gU=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(gU||(gU={}));const vU=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let yU;try{yU=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function bU(e){return t=>{if(!/\S/.test(t))return gU.Space;if(function(e){if(yU)return yU.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||vU.test(n)))return!0}return!1}(t))return gU.Word;for(let n=0;n-1)return gU.Word;return gU.Other}}class xU{constructor(e,t,n,r,o,i){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;eo.set(t,e))),n=null),o.set(t.value.compartment,t.value.extension)):t.is(lU.reconfigure)?(n=null,r=t.value):t.is(lU.appendConfig)&&(n=null,r=mU(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=KG.resolve(r,o,this),t=new xU(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let i=e.startState.facet(JG)?e.newSelection:e.newSelection.asSingle();new xU(n,e.newDoc,i,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:RG.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),o=[n.range],i=mU(n.effects);for(let n=1;no.spec.fromJSON(i,e))))}return xU.create({doc:e.doc,selection:RG.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=KG.resolve(e.extensions||[],new Map),n=e.doc instanceof oG?e.doc:oG.of((e.doc||"").split(t.staticFacet(xU.lineSeparator)||yG)),r=e.selection?e.selection instanceof RG?e.selection:RG.single(e.selection.anchor,e.selection.head):RG.single(0);return IG(r,n.length),t.staticFacet(JG)||(r=r.asSingle()),new xU(t,n,r,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(xU.tabSize)}get lineBreak(){return this.facet(xU.lineSeparator)||"\n"}get readOnly(){return this.facet(oU)}phrase(e,...t){for(let t of this.facet(xU.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]}))),e}languageDataAt(e,t,n=-1){let r=[];for(let o of this.facet(QG))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&r.push(i[e]);return r}charCategorizer(e){return bU(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-n,a=e-n;for(;i>0;){let e=fG(t,i,!1);if(o(t.slice(e,i))!=gU.Word)break;i=e}for(;ae.length?e[0]:4}),xU.lineSeparator=eU,xU.readOnly=oU,xU.phrases=OG.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((n=>e[n]==t[n]))}}),xU.languageData=QG,xU.changeFilter=tU,xU.transactionFilter=nU,xU.transactionExtender=rU,UG.reconfigure=lU.define();class SU{eq(e){return this==e}range(e,t=e){return CU.create(e,t,this)}}SU.prototype.startSide=SU.prototype.endSide=0,SU.prototype.point=!1,SU.prototype.mapMode=bG.TrackDel;class CU{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new CU(e,t,n)}}function kU(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class _U{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let o=n?this.to:this.from;for(let i=r,a=o.length;;){if(i==a)return i;let r=i+a>>1,s=o[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==i)return s>=0?i:a;s>=0?a=r:i=r+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);ou||l==u&&c.startSide>0&&c.endSide<=0)continue;(u-l||c.endSide-c.startSide)<0||(i<0&&(i=l),c.point&&(a=Math.max(a,u-l)),n.push(c),r.push(l-i),o.push(u-i))}return{mapped:n.length?new _U(r,o,n,a):null,pos:i}}}class MU{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new MU(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(n&&(t=t.slice().sort(kU)),this.isEmpty)return t.length?MU.of(t):this;let a=new RU(this,null,-1).goto(0),s=0,l=[],u=new TU;for(;a.value||s=0){let e=t[s++];u.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||oa.to||o=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return IU.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return IU.from(e).goto(t)}static compare(e,t,n,r,o=-1){let i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=PU(i,a,n),l=new OU(i,s,o),u=new OU(a,s,o);n.iterGaps(((e,t,n)=>AU(l,e,u,t,n,r))),n.empty&&0==n.length&&AU(l,0,u,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let a=PU(o,i),s=new OU(o,a,0).goto(n),l=new OU(i,a,0).goto(n);for(;;){if(s.to!=l.to||!EU(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(e,t,n,r,o=-1){let i=new OU(e,null,o).goto(t),a=t,s=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFroma&&(r.span(a,e,i.active,s),s=i.openEnd(e));if(i.to>n)return s+(i.point&&i.to>n?1:0);a=i.to,i.next()}}static of(e,t=!1){let n=new TU;for(let r of e instanceof CU?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(kU);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return MU.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=MU.empty;r=r.nextLayer)t=new MU(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}MU.empty=new MU([],[],null,-1),MU.empty.nextLayer=MU.empty;class TU{finishChunk(e){this.chunks.push(new _U(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new TU)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(MU.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=MU.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function PU(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new RU(i,t,n,o));return 1==r.length?r[0]:new IU(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)DU(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)DU(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),DU(this.heap,0)}}}function DU(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let o=e[r];if(r+1=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class OU{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=IU.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){LU(this.active,e),LU(this.activeTo,e),LU(this.activeRank,e),this.minActive=FU(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:o}=this.cursor;for(;t0;)t++;ZU(this.active,t,n),ZU(this.activeTo,t,r),ZU(this.activeRank,t,o),e&&ZU(e,t,this.cursor.from),this.minActive=FU(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&LU(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function AU(e,t,n,r,o,i){e.goto(t),n.goto(r);let a=r+o,s=r,l=r-t;for(;;){let t=e.to+l-n.to,r=t||e.endSide-n.endSide,o=r<0?e.to+l:n.to,u=Math.min(o,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&EU(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(s,u,e.point,n.point):u>s&&!EU(e.active,n.active)&&i.compareRange(s,u,e.active,n.active),o>a)break;(t||e.openEnd!=n.openEnd)&&i.boundChange&&i.boundChange(o),s=o,r<=0&&e.next(),r>=0&&n.next()}}function EU(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function FU(e,t){let n=-1,r=1e9;for(let o=0;o=t)return r;if(r==e.length)break;o+=9==e.charCodeAt(r)?n-o%n:1,r=fG(e,r)}return!0===r?-1:e.length}const zU="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),BU="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),VU="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class $U{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),u=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let n in t){let a=t[n];if(/&/.test(n))o(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");o(r(n),a,s,u)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+a+";")}(s.length||u)&&i.push((!n||l||a?e:e.map(n)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=VU[zU]||1;return VU[zU]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[BU],o=n&&n.nonce;r?o&&r.setNonce(o):r=new WU(e,o),r.mount(Array.isArray(t)?t:[t],e)}}let HU=new Map;class WU{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=HU.get(n);if(t)return e[BU]=t;this.sheet=new r.CSSStyleSheet,HU.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[BU]=this}mount(e,t){let n=this.sheet,r=0,o=0;for(let t=0;t-1&&(this.modules.splice(a,1),o--,a=-1),-1==a){if(this.modules.splice(o++,0,i),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},qU="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),KU="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),YU=0;YU<10;YU++)GU[48+YU]=GU[96+YU]=String(YU);for(YU=1;YU<=24;YU++)GU[YU+111]="F"+YU;for(YU=65;YU<=90;YU++)GU[YU]=String.fromCharCode(YU+32),UU[YU]=String.fromCharCode(YU);for(var XU in GU)UU.hasOwnProperty(XU)||(UU[XU]=GU[XU]);let QU="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},JU="undefined"!=typeof document?document:{documentElement:{style:{}}};const eq=/Edge\/(\d+)/.exec(QU.userAgent),tq=/MSIE \d/.test(QU.userAgent),nq=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(QU.userAgent),rq=!!(tq||nq||eq),oq=!rq&&/gecko\/(\d+)/i.test(QU.userAgent),iq=!rq&&/Chrome\/(\d+)/.exec(QU.userAgent),aq="webkitFontSmoothing"in JU.documentElement.style,sq=!rq&&/Apple Computer/.test(QU.vendor),lq=sq&&(/Mobile\/\w+/.test(QU.userAgent)||QU.maxTouchPoints>2);var uq={mac:lq||/Mac/.test(QU.platform),windows:/Win/.test(QU.platform),linux:/Linux|X11/.test(QU.platform),ie:rq,ie_version:tq?JU.documentMode||6:nq?+nq[1]:eq?+eq[1]:0,gecko:oq,gecko_version:oq?+(/Firefox\/(\d+)/.exec(QU.userAgent)||[0,0])[1]:0,chrome:!!iq,chrome_version:iq?+iq[1]:0,ios:lq,android:/Android\b/.test(QU.userAgent),webkit:aq,webkit_version:aq?+(/\bAppleWebKit\/(\d+)/.exec(QU.userAgent)||[0,0])[1]:0,safari:sq,safari_version:sq?+(/\bVersion\/(\d+(\.\d+)?)/.exec(QU.userAgent)||[0,0])[1]:0,tabSize:null!=JU.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function cq(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function dq(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function hq(e,t){if(!t.anchorNode)return!1;try{return dq(e,t.anchorNode)}catch(e){return!1}}function pq(e){return 3==e.nodeType?Mq(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function fq(e,t,n,r){return!!n&&(vq(e,t,n,r,-1)||vq(e,t,n,r,1))}function mq(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function gq(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function vq(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:yq(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=mq(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?yq(e):0}}}function yq(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function bq(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function xq(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function wq(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class Sq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?yq(t):0),n,Math.min(e.focusOffset,n?yq(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let Cq,kq=null;function _q(e){if(e.setActive)return e.setActive();if(kq)return e.focus(kq);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==kq?{get preventScroll(){return kq={preventScroll:!0},!0}}:void 0),!kq){kq=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function Iq(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=yq(n)}else{if(!n.parentNode||gq(n))return null;r=mq(n),n=n.parentNode}}}function Dq(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r=26&&(kq=!1);class Oq{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Oq(e.parentNode,mq(e),t)}static after(e,t){return new Oq(e.parentNode,mq(e)+1,t)}}const Aq=[];class Eq{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,o=null;for(let i of this.children){if(7&i.flags){if(!i.dom&&(n=o?o.nextSibling:r.firstChild)){let e=Eq.get(n);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(n)}i.sync(e,t),i.flags&=-8}if(n=o?o.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=i.dom&&(t.written=!0),i.dom.parentNode==r)for(;n&&n!=i.dom;)n=Lq(n);else r.insertBefore(i.dom,n);o=i.dom}for(n=o?o.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=Lq(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==yq(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Eq.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,o=-1,i=-1,a=-1;for(let s=0,l=n,u=n;st)return n.domBoundsAround(e,t,l);if(c>=e&&-1==r&&(r=s,o=l),l>t&&n.dom.parentNode==this.dom){i=s,a=u;break}u=c,l=c+n.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=Aq){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Fq(e,t,n,r,o,i,a,s,l){let{children:u}=e,c=u.length?u[t]:null,d=i.length?i[i.length-1]:null,h=d?d.breakAfter:a;if(!(t==r&&c&&!a&&!h&&i.length<2&&c.merge(n,o,i.length?d:null,0==n,s,l))){if(r0&&(!a&&i.length&&c.merge(n,c.length,i[0],!1,s,0)?c.breakAfter=i.shift().breakAfter:(n256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Nq(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Oq(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let o=t,i=t,a=0;0==t&&n<0||t==r&&n>=0?uq.chrome||uq.gecko||(t?(o--,a=1):i=0)?0:s.length-1];uq.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(e=>e.width))||l);return a?bq(l,a<0):l||null}(this.dom,e,t)}}class zq extends Eq{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(Pq(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,o,i){return(!n||!(!(n instanceof zq&&n.mark.eq(this.mark))||e&&o<=0||te&&t.push(n=e&&(r=o),n=a,o++}let i=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new zq(this.mark,t,i)}domAtPos(e){return $q(this,e)}coordsAt(e,t){return Wq(this,e,t)}}class Bq extends Eq{static create(e,t,n){return new Bq(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Bq.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof Bq&&this.widget.compare(n.widget))||e>0&&o<=0||t0)?Oq.before(this.dom):Oq.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?r.length-1:0;o=r[t],!(e>0?0==t:t==r.length-1||o.top0?Oq.before(this.dom):Oq.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return oG.empty}get isHidden(){return!0}}function $q(e,t){let n=e.dom,{children:r}=e,o=0;for(let e=0;oe&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=o;e0&&t instanceof zq&&o.length&&(r=o[o.length-1])instanceof zq&&r.mark.eq(t.mark)?Hq(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function Wq(e,t,n){let r=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,u=0;l=s&&(c.children.length?e(c,s-u):(!i||i.isHidden&&(n>0||Gq(i,c)))&&(d>s||u==d&&c.getSide()>0)?(i=c,a=s-u):(u-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function Yq(e,t,n){let r=!1;if(t)for(let o in t)n&&o in n||(r=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function Xq(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new rK(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:o,end:i}=oK(e,r);t=(o?r?-3e8:-1:5e8)-1,n=1+(i?r?2e8:1:-6e8)}return new rK(e,t,n,r,e.widget||null,!0)}static line(e){return new nK(e)}static set(e,t=!1){return MU.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}eK.none=MU.empty;class tK extends eK{constructor(e){let{start:t,end:n}=oK(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof tK&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&Kq(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}tK.prototype.point=!1;class nK extends eK{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof nK&&this.spec.class==e.spec.class&&Kq(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}nK.prototype.mapMode=bG.TrackBefore,nK.prototype.point=!0;class rK extends eK{constructor(e,t,n,r,o,i){super(t,n,o,e),this.block=r,this.isReplace=i,this.mapMode=r?t<=0?bG.TrackBefore:bG.TrackAfter:bG.TrackDel}get type(){return this.startSide!=this.endSide?Jq.WidgetRange:this.startSide<=0?Jq.WidgetBefore:Jq.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof rK&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function oK(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function iK(e,t,n,r=0){let o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}rK.prototype.point=!0;class aK extends Eq{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,o,i){if(n){if(!(n instanceof aK))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),jq(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let t=new aK;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Kq(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Hq(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=Uq(t,this.attrs||{})),n&&(this.attrs=Uq({class:n},this.attrs||{}))}domAtPos(e){return $q(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(Pq(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Yq(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Eq.get(r)instanceof zq;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=Eq.get(r))||void 0===n?void 0:n.isEditable)||uq.ios&&this.children.some((e=>e instanceof Nq))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof Nq)||/[^ -~]/.test(n.text))return null;let r=pq(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=Wq(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(o instanceof aK)return o;if(i>t)break}r=i+o.breakAfter}return null}}class sK extends Eq{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof sK&&this.widget.compare(n.widget))||e>0&&o<=0||t0)}}class lK extends Qq{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class uK{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof sK&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new aK),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(cK(new Vq(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof sK||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e),o=Math.min(r,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(cK(new Nq(this.text.slice(this.textOff,this.textOff+o)),t),n),this.atCursorPos=!0,this.textOff+=o,e-=o,n=r<=o?0:t.length}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof rK){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof rK)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new sK(n.widget||dK.block,a,n));else{let i=Bq.create(n.widget||dK.inline,a,a?0:n.startSide),s=this.atCursorPos&&!i.isEditable&&o<=r.length&&(e0),l=!i.isEditable&&(er.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(u.append(cK(new Vq(1),r),o),o=r.length+Math.max(0,o-r.length)),u.append(cK(i,r),o),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,r,o){let i=new uK(e,t,n,o);return i.openEnd=MU.spans(r,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function cK(e,t){for(let n of t)e=new zq(n,[e],e.length);return e}class dK extends Qq{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}dK.inline=new dK("span"),dK.block=new dK("div");var hK=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(hK||(hK={}));const pK=hK.LTR,fK=hK.RTL;function mK(e){let t=[];for(let n=0;n=t){if(a.level==n)return i;(o<0||(0!=r?r<0?a.fromt:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}function CK(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&a.push(new SK(l,f.from,h)),MK(e,f.direction==pK!=!(h%2)?r+1:r,o,f.inner,f.from,f.to,a),l=f.to}p=f.to}else{if(p==n||(t?kK[p]!=s:kK[p]==s))break;p++}d?_K(e,l,p,r+1,o,d,a):lt;){let n=!0,c=!1;if(!u||l>i[u-1].to){let e=kK[l-1];e!=s&&(n=!1,c=16==e)}let d=n||1!=s?null:[],h=n?r:r+1,p=l;e:for(;;)if(u&&p==i[u-1].to){if(c)break e;let f=i[--u];if(!n)for(let e=f.from,n=u;;){if(e==t)break e;if(!n||i[n-1].to!=e){if(kK[e-1]==s)break e;break}e=i[--n].from}if(d)d.push(f);else{f.to=0;e-=3)if(bK[e+1]==-n){let t=bK[e+2],n=2&t?o:4&t?1&t?i:o:0;n&&(kK[a]=kK[bK[e]]=n),s=e;break}}else{if(189==bK.length)break;bK[s++]=a,bK[s++]=t,bK[s++]=l}else if(2==(r=kK[a])||1==r){let e=r==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let n=bK[t+2];if(2&n)break;if(e)bK[t+2]|=2;else{if(4&n)break;bK[t+2]|=4}}}}}(e,o,i,r,s),function(e,t,n,r){for(let o=0,i=r;o<=n.length;o++){let a=o?n[o-1].to:e,s=ol;)t==i&&(t=n[--r].from,i=r?n[r-1].to:e),kK[--t]=c;l=a}else i=a,l++}}}(o,i,r,s),_K(e,o,i,t,n,r,a)}function TK(e,t,n){if(!e)return[new SK(0,0,t==fK?1:0)];if(t==pK&&!n.length&&!wK.test(e))return PK(e.length);if(n.length)for(;e.length>kK.length;)kK[kK.length]=256;let r=[],o=t==pK?0:1;return MK(e,o,o,n,0,e.length,r),r}function PK(e){return[new SK(0,e,0)]}let RK="";function IK(e,t,n,r,o){var i;let a=r.head-e.from,s=SK.find(t,a,null!==(i=r.bidiLevel)&&void 0!==i?i:-1,r.assoc),l=t[s],u=l.side(o,n);if(a==u){let e=s+=o?1:-1;if(e<0||e>=t.length)return null;l=t[s=e],a=l.side(!o,n),u=l.side(o,n)}let c=fG(e.text,a,l.forward(o,n));(cl.to)&&(c=u),RK=e.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d&&c==u&&d.level+(o?0:1)e.some((e=>e))}),VK=OG.define({combine:e=>e.some((e=>e))}),$K=OG.define();class HK{constructor(e,t="nearest",n="nearest",r=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new HK(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new HK(RG.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const WK=lU.define({map:(e,t)=>e.map(t)}),GK=lU.define();function UK(e,t,n){let r=e.facet(LK);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}const qK=OG.define({combine:e=>!e.length||e[0]});let KK=0;const YK=OG.define({combine:e=>e.filter(((t,n)=>{for(let r=0;r{let t=[];return i&&t.push(tY.of((t=>{let n=t.plugin(e);return n?i(n):eK.none}))),o&&t.push(o(e)),t}))}static fromClass(e,t){return XK.define(((t,n)=>new e(t,n)),t)}}class QK{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(UK(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){UK(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){UK(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const JK=OG.define(),eY=OG.define(),tY=OG.define(),nY=OG.define(),rY=OG.define(),oY=OG.define();function iY(e,t){let n=e.state.facet(oY);if(!n.length)return n;let r=n.map((t=>t instanceof Function?t(e):t)),o=[];return MU.spans(r,t.from,t.to,{point(){},span(e,n,r,i){let a=e-t.from,s=n-t.from,l=o;for(let e=r.length-1;e>=0;e--,i--){let n,o=r[e].spec.bidiIsolate;if(null==o&&(o=DK(t.text,a,s)),i>0&&l.length&&(n=l[l.length-1]).to==a&&n.direction==o)n.to=s,l=n.inner;else{let e={from:a,to:s,direction:o,inner:[]};l.push(e),l=e.inner}}}}),o}const aY=OG.define();function sY(e){let t=0,n=0,r=0,o=0;for(let i of e.state.facet(aY)){let a=i(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(n=Math.max(n,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(o=Math.max(o,a.bottom)))}return{left:t,right:n,top:r,bottom:o}}const lY=OG.define();class uY{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new uY(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAu)break;o+=2}if(!s)return n;new uY(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),i=s.toA,a=s.toB}}}class cY{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=wG.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges(((e,t,n,o)=>r.push(new uY(e,t,n,o)))),this.changedRanges=r}static create(e,t,n){return new cY(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class dY extends Eq{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=eK.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new aK],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new uY(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,r)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let o=r>-1?function(e,t,n){let r=hY(e,n);if(!r)return null;let{node:o,from:i,to:a}=r,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;let l=t.invertedDesc,u=new uY(l.mapPos(i),l.mapPos(a),i,a),c=[];for(let t=o.parentNode;;t=t.parentNode){let n=Eq.get(t);if(n instanceof zq)c.push({node:t,deco:n.mark});else{if(n instanceof aK||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:u,text:o,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new tK({inclusive:!0,attributes:Xq(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new uY(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(uq.ie||uq.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,n){let r=new pY;return MU.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=uY.extendWithRanges(n,i),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=uq.chrome||uq.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let i,a,s,l,{fromA:u,toA:c,fromB:d,toB:h}=t;if(n&&n.range.fromBd){let e=uK.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=uK.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),i=e.content.concat(r).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=uK.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=o.findPos(c,1),{i:m,off:g}=o.findPos(u,-1);Fq(this,m,g,p,f,i,a,s,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(GK)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new Nq(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new zq(n,[t],t.length);let n=new aK;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=Eq.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)n=r.childPos(n.off,1),r=r.children[n.i],t(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,o=!r&&!(this.view.state.facet(qK)||this.dom.tabIndex>-1)&&hq(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||o))return;let i=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(uq.gecko&&a.empty&&!this.hasComposition&&(1==(u=s).node.nodeType&&u.node.firstChild&&(0==u.offset||"false"==u.node.childNodes[u.offset-1].contentEditable)&&(u.offset==u.node.childNodes.length||"false"==u.node.childNodes[u.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null))),s=l=new Oq(e,0),i=!0}var u;let c=this.view.observer.selectionRange;!i&&c.focusNode&&(fq(s.node,s.offset,c.anchorNode,c.anchorOffset)&&fq(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore((()=>{uq.android&&uq.chrome&&this.dom.contains(c.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=cq(this.view.root);if(e)if(a.empty){if(uq.gecko){let e=(t=s.node,r=s.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(ra.head&&([s,l]=[l,s]),t.setEnd(l.node,l.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new Oq(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new Oq(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&fq(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=cq(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let i=aK.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&n.collapse(r,o)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=Eq.get(n.childNodes[r]);e instanceof aK&&(t=e.domAtPos(e.length))}return t?new Oq(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=Eq.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(se||a.covers(1))&&(!n||a instanceof aK&&!(n instanceof aK&&t>=0)))n=a,r=l;else if(n&&l==e&&s==e&&a instanceof sK&&Math.abs(t)<2){if(a.deco.startSide<0)break;i&&(n=null)}o=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof aK))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof Nq))return null;let o=fG(r.text,n);if(o==n)return null;let i=Mq(r.dom,n,o).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==hK.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=u.dom.getBoundingClientRect();if(t.push(n.height),i){let t=u.dom.lastChild,r=t?pq(t):[];if(r.length){let t=r[r.length-1],i=s?t.right-n.left:n.right-t.left;i>a&&(a=i,this.minWidth=o,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?hK.RTL:hK.LTR}measureTextSize(){for(let e of this.children)if(e instanceof aK){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let o=pq(r.firstChild)[0];e=r.getBoundingClientRect().height,t=o?o.width/27:7,n=o?o.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Zq(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){let r=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(eK.replace({widget:new lK(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return eK.set(e)}updateDeco(){let e=1,t=this.view.state.facet(tY).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,r=this.view.state.facet(nY).map(((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e}));for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(MU.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let o=sY(this.view),i={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,r,o,i,a,s){let l=e.ownerDocument,u=l.defaultView||window;for(let c=e,d=!1;c&&!d;)if(1==c.nodeType){let e,h=c==l.body,p=1,f=1;if(h)e=xq(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:p,scaleY:f}=wq(c,t)),e={left:t.left,right:t.left+c.clientWidth*p,top:t.top,bottom:t.top+c.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+i)):t.right>e.right&&(m=t.right-e.right+i,n<0&&t.lefte.bottom||t.lefte.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,i,n.heade instanceof Bq||e.children.some(n);return n(this.children[t])}}function hY(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Iq(n.focusNode,n.focusOffset),o=Dq(n.focusNode,n.focusOffset),i=r||o;if(o&&r&&o.node!=r.node){let t=Eq.get(o.node);if(!t||t instanceof Nq&&t.text!=o.node.nodeValue)i=o;else if(e.docView.lastCompositionAfterCursor){let e=Eq.get(r.node);!e||e instanceof Nq&&e.text!=r.node.nodeValue||(i=o)}}if(e.docView.lastCompositionAfterCursor=i!=r,!i)return null;let a=t-i.offset;return{from:a,to:a+i.node.nodeValue.length,node:i.node}}let pY=class{constructor(){this.changes=[]}compareRange(e,t){iK(e,t,this.changes)}comparePoint(e,t){iK(e,t,this.changes)}boundChange(e){iK(e,e,this.changes)}};function fY(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function mY(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function gY(e,t){return e.topt.top+1}function vY(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function bY(e,t,n){let r,o,i,a,s,l,u,c,d=!1;for(let h=e.firstChild;h;h=h.nextSibling){let e=pq(h);for(let p=0;pg||a==g&&i>m)&&(r=h,o=f,i=m,a=g,d=!m||(t0:pf.bottom&&(!u||u.bottomf.top)&&(l=h,c=f):u&&gY(u,f)?u=yY(u,f.bottom):c&&gY(c,f)&&(c=vY(c,f.top))}}if(u&&u.bottom>=n?(r=s,o=u):c&&c.top<=n&&(r=l,o=c),!r)return{node:e,offset:0};let h=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?xY(r,h,n):d&&"false"!=r.contentEditable?bY(r,h,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function xY(e,t,n){let r=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&c=(u.left+u.right)/2,r=n;if(uq.chrome||uq.gecko){let t=Mq(e,s).getBoundingClientRect();Math.abs(t.left-u.right)<.1&&(r=!n)}if(c<=0)return{node:e,offset:s+(r?1:0)};o=s+(r?1:0),i=c}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function wY(e,t,n,r=-1){var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:u}=e.viewState,{x:c,y:d}=t,h=d-l;if(h<0)return 0;if(h>u)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(h),a.type!=Jq.Text;)for(;h=r>0?a.bottom+t:a.top-t,!(h>=0&&h<=u);){if(o)return n?null:0;o=!0,r=-r}d=l+h;let p=a.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:SY(e,s,a,c,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(c,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(c=Math.max(s.left+1,Math.min(s.right-1,c)),g=m.elementFromPoint(c,d),g&&!e.contentDOM.contains(g)&&(g=null));let v,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,d);e&&({offsetNode:v,offset:y}=e)}else if(f.caretRangeFromPoint){let e=f.caretRangeFromPoint(c,d);e&&({startContainer:v,startOffset:y}=e)}v&&(!e.contentDOM.contains(v)||uq.safari&&function(e,t,n){return CY(e,t,n)}(v,y,c)||uq.chrome&&function(e,t,n){if(0!=t)return CY(e,t,n);for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():Mq(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(v,y,c))&&(v=void 0),v&&(y=Math.min(yq(v),y))}if(!v||!e.docView.dom.contains(v)){let t=aK.find(e.docView,p);if(!t)return h>a.top+a.height/2?a.to:a.from;({node:v,offset:y}=bY(t.dom,c,d))}let b=e.docView.nearest(v);if(!b)return null;if(b.isWidget&&1==(null===(i=b.dom)||void 0===i?void 0:i.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+NU(a,i,e.state.tabSize)}function CY(e,t,n){let r,o=e;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(;;){let e=o.nextSibling;if(e){if("BR"==e.nodeName)break;return!1}{let e=o.parentNode;if(!e||"DIV"==e.nodeName)break;o=e}}return Mq(e,r-1,r).getBoundingClientRect().right>n}function kY(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let o of r.type){if(o.from>t)break;if(!(o.tot)return o;e&&(o.type!=Jq.Text||e.type==o.type&&!(n<0?o.fromt))||(e=o)}}return e||r}return r}function _Y(e,t,n,r){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=IK(o,i,a,s,n),u=RK;if(!t){if(o.number==(n?e.state.doc.lines:1))return s;u="\n",o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),t=e.visualLineSide(o,!n)}if(l){if(!l(u))return s}else{if(!r)return t;l=r(u)}s=t}}function MY(e,t,n){for(;;){let r=0;for(let o of e)o.between(t-1,t+1,((e,o,i)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return r==n.from?n:RG.cursor(r,re)&&!OY(o,t)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){if(e.cmIgnore)return;let t=Eq.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(DY(e,n.node,n.offset)?t:0))}}function DY(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:o,impreciseAnchor:i}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;n&&(t.push(new AY(n,r)),o==n&&i==r||t.push(new AY(o,i)));return t}(e),n=new IY(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?RG.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!dq(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!dq(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((uq.ios||uq.chrome)&&e.state.selection.main.empty&&n!=r&&(a.from>0||a.to-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(RG.range(r,n)):this.newSel=RG.single(r,n)}}}function LY(e,t){let n,{newSel:r}=t,o=e.state.selection.main,i=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:a}=t.bounds,s=o.from,l=null;(8===i||uq.android&&t.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:e.state.doc.lineAt(o.from).toDate.now()-50?n={from:o.from,to:o.to,insert:e.state.toText(e.inputState.insertingText)}:uq.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=RG.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:oG.of([" "])}),n)return ZY(e,n,r,i);if(r&&!r.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin,"select.pointer"==n&&(r=TY(e.state.facet(rY).map((t=>t(e))),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function ZY(e,t,n,r=-1){if(uq.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(uq.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&" "==e.state.sliceDoc(t.from,o.from))&&1==t.insert.length&&2==t.insert.lines&&Tq(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.lengtho.head)&&Tq(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&Tq(e.contentDOM,"Delete",46)))return!0;let i,a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>i||(i=function(e,t,n){let r,o=e.state,i=o.selection.main,a=-1;if(t.from==t.to&&t.fromi.to){let n=t.fromt(e))),r,n);t.from==s&&(a=s)}if(a>-1)r={changes:t,selection:RG.cursor(t.from+t.insert.length,-1)};else if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=i.fromt.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=i.to+10&&t.to>=i.to-10){let l,u=e.state.sliceDoc(t.from,t.to),c=n&&hY(e,n.main.head);if(c){let e=t.insert.length-(t.to-t.from);l={from:c.from,to:c.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to;r=o.changeByRange((n=>{if(n.from==i.from&&n.to==i.to)return{changes:a,range:s||n.map(a)};let r=n.to-d,c=r-u.length;if(e.state.sliceDoc(c,r)!=u||r>=l.from&&c<=l.to)return{range:n};let h=o.changes({from:c,to:r,insert:t.insert}),p=n.to-i.to;return{changes:h,range:s?RG.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(h)}}))}else r={changes:a,selection:s&&o.selection.replaceRange(s)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return o.update(r,{userEvent:s,scrollIntoView:!0})}(e,t,n));return e.state.facet(FK).some((n=>n(e,t.from,t.to,a,s)))||e.dispatch(s()),!0}function FY(e,t,n,r){let o=Math.min(e.length,t.length),i=0;for(;i0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,i-Math.min(a,s))-i}if(a=a?i-n:0,s=i+(s-a),a=i}else if(s=s?i-n:0,a=i+(a-s),s=i}return{from:i,toA:a,toB:s}}class jY{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,uq.safari&&e.contentDOM.addEventListener("input",(()=>null)),uq.gecko&&(t=e.contentDOM.ownerDocument,cX.has(t)||(cX.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{}))))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=Eq.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then((()=>this.runHandlers(e.type,e))):this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,o=e&&e.plugin.domEventObservers;if(r)for(let e in r){let o=r[e];o&&n(e).handlers.push(NY(t.value,o))}if(o)for(let e in o){let r=o[e];r&&n(e).observers.push(NY(t.value,r))}}for(let e in WY)n(e).handlers.push(WY[e]);for(let e in GY)n(e).observers.push(GY[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=n[e];i&&o!=!i.handlers.length&&(r.removeEventListener(e,this.handleEvent),i=null),i||r.addEventListener(e,this.handleEvent,{passive:o})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&VY.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),uq.android&&uq.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!uq.ios||e.synthetic||e.altKey||e.metaKey||!((t=zY.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||BY.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(uq.safari&&!uq.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function NY(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){UK(n.state,e)}}}const zY=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BY="dthko",VY=[16,17,18,20,91,92,224,225];function $Y(e){return.7*Math.max(0,e)+8}class HY{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t,n,r=e.ownerDocument;for(let o=e.parentNode;o&&!(o==r.body||t&&n);)if(1==o.nodeType)!n&&o.scrollHeight>o.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(rY).map((t=>t(e)));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(xU.allowMultipleSelections)&&function(e,t){let n=e.state.facet(OK);return n.length?n[0](t):uq.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=cq(e.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=oX(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,o=0,i=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:i}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=sY(this.view);e.clientX-s.left<=r+6?t=-$Y(r-e.clientX):e.clientX+s.right>=i-6&&(t=$Y(e.clientX-i)),e.clientY-s.top<=o+6?n=-$Y(o-e.clientY):e.clientY+s.bottom>=a-6&&(n=$Y(e.clientY-a)),this.setScrollSpeed(t,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=TY(this.atoms,this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some((e=>e.isUserEvent("input.type")))?this.destroy():this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const WY=Object.create(null),GY=Object.create(null),UY=uq.ie&&uq.ie_version<15||uq.ios&&uq.webkit_version<604;function qY(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function KY(e,t){t=qY(e.state,NK,t);let n,{state:r}=e,o=1,i=r.toText(t),a=i.lines==r.selection.ranges.length;if(null!=aX&&r.selection.ranges.every((e=>e.empty))&&aX==i.toString()){let e=-1;n=r.changeByRange((n=>{let s=r.doc.lineAt(n.from);if(s.from==e)return{range:n};e=s.from;let l=r.toText((a?i.line(o++).text:t)+r.lineBreak);return{changes:{from:s.from,insert:l},range:RG.cursor(n.from+l.length)}}))}else n=a?r.changeByRange((e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:RG.cursor(e.from+t.length)}})):r.replaceSelection(i);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function YY(e,t,n,r){if(1==r)return RG.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return RG.cursor(t);0==i?n=1:i==o.length&&(n=-1);let a=i,s=i;n<0?a=fG(o.text,i,!1):s=fG(o.text,i);let l=r(o.text.slice(a,s));for(;a>0;){let e=fG(o.text,a,!1);if(r(o.text.slice(e,a))!=l)break;a=e}for(;s{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},WY.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),GY.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},GY.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},WY.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(EK))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=JY(e,t),r=oX(t),o=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get(t,i,a){let s,l=JY(e,t),u=YY(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!i){let t=YY(e,n.pos,n.bias,r),o=Math.min(t.from,u.from),i=Math.max(t.to,u.to);u=o1&&(s=function(e,t){for(let n=0;n=t)return RG.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(o,l.pos))?s:a?o.addRange(u):RG.create([u])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new HY(e,t,n,r)),r&&e.observer.ignore((()=>{_q(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()}));let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let XY=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function QY(e,t,n,r){let o=aK.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&XY(n,r,a))return-1;let s=o.coordsAt(i,1);return s&&XY(n,r,s)?1:a&&a.bottom>=r?-1:1}function JY(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:QY(e,n,t.clientX,t.clientY)}}const eX=uq.ie&&uq.ie_version<=11;let tX=null,nX=0,rX=0;function oX(e){if(!eX)return e.detail;let t=tX,n=rX;return tX=e,rX=Date.now(),nX=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(nX+1)%3:1}function iX(e,t,n,r){if(!(n=qY(e.state,NK,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=r&&i&&function(e,t){let n=e.state.facet(AK);return n.length?n[0](t):uq.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:n},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}WY.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=RG.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",qY(e.state,zK,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},WY.dragend=e=>(e.inputState.draggedContent=null,!1),WY.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{++o==n.length&&iX(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return iX(e,t,n,!0),!0}return!1},WY.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=UY?null:t.clipboardData;return n?(KY(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),KY(e,n.value)}),50)}(e),!1)};let aX=null;WY.copy=WY.cut=(e,t)=>{let{text:n,ranges:r,linewise:o}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let o=-1;for(let{from:r}of e.selection.ranges){let i=e.doc.lineAt(r);i.number>o&&(t.push(i.text),n.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}r=!0}return{text:qY(e,zK,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!o)return!1;aX=o?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=UY?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((()=>{r.remove(),e.focus()}),50)}(e,n),!1)};const sX=iU.define();function lX(e,t){let n=[];for(let r of e.facet(jK)){let o=r(e,t);o&&n.push(o)}return n.length?e.update({effects:n,annotations:sX.of(!0)}):null}function uX(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=lX(e.state,t);n?e.dispatch(n):e.update([])}}),10)}GY.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),uX(e)},GY.blur=e=>{e.observer.clearSelectionRange(),uX(e)},GY.compositionstart=GY.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},GY.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,uq.chrome&&uq.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50))},GY.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},WY.beforeinput=(e,t)=>{var n,r;if("insertText"!=t.inputType&&"insertCompositionText"!=t.inputType||(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),o=t.getTargetRanges();if(r&&o.length){let t=o[0],n=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return ZY(e,{from:n,to:i,insert:e.state.toText(r)},null),!0}}let o;if(uq.chrome&&uq.android&&(o=zY.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return uq.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),uq.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>GY.compositionend(e,t)),20),!1};const cX=new Set;const dX=["pre-wrap","normal","pre-line","break-spaces"];let hX=!1;function pX(){hX=!1}class fX{constructor(e){this.lineWrapping=e,this.doc=oG.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return dX.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=o,s){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>yX&&(hX=!0),this.height=e)}replace(e,t,n){return bX.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let o=this,i=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:u,toB:c}=r[a],d=o.lineAt(s,vX.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:o.lineAt(l,vX.ByPosNoHeight,n,0,0);for(c+=h.to-l,l=h.to;a>0&&d.from<=r[a-1].toA;)s=r[a-1].fromA,u=r[a-1].fromB,a--,s2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,r-=o.size}else{if(!(o>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,o-=t.size}}else if(r=o&&i(this.blockAt(0,n,r,o))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class SX extends wX{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new gX(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof SX||r instanceof CX&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof CX?r=new SX(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):bX.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class CX extends bX{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-r+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);n=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:a}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let o=r+(e0){let e=n[n.length-1];e instanceof CX?n[n.length-1]=new CX(e.length+r):n.push(null,new CX(r-1))}if(e>0){let t=n[0];t instanceof CX?n[0]=new CX(e+t.length):n.unshift(new CX(e-1),null)}return bX.of(n)}decomposeLeft(e,t){t.push(new CX(e-1),null)}decomposeRight(e,t){t.push(null,new CX(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],i=Math.max(t,r.from),a=-1;for(r.from>t&&n.push(new CX(r.from-t-1).updateHeight(e,t));i<=o&&r.more;){let t=e.doc.lineAt(i).length;n.length&&n.push(null);let o=r.heights[r.index++];-1==a?a=o:Math.abs(o-a)>=yX&&(a=-2);let s=new SX(t,o);s.outdated=!1,n.push(s),i+=t+1}i<=o&&n.push(null,new CX(o-i).updateHeight(e,i));let s=bX.of(n);return(a<0||Math.abs(s.height-this.height)>=yX||Math.abs(a-this.heightMetrics(e,t).perLine)>=yX)&&(hX=!0),xX(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class kX extends bX{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let o=n+this.left.height;return ea))return l;let u=t==vX.ByPosNoHeight?vX.ByPosNoHeight:vX.ByPos;return s?l.join(this.right.lineAt(a,u,n,i,a)):this.left.lineAt(a,u,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let a=r+this.left.height,s=o+this.left.length+this.break;if(this.break)e=s&&this.right.forEachLine(e,t,n,a,s,i);else{let l=this.lineAt(s,vX.ByPos,n,r,o);e=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,i)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of n)o.push(e);if(e>0&&_X(o,i-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?bX.of(this.break?[e,null,t]:[e,t]):(this.left=xX(this.left,e),this.right=xX(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:o,right:i}=this,a=t+o.length+this.break,s=null;return r&&r.from<=t+o.length&&r.more?s=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=a+i.length&&r.more?s=i=i.updateHeight(e,a,n,r):i.updateHeight(e,a,n),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function _X(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof CX&&(r=e[t+1])instanceof CX&&e.splice(t-1,3,new CX(n.length+1+r.length))}class MX{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof SX?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new SX(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new SX(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new CX(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof SX)return e;let t=new SX(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof SX||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();i=Math.max(i,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(t==e.parentNode?o.innerHeight:l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}}function RX(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class IX{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new fX(t),this.stateDeco=e.facet(tY).filter((e=>"function"!=typeof e)),this.heightMap=bX.empty().applyChanges(this.stateDeco,oG.empty,this.heightOracle.setDoc(e.doc),[new uY(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=eK.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>r>=e&&r<=t))){let{from:t,to:n}=this.lineBlockAt(r);e.push(new AX(t,n))}}return this.viewports=e.sort(((e,t)=>e.from-t.from)),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ZX:new FX(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(jX(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(tY).filter((e=>"function"!=typeof e));let r=e.changedRanges,o=uY.extendWithRanges(r,function(e,t,n){let r=new TX;return MU.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:wG.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);pX(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=i||hX)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=i);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(VK)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?hK.RTL:hK.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,u=0;if(a.width&&a.height){let{scaleX:e,scaleY:n}=wq(t,a);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,i=s=!0)}let c=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==d||(this.paddingTop=c,this.paddingBottom=d,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=Rq(e.scrollDOM);let p=(this.printing?RX:PX)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}(e.dom))return 0;let v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(i=!0),i||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=n>0&&r.refresh(o,n,a,s,Math.max(5,v/a),t),i&&(e.docView.minWidth=0,l|=16)}f>0&&m>0?u=Math.max(f,m):f<0&&m<0&&(u=Math.min(f,m)),pX();for(let n of this.viewports){let o=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(i?bX.empty().applyChanges(this.stateDeco,oG.empty,this.heightOracle,[new uY(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new mX(n.from,o))}hX&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),l|=this.updateForViewport()),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new AX(r.lineAt(i-1e3*n,vX.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-n),vX.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(es.to){let n,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,vX.ByPos,o,0,0);n="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e=a+Math.max(10,Math.min(n,250)))&&r>i-2e3&&o>1,i=r<<1;if(this.defaultTextDirection!=hK.LTR&&!n)return[];let a=[],s=(r,i,l,u)=>{if(i-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt))));if(!h){if(ie.from<=i&&e.to>=i))){let e=t.moveToLineBoundary(RG.cursor(i),!1,!0).head;e>r&&(i=e)}let e=this.gapSize(l,r,i,u);h=new IX(r,i,e,n||e<2e6?e:2e6)}a.push(h)},l=t=>{if(t.lengtho&&(r.push({from:o,to:e}),i+=e-o),o=t}},20),o2e6)for(let n of e)n.from>=t.from&&n.fromt.from&&s(t.from,a,t,o),le.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];MU.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||jX(this.heightMap.lineAt(e,vX.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((t=>t.top<=e&&t.bottom>=e))||jX(this.heightMap.lineAt(this.scaler.fromDOM(e),vX.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return jX(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class AX{constructor(e,t){this.from=e,this.to=t}}function EX({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:o}=t[e],i=o-n;if(r<=i)return n+r;r-=i}}function LX(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}const ZX={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class FX{constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map((({from:n,to:o})=>{let i=t.lineAt(n,vX.ByPos,e,0,0).top,a=t.lineAt(o,vX.ByPos,e,0,0).bottom;return r+=a-i,{from:n,to:o,top:i,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let o=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to)))}}function jX(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new gX(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((e=>jX(e,t))):e._content)}const NX=OG.define({combine:e=>e.join(" ")}),zX=OG.define({combine:e=>e.indexOf(!0)>-1}),BX=$U.newName(),VX=$U.newName(),$X=$U.newName(),HX={"&light":"."+VX,"&dark":"."+$X};function WX(e,t,n){return new $U(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const GX=WX("."+BX,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},HX),UX={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},qX=uq.ie&&uq.ie_version<=11;class KX{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Sq,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(uq.ie&&uq.ie_version<=11||uq.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!uq.android||!1===e.constructor.EDIT_CONTEXT||uq.chrome&&uq.chrome_version<126||(this.editContext=new QX(e),e.state.facet(qK)&&(e.contentDOM.editContext=this.editContext.editContext)),qX&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(qK)?n.root.activeElement!=this.dom:!hq(this.dom,r))return;let o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(uq.ie&&uq.ie_version<=11||uq.android&&uq.chrome)&&!n.state.selection.main.empty&&r.focusNode&&fq(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=cq(e.root);if(!t)return!1;let n=uq.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return XX(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?XX(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=hq(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Tq(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let o of e){let e=this.readMutation(o);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&hq(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new EY(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=LY(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=YX(t,e.previousSibling||e.target.previousSibling,-1),r=YX(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(qK)!=e.state.facet(qK)&&(e.view.contentDOM.editContext=e.state.facet(qK)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function YX(e,t,n){for(;t;){let r=Eq.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function XX(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return fq(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}class QX{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:o,head:i}=r,a=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let l=s-a>n.text.length;a==this.from&&othis.to&&(s=o);let u=FY(e.state.sliceDoc(a,s),n.text,(l?r.from:r.to)-a,l?"end":null);if(!u){let t=RG.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));return void(t.main.eq(r)||e.dispatch({selection:t,userEvent:"select"}))}let c={from:u.from+a,to:u.toA+a,insert:oG.of(n.text.slice(u.from,u.toB).split("\n"))};if((uq.mac||uq.android)&&c.from==i-1&&/^\. ?$/.test(n.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(c={from:a,to:s,insert:oG.of([n.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let t=this.to-this.from+(c.to-c.from+c.insert.length);ZY(e,c,RG.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],o=null;for(let t=this.toEditorPos(n.rangeStart),i=this.toEditorPos(n.rangeEnd);t{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let o=this.toEditorPos(e.rangeStart),i=this.toEditorPos(e.rangeEnd);if(o{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=cq(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges(((o,i,a,s,l)=>{if(n)return;let u=l.length-(i-o);if(r&&i>=r.to){if(r.from==o&&r.to==i&&r.insert.eq(l))return r=this.pendingContextChange=null,t+=u,void(this.to+=u);r=null,this.revertPending(e.state)}if(o+=t,(i+=t)<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),l.toString()),this.to+=u}t+=u})),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some((e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==r||this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class JX{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach((e=>n(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new OX(e.state||xU.create(e)),e.scrollTo&&e.scrollTo.is(WK)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(YK).map((e=>new QK(e)));for(let e of this.plugins)e.update(this);this.observer=new KX(this),this.inputState=new jY(this),this.inputState.ensureHandlers(this.plugins),this.docView=new dY(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...e){let t=1==e.length&&e[0]instanceof uU?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let i=this.hasFocus,a=0,s=null;e.some((e=>e.annotation(sX)))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=lX(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(xU.phrases)!=this.state.facet(xU.phrases))return this.setState(o);t=cY.create(this,o,e),t.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new HK(e.empty?e:RG.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(WK)&&(c=e.value.clip(this.state))}this.viewState.update(t,c),this.bidiCache=nQ.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(lY)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(NX)!=t.state.facet(NX)&&(this.viewState.mustMeasureContent=!0),(n||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(ZK))try{e(t)}catch(e){UK(this.state,e,"update listener")}(s||u)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),u&&!LY(this,u)&&l.force&&Tq(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new OX(e),this.plugins=e.facet(YK).map((e=>new QK(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new dY(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(YK),n=e.state.facet(YK);if(t!=n){let r=[];for(let o of n){let n=t.indexOf(o);if(n<0)r.push(new QK(o));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(Rq(n))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);o=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((e=>{try{return e.read(this)}catch(e){return UK(this.state,e),tQ}})),u=cY.create(this,this.state,[]),c=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),c=this.docView.update(u),c&&this.docViewUpdate());for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(ZK))e(t)}get themeClasses(){return BX+" "+(this.state.facet(zX)?$X:VX)+" "+this.state.facet(NX)}updateAttrs(){let e=rQ(this,JK,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(qK)?"true":"false",class:"cm-content",style:`${uq.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),rQ(this,eY,t);let n=this.observer.ignore((()=>{let n=Yq(this.contentDOM,this.contentAttrs,t),r=Yq(this.dom,this.editorAttrs,e);return n||r}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(JX.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(lY);let e=this.state.facet(JX.cspNonce);$U.mount(this.root,this.styleModules.concat(GX).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.plugin==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return PY(this,e,_Y(this,e,t,n))}moveByGroup(e,t){return PY(this,e,_Y(this,e,t,(t=>function(e,t,n){let r=e.state.charCategorizer(t),o=r(n);return e=>{let t=r(e);return o==gU.Space&&(o=t),o==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=n[t?n.length-1:0];return RG.cursor(o.side(t,r)+e.from,o.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let o=kY(e,t.head,t.assoc||-1),i=r&&o.type==Jq.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(o.from),a=e.posAtCoords({x:n==(r==hK.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return RG.cursor(a,n?-1:1)}return RG.cursor(n?o.to:o.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return PY(this,e,function(e,t,n,r){let o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return RG.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(o,t.assoc||-1),c=e.documentTop;if(u)null==s&&(s=u.left-l.left),a=i<0?u.top:u.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+c}let d=l.left+s,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=a+(h+t)*i,r=wY(e,{x:d,y:n},!1,i);if(nl.bottom||(i<0?ro)){let t=e.docView.coordsForChar(r),o=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(BK)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>eQ)return PK(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||CK(r.isolates,t=iY(this,e))))return r.order;t||(t=iY(this,e));let r=TK(e.text,n,t);return this.bidiCache.push(new nQ(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||uq.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{_q(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return WK.of(new HK("number"==typeof e?RG.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return WK.of(new HK(RG.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return XK.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return XK.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=$U.newName(),r=[NX.of(n),lY.of(WX(`.${n}`,e))];return t&&t.dark&&r.push(zX.of(!0)),r}static baseTheme(e){return WG.lowest(lY.of(WX("."+BX,e,HX)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&Eq.get(n)||Eq.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}JX.styleModule=lY,JX.inputHandler=FK,JX.clipboardInputFilter=NK,JX.clipboardOutputFilter=zK,JX.scrollHandler=$K,JX.focusChangeEffect=jK,JX.perLineTextDirection=BK,JX.exceptionSink=LK,JX.updateListener=ZK,JX.editable=qK,JX.mouseSelectionStyle=EK,JX.dragMovesSelection=AK,JX.clickAddsSelectionRange=OK,JX.decorations=tY,JX.outerDecorations=nY,JX.atomicRanges=rY,JX.bidiIsolatedRanges=oY,JX.scrollMargins=aY,JX.darkTheme=zX,JX.cspNonce=OG.define({combine:e=>e.length?e[0]:""}),JX.contentAttributes=eY,JX.editorAttributes=JK,JX.lineWrapping=JX.contentAttributes.of({class:"cm-lineWrapping"}),JX.announce=lU.define();const eQ=4096,tQ={};class nQ{constructor(e,t,n,r,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],r=e.length?e[e.length-1].dir:hK.LTR;for(let o=Math.max(0,e.length-10);o=0;o--){let t=r[o],i="function"==typeof t?t(e):t;i&&Uq(i,n)}return n}const oQ=uq.mac?"mac":uq.windows?"win":uq.linux?"linux":"key";function iQ(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const aQ=WG.default(JX.domEventHandlers({keydown:(e,t)=>pQ(uQ(t.state),e,t,"editor")})),sQ=OG.define({enables:aQ}),lQ=new WeakMap;function uQ(e){let t=e.facet(sQ),n=lQ.get(t);return n||lQ.set(t,n=function(e,t=oQ){let n=Object.create(null),r=Object.create(null),o=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,r,i,a,s)=>{var l,u;let c=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,o,i,a,s=n[n.length-1];"Space"==s&&(s=" ");for(let e=0;e{let r=cQ={view:t,prefix:n,scope:e};return setTimeout((()=>{cQ==r&&(cQ=null)}),dQ),!0}]})}let h=d.join(" ");o(h,!1);let p=c[h]||(c[h]={preventDefault:!1,stopPropagation:!1,run:(null===(u=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===u?void 0:u.slice())||[]});i&&p.run.push(i),a&&(p.preventDefault=!0),s&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=r;for(let t in e)e[t].run.push((e=>o(e,hQ)))}let o=r[t]||r.key;if(o)for(let t of e)i(t,o,r.run,r.preventDefault,r.stopPropagation),r.shift&&i(t,"Shift-"+o,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let cQ=null;const dQ=4e3;let hQ=null;function pQ(e,t,n,r){hQ=t;let o=function(e){var t=!(qU&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||KU&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?UU:GU)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=vG(mG(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,u=!1;cQ&&cQ.view==n&&cQ.scope==r&&(a=cQ.prefix+" ",VY.indexOf(t.keyCode)<0&&(l=!0,cQ=null));let c,d,h=new Set,p=e=>{if(e){for(let t of e.run)if(!h.has(t)&&(h.add(t),t(n)))return e.stopPropagation&&(u=!0),!0;e.preventDefault&&(e.stopPropagation&&(u=!0),l=!0)}return!1},f=e[r];return f&&(p(f[a+iQ(o,t,!i)])?s=!0:!i||!(t.altKey||t.metaKey||t.ctrlKey)||uq.windows&&t.ctrlKey&&t.altKey||uq.mac&&t.altKey&&!t.ctrlKey&&!t.metaKey||!(c=GU[t.keyCode])||c==o?i&&t.shiftKey&&p(f[a+iQ(o,t,!0)])&&(s=!0):(p(f[a+iQ(c,t,!0)])||t.shiftKey&&(d=UU[t.keyCode])!=o&&d!=c&&p(f[a+iQ(d,t,!1)]))&&(s=!0),!s&&p(f._any)&&(s=!0)),l&&(s=!0),s&&u&&t.stopPropagation(),hQ=null,s}class fQ{constructor(e,t,n,r,o){this.className=e,this.left=t,this.top=n,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let o=mQ(e);return[new fQ(t,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),o=Math.min(n.to,e.viewport.to),i=e.textDirection==hK.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=mQ(e),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),p=kY(e,r,1),f=kY(e,o,-1),m=p.type==Jq.Text?p:null,g=f.type==Jq.Text?f:null;m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=gQ(e,r,1,m));g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=gQ(e,o,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return y(b(n.from,n.to,m));{let t=m?b(n.from,null,m):x(p,!1),r=g?b(null,n.to,g):x(f,!0),o=[];return(m||p).to<(g||f).from-(m&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2u&&r.from=i)break;s>o&&l(Math.max(e,o),null==t&&e<=u,Math.min(s,i),null==n&&s>=c,a.dir)}if(o=r.to+1,o>=i)break}return 0==s.length&&l(u,null==t,c,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function x(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function mQ(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==hK.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function gQ(e,t,n,r){let o=e.coordsAtPos(t,2*n);if(!o)return r;let i=e.dom.getBoundingClientRect(),a=(o.top+o.bottom)/2,s=e.posAtCoords({x:i.left+1,y:a}),l=e.posAtCoords({x:i.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class vQ{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(yQ)!=e.state.facet(yQ)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(yQ);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,uq.safari&&uq.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const yQ=OG.define();function bQ(e){return[XK.define((t=>new vQ(t,e))),yQ.of(e)]}const xQ=OG.define({combine:e=>wU(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function wQ(e){return e.startState.facet(xQ)!=e.state.facet(xQ)}const SQ=bQ({above:!0,markers(e){let{state:t}=e,n=t.facet(xQ),r=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty||n.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:RG.cursor(o.head,o.head>o.anchor?-1:1);for(let o of fQ.forRange(e,t,n))r.push(o)}}return r},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=wQ(e);return n&&CQ(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){CQ(t.state,e)},class:"cm-cursorLayer"});function CQ(e,t){t.style.animationDuration=e.facet(xQ).cursorBlinkRate+"ms"}const kQ=bQ({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:fQ.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||wQ(e),class:"cm-selectionLayer"}),_Q=WG.highest(JX.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),MQ=lU.define({map:(e,t)=>null==e?null:t.mapPos(e)}),TQ=NG.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(MQ)?t.value:e),e))}),PQ=XK.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(TQ);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(TQ)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(TQ),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(TQ)!=e&&this.view.dispatch({effects:MQ.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function RQ(e,t,n,r,o){t.lastIndex=0;for(let i,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class IQ{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,o)=>r(o,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,o)=>{let i=n(e,t,r);i&&o(r,r+e[0].length,i)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,o)=>o(r,r+e[0].length,n)}this.boundary=o,this.maxLength=i}createDeco(e){let t=new TU,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:o,to:i}of n)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}(e,this.maxLength))RQ(e.state.doc,this.regexp,t,r,((t,r)=>this.addMatch(r,e,t,n)));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges(((t,o,i,a)=>{a>=e.view.viewport.from&&i<=e.view.viewport.to&&(n=Math.min(i,n),r=Math.max(a,r))})),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let o of e.visibleRanges){let i=Math.max(o.from,n),a=Math.min(o.to,r);if(a>=i){let n=e.state.doc.lineAt(i),r=n.ton.from;i--)if(this.boundary.test(n.text[i-1-n.from])){s=i;break}for(;ac.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.indexthis.addMatch(n,e,t,d)));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>el,add:c})}}return t}}const DQ=null!=/x/.unicode?"gu":"g",OQ=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",DQ),AQ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let EQ=null;const LQ=OG.define({combine(e){let t=wU(e,{render:null,specialChars:OQ,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==EQ&&"undefined"!=typeof document&&document.body){let t=document.body.style;EQ=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return EQ||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,DQ)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,DQ)),t}});let ZQ=null;class FQ extends Qq{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=(n=this.code)>=32?"•":10==n?"␤":String.fromCharCode(9216+n);var n;let r=e.state.phrase("Control character")+" "+(AQ[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,r,t);if(o)return o;let i=document.createElement("span");return i.textContent=t,i.title=r,i.setAttribute("aria-label",r),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class jQ extends Qq{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const NQ=eK.line({class:"cm-activeLine"}),zQ=XK.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let o=e.lineBlockAt(r.head);o.from>t&&(n.push(NQ.range(o.from)),t=o.from)}return eK.set(n)}},{decorations:e=>e.decorations});class BQ extends Qq{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?pq(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=bq(t[0],"rtl"!=n.direction),o=parseInt(n.lineHeight);return r.bottom-r.top>1.5*o?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}}const VQ=2e3;function $Q(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),o=n-r.from,i=o>VQ?-1:o==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):jU(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function HQ(e,t){let n=$Q(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),o=e.state.doc.lineAt(t);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(e.changes)}},get(t,o,i){let a=$Q(e,t);if(!a)return r;let s=function(e,t,n){let r=Math.min(t.line,n.line),o=Math.max(t.line,n.line),i=[];if(t.off>VQ||n.off>VQ||t.col<0||n.col<0){let a=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=r;t<=o;t++){let n=e.doc.line(t);n.length<=s&&i.push(RG.range(n.from+a,n.to+s))}}else{let a=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=r;t<=o;t++){let n=e.doc.line(t),r=NU(n.text,a,e.tabSize,!0);if(r<0)i.push(RG.cursor(n.to));else{let t=NU(n.text,s,e.tabSize);i.push(RG.range(n.from+r,n.from+t))}}}return i}(e.state,n,a);return s.length?i?RG.create(s.concat(r.ranges)):RG.create(s):r}}:null}const WQ={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},GQ={style:"cursor: crosshair"};const UQ="-10000px";class qQ{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e));let o=null;this.tooltipViews=this.tooltips.map((e=>o=n(e,o)))}update(e,t){var n;let r=e.state.facet(this.facet),o=r.filter((e=>e));if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let n=0;nt[n]=e)),t.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=i,!0}}function KQ(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const YQ=OG.define({combine:e=>{var t,n,r;return{position:uq.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((e=>e.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||KQ}}}),XQ=new WeakMap,QQ=XK.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(YQ);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new qQ(e,nJ,((e,t)=>this.createTooltip(e,t)),(e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()})),this.above=this.manager.tooltips.map((e=>!!e.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(YQ);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=UQ,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(uq.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),o=sY(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(YQ).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){c.style.top=UQ;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=h.right-h.left,g=null!==(t=XQ.get(u))&&void 0!==t?t:h.bottom-h.top,v=u.offset||tJ,y=this.view.textDirection==hK.LTR,b=h.width>r.right-r.left?y?r.left:r.right-h.width:y?Math.max(r.left,Math.min(d.left-(p?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(p?14:0)-v.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-g-f-v.yr.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let w=(x?d.top-r.top:r.bottom-d.bottom)-f;if(wb&&e.topS&&(S=x?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(c.style.top=(S-e.parent.top)/i+"px",JQ(c,(b-e.parent.left)/o)):(c.style.top=S/i+"px",JQ(c,b/o)),p){let e=d.left+(y?v.x:-v.x)-(b+14-7);p.style.left=e/o+"px"}!0!==u.overlap&&a.push({left:b,top:S,right:C,bottom:S+g}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=UQ}},{eventObservers:{scroll(){this.maybeMeasure()}}});function JQ(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const eJ=JX.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),tJ={x:0,y:0},nJ=OG.define({enables:[QQ,eJ]}),rJ=OG.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class oJ{static create(e){return new oJ(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new qQ(e,rJ,((e,t)=>this.createHostedView(e,t)),(e=>e.dom.remove()))}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const iJ=nJ.compute([rJ],(e=>{let t=e.facet(rJ);return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:oJ.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class aJ{constructor(e,t,n,r,o){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(r)).find((e=>e.from<=r&&e.to>=r)),a=i&&i.dir==hK.RTL?-1:1;o=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>UK(e.state,t,"hover tooltip")))}else!i||Array.isArray(i)&&!i.length||e.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])})}get tooltip(){let e=this.view.plugin(QQ),t=e?e.manager.tooltips.findIndex((e=>e.create==oJ.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!function(e,t){let n,{left:r,right:o,top:i,bottom:a}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=r-sJ&&t.clientX<=o+sJ&&t.clientY>=i-sJ&&t.clientY<=a+sJ}(o.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,i=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:o;(o==i?this.view.posAtCoords(this.lastMove)==o:function(e,t,n,r,o){let i=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(i.left>r||i.righto||Math.min(i.bottom,a)=t&&s<=n}(this.view,o,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const sJ=4;function lJ(e,t={}){let n=lU.define(),r=NG.define({create:()=>[],update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter((e=>!t.hideOn(r,e)))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,bG.TrackDel);if(null!=e){let o=Object.assign(Object.create(null),n);o.pos=e,null!=o.end&&(o.end=r.changes.mapPos(o.end)),t.push(o)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(cJ)&&(e=[]);return e},provide:e=>rJ.from(e)});return{active:r,extension:[r,XK.define((o=>new aJ(o,e,r,n,t.hoverTime||300))),iJ]}}function uJ(e,t){let n=e.plugin(QQ);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const cJ=lU.define();const dJ=OG.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function hJ(e,t){let n=e.plugin(pJ),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const pJ=XK.fromClass(class{constructor(e){this.input=e.state.facet(gJ),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(dJ);this.top=new fJ(e,!0,t.topContainer),this.bottom=new fJ(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(dJ);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new fJ(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new fJ(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(gJ);if(n!=this.input){let t=n.filter((e=>e)),r=[],o=[],i=[],a=[];for(let n of t){let t,s=this.specs.indexOf(n);s<0?(t=n(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),r.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=r,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>JX.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class fJ{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=mJ(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=mJ(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function mJ(e){let t=e.nextSibling;return e.remove(),t}const gJ=OG.define({enables:pJ});class vJ extends SU{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}vJ.prototype.elementClass="",vJ.prototype.toDOM=void 0,vJ.prototype.mapMode=bG.TrackBefore,vJ.prototype.startSide=vJ.prototype.endSide=-1,vJ.prototype.point=!0;const yJ=OG.define(),bJ=OG.define(),xJ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>MU.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},wJ=OG.define();function SJ(e){return[kJ(),wJ.of({...xJ,...e})]}const CJ=OG.define({combine:e=>e.some((e=>e))});function kJ(e){let t=[_J];return e&&!1===e.fixed&&t.push(CJ.of(!0)),t}const _J=XK.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(wJ).map((t=>new RJ(e,t))),this.fixed=!e.state.facet(CJ);for(let e of this.gutters)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(CJ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=MU.iter(this.view.state.facet(yJ),this.view.viewport.from),r=[],o=this.gutters.map((e=>new PJ(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let i of e.type)if(i.type==Jq.Text&&t){TJ(n,r,i.from);for(let e of o)e.line(this.view,i,r);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==Jq.Text){TJ(n,r,e.from);for(let t of o)t.line(this.view,e,r)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(wJ),n=e.state.facet(wJ),r=e.docChanged||e.heightChanged||e.viewportChanged||!MU.eq(e.startState.facet(yJ),e.state.facet(yJ),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let o=[];for(let r of n){let n=t.indexOf(r);n<0?o.push(new RJ(this.view,r)):(this.gutters[n].update(e),o.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=o}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>JX.scrollMargins.of((t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,o=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==hK.LTR?{left:r,right:o}:{right:r,left:o}}))});function MJ(e){return Array.isArray(e)?e:[e]}function TJ(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class PJ{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=MU.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==r.elements.length){let t=new IJ(e,i,o,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];TJ(this.cursor,r,t.from),n.length&&(r=r.concat(n));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let i=this.gutter;(0!=r.length||i.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(bJ)){let o=n(e,t.widget,t);o&&(r||(r=[])).push(o)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class RJ{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let o,i=r.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,r)&&r.preventDefault()}));this.markers=MJ(t.markers(e)),t.initialSpacer&&(this.spacer=new IJ(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=MJ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!MU.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class IJ{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nwU(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],o=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||o(e,t,n):o}return n}})});class EJ extends vJ{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function LJ(e,t){return e.state.facet(AJ).formatNumber(t,e.state)}const ZJ=wJ.compute([AJ],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(DJ),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new EJ(LJ(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(OJ)){let o=r(e,t,n);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(AJ)!=e.state.facet(AJ),initialSpacer:e=>new EJ(LJ(e,FJ(e.state.doc.lines))),updateSpacer(e,t){let n=LJ(t.view,FJ(t.view.state.doc.lines));return n==e.number?e:new EJ(n)},domEventHandlers:e.facet(AJ).domEventHandlers,side:"before"})));function FJ(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.head).from;o>n&&(n=o,t.push(jJ.range(o)))}return MU.of(t)}));const zJ=1024;let BJ=0;class VJ{constructor(e,t){this.from=e,this.to=t}}class $J{constructor(e={}){this.id=BJ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=GJ.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}$J.closedBy=new $J({deserialize:e=>e.split(" ")}),$J.openedBy=new $J({deserialize:e=>e.split(" ")}),$J.group=new $J({deserialize:e=>e.split(" ")}),$J.isolate=new $J({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),$J.contextHash=new $J({perNode:!0}),$J.lookAhead=new $J({perNode:!0}),$J.mounted=new $J({perNode:!0});class HJ{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[$J.mounted.id]}}const WJ=Object.create(null);class GJ{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):WJ,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new GJ(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop($J.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop($J.group),r=-1;r<(n?n.length:0);r++){let o=t[r<0?e.name:n[r]];if(o)return o}}}}GJ.none=new GJ("",Object.create(null),0,8);class UJ{constructor(e){this.types=e;for(let t=0;t=t){let a=new o0(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[r])).push(n0(a,t,n,!1))}}return o?u0(o):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:o=this.length}=e,i=e.mode||0,a=(i&YJ.IncludeAnonymous)>0;for(let e=this.cursor(i|YJ.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=r&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:m0(GJ.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new QJ(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new QJ(GJ.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=zJ,reused:i=[],minRepeatType:a=r.types.length}=e,s=Array.isArray(n)?new JJ(n,n.length):n,l=r.types,u=0,c=0;function d(e,t,n,y,b,x){let{id:w,start:S,end:C,size:k}=s,_=c,M=u;if(k<0){if(s.next(),-1==k){let t=i[w];return n.push(t),void y.push(S-e)}if(-3==k)return void(u=w);if(-4==k)return void(c=w);throw new RangeError(`Unrecognized record size: ${k}`)}let T,P,R=l[w],I=S-e;if(C-S<=o&&(P=g(s.pos-t,b))){let t=new Uint16Array(P.size-P.skip),n=s.pos-P.size,o=t.length;for(;s.pos>n;)o=v(P.start,t,o);T=new e0(t,C-P.start,r),I=P.start-e}else{let e=s.pos-k;s.next();let t=[],n=[],r=w>=a?w:-1,i=0,l=C;for(;s.pos>e;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-o&&(f(t,n,S,i,s.end,l,r,_,M),i=t.length,l=s.end),s.next()):x>2500?h(S,e,t,n):d(S,e,t,n,r,x+1);if(r>=0&&i>0&&i-1&&i>0){let e=p(R,M);T=m0(R,t,n,0,t.length,0,C-S,e,e)}else T=m(R,t,n,C-S,_-C,M)}n.push(T),y.push(I)}function h(e,t,n,i){let a=[],l=0,u=-1;for(;s.pos>t;){let{id:e,start:t,end:n,size:r}=s;if(r>4)s.next();else{if(u>-1&&t=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-o,t[n++]=a[e+2]-o,t[n++]=n;n.push(new e0(t,a[2]-o,r)),i.push(o-e)}}function p(e,t){return(n,r,o)=>{let i,a,s=0,l=n.length-1;if(l>=0&&(i=n[l])instanceof QJ){if(!l&&i.type==e&&i.length==o)return i;(a=i.prop($J.lookAhead))&&(s=r[l]+i.length+a)}return m(e,n,r,o,s,t)}}function f(e,t,n,o,i,a,s,l,u){let c=[],d=[];for(;e.length>o;)c.push(e.pop()),d.push(t.pop()+n-i);e.push(m(r.types[s],c,d,a-i,l-a,u)),t.push(i-n)}function m(e,t,n,r,o,i,a){if(i){let e=[$J.contextHash,i];a=a?[e].concat(a):[e]}if(o>25){let e=[$J.lookAhead,o];a=a?[e].concat(a):[e]}return new QJ(e,t,n,r,a)}function g(e,t){let n=s.fork(),r=0,i=0,l=0,u=n.end-o,c={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=i,c.skip=l,l+=4,r+=4,n.next();continue}let s=n.pos-e;if(e<0||s=a?4:0,h=n.start;for(n.next();n.pos>s;){if(n.size<0){if(-3!=n.size&&-4!=n.size)break e;d+=4}else n.id>=a&&(d+=4);n.next()}i=h,r+=e,l+=d}return(t<0||r==e)&&(c.size=r,c.start=i,c.skip=l),c.size>4?c:void 0}function v(e,t,n){let{id:r,start:o,end:i,size:l}=s;if(s.next(),l>=0&&r4){let r=s.pos-(l-4);for(;s.pos>r;)n=v(e,t,n)}t[--n]=a,t[--n]=i-e,t[--n]=o-e,t[--n]=r}else-3==l?u=r:-4==l&&(c=r);return n}let y=[],b=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,y,b,-1,0);let x=null!==(t=e.length)&&void 0!==t?t:y.length?b[0]+y[0].length:0;return new QJ(l[e.topID],y.reverse(),b.reverse(),x)}(e)}}QJ.empty=new QJ(GJ.none,[],[],0);class JJ{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new JJ(this.buffer,this.index)}}class e0{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return GJ.none}toString(){let e=[];for(let t=0;t0));s=i[s+3]);return a}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function n0(e,t,n,r){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?a.length:-1;e!=l;e+=t){let l=a[e],u=s[e]+i.from;if(t0(r,n,u,u+l.length))if(l instanceof e0){if(o&YJ.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-u,r);if(a>-1)return new l0(new s0(i,l,e,u),null,a)}else if(o&YJ.IncludeAnonymous||!l.type.isAnonymous||h0(l)){let a;if(!(o&YJ.IgnoreMounts)&&(a=HJ.get(l))&&!a.overlay)return new o0(a.tree,u,e,i);let s=new o0(l,u,e,i);return o&YJ.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(o&YJ.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let r;if(!(n&YJ.IgnoreOverlays)&&(r=HJ.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:o}of r.overlay)if((t>0?e<=n:e=n:o>n))return new o0(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function i0(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function a0(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class s0{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class l0 extends r0{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new l0(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&YJ.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new l0(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new l0(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new l0(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new QJ(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function u0(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||o.to0){if(this.index-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let e=n._tree.children[r];if(this.mode&YJ.IncludeAnonymous||e instanceof e0||!e.type.isAnonymous||h0(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(let e=n;e=0;o--){if(o<0)return a0(this._tree,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}function h0(e){return e.children.some((e=>e instanceof e0||!e.type.isAnonymous||h0(e)))}const p0=new WeakMap;function f0(e,t){if(!e.isAnonymous||t instanceof e0||t.type!=e)return 1;let n=p0.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof QJ)){n=1;break}n+=f0(e,r)}p0.set(t,n)}return n}function m0(e,t,n,r,o,i,a,s,l){let u=0;for(let n=r;n=c)break;f+=t}if(u==o+1){if(f>c){let e=n[o];t(e.children,e.positions,0,e.children.length,r[o]+s);continue}d.push(n[o])}else{let t=r[u-1]+n[u-1].length-p;d.push(m0(e,n,r,o,u,p,t,null,l))}h.push(p+s-i)}}(t,n,r,o,0),(s||l)(d,h,a)}class g0{constructor(e,t,n,r,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(o?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new g0(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let u=a=n)for(;i&&i.from=t.from||c<=t.to||l){let e=Math.max(t.from,s)-l,n=Math.min(t.to,c)-l;t=e>=n?null:new g0(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&r.push(t),i.to>c)break;i=onew VJ(e.from,e.to))):[new VJ(0,0)]:[new VJ(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class y0{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new $J({perNode:!0});let b0=0;class x0{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=b0++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof x0&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let r=new x0(n,[],null,[]);if(r.set.push(r),t)for(let e of t.set)r.set.push(e);return r}static defineModifier(e){let t=new S0(e);return e=>e.modified.indexOf(t)>-1?e:S0.get(e.base||e,e.modified.concat(t).sort(((e,t)=>e.id-t.id)))}}let w0=0;class S0{constructor(e){this.name=e,this.instances=[],this.id=w0++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let r=[],o=new x0(e.name,r,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)r.push(S0.get(t,e));return o}}function C0(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new _0(r,o,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return k0.add(t)}const k0=new $J({combine(e,t){let n,r,o;for(;e||t;){if(!e||t&&e.depth>=t.depth?(o=t,t=t.next):(o=e,e=e.next),n&&n.mode==o.mode&&!o.context&&!n.context)continue;let i=new _0(o.tags,o.mode,o.context);n?n.next=i:r=i,n=i}return r}});class _0{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=o;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function T0(e,t,n,r=0,o=e.length){let i=new P0(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}_0.empty=new _0([],2,null);class P0{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,o){let{type:i,from:a,to:s}=e;if(a>=n||s<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));let l=r,u=function(e){let t=e.type.prop(k0);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||_0.empty,c=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(o,u.tags);if(c&&(l&&(l+=" "),l+=c,1==u.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(t,a),l),u.opaque)return;let d=e.tree&&e.tree.prop($J.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),u=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),c=e.firstChild();for(let h=0,p=a;;h++){let f=h=m)&&e.nextSibling()););if(!f||m>n)break;p=f.to+a,p>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(n,p),"",u),this.startSpan(Math.min(n,p),l))}c&&e.parent()}else if(e.firstChild()){d&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const R0=x0.define,I0=R0(),D0=R0(),O0=R0(D0),A0=R0(D0),E0=R0(),L0=R0(E0),Z0=R0(E0),F0=R0(),j0=R0(F0),N0=R0(),z0=R0(),B0=R0(),V0=R0(B0),$0=R0(),H0={comment:I0,lineComment:R0(I0),blockComment:R0(I0),docComment:R0(I0),name:D0,variableName:R0(D0),typeName:O0,tagName:R0(O0),propertyName:A0,attributeName:R0(A0),className:R0(D0),labelName:R0(D0),namespace:R0(D0),macroName:R0(D0),literal:E0,string:L0,docString:R0(L0),character:R0(L0),attributeValue:R0(L0),number:Z0,integer:R0(Z0),float:R0(Z0),bool:R0(E0),regexp:R0(E0),escape:R0(E0),color:R0(E0),url:R0(E0),keyword:N0,self:R0(N0),null:R0(N0),atom:R0(N0),unit:R0(N0),modifier:R0(N0),operatorKeyword:R0(N0),controlKeyword:R0(N0),definitionKeyword:R0(N0),moduleKeyword:R0(N0),operator:z0,derefOperator:R0(z0),arithmeticOperator:R0(z0),logicOperator:R0(z0),bitwiseOperator:R0(z0),compareOperator:R0(z0),updateOperator:R0(z0),definitionOperator:R0(z0),typeOperator:R0(z0),controlOperator:R0(z0),punctuation:B0,separator:R0(B0),bracket:V0,angleBracket:R0(V0),squareBracket:R0(V0),paren:R0(V0),brace:R0(V0),content:F0,heading:j0,heading1:R0(j0),heading2:R0(j0),heading3:R0(j0),heading4:R0(j0),heading5:R0(j0),heading6:R0(j0),contentSeparator:R0(F0),list:R0(F0),quote:R0(F0),emphasis:R0(F0),strong:R0(F0),link:R0(F0),monospace:R0(F0),strikethrough:R0(F0),inserted:R0(),deleted:R0(),changed:R0(),invalid:R0(),meta:$0,documentMeta:R0($0),annotation:R0($0),processingInstruction:R0($0),definition:x0.defineModifier("definition"),constant:x0.defineModifier("constant"),function:x0.defineModifier("function"),standard:x0.defineModifier("standard"),local:x0.defineModifier("local"),special:x0.defineModifier("special")};for(let e in H0){let t=H0[e];t instanceof x0&&(t.name=e)}M0([{tag:H0.link,class:"tok-link"},{tag:H0.heading,class:"tok-heading"},{tag:H0.emphasis,class:"tok-emphasis"},{tag:H0.strong,class:"tok-strong"},{tag:H0.keyword,class:"tok-keyword"},{tag:H0.atom,class:"tok-atom"},{tag:H0.bool,class:"tok-bool"},{tag:H0.url,class:"tok-url"},{tag:H0.labelName,class:"tok-labelName"},{tag:H0.inserted,class:"tok-inserted"},{tag:H0.deleted,class:"tok-deleted"},{tag:H0.literal,class:"tok-literal"},{tag:H0.string,class:"tok-string"},{tag:H0.number,class:"tok-number"},{tag:[H0.regexp,H0.escape,H0.special(H0.string)],class:"tok-string2"},{tag:H0.variableName,class:"tok-variableName"},{tag:H0.local(H0.variableName),class:"tok-variableName tok-local"},{tag:H0.definition(H0.variableName),class:"tok-variableName tok-definition"},{tag:H0.special(H0.variableName),class:"tok-variableName2"},{tag:H0.definition(H0.propertyName),class:"tok-propertyName tok-definition"},{tag:H0.typeName,class:"tok-typeName"},{tag:H0.namespace,class:"tok-namespace"},{tag:H0.className,class:"tok-className"},{tag:H0.macroName,class:"tok-macroName"},{tag:H0.propertyName,class:"tok-propertyName"},{tag:H0.operator,class:"tok-operator"},{tag:H0.comment,class:"tok-comment"},{tag:H0.meta,class:"tok-meta"},{tag:H0.invalid,class:"tok-invalid"},{tag:H0.punctuation,class:"tok-punctuation"}]);var W0;const G0=new $J;function U0(e){return OG.define({combine:e?t=>t.concat(e):void 0})}const q0=new $J;class K0{constructor(e,t,n=[],r=""){this.data=e,this.name=r,xU.prototype.hasOwnProperty("tree")||Object.defineProperty(xU.prototype,"tree",{get(){return Q0(this)}}),this.parser=t,this.extension=[s1.of(this),xU.languageData.of(((e,t,n)=>{let r=Y0(e,t,n),o=r.type.prop(G0);if(!o)return[];let i=e.facet(o),a=r.type.prop(q0);if(a){let o=r.resolve(t-r.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return Y0(e,t,n).type.prop(G0)==this.data}findRegions(e){let t=e.facet(s1);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(G0)==this.data)return void n.push({from:t,to:t+e.length});let o=e.prop($J.mounted);if(o){if(o.tree.prop(G0)==this.data){if(o.overlay)for(let e of o.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(o.overlay){let e=n.length;if(r(o.tree,o.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0))]}),e.name)}configure(e,t){return new X0(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Q0(e){let t=e.field(K0.state,!1);return t?t.tree:QJ.empty}class J0{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let e1=null;class t1{constructor(e,t,n=[],r,o,i,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new t1(e,t,[],QJ.empty,0,n,[],null)}startParse(){return this.parser.startParse(new J0(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=QJ.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(g0.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=e1;e1=this;try{return e()}finally{e1=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=n1(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,o)=>t.push({fromA:e,toA:n,fromB:r,toB:o}))),n=g0.applyChanges(n,t),r=QJ.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=n1(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends v0{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance(){let t=e1;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new QJ(GJ.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return e1}}function n1(e,t,n){return g0.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class r1{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new r1(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=t1.create(e.facet(s1).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new r1(n)}}K0.state=NG.define({create:r1.init,update(e,t){for(let e of t.effects)if(e.is(K0.setState))return e.value;return t.startState.facet(s1)!=t.state.facet(s1)?r1.init(t.state):e.apply(t)}});let o1=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(o1=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const i1="undefined"!=typeof navigator&&(null===(W0=navigator.scheduling)||void 0===W0?void 0:W0.isInputPending)?()=>navigator.scheduling.isInputPending():null,a1=XK.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(K0.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(K0.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=o1(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,s=o.context.work((()=>i1&&i1()||Date.now()>i),r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:K0.setState.of(new r1(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>UK(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),s1=OG.define({combine:e=>e.length?e[0]:null,enables:e=>[K0.state,a1,JX.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class l1{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const u1=OG.define(),c1=OG.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function d1(e){let t=e.facet(c1);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function h1(e,t){let n="",r=e.tabSize,o=e.facet(c1)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(let e=0;e=t?function(e,t,n){let r=t.resolveStack(n),o=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(o!=r.node){let e=[];for(let t=o;t&&!(t.fromr.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return g1(r,e,n)}(e,n,t):null}class f1{constructor(e,t={}){this.state=e,this.options=t,this.unit=d1(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=n.from&&r<=n.to?o&&r==e?{text:"",from:e}:(t<0?r-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return jU(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const m1=new $J;function g1(e,t,n){for(let r=e;r;r=r.next){let e=v1(r.node);if(e)return e(b1.create(t,n,r))}return 0}function v1(e){let t=e.type.prop(m1);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop($J.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>w1(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?y1:null}function y1(){return 0}class b1 extends f1{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new b1(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(x1(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return g1(this.context.next,this.base,this.pos)}}function x1(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function w1(e,t,n,r,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=n.to;;){let o=t.childAfter(e);if(!o||o==r)return null;if(!o.type.isSkipped){if(o.from>=a)return null;let e=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+e}}e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*n)}function S1({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const C1=OG.define(),k1=new $J;function _1(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function M1(e,t,n){for(let r of e.facet(C1)){let o=r(e,t,n);if(o)return o}return function(e,t,n){let r=Q0(e);if(r.lengthn)continue;if(o&&a.from=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function T1(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const P1=lU.define({map:T1}),R1=lU.define({map:T1});function I1(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const D1=NG.define({create:()=>eK.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges(((t,n)=>e=O1(e,t,n))),e=e.map(t.changes);for(let n of t.effects)if(n.is(P1)&&!E1(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(N1),o=r?eK.replace({widget:new $1(r(t.state,n.value))}):V1;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(R1)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=O1(e,t.selection.main.head)),e},provide:e=>JX.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{et&&(r=!0)})),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function A1(e,t,n){var r;let o=null;return null===(r=e.field(D1,!1))||void 0===r||r.between(t,n,((e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})})),o}function E1(e,t,n){let r=!1;return e.between(t,t,((e,o)=>{e==t&&o==n&&(r=!0)})),r}function L1(e,t){return e.field(D1,!1)?t:t.concat(lU.appendConfig.of(z1()))}function Z1(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return JX.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${o}.`)}const F1=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of I1(e)){let n=M1(e.state,t.from,t.to);if(n)return e.dispatch({effects:L1(e.state,[P1.of(n),Z1(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(D1,!1))return!1;let t=[];for(let n of I1(e)){let r=A1(e.state,n.from,n.to);r&&t.push(R1.of(r),Z1(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(D1,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(R1.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],j1={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},N1=OG.define({combine:e=>wU(e,j1)});function z1(e){let t=[D1,G1];return e&&t.push(N1.of(e)),t}function B1(e,t){let{state:n}=e,r=n.facet(N1),o=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=A1(e.state,n.from,n.to);r&&e.dispatch({effects:R1.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const V1=eK.replace({widget:new class extends Qq{toDOM(e){return B1(e,null)}}});class $1 extends Qq{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return B1(e,this.value)}}const H1={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class W1 extends vJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}const G1=JX.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class U1{constructor(e,t){let n;function r(e){let t=$U.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof K0?e=>e.prop(G0)==i.data:i?e=>e==i:void 0,this.style=M0(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=n?new $U(n):null,this.themeType=t.themeType}static define(e,t){return new U1(e,t||{})}}const q1=OG.define(),K1=OG.define({combine:e=>e.length?[e[0]]:null});function Y1(e){let t=e.facet(q1);return t.length?t:e.facet(K1)}function X1(e,t){let n,r=[J1];return e instanceof U1&&(e.module&&r.push(JX.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(K1.of(e)):n?r.push(q1.computeN([JX.darkTheme],(t=>t.facet(JX.darkTheme)==("dark"==n)?[e]:[]))):r.push(q1.of(e)),r}class Q1{constructor(e){this.markCache=Object.create(null),this.tree=Q0(e.state),this.decorations=this.buildDeco(e,Y1(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Q0(e.state),n=Y1(e.state),r=n!=Y1(e.startState),{viewport:o}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return eK.none;let n=new TU;for(let{from:r,to:o}of e.visibleRanges)T0(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=eK.mark({class:r})))}),r,o);return n.finish()}}const J1=WG.high(XK.fromClass(Q1,{decorations:e=>e.decorations})),e2=U1.define([{tag:H0.meta,color:"#404740"},{tag:H0.link,textDecoration:"underline"},{tag:H0.heading,textDecoration:"underline",fontWeight:"bold"},{tag:H0.emphasis,fontStyle:"italic"},{tag:H0.strong,fontWeight:"bold"},{tag:H0.strikethrough,textDecoration:"line-through"},{tag:H0.keyword,color:"#708"},{tag:[H0.atom,H0.bool,H0.url,H0.contentSeparator,H0.labelName],color:"#219"},{tag:[H0.literal,H0.inserted],color:"#164"},{tag:[H0.string,H0.deleted],color:"#a11"},{tag:[H0.regexp,H0.escape,H0.special(H0.string)],color:"#e40"},{tag:H0.definition(H0.variableName),color:"#00f"},{tag:H0.local(H0.variableName),color:"#30a"},{tag:[H0.typeName,H0.namespace],color:"#085"},{tag:H0.className,color:"#167"},{tag:[H0.special(H0.variableName),H0.macroName],color:"#256"},{tag:H0.definition(H0.propertyName),color:"#00c"},{tag:H0.comment,color:"#940"},{tag:H0.invalid,color:"#f00"}]),t2=JX.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),n2="()[]{}",r2=OG.define({combine:e=>wU(e,{afterCursor:!0,brackets:n2,maxScanDistance:1e4,renderMatch:a2})}),o2=eK.mark({class:"cm-matchingBracket"}),i2=eK.mark({class:"cm-nonmatchingBracket"});function a2(e){let t=[],n=e.matched?o2:i2;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const s2=[NG.define({create:()=>eK.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(r2);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=d2(t.state,e.head,-1,r)||e.head>0&&d2(t.state,e.head-1,1,r)||r.afterCursor&&(d2(t.state,e.head,1,r)||e.headJX.decorations.from(e)}),t2];const l2=new $J;function u2(e,t,n){let r=e.prop(t<0?$J.openedBy:$J.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function c2(e){let t=e.type.prop(l2);return t?t(e.node):e}function d2(e,t,n,r={}){let o=r.maxScanDistance||1e4,i=r.brackets||n2,a=Q0(e),s=a.resolveInner(t,n);for(let r=s;r;r=r.parent){let o=u2(r.type,n,i);if(o&&r.from0?t>=a.from&&ta.from&&t<=a.to))return h2(e,t,n,r,a,o,i)}}return function(e,t,n,r,o,i,a){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!c.next().done&&e<=i;){let i=c.value;n<0&&(e+=i.length);let s=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=a.indexOf(i[e]);if(!(t<0||r.resolveInner(s+e,1).type!=o))if(t%2==0==n>0)d++;else{if(1==d)return{start:u,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=i.length)}return c.done?{start:u,matched:!1}:null}(e,t,n,a,s.type,o,i)}function h2(e,t,n,r,o,i,a){let s=r.parent,l={from:o.from,to:o.to},u=0,c=null==s?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(n<0?c.to<=r.from:c.from>=r.to){if(0==u&&i.indexOf(c.type.name)>-1&&c.from-1||(m2.push(e),console.warn(t))}function b2(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||H0[n];r?"function"==typeof r?t.length?t=t.map(r):y2(n,`Modifier ${n} used at start of tag`):t.length?y2(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:y2(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map((e=>e.id)),i=g2[o];if(i)return i.id;let a=g2[o]=GJ.define({id:f2.length,name:r,props:[C0({[r]:n})]});return f2.push(a),a.id}hK.RTL,hK.LTR;function x2(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const w2=x2(T2,0),S2=x2(M2,0),C2=x2(((e,t)=>M2(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t))),0);function k2(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const _2=50;function M2(e,t,n=t.selection.ranges){let r=n.map((e=>k2(t,e.from).block));if(!r.every((e=>e)))return null;let o=n.map(((e,n)=>function(e,{open:t,close:n},r,o){let i,a,s=e.sliceDoc(r-_2,r),l=e.sliceDoc(o,o+_2),u=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,d=s.length-u;if(s.slice(d-t.length,d)==t&&l.slice(c,c+n.length)==n)return{open:{pos:r-u,margin:u&&1},close:{pos:o+c,margin:c&&1}};o-r<=2*_2?i=a=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+_2),a=e.sliceDoc(o-_2,o));let h=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(a)[0].length,f=a.length-p-n.length;return i.slice(h,h+t.length)==t&&a.slice(f,f+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(i.charAt(h+t.length))?1:0},close:{pos:o-p-n.length,margin:/\s/.test(a.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;no&&(e==i||i>l.from)){o=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+s.length)==s?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of r)!a&&i||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const P2=iU.define(),R2=iU.define(),I2=OG.define(),D2=OG.define({combine:e=>wU(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),O2=NG.define({create:()=>q2.empty,update(e,t){let n=t.state.facet(D2),r=t.annotation(P2);if(r){let o=j2.fromTransaction(t,r.selection),i=r.side,a=0==i?e.undone:e.done;return a=o?N2(a,a.length,n.minDepth,o):$2(a,t.startState.selection),new q2(0==i?r.rest:a,0==i?a:r.rest)}let o=t.annotation(R2);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(uU.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=j2.fromTransaction(t),a=t.annotation(uU.time),s=t.annotation(uU.userEvent);return i?e=e.addChanges(i,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new q2(e.done.map(j2.fromJSON),e.undone.map(j2.fromJSON))});function A2(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(O2,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const E2=A2(0,!1),L2=A2(1,!1),Z2=A2(0,!0),F2=A2(1,!0);class j2{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new j2(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new j2(e.changes&&wG.fromJSON(e.changes),[],e.mapped&&xG.fromJSON(e.mapped),e.startSelection&&RG.fromJSON(e.startSelection),e.selectionsAfter.map(RG.fromJSON))}static fromTransaction(e,t){let n=B2;for(let t of e.startState.facet(I2)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new j2(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,B2)}static selection(e){return new j2(void 0,B2,void 0,void 0,e)}}function N2(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function z2(e,t){return e.length?t.length?e.concat(t):e:t}const B2=[],V2=200;function $2(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-V2));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),N2(e,e.length-1,1e9,n.setSelAfter(r)))}return[j2.selection([t])]}function H2(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function W2(e,t){if(!e.length)return e;let n=e.length,r=B2;for(;n;){let o=G2(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[j2.selection(r)]:B2}function G2(e,t,n){let r=z2(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):B2,n);if(!e.changes)return j2.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new j2(o,lU.mapEffects(e.effects,t),a,e.startSelection.map(i),r)}const U2=/^(input\.type|delete)($|\.)/;class q2{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new q2(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!n||U2.test(n))&&(!a.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e=t&&o<=a&&(r=!0)}})),r}(a.changes,e.changes))||"input.type.compose"==n)?N2(i,i.length-1,r.minDepth,new j2(e.changes.compose(a.changes),z2(lU.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,B2)):N2(i,i.length,r.minDepth,e),new q2(i,B2,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:B2;return o.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(o[o.length-1],e)?this:new q2($2(this.done,e),this.undone,t,n)}addMapping(e){return new q2(W2(this.done,e),W2(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:P2.of({side:e,rest:H2(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?B2:r.slice(0,r.length-1);return o.mapped&&(n=W2(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:P2.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}q2.empty=new q2(B2,B2);const K2=[{key:"Mod-z",run:E2,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:L2,preventDefault:!0},{linux:"Ctrl-Shift-z",run:L2,preventDefault:!0},{key:"Mod-u",run:Z2,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:F2,preventDefault:!0}];function Y2(e,t){return RG.create(e.ranges.map(t),e.mainIndex)}function X2(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Q2({state:e,dispatch:t},n){let r=Y2(e.selection,n);return!r.eq(e.selection,!0)&&(t(X2(e,r)),!0)}function J2(e,t){return RG.cursor(t?e.to:e.from)}function e5(e,t){return Q2(e,(n=>n.empty?e.moveByChar(n,t):J2(n,t)))}function t5(e){return e.textDirectionAt(e.state.selection.main.head)==hK.LTR}const n5=e=>e5(e,!t5(e)),r5=e=>e5(e,t5(e));function o5(e,t){return Q2(e,(n=>n.empty?e.moveByGroup(n,t):J2(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function i5(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function a5(e,t,n){let r,o,i=Q0(e).resolveInner(t.head),a=n?$J.closedBy:$J.openedBy;for(let r=t.head;;){let t=n?i.childAfter(r):i.childBefore(r);if(!t)break;i5(e,t,a)?i=t:r=n?t.to:t.from}return o=i.type.prop(a)&&(r=n?d2(e,i.from,1):d2(e,i.to,-1))&&r.matched?n?r.end.to:r.end.from:n?i.to:i.from,RG.cursor(o,n?-1:1)}function s5(e,t){return Q2(e,(n=>{if(!n.empty)return J2(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const l5=e=>s5(e,!1),u5=e=>s5(e,!0);function c5(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):J2(n,t)));if(i.eq(o.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;t&&t.top>s&&t.bottomd5(e,!1),p5=e=>d5(e,!0);function f5(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(o=RG.cursor(r.from+n))}return o}function m5(e,t,n){let r=!1,o=Y2(e.selection,(t=>{let o=d2(e,t.head,-1)||d2(e,t.head,1)||t.head>0&&d2(e,t.head-1,1)||t.head{let n=t(e);return RG.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(X2(e.state,n)),!0)}function v5(e,t){return g5(e,(n=>e.moveByChar(n,t)))}const y5=e=>v5(e,!t5(e)),b5=e=>v5(e,t5(e));function x5(e,t){return g5(e,(n=>e.moveByGroup(n,t)))}function w5(e,t){return g5(e,(n=>e.moveVertically(n,t)))}const S5=e=>w5(e,!1),C5=e=>w5(e,!0);function k5(e,t){return g5(e,(n=>e.moveVertically(n,t,c5(e).height)))}const _5=e=>k5(e,!1),M5=e=>k5(e,!0),T5=({state:e,dispatch:t})=>(t(X2(e,{anchor:0})),!0),P5=({state:e,dispatch:t})=>(t(X2(e,{anchor:e.doc.length})),!0),R5=({state:e,dispatch:t})=>(t(X2(e,{anchor:e.selection.main.anchor,head:0})),!0),I5=({state:e,dispatch:t})=>(t(X2(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function D5(e,t){let{state:n}=e,r=n.selection,o=n.selection.ranges.slice();for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head);if(t?i.to0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.headi.to){o.some((e=>e.head==r.head))||o.push(r);break}if(r.head==n.head)break;n=r}}return o.length!=r.ranges.length&&(e.dispatch(X2(n,RG.create(o,o.length-1))),!0)}function O5(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange((r=>{let{from:o,to:i}=r;if(o==i){let a=t(r);ao&&(n="delete.forward",a=A5(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=A5(e,o,!1),i=A5(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:RG.cursor(o,ot(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const E5=(e,t,n)=>O5(e,(r=>{let o,i,a=r.from,{state:s}=e,l=s.doc.lineAt(a);if(n&&!t&&a>l.from&&aE5(e,!1,!0),Z5=e=>E5(e,!0,!1),F5=(e,t)=>O5(e,(n=>{let r=n.head,{state:o}=e,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let e=null;;){if(r==(t?i.to:i.from)){r==n.head&&i.number!=(t?o.doc.lines:1)&&(r+=t?1:-1);break}let s=fG(i.text,r-i.from,t)+i.from,l=i.text.slice(Math.min(r,s)-i.from,Math.max(r,s)-i.from),u=a(l);if(null!=e&&u!=e)break;" "==l&&r==n.head||(e=u),r=s}return r})),j5=e=>F5(e,!1);function N5(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function z5(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let t of N5(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),a=i.length+1;if(n){r.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)o.push(RG.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(RG.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:RG.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function B5(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of N5(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const V5=H5(!1),$5=H5(!0);function H5(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((n=>{let{from:r,to:o}=n,i=t.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=Q0(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop($J.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(t,r);e&&(r=o=(o<=i.to?i:t.doc.lineAt(o)).to);let s=new f1(t,{simulateBreak:r,simulateDoubleBreak:!!a}),l=p1(s,r);for(null==l&&(l=jU(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));oi.from&&r{let o=[];for(let i=r.from;i<=r.to;){let a=e.doc.lineAt(i);a.number>n&&(r.empty||r.to>a.from)&&(t(a,o,r),n=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:RG.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}}))}const G5=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(W5(e,((t,n)=>{n.push({from:t.from,insert:e.facet(c1)})})),{userEvent:"input.indent"})),!0),U5=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(W5(e,((t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let o=jU(r,e.tabSize),i=0,a=h1(e,Math.max(0,o-d1(e)));for(;io5(e,!t5(e)),shift:e=>x5(e,!t5(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Q2(e,(t=>f5(e,t,!t5(e)))),shift:e=>g5(e,(t=>f5(e,t,!t5(e)))),preventDefault:!0},{key:"ArrowRight",run:r5,shift:b5,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>o5(e,t5(e)),shift:e=>x5(e,t5(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Q2(e,(t=>f5(e,t,t5(e)))),shift:e=>g5(e,(t=>f5(e,t,t5(e)))),preventDefault:!0},{key:"ArrowUp",run:l5,shift:S5,preventDefault:!0},{mac:"Cmd-ArrowUp",run:T5,shift:R5},{mac:"Ctrl-ArrowUp",run:h5,shift:_5},{key:"ArrowDown",run:u5,shift:C5,preventDefault:!0},{mac:"Cmd-ArrowDown",run:P5,shift:I5},{mac:"Ctrl-ArrowDown",run:p5,shift:M5},{key:"PageUp",run:h5,shift:_5},{key:"PageDown",run:p5,shift:M5},{key:"Home",run:e=>Q2(e,(t=>f5(e,t,!1))),shift:e=>g5(e,(t=>f5(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:T5,shift:R5},{key:"End",run:e=>Q2(e,(t=>f5(e,t,!0))),shift:e=>g5(e,(t=>f5(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:P5,shift:I5},{key:"Enter",run:V5,shift:V5},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:L5,shift:L5,preventDefault:!0},{key:"Delete",run:Z5,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:j5,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>F5(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>O5(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})),preventDefault:!0},{mac:"Mod-Delete",run:e=>O5(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.headQ2(e,(t=>RG.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>g5(e,(t=>RG.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Q2(e,(t=>RG.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>g5(e,(t=>RG.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Z5},{key:"Ctrl-h",run:L5},{key:"Ctrl-k",run:e=>O5(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:oG.of(["",""])},range:RG.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),o=n==r.from?n-1:fG(r.text,n-r.from,!1)+r.from,i=n==r.to?n+1:fG(r.text,n-r.from,!0)+r.from;return{changes:{from:o,to:i,insert:e.doc.slice(n,i).append(e.doc.slice(o,n))},range:RG.cursor(i)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:p5}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))),K5=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Q2(e,(t=>a5(e.state,t,!t5(e)))),shift:e=>g5(e,(t=>a5(e.state,t,!t5(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Q2(e,(t=>a5(e.state,t,t5(e)))),shift:e=>g5(e,(t=>a5(e.state,t,t5(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>z5(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>B5(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>z5(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>B5(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>D5(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>D5(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=RG.create([n.main]):n.main.empty||(r=RG.create([RG.cursor(n.main.head)])),!!r&&(t(X2(e,r)),!0)}},{key:"Mod-Enter",run:$5},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=N5(e).map((({from:t,to:n})=>RG.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:RG.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=Y2(e.selection,(t=>{let n=Q0(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return RG.range(n.to,n.from)}return t}));return!n.eq(e.selection)&&(t(X2(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:U5},{key:"Mod-]",run:G5},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new f1(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=W5(e,((t,o,i)=>{let a=p1(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=h1(e,a);(s!=l||i.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(N5(t).map((({from:e,to:n})=>(e>0?e--:n{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>m5(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=k2(e.state,n.from);return r.line?w2(e):!!r.block&&C2(e)}},{key:"Alt-A",run:S2},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(q5),Y5={key:"Tab",run:G5,shift:U5};function X5(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}t++}for(;te.normalize("NFKD"):e=>e;class e3{constructor(e,t,n=0,r=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=o?e=>o(J5(e)):J5,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return mG(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=gG(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=vG(e);let r=this.normalize(t);if(r.length)for(let e=0,o=n;;e++){let i=r.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}o==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=s3(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new i3(t,e.sliceString(t,n));return o3.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:i}=r;return i>t&&(o=e.sliceString(t,i)+o,i=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=s3(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=i3.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function s3(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function l3(e){let t=X5("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,o=r.doc.lineAt(r.selection.main.head),[,i,a,s,l]=n,u=s?+s.slice(1):0,c=a?+a:o.number;if(a&&l){let e=c/100;i&&(e=e*("-"==i?-1:1)+o.number/r.doc.lines),c=Math.round(r.doc.lines*e)}else a&&i&&(c=c*("-"==i?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),h=RG.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[u3.of(!1),JX.scrollIntoView(h.from,{y:"center"})],selection:h}),e.focus()}return{dom:X5("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:u3.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},X5("label",e.state.phrase("Go to line"),": ",t)," ",X5("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),X5("button",{name:"close",onclick:()=>{e.dispatch({effects:u3.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(r3.prototype[Symbol.iterator]=a3.prototype[Symbol.iterator]=function(){return this});const u3=lU.define(),c3=NG.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(u3)&&(e=n.value);return e},provide:e=>gJ.from(e,(e=>e?l3:null))}),d3=JX.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),h3={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},p3=OG.define({combine:e=>wU(e,h3,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});const f3=eK.mark({class:"cm-selectionMatch"}),m3=eK.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function g3(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==gU.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==gU.Word)}const v3=XK.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(p3),{state:n}=e,r=n.selection;if(r.ranges.length>1)return eK.none;let o,i=r.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return eK.none;let e=n.wordAt(i.head);if(!e)return eK.none;a=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e200)return eK.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!g3(a,n,i.from,i.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==gU.Word&&e(t.sliceDoc(r-1,r))==gU.Word}(a,n,i.from,i.to))return eK.none}else if(o=n.sliceDoc(i.from,i.to),!o)return eK.none}let s=[];for(let r of e.visibleRanges){let e=new e3(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!a||g3(a,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?s.push(m3.range(r,o)):(r>=i.to||o<=i.from)&&s.push(f3.range(r,o)),s.length>t.maxMatches))return eK.none}}return eK.set(s)}},{decorations:e=>e.decorations}),y3=JX.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const b3=OG.define({combine:e=>wU(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new q3(e),scrollToMatch:e=>JX.scrollIntoView(e)})});class x3{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,n3),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new T3(this):new C3(this)}getCursor(e,t=0,n){let r=e.doc?e:xU.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?k3(this,r,t,n):S3(this,r,t,n)}}class w3{constructor(e){this.spec=e}}function S3(e,t,n,r){return new e3(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,i=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=S3(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function k3(e,t,n,r){return new r3(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(o(_3(n.input,n.index))!=gU.Word||o(M3(n.input,n.index))!=gU.Word)&&(o(M3(n.input,n.index+n[0].length))!=gU.Word||o(_3(n.input,n.index+n[0].length))!=gU.Word)):void 0},n,r);var o}function _3(e,t){return e.slice(fG(e,t,!1),t)}function M3(e,t){return e.slice(t,fG(e,t))}class T3 extends w3{nextMatch(e,t,n){let r=k3(this.spec,e,n,e.doc.length).next();return r.done&&(r=k3(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),i=k3(this.spec,e,o,n),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,((t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=k3(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const P3=lU.define(),R3=lU.define(),I3=NG.define({create:e=>new D3(V3(e).create(),null),update(e,t){for(let n of t.effects)n.is(P3)?e=new D3(n.value.create(),e.panel):n.is(R3)&&(e=new D3(e.query,n.value?B3:null));return e},provide:e=>gJ.from(e,(e=>e.panel))});class D3{constructor(e,t){this.query=e,this.panel=t}}const O3=eK.mark({class:"cm-searchMatch"}),A3=eK.mark({class:"cm-searchMatch cm-searchMatch-selected"}),E3=XK.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(I3))}update(e){let t=e.state.field(I3);(t!=e.startState.field(I3)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return eK.none;let{view:n}=this,r=new TU;for(let t=0,o=n.visibleRanges,i=o.length;to[t+1].from-500;)s=o[++t].to;e.highlight(n.state,a,s,((e,t)=>{let o=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,o?A3:O3)}))}return r.finish()}},{decorations:e=>e.decorations});function L3(e){return t=>{let n=t.state.field(I3,!1);return n&&n.query.spec.valid?e(t,n):W3(t)}}const Z3=L3(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let o=RG.single(r.from,r.to),i=e.state.facet(b3);return e.dispatch({selection:o,effects:[Q3(e,r),i.scrollToMatch(o.main,e)],userEvent:"select.search"}),H3(e),!0})),F3=L3(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,o=t.prevMatch(n,r,r);if(!o)return!1;let i=RG.single(o.from,o.to),a=e.state.facet(b3);return e.dispatch({selection:i,effects:[Q3(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),H3(e),!0})),j3=L3(((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:RG.create(n.map((e=>RG.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),N3=L3(((e,{query:t})=>{let{state:n}=e,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=t.nextMatch(n,r,r);if(!i)return!1;let a,s,l=i,u=[],c=[];l.from==r&&l.to==o&&(s=n.toText(t.getReplacement(l)),u.push({from:l.from,to:l.to,insert:s}),l=t.nextMatch(n,l.from,l.to),c.push(JX.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=e.state.changes(u);return l&&(a=RG.single(l.from,l.to).map(d),c.push(Q3(e,l)),c.push(n.facet(b3).scrollToMatch(a.main,e))),e.dispatch({changes:d,selection:a,effects:c,userEvent:"input.replace"}),!0})),z3=L3(((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map((e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}}));if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:JX.announce.of(r),userEvent:"input.replace.all"}),!0}));function B3(e){return e.state.facet(b3).createPanel(e)}function V3(e,t){var n,r,o,i,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let u=e.facet(b3);return new x3({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:u.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:u.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:u.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function $3(e){let t=hJ(e,B3);return t&&t.dom.querySelector("[main-field]")}function H3(e){let t=$3(e);t&&t==e.root.activeElement&&t.select()}const W3=e=>{let t=e.state.field(I3,!1);if(t&&t.panel){let n=$3(e);if(n&&n!=e.root.activeElement){let r=V3(e.state,t.query.spec);r.valid&&e.dispatch({effects:P3.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[R3.of(!0),t?P3.of(V3(e.state,t.query.spec)):lU.appendConfig.of(e4)]});return!0},G3=e=>{let t=e.state.field(I3,!1);if(!t||!t.panel)return!1;let n=hJ(e,B3);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:R3.of(!1)}),!0},U3=[{key:"Mod-f",run:W3,scope:"editor search-panel"},{key:"F3",run:Z3,shift:F3,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Z3,shift:F3,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:G3,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:o}=n.main,i=[],a=0;for(let t=new e3(e.doc,e.sliceDoc(r,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==r&&(a=i.length),i.push(RG.range(t.value.from,t.value.to))}return t(e.update({selection:RG.create(i,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=hJ(e,l3);if(!t){let n=[u3.of(!0)];null==e.state.field(c3,!1)&&n.push(lU.appendConfig.of([c3,d3])),e.dispatch({effects:n}),t=hJ(e,l3)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=RG.create(n.ranges.map((t=>e.wordAt(t.head)||RG.cursor(t.head))),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=r)))return!1;let o=function(e,t){let{main:n,ranges:r}=e.selection,o=e.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let n=!1,o=new e3(e.doc,t,r[r.length-1].to);;){if(o.next(),!o.done){if(n&&r.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(n)return null;o=new e3(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!o&&(t(e.update({selection:e.selection.addRange(RG.range(o.from,o.to),!1),effects:JX.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class q3{constructor(e){this.view=e;let t=this.query=e.state.field(I3).query.spec;function n(e,t,n){return X5("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=X5("input",{value:t.search,placeholder:K3(e,"Find"),"aria-label":K3(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=X5("input",{value:t.replace,placeholder:K3(e,"Replace"),"aria-label":K3(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=X5("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=X5("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=X5("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=X5("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>Z3(e)),[K3(e,"next")]),n("prev",(()=>F3(e)),[K3(e,"previous")]),n("select",(()=>j3(e)),[K3(e,"all")]),X5("label",null,[this.caseField,K3(e,"match case")]),X5("label",null,[this.reField,K3(e,"regexp")]),X5("label",null,[this.wordField,K3(e,"by word")]),...e.state.readOnly?[]:[X5("br"),this.replaceField,n("replace",(()=>N3(e)),[K3(e,"replace")]),n("replaceAll",(()=>z3(e)),[K3(e,"replace all")])],X5("button",{name:"close",onclick:()=>G3(e),"aria-label":K3(e,"close"),type:"button"},["×"])])}commit(){let e=new x3({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:P3.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",pQ(uQ(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?F3:Z3)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),N3(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(P3)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(b3).top}}function K3(e,t){return e.state.phrase(t)}const Y3=30,X3=/[\s\.,:;?!]/;function Q3(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),o=e.state.doc.lineAt(n).to,i=Math.max(r.from,t-Y3),a=Math.min(o,n+Y3),s=e.state.sliceDoc(i,a);if(i!=r.from)for(let e=0;es.length-Y3;e--)if(!X3.test(s[e-1])&&X3.test(s[e])){s=s.slice(0,e);break}return JX.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`)}const J3=JX.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),e4=[I3,WG.low(E3),J3];class t4{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Q0(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),o=r.search(a4(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function n4(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function r4(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,r]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let o=e.matchBefore(r);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}class o4{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function i4(e){return e.selection.main.from}function a4(e,t){var n;let{source:r}=e,o=t&&"^"!=r[0],i="$"!=r[r.length-1];return o||i?new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const s4=iU.define();function l4(e,t,n,r){let{main:o}=e.selection,i=n-o.from,a=r-o.from;return{...e.changeByRange((s=>{if(s!=o&&n!=r&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:l},range:RG.cursor(s.from+i+l.length)}})),scrollIntoView:!0,userEvent:"input.complete"}}const u4=new WeakMap;function c4(e){if(!Array.isArray(e))return e;let t=u4.get(e);return t||u4.set(e,t=r4(e)),t}const d4=lU.define(),h4=lU.define();class p4{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=gG(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!r||1==b&&m||0==v&&0!=b)&&(t[c]==l||n[c]==l&&(d=!0)?i[c++]=r:i.length&&(g=!1)),v=b,r+=vG(l)}return c==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):h==s&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==s?this.ret(-900-e.length,[p,f]):c==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],o=0;for(let e of t){let t=e+(this.astral?vG(mG(n,e)):1);o&&r[o-1]==e?r[o-1]=t:(r[o++]=e,r[o++]=t)}return this.ret(e-n.length,r)}}class f4{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.lengthwU(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:v4,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>g4(e(n),t(n)),optionClass:(e,t)=>n=>g4(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function g4(e,t){return e?t?e+" "+t:e:t}function v4(e,t,n,r,o,i){let a,s,l=e.textDirection==hK.RTL,u=l,c=!1,d="top",h=t.left-o.left,p=o.right-t.right,f=r.right-r.left,m=r.bottom-r.top;if(u&&h=m||e>t.top?a=n.bottom-t.top:(d="bottom",a=t.bottom-n.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":u?"left":"right")}}function y4(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class b4{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:i}=r.open,a=e.state.facet(m4);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;ea&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,n))),s.className="cm-completionMatchedText",a=n}return ae.position-t.position)).map((e=>e.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=y4(o.length,i,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:r}=e.state.field(t).open;for(let t,o=n.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(m4).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:h4.of(null)})})),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:o,selected:i,disabled:a}=n.open;r.open&&r.open.options==o||(this.range=y4(o.length,i,e.state.facet(m4).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected=this.range.to)&&(this.range=y4(t.options.length,t.selected,this.view.state.facet(m4).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:o}=r;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(r);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)})).catch((e=>UK(this.view.state,e,"completion info"))):(this.addInfoPane(i,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby")):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/o)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let e=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottom{e.target==r&&e.preventDefault()}));let o=null;for(let i=n.from;in.from||0==n.from))if(o=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const u=r.appendChild(document.createElement("li"));u.id=t+"-"+i,u.setAttribute("role","option");let c=this.optionClass(a);c&&(u.className=c);for(let e of this.optionContent){let t=e(a,this.view.state,this.view,s);t&&u.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew b4(n,e,t)}function w4(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class S4{constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new S4(this.options,M4(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o,i){if(r&&!i&&e.some((e=>e.isPending)))return r.setDisabled();let a=function(e,t){let n=[],r=null,o=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some((t=>t.name==e))||r.push("string"==typeof t?{name:e}:t)}},a=t.facet(m4);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)i(new o4(t,r.source,e?e(t):[],1e9-n.length));else{let n,s=t.sliceDoc(r.from,r.to),l=a.filterStrict?new f4(s):new p4(s);for(let t of r.result.options)if(n=l.match(t.label)){let a=t.displayLabel?e?e(t,n.matched):[]:n.matched,s=n.score+(t.boost||0);if(i(new o4(t,r.source,a,s)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;o||(o=Object.create(null)),o[e]=Math.max(s,o[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,i=(e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?o[t.name]-o[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.namet.score-e.score||u(e.completion,t.completion)))){let t=e.completion;!l||l.label!=t.label||l.detail!=t.detail||null!=l.type&&null!=t.type&&l.type!=t.type||l.apply!=t.apply||l.boost!=t.boost?s.push(e):w4(e.completion)>w4(l)&&(s[s.length-1]=e),l=e.completion}return s}(e,t);if(!a.length)return r&&e.some((e=>e.isPending))?r.setDisabled():null;let s=t.facet(m4).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:L4,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new S4(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new S4(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class C4{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new C4(T4,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(m4),r=(n.override||t.languageDataAt("autocomplete",i4(t)).map(c4)).map((t=>(this.active.find((e=>e.source==t))||new R4(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let o=this.open,i=e.effects.some((e=>e.is(D4)));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;ne.isPending))&&(o=null),!o&&r.every((e=>!e.isPending))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new R4(e.source,0):e)));for(let t of e.effects)t.is(O4)&&(o=o&&o.setSelected(t.value,this.id));return r==this.active&&o==this.open?this:new C4(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?k4:_4}}const k4={"aria-autocomplete":"list"},_4={};function M4(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const T4=[];function P4(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(s4);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class R4{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=P4(e,t),r=this;(8&n||16&n&&this.touches(e))&&(r=new R4(r.source,0)),4&n&&0==r.state&&(r=new R4(this.source,1)),r=r.updateFor(e,n);for(let t of e.effects)if(t.is(d4))r=new R4(r.source,1,t.value);else if(t.is(h4))r=new R4(r.source,0);else if(t.is(D4))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(i4(e.state))}}class I4 extends R4{constructor(e,t,n,r,o,i){super(e,3,t),this.limit=n,this.result=r,this.from=o,this.to=i}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=i4(e.state);if(a>i||!r||2&t&&(i4(e.startState)==this.from||ae.map((e=>e.map(t)))}),O4=lU.define(),A4=NG.define({create:()=>C4.start(),update:(e,t)=>e.update(t),provide:e=>[nJ.from(e,(e=>e.tooltip)),JX.contentAttributes.from(e,(e=>e.attrs))]});function E4(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(A4).active.find((e=>e.source==t.source));return r instanceof I4&&("string"==typeof n?e.dispatch({...l4(e.state,n,r.from,r.to),annotations:s4.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}const L4=x4(A4,E4);function Z4(e,t="option"){return n=>{let r=n.state.field(A4,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:O4.of(s)}),!0}}const F4=e=>!!e.state.field(A4,!1)&&(e.dispatch({effects:d4.of(!0)}),!0);class j4{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const N4=XK.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(A4).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(A4),n=e.state.facet(m4);if(!e.selectionSet&&!e.docChanged&&e.startState.field(A4)==t)return;let r=e.transactions.some((e=>{let t=P4(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)}));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){UK(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is(d4)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>e.isPending&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(A4);for(let e of t.active)e.isPending&&!this.running.some((t=>t.active.source==e.source))&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(m4).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=i4(t),r=new t4(t,n,e.explicit,this.view),o=new j4(e,r);this.running.push(o),Promise.resolve(e.source(r)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:h4.of(null)}),UK(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(m4).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(m4),r=this.view.state.field(A4);for(let o=0;oe.source==i.active.source));if(a&&a.isPending)if(null==i.done){let e=new R4(i.active.source,0);for(let t of i.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(a)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:D4.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(A4,!1);if(t&&t.tooltip&&this.view.state.facet(m4).closeOnBlur){let n=t.open&&uJ(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:h4.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:d4.of(!1)})),20),this.composing=0}}}),z4="object"==typeof navigator&&/Win/.test(navigator.platform),B4=WG.highest(JX.domEventHandlers({keydown(e,t){let n=t.state.field(A4,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!z4||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find((e=>e.source==r.source)),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&E4(t,r),!1}})),V4=JX.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const $4={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},H4=lU.define({map(e,t){let n=t.mapPos(e,-1,bG.TrackAfter);return null==n?void 0:n}}),W4=new class extends SU{};W4.startSide=1,W4.endSide=-1;const G4=NG.define({create:()=>MU.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(H4)&&(e=e.update({add:[W4.range(n.value,n.value+1)]}));return e}});const U4="()[]{}<>«»»«[]{}";function q4(e){for(let t=0;t<16;t+=2)if(U4.charCodeAt(t)==e)return U4.charAt(t+1);return gG(e<128?e:e+1)}function K4(e,t){return e.languageDataAt("closeBrackets",t)[0]||$4}const Y4="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),X4=JX.inputHandler.of(((e,t,n,r)=>{if((Y4?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(r.length>2||2==r.length&&1==vG(mG(r,0))||t!=o.from||n!=o.to)return!1;let i=function(e,t){let n=K4(e,e.selection.main.head),r=n.brackets||$4.brackets;for(let o of r){let i=q4(mG(o,0));if(t==o)return i==o?r6(e,o,r.indexOf(o+o+o)>-1,n):t6(e,o,i,n.before||$4.before);if(t==i&&J4(e,e.selection.main.from))return n6(e,o,i)}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)})),Q4=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=K4(e,e.selection.main.head).brackets||$4.brackets,r=null,o=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return vG(mG(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let o of n)if(o==r&&e6(e.doc,t.head)==q4(mG(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:RG.cursor(t.head-o.length)}}return{range:r=t}}));return r||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function J4(e,t){let n=!1;return e.field(G4).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function e6(e,t){let n=e.sliceString(t,t+2);return n.slice(0,vG(mG(n,0)))}function t6(e,t,n,r){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:H4.of(i.to+t.length),range:RG.range(i.anchor+t.length,i.head+t.length)};let a=e6(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:H4.of(i.head+t.length),range:RG.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function n6(e,t,n){let r=null,o=e.changeByRange((t=>t.empty&&e6(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:RG.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function r6(e,t,n,r){let o=r.stringPrefixes||$4.stringPrefixes,i=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:H4.of(r.to+t.length),range:RG.range(r.anchor+t.length,r.head+t.length)};let a,s=r.head,l=e6(e.doc,s);if(l==t){if(o6(e,s))return{changes:{insert:t+t,from:s},effects:H4.of(s+t.length),range:RG.cursor(s+t.length)};if(J4(e,s)){let r=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:RG.cursor(s+r.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=i6(e,s-2*t.length,o))>-1&&o6(e,a))return{changes:{insert:t+t+t+t,from:s},effects:H4.of(s+t.length),range:RG.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=gU.Word&&i6(e,s,o)>-1&&!function(e,t,n,r){let o=Q0(e).resolveInner(t,-1),i=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:H4.of(s+t.length),range:RG.cursor(s+t.length)}}return{range:i=r}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function o6(e,t){let n=Q0(e).resolveInner(t+1);return n.parent&&n.from==t}function i6(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=gU.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&r(e.sliceDoc(n-1,n))!=gU.Word)return n}return-1}const a6=[{key:"Ctrl-Space",run:F4},{mac:"Alt-`",run:F4},{mac:"Alt-i",run:F4},{key:"Escape",run:e=>{let t=e.state.field(A4,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:h4.of(null)}),!0)}},{key:"ArrowDown",run:Z4(!0)},{key:"ArrowUp",run:Z4(!1)},{key:"PageDown",run:Z4(!0,"page")},{key:"PageUp",run:Z4(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(A4,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(m4).defaultKeymap?[a6]:[])));class l6{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class u6{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(C6).markerFilter;r&&(e=r(e,n));let o=e.slice().sort(((e,t)=>e.from-t.from||e.to-t.to)),i=new TU,a=[],s=0,l=n.doc.iter(),u=0,c=n.doc.length;for(let e=0;;){let t,n,r=e==o.length?null:o[e];if(!r&&!a.length)break;if(a.length)t=s,n=a.reduce(((e,t)=>Math.min(e,t.to)),r&&r.from>t?r.from:1e8);else{if(t=r.from,t>c)break;n=r.to,a.push(r),e++}for(;er.from||r.to==t)){n=Math.min(r.from,n);break}a.push(r),e++,n=Math.min(r.to,n)}n=Math.min(n,c);let d=!1;if(a.some((e=>e.from==t&&(e.to==n||n==c)))&&(d=t==n,!d&&n-t<10)){let e=t-(u+l.value.length);e>0&&(l.next(e),u=t);for(let e=t;;){if(e>=n){d=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let h=L6(a);if(d)i.add(t,t,eK.widget({widget:new P6(h),diagnostics:a.slice()}));else{let e=a.reduce(((e,t)=>t.markClass?e+" "+t.markClass:e),"");i.add(t,n,eK.mark({class:"cm-lintRange cm-lintRange-"+h+e,diagnostics:a.slice(),inclusiveEnd:a.some((e=>e.to>n))}))}if(s=n,s==c)break;for(let e=0;e{if(!(t&&o.diagnostics.indexOf(t)<0))if(r){if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new l6(r.from,n,r.diagnostic)}else r=new l6(e,n,t||o.diagnostics[0])})),r}function d6(e,t){let n=t.pos,r=t.end||n,o=e.state.facet(C6).hideOn(e,n,r);if(null!=o)return o;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(p6)))&&!e.changes.touchesRange(i.from,Math.max(i.to,r)))}function h6(e,t){return e.field(g6,!1)?t:t.concat(lU.appendConfig.of($6))}const p6=lU.define(),f6=lU.define(),m6=lU.define(),g6=NG.define({create:()=>new u6(eK.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,o=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=c6(n,e.selected.diagnostic,o)||c6(n,null,o)}!n.size&&o&&t.state.facet(C6).autoPanel&&(o=null),e=new u6(n,o,r)}for(let n of t.effects)if(n.is(p6)){let r=t.state.facet(C6).autoPanel?n.value.length?I6.open:null:e.panel;e=u6.init(n.value,r,t.state)}else n.is(f6)?e=new u6(e.diagnostics,n.value?I6.open:null,e.selected):n.is(m6)&&(e=new u6(e.diagnostics,e.panel,n.value));return e},provide:e=>[gJ.from(e,(e=>e.panel)),JX.decorations.from(e,(e=>e.diagnostics))]});const v6=eK.mark({class:"cm-lintRange cm-lintRange-active"});function y6(e,t,n){let r,{diagnostics:o}=e.state.field(g6),i=-1,a=-1;o.between(t-(n<0?1:0),t+(n>0?1:0),((e,o,{spec:s})=>{if(t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t({dom:b6(e,r)})}:null}function b6(e,t){return X5("ul",{class:"cm-tooltip-lint"},t.map((t=>T6(e,t,!1))))}const x6=e=>{let t=e.state.field(g6,!1);return!(!t||!t.panel)&&(e.dispatch({effects:f6.of(!1)}),!0)},w6=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(g6,!1);t&&t.panel||e.dispatch({effects:h6(e.state,[f6.of(!0)])});let n=hJ(e,I6.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(g6,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],S6=XK.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(C6);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e{r.push(n),clearTimeout(o),r.length==e.length?t(r):o=setTimeout((()=>t(r)),200)}),n)}(t.map((e=>Promise.resolve(e(this.view)))),(t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:h6(e,[p6.of(t)])}}(this.view.state,t.reduce(((e,t)=>e.concat(t)))))}),(e=>{UK(this.view.state,e)}))}}update(e){let t=e.state.facet(C6);(e.docChanged||t!=e.startState.facet(C6)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});const C6=OG.define({combine:e=>({sources:e.map((e=>e.source)).filter((e=>null!=e)),...wU(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:k6,tooltipFilter:k6,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,o)=>e(n,r,o)||t(n,r,o):e:t,autoPanel:(e,t)=>e||t})})});function k6(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function _6(e,t={}){return[C6.of({source:e,config:t}),S6,$6]}function M6(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function T6(e,t,n){var r;let o=n?M6(t.actions):[];return X5("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},X5("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let i=!1,a=r=>{if(r.preventDefault(),i)return;i=!0;let o=c6(e.state.field(g6).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:s}=n,l=o[r]?s.indexOf(o[r]):-1,u=l<0?s:[s.slice(0,l),X5("u",s.slice(l,l+1)),s.slice(l+1)];return X5("button",{type:"button",class:"cm-diagnosticAction"+(n.markClass?" "+n.markClass:""),onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[r]})"`}.`},u)})),t.source&&X5("div",{class:"cm-diagnosticSource"},t.source))}class P6 extends Qq{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return X5("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class R6{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=T6(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class I6{constructor(e){this.view=e,this.items=[];this.list=X5("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)x6(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=M6(n.actions);for(let o=0;o{for(let t=0;tx6(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(g6).selected;if(!e)return-1;for(let t=0;t{for(let e of s.diagnostics){if(i.has(e))continue;i.add(e);let a,s=-1;for(let t=n;tn&&(this.items.splice(n,s-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),o=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}}));n({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=c6(this.view.state.field(g6).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:m6.of(t)})}static open(e){return new I6(e)}}function D6(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function O6(e){return D6(``,'width="6" height="3"')}const A6=JX.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:O6("#d11")},".cm-lintRange-warning":{backgroundImage:O6("orange")},".cm-lintRange-info":{backgroundImage:O6("#999")},".cm-lintRange-hint":{backgroundImage:O6("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function E6(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function L6(e){let t="hint",n=1;for(let r of e){let e=E6(r.severity);e>n&&(n=e,t=r.severity)}return t}class Z6 extends vJ{constructor(e){super(),this.diagnostics=e,this.severity=L6(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(H6).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:z6.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:b6(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientXo.top-10&&r.clientY{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),i=setTimeout(r,o)}}(e,t,n)),t}}function F6(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new Z6(n[e]).range(+e));return MU.of(r,!0)}const j6=SJ({class:"cm-gutter-lint",markers:e=>e.state.field(N6),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(N6).between(n.from,n.to,((e,t,o)=>{e>n.from&&eMU.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(H6).markerFilter;for(let r of t.effects)if(r.is(p6)){let o=r.value;n&&(o=n(o||[],t.state)),e=F6(t.state.doc,o.slice(0))}return e}}),z6=lU.define(),B6=NG.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=d6(t,e)?null:{...e,pos:t.changes.mapPos(e.pos)}),t.effects.reduce(((e,t)=>t.is(z6)?t.value:e),e)),provide:e=>nJ.from(e)}),V6=JX.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:D6('')},".cm-lint-marker-warning":{content:D6('')},".cm-lint-marker-error":{content:D6('')}}),$6=[g6,JX.decorations.compute([g6],(e=>{let{selected:t,panel:n}=e.field(g6);return t&&n&&t.from!=t.to?eK.set([v6.range(t.from,t.to)]):eK.none})),lJ(y6,{hideOn:d6}),A6],H6=OG.define({combine:e=>wU(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function W6(e={}){return[H6.of(e),N6,j6,V6,B6]}var G6=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(Q4)),!1!==e.defaultKeymap&&(n=n.concat(K5)),!1!==e.searchKeymap&&(n=n.concat(U3)),!1!==e.historyKeymap&&(n=n.concat(K2)),!1!==e.foldKeymap&&(n=n.concat(F1)),!1!==e.completionKeymap&&(n=n.concat(a6)),!1!==e.lintKeymap&&(n=n.concat(w6));var r=[];return!1!==e.lineNumbers&&r.push(function(e={}){return[AJ.of(e),kJ(),ZJ]}()),!1!==e.highlightActiveLineGutter&&r.push(NJ),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[LQ.of(e),ZQ||(ZQ=XK.fromClass(class{constructor(e){this.view=e,this.decorations=eK.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(LQ)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new IQ({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:o}=n.state,i=mG(t[0],0);if(9==i){let e=o.lineAt(r),t=n.state.tabSize,i=jU(e.text,t,r-e.from);return eK.replace({widget:new jQ((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=eK.replace({widget:new FQ(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(LQ);e.startState.facet(LQ)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&r.push(function(e={}){return[O2,D2.of(e),JX.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?E2:"historyRedo"==e.inputType?L2:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t={...H1,...e},n=new W1(t,!0),r=new W1(t,!1),o=XK.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(s1)!=e.state.facet(s1)||e.startState.field(D1,!1)!=e.state.field(D1,!1)||Q0(e.startState)!=Q0(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new TU;for(let o of e.viewportLineBlocks){let i=A1(e.state,o.from,o.to)?r:M1(e.state,o.from,o.to)?n:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,SJ({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||MU.empty},initialSpacer:()=>new W1(t,!1),domEventHandlers:{...i,click:(e,t,n)=>{if(i.click&&i.click(e,t,n))return!0;let r=A1(e.state,t.from,t.to);if(r)return e.dispatch({effects:R1.of(r)}),!0;let o=M1(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:P1.of(o)}),!0)}}}),z1()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[xQ.of(e),SQ,kQ,_Q,VK.of(!0)]}()),!1!==e.dropCursor&&r.push([TQ,PQ]),!1!==e.allowMultipleSelections&&r.push(xU.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(xU.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,o=n.lineAt(r);if(r>o.from+200)return e;let i=n.sliceString(o.from,r);if(!t.some((e=>e.test(i))))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=p1(a,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],o=h1(a,n);r!=o&&l.push({from:t.from,to:t.from+r.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&r.push(X1(e2,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[r2.of(e),s2]}()),!1!==e.closeBrackets&&r.push([X4,G4]),!1!==e.autocompletion&&r.push(function(e={}){return[B4,A4,m4.of(e),N4,s6,V4]}()),!1!==e.rectangularSelection&&r.push(function(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return JX.mouseSelectionStyle.of(((e,n)=>t(n)?HQ(e,n):null))}()),!1!==t&&r.push(function(e={}){let[t,n]=WQ[e.key||"Alt"],r=XK.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,JX.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?GQ:null}))]}()),!1!==e.highlightActiveLine&&r.push(zQ),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[y3,v3];return e&&t.push(p3.of(e)),t}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(c1.of(" ".repeat(e.tabSize))),r.concat([sQ.of(n.flat())]).filter(Boolean)};const U6="#e5c07b",q6="#e06c75",K6="#56b6c2",Y6="#ffffff",X6="#abb2bf",Q6="#7d8799",J6="#61afef",e8="#98c379",t8="#d19a66",n8="#c678dd",r8="#21252b",o8="#2c313a",i8="#282c34",a8="#353a42",s8="#3E4451",l8="#528bff",u8=[JX.theme({"&":{color:X6,backgroundColor:i8},".cm-content":{caretColor:l8},".cm-cursor, .cm-dropCursor":{borderLeftColor:l8},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:s8},".cm-panels":{backgroundColor:r8,color:X6},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:i8,color:Q6,border:"none"},".cm-activeLineGutter":{backgroundColor:o8},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:a8},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:a8,borderBottomColor:a8},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:o8,color:X6}}},{dark:!0}),X1(U1.define([{tag:H0.keyword,color:n8},{tag:[H0.name,H0.deleted,H0.character,H0.propertyName,H0.macroName],color:q6},{tag:[H0.function(H0.variableName),H0.labelName],color:J6},{tag:[H0.color,H0.constant(H0.name),H0.standard(H0.name)],color:t8},{tag:[H0.definition(H0.name),H0.separator],color:X6},{tag:[H0.typeName,H0.className,H0.number,H0.changed,H0.annotation,H0.modifier,H0.self,H0.namespace],color:U6},{tag:[H0.operator,H0.operatorKeyword,H0.url,H0.escape,H0.regexp,H0.link,H0.special(H0.string)],color:K6},{tag:[H0.meta,H0.comment],color:Q6},{tag:H0.strong,fontWeight:"bold"},{tag:H0.emphasis,fontStyle:"italic"},{tag:H0.strikethrough,textDecoration:"line-through"},{tag:H0.link,color:Q6,textDecoration:"underline"},{tag:H0.heading,fontWeight:"bold",color:q6},{tag:[H0.atom,H0.bool,H0.special(H0.variableName)],color:t8},{tag:[H0.processingInstruction,H0.string,H0.inserted],color:e8},{tag:H0.invalid,color:Y6}]))];var c8=JX.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),d8=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:o="light",placeholder:i="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(sQ.of([Y5])),a&&("boolean"==typeof a?s.unshift(G6()):s.unshift(G6(a))),i&&s.unshift(function(e){let t=XK.fromClass(class{constructor(t){this.view=t,this.placeholder=e?eK.set([eK.widget({widget:new BQ(e),side:1}).range(0)]):eK.none}get decorations(){return this.view.state.doc.length?eK.none:this.placeholder}},{decorations:e=>e.decorations});return"string"==typeof e?[t,JX.contentAttributes.of({"aria-placeholder":e})]:t}(i)),o){case"light":s.push(c8);break;case"dark":s.push(u8);break;case"none":break;default:s.push(o)}return!1===n&&s.push(JX.editable.of(!1)),r&&s.push(xU.readOnly.of(!0)),[...s]};class h8{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach((e=>{try{e()}catch(e){console.error("TimeoutLatch callback error:",e)}}))}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class p8{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),0===this.latches.size&&this.stop()}start(){null===this.interval&&(this.interval=setInterval((()=>{this.latches.forEach((e=>{e.tick(),e.isDone&&this.remove(e)}))}),1))}stop(){null!==this.interval&&(clearInterval(this.interval),this.interval=null)}}var f8=null,m8=iU.define(),g8=[];function v8(e){var{value:t,selection:n,onChange:r,onStatistics:o,onCreateEditor:i,onUpdate:a,extensions:s=g8,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:p=null,width:f=null,minWidth:m=null,maxWidth:g=null,placeholder:v="",editable:y=!0,readOnly:b=!1,indentWithTab:x=!0,basicSetup:w=!0,root:S,initialState:C}=e,[k,_]=(0,d.useState)(),[M,T]=(0,d.useState)(),[P,R]=(0,d.useState)(),I=(0,d.useState)((()=>({current:null})))[0],D=(0,d.useState)((()=>({current:null})))[0],O=JX.theme({"&":{height:c,minHeight:h,maxHeight:p,width:f,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),A=JX.updateListener.of((e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some((e=>e.annotation(m8)))){I.current?I.current.reset():(I.current=new h8((()=>{if(D.current){var e=D.current;D.current=null,e()}I.current=null}),200),("undefined"==typeof window?new p8:(f8||(f8=new p8),f8)).add(I.current));var t=e.state.doc.toString();r(t,e)}o&&o((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),E=[A,O,...d8({theme:u,editable:y,readOnly:b,placeholder:v,indentWithTab:x,basicSetup:w})];return a&&"function"==typeof a&&E.push(JX.updateListener.of(a)),E=E.concat(s),(0,d.useLayoutEffect)((()=>{if(k&&!P){var e={doc:t,selection:n,extensions:E},r=C?xU.fromJSON(C.json,e,C.fields):xU.create(e);if(R(r),!M){var o=new JX({state:r,parent:k,root:S});T(o),i&&i(o,r)}}return()=>{M&&(R(void 0),T(void 0))}}),[k,P]),(0,d.useEffect)((()=>{e.container&&_(e.container)}),[e.container]),(0,d.useEffect)((()=>()=>{M&&(M.destroy(),T(void 0)),I.current&&(I.current.cancel(),I.current=null)}),[M]),(0,d.useEffect)((()=>{l&&M&&M.focus()}),[l,M]),(0,d.useEffect)((()=>{M&&M.dispatch({effects:lU.reconfigure.of(E)})}),[u,s,c,h,p,f,m,g,v,y,b,x,w,r,a]),(0,d.useEffect)((()=>{if(void 0!==t){var e=M?M.state.doc.toString():"";if(M&&t!==e){var n=()=>{M&&t!==M.state.doc.toString()&&M.dispatch({changes:{from:0,to:M.state.doc.toString().length,insert:t||""},annotations:[m8.of(!0)]})};I.current&&!I.current.isDone?D.current=n:n()}}}),[t,M]),{state:P,setState:R,view:M,setView:T,container:k,setContainer:_}}var y8=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],b8=(0,d.forwardRef)(((e,t)=>{var{className:n,value:r="",selection:i,extensions:a=[],onChange:s,onStatistics:l,onCreateEditor:u,onUpdate:c,autoFocus:h,theme:p="light",height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:C,readOnly:k,root:_,initialState:M}=e,T=(0,GW.Z)(e,y8),P=(0,d.useRef)(null),{state:R,view:I,container:D,setContainer:O}=v8({root:_,value:r,autoFocus:h,theme:p,height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:C,readOnly:k,selection:i,onChange:s,onStatistics:l,onCreateEditor:u,onUpdate:c,extensions:a,initialState:M});(0,d.useImperativeHandle)(t,(()=>({editor:P.current,state:R,view:I})),[P,D,R,I]);var A=(0,d.useCallback)((e=>{P.current=e,O(e)}),[O]);if("string"!=typeof r)throw new Error("value must be typeof string but got "+typeof r);var E="string"==typeof p?"cm-theme-"+p:"cm-theme";return(0,o.jsx)("div",(0,WW.Z)({ref:A,className:E+(n?" "+n:"")},T))}));b8.displayName="CodeMirror";const x8=b8;class w8{constructor(e,t,n,r,o,i,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new w8(e,[],t,n,n,0,[],0,r?new S8(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:o}=this.p,i=this.reducePos=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,o=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(o&&this.pos!=n){let o=this.buffer.length;if(o>0&&(0!=this.buffer[o-4]||this.buffer[o-1]<0)){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let o=e,{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new w8(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new C8(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,o=0;o1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,o=this.stack.length-3*n;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,o)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-o;if(n>1){let r=65535&t,o=this.stack.length-3*n;if(o>=0&&e.getGoto(this.stack[o],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,o+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t0&&this.emitLookAhead()}}class S8{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class C8{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class k8{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new k8(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new k8(this.stack,this.pos,this.index)}}function _8(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,o=0;r=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,n=!0),i+=o,n)break;i*=46}n?n[o++]=i:n=new t(i)}return n}class M8{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const T8=new M8;class P8{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=T8,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,o=this.pos+e;for(;on.to:o>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];o+=e.from-n.to,n=e}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=T8,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class R8{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;I8(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}R8.prototype.contextual=R8.prototype.fallback=R8.prototype.extend=!1;R8.prototype.fallback=R8.prototype.extend=!1;function I8(e,t,n,r,o,i){let a=0,s=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||O8(n,t.token.value,o,i))){t.acceptToken(n);break}}let r=t.next,u=0,c=e[a+2];if(!(t.next<0&&c>u&&65535==e[n+3*c-3])){for(;u>1,i=n+o+(o<<1),s=e[i],l=e[i+1]||65536;if(r=l)){a=e[i+2],t.advance();continue e}u=o+1}}break}a=e[n+3*c-1]}}function D8(e,t,n){for(let r,o=t;65535!=(r=e[o]);o++)if(r==n)return o-t;return-1}function O8(e,t,n,r){let o=D8(n,r,t);return o<0||D8(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class Z8{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?L8(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?L8(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=i,null;if(o instanceof QJ){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}}class F8{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new M8))}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:o}=r,i=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;ru.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){let r=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||(n=new M8,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new M8,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(o>>1)){1&o?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new Z8(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ir)o.push(a);else{if(this.advanceStack(a,o,n))continue;{e||(e=[],t=[]),e.push(a);let n=this.tokens.getMainToken(a);t.push(n.value,n.end)}}break}}if(!o.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,o);if(n)return A8&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort(((e,t)=>t.score-e.score));o.length>e;)o.pop();o.some((e=>e.reducePos>r))&&this.recovering--}else if(o.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(n--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop($J.contextHash)||0)==n))return e.useNode(a,r),A8&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof QJ)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof QJ&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),A8&&console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;ar?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return N8(e,t),!0}}runRecovery(e,t,n){let r=null,o=!1;for(let i=0;i ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),A8&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}let c=a.split(),d=u;for(let e=0;e<10&&c.forceReduce();e++){if(A8&&console.log(d+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,n))break;A8&&(d=this.stackID(c)+" -> ")}for(let e of a.recoverByInsert(s))A8&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),A8&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),N8(a,n)):(!r||r.scoree.topRules[t][1])),r=[];for(let e=0;e=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let a=-r;a>0;a--)o(t[n++],e,i);n++}}}this.nodeSet=new UJ(t.map(((t,o)=>GJ.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=zJ;let i=_8(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new R8(i,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new j8(this,e,t,n);for(let o of this.wrappers)r=o(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let t=r[o++],i=1&t,a=r[o++];if(i&&n)return a;for(let n=o+(t>>1);o0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=V8(this.data,n+2)}r=t(V8(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=V8(this.data,n+2)}if(!(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(B8.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,r)=>{let o=e.specializers.find((e=>e.from==n.external));if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[r]=$8(i),i}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.external(n,r)<<1|t}return e.get}const H8=C0({String:H0.string,Number:H0.number,"True False":H0.bool,PropertyName:H0.propertyName,Null:H0.null,", :":H0.separator,"[ ]":H0.squareBracket,"{ }":H0.brace}),W8=B8.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[H8],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),G8=()=>e=>{try{JSON.parse(e.state.doc.toString())}catch(t){if(!(t instanceof SyntaxError))throw t;const n=function(e,t){let n;return(n=e.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=e.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0}(t,e.state.doc);return[{from:n,message:t.message,severity:"error",to:n}]}return[]};const U8=X0.define({name:"json",parser:W8.configure({props:[m1.add({Object:S1({except:/^\s*\}/}),Array:S1({except:/^\s*\]/})}),k1.add({"Object Array":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.toJSON.stringify(e.value,null,2))),[a,s]=(0,d.useState)(r);return(0,o.jsx)(x8,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new l1(U8),_6(G8()),W6()],value:r,onChange:t=>{i(t),e.onChange&&e.onChange(t)},onBlur:()=>{a!==r&&void 0!==e.onChange&&(e.onChange(r),s(r))},placeholder:e.placeholder})}var K8=n(36679),Y8=n(33755),X8=n(86396),Q8=n(28797);const J8=e=>{const{mode:t,url:n,name:r,newTabOpen:i,renderVariables:a,tooltip:s}=e;return(0,o.jsxs)(l.Z,{direction:"column",gap:2,flexGrow:1,children:[(0,o.jsx)(md,{label:n.label,error:n.error?.hasError,helperText:n.error?.helperText,onChange:n.onChange,placeholder:n.placeholder,multiline:!0,maxRows:5,required:!0,fullWidth:!0,value:n.value}),(r||s)&&(0,o.jsxs)(l.Z,{gap:1,direction:"inline"===t?"row":"column",children:[r&&(0,o.jsx)(md,{sx:{flexGrow:"1"},label:r.label,onChange:r?.onChange,placeholder:r?.placeholder,value:r?.value}),s&&(0,o.jsx)(md,{sx:{flexGrow:"1"},label:s.label,onChange:s?.onChange,placeholder:s?.placeholder,value:s?.value})]}),(0,o.jsxs)(l.Z,{direction:"row",gap:1,children:[a&&(0,o.jsx)(Q8.Z,{label:a.label,control:(0,o.jsx)(Yc.Z,{checked:a.value,onChange:e=>{a?.onChange(e.target.checked)}})}),(0,o.jsx)(Q8.Z,{label:i.label,control:(0,o.jsx)(Yc.Z,{checked:i.value,onChange:e=>{i?.onChange(e.target.checked)}})})]})]})};function e7({control:e,...t}){const{fields:n,append:r,remove:i}=(0,K8.useFieldArray)({control:e,name:"panelDefinition.spec.links"});return(0,o.jsxs)(l.Z,{...t,gap:3,children:[n&&n.length>0?n.map(((t,n)=>(0,o.jsxs)(d.Fragment,{children:[(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(t7,{control:e,index:n}),(0,o.jsx)(u.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>i(n),children:(0,o.jsx)(X8.default,{})})]}),(0,o.jsx)($W.Z,{})]},t.id))):(0,o.jsx)(vc.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,o.jsx)(u.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>r({url:"",name:"",tooltip:"",renderVariables:!1,targetBlank:!1}),children:(0,o.jsx)(Y8.default,{})})]})}function t7({control:e,index:t}){const n={url:"",name:"",tooltip:"",renderVariables:!1,targetBlank:!1};return(0,o.jsx)(K8.Controller,{control:e,name:`panelDefinition.spec.links.${t}`,render:({field:e,field:{value:t},fieldState:r})=>{const i=t??n;return(0,o.jsx)(J8,{mode:"inline",url:{value:i.url,label:"URL",error:{hasError:!!r.error,helperText:r.error?.message},onChange:n=>{e.onChange({...t,url:n})}},newTabOpen:{value:!!i.targetBlank,onChange:n=>{e.onChange({...t,targetBlank:n})},label:"Open in new tab"},name:{value:i.name??"",label:"Name",onChange:n=>{e.onChange({...t,name:n})}},renderVariables:{value:!!i.renderVariables,label:"Render variables",onChange:n=>{e.onChange({...t,renderVariables:n})}},tooltip:{value:i.tooltip??"",label:"Tooltip",onChange:n=>{e.onChange({...t,tooltip:n})}}})}})}const n7=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function r7({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,o.jsx)(Kd,{label:"Mode",control:(0,o.jsx)(eh,{value:n7.find((e=>e.id===n)),options:n7,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}var o7=n(66224);function i7(e){const{message:t}=e;return(0,o.jsx)(l.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,o.jsx)(vc.Z,{children:t})})}function a7(e){const{resource:t}=e;return(0,o.jsx)(i7,{message:`No ${t}`})}function s7(e){const{variant:t="rounded"}=e;return(0,o.jsx)(l.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,o.jsx)(o7.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}const l7=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function u7({onChange:e,value:t="desc"}){return(0,o.jsx)(Kd,{label:"Sort",control:(0,o.jsx)(eh,{value:l7.find((e=>e.id===t)),options:l7,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function c7({onChange:e,value:t,...n}){const r=t=>{e(t)};return(0,o.jsxs)(i.Z,{"aria-label":"Sort",...n,children:[(0,o.jsx)(a.Z,{onClick:()=>r(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,o.jsx)(a.Z,{onClick:()=>r("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,o.jsx)(a.Z,{onClick:()=>r("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}var d7=n(5404),h7=n(98346);const p7=(0,n(79886).Z)();var f7=n(22446);function m7({inputRef:e,label:t,color:n,value:r,mode:i,onChange:a,onColorChange:s,onBlur:h,onDelete:p}){const[f,m]=(0,d.useState)(0);return(0,o.jsxs)(l.Z,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,o.jsx)(zo,{label:t,color:n,onColorChange:s}),(0,o.jsx)(Vd.Z,{htmlFor:t,children:t}),(0,o.jsx)(c.Z,{id:t,inputRef:e,type:"number",value:0===r?"":r,placeholder:"0",onChange:a,onBlur:h,onKeyDown:e=>{"Enter"===e.key&&(h(),m(f+1))},InputProps:{endAdornment:"percent"===i?(0,o.jsx)($o.Z,{paddingX:1,children:"%"}):void 0}},f),(0,o.jsx)(u.Z,{"aria-label":`delete threshold ${t}`,size:"small",onClick:p,children:(0,o.jsx)(f7.default,{})})]})}const g7=10;function v7({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:r}){const i=ee(),{thresholds:{defaultColor:a,palette:s}}=i,l=e?.defaultColor??a,[c,h]=(0,d.useState)(e?.steps);(0,d.useEffect)((()=>{h(e?.steps)}),[e?.steps]);const p=(0,d.useRef)(null),f=(0,d.useRef)(!1);(0,d.useEffect)((()=>{p.current&&f.current&&(p.current?.focus(),f.current=!1)}),[c?.length]);const m=()=>{if(void 0!==c){const n=[...c];n.sort(((e,t)=>e.value-t.value)),void 0!==e&&t((0,Ko.Uy)(e,(e=>{e.steps=n})))}};return(0,o.jsxs)(Xd,{title:"Thresholds",icon:(0,o.jsx)(Gd,{description:"Add threshold",children:(0,o.jsx)(u.Z,{size:"small","aria-label":"add threshold",onClick:()=>{f.current=!0,void 0===e?t({steps:[{value:g7}]}):e&&void 0===e.steps?t((0,Ko.Uy)(e,(e=>{e.steps=[{value:g7}]}))):t((0,Ko.Uy)(e,(e=>{const t=e.steps;if(t?.length){const e=t[t.length-1],n=s[t.length]??y7();t.push({color:n,value:(e?.value??0)+g7})}else t&&t.push({value:g7})})))},children:(0,o.jsx)(Y8.default,{})})}),children:[(0,o.jsx)(Kd,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,o.jsxs)(d7.Z,{exclusive:!0,disabled:r,value:e?.mode??"absolute",onChange:(n,r)=>{const o="percent"===r?"percent":void 0;t(void 0!==e?(0,Ko.Uy)(e,(e=>{e.mode=o})):{mode:o})},sx:{height:"36px",marginLeft:"auto"},children:[(0,o.jsx)(h7.Z,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,o.jsx)(h7.Z,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),c&&c.map(((n,r)=>(0,o.jsx)(m7,{inputRef:r===c.length-1?p:void 0,label:`T${r+1}`,color:n.color??s[r]??l,value:n.value,mode:e?.mode,onColorChange:n=>((n,r)=>{void 0!==e&&t((0,Ko.Uy)(e,(e=>{if(void 0!==e.steps){const t=e.steps[r];t&&(t.color=n)}})))})(n,r),onChange:e=>{((e,t)=>{h((0,Ko.Uy)(c,(n=>{const r=n?.[t];r&&(r.value=Number(e.target.value))})))})(e,r)},onDelete:()=>{(n=>{if(void 0!==e){const r=(0,Ko.Uy)(e,(e=>{e.steps&&e.steps.splice(n,1)}));t(r)}})(r)},onBlur:m},r))).reverse(),!n&&(0,o.jsxs)(p7,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,o.jsx)(zo,{label:"default",color:l,onColorChange:n=>{t(void 0!==e?(0,Ko.Uy)(e,(e=>{e.defaultColor=n})):{defaultColor:n})}}),(0,o.jsx)(vc.Z,{children:"Default"})]})]})}const y7=()=>"#"+Math.floor(16777216*Math.random()).toString(16).padStart(6,"0");var b7=n(63767),x7=n(59986),w7=n(68014);const S7=["localeText"],C7=d.createContext(null);const k7=function(e){const{localeText:t}=e,n=(0,GW.Z)(e,S7),{utils:r,localeText:i}=d.useContext(C7)??{utils:void 0,localeText:void 0},a=(0,w7.Z)({props:n,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:c,adapterLocale:h,localeText:p}=a,f=d.useMemo((()=>(0,WW.Z)({},p,i,t)),[p,i,t]),m=d.useMemo((()=>{if(!l)return r||null;const e=new l({locale:h,formats:u,instance:c});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[l,h,u,c,r]),g=d.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),v=d.useMemo((()=>({utils:m,defaultDates:g,localeText:f})),[g,m,f]);return(0,o.jsx)(C7.Provider,{value:v,children:s})};var _7=n(23615),M7=n.n(_7);const T7={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${r||null!==t&&n.isValid(t)?`Selected time is ${r??n.format(t,"fullTime")}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},P7=T7;R7=T7,(0,WW.Z)({},R7);var R7;const I7=()=>{const e=d.useContext(C7);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=d.useMemo((()=>(0,WW.Z)({},P7,e.localeText)),[e.localeText]);return d.useMemo((()=>(0,WW.Z)({},e,{localeText:t})),[e,t])},D7=()=>I7().utils,O7=()=>I7().defaultDates,A7=e=>{const t=D7(),n=d.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},E7=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},L7=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=E7(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,o)&&(u=o,c=null),a.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&a.isAfter(u,r)&&(u=null),c&&a.isBefore(c,o)&&(c=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(c){if(!i(c))return c;c=a.addDays(c,-1)}}return null},Z7=(e,t,n)=>null!=t&&e.isValid(t)?t:n,F7=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},j7=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),N7=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},z7=["year","month","day"],B7=e=>z7.includes(e),V7=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))};var $7=n(49408),H7=n(51781),W7=n(16052);const G7=(0,yc.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),U7=(0,yc.Z)((0,o.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),q7=(0,yc.Z)((0,o.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),K7=((0,yc.Z)((0,o.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,yc.Z)((0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,yc.Z)((0,o.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange")),Y7=(0,yc.Z)((0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),X7=(0,yc.Z)((0,o.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"}),"Clear"),Q7=()=>I7().localeText;function J7(e){return(0,Sc.ZP)("MuiDateTimePickerTabs",e)}(0,wc.Z)("MuiDateTimePickerTabs",["root"]);const e9=e=>B7(e)?"date":"time",t9=(0,Y.ZP)(H7.Z,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${W7.Z.indicator}`]:{bottom:"auto",top:0}}}))),n9=function(e){const t=(0,w7.Z)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,o.jsx)(K7,{}),onViewChange:r,timeIcon:i=(0,o.jsx)(Y7,{}),view:a,hidden:s="undefined"==typeof window||window.innerHeight<667,className:l,sx:u}=t,c=Q7(),h=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},J7,t)})(t);return s?null:(0,o.jsxs)(t9,{ownerState:t,variant:"fullWidth",value:e9(a),onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,Gl.Z)(l,h.root),sx:u,children:[(0,o.jsx)($7.Z,{value:"date","aria-label":c.dateTableLabel,icon:(0,o.jsx)(d.Fragment,{children:n})}),(0,o.jsx)($7.Z,{value:"time","aria-label":c.timeTableLabel,icon:(0,o.jsx)(d.Fragment,{children:i})})]})};function r9(e){return(0,Sc.ZP)("MuiPickersToolbarText",e)}const o9=(0,wc.Z)("MuiPickersToolbarText",["root","selected"]),i9=["className","selected","value"],a9=(0,Y.ZP)(vc.Z,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${o9.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${o9.selected}`]:{color:(e.vars||e).palette.text.primary}}))),s9=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,a=(0,GW.Z)(n,i9),s=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,Ul.Z)(r,r9,t)})(n);return(0,o.jsx)(a9,(0,WW.Z)({ref:t,className:(0,Gl.Z)(s.root,r),component:"span"},a,{children:i}))}));function l9(e){return(0,Sc.ZP)("MuiPickersToolbar",e)}const u9=(0,wc.Z)("MuiPickersToolbar",["root","content"]),c9=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],d9=(0,Y.ZP)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]}))),h9=(0,Y.ZP)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),p9=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:a,hidden:s,titleId:l}=n,u=(0,GW.Z)(n,c9),c=n,d=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],content:["content"]},l9,t)})(c);return s?null:(0,o.jsxs)(d9,(0,WW.Z)({ref:t,className:(0,Gl.Z)(d.root,i),ownerState:c},u,{children:[(0,o.jsx)(vc.Z,{color:"text.secondary",variant:"overline",id:l,children:a}),(0,o.jsx)(h9,{className:d.content,ownerState:c,children:r})]}))})),f9=["align","className","selected","typographyClassName","value","variant","width"],m9=(0,Y.ZP)(a.Z,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),g9=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:a,typographyClassName:s,value:l,variant:u,width:c}=n,d=(0,GW.Z)(n,f9),h=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},l9,t)})(n);return(0,o.jsx)(m9,(0,WW.Z)({variant:"text",ref:t,className:(0,Gl.Z)(h.root,i)},c?{sx:{width:c}}:{},d,{children:(0,o.jsx)(s9,{align:r,className:s,variant:u,value:l,selected:a})}))}));function v9(e){return(0,Sc.ZP)("MuiDateTimePickerToolbar",e)}const y9=(0,wc.Z)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),b9=["hours","minutes","seconds"],x9=e=>b9.includes(e),w9=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},S9=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),C9=(e,t)=>(n,r)=>e?t.isAfter(n,r):S9(n,t)>S9(r,t);function k9(e,t,n,r){const o=D7(),i=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,o),a=d.useCallback((i=>{const a=null==e?null:((e,t,n,r)=>{const o=w9(r.getHours(e),t,n);return r.setHours(e,o)})(e,i,Boolean(t),o);n(a,r??"partial")}),[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const _9=320,M9=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],T9=(0,Y.ZP)(p9,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${u9.content} .${o9.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]}))),P9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),R9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&"desktop"!==t&&n,style:{flexDirection:"column-reverse"}}]}),I9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),D9=(0,Y.ZP)(s9,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),O9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${y9.ampmLabel}`]:t.ampmLabel},{[`&.${y9.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${y9.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function A9(e){const t=(0,w7.Z)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:a,view:s,isLandscape:l,onViewChange:u,toolbarFormat:c,toolbarPlaceholder:h="––",views:p,disabled:f,readOnly:m,toolbarVariant:g="mobile",toolbarTitle:v,className:y}=t,b=(0,GW.Z)(t,M9),x=(0,bp.V)(),w=(0,WW.Z)({},t,{isRtl:x}),S=D7(),{meridiemMode:C,handleMeridiemChange:k}=k9(i,n,a),_=Boolean(n&&!r),M="desktop"===g,T=Q7(),P=(e=>{const{classes:t,isLandscape:n,isRtl:r}=e,o={root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return(0,Ul.Z)(o,v9,t)})(w),R=v??T.dateTimePickerToolbarTitle,I=d.useMemo((()=>i?c?S.formatByString(i,c):S.format(i,"shortDate"):h),[i,c,h,S]);return(0,o.jsxs)(T9,(0,WW.Z)({isLandscape:l,className:(0,Gl.Z)(P.root,y),toolbarTitle:R},b,{ownerState:w,children:[(0,o.jsxs)(P9,{className:P.dateContainer,ownerState:w,children:[p.includes("year")&&(0,o.jsx)(g9,{tabIndex:-1,variant:"subtitle1",onClick:()=>u("year"),selected:"year"===s,value:i?S.format(i,"year"):"–"}),p.includes("day")&&(0,o.jsx)(g9,{tabIndex:-1,variant:M?"h5":"h4",onClick:()=>u("day"),selected:"day"===s,value:I})]}),(0,o.jsxs)(R9,{className:P.timeContainer,ownerState:w,children:[(0,o.jsxs)(I9,{className:P.timeDigitsContainer,ownerState:w,children:[p.includes("hours")&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(g9,{variant:M?"h5":"h3",width:M&&!l?48:void 0,onClick:()=>u("hours"),selected:"hours"===s,value:i?(D=i,n?S.format(D,"hours12h"):S.format(D,"hours24h")):"--"}),(0,o.jsx)(D9,{variant:M?"h5":"h3",value:":",className:P.separator,ownerState:w}),(0,o.jsx)(g9,{variant:M?"h5":"h3",width:M&&!l?48:void 0,onClick:()=>u("minutes"),selected:"minutes"===s||!p.includes("minutes")&&"hours"===s,value:i?S.format(i,"minutes"):"--",disabled:!p.includes("minutes")})]}),p.includes("seconds")&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(D9,{variant:M?"h5":"h3",value:":",className:P.separator,ownerState:w}),(0,o.jsx)(g9,{variant:M?"h5":"h3",width:M&&!l?48:void 0,onClick:()=>u("seconds"),selected:"seconds"===s,value:i?S.format(i,"seconds"):"--"})]})]}),_&&!M&&(0,o.jsxs)(O9,{className:P.ampmSelection,ownerState:w,children:[(0,o.jsx)(g9,{variant:"subtitle2",selected:"am"===C,typographyClassName:P.ampmLabel,value:N7(S,"am"),onClick:m?void 0:()=>k("am"),disabled:f}),(0,o.jsx)(g9,{variant:"subtitle2",selected:"pm"===C,typographyClassName:P.ampmLabel,value:N7(S,"pm"),onClick:m?void 0:()=>k("pm"),disabled:f})]}),n&&M&&(0,o.jsx)(g9,{variant:"h5",onClick:()=>u("meridiem"),selected:"meridiem"===s,value:i&&C?N7(S,C):"--",width:48})]})]}));var D}function E9(e,t){const n=D7(),r=O7(),o=(0,w7.Z)({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=d.useMemo((()=>null==o.localeText?.toolbarTitle?o.localeText:(0,WW.Z)({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})),[o.localeText]);return(0,WW.Z)({},o,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(null!=e)i=e;else if(o.includes(t))i=t;else{if(!(o.length>0))throw new Error("MUI X: The `views` prop must contain at least one view.");i=o[0]}return{views:o,openTo:i}})({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??Boolean(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Z7(n,o.minDateTime??o.minDate,r.minDate),maxDate:Z7(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:(0,WW.Z)({toolbar:A9,tabs:n9},o.slots),slotProps:(0,WW.Z)({},o.slotProps,{toolbar:(0,WW.Z)({ampm:i},o.slotProps?.toolbar)})})}var L9=n(25399);function Z9(e){return(0,Sc.ZP)("MuiPickersArrowSwitcher",e)}(0,wc.Z)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const F9=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],j9=["ownerState"],N9=["ownerState"],z9=(0,Y.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),B9=(0,Y.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),V9=(0,Y.ZP)(u.Z,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),$9=d.forwardRef((function(e,t){const n=(0,bp.V)(),r=(0,w7.Z)({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:c,onGoToNext:d,nextLabel:h,isPreviousDisabled:p,isPreviousHidden:f,onGoToPrevious:m,previousLabel:g,labelId:v}=r,y=(0,GW.Z)(r,F9),b=r,x=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Z9,t)})(b),w={isDisabled:u,isHidden:c,goTo:d,label:h},S={isDisabled:p,isHidden:f,goTo:m,label:g},C=s?.previousIconButton??V9,k=(0,L9.Z)({elementType:C,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:(0,WW.Z)({},b,{hidden:S.isHidden}),className:(0,Gl.Z)(x.button,x.previousIconButton)}),_=s?.nextIconButton??V9,M=(0,L9.Z)({elementType:_,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:(0,WW.Z)({},b,{hidden:w.isHidden}),className:(0,Gl.Z)(x.button,x.nextIconButton)}),T=s?.leftArrowIcon??U7,P=(0,L9.Z)({elementType:T,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:x.leftArrowIcon}),R=(0,GW.Z)(P,j9),I=s?.rightArrowIcon??q7,D=(0,L9.Z)({elementType:I,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:x.rightArrowIcon}),O=(0,GW.Z)(D,N9);return(0,o.jsxs)(z9,(0,WW.Z)({ref:t,className:(0,Gl.Z)(x.root,a),ownerState:b},y,{children:[(0,o.jsx)(C,(0,WW.Z)({},k,{children:n?(0,o.jsx)(I,(0,WW.Z)({},O)):(0,o.jsx)(T,(0,WW.Z)({},R))})),i?(0,o.jsx)(vc.Z,{variant:"subtitle1",component:"span",id:v,children:i}):(0,o.jsx)(B9,{className:x.spacer,ownerState:b}),(0,o.jsx)(_,(0,WW.Z)({},M,{children:n?(0,o.jsx)(T,(0,WW.Z)({},R)):(0,o.jsx)(I,(0,WW.Z)({},O))}))]}))}));var H9=n(81925),W9=n(9831);function G9({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=d.useRef(n),u=d.useRef(o),c=d.useRef(o.includes(n)?n:o[0]),[h,p]=(0,W9.Z)({name:"useViews",state:"view",controlled:r,default:c.current}),f=d.useRef(i?h:null),[m,g]=(0,W9.Z)({name:"useViews",state:"focusedView",controlled:a,default:f.current});d.useEffect((()=>{(l.current&&l.current!==n||u.current&&u.current.some((e=>!o.includes(e))))&&(p(o.includes(n)?n:o[0]),u.current=o,l.current=n)}),[n,p,h,o]);const v=o.indexOf(h),y=o[v-1]??null,b=o[v+1]??null,x=(0,H9.Z)(((e,t)=>{g(t?e:t=>e===t?null:t),s?.(e,t)})),w=(0,H9.Z)((e=>{x(e,!0),e!==h&&(p(e),t&&t(e))})),S=(0,H9.Z)((()=>{b&&w(b)})),C=(0,H9.Z)(((t,n,r)=>{const i="finish"===n,a=r?o.indexOf(r){const r=t-Q9.x,o=n-Q9.y,i=Math.atan2(J9,eee)-Math.atan2(r,o);let a=i*(180/Math.PI);a=Math.round(a/e)*e,a%=360;const s=r**2+o**2;return{value:Math.floor(a/e)||0,distance:Math.sqrt(s)}};function nee(e){return(0,Sc.ZP)("MuiClockPointer",e)}(0,wc.Z)("MuiClockPointer",["root","thumb"]);const ree=["className","hasSelected","isInner","type","viewValue"],oee=(0,Y.ZP)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]}))),iee=(0,Y.ZP)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]})));function aee(e){const t=(0,w7.Z)({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:i,viewValue:a}=t,s=(0,GW.Z)(t,ree),l=d.useRef(i);d.useEffect((()=>{l.current=i}),[i]);const u=(0,WW.Z)({},t,{shouldAnimate:l.current!==i}),c=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],thumb:["thumb"]},nee,t)})(u);return(0,o.jsx)(oee,(0,WW.Z)({style:(()=>{let e=360/("hours"===i?12:60)*a;return"hours"===i&&a>12&&(e-=360),{height:Math.round((r?.26:.4)*Y9),transform:`rotateZ(${e}deg)`}})(),className:(0,Gl.Z)(c.root,n),ownerState:u},s,{children:(0,o.jsx)(iee,{ownerState:u,className:c.thumb})}))}function see(e){return(0,Sc.ZP)("MuiClock",e)}(0,wc.Z)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const lee=(0,Y.ZP)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),uee=(0,Y.ZP)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),cee=(0,Y.ZP)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),dee=(0,Y.ZP)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),hee=(0,Y.ZP)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),pee=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:X9,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),fee=(0,Y.ZP)(u.Z,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e})=>(0,WW.Z)({},pee(e,"am"),{position:"absolute",left:8}))),mee=(0,Y.ZP)(u.Z,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e})=>(0,WW.Z)({},pee(e,"pm"),{position:"absolute",right:8}))),gee=(0,Y.ZP)(vc.Z,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function vee(e){const t=(0,w7.Z)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:a,value:s,handleMeridiemChange:l,isTimeDisabled:u,meridiemMode:c,minutesStep:h=1,onChange:p,selectedId:f,type:m,viewValue:g,viewRange:[v,y],disabled:b=!1,readOnly:x,className:w}=t,S=t,C=D7(),k=Q7(),_=d.useRef(!1),M=(e=>{const{classes:t,meridiemMode:n}=e,r={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]};return(0,Ul.Z)(r,see,t)})(S),T=u(g,m),P=!n&&"hours"===m&&(g<1||g>12),R=(e,t)=>{b||x||u(e,m)||p(e,t)},I=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===m||"minutes"===m?((e,t,n=1)=>{const r=6*n;let{value:o}=tee(r,e,t);return o=o*n%60,o})(r,o,h):((e,t,n)=>{const{value:r,distance:o}=tee(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,Boolean(n));R(i,t)},D=e=>{_.current=!0,I(e,"shallow")},O=d.useMemo((()=>"hours"===m||g%5==0),[m,g]),A="minutes"===m?h:1,E=d.useRef(null);(0,K9.Z)((()=>{i&&E.current.focus()}),[i]);const L=e=>Math.max(v,Math.min(y,e)),Z=e=>(e+(y+1))%(y+1);return(0,o.jsxs)(lee,{className:(0,Gl.Z)(M.root,w),children:[(0,o.jsxs)(uee,{className:M.clock,children:[(0,o.jsx)(dee,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{_.current&&(I(e,"finish"),_.current=!1),e.preventDefault()},onMouseUp:e=>{_.current&&(_.current=!1),I(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&I(e.nativeEvent,"shallow")},ownerState:{disabled:b},className:M.squareMask}),!T&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(hee,{className:M.pin}),null!=s&&(0,o.jsx)(aee,{type:m,viewValue:g,isInner:P,hasSelected:O})]}),(0,o.jsx)(cee,{"aria-activedescendant":f,"aria-label":k.clockLabelText(m,s,C,null==s?null:C.format(s,"fullTime")),ref:E,role:"listbox",onKeyDown:e=>{if(!_.current)switch(e.key){case"Home":R(v,"partial"),e.preventDefault();break;case"End":R(y,"partial"),e.preventDefault();break;case"ArrowUp":R(Z(g+A),"partial"),e.preventDefault();break;case"ArrowDown":R(Z(g-A),"partial"),e.preventDefault();break;case"PageUp":R(L(g+5),"partial"),e.preventDefault();break;case"PageDown":R(L(g-5),"partial"),e.preventDefault();break;case"Enter":case" ":R(g,"finish"),e.preventDefault()}},tabIndex:0,className:M.wrapper,children:a})]}),n&&r&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(fee,{onClick:x?void 0:()=>l("am"),disabled:b||null===c,ownerState:S,className:M.amButton,title:N7(C,"am"),children:(0,o.jsx)(gee,{variant:"caption",className:M.meridiemText,children:N7(C,"am")})}),(0,o.jsx)(mee,{disabled:b||null===c,onClick:x?void 0:()=>l("pm"),ownerState:S,className:M.pmButton,title:N7(C,"pm"),children:(0,o.jsx)(gee,{variant:"caption",className:M.meridiemText,children:N7(C,"pm")})})]})]})}function yee(e){return(0,Sc.ZP)("MuiClockNumber",e)}const bee=(0,wc.Z)("MuiClockNumber",["root","selected","disabled"]),xee=["className","disabled","index","inner","label","selected"],wee=(0,Y.ZP)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${bee.disabled}`]:t.disabled},{[`&.${bee.selected}`]:t.selected}]})((({theme:e})=>({height:X9,width:X9,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${bee.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${bee.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,WW.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]})));function See(e){const t=(0,w7.Z)({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:a,label:s,selected:l}=t,u=(0,GW.Z)(t,xee),c=t,d=(e=>{const{classes:t,selected:n,disabled:r}=e,o={root:["root",n&&"selected",r&&"disabled"]};return(0,Ul.Z)(o,yee,t)})(c),h=i%12/12*Math.PI*2-Math.PI/2,p=91*(a?.65:1),f=Math.round(Math.cos(h)*p),m=Math.round(Math.sin(h)*p);return(0,o.jsx)(wee,(0,WW.Z)({className:(0,Gl.Z)(d.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:`translate(${f}px, ${m+92}px`},ownerState:c},u,{children:s}))}const Cee=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:a})=>{const s=t?a.getHours(t):null,l=[],u=e?12:23,c=t=>null!==s&&(e?12===t?12===s||0===s:s===t||s-12===t:s===t);for(let t=e?1:0;t<=u;t+=1){let s=t.toString();0===t&&(s="00");const u=!e&&(0===t||t>12);s=a.formatNumber(s);const d=c(t);l.push((0,o.jsx)(See,{id:d?i:void 0,index:t,inner:u,selected:d,disabled:r(t),label:s,"aria-label":n(s)},t))}return l},kee=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{const a=e.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((([e,a],s)=>{const l=e===t;return(0,o.jsx)(See,{label:a,id:l?i:void 0,index:s+1,inner:!1,disabled:n(e),selected:l,"aria-label":r(a)},e)}))},_ee=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const a=D7(),s=d.useRef(n),l=t??s.current??i.emptyValue,u=d.useMemo((()=>i.getTimezone(a,l)),[a,i,l]),c=(0,H9.Z)((e=>null==u?e:i.setTimezone(a,u,e)));let h;h=e||(u||(r?a.getTimezone(r):"default"));return{value:d.useMemo((()=>i.setTimezone(a,h,l)),[i,a,h,l]),handleValueChange:(0,H9.Z)(((e,...t)=>{const n=c(e);o?.(n,...t)})),timezone:h}},Mee=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=(0,W9.Z)({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=(0,H9.Z)(((e,...t)=>{l(e),i?.(e,...t)}));return _ee({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:a})},Tee={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Pee=(e,t,n)=>{if(t===Tee.year)return e.startOfYear(n);if(t===Tee.month)return e.startOfMonth(n);if(t===Tee.day)return e.startOfDay(n);let r=n;return t{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Iee=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map((n=>e.formatByString(n,t)))},Dee=(e,t,n,r)=>{switch(n){case"month":return F7(e,e.date(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return Iee(e,r);case"meridiem":{const n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},Oee=["0","1","2","3","4","5","6","7","8","9"],Aee=(e,t)=>{if("0"===t[0])return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},Eee=(e,t)=>"0"===t[0]?e:e.split("").map((e=>t[Number(e)])).join(""),Lee=(e,t)=>{const n=Aee(e,t);return" "!==n&&!Number.isNaN(Number(n))},Zee=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const r=e.setDate(n.longestMonth,t);return e.formatByString(r,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Zee(i,o.maxLength)),Eee(i,r)},jee=(e,t,n,r,o,i,a,s)=>{const l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),h=t=>Fee(e,t,r,i,n),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;let f;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);f=l>0||u?r.minimum:r.maximum}else f=parseInt(Aee(n.value,i),10)+l*p;return f%p!=0&&((l<0||u)&&(f+=p-(p+f)%p),(l>0||c)&&(f-=f%p)),f>r.maximum?h(r.minimum+(f-r.maximum-1)%(r.maximum-r.minimum+1)):f{const r=Dee(e,t,n.type,n.format);if(0===r.length)return n.value;if(d)return l>0||u?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[((o+l)%r.length+r.length)%r.length]})()},Nee=(e,t,n)=>{let r=e.value||e.placeholder;const o="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Aee(r,n)).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!o&&1===r.length&&(r=`${r}‎`),"input-rtl"===t&&(r=`⁨${r}⁩`),r},zee=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Bee=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,Vee=(e,t,n,r)=>{if("digit"!==t)return!1;const o=e.date(void 0,"default");switch(n){case"year":return"dayjs"===e.lib&&"YY"===r||e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}};const $ee=(e,t)=>{0},Hee={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Wee=(e,t,n,r,o)=>[...n].sort(((e,t)=>Hee[e.type]-Hee[t.type])).reduce(((n,r)=>!o||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const r=Iee(e,t.format),o=e.formatByString(n,t.format),i=r.indexOf(o),a=r.indexOf(t.value)-i;return e.addDays(n,a)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,o=e.getHours(r);return t&&o>=12?e.addHours(r,-12):!t&&o<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n),r),Gee=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){const n=t.findIndex((t=>t.type===e));return-1===n?null:n}return e},Uee=(e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}},qee=(e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}},Kee=["value","referenceDate"],Yee={emptyValue:null,getTodayValue:j7,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,GW.Z)(e,Kee);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Pee(t,n,j7(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=Pee(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=Pee(t,n,e.maxDate));const a=C9(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,i)&&(i=Pee(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:E7(t,i,e.minTime))),null!=e.maxTime&&a(i,e.maxTime)&&(i=Pee(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:E7(t,i,e.maxTime))),i})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},Xee={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map((e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`)).join(""),getV6InputValueFromSections:(e,t,n)=>{const r=e.map((e=>{const r=Nee(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`})).join("");return n?`⁦${r}⁩`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},Qee=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Jee=(0,Y.ZP)(U9,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),ete=(0,Y.ZP)($9,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),tte=["hours","minutes"],nte=d.forwardRef((function(e,t){const n=D7(),r=(0,w7.Z)({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:u,value:c,defaultValue:h,referenceDate:p,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:m,minTime:g,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:x,showViewSwitcher:w,onChange:S,view:C,views:k=tte,openTo:_,onViewChange:M,focusedView:T,onFocusedViewChange:P,className:R,disabled:I,readOnly:D,timezone:O}=r,A=(0,GW.Z)(r,Qee),{value:E,handleValueChange:L,timezone:Z}=Mee({name:"TimeClock",timezone:O,value:c,defaultValue:h,referenceDate:p,onChange:S,valueManager:Yee}),F=(({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=d.useMemo((()=>Yee.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Tee.day,timezone:o,getTodayDate:()=>j7(n,o,"date")})),[]);return e??i})({value:E,referenceDate:p,utils:n,props:r,timezone:Z}),j=Q7(),N=A7(Z),{view:z,setView:B,previousView:V,nextView:$,setValueAndGoToNextView:H}=G9({view:C,views:k,openTo:_,onViewChange:M,onChange:L,focusedView:T,onFocusedViewChange:P}),{meridiemMode:W,handleMeridiemChange:G}=k9(F,i,H),U=d.useCallback(((e,t)=>{const r=C9(f,n),o="hours"===t||"minutes"===t&&k.includes("seconds"),a=({start:e,end:t})=>(!g||!r(g,t))&&((!m||!r(e,m))&&((!v||!r(e,N))&&(!y||!r(N,o?t:e)))),s=(e,r=1)=>{if(e%r!=0)return!1;if(x)switch(t){case"hours":return!x(n.setHours(F,e),"hours");case"minutes":return!x(n.setMinutes(F,e),"minutes");case"seconds":return!x(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=w9(e,W,i),r=n.setHours(F,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(F,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=n.setSeconds(F,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[i,F,f,m,W,g,b,x,n,v,y,N,k]),q=(0,yd.Z)(),K=d.useMemo((()=>{switch(z){case"hours":{const e=(e,t)=>{const r=w9(e,W,i);H(n.setHours(F,r),t,"hours")},t=n.getHours(F);let r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:Cee({value:E,utils:n,ampm:i,onChange:e,getClockNumberText:j.hoursClockNumberText,isDisabled:e=>I||U(e,"hours"),selectedId:q}),viewRange:r}}case"minutes":{const e=n.getMinutes(F),t=(e,t)=>{H(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:kee({utils:n,value:e,onChange:t,getClockNumberText:j.minutesClockNumberText,isDisabled:e=>I||U(e,"minutes"),selectedId:q}),viewRange:[0,59]}}case"seconds":{const e=n.getSeconds(F),t=(e,t)=>{H(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:kee({utils:n,value:e,onChange:t,getClockNumberText:j.secondsClockNumberText,isDisabled:e=>I||U(e,"seconds"),selectedId:q}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}}),[z,n,E,i,j.hoursClockNumberText,j.minutesClockNumberText,j.secondsClockNumberText,W,H,F,U,q,I]),Y=r,X=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],arrowSwitcher:["arrowSwitcher"]},q9,t)})(Y);return(0,o.jsxs)(Jee,(0,WW.Z)({ref:t,className:(0,Gl.Z)(X.root,R),ownerState:Y},A,{children:[(0,o.jsx)(vee,(0,WW.Z)({autoFocus:s??!!T,ampmInClock:a&&k.includes("hours"),value:E,type:z,ampm:i,minutesStep:b,isTimeDisabled:U,meridiemMode:W,handleMeridiemChange:G,selectedId:q,disabled:I,readOnly:D},K)),w&&(0,o.jsx)(ete,{className:X.arrowSwitcher,slots:l,slotProps:u,onGoToPrevious:()=>B(V),isPreviousDisabled:!V,previousLabel:j.openPreviousView,onGoToNext:()=>B($),isNextDisabled:!$,nextLabel:j.openNextView,ownerState:Y})]}))})),rte=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:C,sx:k,autoFocus:_,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:T,timezone:P})=>(0,o.jsx)(nte,{view:e,onViewChange:t,focusedView:n&&x9(n)?n:null,onFocusedViewChange:r,views:i.filter(x9),value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:C,sx:k,autoFocus:_,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:T,timezone:P}),ote=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=Z7(r.utils,e.minDate,r.defaultDates.minDate),d=Z7(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case Boolean(o&&o(t)):return"shouldDisableDate";case Boolean(i&&i(t)):return"shouldDisableMonth";case Boolean(a&&a(t)):return"shouldDisableYear";case Boolean(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case Boolean(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case Boolean(c&&r.utils.isBeforeDay(t,c)):return"minDate";case Boolean(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};ote.valueManager=Yee;const ite=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=I7();return d.useCallback((u=>null!==ote({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})),[l,e,t,n,r,o,i,a,s])},ate=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:h}=e,p=D7(),f=d.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return(0,WW.Z)({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const e=o.newTimezone;if(n.getTimezone(r.currentMonth)===e)return r;let t=n.setTimezone(r.currentMonth,e);return n.getMonth(t)!==n.getMonth(r.currentMonth)&&(t=n.setMonth(t,n.getMonth(r.currentMonth))),(0,WW.Z)({},r,{currentMonth:t})}case"finishMonthSwitchingAnimation":return(0,WW.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return(0,WW.Z)({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(u),i,p)).current,m=d.useMemo((()=>Yee.getInitialReferenceValue({value:t,utils:p,timezone:h,props:e,referenceDate:n,granularity:Tee.day})),[n,h]),[g,v]=d.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:p.startOfMonth(m),slideDirection:"left"});d.useEffect((()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(m)})}),[m,p]);const y=d.useCallback((e=>{v((0,WW.Z)({type:"changeMonth"},e)),l&&l(e.newMonth)}),[l]),b=d.useCallback((e=>{const t=e;p.isSameMonth(t,g.currentMonth)||y({newMonth:p.startOfMonth(t),direction:p.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,y,p]),x=ite({shouldDisableDate:c,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:h}),w=d.useCallback((()=>{v({type:"finishMonthSwitchingAnimation"})}),[]),S=(0,H9.Z)(((e,t)=>{x(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:m,calendarState:g,changeMonth:b,changeFocusedDay:S,isDateDisabled:x,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}};var ste=n(16317);const lte=e=>(0,Sc.ZP)("MuiPickersFadeTransitionGroup",e),ute=((0,wc.Z)("MuiPickersFadeTransitionGroup",["root"]),(0,Y.ZP)(ste.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function cte(e){const t=(0,w7.Z)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:a}=t,s=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},lte,t)})(t),l=(0,Vo.Z)();return i?n:(0,o.jsx)(ute,{className:(0,Gl.Z)(s.root,r),children:(0,o.jsx)(xd.Z,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:n},a)})}var dte=n(97048);function hte(e){return(0,Sc.ZP)("MuiPickersDay",e)}const pte=(0,wc.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),fte=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],mte=({theme:e})=>(0,WW.Z)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,ql.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,ql.Fq)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${pte.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${pte.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${pte.disabled}:not(.${pte.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${pte.disabled}&.${pte.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${pte.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),gte=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},vte=(0,Y.ZP)(Ql.Z,{name:"MuiPickersDay",slot:"Root",overridesResolver:gte})(mte),yte=(0,Y.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:gte})((({theme:e})=>(0,WW.Z)({},mte({theme:e}),{opacity:0,pointerEvents:"none"}))),bte=()=>{},xte=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:c,onClick:h,onDaySelect:p,onFocus:f=bte,onBlur:m=bte,onKeyDown:g=bte,onMouseDown:v=bte,onMouseEnter:y=bte,outsideCurrentMonth:b,selected:x=!1,showDaysOutsideCurrentMonth:w=!1,children:S,today:C=!1}=n,k=(0,GW.Z)(n,fte),_=(0,WW.Z)({},n,{autoFocus:r,disabled:s,disableHighlightToday:l,disableMargin:u,selected:x,showDaysOutsideCurrentMonth:w,today:C}),M=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s,c={root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,Ul.Z)(c,hte,l)})(_),T=D7(),P=d.useRef(null),R=(0,dte.Z)(P,t);(0,K9.Z)((()=>{!r||s||c||b||P.current.focus()}),[r,s,c,b]);return b&&!w?(0,o.jsx)(yte,{className:(0,Gl.Z)(M.root,M.hiddenDaySpacingFiller,i),ownerState:_,role:k.role}):(0,o.jsx)(vte,(0,WW.Z)({className:(0,Gl.Z)(M.root,i),ref:R,centerRipple:!0,disabled:s,tabIndex:x?0:-1,onKeyDown:e=>g(e,a),onFocus:e=>f(e,a),onBlur:e=>m(e,a),onMouseEnter:e=>y(e,a),onClick:e=>{s||p(a),b&&e.currentTarget.focus(),h&&h(e)},onMouseDown:e=>{v(e),b&&e.preventDefault()}},k,{ownerState:_,children:S||T.format(a,"dayOfMonth")}))})),wte=d.memo(xte);var Ste=n(54652);function Cte(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var kte=n(98683),_te=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Cte(n.className,r):n.setAttribute("class",Cte(n.className&&n.className.baseVal||"",r)));var n,r}))},Mte=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o(0,Sc.ZP)("MuiPickersSlideTransition",e),Rte=(0,wc.Z)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Ite=["children","className","reduceAnimations","slideDirection","transKey","classes"],Dte=(0,Y.ZP)(ste.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Rte["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Rte["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Rte.slideEnterActive}`]:t.slideEnterActive},{[`.${Rte.slideExit}`]:t.slideExit},{[`.${Rte["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Rte["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Rte["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Rte["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Rte.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Rte.slideExit}`]:{transform:"translate(0%)"},[`& .${Rte["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Rte["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}));const Ote=e=>(0,Sc.ZP)("MuiDayCalendar",e),Ate=((0,wc.Z)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),Ete=["ownerState"],Lte=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Zte=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Fte=(0,Y.ZP)(vc.Z,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary}))),jte=(0,Y.ZP)(vc.Z,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled}))),Nte=(0,Y.ZP)(vc.Z,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((({theme:e})=>(0,WW.Z)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"}))),zte=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Bte=(0,Y.ZP)((function(e){const t=(0,w7.Z)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:a}=t,s=(0,GW.Z)(t,Ite),l=(e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,Ul.Z)(r,Pte,t)})(t),u=(0,Vo.Z)();if(i)return(0,o.jsx)("div",{className:(0,Gl.Z)(l.root,r),children:n});const c={exit:l.exit,enterActive:l.enterActive,enter:l.enter,exitActive:l.exitActive};return(0,o.jsx)(Dte,{className:(0,Gl.Z)(l.root,r),childFactory:e=>d.cloneElement(e,{classNames:c}),role:"presentation",children:(0,o.jsx)(Tte,(0,WW.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:u.transitions.duration.complex,classNames:c},s,{children:n}),a)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Vte=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),$te=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function Hte(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:s,isViewFocused:l}=e,u=(0,GW.Z)(e,Ate);const{disabled:c,disableHighlightToday:h,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:f,slots:m,slotProps:g,timezone:v}=t,y=D7(),b=A7(v),x=null!==r&&y.isSameDay(n,r),w=i.some((e=>y.isSameDay(e,n))),S=y.isSameDay(n,b),C=m?.day??wte,k=(0,L9.Z)({elementType:C,externalSlotProps:g?.day,additionalProps:(0,WW.Z)({disableHighlightToday:h,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:p,"data-timestamp":y.toJsDate(n).valueOf()},u),ownerState:(0,WW.Z)({},t,{day:n,selected:w})}),_=(0,GW.Z)(k,Ete),M=d.useMemo((()=>c||a(n)),[c,a,n]),T=d.useMemo((()=>y.getMonth(n)!==s),[y,n,s]),P=d.useMemo((()=>{const e=y.startOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.startOfWeek(e)):y.isSameDay(n,e)}),[s,n,f,y]),R=d.useMemo((()=>{const e=y.endOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.endOfWeek(e)):y.isSameDay(n,e)}),[s,n,f,y]);return(0,o.jsx)(C,(0,WW.Z)({},_,{day:n,disabled:M,autoFocus:l&&x,today:S,outsideCurrentMonth:T,isFirstVisibleCell:P,isLastVisibleCell:R,selected:w,tabIndex:x?0:-1,"aria-selected":w,"aria-current":S?"date":void 0}))}function Wte(e){const t=(0,w7.Z)({props:e,name:"MuiDayCalendar"}),n=D7(),{onFocusedDayChange:r,className:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:u,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:h,readOnly:p,reduceAnimations:f,renderLoading:m=()=>(0,o.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:v,disablePast:y,disableFuture:b,minDate:x,maxDate:w,shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:k,dayOfWeekFormatter:_=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:T,gridLabelId:P,displayWeekNumber:R,fixedWeekNumber:I,autoFocus:D,timezone:O}=t,A=A7(O),E=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Ote,t)})(t),L=(0,bp.V)(),Z=ite({shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:k,minDate:x,maxDate:w,disablePast:y,disableFuture:b,timezone:O}),F=Q7(),[j,N]=(0,W9.Z)({name:"DayCalendar",state:"hasFocus",controlled:M,default:D??!1}),[z,B]=d.useState((()=>l||A)),V=(0,H9.Z)((e=>{p||c(e)})),$=e=>{Z(e)||(r(e),B(e),T?.(!0),N(!0))},H=(0,H9.Z)(((e,t)=>{switch(e.key){case"ArrowUp":$(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":$(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,L?1:-1),o=n.addMonths(t,L?1:-1),i=L7({utils:n,date:r,minDate:L?r:n.startOfMonth(o),maxDate:L?n.endOfMonth(o):r,isDateDisabled:Z,timezone:O});$(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,L?-1:1),o=n.addMonths(t,L?-1:1),i=L7({utils:n,date:r,minDate:L?n.startOfMonth(o):r,maxDate:L?r:n.endOfMonth(o),isDateDisabled:Z,timezone:O});$(i||r),e.preventDefault();break}case"Home":$(n.startOfWeek(t)),e.preventDefault();break;case"End":$(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":$(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":$(n.addMonths(t,-1)),e.preventDefault()}})),W=(0,H9.Z)(((e,t)=>$(t))),G=(0,H9.Z)(((e,t)=>{j&&n.isSameDay(z,t)&&T?.(!1)})),U=n.getMonth(a),q=n.getYear(a),K=d.useMemo((()=>s.filter((e=>!!e)).map((e=>n.startOfDay(e)))),[n,s]),Y=`${q}-${U}`,X=d.useMemo((()=>d.createRef()),[Y]),Q=d.useMemo((()=>{const e=n.startOfMonth(a),t=n.endOfMonth(a);return Z(z)||n.isAfterDay(z,t)||n.isBeforeDay(z,e)?L7({utils:n,date:z,minDate:e,maxDate:t,disablePast:y,disableFuture:b,isDateDisabled:Z,timezone:O}):z}),[a,b,y,z,Z,n,O]),J=d.useMemo((()=>{const e=n.getWeekArray(a);let t=n.addMonths(a,1);for(;I&&e.length{e.length(0,o.jsx)(Fte,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:E.weekDayLabel,children:_(e)},t.toString())))]}),u?(0,o.jsx)(zte,{className:E.loadingContainer,children:m()}):(0,o.jsx)(Bte,(0,WW.Z)({transKey:Y,onExited:h,reduceAnimations:f,slideDirection:g,className:(0,Gl.Z)(i,E.slideTransition)},v,{nodeRef:X,children:(0,o.jsx)(Vte,{ref:X,role:"rowgroup",className:E.monthContainer,children:J.map(((e,r)=>(0,o.jsxs)($te,{role:"row",className:E.weekContainer,"aria-rowindex":r+1,children:[R&&(0,o.jsx)(Nte,{className:E.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:F.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,o.jsx)(Hte,{parentProps:t,day:e,selectedDays:K,focusableDay:Q,onKeyDown:H,onFocus:W,onBlur:G,onDaySelect:V,isDateDisabled:Z,currentMonthNumber:U,isViewFocused:j,"aria-colindex":n+1},e.toString())))]},`week-${e[0]}`)))})}))]})}function Gte(e){return(0,Sc.ZP)("MuiPickersMonth",e)}const Ute=(0,wc.Z)("MuiPickersMonth",["root","monthButton","disabled","selected"]),qte=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Kte=(0,Y.ZP)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),Yte=(0,Y.ZP)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${Ute.disabled}`]:t.disabled},{[`&.${Ute.selected}`]:t.selected}]})((({theme:e})=>(0,WW.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,ql.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,ql.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ute.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ute.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),Xte=d.memo((function(e){const t=(0,w7.Z)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":m,"aria-label":g,slots:v,slotProps:y}=t,b=(0,GW.Z)(t,qte),x=d.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]};return(0,Ul.Z)(o,Gte,r)})(t);(0,K9.Z)((()=>{n&&x.current?.focus()}),[n]);const S=v?.monthButton??Yte,C=(0,L9.Z)({elementType:S,externalSlotProps:y?.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:e=>c(e,l),onKeyDown:e=>h(e,l),onFocus:e=>p(e,l),onBlur:e=>f(e,l)},ownerState:t,className:w.monthButton});return(0,o.jsx)(Kte,(0,WW.Z)({className:(0,Gl.Z)(w.root,r),ownerState:t},b,{children:(0,o.jsx)(S,(0,WW.Z)({},C))}))}));function Qte(e){return(0,Sc.ZP)("MuiMonthCalendar",e)}(0,wc.Z)("MuiMonthCalendar",["root"]);const Jte=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"];const ene=(0,Y.ZP)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:_9,boxSizing:"border-box"}),tne=d.forwardRef((function(e,t){const n=function(e,t){const n=D7(),r=O7(),o=(0,w7.Z)({props:e,name:t});return(0,WW.Z)({disableFuture:!1,disablePast:!1},o,{minDate:Z7(n,o.minDate,r.minDate),maxDate:Z7(n,o.maxDate,r.maxDate)})}(e,"MuiMonthCalendar"),{className:r,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:p,onChange:f,shouldDisableMonth:m,readOnly:g,autoFocus:v=!1,onMonthFocus:y,hasFocus:b,onFocusedViewChange:x,monthsPerRow:w=3,timezone:S,gridLabelId:C,slots:k,slotProps:_}=n,M=(0,GW.Z)(n,Jte),{value:T,handleValueChange:P,timezone:R}=Mee({name:"MonthCalendar",timezone:S,value:i,defaultValue:a,referenceDate:s,onChange:f,valueManager:Yee}),I=A7(R),D=(0,bp.V)(),O=D7(),A=d.useMemo((()=>Yee.getInitialReferenceValue({value:T,utils:O,props:n,timezone:R,referenceDate:s,granularity:Tee.month})),[]),E=n,L=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},Qte,t)})(E),Z=d.useMemo((()=>O.getMonth(I)),[O,I]),F=d.useMemo((()=>null!=T?O.getMonth(T):null),[T,O]),[j,N]=d.useState((()=>F||O.getMonth(A))),[z,B]=(0,W9.Z)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:v??!1}),V=(0,H9.Z)((e=>{B(e),x&&x(e)})),$=d.useCallback((e=>{const t=O.startOfMonth(c&&O.isAfter(I,p)?I:p),n=O.startOfMonth(u&&O.isBefore(I,h)?I:h),r=O.startOfMonth(e);return!!O.isBefore(r,t)||(!!O.isAfter(r,n)||!!m&&m(r))}),[u,c,h,p,I,m,O]),H=(0,H9.Z)(((e,t)=>{if(g)return;const n=O.setMonth(T??A,t);P(n)})),W=(0,H9.Z)((e=>{$(O.setMonth(T??A,e))||(N(e),V(!0),y&&y(e))}));d.useEffect((()=>{N((e=>null!==F&&e!==F?F:e))}),[F]);const G=(0,H9.Z)(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":W((n+t-3)%n),e.preventDefault();break;case"ArrowDown":W((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":W((n+t+(D?1:-1))%n),e.preventDefault();break;case"ArrowRight":W((n+t+(D?-1:1))%n),e.preventDefault()}})),U=(0,H9.Z)(((e,t)=>{W(t)})),q=(0,H9.Z)(((e,t)=>{j===t&&V(!1)}));return(0,o.jsx)(ene,(0,WW.Z)({ref:t,className:(0,Gl.Z)(L.root,r),ownerState:E,role:"radiogroup","aria-labelledby":C},M,{children:F7(O,T??A).map((e=>{const t=O.getMonth(e),n=O.format(e,"monthShort"),r=O.format(e,"month"),i=t===F,a=l||$(e);return(0,o.jsx)(Xte,{selected:i,value:t,onClick:H,onKeyDown:G,autoFocus:z&&t===j,disabled:a,tabIndex:t!==j||a?-1:0,onFocus:U,onBlur:q,"aria-current":Z===t?"date":void 0,"aria-label":r,monthsPerRow:w,slots:k,slotProps:_,children:n},n)}))}))}));function nne(e){return(0,Sc.ZP)("MuiPickersYear",e)}const rne=(0,wc.Z)("MuiPickersYear",["root","yearButton","selected","disabled"]),one=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],ine=(0,Y.ZP)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),ane=(0,Y.ZP)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${rne.disabled}`]:t.disabled},{[`&.${rne.selected}`]:t.selected}]})((({theme:e})=>(0,WW.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,ql.Fq)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,ql.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${rne.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${rne.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),sne=d.memo((function(e){const t=(0,w7.Z)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":m,slots:g,slotProps:v}=t,y=(0,GW.Z)(t,one),b=d.useRef(null),x=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]};return(0,Ul.Z)(o,nne,r)})(t);(0,K9.Z)((()=>{n&&b.current?.focus()}),[n]);const w=g?.yearButton??ane,S=(0,L9.Z)({elementType:w,externalSlotProps:v?.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:b,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:e=>c(e,l),onKeyDown:e=>h(e,l),onFocus:e=>p(e,l),onBlur:e=>f(e,l)},ownerState:t,className:x.yearButton});return(0,o.jsx)(ine,(0,WW.Z)({className:(0,Gl.Z)(x.root,r),ownerState:t},y,{children:(0,o.jsx)(w,(0,WW.Z)({},S))}))}));function lne(e){return(0,Sc.ZP)("MuiYearCalendar",e)}(0,wc.Z)("MuiYearCalendar",["root"]);const une=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"];const cne=(0,Y.ZP)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:_9,maxHeight:280,boxSizing:"border-box",position:"relative"}),dne=d.forwardRef((function(e,t){const n=function(e,t){const n=D7(),r=O7(),o=(0,w7.Z)({props:e,name:t});return(0,WW.Z)({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Z7(n,o.minDate,r.minDate),maxDate:Z7(n,o.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:r,className:i,value:a,defaultValue:s,referenceDate:l,disabled:u,disableFuture:c,disablePast:h,maxDate:p,minDate:f,onChange:m,readOnly:g,shouldDisableYear:v,onYearFocus:y,hasFocus:b,onFocusedViewChange:x,yearsOrder:w="asc",yearsPerRow:S,timezone:C,gridLabelId:k,slots:_,slotProps:M}=n,T=(0,GW.Z)(n,une),{value:P,handleValueChange:R,timezone:I}=Mee({name:"YearCalendar",timezone:C,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:Yee}),D=A7(I),O=(0,bp.V)(),A=D7(),E=d.useMemo((()=>Yee.getInitialReferenceValue({value:P,utils:A,props:n,timezone:I,referenceDate:l,granularity:Tee.year})),[]),L=n,Z=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"]},lne,t)})(L),F=d.useMemo((()=>A.getYear(D)),[A,D]),j=d.useMemo((()=>null!=P?A.getYear(P):null),[P,A]),[N,z]=d.useState((()=>j||A.getYear(E))),[B,V]=(0,W9.Z)({name:"YearCalendar",state:"hasFocus",controlled:b,default:r??!1}),$=(0,H9.Z)((e=>{V(e),x&&x(e)})),H=d.useCallback((e=>{if(h&&A.isBeforeYear(e,D))return!0;if(c&&A.isAfterYear(e,D))return!0;if(f&&A.isBeforeYear(e,f))return!0;if(p&&A.isAfterYear(e,p))return!0;if(!v)return!1;const t=A.startOfYear(e);return v(t)}),[c,h,p,f,D,v,A]),W=(0,H9.Z)(((e,t)=>{if(g)return;const n=A.setYear(P??E,t);R(n)})),G=(0,H9.Z)((e=>{H(A.setYear(P??E,e))||(z(e),$(!0),y?.(e))}));d.useEffect((()=>{z((e=>null!==j&&e!==j?j:e))}),[j]);const U="desc"!==w?1*S:-1*S,q=O&&"asc"===w||!O&&"desc"===w?-1:1,K=(0,H9.Z)(((e,t)=>{switch(e.key){case"ArrowUp":G(t-U),e.preventDefault();break;case"ArrowDown":G(t+U),e.preventDefault();break;case"ArrowLeft":G(t-q),e.preventDefault();break;case"ArrowRight":G(t+q),e.preventDefault()}})),Y=(0,H9.Z)(((e,t)=>{G(t)})),X=(0,H9.Z)(((e,t)=>{N===t&&$(!1)})),Q=d.useRef(null),J=(0,dte.Z)(t,Q);d.useEffect((()=>{if(r||null===Q.current)return;const e=Q.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=Q.current.clientHeight,i=Q.current.scrollTop,a=n+t;t>o||n{const t=A.getYear(e),n=t===j,r=u||H(e);return(0,o.jsx)(sne,{selected:n,value:t,onClick:W,onKeyDown:K,autoFocus:B&&t===N,disabled:r,tabIndex:t!==N||r?-1:0,onFocus:Y,onBlur:X,"aria-current":F===t?"date":void 0,yearsPerRow:S,slots:_,slotProps:M,children:A.format(e,"year")},A.format(e,"year"))}))}))})),hne=e=>(0,Sc.ZP)("MuiPickersCalendarHeader",e),pne=(0,wc.Z)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),fne=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],mne=["ownerState"],gne=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),vne=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>(0,WW.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),yne=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),bne=(0,Y.ZP)(u.Z,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${pne.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),xne=(0,Y.ZP)(G7,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"}))),wne=d.forwardRef((function(e,t){const n=Q7(),r=D7(),i=(0,w7.Z)({props:e,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:u,disableFuture:c,disablePast:h,maxDate:p,minDate:f,onMonthChange:m,onViewChange:g,view:v,reduceAnimations:y,views:b,labelId:x,className:w,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,k=(0,GW.Z)(i,fne),_=i,M=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},hne,t)})(i),T=a?.switchViewButton??bne,P=(0,L9.Z)({elementType:T,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(v)},ownerState:_,className:M.switchViewButton}),R=a?.switchViewIcon??xne,I=(0,L9.Z)({elementType:R,externalSlotProps:s?.switchViewIcon,ownerState:_,className:M.switchViewIcon}),D=(0,GW.Z)(I,mne),O=function(e,{disableFuture:t,maxDate:n,timezone:r}){const o=D7();return d.useMemo((()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)}),[t,n,e,o,r])}(l,{disableFuture:c,maxDate:p,timezone:S}),A=function(e,{disablePast:t,minDate:n,timezone:r}){const o=D7();return d.useMemo((()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)}),[t,n,e,o,r])}(l,{disablePast:h,minDate:f,timezone:S});if(1===b.length&&"year"===b[0])return null;const E=r.formatByString(l,C);return(0,o.jsxs)(gne,(0,WW.Z)({},k,{ownerState:_,className:(0,Gl.Z)(M.root,w),ref:t,children:[(0,o.jsxs)(vne,{role:"presentation",onClick:()=>{if(1!==b.length&&g&&!u)if(2===b.length)g(b.find((e=>e!==v))||b[0]);else{const e=0!==b.indexOf(v)?0:1;g(b[e])}},ownerState:_,"aria-live":"polite",className:M.labelContainer,children:[(0,o.jsx)(cte,{reduceAnimations:y,transKey:E,children:(0,o.jsx)(yne,{id:x,ownerState:_,className:M.label,children:E})}),b.length>1&&!u&&(0,o.jsx)(T,(0,WW.Z)({},P,{children:(0,o.jsx)(R,(0,WW.Z)({},D))}))]}),(0,o.jsx)(xd.Z,{in:"day"===v,appear:!y,enter:!y,children:(0,o.jsx)($9,{slots:a,slotProps:s,onGoToPrevious:()=>m(r.addMonths(l,-1),"right"),isPreviousDisabled:A,previousLabel:n.previousMonth,onGoToNext:()=>m(r.addMonths(l,1),"left"),isNextDisabled:O,nextLabel:n.nextMonth})})]}))})),Sne="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Cne=Sne&&Sne[1]?parseInt(Sne[1],10):null,kne=Sne&&Sne[2]?parseInt(Sne[2],10):null,_ne=Cne&&Cne<10||kne&&kne<13||!1,Mne=e=>(0,Sc.ZP)("MuiDateCalendar",e),Tne=((0,wc.Z)("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"]);function Pne(e,t){const n=D7(),r=O7(),i=(0,yp.Z)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||_ne,a=(0,w7.Z)({props:e,name:t});return(0,WW.Z)({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??i,renderLoading:a.renderLoading??(()=>(0,o.jsx)("span",{children:"..."})),minDate:Z7(n,a.minDate,r.minDate),maxDate:Z7(n,a.maxDate,r.maxDate)})}const Rne=(0,Y.ZP)(U9,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Ine=(0,Y.ZP)(cte,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Dne=d.forwardRef((function(e,t){const n=D7(),r=(0,yd.Z)(),i=Pne(e,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:u,referenceDate:c,disableFuture:h,disablePast:p,onChange:f,onYearChange:m,onMonthChange:g,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:x,view:w,views:S,openTo:C,className:k,disabled:_,readOnly:M,minDate:T,maxDate:P,disableHighlightToday:R,focusedView:I,onFocusedViewChange:D,showDaysOutsideCurrentMonth:O,fixedWeekNumber:A,dayOfWeekFormatter:E,slots:L,slotProps:Z,loading:F,renderLoading:j,displayWeekNumber:N,yearsOrder:z,yearsPerRow:B,monthsPerRow:V,timezone:$}=i,H=(0,GW.Z)(i,Tne),{value:W,handleValueChange:G,timezone:U}=Mee({name:"DateCalendar",timezone:$,value:l,defaultValue:u,referenceDate:c,onChange:f,valueManager:Yee}),{view:q,setView:K,focusedView:Y,setFocusedView:X,goToNextView:Q,setValueAndGoToNextView:J}=G9({view:w,views:S,openTo:C,onChange:G,onViewChange:s,autoFocus:a,focusedView:I,onFocusedViewChange:D}),{referenceDate:ee,calendarState:te,changeFocusedDay:ne,changeMonth:re,handleChangeMonth:oe,isDateDisabled:ie,onMonthSwitchingAnimationEnd:ae}=ate({value:W,referenceDate:c,reduceAnimations:v,onMonthChange:g,minDate:T,maxDate:P,shouldDisableDate:y,disablePast:p,disableFuture:h,timezone:U}),se=_&&W||T,le=_&&W||P,ue=`${r}-grid-label`,ce=null!==Y,de=L?.calendarHeader??wne,he=(0,L9.Z)({elementType:de,externalSlotProps:Z?.calendarHeader,additionalProps:{views:S,view:q,currentMonth:te.currentMonth,onViewChange:K,onMonthChange:(e,t)=>oe({newMonth:e,direction:t}),minDate:se,maxDate:le,disabled:_,disablePast:p,disableFuture:h,reduceAnimations:v,timezone:U,labelId:ue},ownerState:i}),pe=(0,H9.Z)((e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=ie(e)?L7({utils:n,date:e,minDate:n.isBefore(T,t)?t:T,maxDate:n.isAfter(P,r)?r:P,disablePast:p,disableFuture:h,isDateDisabled:ie,timezone:U}):e;o?(J(o,"finish"),g?.(t)):(Q(),re(t)),ne(o,!0)})),fe=(0,H9.Z)((e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=ie(e)?L7({utils:n,date:e,minDate:n.isBefore(T,t)?t:T,maxDate:n.isAfter(P,r)?r:P,disablePast:p,disableFuture:h,isDateDisabled:ie,timezone:U}):e;o?(J(o,"finish"),m?.(o)):(Q(),re(t)),ne(o,!0)})),me=(0,H9.Z)((e=>G(e?E7(n,e,W??ee):e,"finish",q)));d.useEffect((()=>{null!=W&&n.isValid(W)&&re(W)}),[W]);const ge=i,ve=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Mne,t)})(ge),ye={disablePast:p,disableFuture:h,maxDate:P,minDate:T},be={disableHighlightToday:R,readOnly:M,disabled:_,timezone:U,gridLabelId:ue,slots:L,slotProps:Z},xe=d.useRef(q);d.useEffect((()=>{xe.current!==q&&(Y===xe.current&&X(q,!0),xe.current=q)}),[Y,X,q]);const we=d.useMemo((()=>[W]),[W]);return(0,o.jsxs)(Rne,(0,WW.Z)({ref:t,className:(0,Gl.Z)(ve.root,k),ownerState:ge},H,{children:[(0,o.jsx)(de,(0,WW.Z)({},he,{slots:L,slotProps:Z})),(0,o.jsx)(Ine,{reduceAnimations:v,className:ve.viewTransitionContainer,transKey:q,ownerState:ge,children:(0,o.jsxs)("div",{children:["year"===q&&(0,o.jsx)(dne,(0,WW.Z)({},ye,be,{value:W,onChange:fe,shouldDisableYear:x,hasFocus:ce,onFocusedViewChange:e=>X("year",e),yearsOrder:z,yearsPerRow:B,referenceDate:ee})),"month"===q&&(0,o.jsx)(tne,(0,WW.Z)({},ye,be,{hasFocus:ce,className:k,value:W,onChange:pe,shouldDisableMonth:b,onFocusedViewChange:e=>X("month",e),monthsPerRow:V,referenceDate:ee})),"day"===q&&(0,o.jsx)(Wte,(0,WW.Z)({},te,ye,be,{onMonthSwitchingAnimationEnd:ae,onFocusedDayChange:ne,reduceAnimations:v,selectedDays:we,onSelectedDaysChange:me,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:x,hasFocus:ce,onFocusedViewChange:e=>X("day",e),showDaysOutsideCurrentMonth:O,fixedWeekNumber:A,dayOfWeekFormatter:E,displayWeekNumber:N,loading:F,renderLoading:j}))]})})]}))})),One=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:C,yearsPerRow:k,slots:_,slotProps:M,loading:T,renderLoading:P,disableHighlightToday:R,readOnly:I,disabled:D,showDaysOutsideCurrentMonth:O,dayOfWeekFormatter:A,sx:E,autoFocus:L,fixedWeekNumber:Z,displayWeekNumber:F,timezone:j})=>(0,o.jsx)(Dne,{view:e,onViewChange:t,views:n.filter(B7),focusedView:r&&B7(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:C,yearsPerRow:k,slots:_,slotProps:M,loading:T,renderLoading:P,disableHighlightToday:R,readOnly:I,disabled:D,showDaysOutsideCurrentMonth:O,dayOfWeekFormatter:A,sx:E,autoFocus:L,fixedWeekNumber:Z,displayWeekNumber:F,timezone:j});function Ane(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=I7(),s=d.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);d.useEffect((()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l}),[n,i,l,r]);const c=(0,H9.Z)((e=>n({adapter:a,value:e,timezone:o,props:t})));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:c}}const Ene=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===r,timezone:c,referenceDate:h}=e,{current:p}=d.useRef(l),{current:f}=d.useRef(void 0!==s),[m,g]=d.useState(c);const v=D7(),y=I7(),{isOpen:b,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{const r=d.useRef("boolean"==typeof e).current,[o,i]=d.useState(!1);return d.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}}),[r,e]),{isOpen:o,setIsOpen:d.useCallback((e=>{r||i(e),e&&t&&t(),!e&&n&&n()}),[r,t,n])}})(e),{timezone:w,value:S,handleValueChange:C}=_ee({timezone:c,value:s,defaultValue:p,referenceDate:h,onChange:a,valueManager:t}),[k,_]=d.useState((()=>{let e;return e=void 0!==S?S:void 0!==p?p:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}})),M=t.getTimezone(v,k.draft);m!==c&&(g(c),c&&M&&c!==M&&_((e=>(0,WW.Z)({},e,{draft:t.setTimezone(v,c,e.draft)}))));const{getValidationErrorForNewValue:T}=Ane({props:e,validator:o,timezone:w,value:k.draft,onError:e.onError}),P=(0,H9.Z)((e=>{const n={action:e,dateState:k,hasChanged:n=>!t.areValuesEqual(v,e.value,n),isControlled:f,closeOnSelect:u},r=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!i||n(r.lastPublishedValue)))})(n),o=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&i?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),a=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);_((t=>(0,WW.Z)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:o?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0})));let s=null;const l=()=>{if(!s){const t="setValueFromField"===e.name?e.context.validationError:T(e.value);s={validationError:t},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)}return s};r&&C(e.value,l()),o&&i&&i(e.value,l()),a&&x(!1)}));if(k.lastControlledValue!==s){const e=t.areValuesEqual(v,k.draft,S);_((t=>(0,WW.Z)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:S,lastPublishedValue:S,draft:S,hasBeenModifiedSinceMount:!0})))}const R=(0,H9.Z)((()=>{P({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),I=(0,H9.Z)((()=>{P({value:k.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),D=(0,H9.Z)((()=>{P({value:k.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),O=(0,H9.Z)((()=>{P({value:k.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),A=(0,H9.Z)((()=>{P({value:t.getTodayValue(v,w,n),name:"setValueFromAction",pickerAction:"today"})})),E=(0,H9.Z)((e=>{e.preventDefault(),x(!0)})),L=(0,H9.Z)((e=>{e?.preventDefault(),x(!1)})),Z=(0,H9.Z)(((e,t="partial")=>P({name:"setValueFromView",value:e,selectionState:t}))),F=(0,H9.Z)(((e,t,n)=>P({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n}))),j=(0,H9.Z)(((e,t)=>P({name:"setValueFromField",value:e,context:t}))),N={onClear:R,onAccept:I,onDismiss:D,onCancel:O,onSetToday:A,onOpen:E,onClose:L},z={value:k.draft,onChange:j},B=d.useMemo((()=>t.cleanValue(v,k.draft)),[v,t,k.draft]),V={value:B,onChange:Z,onClose:L,open:b},$=(0,WW.Z)({},N,{value:B,onChange:Z,onSelectShortcut:F,isValid:n=>{const r=o({adapter:y,value:n,timezone:w,props:e});return!t.hasError(r)}}),H=d.useMemo((()=>({onOpen:E,onClose:L,open:b})),[b,L,E]);return{open:b,fieldProps:z,viewProps:V,layoutProps:$,actions:N,contextValue:H}},Lne=["className","sx"];const Zne=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Zne(t.shadowRoot):t:null};function Fne(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const jne=(e,t)=>{const[n,r]=d.useState(Fne);if((0,K9.Z)((()=>{const e=()=>{r(Fne())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,i=["hours","minutes","seconds"],Array.isArray(i)?i.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(i))return!1;var o,i;return"landscape"===(t||n)};const Nne=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const u=Ene({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:h,onViewChange:p,viewRenderers:f,timezone:m}=e,g=(0,GW.Z)(e,Lne),{view:v,setView:y,defaultView:b,focusedView:x,setFocusedView:w,setValueAndGoToNextView:S}=G9({view:u,views:c,openTo:h,onChange:a,onViewChange:p,autoFocus:r}),{hasUIView:C,viewModeLookup:k}=d.useMemo((()=>c.reduce(((e,t)=>{let n;return n=null!=f[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[f,c]),_=d.useMemo((()=>c.reduce(((e,t)=>null!=f[t]&&x9(t)?e+1:e),0)),[f,c]),M=k[v],T=(0,H9.Z)((()=>"UI"===M)),[P,R]=d.useState("UI"===M?v:null);return P!==v&&"UI"===k[v]&&R(v),(0,K9.Z)((()=>{"field"===M&&s&&(l(),setTimeout((()=>{i?.current?.setSelectedSections(v),i?.current?.focusField(v)})))}),[v]),(0,K9.Z)((()=>{if(!s)return;let e=v;"field"===M&&null!=P&&(e=P),e!==b&&"UI"===k[e]&&"UI"===k[b]&&(e=b),e!==v&&y(e),w(e,!0)}),[s]),{hasUIView:C,shouldRestoreFocus:T,layoutProps:{views:c,view:P,onViewChange:y},renderCurrentView:()=>{if(null==P)return null;const e=f[P];if(null==e)return null;const r=(0,WW.Z)({},g,n,t,{views:c,timezone:m,onChange:S,view:P,onViewChange:y,focusedView:x,onFocusedViewChange:w,showViewSwitcher:_>1,timeViewsCount:_});return o?o(f,P,r):e(r)}}})({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),h=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=jne(n.views,o),a=(0,bp.V)();return{layoutProps:(0,WW.Z)({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),p=function(e){const{props:t,pickerValueResponse:n}=e;return d.useMemo((()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1})),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:h.layoutProps,contextValue:u.contextValue,ownerState:p}};function zne(e){return(0,Sc.ZP)("MuiPickersLayout",e)}const Bne=(0,wc.Z)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Vne=["onAccept","onClear","onCancel","onSetToday","actions"];function $ne(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:s}=e,l=(0,GW.Z)(e,Vne),u=Q7();if(null==s||0===s.length)return null;const c=s?.map((e=>{switch(e){case"clear":return(0,o.jsx)(a.Z,{onClick:n,children:u.clearButtonLabel},e);case"cancel":return(0,o.jsx)(a.Z,{onClick:r,children:u.cancelButtonLabel},e);case"accept":return(0,o.jsx)(a.Z,{onClick:t,children:u.okButtonLabel},e);case"today":return(0,o.jsx)(a.Z,{onClick:i,children:u.todayButtonLabel},e);default:return null}}));return(0,o.jsx)(Ad,(0,WW.Z)({},l,{children:c}))}var Hne=n(71852),Wne=n(2259),Gne=n(52889);const Une=["items","changeImportance","isLandscape","onChange","isValid"],qne=["getValue"];function Kne(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,a=(0,GW.Z)(e,Une);if(null==t||0===t.length)return null;const s=t.map((e=>{let{getValue:t}=e,o=(0,GW.Z)(e,qne);const a=t({isValid:i});return(0,WW.Z)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})}));return(0,o.jsx)(Hne.Z,(0,WW.Z)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:s.map((e=>(0,o.jsx)(Wne.ZP,{children:(0,o.jsx)(Gne.Z,(0,WW.Z)({},e))},e.id??e.label)))}))}const Yne=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:a,view:s,views:l,onViewChange:u,value:c,onChange:d,onSelectShortcut:h,isValid:p,isLandscape:f,disabled:m,readOnly:g,children:v,slots:y,slotProps:b}=e,x=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]};return(0,Ul.Z)(r,zne,t)})(e),w=y?.actionBar??$ne,S=(0,L9.Z)({elementType:w,externalSlotProps:b?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:a,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,WW.Z)({},e,{wrapperVariant:t})}),C=(0,o.jsx)(w,(0,WW.Z)({},S)),k=y?.toolbar,_=(0,L9.Z)({elementType:k,externalSlotProps:b?.toolbar,additionalProps:{isLandscape:f,onChange:d,value:c,view:s,onViewChange:u,views:l,disabled:m,readOnly:g},className:x.toolbar,ownerState:(0,WW.Z)({},e,{wrapperVariant:t})}),M=function(e){return null!==e.view}(_)&&k?(0,o.jsx)(k,(0,WW.Z)({},_)):null,T=v,P=y?.tabs,R=s&&P?(0,o.jsx)(P,(0,WW.Z)({view:s,onViewChange:u,className:x.tabs},b?.tabs)):null,I=y?.shortcuts??Kne,D=(0,L9.Z)({elementType:I,externalSlotProps:b?.shortcuts,additionalProps:{isValid:p,isLandscape:f,onChange:h},className:x.shortcuts,ownerState:{isValid:p,isLandscape:f,onChange:h,wrapperVariant:t}});return{toolbar:M,content:T,tabs:R,actionBar:C,shortcuts:s&&I?(0,o.jsx)(I,(0,WW.Z)({},D)):null}},Xne=(0,Y.ZP)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Bne.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Bne.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Bne.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Bne.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Bne.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Bne.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Bne.shortcuts}`]:{gridColumn:3}}}]}),Qne=(0,Y.ZP)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Jne=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:a,actionBar:s,shortcuts:l}=Yne(n),{sx:u,className:c,isLandscape:h,wrapperVariant:p}=n,f=(e=>{const{isLandscape:t,classes:n}=e,r={root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]};return(0,Ul.Z)(r,zne,n)})(n);return(0,o.jsxs)(Xne,{ref:t,sx:u,className:(0,Gl.Z)(f.root,c),ownerState:n,children:[h?l:r,h?r:l,(0,o.jsx)(Qne,{className:f.contentWrapper,children:"desktop"===p?(0,o.jsxs)(d.Fragment,{children:[i,a]}):(0,o.jsxs)(d.Fragment,{children:[a,i]})}),s]})})),ere=["props","ref"],tre=(0,Y.ZP)(Jne)((({theme:e})=>({overflow:"hidden",minWidth:_9,backgroundColor:(e.vars||e).palette.background.paper}))),nre=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,d=e.utils.date(void 0,n),h=C9(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case Boolean(o&&h(o,t)):return"minTime";case Boolean(i&&h(t,i)):return"maxTime";case Boolean(c&&e.utils.isAfter(t,d)):return"disableFuture";case Boolean(u&&e.utils.isBefore(t,d)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};nre.valueManager=Yee;const rre=({adapter:e,value:t,timezone:n,props:r})=>{const o=ote({adapter:e,value:t,timezone:n,props:r});return null!==o?o:nre({adapter:e,value:t,timezone:n,props:r})};rre.valueManager=Yee;const ore=d.forwardRef((function(e,t){const n=E9(e,"MuiStaticDateTimePicker"),r=n.displayStaticWrapperAs??"mobile",i=n.ampmInClock??"desktop"===r,a=(0,WW.Z)({day:One,month:One,year:One,hours:rte,minutes:rte,seconds:rte},n.viewRenderers),s=(0,WW.Z)({},n,{viewRenderers:a,displayStaticWrapperAs:r,ampmInClock:i,yearsPerRow:n.yearsPerRow??("mobile"===r?3:4),slotProps:(0,WW.Z)({},n.slotProps,{tabs:(0,WW.Z)({hidden:"desktop"===r},n.slotProps?.tabs),toolbar:(0,WW.Z)({hidden:"desktop"===r,ampmInClock:i},n.slotProps?.toolbar)})}),{renderPicker:l}=(e=>{let{props:t,ref:n}=e,r=(0,GW.Z)(e,ere);const{localeText:i,slots:a,slotProps:s,className:l,sx:u,displayStaticWrapperAs:c,autoFocus:d}=t,{layoutProps:h,renderCurrentView:p}=Nne((0,WW.Z)({},r,{props:t,autoFocusView:d??!1,additionalViewProps:{},wrapperVariant:c})),f=a?.layout??tre;return{renderPicker:()=>(0,o.jsx)(k7,{localeText:i,children:(0,o.jsx)(f,(0,WW.Z)({},h,s?.layout,{slots:a,slotProps:s,sx:[...Array.isArray(u)?u:[u],...Array.isArray(s?.layout?.sx)?s.layout.sx:[s?.layout?.sx]],className:(0,Gl.Z)(l,s?.layout?.className),ref:n,children:p()}))})}})({props:s,valueManager:Yee,valueType:"date-time",validator:rre,ref:t});return l()}));ore.propTypes={ampm:M7().bool,ampmInClock:M7().bool,autoFocus:M7().bool,className:M7().string,dayOfWeekFormatter:M7().func,defaultValue:M7().object,disabled:M7().bool,disableFuture:M7().bool,disableHighlightToday:M7().bool,disableIgnoringDatePartForTimeValidation:M7().bool,disablePast:M7().bool,displayStaticWrapperAs:M7().oneOf(["desktop","mobile"]),displayWeekNumber:M7().bool,fixedWeekNumber:M7().number,loading:M7().bool,localeText:M7().object,maxDate:M7().object,maxDateTime:M7().object,maxTime:M7().object,minDate:M7().object,minDateTime:M7().object,minTime:M7().object,minutesStep:M7().number,monthsPerRow:M7().oneOf([3,4]),onAccept:M7().func,onChange:M7().func,onClose:M7().func,onError:M7().func,onMonthChange:M7().func,onViewChange:M7().func,onYearChange:M7().func,openTo:M7().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:M7().oneOf(["landscape","portrait"]),readOnly:M7().bool,reduceAnimations:M7().bool,referenceDate:M7().object,renderLoading:M7().func,shouldDisableDate:M7().func,shouldDisableMonth:M7().func,shouldDisableTime:M7().func,shouldDisableYear:M7().func,showDaysOutsideCurrentMonth:M7().bool,slotProps:M7().object,slots:M7().object,sx:M7().oneOfType([M7().arrayOf(M7().oneOfType([M7().func,M7().object,M7().bool])),M7().func,M7().object]),timezone:M7().string,value:M7().object,view:M7().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:M7().shape({day:M7().func,hours:M7().func,minutes:M7().func,month:M7().func,seconds:M7().func,year:M7().func}),views:M7().arrayOf(M7().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:M7().oneOf(["asc","desc"]),yearsPerRow:M7().oneOf([3,4])};const ire=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},are=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(""===a)throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Ree(e,a),u=Vee(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,d=null!=t&&e.isValid(t);let h=d?e.formatByString(t,a):"",p=null;if(c)if(u)p=""===h?e.formatByString(i,a).length:h.length;else{if(null==l.maxLength)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(h=Eee(Zee(Aee(h,o),p),o))}return(0,WW.Z)({},l,{format:a,maxLength:p,value:h,placeholder:ire(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},sre=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=(({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n})((0,WW.Z)({},e,{expandedFormat:t})),r=(e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort(((e,t)=>t.length-e.length)),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),c=new RegExp(`^(${s.join("|")})`),d=e=>r.find((t=>t.start<=e&&t.end>=e));let h=0;for(;h0;){const n=c.exec(t)[1];t=t.slice(n.length),i.push(are((0,WW.Z)({},e,{now:o,token:n,startSeparator:a}))),a=""}h+=s.length}else{const e=n[h];r&&t?.start===h||t?.end===h||(0===i.length?a+=e:i[i.length-1].endSeparator+=e),h+=1}}return 0===i.length&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i})((0,WW.Z)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map((n=>{const r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`⁩${r}⁦`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n})))((0,WW.Z)({},e,{sections:r}))},lre=e=>{const t=D7(),n=Q7(),r=I7(),o=(0,bp.V)(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:h,referenceDate:p,onChange:f,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:b=!1,timezone:x,enableAccessibleFieldDOMStructure:w=!1}}=e,{timezone:S,value:C,handleValueChange:k}=_ee({timezone:x,value:c,defaultValue:h,referenceDate:p,onChange:f,valueManager:i}),_=d.useMemo((()=>(e=>{const t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?Oee:Array.from({length:10}).map(((n,r)=>e.formatByString(e.setSeconds(t,r),"s")))})(t)),[t]),M=d.useMemo((()=>((e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=F7(e,r).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:Bee(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){const n=Iee(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{const o=e.getHours(i);return Aee(e.formatByString(e.endOfDay(r),n),t)!==o.toString()?{minimum:1,maximum:Number(Aee(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,_,S)),[t,_,S]),T=d.useCallback(((e,r=null)=>a.getSectionsFromValue(t,e,r,(e=>sre({utils:t,localeText:n,localizedDigits:_,format:m,date:e,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o})))),[a,m,n,_,o,b,t,g,w]),[P,R]=d.useState((()=>{const e=T(C);$ee();const n={sections:e,value:C,referenceValue:i.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>Tee[e.type]??1))))(e),o=i.getInitialReferenceValue({referenceDate:p,value:C,utils:t,props:u,granularity:r,timezone:S});return(0,WW.Z)({},n,{referenceValue:o})})),[I,D]=(0,W9.Z)({controlled:v,default:null,name:"useField",state:"selectedSections"}),O=e=>{D(e),y?.(e)},A=d.useMemo((()=>Gee(I,P.sections)),[I,P.sections]),E="all"===A?0:A,L=({value:e,referenceValue:n,sections:o})=>{if(R((t=>(0,WW.Z)({},t,{sections:o,value:e,referenceValue:n,tempValueStrAndroid:null}))),i.areValuesEqual(t,P.value,e))return;const a={validationError:l({adapter:r,value:e,timezone:S,props:u})};k(e,a)},Z=(e,t)=>{const n=[...P.sections];return n[e]=(0,WW.Z)({},n[e],{value:t,modified:!0}),n};return d.useEffect((()=>{const e=T(P.value);$ee(),R((t=>(0,WW.Z)({},t,{sections:e})))}),[m,t.locale,o]),d.useEffect((()=>{let e;e=!i.areValuesEqual(t,P.value,C)||i.getTimezone(t,P.value)!==i.getTimezone(t,C),e&&R((e=>(0,WW.Z)({},e,{value:C,referenceValue:a.updateReferenceValue(t,C,e.referenceValue),sections:T(C)})))}),[C]),{state:P,activeSectionIndex:E,parsedSelectedSections:A,setSelectedSections:O,clearValue:()=>{L({value:i.emptyValue,referenceValue:P.referenceValue,sections:T(i.emptyValue)})},clearActiveSection:()=>{if(null==E)return;const e=P.sections[E],n=a.getActiveDateManager(t,P,e),r=n.getSections(P.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),o=Z(E,""),i=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(i);L((0,WW.Z)({},s,{sections:o}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{r&&E{const r=t.some((e=>"day"===e.type)),o=[],i=[];for(let e=0;e(0,WW.Z)({},e,u,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=a.parseValueStr(e,P.referenceValue,((e,r)=>{const i=t.parse(e,m);if(null==i||!t.isValid(i))return null;const a=sre({utils:t,localeText:n,localizedDigits:_,format:m,date:i,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o});return Wee(t,i,a,r,!1)})),i=a.updateReferenceValue(t,r,P.referenceValue);L({value:r,referenceValue:i,sections:T(r,P.sections)})},setTempAndroidValueStr:e=>R((t=>(0,WW.Z)({},t,{tempValueStrAndroid:e}))),getSectionsFromValue:T,sectionsValueBoundaries:M,localizedDigits:_,timezone:S}},ure=e=>null!=e.saveQuery,cre=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=D7(),[s,l]=d.useState(null),u=(0,H9.Z)((()=>l(null)));d.useEffect((()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()}),[e,s,u]),d.useEffect((()=>{if(null!=s){const e=setTimeout((()=>u()),5e3);return()=>{clearTimeout(e)}}return()=>{}}),[s,u]);const c=({keyPressed:t,sectionIndex:n},r,o)=>{const i=t.toLowerCase(),a=e[n];if(null!=s&&(!o||o(s.value))&&s.sectionIndex===n){const e=`${s.value}${i}`,t=r(e,a);if(!ure(t))return l({sectionIndex:n,value:e,sectionType:a.type}),t}const c=r(i,a);return ure(c)&&!c.saveQuery?(u(),null):(l({sectionIndex:n,value:i,sectionType:a.type}),ure(c)?null:c)};return{applyCharacterEditing:(0,H9.Z)((s=>{const l=e[s.sectionIndex],u=Lee(s.keyPressed,r)?(e=>{const t=(e,t)=>{const o=Aee(e,r),i=Number(o),s=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(i>s.maximum)return{saveQuery:!1};if(is.maximum||o.length===s.maximum.toString().length;return{sectionValue:Fee(a,i,s,r,t),shouldGoToNextSection:l}};return c(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=Vee(a,"digit","month","MM"),o=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ure(o))return o;const i=zee(a,o.sectionValue,"MM",n.format);return(0,WW.Z)({},o,{sectionValue:i})}if("weekDay"===n.type){const r=t(e,n);if(ure(r))return r;const o=Iee(a,n.format)[Number(r.sectionValue)-1];return(0,WW.Z)({},r,{sectionValue:o})}return{saveQuery:!1}}),(e=>Lee(e,r)))})((0,WW.Z)({},s,{keyPressed:Eee(s.keyPressed,r)})):(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,o)=>{const s=e=>Dee(a,i,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(r&&null!=o&&"letter"===Ree(a,r).contentType){const n=s(r),i=t(0,n,e);return ure(i)?{saveQuery:!1}:(0,WW.Z)({},i,{sectionValue:o(i.sectionValue,n)})}return{saveQuery:!1}};return c(e,((e,t)=>{switch(t.type){case"month":{const r=e=>zee(a,e,a.formats.month,t.format);return n(e,t,a.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,a.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(s);null!=u?t({activeSection:l,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection}):o(null)})),resetCharacterQuery:u}},dre=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:h,applyCharacterEditing:p,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:y,clearValue:b,updateSectionValue:x,updateValueFromValueStr:w,sectionOrder:S,areAllSectionsEmpty:C,sectionsValueBoundaries:k}=e,_=d.useRef(null),M=(0,dte.Z)(r,_),T=Q7(),P=D7(),R=(0,yd.Z)(),[I,D]=d.useState(!1),O=d.useMemo((()=>({syncSelectionToDOM:()=>{if(!_.current)return;const e=document.getSelection();if(!e)return;if(null==g)return e.rangeCount>0&&_.current.getRoot().contains(e.getRangeAt(0).startContainer)&&e.removeAllRanges(),void(I&&_.current.getRoot().blur());if(!_.current.getRoot().contains(Zne(document)))return;const t=new window.Range;let n;if("all"===g)n=_.current.getRoot();else{n="empty"===v.sections[g].type?_.current.getSectionContainer(g):_.current.getSectionContent(g)}t.selectNodeContents(n),n.focus(),e.removeAllRanges(),e.addRange(t)},getActiveSectionIndexFromDOM:()=>{const e=Zne(document);return e&&_.current&&_.current.getRoot().contains(e)?_.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!_.current||null!=O.getActiveSectionIndexFromDOM())return;const t=Gee(e,v.sections);D(!0),_.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!_.current)return;const t=Gee(e,v.sections);D(null!==("all"===t?0:t)),m(e)},isFieldFocused:()=>{const e=Zne(document);return!!_.current&&_.current.getRoot().contains(e)}})),[g,m,v.sections,I]),A=(0,H9.Z)((e=>{if(!_.current)return;const t=v.sections[e];_.current.getSectionContent(e).innerHTML=t.value||t.placeholder,O.syncSelectionToDOM()})),E=(0,H9.Z)(((e,...t)=>{if(!e.isDefaultPrevented()&&_.current)if(D(!0),i?.(e,...t),"all"===g)setTimeout((()=>{const e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void m(S.startIndex);let t=0,n=0;for(;n{if(s?.(e),!_.current||"all"!==g)return;const t=e.target.textContent??"";_.current.getRoot().innerHTML=v.sections.map((e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`)).join(""),O.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(f(),b(),m("all")):t.length>1?w(t):("all"===g&&m(0),p({keyPressed:t,sectionIndex:0}))})),Z=(0,H9.Z)((e=>{if(l?.(e),n||"all"!==g)return void e.preventDefault();const t=e.clipboardData.getData("text");e.preventDefault(),f(),w(t)})),F=(0,H9.Z)(((...e)=>{if(a?.(...e),I||!_.current)return;D(!0);null!=_.current.getSectionIndexFromDOMElement(Zne(document))||m(S.startIndex)})),j=(0,H9.Z)(((...e)=>{o?.(...e),setTimeout((()=>{if(!_.current)return;const e=Zne(document);!_.current.getRoot().contains(e)&&(D(!1),m(null))}))})),N=(0,H9.Z)((e=>t=>{t.isDefaultPrevented()||m(e)})),z=(0,H9.Z)((e=>{e.preventDefault()})),B=(0,H9.Z)((e=>()=>{m(e)})),V=(0,H9.Z)((e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;const r=v.sections[g],o=e.clipboardData.getData("text"),i=/^[a-zA-Z]+$/.test(o),a=/^[0-9]+$/.test(o),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(o);"letter"===r.contentType&&i||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(f(),x({activeSection:r,newSectionValue:o,shouldGoToNextSection:!0})):i||a||(f(),w(o))})),$=(0,H9.Z)((e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"})),H=(0,H9.Z)((e=>{if(!_.current)return;const t=e.target,r=t.textContent??"",o=_.current.getSectionIndexFromDOMElement(t),i=v.sections[o];if(!n&&_.current){if(0===r.length){if(""===i.value)return void A(o);const t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void A(o):(f(),void y())}p({keyPressed:r,sectionIndex:o}),A(o)}else A(o)}));(0,K9.Z)((()=>{if(I&&_.current)if("all"===g)_.current.getRoot().focus();else if("number"==typeof g){const e=_.current.getSectionContent(g);e&&e.focus()}}),[g,I]);const W=d.useMemo((()=>v.sections.reduce(((e,t)=>(e[t.type]=k[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e)),{})),[k,v.sections]),G="all"===g,U=d.useMemo((()=>v.sections.map(((e,r)=>{const o=!G&&!t&&!n;return{container:{"data-sectionindex":r,onClick:N(r)},content:{tabIndex:G||r>0?-1:0,contentEditable:!G&&!t&&!n,role:"spinbutton",id:`${R}-${e.type}`,"aria-labelledby":`${R}-${e.type}`,"aria-readonly":n,"aria-valuenow":qee(e,P),"aria-valuemin":W[e.type].minimum,"aria-valuemax":W[e.type].maximum,"aria-valuetext":e.value?Uee(e,P):T.empty,"aria-label":T[e.type],"aria-disabled":t,spellCheck:!o&&void 0,autoCapitalize:o?"off":void 0,autoCorrect:o?"off":void 0,[parseInt(d.version,10)>=17?"enterKeyHint":"enterkeyhint"]:o?"next":void 0,children:e.value||e.placeholder,onInput:H,onPaste:V,onFocus:B(r),onDragOver:$,onMouseUp:z,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}))),[v.sections,B,V,$,H,N,z,t,n,G,T,P,W,R]),q=(0,H9.Z)((e=>{w(e.target.value)})),K=d.useMemo((()=>C?"":h.getV7HiddenInputValueFromSections(v.sections)),[C,v.sections,h]);return d.useEffect((()=>{if(null==_.current)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join("\n"));c&&_.current&&_.current.getSectionContent(S.startIndex).focus()}),[]),{interactions:O,returnedValue:{autoFocus:c,readOnly:n,focused:u??I,sectionListRef:M,onBlur:j,onClick:E,onFocus:F,onInput:L,onPaste:Z,enableAccessibleFieldDOMStructure:!0,elements:U,tabIndex:0===g?-1:0,contentEditable:G,value:K,onChange:q,areAllSectionsEmpty:C}}},hre=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),pre=e=>{const t=(0,bp.V)(),n=d.useRef(void 0),r=d.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:h=!1},parsedSelectedSections:p,activeSectionIndex:f,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:y,resetCharacterQuery:b,updateSectionValue:x,updateValueFromValueStr:w,clearActiveSection:S,clearValue:C,setTempAndroidValueStr:k,setSelectedSections:_,getSectionsFromValue:M,areAllSectionsEmpty:T,localizedDigits:P}=e,R=d.useRef(null),I=(0,dte.Z)(l,R),D=d.useMemo((()=>((e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a({syncSelectionToDOM:()=>{if(!R.current)return;if(null==p)return void(R.current.scrollLeft&&(R.current.scrollLeft=0));if(R.current!==Zne(document))return;const e=R.current.scrollTop;if("all"===p)R.current.select();else{const e=D[p],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;t===R.current.selectionStart&&n===R.current.selectionEnd||R.current===Zne(document)&&R.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout((()=>{!R.current||R.current!==Zne(document)||R.current.selectionStart!==R.current.selectionEnd||R.current.selectionStart===t&&R.current.selectionEnd===n||O.syncSelectionToDOM()}))}R.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{const e=R.current.selectionStart??0,t=R.current.selectionEnd??0;if(0===e&&0===t)return null;const n=e<=D[0].startInInput?1:D.findIndex((t=>t.startInInput-t.startSeparator.length>e));return-1===n?D.length-1:n-1},focusField:(e=0)=>{Zne(document)!==R.current&&(R.current?.focus(),_(e))},setSelectedSections:e=>_(e),isFieldFocused:()=>R.current===Zne(document)})),[R,p,D,_]),A=()=>{const e=R.current.selectionStart??0;let t;t=e<=D[0].startInInput||e>=D[D.length-1].endInInput?1:D.findIndex((t=>t.startInInput-t.startSeparator.length>e));const n=-1===t?D.length-1:t-1;_(n)},E=(0,H9.Z)(((...e)=>{o?.(...e);const t=R.current;clearTimeout(n.current),n.current=setTimeout((()=>{t&&t===R.current&&null==f&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?_("all"):A())}))})),L=(0,H9.Z)(((e,...t)=>{e.isDefaultPrevented()||(i?.(e,...t),A())})),Z=(0,H9.Z)((e=>{if(a?.(e),e.preventDefault(),c||h)return;const t=e.clipboardData.getData("text");if("number"==typeof p){const e=m.sections[p],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),o=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&o)return b(),void x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});if(n||r)return}b(),w(t)})),F=(0,H9.Z)(((...e)=>{s?.(...e),_(null)})),j=(0,H9.Z)((e=>{if(c)return;const n=e.target.value;if(""===n)return b(),void C();const r=e.nativeEvent.data,o=r&&r.length>1,i=o?r:n,a=hre(i);if("all"===p&&_(f),null==f||o)return void w(o?r:a);let s;if("all"===p&&1===a.length)s=a;else{const e=hre(g.getV6InputValueFromSections(D,P,t));let n=-1,r=-1;for(let t=0;to.end)return;const i=a.length-e.length+o.end-hre(o.endSeparator||"").length;s=a.slice(o.start+hre(o.startSeparator||"").length,i)}if(0===s.length)return navigator.userAgent.toLowerCase().includes("android")&&k(i),b(),void S();y({keyPressed:s,sectionIndex:f})})),N=d.useMemo((()=>void 0!==u?u:g.getV6InputValueFromSections(M(v.emptyValue),P,t)),[u,g,M,v.emptyValue,P,t]),z=d.useMemo((()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,P,t)),[m.sections,g,m.tempValueStrAndroid,P,t]);d.useEffect((()=>(R.current&&R.current===Zne(document)&&_("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)})),[]);const B=d.useMemo((()=>null==f||"letter"===m.sections[f].contentType?"text":"numeric"),[f,m.sections]),V=R.current&&R.current===Zne(document);return{interactions:O,returnedValue:{readOnly:c,onBlur:F,onClick:L,onFocus:E,onPaste:Z,inputRef:I,enableAccessibleFieldDOMStructure:!1,placeholder:N,inputMode:B,autoComplete:"off",value:!V&&T?"":z,onChange:j}}},fre=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],mre=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],gre=["minDateTime","maxDateTime"],vre=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],yre=e=>{const t=(e=>{const t=D7(),n=O7(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return(0,WW.Z)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:Boolean(e.minDateTime||e.maxDateTime),minDate:Z7(t,e.minDateTime??e.minDate,n.minDate),maxDate:Z7(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})})(e),{forwardedProps:n,internalProps:r}=((e,t)=>d.useMemo((()=>{const n=(0,WW.Z)({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return vre.forEach(o),"date"===t?fre.forEach(o):"time"===t?mre.forEach(o):"date-time"===t&&(fre.forEach(o),mre.forEach(o),gre.forEach(o)),{forwardedProps:n,internalProps:r}}),[e,t]))(t,"date-time");return(e=>{const t=D7(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:h},fieldValueManager:p,valueManager:f,validator:m}=e,g=(0,bp.V)(),v=lre(e),{state:y,activeSectionIndex:b,parsedSelectedSections:x,setSelectedSections:w,clearValue:S,clearActiveSection:C,updateSectionValue:k,setTempAndroidValueStr:_,sectionsValueBoundaries:M,localizedDigits:T,timezone:P}=v,R=cre({sections:y.sections,updateSectionValue:k,sectionsValueBoundaries:M,localizedDigits:T,setTempAndroidValueStr:_,timezone:P}),{resetCharacterQuery:I}=R,D=f.areValuesEqual(t,y.value,f.emptyValue),O=i?dre:pre,A=d.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,i=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:i}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex(((e,t)=>t>=i&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator)),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,r[s]=e,s-=1;i=a+1}return e.forEach(((t,i)=>{const a=o[i],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[i]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(y.sections,g&&!i)),[y.sections,g,i]),{returnedValue:E,interactions:L}=O((0,WW.Z)({},e,v,R,{areAllSectionsEmpty:D,sectionOrder:A})),Z=(0,H9.Z)((e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),w("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)w(A.startIndex);else if("all"===x)w(A.endIndex);else{const e=A.neighbors[x].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)w(A.endIndex);else if("all"===x)w(A.startIndex);else{const e=A.neighbors[x].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?S():C(),I();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==b)break;"all"===x&&w(b);const n=y.sections[b],r=p.getActiveDateManager(t,y,n),i=jee(t,P,n,e.key,M,T,r.date,{minutesStep:o});k({activeSection:n,newSectionValue:i,shouldGoToNextSection:!1});break}}}));(0,K9.Z)((()=>{L.syncSelectionToDOM()}));const{hasValidationError:F}=Ane({props:n,validator:m,timezone:P,value:y.value,onError:n.onError}),j=d.useMemo((()=>void 0!==u?u:F),[F,u]);d.useEffect((()=>{j||null!=b||I()}),[y.referenceValue,b,j]),d.useEffect((()=>{null!=y.tempValueStrAndroid&&null!=b&&(I(),C())}),[y.sections]),d.useImperativeHandle(r,(()=>({getSections:()=>y.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused})));const N=(0,H9.Z)(((e,...t)=>{e.preventDefault(),h?.(e,...t),S(),L.isFieldFocused()?w(A.startIndex):L.focusField(0)})),z={onKeyDown:Z,onClear:N,error:j,clearable:Boolean(c&&!D&&!s&&!a)},B={disabled:a,readOnly:s};return(0,WW.Z)({},e.forwardedProps,z,B,E)})({forwardedProps:n,internalProps:r,valueManager:Yee,fieldValueManager:Xee,validator:rre,valueType:"date-time"})};var bre=n(76992);const xre=["clearable","onClear","InputProps","sx","slots","slotProps"],wre=["ownerState"];var Sre=n(68808),Cre=n(32931);function kre(e){return(0,Sc.ZP)("MuiPickersTextField",e)}(0,wc.Z)("MuiPickersTextField",["root","focused","disabled","error","required"]);var _re=n(36683);function Mre(e){return(0,Sc.ZP)("MuiPickersInputBase",e)}const Tre=(0,wc.Z)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Pre(e){return(0,Sc.ZP)("MuiPickersOutlinedInput",e)}const Rre=(0,WW.Z)({},Tre,(0,wc.Z)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Ire=["children","className","label","notched","shrink"],Dre=(0,Y.ZP)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Ore=(0,Y.ZP)("span")((({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"}))),Are=(0,Y.ZP)("legend")((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Ere(e){const{className:t,label:n}=e,r=(0,GW.Z)(e,Ire),i=null!=n&&""!==n,a=(0,WW.Z)({},e,{withLabel:i});return(0,o.jsx)(Dre,(0,WW.Z)({"aria-hidden":!0,className:t},r,{ownerState:a,children:(0,o.jsx)(Are,{ownerState:a,children:i?(0,o.jsx)(Ore,{children:n}):(0,o.jsx)(Ore,{className:"notranslate",children:"​"})})}))}var Lre=n(3150);const Zre={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Fre(e){return(0,Sc.ZP)("MuiPickersSectionList",e)}const jre=(0,wc.Z)("MuiPickersSectionList",["root","section","sectionContent"]),Nre=["slots","slotProps","elements","sectionListRef"],zre=(0,Y.ZP)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Bre=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Vre=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),$re=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function Hre(e){const{slots:t,slotProps:n,element:r,classes:i}=e,a=t?.section??Bre,s=(0,L9.Z)({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),l=t?.sectionContent??$re,u=(0,L9.Z)({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),c=t?.sectionSeparator??Vre,d=(0,L9.Z)({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=(0,L9.Z)({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,o.jsxs)(a,(0,WW.Z)({},s,{children:[(0,o.jsx)(c,(0,WW.Z)({},d)),(0,o.jsx)(l,(0,WW.Z)({},u)),(0,o.jsx)(c,(0,WW.Z)({},h))]}))}const Wre=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:a,sectionListRef:s}=n,l=(0,GW.Z)(n,Nre),u=(e=>{const{classes:t}=e;return(0,Ul.Z)({root:["root"],section:["section"],sectionContent:["sectionContent"]},Fre,t)})(n),c=d.useRef(null),h=(0,dte.Z)(t,c),p=e=>{if(!c.current)throw new Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return c.current};d.useImperativeHandle(s,(()=>({getRoot:()=>p("getRoot"),getSectionContainer:e=>p("getSectionContainer").querySelector(`.${jre.section}[data-sectionindex="${e}"]`),getSectionContent:e=>p("getSectionContent").querySelector(`.${jre.section}[data-sectionindex="${e}"] .${jre.sectionContent}`),getSectionIndexFromDOMElement(e){const t=p("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return e.classList.contains(jre.section)?n=e:e.classList.contains(jre.sectionContent)&&(n=e.parentElement),null==n?null:Number(n.dataset.sectionindex)}})));const f=r?.root??zre,m=(0,L9.Z)({elementType:f,externalSlotProps:i?.root,externalForwardedProps:l,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return(0,o.jsx)(f,(0,WW.Z)({},m,{children:m.contentEditable?a.map((({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`)).join(""):(0,o.jsx)(d.Fragment,{children:a.map(((e,t)=>(0,o.jsx)(Hre,{slots:r,slotProps:i,element:e,classes:u},t)))})}))})),Gre=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Ure=(0,Y.ZP)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{return(0,WW.Z)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:(t=.15/16,Math.round(1e5*t)/1e5)+"em",variants:[{props:{fullWidth:!0},style:{width:"100%"}}]});var t})),qre=(0,Y.ZP)(zre,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})((({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]}))),Kre=(0,Y.ZP)(Bre,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})((({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"}))),Yre=(0,Y.ZP)($re,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})((({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"}))),Xre=(0,Y.ZP)(Vre,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})((()=>({whiteSpace:"pre",letterSpacing:"inherit"}))),Qre=(0,Y.ZP)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,WW.Z)({},Zre)),Jre=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:u,startAdornment:c,renderSuffix:h,slots:p,slotProps:f,contentEditable:m,tabIndex:g,onInput:v,onPaste:y,onKeyDown:b,name:x,readOnly:w,inputProps:S,inputRef:C,sectionListRef:k}=n,_=(0,GW.Z)(n,Gre),M=d.useRef(null),T=(0,dte.Z)(t,M),P=(0,dte.Z)(S?.ref,C),R=(0,bp.V)(),I=(0,_re.Z)();if(!I)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");d.useEffect((()=>{I&&I.setAdornedStart(Boolean(c))}),[I,c]),d.useEffect((()=>{I&&(i?I.onEmpty():I.onFilled())}),[I,i]);const D=(0,WW.Z)({},n,I,{isRtl:R}),O=(e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${(0,Lre.Z)(s)}`,"small"===l&&"inputSizeSmall",Boolean(c)&&"adornedStart",Boolean(u)&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,Ul.Z)(d,Mre,o)})(D),A=p?.root||Ure,E=(0,L9.Z)({elementType:A,externalSlotProps:f?.root,externalForwardedProps:_,additionalProps:{"aria-invalid":I.error,ref:T},className:O.root,ownerState:D}),L=p?.input||qre;return(0,o.jsxs)(A,(0,WW.Z)({},E,{children:[c,(0,o.jsx)(Wre,{sectionListRef:k,elements:r,contentEditable:m,tabIndex:g,className:O.sectionsContainer,onFocus:e=>{I.disabled?e.stopPropagation():I.onFocus?.(e)},onBlur:I.onBlur,onInput:v,onPaste:y,onKeyDown:b,slots:{root:L,section:Kre,sectionContent:Yre,sectionSeparator:Xre},slotProps:{root:{ownerState:D},sectionContent:{className:Tre.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?Tre.sectionBefore:Tre.sectionAfter})}}),u,h?h((0,WW.Z)({},I)):null,(0,o.jsx)(Qre,(0,WW.Z)({name:x,className:O.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:I.required,disabled:I.disabled},S,{ref:P}))]}))})),eoe=["label","autoFocus","ownerState","notched"],toe=(0,Y.ZP)(Ure,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rre.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rre.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Rre.focused} .${Rre.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Rre.disabled}`]:{[`& .${Rre.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Rre.error} .${Rre.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter((t=>(e.vars??e).palette[t]?.main??!1)).map((t=>({props:{color:t},style:{[`&.${Rre.focused}:not(.${Rre.error}) .${Rre.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})))}})),noe=(0,Y.ZP)(qre,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),roe=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:a}=n,s=(0,GW.Z)(n,eoe),l=(0,_re.Z)(),u=(0,WW.Z)({},n,i,l,{color:l?.color||"primary"}),c=(e=>{const{classes:t}=e,n=(0,Ul.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Pre,t);return(0,WW.Z)({},t,n)})(u);return(0,o.jsx)(Jre,(0,WW.Z)({slots:{root:toe,input:noe},renderSuffix:e=>(0,o.jsx)(Ere,{shrink:Boolean(a||e.adornedStart||e.focused||e.filled),notched:Boolean(a||e.adornedStart||e.focused||e.filled),className:c.notchedOutline,label:null!=r&&""!==r&&l?.required?(0,o.jsxs)(d.Fragment,{children:[r," ","*"]}):r,ownerState:u})},s,{label:r,classes:c,ref:t}))}));roe.muiName="Input";var ooe=n(35315);function ioe(e){return(0,Sc.ZP)("MuiPickersFilledInput",e)}const aoe=(0,WW.Z)({},Tre,(0,wc.Z)("MuiPickersFilledInput",["root","underline","input"])),soe=["label","autoFocus","disableUnderline","ownerState"],loe=(0,Y.ZP)(Ure,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,ooe.x9)(e)&&"disableUnderline"!==e})((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${aoe.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${aoe.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter((t=>(e.vars??e).palette[t].main)).map((t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}}))),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${aoe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${aoe.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${aoe.disabled}, .${aoe.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${aoe.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}})),uoe=(0,Y.ZP)(qre,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),coe=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,s=(0,GW.Z)(n,soe),l=(0,_re.Z)(),u=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,Ul.Z)(r,ioe,t);return(0,WW.Z)({},t,o)})((0,WW.Z)({},n,a,l,{color:l?.color||"primary"}));return(0,o.jsx)(Jre,(0,WW.Z)({slots:{root:loe,input:uoe},slotProps:{root:{disableUnderline:i}}},s,{label:r,classes:u,ref:t}))}));function doe(e){return(0,Sc.ZP)("MuiPickersFilledInput",e)}coe.muiName="Input";const hoe=(0,WW.Z)({},Tre,(0,wc.Z)("MuiPickersInput",["root","input"])),poe=["label","autoFocus","disableUnderline","ownerState"],foe=(0,Y.ZP)(Ure,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter((t=>(e.vars??e).palette[t].main)).map((t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hoe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hoe.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,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(.${hoe.disabled}, .${hoe.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${hoe.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}})),moe=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,s=(0,GW.Z)(n,poe),l=(0,_re.Z)(),u=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,Ul.Z)(r,doe,t);return(0,WW.Z)({},t,o)})((0,WW.Z)({},n,a,l,{disableUnderline:i,color:l?.color||"primary"}));return(0,o.jsx)(Jre,(0,WW.Z)({slots:{root:foe}},s,{label:r,classes:u,ref:t}))}));moe.muiName="Input";const goe=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],voe={standard:moe,filled:coe,outlined:roe},yoe=(0,Y.ZP)(Bd.Z,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),boe=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:u=!1,variant:c="outlined",required:h=!1,InputProps:p,inputProps:f,inputRef:m,sectionListRef:g,elements:v,areAllSectionsEmpty:y,onClick:b,onKeyDown:x,onKeyUp:w,onPaste:S,onInput:C,endAdornment:k,startAdornment:_,tabIndex:M,contentEditable:T,focused:P,value:R,onChange:I,fullWidth:D,id:O,name:A,helperText:E,FormHelperTextProps:L,label:Z,InputLabelProps:F}=n,j=(0,GW.Z)(n,goe),N=d.useRef(null),z=(0,dte.Z)(t,N),B=(0,yd.Z)(O),V=E&&B?`${B}-helper-text`:void 0,$=Z&&B?`${B}-label`:void 0,H=(0,WW.Z)({},n,{color:s,disabled:l,error:u,focused:P,required:h,variant:c}),W=(e=>{const{focused:t,disabled:n,classes:r,required:o}=e,i={root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]};return(0,Ul.Z)(i,kre,r)})(H),G=voe[c];return(0,o.jsxs)(yoe,(0,WW.Z)({className:(0,Gl.Z)(W.root,a),ref:z,focused:P,onFocus:r,onBlur:i,disabled:l,variant:c,error:u,color:s,fullWidth:D,required:h,ownerState:H},j,{children:[(0,o.jsx)(Sre.Z,(0,WW.Z)({htmlFor:B,id:$},F,{children:Z})),(0,o.jsx)(G,(0,WW.Z)({elements:v,areAllSectionsEmpty:y,onClick:b,onKeyDown:x,onKeyUp:w,onInput:C,onPaste:S,endAdornment:k,startAdornment:_,tabIndex:M,contentEditable:T,value:R,onChange:I,id:B,fullWidth:D,inputProps:f,inputRef:m,sectionListRef:g,label:Z,name:A,role:"group","aria-labelledby":$,"aria-describedby":V,"aria-live":V?"polite":void 0},p)),E&&(0,o.jsx)(Cre.Z,(0,WW.Z)({id:V},L,{children:E}))]}))})),xoe=["enableAccessibleFieldDOMStructure"],woe=["InputProps","readOnly"],Soe=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],Coe=["slots","slotProps","InputProps","inputProps"],koe=d.forwardRef((function(e,t){const n=(0,w7.Z)({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:a,inputProps:s}=n,l=(0,GW.Z)(n,Coe),h=n,p=r?.textField??(e.enableAccessibleFieldDOMStructure?boe:c.Z),f=(0,L9.Z)({elementType:p,externalSlotProps:i?.textField,externalForwardedProps:l,ownerState:h,additionalProps:{ref:t}});f.inputProps=(0,WW.Z)({},s,f.inputProps),f.InputProps=(0,WW.Z)({},a,f.InputProps);const m=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,GW.Z)(e,xoe);if(t){const{InputProps:e,readOnly:t}=n,r=(0,GW.Z)(n,woe);return(0,WW.Z)({},r,{InputProps:(0,WW.Z)({},e??{},{readOnly:t})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,GW.Z)(n,Soe);return(0,WW.Z)({},c,{InputProps:(0,WW.Z)({},s??{},{readOnly:a}),inputProps:(0,WW.Z)({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})})(yre(f)),g=(e=>{const t=Q7(),{clearable:n,onClear:r,InputProps:i,sx:a,slots:s,slotProps:l}=e,c=(0,GW.Z)(e,xre),h=s?.clearButton??u.Z,p=(0,L9.Z)({elementType:h,externalSlotProps:l?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),f=(0,GW.Z)(p,wre),m=s?.clearIcon??X7,g=(0,L9.Z)({elementType:m,externalSlotProps:l?.clearIcon,ownerState:{}});return(0,WW.Z)({},c,{InputProps:(0,WW.Z)({},i,{endAdornment:(0,o.jsxs)(d.Fragment,{children:[n&&(0,o.jsx)(bre.Z,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,o.jsx)(h,(0,WW.Z)({},f,{onClick:r,children:(0,o.jsx)(m,(0,WW.Z)({fontSize:"small"},g))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})})((0,WW.Z)({},m,{slots:r,slotProps:i}));return(0,o.jsx)(p,(0,WW.Z)({},g))}));var _oe=n(29435);function Moe(e,t,n){return(0,lr.L)(n?.in||e,+(0,nr.Q)(e)+t)}function Toe(e,t,n){return Moe(e,1e3*t,n)}function Poe(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setTime(r.getTime()+t*ir.yJ),r}function Roe(e,t,n){return Moe(e,t*ir.vh,n)}function Ioe(e,t,n){return(0,_oe.E)(e,7*t,n)}var Doe=n(39489);function Ooe(e,t,n){return(0,Doe.z)(e,12*t,n)}function Aoe(e,t){const n=(0,nr.Q)(e,t?.in);return n.setHours(23,59,59,999),n}function Eoe(e,t){const n=(0,Bn.j)(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=(0,nr.Q)(e,t?.in),i=o.getDay(),a=6+(i+(0,nr.Q)(t)}function Woe(e,t){return+(0,nr.Q)(e)<+(0,nr.Q)(t)}function Goe(e,t){return+(0,nr.Q)(e)==+(0,nr.Q)(t)}var Uoe=n(5643),qoe=n(23033);function Koe(e,t,n){const[r,o]=(0,Uoe.d)(n?.in,e,t);return+(0,qoe.b)(r)==+(0,qoe.b)(o)}function Yoe(e,t,n){const[r,o]=(0,Uoe.d)(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Xoe(e,t,n){const[r,o]=(0,Uoe.d)(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Qoe(e,t){const n=(0,nr.Q)(e,t?.in);return n.setMinutes(0,0,0),n}function Joe(e,t,n){const[r,o]=(0,Uoe.d)(n?.in,e,t);return+Qoe(r)==+Qoe(o)}function eie(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):(0,lr.L)(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}class tie{subPriority=0;validate(e,t){return!0}}class nie extends tie{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class rie extends tie{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>(0,lr.L)(t,e))}set(e,t){return t.timestampIsSet?e:(0,lr.L)(e,eie(e,this.context))}}class oie{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new nie(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const iie=/^(1[0-2]|0?\d)/,aie=/^(3[0-1]|[0-2]?\d)/,sie=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,lie=/^(5[0-3]|[0-4]?\d)/,uie=/^(2[0-3]|[0-1]?\d)/,cie=/^(2[0-4]|[0-1]?\d)/,die=/^(1[0-1]|0?\d)/,hie=/^(1[0-2]|0?\d)/,pie=/^[0-5]?\d/,fie=/^[0-5]?\d/,mie=/^\d/,gie=/^\d{1,2}/,vie=/^\d{1,3}/,yie=/^\d{1,4}/,bie=/^-?\d+/,xie=/^-?\d/,wie=/^-?\d{1,2}/,Sie=/^-?\d{1,3}/,Cie=/^-?\d{1,4}/,kie=/^([+-])(\d{2})(\d{2})?|Z/,_ie=/^([+-])(\d{2})(\d{2})|Z/,Mie=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Tie=/^([+-])(\d{2}):(\d{2})|Z/,Pie=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Rie(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Iie(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Die(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*ir.vh+i*ir.yJ+a*ir.qk),rest:t.slice(n[0].length)}}function Oie(e){return Iie(bie,e)}function Aie(e,t){switch(e){case 1:return Iie(mie,t);case 2:return Iie(gie,t);case 3:return Iie(vie,t);case 4:return Iie(yie,t);default:return Iie(new RegExp("^\\d{1,"+e+"}"),t)}}function Eie(e,t){switch(e){case 1:return Iie(xie,t);case 2:return Iie(wie,t);case 3:return Iie(Sie,t);case 4:return Iie(Cie,t);default:return Iie(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Lie(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Zie(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function Fie(e){return e%400==0||e%4==0&&e%100!=0}function jie(e,t,n){const r=(0,nr.Q)(e,n?.in),o=fr(r,n)-t;return r.setDate(r.getDate()-7*o),(0,nr.Q)(r,n?.in)}function Nie(e,t,n){const r=(0,nr.Q)(e,n?.in),o=dr(r,n)-t;return r.setDate(r.getDate()-7*o),r}const zie=[31,28,31,30,31,30,31,31,30,31,30,31],Bie=[31,29,31,30,31,30,31,31,30,31,30,31];function Vie(e,t,n){const r=(0,Bn.j)(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=(0,nr.Q)(e,n?.in),a=i.getDay(),s=7-o,l=t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7;return(0,_oe.E)(i,l,n)}function $ie(e,t){const n=(0,nr.Q)(e,t?.in).getDay();return 0===n?7:n}function Hie(e,t,n){const r=(0,nr.Q)(e,n?.in),o=t-$ie(r,n);return(0,_oe.E)(r,o,n)}var Wie=n(67337);const Gie={G:new class extends oie{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends oie{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Rie(Aie(4,e),r);case"yo":return Rie(n.ordinalNumber(e,{unit:"year"}),r);default:return Rie(Aie(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Zie(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends oie{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Rie(Aie(4,e),r);case"Yo":return Rie(n.ordinalNumber(e,{unit:"year"}),r);default:return Rie(Aie(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=hr(e,r);if(n.isTwoDigitYear){const t=Zie(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,ar.z)(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,ar.z)(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends oie{priority=130;parse(e,t){return Eie("R"===t?4:t.length,e)}set(e,t,n){const r=(0,lr.L)(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sr(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends oie{priority=130;parse(e,t){return Eie("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends oie{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Aie(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends oie{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Aie(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends oie{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return Rie(Iie(iie,e),r);case"MM":return Rie(Aie(2,e),r);case"Mo":return Rie(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends oie{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return Rie(Iie(iie,e),r);case"LL":return Rie(Aie(2,e),r);case"Lo":return Rie(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends oie{priority=100;parse(e,t,n){switch(t){case"w":return Iie(lie,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Aie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return(0,ar.z)(jie(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends oie{priority=100;parse(e,t,n){switch(t){case"I":return Iie(lie,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Aie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return sr(Nie(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends oie{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Iie(aie,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Aie(t.length,e)}}validate(e,t){const n=Fie(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Bie[r]:t>=1&&t<=zie[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends oie{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Iie(sie,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Aie(t.length,e)}}validate(e,t){return Fie(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends oie{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Vie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends oie{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Rie(Aie(t.length,e),o);case"eo":return Rie(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Vie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends oie{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Rie(Aie(t.length,e),o);case"co":return Rie(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Vie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends oie{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Aie(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Rie(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Rie(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Rie(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Rie(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=Hie(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends oie{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Lie(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends oie{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Lie(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends oie{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Lie(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends oie{priority=70;parse(e,t,n){switch(t){case"h":return Iie(hie,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Aie(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends oie{priority=70;parse(e,t,n){switch(t){case"H":return Iie(uie,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Aie(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends oie{priority=70;parse(e,t,n){switch(t){case"K":return Iie(die,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Aie(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends oie{priority=70;parse(e,t,n){switch(t){case"k":return Iie(cie,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Aie(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends oie{priority=60;parse(e,t,n){switch(t){case"m":return Iie(pie,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Aie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends oie{priority=50;parse(e,t,n){switch(t){case"s":return Iie(fie,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Aie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends oie{priority=30;parse(e,t){return Rie(Aie(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends oie{priority=10;parse(e,t){switch(t){case"X":return Die(kie,e);case"XX":return Die(_ie,e);case"XXXX":return Die(Mie,e);case"XXXXX":return Die(Pie,e);default:return Die(Tie,e)}}set(e,t,n){return t.timestampIsSet?e:(0,lr.L)(e,e.getTime()-(0,Wie.D)(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends oie{priority=10;parse(e,t){switch(t){case"x":return Die(kie,e);case"xx":return Die(_ie,e);case"xxxx":return Die(Mie,e);case"xxxxx":return Die(Pie,e);default:return Die(Tie,e)}}set(e,t,n){return t.timestampIsSet?e:(0,lr.L)(e,e.getTime()-(0,Wie.D)(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends oie{priority=40;parse(e){return Oie(e)}set(e,t,n){return[(0,lr.L)(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends oie{priority=20;parse(e){return Oie(e)}set(e,t,n){return[(0,lr.L)(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Uie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kie=/^'([^]*?)'?$/,Yie=/''/g,Xie=/\S/,Qie=/[a-zA-Z]/;function Jie(e,t,n,r){const o=()=>(0,lr.L)(r?.in||n,NaN),i=Wr(),a=r?.locale??i.locale??zn,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():(0,nr.Q)(n,r?.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:a},c=[new rie(r?.in,n)],d=t.match(qie).map((e=>{const t=e[0];if(t in Rr){return(0,Rr[t])(e,a.formatLong)}return e})).join("").match(Uie),h=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&Er(n)&&Lr(n,t,e),!r?.useAdditionalDayOfYearTokens&&Ar(n)&&Lr(n,t,e);const i=n[0],s=Gie[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===i));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:i,fullToken:n});const r=s.run(e,n,a.match,u);if(!r)return o();c.push(r.setter),e=r.rest}else{if(i.match(Qie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===n?n="'":"'"===i&&(n=n.match(Kie)[1].replace(Yie,"'")),0!==e.indexOf(n))return o();e=e.slice(n.length)}}if(e.length>0&&Xie.test(e))return o();const p=c.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>c.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let f=(0,nr.Q)(n,r?.in);if(isNaN(+f))return o();const m={};for(const e of p){if(!e.validate(f,u))return o();const t=e.set(f,m,u);Array.isArray(t)?(f=t[0],Object.assign(m,t[1])):f=t}return f}function eae(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setDate(t),r}function tae(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setHours(t),r}function nae(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setMinutes(t),r}function rae(e,t,n){const r=(0,nr.Q)(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=(0,lr.L)(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Foe(a);return r.setMonth(t,Math.min(i,s)),r}function oae(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setSeconds(t),r}function iae(e,t,n){const r=(0,nr.Q)(e,n?.in);return r.setMilliseconds(t),r}function aae(e,t,n){const r=(0,nr.Q)(e,n?.in);return isNaN(+r)?(0,lr.L)(n?.in||e,NaN):(r.setFullYear(t),r)}function sae(e,t){const n=(0,nr.Q)(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function lae(e,t){const n=(0,nr.Q)(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function uae(e,t,n){const r=+(0,nr.Q)(e,n?.in),[o,i]=[+(0,nr.Q)(t.start,n?.in),+(0,nr.Q)(t.end,n?.in)].sort(((e,t)=>e-t));return r>=o&&r<=i}const cae={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},dae={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class hae{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=cae,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,this.longFormatters[t])(e,this.locale.formatLong)}return e})).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:o}=e;this.locale=t,this.formats=(0,WW.Z)({},dae,n),this.longFormatters=r,this.lib=o||"date-fns"}}class pae extends hae{constructor({locale:e,formats:t}={}){super({locale:e??zn,formats:t,longFormatters:Rr}),this.parse=(e,t)=>""===e?null:Jie(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&Fr(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>$r(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&Goe(e,t),this.isSameYear=(e,t)=>Yoe(e,t),this.isSameMonth=(e,t)=>Xoe(e,t),this.isSameDay=(e,t)=>Koe(e,t),this.isSameHour=(e,t)=>Joe(e,t),this.isAfter=(e,t)=>Hoe(e,t),this.isAfterYear=(e,t)=>Hoe(e,Loe(t)),this.isAfterDay=(e,t)=>Hoe(e,Aoe(t)),this.isBefore=(e,t)=>Woe(e,t),this.isBeforeYear=(e,t)=>Woe(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>Woe(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>uae(e,{start:t,end:n}),this.startOfYear=e=>rr(e),this.startOfMonth=e=>sae(e),this.startOfWeek=e=>(0,ar.z)(e,{locale:this.locale}),this.startOfDay=e=>(0,qoe.b)(e),this.endOfYear=e=>Loe(e),this.endOfMonth=e=>lae(e),this.endOfWeek=e=>Eoe(e,{locale:this.locale}),this.endOfDay=e=>Aoe(e),this.addYears=(e,t)=>Ooe(e,t),this.addMonths=(e,t)=>(0,Doe.z)(e,t),this.addWeeks=(e,t)=>Ioe(e,t),this.addDays=(e,t)=>(0,_oe.E)(e,t),this.addHours=(e,t)=>Roe(e,t),this.addMinutes=(e,t)=>Poe(e,t),this.addSeconds=(e,t)=>Toe(e,t),this.getYear=e=>$oe(e),this.getMonth=e=>zoe(e),this.getDate=e=>Zoe(e),this.getHours=e=>joe(e),this.getMinutes=e=>Noe(e),this.getSeconds=e=>Boe(e),this.getMilliseconds=e=>Voe(e),this.setYear=(e,t)=>aae(e,t),this.setMonth=(e,t)=>rae(e,t),this.setDate=(e,t)=>eae(e,t),this.setHours=(e,t)=>tae(e,t),this.setMinutes=(e,t)=>nae(e,t),this.setSeconds=(e,t)=>oae(e,t),this.setMilliseconds=(e,t)=>iae(e,t),this.getDaysInMonth=e=>Foe(e),this.getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const i=[];for(;this.isBefore(o,n);){const e=Math.floor(r/7);i[e]=i[e]||[],i[e].push(o),o=this.addDays(o,1),r+=1}return i},this.getWeekNumber=e=>fr(e,{locale:this.locale}),this.getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),o=[];let i=n;for(;this.isBefore(i,r);)o.push(i),i=this.addYears(i,1);return o}}}const fae="yyyy-MM-dd HH:mm:ss";function mae(e,t){return e?In(e)?e.pastDuration:function(e,t,n){return`${Po(e.start,t,n)} - ${Po(e.end,t,n)}`}(e,fae,t):"Custom Time Range"}const gae=({initialTimeRange:e,onChange:t,onCancel:n})=>{const{formatWithUserTimeZone:r}=No(),[i,s]=(0,d.useState)(e),[u,c]=(0,d.useState)({start:r(e.start,fae),end:r(e.end,fae)}),[h,p]=(0,d.useState)(!0),f=(e,t)=>{const n="string"==typeof e,o=n?e:r(e,fae);c((e=>({...e,[t]:o}))),n||s((n=>({...n,[t]:e})))},m=e=>{f(e,"start")},g=e=>{f(e,"end")},v=()=>{const e={start:new Date(u.start),end:new Date(u.end)};var t,n;if(n=e.end,Fr(t=e.start)&&Fr(n)?!!Woe(t,n)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return s(e),e};return(0,o.jsx)(k7,{dateAdapter:pae,children:(0,o.jsxs)(l.Z,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[h&&(0,o.jsxs)($o.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(vc.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,o.jsx)(ore,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.start,onChange:e=>{null!==e&&m(e)},onAccept:()=>{p(!1)}})]}),!h&&(0,o.jsxs)($o.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(vc.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,o.jsx)(ore,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.end,minDateTime:i.start,onChange:e=>{null!==e&&g(e)},onAccept:e=>{null!==e&&(p(!0),g(e))}})]}),(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,o.jsx)(zW.ErrorBoundary,{FallbackComponent:NW,children:(0,o.jsx)(koe,{label:"Start Time",value:new Date(u.start),onChange:e=>{e&&m(e)},onBlur:()=>v(),format:fae})}),(0,o.jsx)(zW.ErrorBoundary,{FallbackComponent:NW,children:(0,o.jsx)(koe,{label:"End Time",value:new Date(u.end),onChange:e=>{e&&g(e)},onBlur:()=>v(),format:fae})})]}),(0,o.jsxs)(l.Z,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,o.jsx)(a.Z,{variant:"contained",onClick:()=>(()=>{const e=v();e&&t(e)})(),fullWidth:!0,children:"Apply"}),(0,o.jsx)(a.Z,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function vae({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:i=!0}){const{timeZone:a}=No(),s=(0,d.useRef)(),[l,u]=(0,d.useState)(!1),c=(0,d.useMemo)((()=>In(e)?function(e){const t=e.end??new Date;return{start:(0,Rn.l)(t,On(e.pastDuration)),end:t}}(e):e),[e]),h=(0,d.useMemo)((()=>function(e,t){return{value:e,display:mae(e,t)}}(In(e)?void 0:e,a)),[e,a]),[p,f]=(0,d.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K.ZP,{anchorEl:s.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:l,onClose:()=>u(!1),sx:e=>({padding:e.spacing(2)}),children:(0,o.jsx)(gae,{initialTimeRange:c,onChange:e=>{n(e),u(!1),f(!1)},onCancel:()=>u(!1)})}),(0,o.jsx)($o.Z,{ref:s,children:(0,o.jsxs)(b7.Z,{open:p,value:mae(e,a),onClick:()=>f(!p),IconComponent:x7.default,inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[t.map(((e,t)=>(0,o.jsx)(pp.Z,{value:mae(e.value,a),onClick:()=>{n(e.value)},children:e.display},t))),i&&(0,o.jsx)(pp.Z,{value:mae(h.value,a),onClick:()=>u(!0),children:h.display})]})})]})}function yae(e){const{markerColor:t,sx:n}=e;return(0,o.jsx)($o.Z,{sx:Jn({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function bae(e){const{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,o.jsxs)(l.Z,{spacing:.5,children:[(0,o.jsxs)($o.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,o.jsx)(yae,{markerColor:n,sx:{marginTop:.25}}),(0,o.jsxs)($o.Z,{component:"span",children:[r,(0,o.jsx)($o.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,o.jsx)($W.Z,{sx:e=>({borderColor:e.palette.grey[500]})}),(0,o.jsx)($o.Z,{sx:e=>({color:e.palette.common.white}),children:i.map((e=>{if(e){const[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,o.jsxs)($o.Z,{sx:{display:"flex",gap:"4px"},children:[(0,o.jsx)(vc.Z,{sx:{fontSize:"11px"},children:r}),(0,o.jsx)(vc.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}}))})]})}const xae=375,wae=650,Sae=650,Cae=wae-150,kae=.75,_ae=8,Mae=750,Tae="nearby series showing in tooltip",Pae="emphasized series showing as bold in tooltip",Rae="#2E313E",Iae=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),Dae={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},Oae=[],Aae=()=>{const[e,t]=(0,d.useState)(null);return(0,d.useEffect)((()=>{const e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}}),[]),e},Eae={wrapLabels:!0,enablePinning:!0},Lae="Click chart to pin",Zae="Click chart to unpin";function Fae(e){const{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:a=!1,wrapLabels:s=!0}=e,l=t.split("{"),u=(l[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&u.length>1){const e=l[0]?`${l[0]}:`:"value:";return(0,o.jsx)(bae,{formattedY:n,metricName:e,metricLabels:u,markerColor:r})}const c=t.replace(/[,]/g,", ");return(0,o.jsxs)($o.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,o.jsxs)($o.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,o.jsx)(yae,{markerColor:r,sx:{marginTop:.5}}),(0,o.jsx)($o.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:Cae,overflow:"hidden",color:e.palette.common.white,fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:s?"normal":"nowrap"}),"aria-label":a?Pae:Tae,children:c})]}),(0,o.jsx)($o.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}var jae=n(7444),Nae=n(75276);function zae(e,t,n,r,o){if(null===e)return;if(null!==t&&(e=t),void 0===e.plotCanvas.x)return;let i=e.page.x+32,a=e.page.y+16;if(o){const e=o.getBoundingClientRect();i=i-e.left+o.scrollLeft,a=a-e.top+o.scrollTop;const t=e.top+o.scrollHeight;a+n>t&&(a=Math.max(t-n-16,_ae/2))}else a+n>window.innerHeight+window.scrollY&&(a=Math.max(window.innerHeight+window.scrollY-n-16,_ae/2));return i+r>window.innerWidth&&(i=e.page.x-r-32),i<32&&(i=32),a<_ae/2&&(a=_ae/2),`translate3d(${i}px, ${a}px, 0)`}function Bae(e,t,n){return{minWidth:xae,maxWidth:wae,maxHeight:(n?n-_ae:void 0)??Sae,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??Rae,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}const Vae=5.5,$ae=30,Hae=5;function Wae(e,t,n,r,o,i){const a=[],s=n[0]??null,l=n[1]??null;if(null===s||null===l)return a;if(void 0===o.dispatchAction)return a;if(!Array.isArray(e))return a;const u=[],c=[],d=[],h=[],p=[],f=e.length,m=new Map,g=e[0]?.values,v=Xn(g,s);if(null===v)return Oae;for(let n=0;n0?e[n]:null;if(!g)break;const y=g.values;if(void 0===y||!Array.isArray(y))break;const b=s,x=b.name?b.name.toString():"",w=b.color??"#000";if(Array.isArray(e))for(let e=0;e=g-r){const t=f>Hae?2:5,r=Kae({valueToCheck:l,baseValue:g,percentage:Math.max(t,100/f)});if(r){c.push(n);const t=m.get(g)??0;m.set(g,t+1),t>0&&p.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:g}),h.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:g})}else d.push(n),o.dispatchAction({type:"downplay",seriesIndex:n});const y=xn(g,i);a.push({seriesIdx:n,datumIdx:e,seriesName:x,date:v,x:s,y:g,formattedY:y,markerColor:w.toString(),isClosestToCursor:r}),u.push(n)}}}return Kn(o,u,c,d,h,p),a}function Gae(e,t,n,r,o){const i=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return i;const l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t=Mn)break;const p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let m=0;m=v-n){const e=d>Hae?2:5,n=Kae({valueToCheck:s,baseValue:v,percentage:Math.max(e,100/d)});n?u.push(t):(c.push(t),void 0!==r?.dispatchAction&&r.dispatchAction({type:"downplay",seriesIndex:t}));const a=g>99999999999?g:1e3*g,h=xn(v,o);i.push({seriesIdx:t,datumIdx:m,seriesName:p,date:a,x:g,y:v,formattedY:h,markerColor:f.toString(),isClosestToCursor:n}),l.push(t)}}}return void 0!==r?.dispatchAction&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),i}function Uae({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:o,format:i,showAllSeries:a=!1}){if(void 0===o||null===e)return Oae;let s=!1;if(null!==e.target){const t=e.target.parentElement;if(null!==t){const e=t.parentElement;if(null!==e){o.getDom()===e&&(s=!0)}}}if(null!==t&&(e=t,s=!0),!1===s||null===n||void 0===o._model)return Oae;if(void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return Oae;const l=qn(e.plotCanvas.x,e.plotCanvas.y,o);if(null!==l){return Wae(n,r,l,Yae({yInterval:o._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.length,showAllSeries:a}),o,i)}return Oae}function qae({mousePos:e,pinnedPos:t,chartData:n,chart:r,format:o,showAllSeries:i=!1}){if(void 0===r||null===e)return[];let a=!1;if(null!==e.target){const t=e.target.parentElement;if(null!==t){const e=t.parentElement;if(null!==e){r.getDom()===e&&(a=!0)}}}if(null!==t&&(e=t,a=!0),!1===a)return[];if(void 0===r._model)return[];const s=Yae({yInterval:r._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.timeSeries.length,showAllSeries:i}),l=[e.plotCanvas.x??0,e.plotCanvas.y??0];if(r.containPixel("grid",l)){const e=r.convertFromPixel("grid",l);if(void 0!==e[0]&&void 0!==e[1])return Gae(n,e,s,r,o)}return[]}function Kae({valueToCheck:e,baseValue:t,percentage:n}){const r=n/100*t;return e>=t-r&&e<=t+r}function Yae({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;const r=.3*e;if(t>Hae){const n=e*$ae/t;return Math.max(r,n)}return Math.max(r,e*Vae)}var Xae=n(87895),Qae=n(1889),Jae=n(75186);const ese=(0,d.memo)((function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:a,onUnpinClick:s}){const u=e[0]?.date??null;if(null===u)return null;const c=i&&t>5,d=n?Zae:Lae;return(0,o.jsxs)($o.Z,{sx:e=>({width:"100%",maxWidth:wae,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??Rae,position:"sticky",top:0,left:0}),children:[(0,o.jsxs)($o.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{const{formattedTime:t,formattedDate:n}=Io(e);return(0,o.jsxs)($o.Z,{children:[(0,o.jsx)(vc.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,o.jsx)(vc.Z,{variant:"caption",children:(0,o.jsx)("strong",{children:t})})]})})(u),(0,o.jsxs)(l.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[c&&(0,o.jsxs)(l.Z,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,o.jsx)(vc.Z,{sx:{fontSize:11},children:"Show All"}),(0,o.jsx)(Xae.Z,{checked:r,size:"small",onChange:(e,t)=>{if(void 0!==a)return a(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),i&&(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)(vc.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:d}),n?(0,o.jsx)(Qae.default,{onClick:()=>{void 0!==s&&s()},sx:{fontSize:16,cursor:"pointer"}}):(0,o.jsx)(Jae.default,{sx:{fontSize:16}})]})]})]}),(0,o.jsx)($W.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey[500]})})]})}));function tse(e){const{series:t,wrapLabels:n}=e,r=(0,d.useMemo)((()=>null===t?null:t.sort(((e,t)=>e.y>t.y?-1:1))),[t]);return null===t||null===r?null:(0,o.jsx)($o.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map((({datumIdx:e,seriesIdx:t,seriesName:i,y:a,formattedY:s,markerColor:l,isClosestToCursor:u})=>{if(null===e||null===t)return null;const c=t.toString()+e.toString();return(0,o.jsx)(Fae,{seriesName:i,y:a,formattedY:s,markerColor:l,totalSeries:r.length,wrapLabels:n,emphasizeText:u},c)}))})}const nse=(0,d.memo)((function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:i=!0,wrapLabels:a,format:s,onUnpinClick:u,pinnedPos:c}){const[h,p]=(0,d.useState)(!1),f=(0,d.useRef)(),m=Aae(),{height:g,width:v,ref:y}=(0,Nae.default)(),b=null!==c&&i;if(null===m||null===m.target||null===n)return null;if(null===c&&"CANVAS"!==m.target.tagName)return null;const x=t.current,w=e?document.querySelector(e):void 0,S=w?w.getBoundingClientRect().height:void 0;f.current=zae(m,c,g??0,v??0,w);const C=Uae({mousePos:m,data:n,seriesMapping:r,pinnedPos:c,chart:x,format:s,showAllSeries:h});if(0===C.length)return null;const k=n.length;return(0,o.jsx)(jae.Z,{container:w,children:(0,o.jsx)($o.Z,{ref:y,sx:e=>Bae(e,c,S),style:{transform:f.current},children:(0,o.jsxs)(l.Z,{spacing:.5,children:[(0,o.jsx)(ese,{nearbySeries:C,totalSeries:k,enablePinning:i,isTooltipPinned:b,showAllSeries:h,onShowAllClick:e=>p(e),onUnpinClick:u}),(0,o.jsx)(tse,{series:C,wrapLabels:a})]})})})}));function rse(e,t){return(0,o.jsx)(ose,{ref:t,variant:"outlined",color:"secondary",...e})}const ose=(0,Y.ZP)(a.Z)((({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"}))),ise=(0,d.forwardRef)(rse),ase=Object.entries(bn).map((([e,t])=>({...t,id:e,group:t.group||"Decimal"}))).filter((e=>!e.disableSelectorOption)),sse=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function lse({value:e,onChange:t,disabled:n=!1}){const r=!!Cn(e).decimalPlaces;const i=function(e){return!!Cn(e).shortValues}(e),a=({decimalPlaces:n})=>{r&&t({...e,decimalPlaces:n})},s=bn[e?.unit||"decimal"];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Kd,{label:"Short values",control:(0,o.jsx)(Xae.Z,{checked:!!i&&Ht(e.shortValues),onChange:(n,r)=>{i&&t({...e,shortValues:r})},disabled:!i})}),(0,o.jsx)(Kd,{label:"Unit",control:(0,o.jsx)(eh,{value:{id:e?.unit||"decimal",...s},options:ase,groupBy:e=>e.group??"Decimal",onChange:(e,n)=>{t({unit:n?.id||"decimal"})},disableClearable:!0,disabled:n})}),(0,o.jsx)(Kd,{label:"Decimals",control:(0,o.jsx)(eh,{value:(l=e.decimalPlaces,sse.find((e=>e.decimalPlaces===l))),options:sse,getOptionLabel:e=>e.label,onChange:(e,t)=>a(t),disabled:!r,disableClearable:!0})})]});var l}function use({name:e,height:t}){return(0,o.jsx)($o.Z,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,o.jsx)(vc.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var cse=n(45178);const dse=Oo((0,cse.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),hse={chartsTheme:dse,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null};var pse=n(79602),fse=n(757);const mse={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`&\t.${pse.Z.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`&\t.${pse.Z.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`&\t.${pse.Z.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`&\t.${pse.Z.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`&\t.${pse.Z.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`&\t.${pse.Z.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`&\t.${pse.Z.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`&\t.${pse.Z.icon}`]:{color:e.palette.warning.main}},root:{["& ."+fse.Z.root]:{textDecoration:"underline"}}}},gse={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},vse={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},yse="#FFFFFF",bse="#000000",xse=e=>{const t=gse[800],n=gse[300];return"light"===e?{navigation:t,accent:n,primary:gse[800],secondary:gse[700],disabled:gse[300],link:vse[500],linkHover:vse[600]}:{navigation:t,accent:n,primary:yse,secondary:gse[50],disabled:gse[600],link:vse[400],linkHover:vse[500]}},wse=e=>{const t=vse[150],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:yse,paper:gse[50],code:gse[50],tooltip:gse[100],lighter:gse[50],border:gse[100]}:{navigation:t,overlay:n,default:gse[900],paper:gse[850],code:gse[800],tooltip:gse[600],lighter:gse[700],border:gse[600]}},Sse=e=>"light"===e?{50:gse[50],100:gse[100],200:gse[200],300:gse[300],400:gse[400],500:gse[500],600:gse[600],700:gse[700],800:gse[800],900:gse[900],950:gse[950]}:{50:gse[950],100:gse[900],200:gse[800],300:gse[700],400:gse[600],500:gse[500],600:gse[400],700:gse[300],800:gse[200],900:gse[100],950:gse[50]},Cse=e=>"light"===e?{main:vse[500],dark:vse[600],light:vse[50]}:{main:vse[400],dark:vse[800],light:vse[200]},kse=e=>"light"===e?{main:gse[600],dark:gse[900],light:gse[100]}:{main:yse,dark:yse,light:yse},_se={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},Mse={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},Tse={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},Pse={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},Rse=e=>"light"===e?{main:Pse[500],dark:Pse[600],light:Pse[50]}:{main:Pse[400],dark:Pse[800],light:Pse[300]},Ise=e=>"light"===e?{main:_se[500],dark:_se[700],light:_se[50]}:{main:_se[400],dark:_se[800],light:_se[300]},Dse=e=>"light"===e?{main:Mse[500],dark:Mse[700],light:Mse[50]}:{main:Mse[400],dark:Mse[800],light:Mse[300]};function Ose(e){return{mode:e,primary:Cse(e),secondary:kse(e),grey:Sse(e),background:wse(e),text:xse(e),error:Rse(e),warning:Dse(e),info:Cse(e),success:Ise(e),common:{white:yse,black:bse},designSystem:{blue:vse,green:_se,grey:gse,orange:Mse,purple:Tse,red:Pse}}}n(21998),n(82216),n(90143),n(73057);const Ase=400,Ese=700,Lse={fontFamily:'"Lato", sans-serif',fontWeightLight:300,fontWeightRegular:Ase,fontWeightMedium:Ese,fontWeightBold:900,h1:{fontSize:"1.5rem",fontWeight:Ese,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:Ese,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:Ese,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:Ese,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:Ase,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:Ase,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:Ase,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:Ese,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:Ese,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:Ase,lineHeight:"16px"}},Zse=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function Fse(e,t={}){return(0,cse.Z)({palette:Ose(e),typography:Lse,mixins:{},components:jse,...t})}const jse={MuiAlert:mse,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:Zse}},MuiDialog:{styleOverrides:{paper:Zse}},MuiPopover:{styleOverrides:{paper:Zse}}};var Nse=n(84974),zse=n(12449),Bse=n(28418),Vse=n(57689);const $se={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"};function Hse({value:e,onChange:t}){return(0,o.jsxs)(l.Z,{direction:"row",children:[(0,o.jsx)(Qd.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,o.jsx)(c.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,o.jsx)(Q8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Xae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Wse({value:e,onChange:t}){return(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(Qd.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,o.jsx)(c.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,o.jsx)(md,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,o.jsx)(Q8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Xae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Gse({value:e,onChange:t}){return(0,o.jsxs)(l.Z,{direction:"row",children:[(0,o.jsx)(md,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,o.jsx)(Q8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Xae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Use({value:e,onChange:t}){return(0,o.jsx)(l.Z,{direction:"row",children:(0,o.jsx)(Q8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Xae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function qse({value:e,onChange:t,...n}){return(0,o.jsxs)(l.Z,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,o.jsxs)(md,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,o.jsx)(pp.Z,{value:"JoinByColumnValue",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Join by column value"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,o.jsx)(pp.Z,{value:"MergeColumns",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Merge columns"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,o.jsx)(pp.Z,{value:"MergeIndexedColumns",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Merge indexed columns"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,o.jsx)(pp.Z,{value:"MergeSeries",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Merge series"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,o.jsx)(Hse,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,o.jsx)(Wse,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,o.jsx)(Gse,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,o.jsx)(Use,{value:e,onChange:t})]})}function Kse({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:a,...s}){return(0,o.jsxs)(l.Z,{...s,children:[(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,o.jsxs)(l.Z,{direction:"row",gap:1,children:[(0,o.jsx)(u.Z,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,o.jsx)(Nse.default,{}):(0,o.jsx)(zse.default,{})}),(0,o.jsx)(vc.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,o.jsx)("span",{children:(0,o.jsx)("strong",{children:$se[t.kind]})}):(0,o.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,o.jsxs)(l.Z,{direction:"row",gap:1,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Hd.Z,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,o.jsx)(Bse.default,{}):(0,o.jsx)(Vse.default,{})})}),(0,o.jsx)($W.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,o.jsx)(Hd.Z,{title:"Remove transformation",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:a,children:(0,o.jsx)(f7.default,{})})})]})]}),!n&&(0,o.jsx)(qse,{value:t,onChange:r})]})}function Yse({value:e,onChange:t,...n}){const[r,i]=(0,d.useState)(e.map((()=>!0)));return(0,o.jsxs)(l.Z,{gap:1,...n,children:[e.map(((n,a)=>(0,o.jsx)(Kse,{index:a,value:n,isCollapsed:r[a]??!0,onChange:n=>function(n,r){const o=[...e];o[n]=r,t(o)}(a,n),onDelete:()=>function(n){const r=[...e];r.splice(n,1),t(r),i((e=>(e.splice(n,1),[...e])))}(a),onCollapse:e=>function(e,t){i((n=>(n[e]=t,[...n])))}(a,e)},a))),(0,o.jsx)(a.Z,{variant:"contained",startIcon:(0,o.jsx)(Y8.default,{}),sx:{marginTop:1},onClick:function(){const n=[...e];n.push({kind:"",spec:{}}),t(n),i((e=>(e.push(!1),[...e])))},children:"Add Transformation"})]})}function Xse(e){const{value:t,onChange:n,timeOptions:r,height:i}=e,a=(0,d.useMemo)((()=>{if(t&&!r.some((e=>e.value.pastDuration===t)))return(0,o.jsx)(pp.Z,{value:t,children:t})}),[r,t]);return(0,o.jsx)(Bd.Z,{children:(0,o.jsx)($o.Z,{children:(0,o.jsxs)(b7.Z,{id:"refreshInterval",value:t,onChange:e=>{const t=e.target.value;n(t)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map(((e,t)=>(0,o.jsx)(pp.Z,{value:e.value.pastDuration,children:e.display},t))),a]})})})}var Qse=n(41305);const Jse=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,o.jsx)(l.Z,{gap:1,direction:"row",...n,children:(0,o.jsx)(c.Z,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,o.jsxs)(l.Z,{gap:1,direction:"row",...n,children:[(0,o.jsx)(c.Z,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,o.jsx)(c.Z,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,o.jsx)(l.Z,{gap:1,direction:"row",...n,children:(0,o.jsx)(c.Z,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,o.jsx)(l.Z,{gap:1,direction:"row",...n,children:(0,o.jsxs)(c.Z,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,o.jsx)(pp.Z,{value:"empty",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Empty"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,o.jsx)(pp.Z,{value:"null",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Null"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,o.jsx)(pp.Z,{value:"NaN",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"NaN"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,o.jsx)(pp.Z,{value:"true",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"True"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,o.jsx)(pp.Z,{value:"false",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"False"}),(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},ele=({mapping:e,onChange:t,onDelete:n,...r})=>{const i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,o.jsxs)(Qse.Z,{container:!0,spacing:2,...r,children:[(0,o.jsx)(Qse.Z,{size:{xs:5},children:(0,o.jsxs)(l.Z,{direction:"row",gap:1,width:"100%",children:[(0,o.jsxs)(c.Z,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,o.jsx)(pp.Z,{value:"Value",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Value"}),"Value"!==e.kind&&(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,o.jsx)(pp.Z,{value:"Range",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Range"}),"Range"!==e.kind&&(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,o.jsx)(pp.Z,{value:"Regex",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Regex"}),"Regex"!==e.kind&&(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,o.jsx)(pp.Z,{value:"Misc",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(vc.Z,{children:"Misc"}),"Misc"!==e.kind&&(0,o.jsx)(vc.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,o.jsx)(Jse,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,o.jsx)(Qse.Z,{size:{xs:4},children:(0,o.jsx)(c.Z,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,o.jsx)(Qse.Z,{size:{xs:1},children:(0,o.jsx)(l.Z,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,o.jsx)(zo,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,o.jsx)(u.Z,{onClick:()=>i("#000"),children:(0,o.jsx)(Y8.default,{})})})}),(0,o.jsx)(Qse.Z,{size:{xs:1},textAlign:"end",children:(0,o.jsx)(Hd.Z,{title:"Remove mapping settings",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,o.jsx)(f7.default,{})})})})]})},tle=({mappings:e,onChange:t})=>{const[n,r]=(0,d.useState)(e);return(0,o.jsxs)(l.Z,{spacing:1,children:[(0,o.jsxs)(Qse.Z,{container:!0,spacing:2,children:[(0,o.jsx)(Qse.Z,{size:{xs:5},children:(0,o.jsx)(vc.Z,{variant:"subtitle1",children:"Condition"})}),(0,o.jsx)(Qse.Z,{size:{xs:4},children:(0,o.jsx)(vc.Z,{variant:"subtitle1",children:"Display Text"})}),(0,o.jsx)(Qse.Z,{size:{xs:1},textAlign:"center",children:(0,o.jsx)(vc.Z,{variant:"subtitle1",children:"Color"})}),(0,o.jsx)(Qse.Z,{size:{xs:1}})]}),(0,o.jsx)(l.Z,{gap:1.5,divider:(0,o.jsx)($W.Z,{flexItem:!0,orientation:"horizontal"}),children:n.map(((e,i)=>(0,o.jsx)(ele,{mapping:e,onChange:e=>function(e,o){const i=[...n];i[e]=o,r(i),t(i)}(i,e),onDelete:()=>function(e){const o=[...n];o.splice(e,1),r(o),t(o)}(i)},i)))}),(0,o.jsx)(a.Z,{variant:"contained",startIcon:(0,o.jsx)(Y8.default,{}),sx:{marginTop:1},onClick:function(){const e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}},26913:function(e,t,n){"use strict";n.d(t,{_q:()=>s,pG:()=>u,ub:()=>c,vR:()=>l});var r=n(24246),o=n(27378),i=n(14935),a=n(65783);const s=(0,o.createContext)(void 0);function l(){const e=(0,o.useContext)(s);return void 0===e?(console.warn("No RouterContext found. Did you forget a ?"),{}):e}function u(e){const{RouterComponent:t,navigate:n,children:i}=e,a=(0,o.useMemo)((()=>({RouterComponent:t,navigate:n})),[t,n]);return(0,r.jsx)(s.Provider,{value:a,children:i})}function c(e){const{children:t}=e,n=(0,i.s0)();return(0,r.jsx)(u,{RouterComponent:a.Link,navigate:n,children:t})}},40211:function(e,t,n){"use strict";n.d(t,{E9:()=>u,J0:()=>s,Xe:()=>h,h$:()=>p,m0:()=>d,pk:()=>c,y1:()=>l});var r=n(24246),o=n(27378),i=n(15879);const a={showCustom:!0,showZoomButtons:!0,options:["5m","15m","30m","1h","6h","12h","24h","7d","14d"].map((e=>(0,i.buildRelativeTimeOption)(e)))},s=(0,o.createContext)(a);function l(){const e=(0,o.useContext)(s);if(void 0===e)throw new Error("No TimeRangeContext found. Did you forget a Provider?");return e}function u(){return l()}function c(e){const t=u().showCustom;return void 0!==e?e:t}function d(e){const t=u().showZoomButtons;return void 0!==e?e:t}function h(e){const t=u().options;return void 0!==e?e:t}function p(e){const t=(0,o.useMemo)((()=>({showCustom:void 0===e.showCustom?a.showCustom:e.showCustom,showZoomButtons:void 0===e.showZoomButtons?a.showZoomButtons:e.showZoomButtons,options:void 0===e.options?a.options:e.options})),[e.showCustom,e.showZoomButtons,e.options]);return(0,r.jsx)(s.Provider,{value:t,children:e.children})}},46403:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tG,Cd:()=>L,Ep:()=>p,Gn:()=>A,J0:()=>u,LX:()=>E,OF:()=>ee,PP:()=>a,PQ:()=>Y,RQ:()=>V,WK:()=>te,WS:()=>w,X3:()=>U,Zn:()=>Z,aU:()=>o,cP:()=>f,cm:()=>z,fZ:()=>Q,fp:()=>b,gx:()=>J,i3:()=>F,lX:()=>s,ov:()=>ue,p7:()=>fe,pC:()=>B,q_:()=>l,qp:()=>ce,uX:()=>X}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){void 0===e&&(e={});let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let a=u(null==r?t.length-1:r),s=o.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[a]}function m(e,n,r){void 0===n&&(n=null);let o=h(t?d().pathname:"/",e,n,r);return c("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function g(e){return"string"==typeof e?e:p(e)}return{get index(){return a},get action(){return s},get location(){return d()},createHref:g,createURL:e=>new URL(g(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?f(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){s=o.Push;let r=m(e,n);a+=1,t.splice(a,t.length,r),i&&l&&l({action:s,location:r,delta:1})},replace(e,n){s=o.Replace;let r=m(e,n);t[a]=r,i&&l&&l({action:s,location:r,delta:0})},go(e){s=o.Pop;let n=u(a+e),r=t[n];a=n,l&&l({action:s,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}function s(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:p(t)}),null,e)}function l(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:p(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function p(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 f(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 m(e,t,n,a){void 0===a&&(a={});let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,f=o.Pop,m=null,g=v();function v(){return(c.state||{idx:null}).idx}function y(){f=o.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:f,location:x.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),u(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,c.replaceState(r({},c.state,{idx:g}),""));let x={get action(){return f},get location(){return e(s,c)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(i,y),m=e,()=>{s.removeEventListener(i,y),m=null}},createHref:e=>t(s,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){f=o.Push;let r=h(x.location,e,t);n&&n(r,e),g=v()+1;let i=d(r,g),a=x.createHref(r);try{c.pushState(i,"",a)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(a)}l&&m&&m({action:f,location:x.location,delta:1})},replace:function(e,t){f=o.Replace;let r=h(x.location,e,t);n&&n(r,e),g=v();let i=d(r,g),a=x.createHref(r);c.replaceState(i,"",a),l&&m&&m({action:f,location:x.location,delta:0})},go:e=>c.go(e)};return x}var g;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));const v=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n,o){return void 0===n&&(n=[]),void 0===o&&(o={}),e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(!o[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=r({},e,t(e),{id:s});return o[s]=n,n}{let n=r({},e,t(e),{id:s,children:void 0});return o[s]=n,e.children&&(n.children=y(e.children,t,a,o)),n}}))}function b(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let o=Z(("string"==typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(u(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=V([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(u(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),S(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:D(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of C(e.path))o(e,t,n);else o(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=C(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const k=/^:[\w-]+$/,_=3,M=2,T=1,P=10,R=-2,I=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(I)&&(r+=R),t&&(r+=M),n.filter((e=>!I(e))).reduce(((e,t)=>e+(k.test(t)?_:""===t?T:P)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;enull==e?"":"string"==typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e){return o(t["*"])}const i=e.match(/^:([\w-]+)(\??)$/);if(i){const[,e,n]=i;let r=t[e];return u("?"===n||null!=r,'Missing ":'+e+'" param'),o(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);c("*"===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,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!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 Z(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 F(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:H(r),hash:W(o)}}function j(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 N(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function z(e,t){let n=N(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function B(e,t,n,o){let i;void 0===o&&(o=!1),"string"==typeof e?i=f(e):(i=r({},e),u(!i.pathname||!i.pathname.includes("?"),j("?","pathname","search",i)),u(!i.pathname||!i.pathname.includes("#"),j("#","pathname","hash",i)),u(!i.search||!i.search.includes("#"),j("#","search","hash",i)));let a,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(null==l)a=n;else{let e=t.length-1;if(!o&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=F(i,a),d=l&&"/"!==l&&l.endsWith("/"),h=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}const V=e=>e.join("/").replace(/\/\/+/g,"/"),$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",W=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=function(e,t){void 0===t&&(t={});let n="number"==typeof t?{status:t}:t,o=new Headers(n.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),r({},n,{headers:o}))};class U extends Error{}class q{constructor(e,t){let n;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],u(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>n=t)),this.controller=new AbortController;let r=()=>n(new U("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r),this.controller.signal.addEventListener("abort",r),this.data=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(n,e,void 0,t)),(t=>this.onSettle(n,e,t)));return n.catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof U)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===n&&void 0===r){let n=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return void 0===r?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach((n=>n(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),t=await new Promise((t=>{this.subscribe((r=>{e.removeEventListener("abort",n),(r||this.done)&&t(r)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return u(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:K(r)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function K(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const Y=function(e,t){return void 0===t&&(t={}),new q(e,"number"==typeof t?{status:t}:t)},X=function(e,t){void 0===t&&(t=302);let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let o=new Headers(n.headers);return o.set("Location",e),new Response(null,r({},n,{headers:o}))},Q=(e,t)=>{let n=X(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n},J=(e,t)=>{let n=X(e,t);return n.headers.set("X-Remix-Replace","true"),n};class ee{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ne=["post","put","patch","delete"],re=new Set(ne),oe=["get",...ne],ie=new Set(oe),ae=new Set([301,302,303,307,308]),se=new Set([307,308]),le={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ue={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,he=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),pe="remix-router-transitions";function fe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,i=!n;let a;if(u(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=he;let s,l,d,p={},f=y(e.routes,a,void 0,p),m=e.basename||"/",v=e.dataStrategy||ke,S=e.patchRoutesOnNavigation,C=r({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),k=null,_=new Set,M=null,T=null,P=null,R=null!=e.hydrationData,I=b(f,e.history.location,m),D=!1,O=null;if(null==I&&!S){let t=je(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Fe(f);I=n,O={[r.id]:t}}if(I&&!e.hydrationData){ct(I,f,e.history.location.pathname).active&&(I=null)}if(I)if(I.some((e=>e.route.lazy)))l=!1;else if(I.some((e=>e.route.loader)))if(C.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=I.findIndex((e=>void 0!==n[e.route.id]));l=I.slice(0,e+1).every((e=>!be(e.route,t,n)))}else l=I.every((e=>!be(e.route,t,n)))}else l=null!=e.hydrationData;else l=!0;else if(l=!1,I=[],C.v7_partialHydration){let t=ct(null,f,e.history.location.pathname);t.active&&t.matches&&(D=!0,I=t.matches)}let A,E,L={historyAction:e.history.action,location:e.history.location,matches:I,initialized:l,navigation:le,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},F=o.Pop,j=!1,N=!1,z=new Map,B=null,V=!1,$=!1,H=[],W=new Set,G=new Map,U=0,q=-1,K=new Map,Y=new Set,X=new Map,Q=new Map,J=new Set,ee=new Map,ne=new Map;function re(e,t){void 0===t&&(t={}),L=r({},L,e);let n=[],o=[];C.v7_fetcherPersist&&L.fetchers.forEach(((e,t)=>{"idle"===e.state&&(J.has(t)?o.push(t):n.push(t))})),J.forEach((e=>{L.fetchers.has(e)||G.has(e)||o.push(e)})),[..._].forEach((e=>e(L,{deletedFetchers:o,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),C.v7_fetcherPersist?(n.forEach((e=>L.fetchers.delete(e))),o.forEach((e=>Oe(e)))):o.forEach((e=>J.delete(e)))}function oe(t,n,i){var a,l;let u,{flushSync:c}=void 0===i?{}:i,d=null!=L.actionData&&null!=L.navigation.formMethod&&qe(L.navigation.formMethod)&&"loading"===L.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);u=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?L.actionData:null;let h=n.loaderData?Ee(L.loaderData,n.loaderData,n.matches||[],n.errors):L.loaderData,p=L.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,ce))));let m,g=!0===j||null!=L.navigation.formMethod&&qe(L.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(f=s,s=void 0),V||F===o.Pop||(F===o.Push?e.history.push(t,t.state):F===o.Replace&&e.history.replace(t,t.state)),F===o.Pop){let e=z.get(L.location.pathname);e&&e.has(t.pathname)?m={currentLocation:L.location,nextLocation:t}:z.has(t.pathname)&&(m={currentLocation:t,nextLocation:L.location})}else if(N){let e=z.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(L.location.pathname,e)),m={currentLocation:L.location,nextLocation:t}}re(r({},n,{actionData:u,loaderData:h,historyAction:F,location:t,initialized:!0,navigation:le,revalidation:"idle",restoreScrollPosition:ut(t,n.matches||L.matches),preventScrollReset:g,blockers:p}),{viewTransitionOpts:m,flushSync:!0===c}),F=o.Pop,j=!1,N=!1,V=!1,$=!1,H=[]}async function ie(t,n,i){A&&A.abort(),A=null,F=t,V=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(M&&P){let n=lt(e,t);M[n]=P()}}(L.location,L.matches),j=!0===(i&&i.preventScrollReset),N=!0===(i&&i.enableViewTransition);let a=s||f,l=i&&i.overrideNavigation,u=null!=i&&i.initialHydration&&L.matches&&L.matches.length>0&&!D?L.matches:b(a,n,m),c=!0===(i&&i.flushSync);if(u&&L.initialized&&!$&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(L.location,n)&&!(i&&i.submission&&qe(i.submission.formMethod)))return void oe(n,{matches:u},{flushSync:c});let d=ct(u,a,n.pathname);if(d.active&&d.matches&&(u=d.matches),!u){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return void oe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c})}A=new AbortController;let h,p=Re(e.history,n,A.signal,i&&i.submission);if(i&&i.pendingError)h=[Ze(u).route.id,{type:g.error,error:i.pendingError}];else if(i&&i.submission&&qe(i.submission.formMethod)){let t=await async function(e,t,n,r,i,a){void 0===a&&(a={});we();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(t,n);if(re({navigation:l},{flushSync:!0===a.flushSync}),i){let n=await dt(r,t.pathname,e.signal);if("aborted"===n.type)return{shortCircuited:!0};if("error"===n.type){let e=Ze(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:g.error,error:n.error}]}}if(!n.matches){let{notFoundMatches:e,error:n,route:r}=at(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:g.error,error:n}]}}r=n.matches}let u=Je(r,t);if(u.route.action||u.route.lazy){if(s=(await ve("action",L,e,[u],r,null))[u.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:g.error,error:je(405,{method:e.method,pathname:t.pathname,routeId:u.route.id})};if(He(s)){let t;if(a&&null!=a.replace)t=a.replace;else{t=Pe(s.response.headers.get("Location"),new URL(e.url),m)===L.location.pathname+L.location.search}return await fe(e,s,!0,{submission:n,replace:t}),{shortCircuited:!0}}if(Ve(s))throw je(400,{type:"defer-action"});if($e(s)){let e=Ze(r,u.route.id);return!0!==(a&&a.replace)&&(F=o.Push),{matches:r,pendingActionResult:[e.route.id,s]}}return{matches:r,pendingActionResult:[u.route.id,s]}}(p,n,i.submission,u,d.active,{replace:i.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if($e(r)&&te(r.error)&&404===r.error.status)return A=null,void oe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}u=t.matches||u,h=t.pendingActionResult,l=tt(n,i.submission),c=!1,d.active=!1,p=Re(e.history,p.url,p.signal)}let{shortCircuited:v,matches:y,loaderData:x,errors:w}=await async function(t,n,o,i,a,l,u,c,d,h,p){let g=a||tt(n,l),v=l||u||et(g),y=!(V||C.v7_partialHydration&&d);if(i){if(y){let e=ae(p);re(r({navigation:g},void 0!==e?{actionData:e}:{}),{flushSync:h})}let e=await dt(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Ze(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let b=s||f,[x,w]=ye(e.history,L,o,v,n,C.v7_partialHydration&&!0===d,C.v7_skipActionErrorRevalidation,$,H,W,J,X,Y,b,m,p);if(st((e=>!(o&&o.some((t=>t.route.id===e)))||x&&x.some((t=>t.route.id===e)))),q=++U,0===x.length&&0===w.length){let e=Ge();return oe(n,r({matches:o,loaderData:{},errors:p&&$e(p[1])?{[p[0]]:p[1].error}:null},Le(p),e?{fetchers:new Map(L.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(y){let e={};if(!i){e.navigation=g;let t=ae(p);void 0!==t&&(e.actionData=t)}w.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=L.fetchers.get(e.key),n=nt(void 0,t?t.data:void 0);L.fetchers.set(e.key,n)})),new Map(L.fetchers)}(w)),re(e,{flushSync:h})}w.forEach((e=>{ze(e.key),e.controller&&G.set(e.key,e.controller)}));let S=()=>w.forEach((e=>ze(e.key)));A&&A.signal.addEventListener("abort",S);let{loaderResults:k,fetcherResults:_}=await xe(L,o,x,w,t);if(t.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",S);w.forEach((e=>G.delete(e.key)));let M=Ne(k);if(M)return await fe(t,M.result,!0,{replace:c}),{shortCircuited:!0};if(M=Ne(_),M)return Y.add(M.key),await fe(t,M.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:T,errors:P}=Ae(L,o,k,p,w,_,ee);ee.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&ee.delete(t)}))})),C.v7_partialHydration&&d&&L.errors&&(P=r({},L.errors,P));let R=Ge(),I=Ue(q),D=R||I||w.length>0;return r({matches:o,loaderData:T,errors:P},D?{fetchers:new Map(L.fetchers)}:{})}(p,n,u,d.active,l,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&!0===i.initialHydration,c,h);v||(A=null,oe(n,r({matches:y||u},Le(h),{loaderData:x,errors:w})))}function ae(e){return e&&!$e(e[1])?{[e[0]]:e[1].data}:L.actionData?0===Object.keys(L.actionData).length?null:L.actionData:void 0}async function fe(i,a,s,l){let{submission:c,fetcherSubmission:d,preventScrollReset:p,replace:f}=void 0===l?{}:l;a.response.headers.has("X-Remix-Revalidate")&&($=!0);let g=a.response.headers.get("Location");u(g,"Expected a Location header on the redirect Response"),g=Pe(g,new URL(i.url),m);let v=h(L.location,g,{_isRedirect:!0});if(n){let n=!1;if(a.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(de.test(g)){const r=e.history.createURL(g);n=r.origin!==t.location.origin||null==Z(r.pathname,m)}if(n)return void(f?t.location.replace(g):t.location.assign(g))}A=null;let y=!0===f||a.response.headers.has("X-Remix-Replace")?o.Replace:o.Push,{formMethod:b,formAction:x,formEncType:w}=L.navigation;!c&&!d&&b&&x&&w&&(c=et(L.navigation));let S=c||d;if(se.has(a.response.status)&&S&&qe(S.formMethod))await ie(y,v,{submission:r({},S,{formAction:g}),preventScrollReset:p||j,enableViewTransition:s?N:void 0});else{let e=tt(v,c);await ie(y,v,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:p||j,enableViewTransition:s?N:void 0})}}async function ve(e,t,n,r,o,i){let s,l={};try{s=await _e(v,e,t,n,r,o,i,p,a)}catch(e){return r.forEach((t=>{l[t.route.id]={type:g.error,error:e}})),l}for(let[e,t]of Object.entries(s))if(Be(t)){let r=t.result;l[e]={type:g.redirect,response:Te(r,n,e,o,m,C.v7_relativeSplatPath)}}else l[e]=await Me(t);return l}async function xe(t,n,r,o,i){let a=t.matches,s=ve("loader",t,i,r,n,null),l=Promise.all(o.map((async n=>{if(n.matches&&n.match&&n.controller){let r=(await ve("loader",t,Re(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:g.error,error:je(404,{pathname:n.path})}})}))),u=await s,c=(await l).reduce(((e,t)=>Object.assign(e,t)),{});return await Promise.all([Ke(n,u,i.signal,a,t.loaderData),Ye(n,c,o)]),{loaderResults:u,fetcherResults:c}}function we(){$=!0,H.push(...st()),X.forEach(((e,t)=>{G.has(t)&&W.add(t),ze(t)}))}function Ce(e,t,n){void 0===n&&(n={}),L.fetchers.set(e,t),re({fetchers:new Map(L.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Ie(e,t,n,r){void 0===r&&(r={});let o=Ze(L.matches,t);Oe(e),re({errors:{[o.route.id]:n},fetchers:new Map(L.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function De(e){return Q.set(e,(Q.get(e)||0)+1),J.has(e)&&J.delete(e),L.fetchers.get(e)||ue}function Oe(e){let t=L.fetchers.get(e);!G.has(e)||t&&"loading"===t.state&&K.has(e)||ze(e),X.delete(e),K.delete(e),Y.delete(e),C.v7_fetcherPersist&&J.delete(e),W.delete(e),L.fetchers.delete(e)}function ze(e){let t=G.get(e);t&&(t.abort(),G.delete(e))}function We(e){for(let t of e){let e=rt(De(t).data);L.fetchers.set(t,e)}}function Ge(){let e=[],t=!1;for(let n of Y){let r=L.fetchers.get(n);u(r,"Expected fetcher: "+n),"loading"===r.state&&(Y.delete(n),e.push(n),t=!0)}return We(e),t}function Ue(e){let t=[];for(let[n,r]of K)if(r0}function Qe(e){L.blockers.delete(e),ne.delete(e)}function ot(e,t){let n=L.blockers.get(e)||ce;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(L.blockers);r.set(e,t),re({blockers:r})}function it(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===ne.size)return;ne.size>1&&c(!1,"A router only supports one blocker at a time");let o=Array.from(ne.entries()),[i,a]=o[o.length-1],s=L.blockers.get(i);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?i:void 0}function at(e){let t=je(404,{pathname:e}),n=s||f,{matches:r,route:o}=Fe(n);return st(),{notFoundMatches:r,route:o,error:t}}function st(e){let t=[];return ee.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),ee.delete(r))})),t}function lt(e,t){if(T){return T(e,t.map((e=>w(e,L.loaderData))))||e.key}return e.key}function ut(e,t){if(M){let n=lt(e,t),r=M[n];if("number"==typeof r)return r}return null}function ct(e,t,n){if(S){if(!e){return{active:!0,matches:x(t,n,m,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:x(t,n,m,!0)}}}return{active:!1,matches:null}}async function dt(e,t,n,r){if(!S)return{type:"success",matches:e};let o=e;for(;;){let e=null==s,i=s||f,l=p;try{await S({signal:n,path:t,matches:o,fetcherKey:r,patch:(e,t)=>{n.aborted||Se(e,t,i,l,a)}})}catch(e){return{type:"error",error:e,partialMatches:o}}finally{e&&!n.aborted&&(f=[...f])}if(n.aborted)return{type:"aborted"};let u=b(i,t,m);if(u)return{type:"success",matches:u};let c=x(i,t,m,!0);if(!c||o.length===c.length&&o.every(((e,t)=>e.route.id===c[t].route.id)))return{type:"success",matches:null};o=c}}return d={get basename(){return m},get future(){return C},get state(){return L},get routes(){return f},get window(){return t},initialize:function(){if(k=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(E)return E(),void(E=void 0);c(0===ne.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=it({currentLocation:L.location,nextLocation:r,historyAction:n});if(i&&null!=o){let t=new Promise((e=>{E=e}));return e.history.go(-1*o),void ot(i,{state:"blocked",location:r,proceed(){ot(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then((()=>e.history.go(o)))},reset(){let e=new Map(L.blockers);e.set(i,ce),re({blockers:e})}})}return ie(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(pe);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,z);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(pe,JSON.stringify(n))}catch(e){c(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,z);t.addEventListener("pagehide",e),B=()=>t.removeEventListener("pagehide",e)}return L.initialized||ie(o.Pop,L.location,{initialHydration:!0}),d},subscribe:function(e){return _.add(e),()=>_.delete(e)},enableScrollRestoration:function(e,t,n){if(M=e,P=t,T=n||null,!R&&L.navigation===le){R=!0;let e=ut(L.location,L.matches);null!=e&&re({restoreScrollPosition:e})}return()=>{M=null,P=null,T=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let a=me(L.location,L.matches,m,C.v7_prependBasename,n,C.v7_relativeSplatPath,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:s,submission:l,error:u}=ge(C.v7_normalizeFormMethod,!1,a,i),c=L.location,d=h(L.location,s,i&&i.state);d=r({},d,e.history.encodeLocation(d));let p=i&&null!=i.replace?i.replace:void 0,f=o.Push;!0===p?f=o.Replace:!1===p||null!=l&&qe(l.formMethod)&&l.formAction===L.location.pathname+L.location.search&&(f=o.Replace);let g=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,v=!0===(i&&i.flushSync),y=it({currentLocation:c,nextLocation:d,historyAction:f});if(!y)return await ie(f,d,{submission:l,pendingError:u,preventScrollReset:g,replace:i&&i.replace,enableViewTransition:i&&i.viewTransition,flushSync:v});ot(y,{state:"blocked",location:d,proceed(){ot(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,i)},reset(){let e=new Map(L.blockers);e.set(y,ce),re({blockers:e})}})},fetch:function(t,n,r,o){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ze(t);let a=!0===(o&&o.flushSync),l=s||f,c=me(L.location,L.matches,m,C.v7_prependBasename,r,C.v7_relativeSplatPath,n,null==o?void 0:o.relative),d=b(l,c,m),h=ct(d,l,c);if(h.active&&h.matches&&(d=h.matches),!d)return void Ie(t,n,je(404,{pathname:c}),{flushSync:a});let{path:p,submission:g,error:v}=ge(C.v7_normalizeFormMethod,!0,c,o);if(v)return void Ie(t,n,v,{flushSync:a});let y=Je(d,p),x=!0===(o&&o.preventScrollReset);g&&qe(g.formMethod)?async function(t,n,r,o,i,a,l,c,d){function h(e){if(!e.route.action&&!e.route.lazy){let e=je(405,{method:d.formMethod,pathname:r,routeId:n});return Ie(t,n,e,{flushSync:l}),!0}return!1}if(we(),X.delete(t),!a&&h(o))return;let p=L.fetchers.get(t);Ce(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(d,p),{flushSync:l});let g=new AbortController,v=Re(e.history,r,g.signal,d);if(a){let e=await dt(i,new URL(v.url).pathname,v.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Ie(t,n,e.error,{flushSync:l});if(!e.matches)return void Ie(t,n,je(404,{pathname:r}),{flushSync:l});if(h(o=Je(i=e.matches,r)))return}G.set(t,g);let y=U,x=await ve("action",L,v,[o],i,t),w=x[o.route.id];if(v.signal.aborted)return void(G.get(t)===g&&G.delete(t));if(C.v7_fetcherPersist&&J.has(t)){if(He(w)||$e(w))return void Ce(t,rt(void 0))}else{if(He(w))return G.delete(t),q>y?void Ce(t,rt(void 0)):(Y.add(t),Ce(t,nt(d)),fe(v,w,!1,{fetcherSubmission:d,preventScrollReset:c}));if($e(w))return void Ie(t,n,w.error)}if(Ve(w))throw je(400,{type:"defer-action"});let S=L.navigation.location||L.location,k=Re(e.history,S,g.signal),_=s||f,M="idle"!==L.navigation.state?b(_,L.navigation.location,m):L.matches;u(M,"Didn't find any matches after fetcher action");let T=++U;K.set(t,T);let P=nt(d,w.data);L.fetchers.set(t,P);let[R,I]=ye(e.history,L,M,d,S,!1,C.v7_skipActionErrorRevalidation,$,H,W,J,X,Y,_,m,[o.route.id,w]);I.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=L.fetchers.get(t),r=nt(void 0,n?n.data:void 0);L.fetchers.set(t,r),ze(t),e.controller&&G.set(t,e.controller)})),re({fetchers:new Map(L.fetchers)});let D=()=>I.forEach((e=>ze(e.key)));g.signal.addEventListener("abort",D);let{loaderResults:O,fetcherResults:E}=await xe(L,M,R,I,k);if(g.signal.aborted)return;g.signal.removeEventListener("abort",D),K.delete(t),G.delete(t),I.forEach((e=>G.delete(e.key)));let Z=Ne(O);if(Z)return fe(k,Z.result,!1,{preventScrollReset:c});if(Z=Ne(E),Z)return Y.add(Z.key),fe(k,Z.result,!1,{preventScrollReset:c});let{loaderData:j,errors:N}=Ae(L,M,O,void 0,I,E,ee);if(L.fetchers.has(t)){let e=rt(w.data);L.fetchers.set(t,e)}Ue(T),"loading"===L.navigation.state&&T>q?(u(F,"Expected pending action"),A&&A.abort(),oe(L.navigation.location,{matches:M,loaderData:j,errors:N,fetchers:new Map(L.fetchers)})):(re({errors:N,loaderData:Ee(L.loaderData,j,M,N),fetchers:new Map(L.fetchers)}),$=!1)}(t,n,p,y,d,h.active,a,x,g):(X.set(t,{routeId:n,path:p}),async function(t,n,r,o,i,a,s,l,c){let d=L.fetchers.get(t);Ce(t,nt(c,d?d.data:void 0),{flushSync:s});let h=new AbortController,p=Re(e.history,r,h.signal);if(a){let e=await dt(i,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Ie(t,n,e.error,{flushSync:s});if(!e.matches)return void Ie(t,n,je(404,{pathname:r}),{flushSync:s});o=Je(i=e.matches,r)}G.set(t,h);let f=U,m=await ve("loader",L,p,[o],i,t),g=m[o.route.id];Ve(g)&&(g=await Xe(g,p.signal,!0)||g);G.get(t)===h&&G.delete(t);if(p.signal.aborted)return;if(J.has(t))return void Ce(t,rt(void 0));if(He(g))return q>f?void Ce(t,rt(void 0)):(Y.add(t),void await fe(p,g,!1,{preventScrollReset:l}));if($e(g))return void Ie(t,n,g.error);u(!Ve(g),"Unhandled fetcher deferred data"),Ce(t,rt(g.data))}(t,n,p,y,d,h.active,a,x,g))},revalidate:function(){we(),re({revalidation:"loading"}),"submitting"!==L.navigation.state&&("idle"!==L.navigation.state?ie(F||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:!0===N}):ie(L.historyAction,L.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),J.add(e),C.v7_fetcherPersist||Oe(e)):Q.set(e,t),re({fetchers:new Map(L.fetchers)})},dispose:function(){k&&k(),B&&B(),_.clear(),A&&A.abort(),L.fetchers.forEach(((e,t)=>Oe(t))),L.blockers.forEach(((e,t)=>Qe(t)))},getBlocker:function(e,t){let n=L.blockers.get(e)||ce;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Qe,patchRoutes:function(e,t){let n=null==s;Se(e,t,s||f,p,a),n&&(f=[...f],re({}))},_internalFetchControllers:G,_internalActiveDeferreds:ee,_internalSetRoutes:function(e){p={},s=y(e,a,void 0,p)}},d}Symbol("deferred");function me(e,t,n,r,o,i,a,s){let l,u;if(a){l=[];for(let e of t)if(l.push(e),e.route.id===a){u=e;break}}else l=t,u=t[t.length-1];let c=B(o||".",z(l,i),Z(e.pathname,n)||e.pathname,"path"===s);if(null==o&&(c.search=e.search,c.hash=e.hash),(null==o||""===o||"."===o)&&u){let e=Qe(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?"?"+n:""}}return r&&"/"!==n&&(c.pathname="/"===c.pathname?n:V([n,c.pathname])),p(c)}function ge(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ue(r.formMethod))return{path:n,error:je(405,{method:r.formMethod})};let o,i,a=()=>({path:n,error:je(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),c=ze(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!qe(l))return a();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!qe(l))return a();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return a()}}}if(u("function"==typeof FormData,"FormData is not available in this environment"),r.formData)o=Ie(r.formData),i=r.formData;else if(r.body instanceof FormData)o=Ie(r.body),i=r.body;else if(r.body instanceof URLSearchParams)o=r.body,i=De(o);else if(null==r.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(r.body),i=De(o)}catch(e){return a()}let d={formMethod:l,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(qe(d.formMethod))return{path:n,submission:d};let h=f(n);return t&&h.search&&Qe(h.search)&&o.append("index",""),h.search="?"+o,{path:p(h),submission:d}}function ve(e,t,n){void 0===n&&(n=!1);let r=e.findIndex((e=>e.route.id===t));return r>=0?e.slice(0,n?r+1:r):e}function ye(e,t,n,o,i,a,s,l,u,c,d,h,p,f,m,g){let v=g?$e(g[1])?g[1].error:g[1].data:void 0,y=e.createURL(t.location),x=e.createURL(i),w=n;a&&t.errors?w=ve(n,Object.keys(t.errors)[0],!0):g&&$e(g[1])&&(w=ve(n,g[0]));let S=g?g[1].statusCode:void 0,C=s&&S&&S>=400,k=w.filter(((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(null==i.loader)return!1;if(a)return be(i,t.loaderData,t.errors);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||u.some((t=>t===e.route.id)))return!0;let s=t.matches[n],c=e;return we(e,r({currentUrl:y,currentParams:s.params,nextUrl:x,nextParams:c.params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!C&&(l||y.pathname+y.search===x.pathname+x.search||y.search!==x.search||xe(s,c))}))})),_=[];return h.forEach(((e,i)=>{if(a||!n.some((t=>t.route.id===e.routeId))||d.has(i))return;let s=b(f,e.path,m);if(!s)return void _.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(i),h=Je(s,e.path),g=!1;p.has(i)?g=!1:c.has(i)?(c.delete(i),g=!0):g=u&&"idle"!==u.state&&void 0===u.data?l:we(h,r({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!C&&l})),g&&_.push({key:i,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[k,_]}function be(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function xe(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function we(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Se(e,t,n,r,o){var i;let a;if(e){let t=r[e];u(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),a=t.children}else a=n;let s=y(t.filter((e=>!a.some((t=>Ce(e,t))))),o,[e||"_","patch",String((null==(i=a)?void 0:i.length)||"0")],r);a.push(...s)}function Ce(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>{var r;return null==(r=t.children)?void 0:r.some((t=>Ce(e,t)))})))}async function ke(e){let{matches:t}=e,n=t.filter((e=>e.shouldLoad));return(await Promise.all(n.map((e=>e.resolve())))).reduce(((e,t,r)=>Object.assign(e,{[n[r].route.id]:t})),{})}async function _e(e,t,n,o,i,a,s,l,d,h){let p=a.map((e=>e.route.lazy?async function(e,t,n){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let i=n[e.id];u(i,"No route found in manifest");let a={};for(let e in o){let t=void 0!==i[e]&&"hasErrorBoundary"!==e;c(!t,'Route "'+i.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||v.has(e)||(a[e]=o[e])}Object.assign(i,a),Object.assign(i,r({},t(i),{lazy:void 0}))}(e.route,d,l):void 0)),f=a.map(((e,n)=>{let a=p[n],s=i.some((t=>t.route.id===e.route.id));return r({},e,{shouldLoad:s,resolve:async n=>(n&&"GET"===o.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?async function(e,t,n,r,o,i){let a,s,l=r=>{let a,l=new Promise(((e,t)=>a=t));s=()=>a(),t.signal.addEventListener("abort",s);let u=o=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:i},...void 0!==o?[o]:[]),c=(async()=>{try{return{type:"data",result:await(o?o((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let o=n.route[e];if(r)if(o){let e,[t]=await Promise.all([l(o).catch((t=>{e=t})),r]);if(void 0!==e)throw e;a=t}else{if(await r,o=n.route[e],!o){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw je(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:g.data,result:void 0}}a=await l(o)}else{if(!o){let e=new URL(t.url);throw je(404,{pathname:e.pathname+e.search})}a=await l(o)}u(void 0!==a.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:g.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return a}(t,o,e,a,n,h):Promise.resolve({type:g.data,result:void 0}))})})),m=await e({matches:f,request:o,params:a[0].params,fetcherKey:s,context:h});try{await Promise.all(p)}catch(e){}return m}async function Me(e){let{result:t,type:n}=e;if(Ge(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:g.error,error:e}}return n===g.error?{type:g.error,error:new ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:g.data,data:e,statusCode:t.status,headers:t.headers}}var r,o,i,a,s,l,u,c;return n===g.error?We(t)?t.data instanceof Error?{type:g.error,error:t.data,statusCode:null==(i=t.init)?void 0:i.status,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:new ee((null==(r=t.init)?void 0:r.status)||500,void 0,t.data),statusCode:te(t)?t.status:void 0,headers:null!=(o=t.init)&&o.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:t,statusCode:te(t)?t.status:void 0}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:g.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:We(t)?{type:g.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:g.data,data:t}}function Te(e,t,n,r,o,i){let a=e.headers.get("Location");if(u(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!de.test(a)){let s=r.slice(0,r.findIndex((e=>e.route.id===n))+1);a=me(new URL(t.url),s,o,!0,a,i),e.headers.set("Location",a)}return e}function Pe(e,t,n){if(de.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=null!=Z(o.pathname,n);if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function Re(e,t,n,r){let o=e.createURL(ze(t)).toString(),i={signal:n};if(r&&qe(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Ie(r.formData):i.body=r.formData}return new Request(o,i)}function Ie(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function De(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Oe(e,t,n,r,o){let i,a={},s=null,l=!1,c={},d=n&&$e(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let h=n.route.id,p=t[h];if(u(!He(p),"Cannot handle redirect results in processLoaderData"),$e(p)){let t=p.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[h]=t;else{let n=Ze(e,h);null==s[n.route.id]&&(s[n.route.id]=t)}a[h]=void 0,l||(l=!0,i=te(p.error)?p.error.status:500),p.headers&&(c[h]=p.headers)}else Ve(p)?(r.set(h,p.deferredData),a[h]=p.deferredData.data,null==p.statusCode||200===p.statusCode||l||(i=p.statusCode),p.headers&&(c[h]=p.headers)):(a[h]=p.data,p.statusCode&&200!==p.statusCode&&!l&&(i=p.statusCode),p.headers&&(c[h]=p.headers))})),void 0!==d&&n&&(s={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function Ae(e,t,n,o,i,a,s){let{loaderData:l,errors:c}=Oe(t,n,o,s,!1);return i.forEach((t=>{let{key:n,match:o,controller:i}=t,s=a[n];if(u(s,"Did not find corresponding fetcher result"),!i||!i.signal.aborted)if($e(s)){let t=Ze(e.matches,null==o?void 0:o.route.id);c&&c[t.route.id]||(c=r({},c,{[t.route.id]:s.error})),e.fetchers.delete(n)}else if(He(s))u(!1,"Unhandled fetcher revalidation redirect");else if(Ve(s))u(!1,"Unhandled fetcher deferred data");else{let t=rt(s.data);e.fetchers.set(n,t)}})),{loaderData:l,errors:c}}function Ee(e,t,n,o){let i=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(i[n]=t[n]):void 0!==e[n]&&r.route.loader&&(i[n]=e[n]),o&&o.hasOwnProperty(n))break}return i}function Le(e){return e?$e(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ze(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Fe(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function je(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===i?l="defer() is not supported in actions":"invalid-body"===i&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new ee(e||500,s,new Error(l),!0)}function Ne(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(He(r))return{key:n,result:r}}}function ze(e){return p(r({},"string"==typeof e?f(e):e,{hash:""}))}function Be(e){return Ge(e.result)&&ae.has(e.result.status)}function Ve(e){return e.type===g.deferred}function $e(e){return e.type===g.error}function He(e){return(e&&e.type)===g.redirect}function We(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ue(e){return ie.has(e.toLowerCase())}function qe(e){return re.has(e.toLowerCase())}async function Ke(e,t,n,r,o){let i=Object.entries(t);for(let a=0;a(null==e?void 0:e.route.id)===s));if(!u)continue;let c=r.find((e=>e.route.id===u.route.id)),d=null!=c&&!xe(c,u)&&void 0!==(o&&o[u.route.id]);Ve(l)&&d&&await Xe(l,n,!1).then((e=>{e&&(t[s]=e)}))}}async function Ye(e,t,n){for(let r=0;r(null==e?void 0:e.route.id)===i))&&(Ve(s)&&(u(a,"Expected an AbortController for revalidating fetcher deferred result"),await Xe(s,a.signal,!0).then((e=>{e&&(t[o]=e)}))))}}async function Xe(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(e){return{type:g.error,error:e}}return{type:g.data,data:e.deferredData.data}}}function Qe(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Je(e,t){let n="string"==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&Qe(n||""))return e[e.length-1];let r=N(e);return r[r.length-1]}function et(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function tt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function rt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},49966:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++rc))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f-1&&e%1==0&&e-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},39448:function(e,t,n){var r=n(96586),o=n(36301),i=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},19383:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},50962:function(e,t,n){var r=n(58023)(Object.keys,Object);e.exports=r},21586:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},18125:function(e,t,n){e=n.nmd(e);var r=n(39120),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},21258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},58023:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},11871:function(e,t,n){var r=n(79349),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7354:function(e,t,n){var r=n(36301);e.exports=function(){this.__data__=new r,this.size=0}},5863:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},12367:function(e){e.exports=function(e){return this.__data__.get(e)}},90748:function(e){e.exports=function(e){return this.__data__.has(e)}},97569:function(e,t,n){var r=n(36301),o=n(44538),i=n(74554);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},76532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},551:function(e){e.exports=function(e){return function(){return e}}},66726:function(e,t,n){var r=n(11611),o=n(82846),i=n(91936),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=c}function x(){var e=o();if(b(e))return w(e);h=setTimeout(x,function(e){var n=t-(e-p);return g?s(n,c-(e-f)):n}(e))}function w(e){return h=void 0,v&&l?y(e):(l=u=void 0,d)}function S(){var e=o(),n=b(e);if(l=arguments,u=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(x,t),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(x,t),y(p)}return void 0===h&&(h=setTimeout(x,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?d:w(o())},S}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},31137:function(e){e.exports=function(e){return e}},2900:function(e,t,n){var r=n(55829),o=n(92360),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},19785:function(e){var t=Array.isArray;e.exports=t},80068:function(e,t,n){var r=n(28338),o=n(84194);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},36468:function(e,t,n){var r=n(80068),o=n(92360);e.exports=function(e){return o(e)&&r(e)}},43854:function(e,t,n){e=n.nmd(e);var r=n(77400),o=n(57714),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},56141:function(e,t,n){var r=n(32866);e.exports=function(e,t){return r(e,t)}},28338:function(e,t,n){var r=n(99736),o=n(11611);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},84194:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},92360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},40861:function(e,t,n){var r=n(99736),o=n(2173),i=n(92360),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},55193:function(e,t,n){var r=n(99736),o=n(92360);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},48519:function(e,t,n){var r=n(26972),o=n(39334),i=n(18125),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},50098:function(e,t,n){var r=n(98213),o=n(20186),i=n(80068);e.exports=function(e){return i(e)?r(e):o(e)}},53893:function(e,t,n){var r=n(98213),o=n(59464),i=n(80068);e.exports=function(e){return i(e)?r(e,!0):o(e)}},98784:function(e,t,n){e=n.nmd(e),function(){var r,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,l=32,u=64,c=128,d=256,h=1/0,p=9007199254740991,f=NaN,m=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",u],["rearg",d]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",x="[object Date]",w="[object Error]",S="[object Function]",C="[object GeneratorFunction]",k="[object Map]",_="[object Number]",M="[object Object]",T="[object Promise]",P="[object RegExp]",R="[object Set]",I="[object String]",D="[object Symbol]",O="[object WeakMap]",A="[object ArrayBuffer]",E="[object DataView]",L="[object Float32Array]",Z="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",N="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",V="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(U.source),Y=RegExp(q.source),X=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),ie=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Ce="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="['’]",De="["+Ce+"]",Oe="["+Re+"]",Ae="["+ke+"]",Ee="\\d+",Le="["+_e+"]",Ze="["+Me+"]",Fe="[^"+Ce+Re+Ee+_e+Me+Te+"]",je="\\ud83c[\\udffb-\\udfff]",Ne="[^"+Ce+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Te+"]",$e="\\u200d",He="(?:"+Ze+"|"+Fe+")",We="(?:"+Ve+"|"+Fe+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+je+")"+"?",Ke="["+Pe+"]?",Ye=Ke+qe+("(?:"+$e+"(?:"+[Ne,ze,Be].join("|")+")"+Ke+qe+")*"),Xe="(?:"+[Le,ze,Be].join("|")+")"+Ye,Qe="(?:"+[Ne+Ae+"?",Ae,ze,Be,De].join("|")+")",Je=RegExp(Ie,"g"),et=RegExp(Ae,"g"),tt=RegExp(je+"(?="+je+")|"+Qe+Ye,"g"),nt=RegExp([Ve+"?"+Ze+"+"+Ge+"(?="+[Oe,Ve,"$"].join("|")+")",We+"+"+Ue+"(?="+[Oe,Ve+He,"$"].join("|")+")",Ve+"?"+He+"+"+Ge,Ve+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Xe].join("|"),"g"),rt=RegExp("["+$e+Ce+ke+Pe+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[L]=st[Z]=st[F]=st[j]=st[N]=st[z]=st[B]=st[V]=st[$]=!0,st[v]=st[y]=st[A]=st[b]=st[E]=st[x]=st[w]=st[S]=st[k]=st[_]=st[M]=st[P]=st[R]=st[I]=st[O]=!1;var lt={};lt[v]=lt[y]=lt[A]=lt[E]=lt[b]=lt[x]=lt[L]=lt[Z]=lt[F]=lt[j]=lt[N]=lt[k]=lt[_]=lt[M]=lt[P]=lt[R]=lt[I]=lt[D]=lt[z]=lt[B]=lt[V]=lt[$]=!0,lt[w]=lt[S]=lt[O]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ft=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,vt=gt&>.exports===mt,yt=vt&&ht.process,bt=function(){try{var e=gt&>.require&>.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),xt=bt&&bt.isArrayBuffer,wt=bt&&bt.isDate,St=bt&&bt.isMap,Ct=bt&&bt.isRegExp,kt=bt&&bt.isSet,_t=bt&&bt.isTypedArray;function Mt(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)}function Tt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function At(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function nn(e,t){for(var n=e.length;n--&&Vt(t,e[n],0)>-1;);return n}var rn=Ut({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),on=Ut({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ut[e]}function sn(e){return rt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"});var vn=function e(t){var n,ae=(t=null==t?ft:vn.defaults(ft.Object(),t,vn.pick(ft,it))).Array,Ce=t.Date,ke=t.Error,_e=t.Function,Me=t.Math,Te=t.Object,Pe=t.RegExp,Re=t.String,Ie=t.TypeError,De=ae.prototype,Oe=_e.prototype,Ae=Te.prototype,Ee=t["__core-js_shared__"],Le=Oe.toString,Ze=Ae.hasOwnProperty,Fe=0,je=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ne=Ae.toString,ze=Le.call(Te),Be=ft._,Ve=Pe("^"+Le.call(Ze).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=vt?t.Buffer:r,He=t.Symbol,We=t.Uint8Array,Ge=$e?$e.allocUnsafe:r,Ue=un(Te.getPrototypeOf,Te),qe=Te.create,Ke=Ae.propertyIsEnumerable,Ye=De.splice,Xe=He?He.isConcatSpreadable:r,Qe=He?He.iterator:r,tt=He?He.toStringTag:r,rt=function(){try{var e=pi(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ht=Ce&&Ce.now!==ft.Date.now&&Ce.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,mt=Me.ceil,gt=Me.floor,yt=Te.getOwnPropertySymbols,bt=$e?$e.isBuffer:r,Nt=t.isFinite,Ut=De.join,yn=un(Te.keys,Te),bn=Me.max,xn=Me.min,wn=Ce.now,Sn=t.parseInt,Cn=Me.random,kn=De.reverse,_n=pi(t,"DataView"),Mn=pi(t,"Map"),Tn=pi(t,"Promise"),Pn=pi(t,"Set"),Rn=pi(t,"WeakMap"),In=pi(Te,"create"),Dn=Rn&&new Rn,On={},An=Ni(_n),En=Ni(Mn),Ln=Ni(Tn),Zn=Ni(Pn),Fn=Ni(Rn),jn=He?He.prototype:r,Nn=jn?jn.valueOf:r,zn=jn?jn.toString:r;function Bn(e){if(ns(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Hn)return e;if(Ze.call(e,"__wrapped__"))return zi(e)}return new Hn(e)}var Vn=function(){function e(){}return function(t){if(!ts(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ur(e,t,n,o,i,a){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=i?n(e,o,i,a):n(e)),s!==r)return s;if(!ts(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ze.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Do(e,s)}else{var h=gi(e),p=h==S||h==C;if(Ka(e))return _o(e,l);if(h==M||h==v||p&&!i){if(s=u||p?{}:yi(e),!l)return u?function(e,t){return Oo(e,mi(e),t)}(e,function(e,t){return e&&Oo(t,As(t),e)}(s,e)):function(e,t){return Oo(e,fi(e),t)}(e,ir(s,e))}else{if(!lt[h])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case A:return Mo(e);case b:case x:return new r(+e);case E:return function(e,t){var n=t?Mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case Z:case F:case j:case N:case z:case B:case V:case $:return To(e,n);case k:return new r;case _:case I:return new r(e);case P:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case D:return o=e,Nn?Te(Nn.call(o)):{}}var o}(e,h,l)}}a||(a=new Yn);var f=a.get(e);if(f)return f;a.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,ur(r,t,n,o,e,a))}));var m=d?r:(c?u?ai:ii:u?As:Os)(e);return Pt(m||e,(function(r,o){m&&(r=e[o=r]),nr(s,o,ur(r,t,n,o,e,a))})),s}function cr(e,t,n){var o=n.length;if(null==e)return!o;for(e=Te(e);o--;){var i=n[o],a=t[i],s=e[i];if(s===r&&!(i in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Ie(o);return Oi((function(){e.apply(r,n)}),t)}function hr(e,t,n,r){var o=-1,i=Ot,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Et(t,Qt(n))),r?(i=At,a=!1):t.length>=200&&(i=en,a=!1,t=new Kn(t));e:for(;++o-1},Un.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Mn||Un),string:new Gn}},qn.prototype.delete=function(e){var t=di(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return di(this,e).get(e)},qn.prototype.has=function(e){return di(this,e).has(e)},qn.prototype.set=function(e,t){var n=di(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,i),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Un,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!Mn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var pr=Lo(wr),fr=Lo(Sr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,n){for(var o=-1,i=e.length;++o0&&n(s)?t>1?yr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var br=Zo(),xr=Zo(!0);function wr(e,t){return e&&br(e,t,Os)}function Sr(e,t){return e&&xr(e,t,Os)}function Cr(e,t){return Dt(t,(function(t){return Qa(e[t])}))}function kr(e,t){for(var n=0,o=(t=wo(t,e)).length;null!=e&&nt}function Pr(e,t){return null!=e&&Ze.call(e,t)}function Rr(e,t){return null!=e&&t in Te(e)}function Ir(e,t,n){for(var o=n?At:Ot,i=e[0].length,a=e.length,s=a,l=ae(a),u=1/0,c=[];s--;){var d=e[s];s&&t&&(d=Et(d,Qt(t))),u=xn(d.length,u),l[s]=!n&&(t||i>=120&&d.length>=120)?new Kn(s&&d):r}d=e[0];var h=-1,p=l[0];e:for(;++h=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;xi(o)?Ye.call(e,o,1):po(e,o)}}return e}function Kr(e,t){return e+gt(Cn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ai(Pi(e,t,ol),e+"")}function Qr(e){return Qn(Bs(e))}function Jr(e,t){var n=Bs(e);return Zi(n,lr(t,0,n.length))}function eo(e,t,n,o){if(!ts(e))return e;for(var i=-1,a=(t=wo(t,e)).length,s=a-1,l=e;null!=l&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ae(o);++r>>1,a=e[i];null!==a&&!us(a)&&(n?a<=t:a=200){var u=t?null:Xo(e);if(u)return dn(u);a=!1,o=en,l=new Kn}else l=t?[]:s;e:for(;++r=o?e:oo(e,t,n)}var ko=ut||function(e){return ft.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Mo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function To(e,t){var n=t?Mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Po(e,t){if(e!==t){var n=e!==r,o=null===e,i=e==e,a=us(e),s=t!==r,l=null===t,u=t==t,c=us(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||o&&s&&u||!n&&u||!i)return 1;if(!o&&!a&&!c&&e1?n[i-1]:r,s=i>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(i--,a):r,s&&wi(n[0],n[1],s)&&(a=i<3?r:a,i=1),t=Te(t);++o-1?i[a?t[s]:s]:r}}function Bo(e){return oi((function(t){var n=t.length,i=n,a=Hn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Ie(o);if(a&&!l&&"wrapper"==li(s))var l=new Hn([],!0)}for(i=l?i:n;++i1&&b.reverse(),h&&ul))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var h=-1,p=!0,f=2&n?new Kn:r;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(g,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Li(e){var t=0,n=0;return function(){var o=wn(),i=16-(o-n);if(n=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Zi(e,t){var n=-1,o=e.length,i=o-1;for(t=t===r?o:t;++n1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,aa(e,n)}));function pa(e){var t=Bn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ma=oi((function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Wn&&xi(n)?((o=o.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:r}),new Hn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(i)}));var ga=Ao((function(e,t,n){Ze.call(e,n)?++e[n]:ar(e,n,1)}));var va=zo(Hi),ya=zo(Wi);function ba(e,t){return(Wa(e)?Pt:pr)(e,ci(t,3))}function xa(e,t){return(Wa(e)?Rt:fr)(e,ci(t,3))}var wa=Ao((function(e,t,n){Ze.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Sa=Xr((function(e,t,n){var r=-1,o="function"==typeof t,i=Ua(e)?ae(e.length):[];return pr(e,(function(e){i[++r]=o?Mt(t,e,n):Dr(e,t,n)})),i})),Ca=Ao((function(e,t,n){ar(e,n,t)}));function ka(e,t){return(Wa(e)?Et:zr)(e,ci(t,3))}var _a=Ao((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ma=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,yr(t,1),[])})),Ta=ht||function(){return ft.Date.now()};function Pa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Jo(e,c,r,r,r,r,t)}function Ra(e,t){var n;if("function"!=typeof t)throw new Ie(o);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Ia=Xr((function(e,t,n){var r=1;if(n.length){var o=cn(n,ui(Ia));r|=l}return Jo(e,r,t,n,o)})),Da=Xr((function(e,t,n){var r=3;if(n.length){var o=cn(n,ui(Da));r|=l}return Jo(t,r,e,n,o)}));function Oa(e,t,n){var i,a,s,l,u,c,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new Ie(o);function m(t){var n=i,o=a;return i=a=r,d=t,l=e.apply(o,n)}function g(e){var n=e-c;return c===r||n>=t||n<0||p&&e-d>=s}function v(){var e=Ta();if(g(e))return y(e);u=Oi(v,function(e){var n=t-(e-c);return p?xn(n,s-(e-d)):n}(e))}function y(e){return u=r,f&&i?m(e):(i=a=r,l)}function b(){var e=Ta(),n=g(e);if(i=arguments,a=this,c=e,n){if(u===r)return function(e){return d=e,u=Oi(v,t),h?m(e):l}(c);if(p)return ko(u),u=Oi(v,t),m(c)}return u===r&&(u=Oi(v,t)),l}return t=vs(t)||0,ts(n)&&(h=!!n.leading,s=(p="maxWait"in n)?bn(vs(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==r&&ko(u),d=0,i=c=a=u=r},b.flush=function(){return u===r?l:y(Ta())},b}var Aa=Xr((function(e,t){return dr(e,1,t)})),Ea=Xr((function(e,t,n){return dr(e,vs(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(La.Cache||qn),n}function Za(e){if("function"!=typeof e)throw new Ie(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=qn;var Fa=So((function(e,t){var n=(t=1==t.length&&Wa(t[0])?Et(t[0],Qt(ci())):Et(yr(t,1),Qt(ci()))).length;return Xr((function(r){for(var o=-1,i=xn(r.length,n);++o=t})),Ha=Or(function(){return arguments}())?Or:function(e){return ns(e)&&Ze.call(e,"callee")&&!Ke.call(e,"callee")},Wa=ae.isArray,Ga=xt?Qt(xt):function(e){return ns(e)&&Mr(e)==A};function Ua(e){return null!=e&&es(e.length)&&!Qa(e)}function qa(e){return ns(e)&&Ua(e)}var Ka=bt||vl,Ya=wt?Qt(wt):function(e){return ns(e)&&Mr(e)==x};function Xa(e){if(!ns(e))return!1;var t=Mr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Qa(e){if(!ts(e))return!1;var t=Mr(e);return t==S||t==C||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=St?Qt(St):function(e){return ns(e)&&gi(e)==k};function os(e){return"number"==typeof e||ns(e)&&Mr(e)==_}function is(e){if(!ns(e)||Mr(e)!=M)return!1;var t=Ue(e);if(null===t)return!0;var n=Ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==ze}var as=Ct?Qt(Ct):function(e){return ns(e)&&Mr(e)==P};var ss=kt?Qt(kt):function(e){return ns(e)&&gi(e)==R};function ls(e){return"string"==typeof e||!Wa(e)&&ns(e)&&Mr(e)==I}function us(e){return"symbol"==typeof e||ns(e)&&Mr(e)==D}var cs=_t?Qt(_t):function(e){return ns(e)&&es(e.length)&&!!st[Mr(e)]};var ds=qo(Nr),hs=qo((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ua(e))return ls(e)?fn(e):Do(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=gi(e);return(t==k?ln:t==R?dn:Bs)(e)}function fs(e){return e?(e=vs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(ms(e),0,m):0}function vs(e){if("number"==typeof e)return e;if(us(e))return f;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ge.test(e);return n||ye.test(e)?dt(e.slice(2),n?2:8):me.test(e)?f:+e}function ys(e){return Oo(e,As(e))}function bs(e){return null==e?"":co(e)}var xs=Eo((function(e,t){if(_i(t)||Ua(t))Oo(t,Os(t),e);else for(var n in t)Ze.call(t,n)&&nr(e,n,t[n])})),ws=Eo((function(e,t){Oo(t,As(t),e)})),Ss=Eo((function(e,t,n,r){Oo(t,As(t),e,r)})),Cs=Eo((function(e,t,n,r){Oo(t,Os(t),e,r)})),ks=oi(sr);var _s=Xr((function(e,t){e=Te(e);var n=-1,o=t.length,i=o>2?t[2]:r;for(i&&wi(t[0],t[1],i)&&(o=1);++n1),t})),Oo(e,ai(e),n),r&&(n=ur(n,7,ni));for(var o=t.length;o--;)po(n,t[o]);return n}));var Fs=oi((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function js(e,t){if(null==e)return{};var n=Et(ai(e),(function(e){return[e]}));return t=ci(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Ns=Qo(Os),zs=Qo(As);function Bs(e){return null==e?[]:Jt(e,Os(e))}var Vs=jo((function(e,t,n){return t=t.toLowerCase(),e+(n?$s(t):t)}));function $s(e){return Xs(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(xe,rn).replace(et,"")}var Ws=jo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Gs=jo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Us=Fo("toLowerCase");var qs=jo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=jo((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Ys=jo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Fo("toUpperCase");function Qs(e,t,n){return e=bs(e),(t=n?r:t)===r?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Js=Xr((function(e,t){try{return Mt(e,r,t)}catch(e){return Xa(e)?e:new ke(e)}})),el=oi((function(e,t){return Pt(t,(function(t){t=ji(t),ar(e,t,Ia(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Bo(),rl=Bo(!0);function ol(e){return e}function il(e){return Zr("function"==typeof e?e:ur(e,1))}var al=Xr((function(e,t){return function(n){return Dr(n,e,t)}})),sl=Xr((function(e,t){return function(n){return Dr(e,n,t)}}));function ll(e,t,n){var r=Os(t),o=Cr(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Cr(t,Os(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Qa(e);return Pt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Do(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var cl=Wo(Et),dl=Wo(It),hl=Wo(jt);function pl(e){return Si(e)?Gt(ji(e)):function(e){return function(t){return kr(t,e)}}(e)}var fl=Uo(),ml=Uo(!0);function gl(){return[]}function vl(){return!1}var yl=Ho((function(e,t){return e+t}),0),bl=Yo("ceil"),xl=Ho((function(e,t){return e/t}),1),wl=Yo("floor");var Sl,Cl=Ho((function(e,t){return e*t}),1),kl=Yo("round"),_l=Ho((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ie(o);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Pa,Bn.assign=xs,Bn.assignIn=ws,Bn.assignInWith=Ss,Bn.assignWith=Cs,Bn.at=ks,Bn.before=Ra,Bn.bind=Ia,Bn.bindAll=el,Bn.bindKey=Da,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=pa,Bn.chunk=function(e,t,n){t=(n?wi(e,t,n):t===r)?1:bn(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=ae(mt(o/t));ii?0:i+n),(o=o===r||o>i?i:ms(o))<0&&(o+=i),o=n>o?0:gs(o);n>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=co(t))&&sn(e)?Co(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ie(o);return t=null==t?0:bn(ms(t),0),Xr((function(n){var r=n[t],o=Co(n,0,t);return r&&Lt(o,r),Mt(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?oo(e,0,(t=n||t===r?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=n||t===r?1:ms(t)))<0?0:t,o):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ie(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Oa(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=fa,Bn.toArray=ps,Bn.toPairs=Ns,Bn.toPairsIn=zs,Bn.toPath=function(e){return Wa(e)?Et(e,ji):us(e)?[e]:Do(Fi(bs(e)))},Bn.toPlainObject=ys,Bn.transform=function(e,t,n){var r=Wa(e),o=r||Ka(e)||cs(e);if(t=ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Qa(i)?Vn(Ue(e)):{}}return(o?Pt:wr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Pa(e,1)},Bn.union=na,Bn.unionBy=ra,Bn.unionWith=oa,Bn.uniq=function(e){return e&&e.length?ho(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?ho(e,ci(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ho(e,r,t):[]},Bn.unset=function(e,t){return null==e||po(e,t)},Bn.unzip=ia,Bn.unzipWith=aa,Bn.update=function(e,t,n){return null==e?e:fo(e,t,xo(n))},Bn.updateWith=function(e,t,n,o){return o="function"==typeof o?o:r,null==e?e:fo(e,t,xo(n),o)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:Jt(e,As(e))},Bn.without=sa,Bn.words=Qs,Bn.wrap=function(e,t){return ja(xo(t),e)},Bn.xor=la,Bn.xorBy=ua,Bn.xorWith=ca,Bn.zip=da,Bn.zipObject=function(e,t){return yo(e||[],t||[],nr)},Bn.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Bn.zipWith=ha,Bn.entries=Ns,Bn.entriesIn=zs,Bn.extend=ws,Bn.extendWith=Ss,ll(Bn,Bn),Bn.add=yl,Bn.attempt=Js,Bn.camelCase=Vs,Bn.capitalize=$s,Bn.ceil=bl,Bn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=vs(n))==n?n:0),t!==r&&(t=(t=vs(t))==t?t:0),lr(vs(e),t,n)},Bn.clone=function(e){return ur(e,4)},Bn.cloneDeep=function(e){return ur(e,5)},Bn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:r)},Bn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:r)},Bn.conformsTo=function(e,t){return null==t||cr(e,t,Os(t))},Bn.deburr=Hs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=xl,Bn.endsWith=function(e,t,n){e=bs(e),t=co(t);var o=e.length,i=n=n===r?o:lr(ms(n),0,o);return(n-=t.length)>=0&&e.slice(n,i)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=bs(e))&&Y.test(e)?e.replace(q,on):e},Bn.escapeRegExp=function(e){return(e=bs(e))&&oe.test(e)?e.replace(re,"\\$&"):e},Bn.every=function(e,t,n){var o=Wa(e)?It:mr;return n&&wi(e,t,n)&&(t=r),o(e,ci(t,3))},Bn.find=va,Bn.findIndex=Hi,Bn.findKey=function(e,t){return zt(e,ci(t,3),wr)},Bn.findLast=ya,Bn.findLastIndex=Wi,Bn.findLastKey=function(e,t){return zt(e,ci(t,3),Sr)},Bn.floor=wl,Bn.forEach=ba,Bn.forEachRight=xa,Bn.forIn=function(e,t){return null==e?e:br(e,ci(t,3),As)},Bn.forInRight=function(e,t){return null==e?e:xr(e,ci(t,3),As)},Bn.forOwn=function(e,t){return e&&wr(e,ci(t,3))},Bn.forOwnRight=function(e,t){return e&&Sr(e,ci(t,3))},Bn.get=Ts,Bn.gt=Va,Bn.gte=$a,Bn.has=function(e,t){return null!=e&&vi(e,t,Pr)},Bn.hasIn=Ps,Bn.head=Ui,Bn.identity=ol,Bn.includes=function(e,t,n,r){e=Ua(e)?e:Bs(e),n=n&&!r?ms(n):0;var o=e.length;return n<0&&(n=bn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Vt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ms(n);return o<0&&(o=bn(r+o,0)),Vt(e,t,o)},Bn.inRange=function(e,t,n){return t=fs(t),n===r?(n=t,t=0):n=fs(n),function(e,t,n){return e>=xn(t,n)&&e=-9007199254740991&&e<=p},Bn.isSet=ss,Bn.isString=ls,Bn.isSymbol=us,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===r},Bn.isWeakMap=function(e){return ns(e)&&gi(e)==O},Bn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Mr(e)},Bn.join=function(e,t){return null==e?"":Ut.call(e,t)},Bn.kebabCase=Ws,Bn.last=Xi,Bn.lastIndexOf=function(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var i=o;return n!==r&&(i=(i=ms(n))<0?bn(o+i,0):xn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,Ht,i,!0)},Bn.lowerCase=Gs,Bn.lowerFirst=Us,Bn.lt=ds,Bn.lte=hs,Bn.max=function(e){return e&&e.length?gr(e,ol,Tr):r},Bn.maxBy=function(e,t){return e&&e.length?gr(e,ci(t,2),Tr):r},Bn.mean=function(e){return Wt(e,ol)},Bn.meanBy=function(e,t){return Wt(e,ci(t,2))},Bn.min=function(e){return e&&e.length?gr(e,ol,Nr):r},Bn.minBy=function(e,t){return e&&e.length?gr(e,ci(t,2),Nr):r},Bn.stubArray=gl,Bn.stubFalse=vl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Cl,Bn.nth=function(e,t){return e&&e.length?Hr(e,ms(t)):r},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=ul,Bn.now=Ta,Bn.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Go(gt(o),n)+e+Go(mt(o),n)},Bn.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;return t&&rt){var o=e;e=t,t=o}if(n||e%1||t%1){var i=Cn();return xn(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return Kr(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?Zt:qt,o=arguments.length<3;return r(e,ci(t,4),n,o,pr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Ft:qt,o=arguments.length<3;return r(e,ci(t,4),n,o,fr)},Bn.repeat=function(e,t,n){return t=(n?wi(e,t,n):t===r)?1:ms(t),Yr(bs(e),t)},Bn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var o=-1,i=(t=wo(t,e)).length;for(i||(i=1,e=r);++op)return[];var n=m,r=xn(e,m);t=ci(t),e-=m;for(var o=Yt(r,t);++n=a)return e;var l=n-pn(o);if(l<1)return o;var u=s?Co(s,0,l).join(""):e.slice(0,l);if(i===r)return u+o;if(s&&(l+=u.length-l),as(i)){if(e.slice(l).search(i)){var c,d=u;for(i.global||(i=Pe(i.source,bs(fe.exec(i))+"g")),i.lastIndex=0;c=i.exec(d);)var h=c.index;u=u.slice(0,h===r?l:h)}}else if(e.indexOf(co(i),l)!=l){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+o},Bn.unescape=function(e){return(e=bs(e))&&K.test(e)?e.replace(U,gn):e},Bn.uniqueId=function(e){var t=++Fe;return bs(e)+t},Bn.upperCase=Ys,Bn.upperFirst=Xs,Bn.each=ba,Bn.eachRight=xa,Bn.first=Ui,ll(Bn,(Sl={},wr(Bn,(function(e,t){Ze.call(Bn.prototype,t)||(Sl[t]=e)})),Sl),{chain:!1}),Bn.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Pt(["drop","take"],(function(e,t){Wn.prototype[e]=function(n){n=n===r?1:bn(ms(n),0);var o=this.__filtered__&&!t?new Wn(this):this.clone();return o.__filtered__?o.__takeCount__=xn(n,o.__takeCount__):o.__views__.push({size:xn(n,m),type:e+(o.__dir__<0?"Right":"")}),o},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Pt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(ol)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Dr(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(Za(ci(e)))},Wn.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},wr(Wn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Bn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Wn,u=s[0],c=l||Wa(t),d=function(e){var t=i.apply(Bn,Lt([e],s));return o&&h?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=a&&!h,m=l&&!p;if(!a&&c){t=m?t:new Wn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:r}),new Hn(g,h)}return f&&m?e.apply(this,s):(g=this.thru(d),f?o?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),wr(Wn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ze.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}})),On[Vo(r,2).name]=[{name:"wrapper",func:r}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Do(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Do(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Do(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var o=zi(n);o.__index__=0,o.__values__=r,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ta],thisArg:r}),new Hn(t,this.__chain__)}return this.thru(ta)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ft._=vn,define((function(){return vn}))):gt?((gt.exports=vn)._=vn,mt._=vn):ft._=vn}.call(this)},15409:function(e,t,n){var r=n(40015),o=n(7270)((function(e,t,n){r(e,t,n)}));e.exports=o},82846:function(e,t,n){var r=n(77400);e.exports=function(){return r.Date.now()}},15937:function(e){e.exports=function(){return[]}},57714:function(e){e.exports=function(){return!1}},91936:function(e,t,n){var r=n(74833),o=n(11611),i=n(55193),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},89328:function(e,t,n){var r=n(35159),o=n(53893);e.exports=function(e){return r(e,o(e))}},79356:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M6,17C6,15 10,13.9 12,13.9C14,13.9 18,15 18,17V18H6M15,9A3,3 0 0,1 12,12A3,3 0 0,1 9,9A3,3 0 0,1 12,6A3,3 0 0,1 15,9M3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5C3.89,3 3,3.9 3,5Z","AccountBox")},68477:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z","AccountCircle")},53312:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,3H21V7H3V3M4,8H20V21H4V8M9.5,11A0.5,0.5 0 0,0 9,11.5V13H15V11.5A0.5,0.5 0 0,0 14.5,11H9.5Z","Archive")},67835:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M2.65 3C2.3 3 2 3.3 2 3.65C2 3.69 2 3.73 2 3.77L4.73 20.27C4.8 20.69 5.16 21 5.58 21H18.63C18.94 21 19.22 20.78 19.27 20.46L22 3.77C22.05 3.42 21.81 3.09 21.46 3.04C21.43 3.03 21.39 3.03 21.35 3.03L2.65 3M14.1 14.95H9.94L8.81 9.07H15.11L14.1 14.95Z","Bitbucket")},22118:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18C11.11,18 10.26,17.8 9.5,17.45C11.56,16.5 13,14.42 13,12C13,9.58 11.56,7.5 9.5,6.55C10.26,6.2 11.11,6 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z","Brightness4")},55182:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z","Brightness5")},59986:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},12449:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},84974:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},20791:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,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","Circle")},10763:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},77463:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z","Cog")},50737:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M14.19,14.19L6,18L9.81,9.81L18,6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,10.9A1.1,1.1 0 0,0 10.9,12A1.1,1.1 0 0,0 12,13.1A1.1,1.1 0 0,0 13.1,12A1.1,1.1 0 0,0 12,10.9Z","Compass")},50345:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z","ContentCopy")},45276:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M4,9V12C4,14.21 7.58,16 12,16C16.42,16 20,14.21 20,12V9C20,11.21 16.42,13 12,13C7.58,13 4,11.21 4,9M4,14V17C4,19.21 7.58,21 12,21C16.42,21 20,19.21 20,17V14C20,16.21 16.42,18 12,18C7.58,18 4,16.21 4,14Z","Database")},80354:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},22446:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},11682:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},40141:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z","EmoticonSadOutline")},28418:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},57689:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},41760:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z","FormatListBulleted")},95898:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z","Github")},6504:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69","Gitlab")},391:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3","History")},54445:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z","Home")},82026:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("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","Information")},39398:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},60550:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z","Logout")},66268:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},93051:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z","Menu")},83504:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,10L12,15L17,10H7Z","MenuDown")},86396:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H5V11H19V13Z","Minus")},22212:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z","Pencil")},1889:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},75186:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},33755:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},98628:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.08 16L12 14.15L8.93 16L9.74 12.5L7.03 10.16L10.61 9.85L12 6.55L13.39 9.84L16.97 10.15L14.26 12.5L15.08 16Z","ShieldStar")},40830:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,6.7L13.45,10.55L17.3,12L13.45,13.45L12,17.3L10.55,13.45L6.7,12L10.55,10.55L12,6.7M12,1L9,9L1,12L9,15L12,23L15,15L23,12L15,9L12,1Z","StarFourPointsOutline")},41973:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z","ViewDashboard")},30265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(87554),o=n(24246);t.default=function(e,t){return(0,r.createSvgIcon)((0,o.jsx)("path",{d:e}),t)}},74638:function(e,t,n){"use strict";n.d(t,{Z:()=>K});var r,o,i,a,s,l,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(){return o?r:(o=1,r={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}})}function h(){if(a)return i;a=1;const e=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function n(r,o,i,a,s,l,u){if(!isNaN(+r))return+r;let c="",d=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==r)return-1*n(d,o,i,a,s,l);for(let t=0;t{f[l[e]]=e}));let m=Object.keys(f).sort().reverse(),g=m.length;for(let e=0;e"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function o(t){return void 0!==e.unformat(t)}function i(e,t,r,o=!1){let a=Object.keys(e).map((o=>{if(!t[o])return console.error(`${r} Invalid key: ${o}`),!1;let a=e[o],s=t[o];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!i(a,n,`[Validate ${o}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${o} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n{let o=t[n];if("string"==typeof o&&(o={type:o}),o.mandatory){let t=o.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0}))),a.reduce(((e,t)=>e&&t),!0)}function a(e){return i(e,n,"[Validate format]")}return s={validate:function(e,t){let n=o(e),r=a(t);return n&&r},validateFormat:a,validateInput:o,validateLanguage:function(e){return i(e,r,"[Validate language]")}},s}var f,m,g={parseFormat:function(e,t={}){return"string"!=typeof e?e:(function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e=function(e,t){let n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e=function(e,t){let n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),t),t),function(e,t){let n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){let n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){let n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){let n=e.split(".")[1];if(n){let e=n.match(/0+/);e&&(t.mantissa=e[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){const n=e.split(".")[1];n&&(t.trimMantissa=-1!==n.indexOf("["))}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}};function v(){if(m)return f;m=1;const e=d(),t=p(),n=g;let r,o={},i={},a=null,s={};function l(e){r=e}function u(){return i[r]}return o.languages=()=>Object.assign({},i),o.currentLanguage=()=>r,o.currentBytes=()=>u().bytes||{},o.currentCurrency=()=>u().currency,o.currentAbbreviations=()=>u().abbreviations,o.currentDelimiters=()=>u().delimiters,o.currentOrdinal=()=>u().ordinal,o.currentDefaults=()=>Object.assign({},u().defaults,s),o.currentOrdinalDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().ordinalFormat),o.currentByteDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().byteFormat),o.currentPercentageDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().percentageFormat),o.currentCurrencyDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().currencyFormat),o.currentTimeDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().timeFormat),o.setDefaults=e=>{e=n.parseFormat(e),t.validateFormat(e)&&(s=e)},o.getZeroFormat=()=>a,o.setZeroFormat=e=>a="string"==typeof e?e:null,o.hasZeroFormat=()=>null!==a,o.languageData=e=>{if(e){if(i[e])return i[e];throw new Error(`Unknown tag "${e}"`)}return u()},o.registerLanguage=(e,n=!1)=>{if(!t.validateLanguage(e))throw new Error("Invalid language data");i[e.languageTag]=e,n&&l(e.languageTag)},o.setLanguage=(t,n=e.languageTag)=>{if(!i[t]){let e=t.split("-")[0],r=Object.keys(i).find((t=>t.split("-")[0]===e));return i[r]?void l(r):void l(n)}l(t)},o.registerLanguage(e),r=e.languageTag,f=o}function y(e,t){e.forEach((e=>{let n;try{n=function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}n&&t.registerLanguage(n)}))}var b,x={exports:{}};b=x,function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,o=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",s=1e14,l=14,u=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,h=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function f(e){for(var t,n,r=1,o=e.length,i=e[0]+"";ru^n?1:-1;for(s=(l=o.length)<(u=i.length)?l:u,a=0;ai[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function g(e,t,n,r){if(en||e!==o(e))throw Error(i+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return p(e.e/l)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else tF?m.c=m.e=null:e.e=10;d/=10,c++);return void(c>F?m.c=m.e=null:(m.e=c,m.c=[e]))}f=String(e)}else{if(!n.test(f=String(e)))return S(m,f,h);m.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(c=f.indexOf("."))>-1&&(f=f.replace(".","")),(d=f.search(/e/i))>0?(c<0&&(c=d),c+=+f.slice(d+1),f=f.substring(0,d)):c<0&&(c=f.length)}else{if(g(t,2,V.length,"Base"),10==t&&$)return q(m=new H(e),O+m.e+1,A);if(f=String(e),h="number"==typeof e){if(0*e!=0)return S(m,f,h,t);if(m.s=1/e<0?(f=f.slice(1),-1):1,H.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else m.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=V.slice(0,t),c=d=0,p=f.length;dc){c=p;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,d=-1,c=0;continue}return S(m,String(e),h,t)}h=!1,(c=(f=w(f,t,10,m.s)).indexOf("."))>-1?f=f.replace(".",""):c=f.length}for(d=0;48===f.charCodeAt(d);d++);for(p=f.length;48===f.charCodeAt(--p););if(f=f.slice(d,++p)){if(p-=d,h&&H.DEBUG&&p>15&&(e>u||e!==o(e)))throw Error(a+m.s*e);if((c=c-d-1)>F)m.c=m.e=null;else if(c=L)?y(l,a):x(l,a,"0");else if(i=(e=q(new H(e),t,n)).e,s=(l=f(e.c)).length,1==r||2==r&&(t<=i||i<=E)){for(;ss){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=i-s)>0)for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&o?"-"+l:l}function G(e,t){for(var n,r,o=1,i=new H(e[0]);o=10;o/=10,r++);return(n=r+n*l-1)>F?e.c=e.e=null:n=10;h/=10,a++);if((u=t-a)<0)u+=l,d=t,p=g[f=0],m=o(p/v[a-d-1]%10);else if((f=r((u+1)/l))>=g.length){if(!i)break e;for(;g.length<=f;g.push(0));p=m=0,a=1,d=(u%=l)-l+1}else{for(p=h=g[f],a=1;h>=10;h/=10,a++);m=(d=(u%=l)-l+a)<0?0:o(p/v[a-d-1]%10)}if(i=i||t<0||null!=g[f+1]||(d<0?p:p%v[a-d-1]),i=n<4?(m||i)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||i||6==n&&(u>0?d>0?p/v[a-d]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,i?(t-=e.e+1,g[0]=v[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==u?(g.length=f,h=1,f--):(g.length=f+1,h=v[l-u],g[f]=d>0?o(p/v[a-d]%v[d])*h:0),i)for(;;){if(0==f){for(u=1,d=g[0];d>=10;d/=10,u++);for(d=g[0]+=h,h=1;d>=10;d/=10,h++);u!=h&&(e.e++,g[0]==s&&(g[0]=1));break}if(g[f]+=h,g[f]!=s)break;g[f--]=0,h=1}for(u=g.length;0===g[--u];g.pop());}e.e>F?e.c=e.e=null:e.e=L?y(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(n=e[t],0,h,t),O=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(n=e[t],0,8,t),A=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(g(n[0],-h,0,t),g(n[1],0,h,t),E=n[0],L=n[1]):(g(n,-h,h,t),E=-(L=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)g(n[0],-h,-1,t),g(n[1],1,h,t),Z=n[0],F=n[1];else{if(g(n,-h,h,t),!n)throw Error(i+t+" cannot be zero: "+n);Z=-(F=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(i+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!n,Error(i+"crypto unavailable");j=n}else j=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(n=e[t],0,9,t),N=n),e.hasOwnProperty(t="POW_PRECISION")&&(g(n=e[t],0,h,t),z=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(i+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(i+t+" invalid: "+n);$="0123456789"==n.slice(0,10),V=n}}return{DECIMAL_PLACES:O,ROUNDING_MODE:A,EXPONENTIAL_AT:[E,L],RANGE:[Z,F],CRYPTO:j,MODULO_MODE:N,POW_PRECISION:z,FORMAT:B,ALPHABET:V}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,a=e.e,u=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===u||-1===u)&&a>=-h&&a<=h&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%l)<1&&(t+=l),String(r[0]).length==t){for(t=0;t=s||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===u||1===u||-1===u))return!0;throw Error(i+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return G(arguments,-1)},H.minimum=H.min=function(){return G(arguments,1)},H.random=(C=9007199254740992,k=Math.random()*C&2097151?function(){return o(Math.random()*C)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,a,s,u,d=0,p=[],f=new H(D);if(null==e?e=O:g(e,0,h),s=r(e/l),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));d>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[d]=n[0],t[d+1]=n[1]):(p.push(u%1e14),d+=2);d=s/2}else{if(!crypto.randomBytes)throw j=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(s*=7);d=9e15?crypto.randomBytes(7).copy(t,d):(p.push(u%1e14),d+=7);d=s/7}if(!j)for(;d=10;u/=10,d++);dn-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(n,r,o,i,a){var s,l,u,c,d,h,p,m,g=n.indexOf("."),v=O,y=A;for(g>=0&&(c=z,z=0,n=n.replace(".",""),h=(m=new H(r)).pow(n.length-g),z=c,m.c=t(x(f(h.c),h.e,"0"),10,o,e),m.e=m.c.length),u=c=(p=t(n,r,o,a?(s=V,e):(s=e,V))).length;0==p[--c];p.pop());if(!p[0])return s.charAt(0);if(g<0?--u:(h.c=p,h.e=u,h.s=i,p=(h=b(h,m,v,y,o)).c,d=h.r,u=h.e),g=p[l=u+v+1],c=o/2,d=d||l<0||null!=p[l+1],d=y<4?(null!=g||d)&&(0==y||y==(h.s<0?3:2)):g>c||g==c&&(4==y||d||6==y&&1&p[l-1]||y==(h.s<0?8:7)),l<1||!p[0])n=d?x(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(p.length=l,d)for(--o;++p[--l]>o;)p[l]=0,l||(++u,p=[1].concat(p));for(c=p.length;!p[--c];);for(g=0,n="";g<=c;n+=s.charAt(p[g++]));n=x(n,u,s.charAt(0))}return n}}(),b=function(){function e(e,t,n){var r,o,i,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((o=u*(i=e[l]%d)+(r=c*i+(a=e[l]/d|0)*u)%d*d+s)/n|0)+(r/d|0)+c*a,e[l]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]1;e.splice(0,1));}return function(r,i,a,u,c){var d,h,f,m,g,v,y,b,x,w,S,C,k,_,M,T,P,R=r.s==i.s?1:-1,I=r.c,D=i.c;if(!(I&&I[0]&&D&&D[0]))return new H(r.s&&i.s&&(I?!D||I[0]!=D[0]:D)?I&&0==I[0]||!D?0*R:R/0:NaN);for(x=(b=new H(R)).c=[],R=a+(h=r.e-i.e)+1,c||(c=s,h=p(r.e/l)-p(i.e/l),R=R/l|0),f=0;D[f]==(I[f]||0);f++);if(D[f]>(I[f]||0)&&h--,R<0)x.push(1),m=!0;else{for(_=I.length,T=D.length,f=0,R+=2,(g=o(c/(D[0]+1)))>1&&(D=e(D,g,c),I=e(I,g,c),T=D.length,_=I.length),k=T,S=(w=I.slice(0,T)).length;S=c/2&&M++;do{if(g=0,(d=t(D,w,T,S))<0){if(C=w[0],T!=S&&(C=C*c+(w[1]||0)),(g=o(C/M))>1)for(g>=c&&(g=c-1),y=(v=e(D,g,c)).length,S=w.length;1==t(v,w,y,S);)g--,n(v,T=10;R/=10,f++);q(b,a+(b.e=f+h*l-1)+1,u,m)}else b.e=h,b.r=+m;return b}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,M=/^([^.]+)\.$/,T=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var o,a=n?t:t.replace(R,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(_,(function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t})),r&&(o=r,a=a.replace(M,"$1").replace(T,"0.$1")),t!=a))return new H(a,o);if(H.DEBUG)throw Error(i+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return m(this,new H(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,o,i=this;if(null!=e)return g(e,0,h),null==t?t=A:g(t,0,8),q(new H(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-p(this.e/l))*l,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return b(this,new H(e,t),O,A)},I.dividedToIntegerBy=I.idiv=function(e,t){return b(this,new H(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,a,s,u,c,d,h,p,f=this;if((e=new H(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+K(e));if(null!=t&&(t=new H(t)),c=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new H(Math.pow(+K(f),c?e.s*(2-v(e)):+K(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(a=!d&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||c&&f.c[1]>=24e7:f.c[0]<8e13||c&&f.c[0]<=9999975e7)))return u=f.s<0&&v(e)?-0:0,f.e>-1&&(u=1/u),new H(d?1/u:u);z&&(u=r(z/l+2))}for(c?(n=new H(.5),d&&(e.s=1),h=v(e)):h=(s=Math.abs(+K(e)))%2,p=new H(D);;){if(h){if(!(p=p.times(f)).c)break;u?p.c.length>u&&(p.c.length=u):a&&(p=p.mod(t))}if(s){if(0===(s=o(s/2)))break;h=s%2}else if(q(e=e.times(n),e.e+1,1),e.e>14)h=v(e);else{if(0==(s=+K(e)))break;h=s%2}f=f.times(f),u?f.c&&f.c.length>u&&(f.c.length=u):a&&(f=f.mod(t))}return a?p:(d&&(p=D.div(p)),t?p.mod(t):u?q(p,z,A,void 0):p)},I.integerValue=function(e){var t=new H(this);return null==e?e=A:g(e,0,8),q(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===m(this,new H(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return m(this,new H(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=m(this,new H(e,t)))||0===t},I.isInteger=function(){return!!this.c&&p(this.e/l)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return m(this,new H(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=m(this,new H(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,o,i,a=this,u=a.s;if(t=(e=new H(e,t)).s,!u||!t)return new H(NaN);if(u!=t)return e.s=-t,a.plus(e);var c=a.e/l,d=e.e/l,h=a.c,f=e.c;if(!c||!d){if(!h||!f)return h?(e.s=-t,e):new H(f?a:NaN);if(!h[0]||!f[0])return f[0]?(e.s=-t,e):new H(h[0]?a:3==A?-0:0)}if(c=p(c),d=p(d),h=h.slice(),u=c-d){for((i=u<0)?(u=-u,o=h):(d=c,o=f),o.reverse(),t=u;t--;o.push(0));o.reverse()}else for(r=(i=(u=h.length)<(t=f.length))?u:t,u=t=0;t0)for(;t--;h[n++]=0);for(t=s-1;r>u;){if(h[--r]=0;){for(n=0,g=C[o]%x,v=C[o]/x|0,i=o+(a=c);i>o;)n=((h=g*(h=S[--a]%x)+(u=v*h+(f=S[a]/x|0)*g)%x*x+y[i]+n)/b|0)+(u/x|0)+v*f,y[i--]=h%b;y[i]=n}return n?++r:y.splice(0,1),U(e,y,r)},I.negated=function(){var e=new H(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new H(e,t)).s,!o||!t)return new H(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/l,a=e.e/l,u=r.c,c=e.c;if(!i||!a){if(!u||!c)return new H(o/0);if(!u[0]||!c[0])return c[0]?e:new H(u[0]?r:0*o)}if(i=p(i),a=p(a),u=u.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=u),n.reverse();o--;n.push(0));n.reverse()}for((o=u.length)-(t=c.length)<0&&(n=c,c=u,u=n,t=o),o=0;t;)o=(u[--t]=u[t]+c[t]+o)/s|0,u[t]=s===u[t]?0:u[t]%s;return o&&(u=[o].concat(u),++a),U(e,u,a)},I.precision=I.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return g(e,1,h),null==t?t=A:g(t,0,8),q(new H(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*l+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return g(e,-9007199254740991,u),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,n,r,o,i=this,a=i.c,s=i.s,l=i.e,u=O+4,c=new H("0.5");if(1!==s||!a||!a[0])return new H(!s||s<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(s=Math.sqrt(+K(i)))||s==1/0?(((t=f(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),n=new H(t=s==1/0?"5e"+l:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new H(s+""),n.c[0])for((s=(l=n.e)+u)<3&&(s=0);;)if(o=n,n=c.times(o.plus(b(i,o,u,1))),f(o.c).slice(0,s)===(t=f(n.c)).slice(0,s)){if(n.e0&&m>0){for(a=m%l||l,d=f.substr(0,a);a0&&(d+=c+f.slice(a)),p&&(d="-"+d)}r=h?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):d}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,n,r,o,a,s,u,d,h,p,m,g,v=this,y=v.c;if(null!=e&&(!(u=new H(e)).isInteger()&&(u.c||1!==u.s)||u.lt(D)))throw Error(i+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!y)return new H(v);for(t=new H(D),h=n=new H(D),r=d=new H(D),g=f(y),a=t.e=g.length-v.e-1,t.c[0]=c[(s=a%l)<0?l+s:s],e=!e||u.comparedTo(t)>0?a>0?t:h:u,s=F,F=1/0,u=new H(g),d.c[0]=0;p=b(u,t,0,1),1!=(o=n.plus(p.times(r))).comparedTo(e);)n=r,r=o,h=d.plus(p.times(o=h)),d=o,t=u.minus(p.times(o=t)),u=o;return o=b(e.minus(n),r,0,1),d=d.plus(o.times(h)),n=n.plus(o.times(r)),d.s=h.s=v.s,m=b(h,r,a*=2,A).minus(v).abs().comparedTo(b(d,n,a,A).minus(v).abs())<1?[h,r]:[d,n],F=s,m},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&g(e,1,h),W(this,e,t,2)},I.toString=function(e){var t,n=this,r=n.s,o=n.e;return null===o?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=o<=E||o>=L?y(f(n.c),o):x(f(n.c),o,"0"):10===e&&$?t=x(f((n=q(new H(n),O+o+1,A)).c),n.e,"0"):(g(e,2,V.length,"Base"),t=w(x(f(n.c),o,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,null!=t&&H.set(t),H}(),t.default=t.BigNumber=t,b.exports?b.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(u);var w=x.exports;const S=v(),C=p(),k=g,_=w,M={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},T={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:P,decimalSuffixes:R}=S.currentBytes(),I={general:{scale:1024,suffixes:R,marker:"bd"},binary:{scale:1024,suffixes:P,marker:"b"},decimal:{scale:1e3,suffixes:R,marker:"d"}};function D(e,t={},n){if("string"==typeof t&&(t=k.parseFormat(t)),!C.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",o=t.postfix||"",i=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){const r=n.currentCurrency();let o,i=Object.assign({},t),a=Object.assign({},T,i),s="",l=!!a.totalLength||!!a.forceAverage||a.average,u=i.currencyPosition||r.position,c=i.currencySymbol||r.symbol;const d=void 0!==a.spaceSeparatedCurrency?a.spaceSeparatedCurrency:a.spaceSeparated;void 0===i.lowPrecision&&(i.lowPrecision=!1);d&&(s=" ");"infix"===u&&(o=s+c+s);let h=L({instance:e,providedFormat:i,state:n,decimalSeparator:o});"prefix"===u&&(h=e._value<0&&"sign"===a.negative?`-${s}${c}${h.slice(1)}`:e._value>0&&a.forceSign?`+${s}${c}${h.slice(1)}`:c+s+h);u&&"postfix"!==u||(s=!a.spaceSeparatedAbbreviation&&l?"":s,h=h+s+c);return h}(e,t=Z(t,S.currentCurrencyDefaultFormat()),S);case"percent":return function(e,t,n,r){let o=t.prefixSymbol,i=L({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},T,t);if(o)return`%${a.spaceSeparated?" ":""}${i}`;return`${i}${a.spaceSeparated?" ":""}%`}(e,t=Z(t,S.currentPercentageDefaultFormat()),S,n);case"byte":return function(e,t,n,r){let o=t.base||"binary",i=Object.assign({},T,t);const{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes();let l={general:{scale:1024,suffixes:s||R,marker:"bd"},binary:{scale:1024,suffixes:a||P,marker:"b"},decimal:{scale:1e3,suffixes:s||R,marker:"d"}}[o],{value:u,suffix:c}=O(e._value,l.suffixes,l.scale),d=L({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${i.spaceSeparated?" ":""}${c}`}(e,t=Z(t,S.currentByteDefaultFormat()),S,n);case"time":return t=Z(t,S.currentTimeDefaultFormat()),function(e){let t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return`${t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}`}(e);case"ordinal":return function(e,t,n){let r=n.currentOrdinal(),o=Object.assign({},T,t),i=L({instance:e,providedFormat:t,state:n}),a=r(e._value);return`${i}${o.spaceSeparated?" ":""}${a}`}(e,t=Z(t,S.currentOrdinalDefaultFormat()),S);default:return L({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return i=function(e,t){return t+e}(i,r),i=function(e,t){return e+t}(i,o),i}function O(e,t,n){let r=t[0],o=Math.abs(e);if(o>=n){for(let i=1;i=a&&o0)n=i+a+A(o-a.length);else{let e=".";e=+i<0?`-0${e}`:`0${e}`;let r=(A(-o-1)+Math.abs(i)+a).substr(0,t);r.length0&&t>0&&(n+=`.${A(t)}`),n}(e,t);return new _(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}function L({instance:e,providedFormat:t,state:n=S,decimalSeparator:r,defaults:o=n.currentDefaults()}){let i=e._value;if(0===i&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(i))return i.toString();let a=Object.assign({},T,o,t),s=a.totalLength,l=s?0:a.characteristic,u=a.optionalCharacteristic,c=a.forceAverage,d=a.lowPrecision,h=!!s||!!c||a.average,p=s?-1:h&&void 0===t.mantissa?0:a.mantissa,f=!s&&(void 0===t.optionalMantissa?-1===p:a.optionalMantissa),m=a.trimMantissa,g=a.thousandSeparated,v=a.spaceSeparated,y=a.negative,b=a.forceSign,x=a.exponential,w=a.roundingFunction,C="";if(h){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:o=!1,totalLength:i=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&r[t]&&M[t]?(s=r[t],e/=M[t]):l>=M.trillion||n&&1===a(l/M.trillion)?(s=r.trillion,e/=M.trillion):l=M.billion||n&&1===a(l/M.billion)?(s=r.billion,e/=M.billion):l=M.million||n&&1===a(l/M.million)?(s=r.million,e/=M.million):(l=M.thousand||n&&1===a(l/M.thousand))&&(s=r.thousand,e/=M.thousand),s&&(s=(o?" ":"")+s),i){let t=e<0,n=e.toString().split(".")[0],r=t?n.length-1:n.length;u=Math.max(i-r,0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:i,forceAverage:c,lowPrecision:d,abbreviations:n.currentAbbreviations(),spaceSeparated:v,roundingFunction:w,totalLength:s});i=e.value,C+=e.abbreviation,s&&(p=e.mantissaPrecision)}if(x){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),o=+n;return t?(1=0?`+${r}`:r),{value:o,abbreviation:`e${r}`}):{value:o,abbreviation:`e${r}`}}({value:i,characteristicPrecision:l});i=e.value,C=e.abbreviation+C}let k=function(e,t,n,r,o,i){if(-1===r)return e;let a=E(t,r,i),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||o))return s;let u=l.match(/0+$/);return o&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(i.toString(),i,f,p,m,w);return k=function(e,t,n,r){let o=e,[i,a]=o.toString().split(".");if(i.match(/^-?0$/)&&n)return a?`${i.replace("0","")}.${a}`:i.replace("0","");const s=t<0&&0===i.indexOf("-");if(s&&(i=i.slice(1),o=o.slice(1)),i.length0;o--)r===t&&(n.unshift(o),r=0),r++;return n}(u.length,s);e.forEach(((e,t)=>{u=u.slice(0,e+t)+a+u.slice(e+t)})),d&&(u=`-${u}`)}return l=c?u+o+c:u,l}(k,i,g,n,r),(h||x)&&(k=function(e,t){return e+t}(k,C)),(b||i<0)&&(k=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):t>0?`+${e}`:"sign"===n?e:`(${e.replace("-","")})`}(k,i,y)),k}function Z(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}const F=w;function j(e,t,n){let r=new F(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new F(o),e._value=r.minus(o).toNumber(),e}const N=v(),z=p(),B=(e=>({loadLanguagesInNode:t=>y(t,e)}))(q),V=h();let $=(e=>({format:(...t)=>D(...t,e),getByteUnit:(...t)=>function(e){let t=I.general;return O(e._value,t.suffixes,t.scale).suffix}(...t,e),getBinaryByteUnit:(...t)=>function(e){let t=I.binary;return O(e._value,t.suffixes,t.scale).suffix}(...t,e),getDecimalByteUnit:(...t)=>function(e){let t=I.decimal;return O(e._value,t.suffixes,t.scale).suffix}(...t,e),formatOrDefault:Z}))(q),H=(e=>({add:(t,n)=>function(e,t,n){let r=new F(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new F(o),e._value=r.plus(o).toNumber(),e}(t,n,e),subtract:(t,n)=>j(t,n,e),multiply:(t,n)=>function(e,t,n){let r=new F(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new F(o),e._value=r.times(o).toNumber(),e}(t,n,e),divide:(t,n)=>function(e,t,n){let r=new F(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new F(o),e._value=r.dividedBy(o).toNumber(),e}(t,n,e),set:(t,n)=>function(e,t,n){let r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e),difference:(t,n)=>function(e,t,n){let r=n(e._value);return j(r,t,n),Math.abs(r._value)}(t,n,e),BigNumber:F}))(q);const W=g;class G{constructor(e){this._value=e}clone(){return q(this._value)}format(e={}){return $.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=W.parseFormat(e)),(e=$.formatOrDefault(e,N.currentCurrencyDefaultFormat())).output="currency",$.format(this,e)}formatTime(e={}){return e.output="time",$.format(this,e)}binaryByteUnits(){return $.getBinaryByteUnit(this)}decimalByteUnits(){return $.getDecimalByteUnit(this)}byteUnits(){return $.getByteUnit(this)}difference(e){return H.difference(this,e)}add(e){return H.add(this,e)}subtract(e){return H.subtract(this,e)}multiply(e){return H.multiply(this,e)}divide(e){return H.divide(this,e)}set(e){return H.set(this,U(e))}value(){return this._value}valueOf(){return this._value}}function U(e){let t=e;return q.isNumbro(e)?t=e._value:"string"==typeof e?t=q.unformat(e):isNaN(e)&&(t=NaN),t}function q(e){return new G(U(e))}q.version="2.5.0",q.isNumbro=function(e){return e instanceof G},q.language=N.currentLanguage,q.registerLanguage=N.registerLanguage,q.setLanguage=N.setLanguage,q.languages=N.languages,q.languageData=N.languageData,q.zeroFormat=N.setZeroFormat,q.defaultFormat=N.currentDefaults,q.setDefaults=N.setDefaults,q.defaultCurrencyFormat=N.currentCurrencyDefaultFormat,q.validate=z.validate,q.loadLanguagesInNode=B.loadLanguagesInNode,q.unformat=V.unformat,q.BigNumber=H.BigNumber;var K=c(q)},58772:function(e,t,n){"use strict";var r=n(90331);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=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:i,resetWarningCache:o};return n.PropTypes=n,n}},23615:function(e,t,n){e.exports=n(58772)()},90331:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},43577:function(e,t,n){"use strict";var r=n(27378),o=n(91102);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n