// ==UserScript== // @name Arca Refresher // @description Arca Live Extension // @version 3.37.5 // @author LeKAKiD // @supportURL https://arca.live/b/namurefresher // @exclude https://*.arca.live/api/* // @match https://*.arca.live/* // @connect namu.la // @connect saucenao.com // @connect ascii2d.net // @grant GM_info // @grant GM_openInTab // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_listValues // @grant GM_xmlhttpRequest // @grant unsafeWindow // @homepageURL https://github.com/lekakid/ArcaRefresher // @icon https://github.com/lekakid/ArcaRefresher/blob/develop/icon.png?raw=true // @namespace LeKAKiD // @noframes // @run-at document-body // @downloadURL https://update.greasyfork.cloud/scripts/423962/Arca%20Refresher.user.js // @updateURL https://update.greasyfork.cloud/scripts/423962/Arca%20Refresher.meta.js // ==/UserScript== /*! For license information please see ArcaRefresher.user.js.LICENSE.txt */ (()=>{var e,t,r={84300:(e,t,r)=>{"use strict";r.d(t,{A:()=>ne});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=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,r),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 r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(x,--b):0,g--,10===y&&(g=1,m--),y}function S(){return y=b2||j(y)>3?"":" "}function I(e,t){for(;--t&&S()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return E(e,_()+(t<6&&32==k()&&32==S()))}function T(e){for(;S();)switch(y){case e:return b;case 34:case 39:34!==e&&39!==e&&T(y);break;case 40:41===e&&T(e);break;case 92:S()}return b}function $(e,t){for(;S()&&e+y!==57&&(e+y!==84||47!==k()););return"/*"+E(t,b-1)+"*"+a(47===e?e:S())}function L(e){for(;!j(k());)S();return E(e,b)}var z="-ms-",F="-moz-",D="-webkit-",N="comm",B="rule",H="decl",V="@keyframes";function W(e,t){for(var r="",n=f(e),o=0;o0&&p(F)-v&&h(y>32?Z(F+";",n,r,v-1):Z(s(F," ","")+";",n,r,v-2),f);break;case 59:F+=";";default:if(h(z=K(F,t,r,m,g,o,d,R,M=[],T=[],v),i),123===j)if(0===g)G(F,t,z,z,M,i,v,d,T);else switch(99===b&&110===u(F,3)?100:b){case 100:case 108:case 109:case 115:G(e,z,z,n&&h(K(e,z,z,0,0,o,d,R,o,M=[],v),T),o,T,v,d,n?M:T);break;default:G(F,z,z,z,[""],T,0,d,T)}}m=g=y=0,w=E=1,R=F="",v=l;break;case 58:v=1+p(F),y=x;default:if(w<1)if(123==j)--w;else if(125==j&&0==w++&&125==C())continue;switch(F+=a(j),j*w){case 38:E=g>0?1:(F+="\f",-1);break;case 44:d[m++]=(p(F)-1)*E,E=1;break;case 64:45===k()&&(F+=P(S())),b=k(),g=v=p(R=F+=L(_())),j++;break;case 45:45===x&&2==p(F)&&(w=0)}}return i}function K(e,t,r,n,a,i,c,u,p,h,m){for(var g=a-1,v=0===a?i:[""],b=f(v),y=0,x=0,A=0;y0?v[C]+" "+S:s(S,/&\f/g,v[C])))&&(p[A++]=k);return w(e,t,r,0===a?B:u,p,h,m)}function X(e,t,r){return w(e,t,r,N,a(y),d(e,2,-2),0)}function Z(e,t,r,n){return w(e,t,r,H,d(e,0,n),d(e,n+1,-1),n)}var Y=function(e,t,r){for(var n=0,o=0;n=o,o=k(),38===n&&12===o&&(t[r]=1),!j(o);)S();return E(e,b)},Q=new WeakMap,J=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(r))&&!n){Q.set(e,!0);for(var o=[],i=function(e,t){return M(function(e,t){var r=-1,n=44;do{switch(j(n)){case 0:38===n&&12===k()&&(t[r]=1),e[r]+=Y(b-1,t,r);break;case 2:e[r]+=P(n);break;case 4:if(44===n){e[++r]=58===k()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=a(n)}}while(n=S());return e}(R(e),t))}(t,o),l=r.props,s=0,c=0;s6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return s(e,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+F+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?te(s(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,p(e)-3-(~c(e,"!important")&&10))){case 107:return s(e,":",":"+D)+e;case 101:return s(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+D+(45===u(e,14)?"inline-":"")+"box$3$1"+D+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return D+e+z+s(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return D+e+z+s(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return D+e+z+s(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return D+e+z+e+e}return e}var re=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case H:e.return=te(e.value,e.length);break;case V:return W([A(e,{value:s(e.value,"@","@"+D)})],n);case B:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return W([A(e,{props:[s(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return W([A(e,{props:[s(t,/:(plac\w+)/,":"+D+"input-$1")]}),A(e,{props:[s(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[s(t,/:(plac\w+)/,z+"input-$1")]})],n)}return""}))}}],ne=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,a,i=e.stylisPlugins||re,l={},s=[];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(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{A:()=>n})},40085:(e,t,r)=>{"use strict";r.d(t,{C:()=>l,T:()=>c,i:()=>a,w:()=>s});var n=r(96540),o=r(84300),a=(r(13451),r(71287),!0),i=n.createContext("undefined"!=typeof HTMLElement?(0,o.A)({key:"css"}):null),l=i.Provider,s=function(e){return(0,n.forwardRef)((function(t,r){var o=(0,n.useContext)(i);return e(t,o,r)}))};a||(s=function(e){return function(t){var r=(0,n.useContext)(i);return null===r?(r=(0,o.A)({key:"css"}),n.createElement(i.Provider,{value:r},e(t,r))):e(t,r)}});var c=n.createContext({})},17437:(e,t,r)=>{"use strict";r.d(t,{AH:()=>c,i7:()=>u,mL:()=>s});var n=r(40085),o=r(96540),a=r(30041),i=r(71287),l=r(13451),s=(r(84300),r(4146),(0,n.w)((function(e,t){var r=e.styles,s=(0,l.J)([r],void 0,o.useContext(n.T));if(!n.i){for(var c,u=s.name,d=s.styles,p=s.next;void 0!==p;)u+=" "+p.name,d+=p.styles,p=p.next;var f=!0===t.compat,h=t.insert("",{name:u,styles:d},t.sheet,f);return f?null:o.createElement("style",((c={})["data-emotion"]=t.key+"-global "+u,c.dangerouslySetInnerHTML={__html:h},c.nonce=t.sheet.nonce,c))}var m=o.useRef();return(0,i.i)((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,o=document.querySelector('style[data-emotion="'+e+" "+s.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==o&&(n=!0,o.setAttribute("data-emotion",e),r.hydrate([o])),m.current=[r,n],function(){r.flush()}}),[t]),(0,i.i)((function(){var e=m.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==s.next&&(0,a.sk)(t,s.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",s,r,!1)}}),[t,s.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{J:()=>h});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r(36289),a=/[A-Z]|^ms/g,i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},s=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.A)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(i,(function(e,t,r){return p={name:t,styles:r,next:p},t}))}return 1===n[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return p={name:r.name,styles:r.styles,next:p},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)p={name:n.name,styles:n.styles,next:p},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+s;return{name:c,styles:o,next:p}}},71287:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>l,s:()=>i});var o=r(96540),a=!!(n||(n=r.t(o,2))).useInsertionEffect&&(n||(n=r.t(o,2))).useInsertionEffect,i=a||function(e){return e()},l=a||o.useLayoutEffect},30041:(e,t,r)=>{"use strict";function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}r.d(t,{Rk:()=>n,SF:()=>o,sk:()=>a});var o=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},a=function(e,t,r){o(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+n:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},20748:(e,t,r)=>{"use strict";var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:s},u)},d),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},54657:(e,t,r)=>{"use strict";var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:s},u)},d),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},84475:(e,t,r)=>{"use strict";r.d(t,{x:()=>c});var n=r(96540),o=r(54871),a=r(66111),i=r(86249),l=r(74848);function s(e){return e.substring(2).toLowerCase()}function c(e){const{children:t,disableReactTree:r=!1,mouseEvent:c="onClick",onClickAway:u,touchEvent:d="onTouchEnd"}=e,p=n.useRef(!1),f=n.useRef(null),h=n.useRef(!1),m=n.useRef(!1);n.useEffect((()=>(setTimeout((()=>{h.current=!0}),0),()=>{h.current=!1})),[]);const g=(0,o.A)(t.ref,f),v=(0,a.A)((e=>{const t=m.current;m.current=!1;const n=(0,i.A)(f.current);if(!h.current||!f.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||f.current.contains(e.target),o||!r&&t||u(e)})),b=e=>r=>{m.current=!0;const n=t.props[e];n&&n(r)},y={ref:g};return!1!==d&&(y[d]=b(d)),n.useEffect((()=>{if(!1!==d){const e=s(d),t=(0,i.A)(f.current),r=()=>{p.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",r)}}}),[v,d]),!1!==c&&(y[c]=b(c)),n.useEffect((()=>{if(!1!==c){const e=s(c),t=(0,i.A)(f.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}}),[v,c]),(0,l.jsx)(n.Fragment,{children:n.cloneElement(t,y)})}},35487:(e,t,r)=>{"use strict";r.d(t,{s:()=>u});var n=r(96540),o=r(54871),a=r(86249),i=r(74848);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function s(e){const t=[],r=[];return Array.from(e.querySelectorAll(l)).forEach(((e,n)=>{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 r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.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}function u(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:l=!1,disableRestoreFocus:u=!1,getTabbable:d=s,isEnabled:p=c,open:f}=e,h=n.useRef(!1),m=n.useRef(null),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),y=n.useRef(!1),x=n.useRef(null),w=(0,o.A)(t.ref,x),A=n.useRef(null);n.useEffect((()=>{f&&x.current&&(y.current=!r)}),[r,f]),n.useEffect((()=>{if(!f||!x.current)return;const e=(0,a.A)(x.current);return x.current.contains(e.activeElement)||(x.current.hasAttribute("tabIndex")||x.current.setAttribute("tabIndex","-1"),y.current&&x.current.focus()),()=>{u||(v.current&&v.current.focus&&(h.current=!0,v.current.focus()),v.current=null)}}),[f]),n.useEffect((()=>{if(!f||!x.current)return;const e=(0,a.A)(x.current),t=t=>{A.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===x.current&&t.shiftKey&&(h.current=!0,g.current&&g.current.focus())},r=()=>{const t=x.current;if(null===t)return;if(!e.hasFocus()||!p()||h.current)return void(h.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==m.current&&e.activeElement!==g.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!y.current)return;let r=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(r=d(x.current)),r.length>0){var n,o;const e=Boolean((null==(n=A.current)?void 0:n.shiftKey)&&"Tab"===(null==(o=A.current)?void 0:o.key)),t=r[0],a=r[r.length-1];"string"!=typeof t&&"string"!=typeof a&&(e?a.focus():t.focus())}else t.focus()};e.addEventListener("focusin",r),e.addEventListener("keydown",t,!0);const n=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&r()}),50);return()=>{clearInterval(n),e.removeEventListener("focusin",r),e.removeEventListener("keydown",t,!0)}}),[r,l,u,p,f,d]);const C=e=>{null===v.current&&(v.current=e.relatedTarget),y.current=!0};return(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)("div",{tabIndex:f?0:-1,onFocus:C,ref:m,"data-testid":"sentinelStart"}),n.cloneElement(t,{ref:w,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),y.current=!0,b.current=e.target;const r=t.props.onFocus;r&&r(e)}}),(0,i.jsx)("div",{tabIndex:f?0:-1,onFocus:C,ref:g,"data-testid":"sentinelEnd"})]})}},63493:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(96540),o=r(40961),a=r(54871),i=r(50173),l=r(13721),s=r(74848);const c=n.forwardRef((function(e,t){const{children:r,container:c,disablePortal:u=!1}=e,[d,p]=n.useState(null),f=(0,a.A)(n.isValidElement(r)?r.ref:null,t);if((0,i.A)((()=>{u||p(function(e){return"function"==typeof e?e():e}(c)||document.body)}),[c,u]),(0,i.A)((()=>{if(d&&!u)return(0,l.A)(t,d),()=>{(0,l.A)(t,null)}}),[t,d,u]),u){if(n.isValidElement(r)){const e={ref:f};return n.cloneElement(r,e)}return(0,s.jsx)(n.Fragment,{children:r})}return(0,s.jsx)(n.Fragment,{children:d?o.createPortal(r,d):d})}))},54856:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(58168),o=r(25419);function a(e,t,r){return void 0===e||(0,o.g)(e)?t:(0,n.A)({},t,{ownerState:(0,n.A)({},t.ownerState,r)})}},34718:(e,t,r)=>{"use strict";function n(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter((r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r))).forEach((t=>{r[t]=e[t]})),r}r.d(t,{h:()=>n})},25419:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e}r.d(t,{g:()=>n})},92538:(e,t,r)=>{"use strict";r.d(t,{Q:()=>d});var n=r(58168),o=r(98587),a=r(54871),i=r(54856),l=r(34164),s=r(34718);function c(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((r=>{t[r]=e[r]})),t}const u=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function d(e){var t;const{elementType:r,externalSlotProps:d,ownerState:p,skipResolvingSlotProps:f=!1}=e,h=(0,o.A)(e,u),m=f?{}:function(e,t,r){return"function"==typeof e?e(t,void 0):e}(d,p),{props:g,internalRef:v}=function(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:o,externalForwardedProps:a,className:i}=e;if(!t){const e=(0,l.A)(null==r?void 0:r.className,i,null==a?void 0:a.className,null==o?void 0:o.className),t=(0,n.A)({},null==r?void 0:r.style,null==a?void 0:a.style,null==o?void 0:o.style),s=(0,n.A)({},r,a,o);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const u=(0,s.h)((0,n.A)({},a,o)),d=c(o),p=c(a),f=t(u),h=(0,l.A)(null==f?void 0:f.className,null==r?void 0:r.className,i,null==a?void 0:a.className,null==o?void 0:o.className),m=(0,n.A)({},null==f?void 0:f.style,null==r?void 0:r.style,null==a?void 0:a.style,null==o?void 0:o.style),g=(0,n.A)({},f,r,p,d);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:f.ref}}((0,n.A)({},h,{externalSlotProps:m})),b=(0,a.A)(v,null==m?void 0:m.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,i.X)(r,(0,n.A)({},g,{ref:b}),p)}},99682:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},17332:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 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-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m2 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Assignment")},53540:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block")},17809:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((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"}),"Close")},28204:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"}),"Comment")},67110:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},12933:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done")},11692:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},65997:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder")},26566:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp")},42828:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image")},59956:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9"}),"ImageSearch")},98818:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},72550:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"PhotoLibrary")},40250:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh")},16740:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},68125:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},55764:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},86775:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M21 5v6.5H9.33V5zm-6.33 14v-6.5H9.33V19zm1-6.5V19H21v-6.5zM8.33 19V5H3v14z"}),"ViewQuilt")},9547:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"}),"Web")},47419:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(20973),d=r(27553),p=r(17245);function f(e){return(0,p.Ay)("MuiBackdrop",e)}(0,d.A)("MuiBackdrop",["root","invisible"]);var h=r(74848);const m=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],g=(0,s.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})((({ownerState:e})=>(0,o.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),v=a.forwardRef((function(e,t){var r,a,s;const d=(0,c.A)({props:e,name:"MuiBackdrop"}),{children:p,className:v,component:b="div",components:y={},componentsProps:x={},invisible:w=!1,open:A,slotProps:C={},slots:S={},TransitionComponent:k=u.A,transitionDuration:_}=d,E=(0,n.A)(d,m),j=(0,o.A)({},d,{component:b,invisible:w}),R=(e=>{const{classes:t,invisible:r}=e,n={root:["root",r&&"invisible"]};return(0,l.A)(n,f,t)})(j),M=null!=(r=C.root)?r:x.root;return(0,h.jsx)(k,(0,o.A)({in:A,timeout:_},E,{children:(0,h.jsx)(g,(0,o.A)({"aria-hidden":!0},M,{as:null!=(a=null!=(s=S.root)?s:y.Root)?a:b,className:(0,i.A)(R.root,v,null==M?void 0:M.className),ownerState:(0,o.A)({},j,null==M?void 0:M.ownerState),classes:R,ref:t,children:p}))}))}))},69067:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(9359),s=r(33571),c=r(39599),u=r(82858),d=r(74848);const p=["className","component"];var f=r(12067),h=r(76544),m=r(58312);const g=(0,r(27553).A)("MuiBox",["root"]),v=(0,h.A)(),b=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:f="MuiBox-root",generateClassName:h}=e,m=(0,l.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.A);return a.forwardRef((function(e,a){const l=(0,u.A)(r),s=(0,c.A)(e),{className:g,component:v="div"}=s,b=(0,o.A)(s,p);return(0,d.jsx)(m,(0,n.A)({as:v,ref:a,className:(0,i.A)(g,h?h(f):f),theme:t&&l[t]||l},b))}))}({themeId:m.A,defaultTheme:v,defaultClassName:g.root,generateClassName:f.A.generate}),y=b},61224:(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(46311),s=r(64111),c=r(771),u=r(11848),d=r(39770),p=r(3541),f=r(26606),h=r(28466),m=r(27553),g=r(17245);function v(e){return(0,g.Ay)("MuiButton",e)}const b=(0,m.A)("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"]);var y=r(41848),x=r(35132),w=r(74848);const A=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],C=e=>(0,o.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),S=(0,u.Ay)(f.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,h.A)(r.color)}`],t[`size${(0,h.A)(r.size)}`],t[`${r.variant}Size${(0,h.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var r,n;const a="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,o.A)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,o.A)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,c.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${b.focusVisible}`]:(0,o.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${b.disabled}`]:(0,o.A)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,c.X4)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:a,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${b.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${b.disabled}`]:{boxShadow:"none"}})),k=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})((({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},C(e)))),_=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${(0,h.A)(r.size)}`]]}})((({ownerState:e})=>(0,o.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},C(e)))),E=a.forwardRef((function(e,t){const r=a.useContext(y.A),c=a.useContext(x.A),u=(0,l.A)(r,e),d=(0,p.A)({props:u,name:"MuiButton"}),{children:f,color:m="primary",component:g="button",className:b,disabled:C=!1,disableElevation:E=!1,disableFocusRipple:j=!1,endIcon:R,focusVisibleClassName:M,fullWidth:P=!1,size:O="medium",startIcon:I,type:T,variant:$="text"}=d,L=(0,n.A)(d,A),z=(0,o.A)({},d,{color:m,component:g,disabled:C,disableElevation:E,disableFocusRipple:j,fullWidth:P,size:O,type:T,variant:$}),F=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:a,variant:i,classes:l}=e,c={root:["root",i,`${i}${(0,h.A)(t)}`,`size${(0,h.A)(a)}`,`${i}Size${(0,h.A)(a)}`,`color${(0,h.A)(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${(0,h.A)(a)}`],endIcon:["icon","endIcon",`iconSize${(0,h.A)(a)}`]},u=(0,s.A)(c,v,l);return(0,o.A)({},l,u)})(z),D=I&&(0,w.jsx)(k,{className:F.startIcon,ownerState:z,children:I}),N=R&&(0,w.jsx)(_,{className:F.endIcon,ownerState:z,children:R}),B=c||"";return(0,w.jsxs)(S,(0,o.A)({ownerState:z,className:(0,i.A)(r.className,F.root,b,B),component:g,disabled:C,focusRipple:!j,focusVisibleClassName:(0,i.A)(F.focusVisible,M),ref:t,type:T},L,{classes:F,children:[D,f,N]}))}))},26606:(e,t,r)=>{"use strict";r.d(t,{A:()=>V});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(96852),d=r(83034),p=r(68851),f=r(25540),h=r(17241);function m(e,t){var r=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)})),r}function g(e,t,r){return null!=r[t]?r[t]:e.props[t]}function v(e,t,r){var n=m(e.children),o=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var l={};for(var s in t){if(o[s])for(n=0;ne;const O=(0,w.i7)(E||(E=P` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),I=(0,w.i7)(j||(j=P` 0% { opacity: 1; } 100% { opacity: 0; } `)),T=(0,w.i7)(R||(R=P` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),$=(0,s.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),L=(0,s.Ay)((function(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:l,rippleSize:s,in:c,onExited:u,timeout:d}=e,[p,f]=a.useState(!1),h=(0,i.A)(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),m={width:s,height:s,top:-s/2+l,left:-s/2+o},g=(0,i.A)(r.child,p&&r.childLeaving,n&&r.childPulsate);return c||p||f(!0),a.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,C.jsx)("span",{className:h,style:m,children:(0,C.jsx)("span",{className:g})})}),{name:"MuiTouchRipple",slot:"Ripple"})(M||(M=P` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),k.rippleVisible,O,550,(({theme:e})=>e.transitions.easing.easeInOut),k.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),k.child,k.childLeaving,I,550,(({theme:e})=>e.transitions.easing.easeInOut),k.childPulsate,T,(({theme:e})=>e.transitions.easing.easeInOut)),z=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiTouchRipple"}),{center:l=!1,classes:s={},className:u}=r,d=(0,o.A)(r,_),[p,f]=a.useState([]),h=a.useRef(0),m=a.useRef(null);a.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[p]);const g=a.useRef(!1),v=(0,A.A)(),b=a.useRef(null),y=a.useRef(null),w=a.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:o,cb:a}=e;f((e=>[...e,(0,C.jsx)(L,{classes:{ripple:(0,i.A)(s.ripple,k.ripple),rippleVisible:(0,i.A)(s.rippleVisible,k.rippleVisible),ripplePulsate:(0,i.A)(s.ripplePulsate,k.ripplePulsate),child:(0,i.A)(s.child,k.child),childLeaving:(0,i.A)(s.childLeaving,k.childLeaving),childPulsate:(0,i.A)(s.childPulsate,k.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o},h.current)])),h.current+=1,m.current=a}),[s]),S=a.useCallback(((e={},t={},r=(()=>{}))=>{const{pulsate:n=!1,center:o=l||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&g.current)return void(g.current=!1);"touchstart"===(null==e?void 0:e.type)&&(g.current=!0);const i=a?null:y.current,s=i?i.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(s.width/2),u=Math.round(s.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),u=Math.round(r-s.top)}if(o)d=Math.sqrt((2*s.width**2+s.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((i?i.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((i?i.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===b.current&&(b.current=()=>{w({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},v.start(80,(()=>{b.current&&(b.current(),b.current=null)}))):w({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})}),[l,w,v]),E=a.useCallback((()=>{S({},{pulsate:!0})}),[S]),j=a.useCallback(((e,t)=>{if(v.clear(),"touchend"===(null==e?void 0:e.type)&&b.current)return b.current(),b.current=null,void v.start(0,(()=>{j(e,t)}));b.current=null,f((e=>e.length>0?e.slice(1):e)),m.current=t}),[v]);return a.useImperativeHandle(t,(()=>({pulsate:E,start:S,stop:j})),[E,S,j]),(0,C.jsx)($,(0,n.A)({className:(0,i.A)(k.root,s.root,u),ref:y},d,{children:(0,C.jsx)(x,{component:null,exit:!0,children:p})}))}));var F=r(17245);function D(e){return(0,F.Ay)("MuiButtonBase",e)}const N=(0,S.A)("MuiButtonBase",["root","disabled","focusVisible"]),B=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],H=(0,s.Ay)("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"},[`&.${N.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),V=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:f=!1,children:h,className:m,component:g="button",disabled:v=!1,disableRipple:b=!1,disableTouchRipple:y=!1,focusRipple:x=!1,LinkComponent:w="a",onBlur:A,onClick:S,onContextMenu:k,onDragLeave:_,onFocus:E,onFocusVisible:j,onKeyDown:R,onKeyUp:M,onMouseDown:P,onMouseLeave:O,onMouseUp:I,onTouchEnd:T,onTouchMove:$,onTouchStart:L,tabIndex:F=0,TouchRippleProps:N,touchRippleRef:V,type:W}=r,U=(0,o.A)(r,B),q=a.useRef(null),G=a.useRef(null),K=(0,u.A)(G,V),{isFocusVisibleRef:X,onFocus:Z,onBlur:Y,ref:Q}=(0,p.A)(),[J,ee]=a.useState(!1);v&&J&&ee(!1),a.useImperativeHandle(s,(()=>({focusVisible:()=>{ee(!0),q.current.focus()}})),[]);const[te,re]=a.useState(!1);a.useEffect((()=>{re(!0)}),[]);const ne=te&&!b&&!v;function oe(e,t,r=y){return(0,d.A)((n=>(t&&t(n),!r&&G.current&&G.current[e](n),!0)))}a.useEffect((()=>{J&&x&&!b&&te&&G.current.pulsate()}),[b,x,J,te]);const ae=oe("start",P),ie=oe("stop",k),le=oe("stop",_),se=oe("stop",I),ce=oe("stop",(e=>{J&&e.preventDefault(),O&&O(e)})),ue=oe("start",L),de=oe("stop",T),pe=oe("stop",$),fe=oe("stop",(e=>{Y(e),!1===X.current&&ee(!1),A&&A(e)}),!1),he=(0,d.A)((e=>{q.current||(q.current=e.currentTarget),Z(e),!0===X.current&&(ee(!0),j&&j(e)),E&&E(e)})),me=()=>{const e=q.current;return g&&"button"!==g&&!("A"===e.tagName&&e.href)},ge=a.useRef(!1),ve=(0,d.A)((e=>{x&&!ge.current&&J&&G.current&&" "===e.key&&(ge.current=!0,G.current.stop(e,(()=>{G.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!v&&(e.preventDefault(),S&&S(e))})),be=(0,d.A)((e=>{x&&" "===e.key&&G.current&&J&&!e.defaultPrevented&&(ge.current=!1,G.current.stop(e,(()=>{G.current.pulsate(e)}))),M&&M(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let ye=g;"button"===ye&&(U.href||U.to)&&(ye=w);const xe={};"button"===ye?(xe.type=void 0===W?"button":W,xe.disabled=v):(U.href||U.to||(xe.role="button"),v&&(xe["aria-disabled"]=v));const we=(0,u.A)(t,Q,q),Ae=(0,n.A)({},r,{centerRipple:f,component:g,disabled:v,disableRipple:b,disableTouchRipple:y,focusRipple:x,tabIndex:F,focusVisible:J}),Ce=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,a={root:["root",t&&"disabled",r&&"focusVisible"]},i=(0,l.A)(a,D,o);return r&&n&&(i.root+=` ${n}`),i})(Ae);return(0,C.jsxs)(H,(0,n.A)({as:ye,className:(0,i.A)(Ce.root,m),ownerState:Ae,onBlur:fe,onClick:S,onContextMenu:ie,onFocus:he,onKeyDown:ve,onKeyUp:be,onMouseDown:ae,onMouseLeave:ce,onMouseUp:se,onDragLeave:le,onTouchEnd:de,onTouchMove:pe,onTouchStart:ue,ref:we,tabIndex:v?-1:F,type:W},xe,U,{children:[h,ne?(0,C.jsx)(z,(0,n.A)({ref:K,center:f},N)):null]}))}))},72730:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(28466),u=r(11848),d=r(3541),p=r(27553),f=r(17245);function h(e){return(0,f.Ay)("MuiButtonGroup",e)}const m=(0,p.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var g=r(41848),v=r(35132),b=r(74848);const y=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],x=(0,u.Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${m.grouped}`]:t.grouped},{[`& .${m.grouped}`]:t[`grouped${(0,c.A)(r.orientation)}`]},{[`& .${m.grouped}`]:t[`grouped${(0,c.A)(r.variant)}`]},{[`& .${m.grouped}`]:t[`grouped${(0,c.A)(r.variant)}${(0,c.A)(r.orientation)}`]},{[`& .${m.grouped}`]:t[`grouped${(0,c.A)(r.variant)}${(0,c.A)(r.color)}`]},{[`& .${m.firstButton}`]:t.firstButton},{[`& .${m.lastButton}`]:t.lastButton},{[`& .${m.middleButton}`]:t.middleButton},t.root,t[r.variant],!0===r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,"vertical"===r.orientation&&t.vertical]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},{[`& .${m.grouped}`]:(0,o.A)({minWidth:40,"&:hover":(0,o.A)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"}),[`& .${m.firstButton},& .${m.middleButton}`]:(0,o.A)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&{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)"),[`&.${m.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"vertical"===t.orientation&&{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)"),[`&.${m.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"text"===t.variant&&"inherit"!==t.color&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:(0,s.X4)(e.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${m.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"vertical"===t.orientation&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${m.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":(0,o.A)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),[`& .${m.lastButton},& .${m.middleButton}`]:(0,o.A)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1})}))),w=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiButtonGroup"}),{children:s,className:u,color:p="primary",component:f="div",disabled:m=!1,disableElevation:w=!1,disableFocusRipple:A=!1,disableRipple:C=!1,fullWidth:S=!1,orientation:k="horizontal",size:_="medium",variant:E="outlined"}=r,j=(0,n.A)(r,y),R=(0,o.A)({},r,{color:p,component:f,disabled:m,disableElevation:w,disableFocusRipple:A,disableRipple:C,fullWidth:S,orientation:k,size:_,variant:E}),M=(e=>{const{classes:t,color:r,disabled:n,disableElevation:o,fullWidth:a,orientation:i,variant:s}=e,u={root:["root",s,"vertical"===i&&"vertical",a&&"fullWidth",o&&"disableElevation"],grouped:["grouped",`grouped${(0,c.A)(i)}`,`grouped${(0,c.A)(s)}`,`grouped${(0,c.A)(s)}${(0,c.A)(i)}`,`grouped${(0,c.A)(s)}${(0,c.A)(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,l.A)(u,h,t)})(R),P=a.useMemo((()=>({className:M.grouped,color:p,disabled:m,disableElevation:w,disableFocusRipple:A,disableRipple:C,fullWidth:S,size:_,variant:E})),[p,m,w,A,C,S,_,E,M.grouped]),O=function(e){return a.Children.toArray(e).filter((e=>a.isValidElement(e)))}(s),I=O.length,T=e=>{const t=0===e,r=e===I-1;return t&&r?"":t?M.firstButton:r?M.lastButton:M.middleButton};return(0,b.jsx)(x,(0,o.A)({as:f,role:"group",className:(0,i.A)(M.root,u),ref:t,ownerState:R},j,{children:(0,b.jsx)(g.A.Provider,{value:P,children:O.map(((e,t)=>(0,b.jsx)(v.A.Provider,{value:T(t),children:e},t)))})}))}))},35132:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(96540).createContext(void 0)},41848:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(96540).createContext({})},27558:(e,t,r)=>{"use strict";r.d(t,{A:()=>j});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(55860),u=r(75003),d=r(74848);const p=(0,u.A)((0,d.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"),f=(0,u.A)((0,d.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,u.A)((0,d.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 m=r(28466),g=r(3541),v=r(11848),b=r(39770),y=r(27553),x=r(17245);function w(e){return(0,x.Ay)("MuiCheckbox",e)}const A=(0,y.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),C=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],S=(0,v.Ay)(c.A,{shouldForwardProp:e=>(0,b.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,m.A)(r.size)}`],"default"!==r.color&&t[`color${(0,m.A)(r.color)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${A.checked}, &.${A.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${A.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),k=(0,d.jsx)(f,{}),_=(0,d.jsx)(p,{}),E=(0,d.jsx)(h,{}),j=a.forwardRef((function(e,t){var r,s;const c=(0,g.A)({props:e,name:"MuiCheckbox"}),{checkedIcon:u=k,color:p="primary",icon:f=_,indeterminate:h=!1,indeterminateIcon:v=E,inputProps:b,size:y="medium",className:x}=c,A=(0,n.A)(c,C),j=h?v:f,R=h?v:u,M=(0,o.A)({},c,{color:p,indeterminate:h,size:y}),P=(e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,i={root:["root",r&&"indeterminate",`color${(0,m.A)(n)}`,`size${(0,m.A)(a)}`]},s=(0,l.A)(i,w,t);return(0,o.A)({},t,s)})(M);return(0,d.jsx)(S,(0,o.A)({type:"checkbox",inputProps:(0,o.A)({"data-indeterminate":h},b),icon:a.cloneElement(j,{fontSize:null!=(r=j.props.fontSize)?r:y}),checkedIcon:a.cloneElement(R,{fontSize:null!=(s=R.props.fontSize)?s:y}),ownerState:M,ref:t,className:(0,i.A)(P.root,x)},A,{classes:P}))}))},82022:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(75003),u=r(74848);const d=(0,c.A)((0,u.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 p=r(96852),f=r(28466),h=r(26606),m=r(3541),g=r(11848),v=r(27553),b=r(17245);function y(e){return(0,b.Ay)("MuiChip",e)}const x=(0,v.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),w=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],A=(0,g.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:n,iconColor:o,clickable:a,onDelete:i,size:l,variant:s}=r;return[{[`& .${x.avatar}`]:t.avatar},{[`& .${x.avatar}`]:t[`avatar${(0,f.A)(l)}`]},{[`& .${x.avatar}`]:t[`avatarColor${(0,f.A)(n)}`]},{[`& .${x.icon}`]:t.icon},{[`& .${x.icon}`]:t[`icon${(0,f.A)(l)}`]},{[`& .${x.icon}`]:t[`iconColor${(0,f.A)(o)}`]},{[`& .${x.deleteIcon}`]:t.deleteIcon},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,f.A)(l)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIconColor${(0,f.A)(n)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,f.A)(s)}Color${(0,f.A)(n)}`]},t.root,t[`size${(0,f.A)(l)}`],t[`color${(0,f.A)(n)}`],a&&t.clickable,a&&"default"!==n&&t[`clickableColor${(0,f.A)(n)})`],i&&t.deletable,i&&"default"!==n&&t[`deletableColor${(0,f.A)(n)}`],t[s],t[`${s}${(0,f.A)(n)}`]]}})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,o.A)({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:r,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}`]:(0,o.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,o.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:r},"default"!==t.color&&{color:"inherit"})),[`& .${x.deleteIcon}`]:(0,o.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,s.X4)(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,s.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,s.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>(0,o.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.X4)(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,s.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>(0,o.A)({},"outlined"===t.variant&&{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}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,s.X4)(e.palette[t.color].main,.7)}`,[`&.${x.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,s.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${x.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,s.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),C=(0,g.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:n}=r;return[t.label,t[`label${(0,f.A)(n)}`]]}})((({ownerState:e})=>(0,o.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7})));function S(e){return"Backspace"===e.key||"Delete"===e.key}const k=a.forwardRef((function(e,t){const r=(0,m.A)({props:e,name:"MuiChip"}),{avatar:s,className:c,clickable:g,color:v="default",component:b,deleteIcon:x,disabled:k=!1,icon:_,label:E,onClick:j,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:I="filled",tabIndex:T,skipFocusWhenDisabled:$=!1}=r,L=(0,n.A)(r,w),z=a.useRef(null),F=(0,p.A)(z,t),D=e=>{e.stopPropagation(),R&&R(e)},N=!(!1===g||!j)||g,B=N||R?h.A:b||"div",H=(0,o.A)({},r,{component:B,disabled:k,size:O,color:v,iconColor:a.isValidElement(_)&&_.props.color||v,onDelete:!!R,clickable:N,variant:I}),V=(e=>{const{classes:t,disabled:r,size:n,color:o,iconColor:a,onDelete:i,clickable:s,variant:c}=e,u={root:["root",c,r&&"disabled",`size${(0,f.A)(n)}`,`color${(0,f.A)(o)}`,s&&"clickable",s&&`clickableColor${(0,f.A)(o)}`,i&&"deletable",i&&`deletableColor${(0,f.A)(o)}`,`${c}${(0,f.A)(o)}`],label:["label",`label${(0,f.A)(n)}`],avatar:["avatar",`avatar${(0,f.A)(n)}`,`avatarColor${(0,f.A)(o)}`],icon:["icon",`icon${(0,f.A)(n)}`,`iconColor${(0,f.A)(a)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,f.A)(n)}`,`deleteIconColor${(0,f.A)(o)}`,`deleteIcon${(0,f.A)(c)}Color${(0,f.A)(o)}`]};return(0,l.A)(u,y,t)})(H),W=B===h.A?(0,o.A)({component:b||"div",focusVisibleClassName:V.focusVisible},R&&{disableRipple:!0}):{};let U=null;R&&(U=x&&a.isValidElement(x)?a.cloneElement(x,{className:(0,i.A)(x.props.className,V.deleteIcon),onClick:D}):(0,u.jsx)(d,{className:(0,i.A)(V.deleteIcon),onClick:D}));let q=null;s&&a.isValidElement(s)&&(q=a.cloneElement(s,{className:(0,i.A)(V.avatar,s.props.className)}));let G=null;return _&&a.isValidElement(_)&&(G=a.cloneElement(_,{className:(0,i.A)(V.icon,_.props.className)})),(0,u.jsxs)(A,(0,o.A)({as:B,className:(0,i.A)(V.root,c),disabled:!(!N||!k)||void 0,onClick:j,onKeyDown:e=>{e.currentTarget===e.target&&S(e)&&e.preventDefault(),M&&M(e)},onKeyUp:e=>{e.currentTarget===e.target&&(R&&S(e)?R(e):"Escape"===e.key&&z.current&&z.current.blur()),P&&P(e)},ref:F,tabIndex:$&&k?-1:T,ownerState:H},W,L,{children:[q||G,(0,u.jsx)(C,{className:(0,i.A)(V.label),ownerState:H,children:E}),U]}))}))},73357:(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(17437),c=r(28466),u=r(3541),d=r(11848),p=r(27553),f=r(17245);function h(e){return(0,f.Ay)("MuiCircularProgress",e)}(0,p.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=r(74848);const g=["className","color","disableShrink","size","style","thickness","value","variant"];let v,b,y,x,w=e=>e;const A=(0,s.i7)(v||(v=w` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),C=(0,s.i7)(b||(b=w` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),S=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.A)(r.color)}`]]}})((({ownerState:e,theme:t})=>(0,o.A)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main})),(({ownerState:e})=>"indeterminate"===e.variant&&(0,s.AH)(y||(y=w` animation: ${0} 1.4s linear infinite; `),A))),k=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),_=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>(0,o.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,s.AH)(x||(x=w` animation: ${0} 1.4s ease-in-out infinite; `),C))),E=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:d=!1,size:p=40,style:f,thickness:v=3.6,value:b=0,variant:y="indeterminate"}=r,x=(0,n.A)(r,g),w=(0,o.A)({},r,{color:s,disableShrink:d,size:p,thickness:v,value:b,variant:y}),A=(e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,a={root:["root",r,`color${(0,c.A)(n)}`],svg:["svg"],circle:["circle",`circle${(0,c.A)(r)}`,o&&"circleDisableShrink"]};return(0,l.A)(a,h,t)})(w),C={},E={},j={};if("determinate"===y){const e=2*Math.PI*((44-v)/2);C.strokeDasharray=e.toFixed(3),j["aria-valuenow"]=Math.round(b),C.strokeDashoffset=`${((100-b)/100*e).toFixed(3)}px`,E.transform="rotate(-90deg)"}return(0,m.jsx)(S,(0,o.A)({className:(0,i.A)(A.root,a),style:(0,o.A)({width:p,height:p},E,f),ownerState:w,ref:t,role:"progressbar"},j,x,{children:(0,m.jsx)(k,{className:A.svg,ownerState:w,viewBox:"22 22 44 44",children:(0,m.jsx)(_,{className:A.circle,style:C,ownerState:w,cx:44,cy:44,r:(44-v)/2,fill:"none",strokeWidth:v})})}))}))},52848:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(37353),s=r(42640),c=r(64111),u=r(11848),d=r(3541),p=r(17091),f=r(35186),h=r(44675),m=r(96852),g=r(27553),v=r(17245);function b(e){return(0,v.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=r(74848);const x=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],"entered"===r.state&&t.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.A)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===t.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"}))),A=(0,u.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((({ownerState:e})=>(0,o.A)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),C=(0,u.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((({ownerState:e})=>(0,o.A)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"}))),S=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiCollapse"}),{addEndListener:u,children:g,className:v,collapsedSize:S="0px",component:k,easing:_,in:E,onEnter:j,onEntered:R,onEntering:M,onExit:P,onExited:O,onExiting:I,orientation:T="vertical",style:$,timeout:L=p.p0.standard,TransitionComponent:z=l.Ay}=r,F=(0,n.A)(r,x),D=(0,o.A)({},r,{orientation:T,collapsedSize:S}),N=(e=>{const{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,c.A)(n,b,r)})(D),B=(0,h.A)(),H=(0,s.A)(),V=a.useRef(null),W=a.useRef(),U="number"==typeof S?`${S}px`:S,q="horizontal"===T,G=q?"width":"height",K=a.useRef(null),X=(0,m.A)(t,K),Z=e=>t=>{if(e){const r=K.current;void 0===t?e(r):e(r,t)}},Y=()=>V.current?V.current[q?"clientWidth":"clientHeight"]:0,Q=Z(((e,t)=>{V.current&&q&&(V.current.style.position="absolute"),e.style[G]=U,j&&j(e,t)})),J=Z(((e,t)=>{const r=Y();V.current&&q&&(V.current.style.position="");const{duration:n,easing:o}=(0,f.c)({style:$,timeout:L,easing:_},{mode:"enter"});if("auto"===L){const t=B.transitions.getAutoHeightDuration(r);e.style.transitionDuration=`${t}ms`,W.current=t}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[G]=`${r}px`,e.style.transitionTimingFunction=o,M&&M(e,t)})),ee=Z(((e,t)=>{e.style[G]="auto",R&&R(e,t)})),te=Z((e=>{e.style[G]=`${Y()}px`,P&&P(e)})),re=Z(O),ne=Z((e=>{const t=Y(),{duration:r,easing:n}=(0,f.c)({style:$,timeout:L,easing:_},{mode:"exit"});if("auto"===L){const r=B.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${r}ms`,W.current=r}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[G]=U,e.style.transitionTimingFunction=n,I&&I(e)}));return(0,y.jsx)(z,(0,o.A)({in:E,onEnter:Q,onEntered:ee,onEntering:J,onExit:te,onExited:re,onExiting:ne,addEndListener:e=>{"auto"===L&&H.start(W.current||0,e),u&&u(K.current,e)},nodeRef:K,timeout:"auto"===L?null:L},F,{children:(e,t)=>(0,y.jsx)(w,(0,o.A)({as:k,className:(0,i.A)(N.root,v,{entered:N.entered,exited:!E&&"0px"===U&&N.hidden}[e]),style:(0,o.A)({[q?"minWidth":"minHeight"]:U},$),ref:X},t,{ownerState:(0,o.A)({},D,{state:e}),children:(0,y.jsx)(A,{ownerState:(0,o.A)({},D,{state:e}),className:N.wrapper,ref:V,children:(0,y.jsx)(C,{ownerState:(0,o.A)({},D,{state:e}),className:N.wrapperInner,children:g})})}))}))}));S.muiSupportAuto=!0;const k=S},58031:(e,t,r)=>{"use strict";r.d(t,{A:()=>j});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(14953),c=r(28466),u=r(70818),d=r(20973),p=r(60538),f=r(3541),h=r(11848),m=r(27553),g=r(17245);function v(e){return(0,g.Ay)("MuiDialog",e)}const b=(0,m.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var y=r(28102),x=r(47419),w=r(44675),A=r(74848);const C=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],S=(0,h.Ay)(x.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),k=(0,h.Ay)(u.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),_=(0,h.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${(0,c.A)(r.scroll)}`]]}})((({ownerState:e})=>(0,o.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),E=(0,h.Ay)(p.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${(0,c.A)(r.scroll)}`],t[`paperWidth${(0,c.A)(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${b.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),j=a.forwardRef((function(e,t){const r=(0,f.A)({props:e,name:"MuiDialog"}),u=(0,w.A)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":g,BackdropComponent:b,BackdropProps:x,children:j,className:R,disableEscapeKeyDown:M=!1,fullScreen:P=!1,fullWidth:O=!1,maxWidth:I="sm",onBackdropClick:T,onClose:$,open:L,PaperComponent:z=p.A,PaperProps:F={},scroll:D="paper",TransitionComponent:N=d.A,transitionDuration:B=h,TransitionProps:H}=r,V=(0,n.A)(r,C),W=(0,o.A)({},r,{disableEscapeKeyDown:M,fullScreen:P,fullWidth:O,maxWidth:I,scroll:D}),U=(e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:o,fullScreen:a}=e,i={root:["root"],container:["container",`scroll${(0,c.A)(r)}`],paper:["paper",`paperScroll${(0,c.A)(r)}`,`paperWidth${(0,c.A)(String(n))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return(0,l.A)(i,v,t)})(W),q=a.useRef(),G=(0,s.A)(g),K=a.useMemo((()=>({titleId:G})),[G]);return(0,A.jsx)(k,(0,o.A)({className:(0,i.A)(U.root,R),closeAfterTransition:!0,components:{Backdrop:S},componentsProps:{backdrop:(0,o.A)({transitionDuration:B,as:b},x)},disableEscapeKeyDown:M,onClose:$,open:L,ref:t,onClick:e=>{q.current&&(q.current=null,T&&T(e),$&&$(e,"backdropClick"))},ownerState:W},V,{children:(0,A.jsx)(N,(0,o.A)({appear:!0,in:L,timeout:B,role:"presentation"},H,{children:(0,A.jsx)(_,{className:(0,i.A)(U.container),onMouseDown:e=>{q.current=e.target===e.currentTarget},ownerState:W,children:(0,A.jsx)(E,(0,o.A)({as:z,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":G},F,{className:(0,i.A)(U.paper,F.className),ownerState:W,children:(0,A.jsx)(y.A.Provider,{value:K,children:j})}))})}))}))}))},28102:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(96540).createContext({})},58763:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(27553),d=r(17245);function p(e){return(0,d.Ay)("MuiDialogActions",e)}(0,u.A)("MuiDialogActions",["root","spacing"]);var f=r(74848);const h=["className","disableSpacing"],m=(0,s.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})((({ownerState:e})=>(0,o.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}}))),g=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiDialogActions"}),{className:a,disableSpacing:s=!1}=r,u=(0,n.A)(r,h),d=(0,o.A)({},r,{disableSpacing:s}),g=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,l.A)(n,p,t)})(d);return(0,f.jsx)(m,(0,o.A)({className:(0,i.A)(g.root,a),ownerState:d,ref:t},u))}))},22477:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(27553),d=r(17245);function p(e){return(0,d.Ay)("MuiDialogContent",e)}(0,u.A)("MuiDialogContent",["root","dividers"]);var f=r(61435),h=r(74848);const m=["className","dividers"],g=(0,s.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>(0,o.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${f.A.root} + &`]:{paddingTop:0}}))),v=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiDialogContent"}),{className:a,dividers:s=!1}=r,u=(0,n.A)(r,m),d=(0,o.A)({},r,{dividers:s}),f=(e=>{const{classes:t,dividers:r}=e,n={root:["root",r&&"dividers"]};return(0,l.A)(n,p,t)})(d);return(0,h.jsx)(g,(0,o.A)({className:(0,i.A)(f.root,a),ownerState:d,ref:t},u))}))},77867:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(39770),u=r(3541),d=r(14073),p=r(27553),f=r(17245);function h(e){return(0,f.Ay)("MuiDialogContentText",e)}(0,p.A)("MuiDialogContentText",["root"]);var m=r(74848);const g=["children","className"],v=(0,s.Ay)(d.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),b=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiDialogContentText"}),{className:a}=r,s=(0,n.A)(r,g),c=(e=>{const{classes:t}=e,r=(0,l.A)({root:["root"]},h,t);return(0,o.A)({},t,r)})(s);return(0,m.jsx)(v,(0,o.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:s,className:(0,i.A)(c.root,a)},r,{classes:c}))}))},46831:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(64111),s=r(14073),c=r(11848),u=r(3541),d=r(61435),p=r(28102),f=r(74848);const h=["className","id"],m=(0,c.Ay)(s.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),g=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiDialogTitle"}),{className:s,id:c}=r,g=(0,o.A)(r,h),v=r,b=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},d.t,t)})(v),{titleId:y=c}=a.useContext(p.A);return(0,f.jsx)(m,(0,n.A)({component:"h2",className:(0,i.A)(b.root,s),ownerState:v,ref:t,variant:"h6",id:null!=c?c:y},g))}))},61435:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,t:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiDialogTitle",e)}const i=(0,n.A)("MuiDialogTitle",["root"])},71543:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(11848),u=r(3541),d=r(61347),p=r(74848);const f=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],h=(0,c.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,s.X4)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>(0,o.A)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>(0,o.A)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>(0,o.A)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),m=(0,c.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),g=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiDivider"}),{absolute:a=!1,children:s,className:c,component:g=(s?"div":"hr"),flexItem:v=!1,light:b=!1,orientation:y="horizontal",role:x=("hr"!==g?"separator":void 0),textAlign:w="center",variant:A="fullWidth"}=r,C=(0,n.A)(r,f),S=(0,o.A)({},r,{absolute:a,component:g,flexItem:v,light:b,orientation:y,role:x,textAlign:w,variant:A}),k=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:a,orientation:i,textAlign:s,variant:c}=e,u={root:["root",t&&"absolute",c,a&&"light","vertical"===i&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===i&&"withChildrenVertical","right"===s&&"vertical"!==i&&"textAlignRight","left"===s&&"vertical"!==i&&"textAlignLeft"],wrapper:["wrapper","vertical"===i&&"wrapperVertical"]};return(0,l.A)(u,d.K,n)})(S);return(0,p.jsx)(h,(0,o.A)({as:g,className:(0,i.A)(k.root,c),role:x,ref:t,ownerState:S},C,{children:s?(0,p.jsx)(m,{className:k.wrapper,ownerState:S,children:s}):null}))}));g.muiSkipListHighlight=!0;const v=g},61347:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,K:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiDivider",e)}const i=(0,n.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},20973:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(58168),o=r(98587),a=r(96540),i=r(37353),l=r(44675),s=r(35186),c=r(96852),u=r(74848);const d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{opacity:1},entered:{opacity:1}},f=a.forwardRef((function(e,t){const r=(0,l.A)(),f={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:h,appear:m=!0,children:g,easing:v,in:b,onEnter:y,onEntered:x,onEntering:w,onExit:A,onExited:C,onExiting:S,style:k,timeout:_=f,TransitionComponent:E=i.Ay}=e,j=(0,o.A)(e,d),R=a.useRef(null),M=(0,c.A)(R,g.ref,t),P=e=>t=>{if(e){const r=R.current;void 0===t?e(r):e(r,t)}},O=P(w),I=P(((e,t)=>{(0,s.q)(e);const n=(0,s.c)({style:k,timeout:_,easing:v},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),y&&y(e,t)})),T=P(x),$=P(S),L=P((e=>{const t=(0,s.c)({style:k,timeout:_,easing:v},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),A&&A(e)})),z=P(C);return(0,u.jsx)(E,(0,n.A)({appear:m,in:b,nodeRef:R,onEnter:I,onEntered:T,onEntering:O,onExit:L,onExited:z,onExiting:$,addEndListener:e=>{h&&h(R.current,e)},timeout:_},j,{children:(e,t)=>a.cloneElement(g,(0,n.A)({style:(0,n.A)({opacity:0,visibility:"exited"!==e||b?void 0:"hidden"},p[e],k,g.props.style),ref:M},t))}))}))},21915:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(98587),o=r(58168),a=r(96540),i=r(94521),l=r(64111),s=r(83826),c=r(11848),u=r(39770),d=r(3541),p=r(6959),f=r(74848);const h=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(s.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,s.WC)(e,t),!r.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{var r;const n="light"===e.palette.mode,a=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",l=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,o.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:l,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${p.A.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${p.A.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(r=(e.vars||e).palette[t.color||"primary"])?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${p.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${p.A.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})`:a}`,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(.${p.A.disabled}, .${p.A.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${p.A.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,o.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))})),g=(0,c.Ay)(s.f3,{name:"MuiFilledInput",slot:"Input",overridesResolver:s.Oj})((({theme:e,ownerState:t})=>(0,o.A)({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"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}))),v=a.forwardRef((function(e,t){var r,a,c,u;const v=(0,d.A)({props:e,name:"MuiFilledInput"}),{components:b={},componentsProps:y,fullWidth:x=!1,inputComponent:w="input",multiline:A=!1,slotProps:C,slots:S={},type:k="text"}=v,_=(0,n.A)(v,h),E=(0,o.A)({},v,{fullWidth:x,inputComponent:w,multiline:A,type:k}),j=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},a=(0,l.A)(n,p.N,t);return(0,o.A)({},t,a)})(v),R={root:{ownerState:E},input:{ownerState:E}},M=(null!=C?C:y)?(0,i.A)(R,null!=C?C:y):R,P=null!=(r=null!=(a=S.root)?a:b.Root)?r:m,O=null!=(c=null!=(u=S.input)?u:b.Input)?c:g;return(0,f.jsx)(s.Ay,(0,o.A)({slots:{root:P,input:O},componentsProps:M,fullWidth:x,inputComponent:w,multiline:A,ref:t,type:k},_,{classes:j}))}));v.muiName="Input";const b=v},6959:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,N:()=>l});var n=r(58168),o=r(27553),a=r(17245),i=r(51175);function l(e){return(0,a.Ay)("MuiFilledInput",e)}const s=(0,n.A)({},i.A,(0,o.A)("MuiFilledInput",["root","underline","input"]))},50779:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(3541),c=r(11848),u=r(82891),d=r(28466),p=r(25602),f=r(33800),h=r(27553),m=r(17245);function g(e){return(0,m.Ay)("MuiFormControl",e)}(0,h.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var v=r(74848);const b=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],y=(0,c.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,t[`margin${(0,d.A)(e.margin)}`],e.fullWidth&&t.fullWidth)})((({ownerState:e})=>(0,o.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"}))),x=a.forwardRef((function(e,t){const r=(0,s.A)({props:e,name:"MuiFormControl"}),{children:c,className:h,color:m="primary",component:x="div",disabled:w=!1,error:A=!1,focused:C,fullWidth:S=!1,hiddenLabel:k=!1,margin:_="none",required:E=!1,size:j="medium",variant:R="outlined"}=r,M=(0,n.A)(r,b),P=(0,o.A)({},r,{color:m,component:x,disabled:w,error:A,fullWidth:S,hiddenLabel:k,margin:_,required:E,size:j,variant:R}),O=(e=>{const{classes:t,margin:r,fullWidth:n}=e,o={root:["root","none"!==r&&`margin${(0,d.A)(r)}`,n&&"fullWidth"]};return(0,l.A)(o,g,t)})(P),[I,T]=a.useState((()=>{let e=!1;return c&&a.Children.forEach(c,(t=>{if(!(0,p.A)(t,["Input","Select"]))return;const r=(0,p.A)(t,["Select"])?t.props.input:t;r&&(0,u.gr)(r.props)&&(e=!0)})),e})),[$,L]=a.useState((()=>{let e=!1;return c&&a.Children.forEach(c,(t=>{(0,p.A)(t,["Input","Select"])&&((0,u.lq)(t.props,!0)||(0,u.lq)(t.props.inputProps,!0))&&(e=!0)})),e})),[z,F]=a.useState(!1);w&&z&&F(!1);const D=void 0===C||w?z:C;let N;const B=a.useMemo((()=>({adornedStart:I,setAdornedStart:T,color:m,disabled:w,error:A,filled:$,focused:D,fullWidth:S,hiddenLabel:k,size:j,onBlur:()=>{F(!1)},onEmpty:()=>{L(!1)},onFilled:()=>{L(!0)},onFocus:()=>{F(!0)},registerEffect:N,required:E,variant:R})),[I,m,w,A,$,D,S,k,N,E,j,R]);return(0,v.jsx)(f.A.Provider,{value:B,children:(0,v.jsx)(y,(0,o.A)({as:x,ownerState:P,className:(0,i.A)(O.root,h),ref:t},M,{children:c}))})}))},33800:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(96540).createContext(void 0)},38086:(e,t,r)=>{"use strict";function n({props:e,states:t,muiFormControl:r}){return t.reduce(((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t)),{})}r.d(t,{A:()=>n})},79716:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(33800);function a(){return n.useContext(o.A)}},68864:(e,t,r)=>{"use strict";r.d(t,{A:()=>C});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(79716),c=r(50936),u=r(14073),d=r(28466),p=r(11848),f=r(3541),h=r(27553),m=r(17245);function g(e){return(0,m.Ay)("MuiFormControlLabel",e)}const v=(0,h.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var b=r(38086),y=r(74848);const x=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],w=(0,p.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${v.label}`]:t.label},t.root,t[`labelPlacement${(0,d.A)(r.labelPlacement)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${v.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${v.label}`]:{[`&.${v.disabled}`]:{color:(e.vars||e).palette.text.disabled}}}))),A=(0,p.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${v.error}`]:{color:(e.vars||e).palette.error.main}}))),C=a.forwardRef((function(e,t){var r,p;const h=(0,f.A)({props:e,name:"MuiFormControlLabel"}),{className:m,componentsProps:v={},control:C,disabled:S,disableTypography:k,label:_,labelPlacement:E="end",required:j,slotProps:R={}}=h,M=(0,n.A)(h,x),P=(0,s.A)(),O=null!=(r=null!=S?S:C.props.disabled)?r:null==P?void 0:P.disabled,I=null!=j?j:C.props.required,T={disabled:O,required:I};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===C.props[e]&&void 0!==h[e]&&(T[e]=h[e])}));const $=(0,b.A)({props:h,muiFormControl:P,states:["error"]}),L=(0,o.A)({},h,{disabled:O,labelPlacement:E,required:I,error:$.error}),z=(e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:a}=e,i={root:["root",r&&"disabled",`labelPlacement${(0,d.A)(n)}`,o&&"error",a&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,l.A)(i,g,t)})(L),F=null!=(p=R.typography)?p:v.typography;let D=_;return null==D||D.type===u.A||k||(D=(0,y.jsx)(u.A,(0,o.A)({component:"span"},F,{className:(0,i.A)(z.label,null==F?void 0:F.className),children:D}))),(0,y.jsxs)(w,(0,o.A)({className:(0,i.A)(z.root,m),ownerState:L,ref:t},M,{children:[a.cloneElement(C,T),I?(0,y.jsxs)(c.A,{display:"block",children:[D,(0,y.jsxs)(A,{ownerState:L,"aria-hidden":!0,className:z.asterisk,children:[" ","*"]})]}):D]}))}))},59839:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(58168),o=(r(96540),r(39940)),a=r(82858),i=r(74848);const l=function({styles:e,themeId:t,defaultTheme:r={}}){const n=(0,a.A)(r),l="function"==typeof e?e(t&&n[t]||n):e;return(0,i.jsx)(o.A,{styles:l})};var s=r(22765),c=r(58312);const u=function(e){return(0,i.jsx)(l,(0,n.A)({},e,{defaultTheme:s.A,themeId:c.A}))}},8239:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>k});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(89452),s=r(39599),c=r(64111),u=r(11848),d=r(3541),p=r(44675);const f=a.createContext();var h=r(27553),m=r(17245);function g(e){return(0,m.Ay)("MuiGrid",e)}const v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],b=(0,h.A)("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}`)),...v.map((e=>`grid-xs-${e}`)),...v.map((e=>`grid-sm-${e}`)),...v.map((e=>`grid-md-${e}`)),...v.map((e=>`grid-lg-${e}`)),...v.map((e=>`grid-xl-${e}`))]);var y=r(74848);const x=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function w(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function A({breakpoints:e,values:t}){let r="";Object.keys(t).forEach((e=>{""===r&&0!==t[e]&&(r=e)}));const n=Object.keys(e).sort(((t,r)=>e[t]-e[r]));return n.slice(0,n.indexOf(r))}const C=(0,u.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{container:n,direction:o,item:a,spacing:i,wrap:l,zeroMinWidth:s,breakpoints:c}=r;let u=[];n&&(u=function(e,t,r={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[r[`spacing-xs-${String(e)}`]];const n=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&n.push(r[`spacing-${t}-${String(o)}`])})),n}(i,c,t));const d=[];return c.forEach((e=>{const n=r[e];n&&d.push(t[`grid-${e}-${String(n)}`])})),[t.root,n&&t.container,a&&t.item,s&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==l&&t[`wrap-xs-${String(l)}`],...d]}})((({ownerState:e})=>(0,o.A)({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 r=(0,l.kW)({values:t.direction,breakpoints:e.breakpoints.values});return(0,l.NI)({theme:e},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${b.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:r,rowSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,l.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=A({breakpoints:e.breakpoints.values,values:t})),o=(0,l.NI)({theme:e},t,((t,n)=>{var o;const a=e.spacing(t);return"0px"!==a?{marginTop:`-${w(a)}`,[`& > .${b.item}`]:{paddingTop:w(a)}}:null!=(o=r)&&o.includes(n)?{}:{marginTop:0,[`& > .${b.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:r,columnSpacing:n}=t;let o={};if(r&&0!==n){const t=(0,l.kW)({values:n,breakpoints:e.breakpoints.values});let r;"object"==typeof t&&(r=A({breakpoints:e.breakpoints.values,values:t})),o=(0,l.NI)({theme:e},t,((t,n)=>{var o;const a=e.spacing(t);return"0px"!==a?{width:`calc(100% + ${w(a)})`,marginLeft:`-${w(a)}`,[`& > .${b.item}`]:{paddingLeft:w(a)}}:null!=(o=r)&&o.includes(n)?{}:{width:"100%",marginLeft:0,[`& > .${b.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce(((n,a)=>{let i={};if(t[a]&&(r=t[a]),!r)return n;if(!0===r)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===r)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=(0,l.kW)({values:t.columns,breakpoints:e.breakpoints.values}),c="object"==typeof s?s[a]:s;if(null==c)return n;const u=Math.round(r/c*1e8)/1e6+"%";let d={};if(t.container&&t.item&&0!==t.columnSpacing){const r=e.spacing(t.columnSpacing);if("0px"!==r){const e=`calc(${u} + ${w(r)})`;d={flexBasis:e,maxWidth:e}}}i=(0,o.A)({flexBasis:u,flexGrow:0,maxWidth:u},d)}return 0===e.breakpoints.values[a]?Object.assign(n,i):n[e.breakpoints.up(a)]=i,n}),{})})),S=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiGrid"}),{breakpoints:l}=(0,p.A)(),u=(0,s.A)(r),{className:h,columns:m,columnSpacing:v,component:b="div",container:w=!1,direction:A="row",item:S=!1,rowSpacing:k,spacing:_=0,wrap:E="wrap",zeroMinWidth:j=!1}=u,R=(0,n.A)(u,x),M=k||_,P=v||_,O=a.useContext(f),I=w?m||12:O,T={},$=(0,o.A)({},R);l.keys.forEach((e=>{null!=R[e]&&(T[e]=R[e],delete $[e])}));const L=(0,o.A)({},u,{columns:I,container:w,direction:A,item:S,rowSpacing:M,columnSpacing:P,wrap:E,zeroMinWidth:j,spacing:_},T,{breakpoints:l.keys}),z=(e=>{const{classes:t,container:r,direction:n,item:o,spacing:a,wrap:i,zeroMinWidth:l,breakpoints:s}=e;let u=[];r&&(u=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 r=[];return t.forEach((t=>{const n=e[t];if(Number(n)>0){const e=`spacing-${t}-${String(n)}`;r.push(e)}})),r}(a,s));const d=[];s.forEach((t=>{const r=e[t];r&&d.push(`grid-${t}-${String(r)}`)}));const p={root:["root",r&&"container",o&&"item",l&&"zeroMinWidth",...u,"row"!==n&&`direction-xs-${String(n)}`,"wrap"!==i&&`wrap-xs-${String(i)}`,...d]};return(0,c.A)(p,g,t)})(L);return(0,y.jsx)(f.Provider,{value:I,children:(0,y.jsx)(C,(0,o.A)({ownerState:L,className:(0,i.A)(z.root,h),as:b,ref:t},$))})})),k=S},87467:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(58168),o=r(98587),a=r(96540),i=r(42640),l=r(37353),s=r(44675),c=r(35186),u=r(96852),d=r(74848);const p=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function f(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:f(1)},entered:{opacity:1,transform:"none"}},m="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),g=a.forwardRef((function(e,t){const{addEndListener:r,appear:g=!0,children:v,easing:b,in:y,onEnter:x,onEntered:w,onEntering:A,onExit:C,onExited:S,onExiting:k,style:_,timeout:E="auto",TransitionComponent:j=l.Ay}=e,R=(0,o.A)(e,p),M=(0,i.A)(),P=a.useRef(),O=(0,s.A)(),I=a.useRef(null),T=(0,u.A)(I,v.ref,t),$=e=>t=>{if(e){const r=I.current;void 0===t?e(r):e(r,t)}},L=$(A),z=$(((e,t)=>{(0,c.q)(e);const{duration:r,delay:n,easing:o}=(0,c.c)({style:_,timeout:E,easing:b},{mode:"enter"});let a;"auto"===E?(a=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=a):a=r,e.style.transition=[O.transitions.create("opacity",{duration:a,delay:n}),O.transitions.create("transform",{duration:m?a:.666*a,delay:n,easing:o})].join(","),x&&x(e,t)})),F=$(w),D=$(k),N=$((e=>{const{duration:t,delay:r,easing:n}=(0,c.c)({style:_,timeout:E,easing:b},{mode:"exit"});let o;"auto"===E?(o=O.transitions.getAutoHeightDuration(e.clientHeight),P.current=o):o=t,e.style.transition=[O.transitions.create("opacity",{duration:o,delay:r}),O.transitions.create("transform",{duration:m?o:.666*o,delay:m?r:r||.333*o,easing:n})].join(","),e.style.opacity=0,e.style.transform=f(.75),C&&C(e)})),B=$(S);return(0,d.jsx)(j,(0,n.A)({appear:g,in:y,nodeRef:I,onEnter:z,onEntered:F,onEntering:L,onExit:N,onExited:B,onExiting:D,addEndListener:e=>{"auto"===E&&M.start(P.current||0,e),r&&r(I.current,e)},timeout:"auto"===E?null:E},R,{children:(e,t)=>a.cloneElement(v,(0,n.A)({style:(0,n.A)({opacity:0,transform:f(.75),visibility:"exited"!==e||y?void 0:"hidden"},h[e],_,v.props.style),ref:T},t))}))}));g.muiSupportAuto=!0;const v=g},11641:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(11848),u=r(3541),d=r(26606),p=r(28466),f=r(27553),h=r(17245);function m(e){return(0,h.Ay)("MuiIconButton",e)}const g=(0,f.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=r(74848);const b=["edge","children","className","color","disabled","disableFocusRipple","size"],y=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,p.A)(r.color)}`],r.edge&&t[`edge${(0,p.A)(r.edge)}`],t[`size${(0,p.A)(r.size)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var r;const n=null==(r=(e.vars||e).palette)?void 0:r[t.color];return(0,o.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.A)({color:null==n?void 0:n.main},!t.disableRipple&&{"&:hover":(0,o.A)({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${g.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),x=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiIconButton"}),{edge:a=!1,children:s,className:c,color:d="default",disabled:f=!1,disableFocusRipple:h=!1,size:g="medium"}=r,x=(0,n.A)(r,b),w=(0,o.A)({},r,{edge:a,color:d,disabled:f,disableFocusRipple:h,size:g}),A=(e=>{const{classes:t,disabled:r,color:n,edge:o,size:a}=e,i={root:["root",r&&"disabled","default"!==n&&`color${(0,p.A)(n)}`,o&&`edge${(0,p.A)(o)}`,`size${(0,p.A)(a)}`]};return(0,l.A)(i,m,t)})(w);return(0,v.jsx)(y,(0,o.A)({className:(0,i.A)(A.root,c),centerRipple:!0,focusRipple:!h,disabled:f,ref:t},x,{ownerState:w,children:s}))}))},77623:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(98587),o=r(58168),a=r(96540),i=r(64111),l=r(94521),s=r(83826),c=r(11848),u=r(39770),d=r(3541),p=r(25571),f=r(74848);const h=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],m=(0,c.Ay)(s.Sh,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...(0,s.WC)(e,t),!r.disableUnderline&&t.underline]}})((({theme:e,ownerState:t})=>{let r="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,o.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${p.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${p.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${p.A.disabled}, .${p.A.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${p.A.disabled}:before`]:{borderBottomStyle:"dotted"}})})),g=(0,c.Ay)(s.f3,{name:"MuiInput",slot:"Input",overridesResolver:s.Oj})({}),v=a.forwardRef((function(e,t){var r,a,c,u;const v=(0,d.A)({props:e,name:"MuiInput"}),{disableUnderline:b,components:y={},componentsProps:x,fullWidth:w=!1,inputComponent:A="input",multiline:C=!1,slotProps:S,slots:k={},type:_="text"}=v,E=(0,n.A)(v,h),j=(e=>{const{classes:t,disableUnderline:r}=e,n={root:["root",!r&&"underline"],input:["input"]},a=(0,i.A)(n,p.B,t);return(0,o.A)({},t,a)})(v),R={root:{ownerState:{disableUnderline:b}}},M=(null!=S?S:x)?(0,l.A)(null!=S?S:x,R):R,P=null!=(r=null!=(a=k.root)?a:y.Root)?r:m,O=null!=(c=null!=(u=k.input)?u:y.Input)?c:g;return(0,f.jsx)(s.Ay,(0,o.A)({slots:{root:P,input:O},slotProps:M,fullWidth:w,inputComponent:A,multiline:C,ref:t,type:_},E,{classes:j}))}));v.muiName="Input";const b=v},25571:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,B:()=>l});var n=r(58168),o=r(27553),a=r(17245),i=r(51175);function l(e){return(0,a.Ay)("MuiInput",e)}const s=(0,n.A)({},i.A,(0,o.A)("MuiInput",["root","underline","input"]))},83826:(e,t,r)=>{"use strict";r.d(t,{f3:()=>T,Sh:()=>I,Ay:()=>L,Oj:()=>O,WC:()=>P});var n=r(98587),o=r(58168),a=r(35697),i=r(96540),l=r(34164),s=r(54871),c=r(61489),u=r(50173),d=r(84965),p=r(74848);const f=["onChange","maxRows","minRows","style","value"];function h(e){return parseInt(e,10)||0}const m={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},g=i.forwardRef((function(e,t){const{onChange:r,maxRows:a,minRows:l=1,style:g,value:v}=e,b=(0,n.A)(e,f),{current:y}=i.useRef(null!=v),x=i.useRef(null),w=(0,s.A)(t,x),A=i.useRef(null),C=i.useCallback((()=>{const t=x.current,r=(0,c.A)(t).getComputedStyle(t);if("0px"===r.width)return{outerHeightStyle:0,overflowing:!1};const n=A.current;n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const o=r.boxSizing,i=h(r.paddingBottom)+h(r.paddingTop),s=h(r.borderBottomWidth)+h(r.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;return l&&(p=Math.max(Number(l)*d,p)),a&&(p=Math.min(Number(a)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+("border-box"===o?i+s:0),overflowing:Math.abs(p-u)<=1}}),[a,l,e.placeholder]),S=i.useCallback((()=>{const e=C();if(null==(t=e)||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const r=x.current;r.style.height=`${e.outerHeightStyle}px`,r.style.overflow=e.overflowing?"hidden":""}),[C]);return(0,u.A)((()=>{const e=()=>{S()};const t=(0,d.A)(e),r=x.current,n=(0,c.A)(r);let o;return n.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(e),o.observe(r)),()=>{t.clear(),cancelAnimationFrame(undefined),n.removeEventListener("resize",t),o&&o.disconnect()}}),[C,S]),(0,u.A)((()=>{S()})),(0,p.jsxs)(i.Fragment,{children:[(0,p.jsx)("textarea",(0,o.A)({value:v,onChange:e=>{y||S(),r&&r(e)},ref:w,rows:l,style:g},b)),(0,p.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:A,tabIndex:-1,style:(0,o.A)({},m,g,{paddingTop:0,paddingBottom:0})})]})}));var v=r(25419),b=r(64111),y=r(38086),x=r(33800),w=r(79716),A=r(11848),C=r(3541),S=r(28466),k=r(96852),_=r(2778),E=r(59839),j=r(82891),R=r(51175);const M=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],P=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,"small"===r.size&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${(0,S.A)(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},O=(e,t)=>{const{ownerState:r}=e;return[t.input,"small"===r.size&&t.inputSizeSmall,r.multiline&&t.inputMultiline,"search"===r.type&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},I=(0,A.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:P})((({theme:e,ownerState:t})=>(0,o.A)({},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",[`&.${R.A.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,o.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),T=(0,A.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:O})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode,n=(0,o.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),a={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,o.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${R.A.formControl} &`]:{"&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${R.A.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),$=(0,p.jsx)(E.A,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),L=i.forwardRef((function(e,t){var r;const s=(0,C.A)({props:e,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:u,autoFocus:d,className:f,components:h={},componentsProps:m={},defaultValue:A,disabled:E,disableInjectingGlobalStyles:P,endAdornment:O,fullWidth:L=!1,id:z,inputComponent:F="input",inputProps:D={},inputRef:N,maxRows:B,minRows:H,multiline:V=!1,name:W,onBlur:U,onChange:q,onClick:G,onFocus:K,onKeyDown:X,onKeyUp:Z,placeholder:Y,readOnly:Q,renderSuffix:J,rows:ee,slotProps:te={},slots:re={},startAdornment:ne,type:oe="text",value:ae}=s,ie=(0,n.A)(s,M),le=null!=D.value?D.value:ae,{current:se}=i.useRef(null!=le),ce=i.useRef(),ue=i.useCallback((e=>{}),[]),de=(0,k.A)(ce,N,D.ref,ue),[pe,fe]=i.useState(!1),he=(0,w.A)(),me=(0,y.A)({props:s,muiFormControl:he,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=he?he.focused:pe,i.useEffect((()=>{!he&&E&&pe&&(fe(!1),U&&U())}),[he,E,pe,U]);const ge=he&&he.onFilled,ve=he&&he.onEmpty,be=i.useCallback((e=>{(0,j.lq)(e)?ge&&ge():ve&&ve()}),[ge,ve]);(0,_.A)((()=>{se&&be({value:le})}),[le,be,se]),i.useEffect((()=>{be(ce.current)}),[]);let ye=F,xe=D;V&&"input"===ye&&(xe=ee?(0,o.A)({type:void 0,minRows:ee,maxRows:ee},xe):(0,o.A)({type:void 0,maxRows:B,minRows:H},xe),ye=g),i.useEffect((()=>{he&&he.setAdornedStart(Boolean(ne))}),[he,ne]);const we=(0,o.A)({},s,{color:me.color||"primary",disabled:me.disabled,endAdornment:O,error:me.error,focused:me.focused,formControl:he,fullWidth:L,hiddenLabel:me.hiddenLabel,multiline:V,size:me.size,startAdornment:ne,type:oe}),Ae=(e=>{const{classes:t,color:r,disabled:n,error:o,endAdornment:a,focused:i,formControl:l,fullWidth:s,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e,m={root:["root",`color${(0,S.A)(r)}`,n&&"disabled",o&&"error",s&&"fullWidth",i&&"focused",l&&"formControl",p&&"medium"!==p&&`size${(0,S.A)(p)}`,u&&"multiline",f&&"adornedStart",a&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",n&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",a&&"inputAdornedEnd",d&&"readOnly"]};return(0,b.A)(m,R.g,t)})(we),Ce=re.root||h.Root||I,Se=te.root||m.root||{},ke=re.input||h.Input||T;return xe=(0,o.A)({},xe,null!=(r=te.input)?r:m.input),(0,p.jsxs)(i.Fragment,{children:[!P&&$,(0,p.jsxs)(Ce,(0,o.A)({},Se,!(0,v.g)(Ce)&&{ownerState:(0,o.A)({},we,Se.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),G&&G(e)}},ie,{className:(0,l.A)(Ae.root,Se.className,f,Q&&"MuiInputBase-readOnly"),children:[ne,(0,p.jsx)(x.A.Provider,{value:null,children:(0,p.jsx)(ke,(0,o.A)({ownerState:we,"aria-invalid":me.error,"aria-describedby":c,autoComplete:u,autoFocus:d,defaultValue:A,disabled:me.disabled,id:z,onAnimationStart:e=>{be("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:W,placeholder:Y,readOnly:Q,required:me.required,rows:ee,value:le,onKeyDown:X,onKeyUp:Z,type:oe},xe,!(0,v.g)(ke)&&{as:ye,ownerState:(0,o.A)({},we,xe.ownerState)},{ref:de,className:(0,l.A)(Ae.input,xe.className,Q&&"MuiInputBase-readOnly"),onBlur:e=>{U&&U(e),D.onBlur&&D.onBlur(e),he&&he.onBlur?he.onBlur(e):fe(!1)},onChange:(e,...t)=>{if(!se){const t=e.target||ce.current;if(null==t)throw new Error((0,a.A)(1));be({value:t.value})}D.onChange&&D.onChange(e,...t),q&&q(e,...t)},onFocus:e=>{me.disabled?e.stopPropagation():(K&&K(e),D.onFocus&&D.onFocus(e),he&&he.onFocus?he.onFocus(e):fe(!0))}}))}),O,J?J((0,o.A)({},me,{startAdornment:ne})):null]}))]})}))},51175:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,g:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiInputBase",e)}const i=(0,n.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},82891:(e,t,r)=>{"use strict";function n(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(n(e.value)&&""!==e.value||t&&n(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}r.d(t,{gr:()=>a,lq:()=>o})},54433:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r(98587),o=r(58168),a=r(96540),i=r(64111),l=r(34164),s=r(38086),c=r(79716),u=r(28466),d=r(3541),p=r(11848),f=r(27553),h=r(17245);function m(e){return(0,h.Ay)("MuiFormLabel",e)}const g=(0,f.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var v=r(74848);const b=["children","className","color","component","disabled","error","filled","focused","required"],y=(0,p.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,o.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})((({theme:e,ownerState:t})=>(0,o.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${g.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}}))),x=(0,p.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}}))),w=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiFormLabel"}),{children:a,className:p,component:f="label"}=r,h=(0,n.A)(r,b),g=(0,c.A)(),w=(0,s.A)({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),A=(0,o.A)({},r,{color:w.color||"primary",component:f,disabled:w.disabled,error:w.error,filled:w.filled,focused:w.focused,required:w.required}),C=(e=>{const{classes:t,color:r,focused:n,disabled:o,error:a,filled:l,required:s}=e,c={root:["root",`color${(0,u.A)(r)}`,o&&"disabled",a&&"error",l&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return(0,i.A)(c,m,t)})(A);return(0,v.jsxs)(y,(0,o.A)({as:f,ownerState:A,className:(0,l.A)(C.root,p),ref:t},h,{children:[a,w.required&&(0,v.jsxs)(x,{ownerState:A,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}))}));var A=r(39770);function C(e){return(0,h.Ay)("MuiInputLabel",e)}(0,f.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const S=["disableAnimation","margin","shrink","variant","className"],k=(0,p.Ay)(w,{shouldForwardProp:e=>(0,A.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${g.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,"small"===r.size&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,o.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,o.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"})))),_=a.forwardRef((function(e,t){const r=(0,d.A)({name:"MuiInputLabel",props:e}),{disableAnimation:a=!1,shrink:p,className:f}=r,h=(0,n.A)(r,S),m=(0,c.A)();let g=p;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);const b=(0,s.A)({props:r,muiFormControl:m,states:["size","variant","required","focused"]}),y=(0,o.A)({},r,{disableAnimation:a,formControl:m,shrink:g,size:b.size,variant:b.variant,required:b.required,focused:b.focused}),x=(e=>{const{classes:t,formControl:r,size:n,shrink:a,disableAnimation:l,variant:s,required:c}=e,d={root:["root",r&&"formControl",!l&&"animated",a&&"shrink",n&&"normal"!==n&&`size${(0,u.A)(n)}`,s],asterisk:[c&&"asterisk"]},p=(0,i.A)(d,C,t);return(0,o.A)({},t,p)})(y);return(0,v.jsx)(k,(0,o.A)({"data-shrink":g,ownerState:y,ref:t,className:(0,l.A)(x.root,f)},h,{classes:x}))}))},49799:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(32850),d=r(27553),p=r(17245);function f(e){return(0,p.Ay)("MuiList",e)}(0,d.A)("MuiList",["root","padding","dense","subheader"]);var h=r(74848);const m=["children","className","component","dense","disablePadding","subheader"],g=(0,s.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})((({ownerState:e})=>(0,o.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),v=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiList"}),{children:s,className:d,component:p="ul",dense:v=!1,disablePadding:b=!1,subheader:y}=r,x=(0,n.A)(r,m),w=a.useMemo((()=>({dense:v})),[v]),A=(0,o.A)({},r,{component:p,dense:v,disablePadding:b}),C=(e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e,a={root:["root",!r&&"padding",n&&"dense",o&&"subheader"]};return(0,l.A)(a,f,t)})(A);return(0,h.jsx)(u.A.Provider,{value:w,children:(0,h.jsxs)(g,(0,o.A)({as:p,className:(0,i.A)(C.root,d),ref:t,ownerState:A},x,{children:[y,s]}))})}))},32850:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(96540).createContext({})},44635:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>j});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(25419),s=r(64111),c=r(771),u=r(11848),d=r(3541),p=r(26606),f=r(25602),h=r(2778),m=r(96852),g=r(32850),v=r(27553),b=r(17245);function y(e){return(0,b.Ay)("MuiListItem",e)}const x=(0,v.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var w=r(22927),A=r(44448),C=r(74848);const S=["className"],k=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],_=(0,u.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>(0,o.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,o.A)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${w.A.root}`]:{paddingRight:48}},{[`&.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${x.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${x.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${x.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,c.X4)(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,c.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),E=(0,u.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),j=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiListItem"}),{alignItems:c="center",autoFocus:u=!1,button:v=!1,children:b,className:w,component:j,components:R={},componentsProps:M={},ContainerComponent:P="li",ContainerProps:{className:O}={},dense:I=!1,disabled:T=!1,disableGutters:$=!1,disablePadding:L=!1,divider:z=!1,focusVisibleClassName:F,secondaryAction:D,selected:N=!1,slotProps:B={},slots:H={}}=r,V=(0,n.A)(r.ContainerProps,S),W=(0,n.A)(r,k),U=a.useContext(g.A),q=a.useMemo((()=>({dense:I||U.dense||!1,alignItems:c,disableGutters:$})),[c,U.dense,I,$]),G=a.useRef(null);(0,h.A)((()=>{u&&G.current&&G.current.focus()}),[u]);const K=a.Children.toArray(b),X=K.length&&(0,f.A)(K[K.length-1],["ListItemSecondaryAction"]),Z=(0,o.A)({},r,{alignItems:c,autoFocus:u,button:v,dense:q.dense,disabled:T,disableGutters:$,disablePadding:L,divider:z,hasSecondaryAction:X,selected:N}),Y=(e=>{const{alignItems:t,button:r,classes:n,dense:o,disabled:a,disableGutters:i,disablePadding:l,divider:c,hasSecondaryAction:u,selected:d}=e,p={root:["root",o&&"dense",!i&&"gutters",!l&&"padding",c&&"divider",a&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",u&&"secondaryAction",d&&"selected"],container:["container"]};return(0,s.A)(p,y,n)})(Z),Q=(0,m.A)(G,t),J=H.root||R.Root||_,ee=B.root||M.root||{},te=(0,o.A)({className:(0,i.A)(Y.root,ee.className,w),disabled:T},W);let re=j||"li";return v&&(te.component=j||"div",te.focusVisibleClassName=(0,i.A)(x.focusVisible,F),re=p.A),X?(re=te.component||j?re:"div","li"===P&&("li"===re?re="div":"li"===te.component&&(te.component="div")),(0,C.jsx)(g.A.Provider,{value:q,children:(0,C.jsxs)(E,(0,o.A)({as:P,className:(0,i.A)(Y.container,O),ref:Q,ownerState:Z},V,{children:[(0,C.jsx)(J,(0,o.A)({},ee,!(0,l.g)(J)&&{as:re,ownerState:(0,o.A)({},Z,ee.ownerState)},te,{children:K})),K.pop()]}))})):(0,C.jsx)(g.A.Provider,{value:q,children:(0,C.jsxs)(J,(0,o.A)({},ee,{as:re,ref:Q},!(0,l.g)(J)&&{ownerState:(0,o.A)({},Z,ee.ownerState)},te,{children:[K,D&&(0,C.jsx)(A.A,{children:D})]}))})}))},37211:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(11848),u=r(39770),d=r(3541),p=r(26606),f=r(2778),h=r(96852),m=r(32850),g=r(22927),v=r(74848);const b=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],y=(0,c.Ay)(p.A,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,o.A)({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"}},[`&.${g.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${g.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${g.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.X4)(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,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${g.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${g.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),x=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiListItemButton"}),{alignItems:s="center",autoFocus:c=!1,component:u="div",children:p,dense:x=!1,disableGutters:w=!1,divider:A=!1,focusVisibleClassName:C,selected:S=!1,className:k}=r,_=(0,n.A)(r,b),E=a.useContext(m.A),j=a.useMemo((()=>({dense:x||E.dense||!1,alignItems:s,disableGutters:w})),[s,E.dense,x,w]),R=a.useRef(null);(0,f.A)((()=>{c&&R.current&&R.current.focus()}),[c]);const M=(0,o.A)({},r,{alignItems:s,dense:j.dense,disableGutters:w,divider:A,selected:S}),P=(e=>{const{alignItems:t,classes:r,dense:n,disabled:a,disableGutters:i,divider:s,selected:c}=e,u={root:["root",n&&"dense",!i&&"gutters",s&&"divider",a&&"disabled","flex-start"===t&&"alignItemsFlexStart",c&&"selected"]},d=(0,l.A)(u,g.Y,r);return(0,o.A)({},r,d)})(M),O=(0,h.A)(R,t);return(0,v.jsx)(m.A.Provider,{value:j,children:(0,v.jsx)(y,(0,o.A)({ref:O,href:_.href||_.to,component:(_.href||_.to)&&"div"===u?"button":u,focusVisibleClassName:(0,i.A)(P.focusVisible,C),ownerState:M,className:(0,i.A)(P.root,k)},_,{classes:P,children:p}))})}))},22927:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,Y:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiListItemButton",e)}const i=(0,n.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},57873:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(66721),d=r(32850),p=r(74848);const f=["className"],h=(0,s.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>(0,o.A)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),m=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiListItemIcon"}),{className:s}=r,m=(0,n.A)(r,f),g=a.useContext(d.A),v=(0,o.A)({},r,{alignItems:g.alignItems}),b=(e=>{const{alignItems:t,classes:r}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,l.A)(n,u.f,r)})(v);return(0,p.jsx)(h,(0,o.A)({className:(0,i.A)(b.root,s),ownerState:v,ref:t},m))}))},66721:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,f:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiListItemIcon",e)}const i=(0,n.A)("MuiListItemIcon",["root","alignItemsFlexStart"])},44448:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(11848),c=r(3541),u=r(32850),d=r(27553),p=r(17245);function f(e){return(0,p.Ay)("MuiListItemSecondaryAction",e)}(0,d.A)("MuiListItemSecondaryAction",["root","disableGutters"]);var h=r(74848);const m=["className"],g=(0,s.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})((({ownerState:e})=>(0,o.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),v=a.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiListItemSecondaryAction"}),{className:s}=r,d=(0,n.A)(r,m),p=a.useContext(u.A),v=(0,o.A)({},r,{disableGutters:p.disableGutters}),b=(e=>{const{disableGutters:t,classes:r}=e,n={root:["root",t&&"disableGutters"]};return(0,l.A)(n,f,r)})(v);return(0,h.jsx)(g,(0,o.A)({className:(0,i.A)(b.root,s),ownerState:v,ref:t},d))}));v.muiName="ListItemSecondaryAction";const b=v},82241:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(14073),c=r(32850),u=r(3541),d=r(11848),p=r(68081),f=r(74848);const h=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,d.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${p.A.primary}`]:t.primary},{[`& .${p.A.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})((({ownerState:e})=>(0,o.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),g=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiListItemText"}),{children:d,className:g,disableTypography:v=!1,inset:b=!1,primary:y,primaryTypographyProps:x,secondary:w,secondaryTypographyProps:A}=r,C=(0,n.A)(r,h),{dense:S}=a.useContext(c.A);let k=null!=y?y:d,_=w;const E=(0,o.A)({},r,{disableTypography:v,inset:b,primary:!!k,secondary:!!_,dense:S}),j=(e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:a}=e,i={root:["root",r&&"inset",a&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,l.A)(i,p.b,t)})(E);return null==k||k.type===s.A||v||(k=(0,f.jsx)(s.A,(0,o.A)({variant:S?"body2":"body1",className:j.primary,component:null!=x&&x.variant?void 0:"span",display:"block"},x,{children:k}))),null==_||_.type===s.A||v||(_=(0,f.jsx)(s.A,(0,o.A)({variant:"body2",className:j.secondary,color:"text.secondary",display:"block"},A,{children:_}))),(0,f.jsxs)(m,(0,o.A)({className:(0,i.A)(j.root,g),ownerState:E,ref:t},C,{children:[k,_]}))}))},68081:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,b:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiListItemText",e)}const i=(0,n.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},94405:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r(58168),o=r(98587),a=r(96540),i=(r(44363),r(34164)),l=r(64111),s=r(92538),c=r(73788),u=r(88116),d=r(51749),p=r(11848),f=r(39770),h=r(3541),m=r(27553),g=r(17245);function v(e){return(0,g.Ay)("MuiMenu",e)}(0,m.A)("MuiMenu",["root","paper","list"]);var b=r(74848);const y=["onEntering"],x=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],w={vertical:"top",horizontal:"right"},A={vertical:"top",horizontal:"left"},C=(0,p.Ay)(d.Ay,{shouldForwardProp:e=>(0,f.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),S=(0,p.Ay)(d.IJ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),k=(0,p.Ay)(u.A,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),_=a.forwardRef((function(e,t){var r,u;const d=(0,h.A)({props:e,name:"MuiMenu"}),{autoFocus:p=!0,children:f,className:m,disableAutoFocusItem:g=!1,MenuListProps:_={},onClose:E,open:j,PaperProps:R={},PopoverClasses:M,transitionDuration:P="auto",TransitionProps:{onEntering:O}={},variant:I="selectedMenu",slots:T={},slotProps:$={}}=d,L=(0,o.A)(d.TransitionProps,y),z=(0,o.A)(d,x),F=(0,c.I)(),D=(0,n.A)({},d,{autoFocus:p,disableAutoFocusItem:g,MenuListProps:_,onEntering:O,PaperProps:R,transitionDuration:P,TransitionProps:L,variant:I}),N=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],paper:["paper"],list:["list"]},v,t)})(D),B=p&&!g&&j,H=a.useRef(null);let V=-1;a.Children.map(f,((e,t)=>{a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===I&&e.props.selected||-1===V)&&(V=t))}));const W=null!=(r=T.paper)?r:S,U=null!=(u=$.paper)?u:R,q=(0,s.Q)({elementType:T.root,externalSlotProps:$.root,ownerState:D,className:[N.root,m]}),G=(0,s.Q)({elementType:W,externalSlotProps:U,ownerState:D,className:N.paper});return(0,b.jsx)(C,(0,n.A)({onClose:E,anchorOrigin:{vertical:"bottom",horizontal:F?"right":"left"},transformOrigin:F?w:A,slots:{paper:W,root:T.root},slotProps:{root:q,paper:G},open:j,ref:t,transitionDuration:P,TransitionProps:(0,n.A)({onEntering:(e,t)=>{H.current&&H.current.adjustStyleForScrollbar(e,{direction:F?"rtl":"ltr"}),O&&O(e,t)}},L),ownerState:D},z,{classes:M,children:(0,b.jsx)(k,(0,n.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),E&&E(e,"tabKeyDown"))},actions:H,autoFocus:p&&(-1===V||g),autoFocusItem:B,variant:I},_,{className:(0,i.A)(N.list,_.className),children:f}))}))}))},73896:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(11848),u=r(39770),d=r(3541),p=r(32850),f=r(26606),h=r(2778),m=r(96852),g=r(61347),v=r(66721),b=r(68081),y=r(27553),x=r(17245);function w(e){return(0,x.Ay)("MuiMenuItem",e)}const A=(0,y.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=r(74848);const S=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],k=(0,c.Ay)(f.A,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>(0,o.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.X4)(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,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${g.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${g.A.inset}`]:{marginLeft:52},[`& .${b.A.root}`]:{marginTop:0,marginBottom:0},[`& .${b.A.inset}`]:{paddingLeft:36},[`& .${v.A.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,o.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${v.A.root} svg`]:{fontSize:"1.25rem"}})))),_=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:c="li",dense:u=!1,divider:f=!1,disableGutters:g=!1,focusVisibleClassName:v,role:b="menuitem",tabIndex:y,className:x}=r,A=(0,n.A)(r,S),_=a.useContext(p.A),E=a.useMemo((()=>({dense:u||_.dense||!1,disableGutters:g})),[_.dense,u,g]),j=a.useRef(null);(0,h.A)((()=>{s&&j.current&&j.current.focus()}),[s]);const R=(0,o.A)({},r,{dense:E.dense,divider:f,disableGutters:g}),M=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:a,selected:i,classes:s}=e,c={root:["root",r&&"dense",t&&"disabled",!a&&"gutters",n&&"divider",i&&"selected"]},u=(0,l.A)(c,w,s);return(0,o.A)({},s,u)})(r),P=(0,m.A)(j,t);let O;return r.disabled||(O=void 0!==y?y:-1),(0,C.jsx)(p.A.Provider,{value:E,children:(0,C.jsx)(k,(0,o.A)({ref:P,role:b,tabIndex:O,component:c,focusVisibleClassName:(0,i.A)(M.focusVisible,v),className:(0,i.A)(M.root,x)},A,{ownerState:R,classes:M}))})}))},88116:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(58168),o=r(98587),a=r(96540),i=(r(44363),r(96248)),l=r(49799);const s=r(36809).A;var c=r(96852),u=r(2778),d=r(74848);const p=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function f(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function h(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function m(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function g(e,t,r,n,o,a){let i=!1,l=o(e,t,!!t&&r);for(;l;){if(l===e.firstChild){if(i)return!1;i=!0}const t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&m(l,a)&&!t)return l.focus(),!0;l=o(e,l,r)}return!1}const v=a.forwardRef((function(e,t){const{actions:r,autoFocus:v=!1,autoFocusItem:b=!1,children:y,className:x,disabledItemsFocusable:w=!1,disableListWrap:A=!1,onKeyDown:C,variant:S="selectedMenu"}=e,k=(0,o.A)(e,p),_=a.useRef(null),E=a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,u.A)((()=>{v&&_.current.focus()}),[v]),a.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const r=!_.current.style.width;if(e.clientHeight<_.current.clientHeight&&r){const r=`${s((0,i.A)(e))}px`;_.current.style["rtl"===t?"paddingLeft":"paddingRight"]=r,_.current.style.width=`calc(100% + ${r})`}return _.current}})),[]);const j=(0,c.A)(_,t);let R=-1;a.Children.forEach(y,((e,t)=>{a.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===R)&&(R=t),R===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(R+=1,R>=y.length&&(R=-1))):R===t&&(R+=1,R>=y.length&&(R=-1))}));const M=a.Children.map(y,((e,t)=>{if(t===R){const t={};return b&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),a.cloneElement(e,t)}return e}));return(0,d.jsx)(l.A,(0,n.A)({role:"menu",ref:j,className:x,onKeyDown:e=>{const t=_.current,r=e.key,n=(0,i.A)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),g(t,n,A,w,f);else if("ArrowUp"===r)e.preventDefault(),g(t,n,A,w,h);else if("Home"===r)e.preventDefault(),g(t,null,A,w,f);else if("End"===r)e.preventDefault(),g(t,null,A,w,h);else if(1===r.length){const o=E.current,a=r.toLowerCase(),i=performance.now();o.keys.length>0&&(i-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&a!==o.keys[0]&&(o.repeating=!1)),o.lastTime=i,o.keys.push(a);const l=n&&!o.repeating&&m(n,o);o.previousKeyMatched&&(l||g(t,n,!1,w,f,o))?e.preventDefault():o.previousKeyMatched=!1}C&&C(e)},tabIndex:v?0:-1},k,{children:M}))}))},70818:(e,t,r)=>{"use strict";r.d(t,{A:()=>I});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(92538),s=r(54871),c=r(86249),u=r(66111);function d(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}var p=r(34718),f=r(61489),h=r(36809);function m(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function g(e){return parseInt((0,f.A)(e).getComputedStyle(e).paddingRight,10)||0}function v(e,t,r,n,o){const a=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===a.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&m(e,o)}))}function b(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}const y=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&m(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);v(t,e.mount,e.modalRef,n,!0);const o=b(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=b(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[r];n.restore||(n.restore=function(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,c.A)(e);return t.body===e?(0,f.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=(0,h.A)((0,c.A)(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${g(n)+e}px`;const t=(0,c.A)(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${g(t)+e}px`}))}let e;if(n.parentNode instanceof DocumentFragment)e=(0,c.A)(n).body;else{const t=n.parentElement,r=(0,f.A)(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.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()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}(n,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=b(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&m(e.modalRef,t),v(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&m(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};var x=r(64111),w=r(35487),A=r(63493),C=r(11848),S=r(3541),k=r(47419),_=r(27553),E=r(17245);function j(e){return(0,E.Ay)("MuiModal",e)}(0,_.A)("MuiModal",["root","hidden","backdrop"]);var R=r(74848);const M=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],P=(0,C.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})((({theme:e,ownerState:t})=>(0,o.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),O=(0,C.Ay)(k.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),I=a.forwardRef((function(e,t){var r,f,h,g,v,b;const C=(0,S.A)({name:"MuiModal",props:e}),{BackdropComponent:k=O,BackdropProps:_,className:E,closeAfterTransition:I=!1,children:T,container:$,component:L,components:z={},componentsProps:F={},disableAutoFocus:D=!1,disableEnforceFocus:N=!1,disableEscapeKeyDown:B=!1,disablePortal:H=!1,disableRestoreFocus:V=!1,disableScrollLock:W=!1,hideBackdrop:U=!1,keepMounted:q=!1,onBackdropClick:G,open:K,slotProps:X,slots:Z}=C,Y=(0,n.A)(C,M),Q=(0,o.A)({},C,{closeAfterTransition:I,disableAutoFocus:D,disableEnforceFocus:N,disableEscapeKeyDown:B,disablePortal:H,disableRestoreFocus:V,disableScrollLock:W,hideBackdrop:U,keepMounted:q}),{getRootProps:J,getBackdropProps:ee,getTransitionProps:te,portalRef:re,isTopModal:ne,exited:oe,hasTransition:ae}=function(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:i=y,closeAfterTransition:l=!1,onTransitionEnter:f,onTransitionExited:h,children:g,onClose:v,open:b,rootRef:x}=e,w=a.useRef({}),A=a.useRef(null),C=a.useRef(null),S=(0,s.A)(C,x),[k,_]=a.useState(!b),E=function(e){return!!e&&e.props.hasOwnProperty("in")}(g);let j=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(j=!1);const R=()=>(w.current.modalRef=C.current,w.current.mount=A.current,w.current),M=()=>{i.mount(R(),{disableScrollLock:n}),C.current&&(C.current.scrollTop=0)},P=(0,u.A)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,c.A)(A.current).body;i.add(R(),e),C.current&&M()})),O=a.useCallback((()=>i.isTopModal(R())),[i]),I=(0,u.A)((e=>{A.current=e,e&&(b&&O()?M():C.current&&m(C.current,j))})),T=a.useCallback((()=>{i.remove(R(),j)}),[j,i]);a.useEffect((()=>()=>{T()}),[T]),a.useEffect((()=>{b?P():E&&l||T()}),[b,T,E,l,P]);const $=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&O()&&(r||(t.stopPropagation(),v&&v(t,"escapeKeyDown")))},L=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.target===t.currentTarget&&v&&v(t,"backdropClick")};return{getRootProps:(t={})=>{const r=(0,p.h)(e);delete r.onTransitionEnter,delete r.onTransitionExited;const n=(0,o.A)({},r,t);return(0,o.A)({role:"presentation"},n,{onKeyDown:$(n),ref:S})},getBackdropProps:(e={})=>{const t=e;return(0,o.A)({"aria-hidden":!0},t,{onClick:L(t),open:b})},getTransitionProps:()=>({onEnter:d((()=>{_(!1),f&&f()}),null==g?void 0:g.props.onEnter),onExited:d((()=>{_(!0),h&&h(),l&&T()}),null==g?void 0:g.props.onExited)}),rootRef:S,portalRef:I,isTopModal:O,exited:k,hasTransition:E}}((0,o.A)({},Q,{rootRef:t})),ie=(0,o.A)({},Q,{exited:oe}),le=(e=>{const{open:t,exited:r,classes:n}=e,o={root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]};return(0,x.A)(o,j,n)})(ie),se={};if(void 0===T.props.tabIndex&&(se.tabIndex="-1"),ae){const{onEnter:e,onExited:t}=te();se.onEnter=e,se.onExited=t}const ce=null!=(r=null!=(f=null==Z?void 0:Z.root)?f:z.Root)?r:P,ue=null!=(h=null!=(g=null==Z?void 0:Z.backdrop)?g:z.Backdrop)?h:k,de=null!=(v=null==X?void 0:X.root)?v:F.root,pe=null!=(b=null==X?void 0:X.backdrop)?b:F.backdrop,fe=(0,l.Q)({elementType:ce,externalSlotProps:de,externalForwardedProps:Y,getSlotProps:J,additionalProps:{ref:t,as:L},ownerState:ie,className:(0,i.A)(E,null==de?void 0:de.className,null==le?void 0:le.root,!ie.open&&ie.exited&&(null==le?void 0:le.hidden))}),he=(0,l.Q)({elementType:ue,externalSlotProps:pe,additionalProps:_,getSlotProps:e=>ee((0,o.A)({},e,{onClick:t=>{G&&G(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,i.A)(null==pe?void 0:pe.className,null==_?void 0:_.className,null==le?void 0:le.backdrop),ownerState:ie});return q||K||ae&&!oe?(0,R.jsx)(A.Z,{ref:re,container:$,disablePortal:H,children:(0,R.jsxs)(ce,(0,o.A)({},fe,{children:[!U&&k?(0,R.jsx)(ue,(0,o.A)({},he)):null,(0,R.jsx)(w.s,{disableEnforceFocus:N,disableAutoFocus:D,disableRestoreFocus:V,isEnabled:ne,open:K,children:a.cloneElement(T,se)})]}))}):null}))},8641:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n,o=r(98587),a=r(58168),i=r(96540),l=r(64111),s=r(11848),c=r(39770),u=r(74848);const d=["children","classes","className","label","notched"],p=(0,s.Ay)("fieldset",{shouldForwardProp:c.A})({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%"}),f=(0,s.Ay)("legend",{shouldForwardProp:c.A})((({ownerState:e,theme:t})=>(0,a.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,a.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))));var h=r(79716),m=r(38086),g=r(71023),v=r(83826),b=r(3541);const y=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],x=(0,s.Ay)(v.Sh,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:v.WC})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.A.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${g.A.error} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.A.disabled} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,a.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))})),w=(0,s.Ay)((function(e){const{className:t,label:r,notched:i}=e,l=(0,o.A)(e,d),s=null!=r&&""!==r,c=(0,a.A)({},e,{notched:i,withLabel:s});return(0,u.jsx)(p,(0,a.A)({"aria-hidden":!0,className:t,ownerState:c},l,{children:(0,u.jsx)(f,{ownerState:c,children:s?(0,u.jsx)("span",{children:r}):n||(n=(0,u.jsx)("span",{className:"notranslate",children:"​"}))})}))}),{name:"MuiOutlinedInput",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{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),A=(0,s.Ay)(v.f3,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:v.Oj})((({theme:e,ownerState:t})=>(0,a.A)({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"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0}))),C=i.forwardRef((function(e,t){var r,n,s,c,d;const p=(0,b.A)({props:e,name:"MuiOutlinedInput"}),{components:f={},fullWidth:C=!1,inputComponent:S="input",label:k,multiline:_=!1,notched:E,slots:j={},type:R="text"}=p,M=(0,o.A)(p,y),P=(e=>{const{classes:t}=e,r=(0,l.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.v,t);return(0,a.A)({},t,r)})(p),O=(0,h.A)(),I=(0,m.A)({props:p,muiFormControl:O,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T=(0,a.A)({},p,{color:I.color||"primary",disabled:I.disabled,error:I.error,focused:I.focused,formControl:O,fullWidth:C,hiddenLabel:I.hiddenLabel,multiline:_,size:I.size,type:R}),$=null!=(r=null!=(n=j.root)?n:f.Root)?r:x,L=null!=(s=null!=(c=j.input)?c:f.Input)?s:A;return(0,u.jsx)(v.Ay,(0,a.A)({slots:{root:$,input:L},renderSuffix:e=>(0,u.jsx)(w,{ownerState:T,className:P.notchedOutline,label:null!=k&&""!==k&&I.required?d||(d=(0,u.jsxs)(i.Fragment,{children:[k," ","*"]})):k,notched:void 0!==E?E:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:C,inputComponent:S,multiline:_,ref:t,type:R},M,{classes:(0,a.A)({},P,{notchedOutline:null})}))}));C.muiName="Input";const S=C},71023:(e,t,r)=>{"use strict";r.d(t,{A:()=>s,v:()=>l});var n=r(58168),o=r(27553),a=r(17245),i=r(51175);function l(e){return(0,a.Ay)("MuiOutlinedInput",e)}const s=(0,n.A)({},i.A,(0,o.A)("MuiOutlinedInput",["root","notchedOutline","input"]))},60538:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(11848);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=r(3541),p=r(27553),f=r(17245);function h(e){return(0,f.Ay)("MuiPaper",e)}(0,p.A)("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=r(74848);const g=["className","component","elevation","square","variant"],v=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,"elevation"===r.variant&&t[`elevation${r.elevation}`]]}})((({theme:e,ownerState:t})=>{var r;return(0,o.A)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,o.A)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,s.X4)("#fff",u(t.elevation))}, ${(0,s.X4)("#fff",u(t.elevation))})`},e.vars&&{backgroundImage:null==(r=e.vars.overlays)?void 0:r[t.elevation]}))})),b=a.forwardRef((function(e,t){const r=(0,d.A)({props:e,name:"MuiPaper"}),{className:a,component:s="div",elevation:c=1,square:u=!1,variant:p="elevation"}=r,f=(0,n.A)(r,g),b=(0,o.A)({},r,{component:s,elevation:c,square:u,variant:p}),y=(e=>{const{square:t,elevation:r,variant:n,classes:o}=e,a={root:["root",n,!t&&"rounded","elevation"===n&&`elevation${r}`]};return(0,l.A)(a,h,o)})(b);return(0,m.jsx)(v,(0,o.A)({as:s,ownerState:b,className:(0,i.A)(y.root,a),ref:t},f))}))},51749:(e,t,r)=>{"use strict";r.d(t,{IJ:()=>P,Ay:()=>O});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(92538),s=r(25419),c=r(64111),u=r(11848),d=r(3541),p=r(1935),f=r(96248),h=r(93749),m=r(96852),g=r(87467),v=r(70818),b=r(60538),y=r(27553),x=r(17245);function w(e){return(0,x.Ay)("MuiPopover",e)}(0,y.A)("MuiPopover",["root","paper"]);var A=r(74848);const C=["onEntering"],S=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],k=["slotProps"];function _(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function E(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function j(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function R(e){return"function"==typeof e?e():e}const M=(0,u.Ay)(v.A,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),P=(0,u.Ay)(b.A,{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}),O=a.forwardRef((function(e,t){var r,u,v;const b=(0,d.A)({props:e,name:"MuiPopover"}),{action:y,anchorEl:x,anchorOrigin:O={vertical:"top",horizontal:"left"},anchorPosition:I,anchorReference:T="anchorEl",children:$,className:L,container:z,elevation:F=8,marginThreshold:D=16,open:N,PaperProps:B={},slots:H,slotProps:V,transformOrigin:W={vertical:"top",horizontal:"left"},TransitionComponent:U=g.A,transitionDuration:q="auto",TransitionProps:{onEntering:G}={},disableScrollLock:K=!1}=b,X=(0,o.A)(b.TransitionProps,C),Z=(0,o.A)(b,S),Y=null!=(r=null==V?void 0:V.paper)?r:B,Q=a.useRef(),J=(0,m.A)(Q,Y.ref),ee=(0,n.A)({},b,{anchorOrigin:O,anchorReference:T,elevation:F,marginThreshold:D,externalPaperSlotProps:Y,transformOrigin:W,TransitionComponent:U,transitionDuration:q,TransitionProps:X}),te=(e=>{const{classes:t}=e;return(0,c.A)({root:["root"],paper:["paper"]},w,t)})(ee),re=a.useCallback((()=>{if("anchorPosition"===T)return I;const e=R(x),t=(e&&1===e.nodeType?e:(0,f.A)(Q.current).body).getBoundingClientRect();return{top:t.top+_(t,O.vertical),left:t.left+E(t,O.horizontal)}}),[x,O.horizontal,O.vertical,I,T]),ne=a.useCallback((e=>({vertical:_(e,W.vertical),horizontal:E(e,W.horizontal)})),[W.horizontal,W.vertical]),oe=a.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},r=ne(t);if("none"===T)return{top:null,left:null,transformOrigin:j(r)};const n=re();let o=n.top-r.vertical,a=n.left-r.horizontal;const i=o+t.height,l=a+t.width,s=(0,h.A)(R(x)),c=s.innerHeight-D,u=s.innerWidth-D;if(null!==D&&oc){const e=i-c;o-=e,r.vertical+=e}if(null!==D&&au){const e=l-u;a-=e,r.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(a)}px`,transformOrigin:j(r)}}),[x,T,re,ne,D]),[ae,ie]=a.useState(N),le=a.useCallback((()=>{const e=Q.current;if(!e)return;const t=oe(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ie(!0)}),[oe]);a.useEffect((()=>(K&&window.addEventListener("scroll",le),()=>window.removeEventListener("scroll",le))),[x,K,le]),a.useEffect((()=>{N&&le()})),a.useImperativeHandle(y,(()=>N?{updatePosition:()=>{le()}}:null),[N,le]),a.useEffect((()=>{if(!N)return;const e=(0,p.A)((()=>{le()})),t=(0,h.A)(x);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[x,N,le]);let se=q;"auto"!==q||U.muiSupportAuto||(se=void 0);const ce=z||(x?(0,f.A)(R(x)).body:void 0),ue=null!=(u=null==H?void 0:H.root)?u:M,de=null!=(v=null==H?void 0:H.paper)?v:P,pe=(0,l.Q)({elementType:de,externalSlotProps:(0,n.A)({},Y,{style:ae?Y.style:(0,n.A)({},Y.style,{opacity:0})}),additionalProps:{elevation:F,ref:J},ownerState:ee,className:(0,i.A)(te.paper,null==Y?void 0:Y.className)}),fe=(0,l.Q)({elementType:ue,externalSlotProps:(null==V?void 0:V.root)||{},externalForwardedProps:Z,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:ce,open:N},ownerState:ee,className:(0,i.A)(te.root,L)}),{slotProps:he}=fe,me=(0,o.A)(fe,k);return(0,A.jsx)(ue,(0,n.A)({},me,!(0,s.g)(ue)&&{slotProps:he,disableScrollLock:K},{children:(0,A.jsx)(U,(0,n.A)({appear:!0,in:N,onEntering:(e,t)=>{G&&G(e,t),le()},onExited:()=>{ie(!1)},timeout:se},X,{children:(0,A.jsx)(de,(0,n.A)({},pe,{children:$}))}))}))}))},37591:(e,t,r)=>{"use strict";r.d(t,{A:()=>De});var n=r(58168),o=r(98587),a=r(96540),i=r(54871),l=r(50173),s=r(86249);function c(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 c(e).Element||e instanceof Element}function d(e){return e instanceof c(e).HTMLElement||e instanceof HTMLElement}function p(e){return"undefined"!=typeof ShadowRoot&&(e instanceof c(e).ShadowRoot||e instanceof ShadowRoot)}var f=Math.max,h=Math.min,m=Math.round;function g(){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 v(){return!/^((?!chrome|android).)*safari/i.test(g())}function b(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&d(e)&&(o=e.offsetWidth>0&&m(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&m(n.height)/e.offsetHeight||1);var i=(u(e)?c(e):window).visualViewport,l=!v()&&r,s=(n.left+(l&&i?i.offsetLeft:0))/o,p=(n.top+(l&&i?i.offsetTop:0))/a,f=n.width/o,h=n.height/a;return{width:f,height:h,top:p,right:s+f,bottom:p+h,left:s,x:s,y:p}}function y(e){var t=c(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function A(e){return b(w(e)).left+y(e).scrollLeft}function C(e){return c(e).getComputedStyle(e)}function S(e){var t=C(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function k(e,t,r){void 0===r&&(r=!1);var n,o,a=d(t),i=d(t)&&function(e){var t=e.getBoundingClientRect(),r=m(t.width)/e.offsetWidth||1,n=m(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),l=w(t),s=b(e,i,r),u={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(a||!a&&!r)&&(("body"!==x(t)||S(l))&&(u=(n=t)!==c(n)&&d(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:y(n)),d(t)?((p=b(t,!0)).x+=t.clientLeft,p.y+=t.clientTop):l&&(p.x=A(l))),{x:s.left+u.scrollLeft-p.x,y:s.top+u.scrollTop-p.y,width:s.width,height:s.height}}function _(e){var t=b(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function E(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(p(e)?e.host:null)||w(e)}function j(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:d(e)&&S(e)?e:j(E(e))}function R(e,t){var r;void 0===t&&(t=[]);var n=j(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=c(n),i=o?[a].concat(a.visualViewport||[],S(n)?n:[]):n,l=t.concat(i);return o?l:l.concat(R(E(i)))}function M(e){return["table","td","th"].indexOf(x(e))>=0}function P(e){return d(e)&&"fixed"!==C(e).position?e.offsetParent:null}function O(e){for(var t=c(e),r=P(e);r&&M(r)&&"static"===C(r).position;)r=P(r);return r&&("html"===x(r)||"body"===x(r)&&"static"===C(r).position)?t:r||function(e){var t=/firefox/i.test(g());if(/Trident/i.test(g())&&d(e)&&"fixed"===C(e).position)return null;var r=E(e);for(p(r)&&(r=r.host);d(r)&&["html","body"].indexOf(x(r))<0;){var n=C(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var I="top",T="bottom",$="right",L="left",z="auto",F=[I,T,$,L],D="start",N="end",B="viewport",H="popper",V=F.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+N])}),[]),W=[].concat(F,[z]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+N])}),[]),U=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var G={placement:"bottom",modifiers:[],strategy:"absolute"};function K(){for(var e=arguments.length,t=new Array(e),r=0;r=0?"x":"y"}function ee(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?Y(o):null,i=o?Q(o):null,l=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case I:t={x:l,y:r.y-n.height};break;case T:t={x:l,y:r.y+r.height};break;case $:t={x:r.x+r.width,y:s};break;case L:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?J(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case D:t[c]=t[c]-(r[u]/2-n[u]/2);break;case N:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,f=i.x,h=void 0===f?0:f,g=i.y,v=void 0===g?0:g,b="function"==typeof d?d({x:h,y:v}):{x:h,y:v};h=b.x,v=b.y;var y=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),A=L,S=I,k=window;if(u){var _=O(r),E="clientHeight",j="clientWidth";_===c(r)&&"static"!==C(_=w(r)).position&&"absolute"===l&&(E="scrollHeight",j="scrollWidth"),(o===I||(o===L||o===$)&&a===N)&&(S=T,v-=(p&&_===k&&k.visualViewport?k.visualViewport.height:_[E])-n.height,v*=s?1:-1),o!==L&&(o!==I&&o!==T||a!==N)||(A=$,h-=(p&&_===k&&k.visualViewport?k.visualViewport.width:_[j])-n.width,h*=s?1:-1)}var R,M=Object.assign({position:l},u&&te),P=!0===d?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:m(r*o)/o||0,y:m(n*o)/o||0}}({x:h,y:v},c(r)):{x:h,y:v};return h=P.x,v=P.y,s?Object.assign({},M,((R={})[S]=x?"0":"",R[A]=y?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",R)):Object.assign({},M,((t={})[S]=x?v+"px":"",t[A]=y?h+"px":"",t.transform="",t))}var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function oe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var ae={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function le(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&p(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}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 ce(e,t,r){return t===B?se(function(e,t){var r=c(e),n=w(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var u=v();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+A(e),y:s}}(e,r)):u(t)?function(e,t){var r=b(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):se(function(e){var t,r=w(e),n=y(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=f(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=f(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+A(e),s=-n.scrollTop;return"rtl"===C(o||r).direction&&(l+=f(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(w(e)))}function ue(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function de(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function pe(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,l=r.boundary,s=void 0===l?"clippingParents":l,c=r.rootBoundary,p=void 0===c?B:c,m=r.elementContext,g=void 0===m?H:m,v=r.altBoundary,y=void 0!==v&&v,A=r.padding,S=void 0===A?0:A,k=ue("number"!=typeof S?S:de(S,F)),_=g===H?"reference":H,j=e.rects.popper,M=e.elements[y?_:g],P=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=R(E(e)),r=["absolute","fixed"].indexOf(C(e).position)>=0&&d(e)?O(e):e;return u(r)?t.filter((function(e){return u(e)&&le(e,r)&&"body"!==x(e)})):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],l=a.reduce((function(t,r){var o=ce(e,r,n);return t.top=f(o.top,t.top),t.right=h(o.right,t.right),t.bottom=h(o.bottom,t.bottom),t.left=f(o.left,t.left),t}),ce(e,i,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}(u(M)?M:M.contextElement||w(e.elements.popper),s,p,i),L=b(e.elements.reference),z=ee({reference:L,element:j,strategy:"absolute",placement:o}),D=se(Object.assign({},j,z)),N=g===H?D:L,V={top:P.top-N.top+k.top,bottom:N.bottom-P.bottom+k.bottom,left:P.left-N.left+k.left,right:N.right-P.right+k.right},W=e.modifiersData.offset;if(g===H&&W){var U=W[o];Object.keys(V).forEach((function(e){var t=[$,T].indexOf(e)>=0?1:-1,r=[I,T].indexOf(e)>=0?"y":"x";V[e]+=U[r]*t}))}return V}function fe(e,t,r){return f(e,h(t,r))}function he(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function me(e){return[I,$,T,L].some((function(t){return e[t]>=0}))}var ge=X({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,l=void 0===i||i,s=c(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach((function(e){e.addEventListener("scroll",r.update,Z)})),l&&s.addEventListener("resize",r.update,Z),function(){a&&u.forEach((function(e){e.removeEventListener("scroll",r.update,Z)})),l&&s.removeEventListener("resize",r.update,Z)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=ee({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,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,l=r.roundOffsets,s=void 0===l||l,c={placement:Y(t.placement),variation:Q(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,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),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 r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];d(o)&&x(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});d(n)&&x(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=W.reduce((function(e,r){return e[r]=function(e,t,r){var n=Y(e),o=[L,I].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[L,$].indexOf(n)>=0?{x:l,y:i}:{x:i,y:l}}(r,t.rects,a),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0===i||i,s=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,h=void 0===f||f,m=r.allowedAutoPlacements,g=t.options.placement,v=Y(g),b=s||(v!==g&&h?function(e){if(Y(e)===z)return[];var t=oe(e);return[ie(e),t,ie(t)]}(g):[oe(g)]),y=[g].concat(b).reduce((function(e,r){return e.concat(Y(r)===z?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,l=r.flipVariations,s=r.allowedAutoPlacements,c=void 0===s?W:s,u=Q(n),d=u?l?V:V.filter((function(e){return Q(e)===u})):F,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,r){return t[r]=pe(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[Y(r)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):r)}),[]),x=t.rects.reference,w=t.rects.popper,A=new Map,C=!0,S=y[0],k=0;k=0,M=R?"width":"height",P=pe(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),O=R?j?$:L:j?T:I;x[M]>w[M]&&(O=oe(O));var N=oe(O),B=[];if(a&&B.push(P[E]<=0),l&&B.push(P[O]<=0,P[N]<=0),B.every((function(e){return e}))){S=_,C=!1;break}A.set(_,B)}if(C)for(var H=function(e){var t=y.find((function(t){var r=A.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},U=h?3:1;U>0&&"break"!==H(U);U--);t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,l=void 0!==i&&i,s=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,p=r.tether,m=void 0===p||p,g=r.tetherOffset,v=void 0===g?0:g,b=pe(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),y=Y(t.placement),x=Q(t.placement),w=!x,A=J(y),C="x"===A?"y":"x",S=t.modifiersData.popperOffsets,k=t.rects.reference,E=t.rects.popper,j="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,R="number"==typeof j?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(S){if(a){var z,F="y"===A?I:L,N="y"===A?T:$,B="y"===A?"height":"width",H=S[A],V=H+b[F],W=H-b[N],U=m?-E[B]/2:0,q=x===D?k[B]:E[B],G=x===D?-E[B]:-k[B],K=t.elements.arrow,X=m&&K?_(K):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[F],te=Z[N],re=fe(0,k[B],X[B]),ne=w?k[B]/2-U-re-ee-R.mainAxis:q-re-ee-R.mainAxis,oe=w?-k[B]/2+U+re+te+R.mainAxis:G+re+te+R.mainAxis,ae=t.elements.arrow&&O(t.elements.arrow),ie=ae?"y"===A?ae.clientTop||0:ae.clientLeft||0:0,le=null!=(z=null==M?void 0:M[A])?z:0,se=H+oe-le,ce=fe(m?h(V,H+ne-le-ie):V,H,m?f(W,se):W);S[A]=ce,P[A]=ce-H}if(l){var ue,de="x"===A?I:L,he="x"===A?T:$,me=S[C],ge="y"===C?"height":"width",ve=me+b[de],be=me-b[he],ye=-1!==[I,L].indexOf(y),xe=null!=(ue=null==M?void 0:M[C])?ue:0,we=ye?ve:me-k[ge]-E[ge]-xe+R.altAxis,Ae=ye?me+k[ge]+E[ge]-xe-R.altAxis:be,Ce=m&&ye?function(e,t,r){var n=fe(e,t,r);return n>r?r:n}(we,me,Ae):fe(m?we:ve,me,m?Ae:be);S[C]=Ce,P[C]=Ce-me}t.modifiersData[n]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,l=Y(r.placement),s=J(l),c=[L,$].indexOf(l)>=0?"height":"width";if(a&&i){var u=function(e,t){return ue("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:de(e,F))}(o.padding,r),d=_(a),p="y"===s?I:L,f="y"===s?T:$,h=r.rects.reference[c]+r.rects.reference[s]-i[s]-r.rects.popper[c],m=i[s]-r.rects.reference[s],g=O(a),v=g?"y"===s?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,y=u[p],x=v-d[c]-u[f],w=v/2-d[c]/2+b,A=fe(y,w,x),C=s;r.modifiersData[n]=((t={})[C]=A,t.centerOffset=A-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&le(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=pe(t,{elementContext:"reference"}),l=pe(t,{altBoundary:!0}),s=he(i,n),c=he(l,o,a),u=me(s),d=me(c);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ve=r(64111),be=r(63493),ye=r(17245);const xe="base";function we(e,t){const r=ye.li[t];return r?`${xe}--${r}`:function(e,t){return`${xe}-${e}-${t}`}(e,t)}const Ae="Popper";function Ce(e){return we(Ae,e)}!function(e,t){const r={};["root"].forEach((t=>{r[t]=we(e,t)}))}(Ae);var Se=r(92538),ke=r(74848);const _e={disableDefaultClasses:!1},Ee=a.createContext(_e),je=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Re=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Me(e){return"function"==typeof e?e():e}const Pe={},Oe=a.forwardRef((function(e,t){var r;const{anchorEl:s,children:c,direction:u,disablePortal:d,modifiers:p,open:f,placement:h,popperOptions:m,popperRef:g,slotProps:v={},slots:b={},TransitionProps:y}=e,x=(0,o.A)(e,je),w=a.useRef(null),A=(0,i.A)(w,t),C=a.useRef(null),S=(0,i.A)(C,g),k=a.useRef(S);(0,l.A)((()=>{k.current=S}),[S]),a.useImperativeHandle(g,(()=>C.current),[]);const _=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}}(h,u),[E,j]=a.useState(_),[R,M]=a.useState(Me(s));a.useEffect((()=>{C.current&&C.current.forceUpdate()})),a.useEffect((()=>{s&&M(Me(s))}),[s]),(0,l.A)((()=>{if(!R||!f)return;let e=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{j(e.placement)}}];null!=p&&(e=e.concat(p)),m&&null!=m.modifiers&&(e=e.concat(m.modifiers));const t=ge(R,w.current,(0,n.A)({placement:_},m,{modifiers:e}));return k.current(t),()=>{t.destroy(),k.current(null)}}),[R,d,p,f,m,_]);const P={placement:E};null!==y&&(P.TransitionProps=y);const O=(0,ve.A)({root:["root"]},function(e){const{disableDefaultClasses:t}=a.useContext(Ee);return r=>t?"":e(r)}(Ce)),I=null!=(r=b.root)?r:"div",T=(0,Se.Q)({elementType:I,externalSlotProps:v.root,externalForwardedProps:x,additionalProps:{role:"tooltip",ref:A},ownerState:e,className:O.root});return(0,ke.jsx)(I,(0,n.A)({},T,{children:"function"==typeof c?c(P):c}))})),Ie=a.forwardRef((function(e,t){const{anchorEl:r,children:i,container:l,direction:c="ltr",disablePortal:u=!1,keepMounted:d=!1,modifiers:p,open:f,placement:h="bottom",popperOptions:m=Pe,popperRef:g,style:v,transition:b=!1,slotProps:y={},slots:x={}}=e,w=(0,o.A)(e,Re),[A,C]=a.useState(!0);if(!d&&!f&&(!b||A))return null;let S;if(l)S=l;else if(r){const e=Me(r);S=e&&void 0!==e.nodeType?(0,s.A)(e).body:(0,s.A)(null).body}const k=f||!d||b&&!A?void 0:"none",_=b?{in:f,onEnter:()=>{C(!1)},onExited:()=>{C(!0)}}:void 0;return(0,ke.jsx)(be.Z,{disablePortal:u,container:S,children:(0,ke.jsx)(Oe,(0,n.A)({anchorEl:r,direction:c,disablePortal:u,modifiers:p,ref:t,open:b?!A:f,placement:h,popperOptions:m,popperRef:g,slotProps:y,slots:x},w,{style:(0,n.A)({position:"fixed",top:0,left:0,display:k},v),TransitionProps:_,children:i}))})}));var Te=r(72923),$e=r(11848),Le=r(3541);const ze=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Fe=(0,$e.Ay)(Ie,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),De=a.forwardRef((function(e,t){var r;const a=(0,Te.A)(),i=(0,Le.A)({props:e,name:"MuiPopper"}),{anchorEl:l,component:s,components:c,componentsProps:u,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:v,popperRef:b,transition:y,slots:x,slotProps:w}=i,A=(0,o.A)(i,ze),C=null!=(r=null==x?void 0:x.root)?r:null==c?void 0:c.Root,S=(0,n.A)({anchorEl:l,container:d,disablePortal:p,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:v,popperRef:b,transition:y},A);return(0,ke.jsx)(Fe,(0,n.A)({as:s,direction:null==a?void 0:a.direction,slots:{root:C},slotProps:null!=w?w:u},S,{ref:t}))}))},2071:(e,t,r)=>{"use strict";r.d(t,{A:()=>te});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(94521),s=r(35697),c=(r(44363),r(64111)),u=r(14953),d=r(96248),p=r(28466),f=r(94405),h=r(27553),m=r(17245);function g(e){return(0,m.Ay)("MuiNativeSelect",e)}const v=(0,h.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var b=r(11848),y=r(39770),x=r(74848);const w=["className","disabled","error","IconComponent","inputRef","variant"],A=({ownerState:e,theme:t})=>(0,n.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,n.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${v.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),C=(0,b.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:y.A,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${v.multiple}`]:t.multiple}]}})(A),S=({ownerState:e,theme:t})=>(0,n.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${v.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),k=(0,b.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,p.A)(r.variant)}`],r.open&&t.iconOpen]}})(S),_=a.forwardRef((function(e,t){const{className:r,disabled:l,error:s,IconComponent:u,inputRef:d,variant:f="standard"}=e,h=(0,o.A)(e,w),m=(0,n.A)({},e,{disabled:l,variant:f,error:s}),v=(e=>{const{classes:t,variant:r,disabled:n,multiple:o,open:a,error:i}=e,l={select:["select",r,n&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${(0,p.A)(r)}`,a&&"iconOpen",n&&"disabled"]};return(0,c.A)(l,g,t)})(m);return(0,x.jsxs)(a.Fragment,{children:[(0,x.jsx)(C,(0,n.A)({ownerState:m,className:(0,i.A)(v.select,r),disabled:l,ref:d||t},h)),e.multiple?null:(0,x.jsx)(k,{as:u,ownerState:m,className:v.icon})]})}));var E=r(82891),j=r(64438),R=r(96852),M=r(41159);function P(e){return(0,m.Ay)("MuiSelect",e)}const O=(0,h.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var I;const T=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],$=(0,b.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${O.select}`]:t.select},{[`&.${O.select}`]:t[r.variant]},{[`&.${O.error}`]:t.error},{[`&.${O.multiple}`]:t.multiple}]}})(A,{[`&.${O.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),L=(0,b.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${(0,p.A)(r.variant)}`],r.open&&t.iconOpen]}})(S),z=(0,b.Ay)("input",{shouldForwardProp:e=>(0,j.A)(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 F(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function D(e){return null==e||"string"==typeof e&&!e.trim()}const N=a.forwardRef((function(e,t){var r;const{"aria-describedby":l,"aria-label":h,autoFocus:m,autoWidth:g,children:v,className:b,defaultOpen:y,defaultValue:w,disabled:A,displayEmpty:C,error:S=!1,IconComponent:k,inputRef:_,labelId:j,MenuProps:O={},multiple:N,name:B,onBlur:H,onChange:V,onClose:W,onFocus:U,onOpen:q,open:G,readOnly:K,renderValue:X,SelectDisplayProps:Z={},tabIndex:Y,value:Q,variant:J="standard"}=e,ee=(0,o.A)(e,T),[te,re]=(0,M.A)({controlled:Q,default:w,name:"Select"}),[ne,oe]=(0,M.A)({controlled:G,default:y,name:"Select"}),ae=a.useRef(null),ie=a.useRef(null),[le,se]=a.useState(null),{current:ce}=a.useRef(null!=G),[ue,de]=a.useState(),pe=(0,R.A)(t,_),fe=a.useCallback((e=>{ie.current=e,e&&se(e)}),[]),he=null==le?void 0:le.parentNode;a.useImperativeHandle(pe,(()=>({focus:()=>{ie.current.focus()},node:ae.current,value:te})),[te]),a.useEffect((()=>{y&&ne&&le&&!ce&&(de(g?null:he.clientWidth),ie.current.focus())}),[le,g]),a.useEffect((()=>{m&&ie.current.focus()}),[m]),a.useEffect((()=>{if(!j)return;const e=(0,d.A)(ie.current).getElementById(j);if(e){const t=()=>{getSelection().isCollapsed&&ie.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[j]);const me=(e,t)=>{e?q&&q(t):W&&W(t),ce||(de(g?null:he.clientWidth),oe(e))},ge=a.Children.toArray(v),ve=e=>t=>{let r;if(t.currentTarget.hasAttribute("tabindex")){if(N){r=Array.isArray(te)?te.slice():[];const t=te.indexOf(e.props.value);-1===t?r.push(e.props.value):r.splice(t,1)}else r=e.props.value;if(e.props.onClick&&e.props.onClick(t),te!==r&&(re(r),V)){const n=t.nativeEvent||t,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:r,name:B}}),V(o,e)}N||me(!1,t)}},be=null!==le&≠let ye,xe;delete ee["aria-invalid"];const we=[];let Ae=!1,Ce=!1;((0,E.lq)({value:te})||C)&&(X?ye=X(te):Ae=!0);const Se=ge.map((e=>{if(!a.isValidElement(e))return null;let t;if(N){if(!Array.isArray(te))throw new Error((0,s.A)(2));t=te.some((t=>F(t,e.props.value))),t&&Ae&&we.push(e.props.children)}else t=F(te,e.props.value),t&&Ae&&(xe=e.props.children);return t&&(Ce=!0),a.cloneElement(e,{"aria-selected":t?"true":"false",onClick:ve(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})}));Ae&&(ye=N?0===we.length?null:we.reduce(((e,t,r)=>(e.push(t),r{const{classes:t,variant:r,disabled:n,multiple:o,open:a,error:i}=e,l={select:["select",r,n&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${(0,p.A)(r)}`,a&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return(0,c.A)(l,P,t)})(je),Me=(0,n.A)({},O.PaperProps,null==(r=O.slotProps)?void 0:r.paper),Pe=(0,u.A)();return(0,x.jsxs)(a.Fragment,{children:[(0,x.jsx)($,(0,n.A)({ref:fe,tabIndex:ke,role:"combobox","aria-controls":Pe,"aria-disabled":A?"true":void 0,"aria-expanded":be?"true":"false","aria-haspopup":"listbox","aria-label":h,"aria-labelledby":[j,Ee].filter(Boolean).join(" ")||void 0,"aria-describedby":l,onKeyDown:e=>{K||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),me(!0,e))},onMouseDown:A||K?null:e=>{0===e.button&&(e.preventDefault(),ie.current.focus(),me(!0,e))},onBlur:e=>{!be&&H&&(Object.defineProperty(e,"target",{writable:!0,value:{value:te,name:B}}),H(e))},onFocus:U},Z,{ownerState:je,className:(0,i.A)(Z.className,Re.select,b),id:Ee,children:D(ye)?I||(I=(0,x.jsx)("span",{className:"notranslate",children:"​"})):ye})),(0,x.jsx)(z,(0,n.A)({"aria-invalid":S,value:Array.isArray(te)?te.join(","):te,name:B,ref:ae,"aria-hidden":!0,onChange:e=>{const t=ge.find((t=>t.props.value===e.target.value));void 0!==t&&(re(t.props.value),V&&V(e,t))},tabIndex:-1,disabled:A,className:Re.nativeInput,autoFocus:m,ownerState:je},ee)),(0,x.jsx)(L,{as:k,className:Re.icon,ownerState:je}),(0,x.jsx)(f.A,(0,n.A)({id:`menu-${B||""}`,anchorEl:he,open:be,onClose:e=>{me(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},O,{MenuListProps:(0,n.A)({"aria-labelledby":j,role:"listbox","aria-multiselectable":N?"true":void 0,disableListWrap:!0,id:Pe},O.MenuListProps),slotProps:(0,n.A)({},O.slotProps,{paper:(0,n.A)({},Me,{style:(0,n.A)({minWidth:_e},null!=Me?Me.style:null)})}),children:Se}))]})}));var B=r(38086),H=r(79716),V=r(602),W=r(77623),U=r(21915),q=r(8641),G=r(3541);const K=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],X=["root"],Z={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,y.A)(e)&&"variant"!==e,slot:"Root"},Y=(0,b.Ay)(W.A,Z)(""),Q=(0,b.Ay)(q.A,Z)(""),J=(0,b.Ay)(U.A,Z)(""),ee=a.forwardRef((function(e,t){const r=(0,G.A)({name:"MuiSelect",props:e}),{autoWidth:s=!1,children:c,classes:u={},className:d,defaultOpen:p=!1,displayEmpty:f=!1,IconComponent:h=V.A,id:m,input:g,inputProps:v,label:b,labelId:y,MenuProps:w,multiple:A=!1,native:C=!1,onClose:S,onOpen:k,open:E,renderValue:j,SelectDisplayProps:M,variant:P="outlined"}=r,O=(0,o.A)(r,K),I=C?_:N,T=(0,H.A)(),$=(0,B.A)({props:r,muiFormControl:T,states:["variant","error"]}),L=$.variant||P,z=(0,n.A)({},r,{variant:L,classes:u}),F=(e=>{const{classes:t}=e;return t})(z),D=(0,o.A)(F,X),W=g||{standard:(0,x.jsx)(Y,{ownerState:z}),outlined:(0,x.jsx)(Q,{label:b,ownerState:z}),filled:(0,x.jsx)(J,{ownerState:z})}[L],U=(0,R.A)(t,W.ref);return(0,x.jsx)(a.Fragment,{children:a.cloneElement(W,(0,n.A)({inputComponent:I,inputProps:(0,n.A)({children:c,error:$.error,IconComponent:h,variant:L,type:void 0,multiple:A},C?{id:m}:{autoWidth:s,defaultOpen:p,displayEmpty:f,labelId:y,MenuProps:w,onClose:S,onOpen:k,open:E,renderValue:j,SelectDisplayProps:(0,n.A)({id:m},M)},v,{classes:v?(0,l.A)(D,v.classes):D},g?g.props.inputProps:{})},(A&&C||f)&&"outlined"===L?{notched:!0}:{},{ref:U,className:(0,i.A)(W.props.className,d,F.root)},!g&&{variant:L},O))})}));ee.muiName="Select";const te=ee},33066:(e,t,r)=>{"use strict";r.d(t,{A:()=>I});var n=r(98587),o=r(58168),a=r(96540),i=r(92538),l=r(64111),s=r(84475),c=r(42640),u=r(66111),d=r(34718),p=r(11848),f=r(44675),h=r(3541),m=r(28466),g=r(87467),v=r(34164),b=r(771),y=r(60538),x=r(27553),w=r(17245);function A(e){return(0,w.Ay)("MuiSnackbarContent",e)}(0,x.A)("MuiSnackbarContent",["root","message","action"]);var C=r(74848);const S=["action","className","message","role"],k=(0,p.Ay)(y.A,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const t="light"===e.palette.mode?.8:.98,r=(0,b.tL)(e.palette.background.default,t);return(0,o.A)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(r),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),_=(0,p.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),E=(0,p.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),j=a.forwardRef((function(e,t){const r=(0,h.A)({props:e,name:"MuiSnackbarContent"}),{action:a,className:i,message:s,role:c="alert"}=r,u=(0,n.A)(r,S),d=r,p=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"],action:["action"],message:["message"]},A,t)})(d);return(0,C.jsxs)(k,(0,o.A)({role:c,square:!0,elevation:6,className:(0,v.A)(p.root,i),ownerState:d,ref:t},u,{children:[(0,C.jsx)(_,{className:p.message,ownerState:d,children:s}),a?(0,C.jsx)(E,{className:p.action,ownerState:d,children:a}):null]}))}));function R(e){return(0,w.Ay)("MuiSnackbar",e)}(0,x.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const M=["onEnter","onExited"],P=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],O=(0,p.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${(0,m.A)(r.anchorOrigin.vertical)}${(0,m.A)(r.anchorOrigin.horizontal)}`]]}})((({theme:e,ownerState:t})=>(0,o.A)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,o.A)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})}))),I=a.forwardRef((function(e,t){const r=(0,h.A)({props:e,name:"MuiSnackbar"}),p=(0,f.A)(),v={enter:p.transitions.duration.enteringScreen,exit:p.transitions.duration.leavingScreen},{action:b,anchorOrigin:{vertical:y,horizontal:x}={vertical:"bottom",horizontal:"left"},autoHideDuration:w=null,children:A,className:S,ClickAwayListenerProps:k,ContentProps:_,disableWindowBlurListener:E=!1,message:I,open:T,TransitionComponent:$=g.A,transitionDuration:L=v,TransitionProps:{onEnter:z,onExited:F}={}}=r,D=(0,n.A)(r.TransitionProps,M),N=(0,n.A)(r,P),B=(0,o.A)({},r,{anchorOrigin:{vertical:y,horizontal:x},autoHideDuration:w,disableWindowBlurListener:E,TransitionComponent:$,transitionDuration:L}),H=(e=>{const{classes:t,anchorOrigin:r}=e,n={root:["root",`anchorOrigin${(0,m.A)(r.vertical)}${(0,m.A)(r.horizontal)}`]};return(0,l.A)(n,R,t)})(B),{getRootProps:V,onClickAway:W}=function(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:n,open:i,resumeHideDuration:l}=e,s=(0,c.A)();a.useEffect((()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==n||n(e,"escapeKeyDown")}}),[i,n]);const p=(0,u.A)(((e,t)=>{null==n||n(e,t)})),f=(0,u.A)((e=>{n&&null!=e&&s.start(e,(()=>{p(null,"timeout")}))}));a.useEffect((()=>(i&&f(t),s.clear)),[i,t,f,s]);const h=s.clear,m=a.useCallback((()=>{null!=t&&f(null!=l?l:.5*t)}),[t,l,f]),g=e=>t=>{const r=e.onFocus;null==r||r(t),h()},v=e=>t=>{const r=e.onMouseEnter;null==r||r(t),h()},b=e=>t=>{const r=e.onMouseLeave;null==r||r(t),m()};return a.useEffect((()=>{if(!r&&i)return window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}}),[r,i,m,h]),{getRootProps:(t={})=>{const r=(0,o.A)({},(0,d.h)(e),(0,d.h)(t));return(0,o.A)({role:"presentation"},t,r,{onBlur:(n=r,e=>{const t=n.onBlur;null==t||t(e),m()}),onFocus:g(r),onMouseEnter:v(r),onMouseLeave:b(r)});var n},onClickAway:e=>{null==n||n(e,"clickaway")}}}((0,o.A)({},B)),[U,q]=a.useState(!0),G=(0,i.Q)({elementType:O,getSlotProps:V,externalForwardedProps:N,ownerState:B,additionalProps:{ref:t},className:[H.root,S]});return!T&&U?null:(0,C.jsx)(s.x,(0,o.A)({onClickAway:W},k,{children:(0,C.jsx)(O,(0,o.A)({},G,{children:(0,C.jsx)($,(0,o.A)({appear:!0,in:T,timeout:L,direction:"top"===y?"down":"up",onEnter:(e,t)=>{q(!1),z&&z(e,t)},onExited:e=>{q(!0),F&&F(e)}},D,{children:A||(0,C.jsx)(j,(0,o.A)({message:I,action:b},_))}))}))}))}))},50936:(e,t,r)=>{"use strict";r.d(t,{A:()=>F});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(94521),s=r(17245),c=r(64111),u=r(9359),d=r(58749),p=r(33571);const f=["ownerState"],h=["variants"],m=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function g(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const v=(0,d.A)(),b=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function x(e){return e?(t,r)=>r[e]:null}function w(e,t){let{ownerState:r}=t,a=(0,n.A)(t,f);const i="function"==typeof e?e((0,o.A)({ownerState:r},a)):e;if(Array.isArray(i))return i.flatMap((e=>w(e,(0,o.A)({ownerState:r},a))));if(i&&"object"==typeof i&&Array.isArray(i.variants)){const{variants:e=[]}=i;let t=(0,n.A)(i,h);return e.forEach((e=>{let n=!0;"function"==typeof e.props?n=e.props((0,o.A)({ownerState:r},a,r)):Object.keys(e.props).forEach((t=>{(null==r?void 0:r[t])!==e.props[t]&&a[t]!==e.props[t]&&(n=!1)})),n&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,o.A)({ownerState:r},a,r)):e.style))})),t}return i}const A=function(e={}){const{themeId:t,defaultTheme:r=v,rootShouldForwardProp:a=g,slotShouldForwardProp:i=g}=e,s=e=>(0,p.A)((0,o.A)({},e,{theme:y((0,o.A)({},e,{defaultTheme:r,themeId:t}))}));return s.__mui_systemSx=!0,(e,c={})=>{(0,u.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:f,skipSx:h,overridesResolver:v=x(b(p))}=c,A=(0,n.A)(c,m),C=void 0!==f?f:p&&"Root"!==p&&"root"!==p||!1,S=h||!1;let k=g;"Root"===p||"root"===p?k=a:p?k=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const _=(0,u.default)(e,(0,o.A)({shouldForwardProp:k,label:void 0},A)),E=e=>"function"==typeof e&&e.__emotion_real!==e||(0,l.Q)(e)?n=>w(e,(0,o.A)({},n,{theme:y({theme:n.theme,defaultTheme:r,themeId:t})})):e,j=(n,...a)=>{let i=E(n);const l=a?a.map(E):[];d&&v&&l.push((e=>{const n=y((0,o.A)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[d]||!n.components[d].styleOverrides)return null;const a=n.components[d].styleOverrides,i={};return Object.entries(a).forEach((([t,r])=>{i[t]=w(r,(0,o.A)({},e,{theme:n}))})),v(e,i)})),d&&!C&&l.push((e=>{var n;const a=y((0,o.A)({},e,{defaultTheme:r,themeId:t}));return w({variants:null==a||null==(n=a.components)||null==(n=n[d])?void 0:n.variants},(0,o.A)({},e,{theme:a}))})),S||l.push(s);const c=l.length-a.length;if(Array.isArray(n)&&c>0){const e=new Array(c).fill("");i=[...n,...e],i.raw=[...n.raw,...e]}const u=_(i,...l);return e.muiName&&(u.muiName=e.muiName),u};return _.withConfig&&(j.withConfig=_.withConfig),j}}(),C=A;var S=r(44467),k=r(39599),_=r(89452),E=r(68248),j=r(74848);const R=["component","direction","spacing","divider","children","className","useFlexGap"],M=(0,d.A)(),P=C("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function O(e){return(0,S.A)({props:e,name:"MuiStack",defaultTheme:M})}function I(e,t){const r=a.Children.toArray(e).filter(Boolean);return r.reduce(((e,n,o)=>(e.push(n),o{let r=(0,o.A)({display:"flex",flexDirection:"column"},(0,_.NI)({theme:t},(0,_.kW)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e}))));if(e.spacing){const n=(0,E.LX)(t),o=Object.keys(t.breakpoints.values).reduce(((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t)),{}),a=(0,_.kW)({values:e.direction,base:o}),i=(0,_.kW)({values:e.spacing,base:o});"object"==typeof a&&Object.keys(a).forEach(((e,t,r)=>{if(!a[e]){const n=t>0?a[r[t-1]]:"column";a[e]=n}}));const s=(t,r)=>{return e.useFlexGap?{gap:(0,E._W)(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=r?a[r]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,E._W)(n,t)}};var o};r=(0,l.A)(r,(0,_.NI)({theme:t},i,s))}return r=(0,_.iZ)(t.breakpoints,r),r};var $=r(11848),L=r(3541);const z=function(e={}){const{createStyledComponent:t=P,useThemeProps:r=O,componentName:l="MuiStack"}=e,u=t(T),d=a.forwardRef((function(e,t){const a=r(e),d=(0,k.A)(a),{component:p="div",direction:f="column",spacing:h=0,divider:m,children:g,className:v,useFlexGap:b=!1}=d,y=(0,n.A)(d,R),x={direction:f,spacing:h,useFlexGap:b},w=(0,c.A)({root:["root"]},(e=>(0,s.Ay)(l,e)),{});return(0,j.jsx)(u,(0,o.A)({as:p,ownerState:x,ref:t,className:(0,i.A)(w.root,v)},y,{children:m?I(g,m):g}))}));return d}({createStyledComponent:(0,$.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,L.A)({props:e,name:"MuiStack"})}),F=z},72205:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(771),c=r(28466),u=r(55860),d=r(76081),p=r(11848),f=r(96869),h=r(74848);const m=["className","color","edge","size","sx"],g=(0,d.h)("MuiSwitch"),v=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${(0,c.A)(r.edge)}`],t[`size${(0,c.A)(r.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,[`& .${f.A.thumb}`]:{width:16,height:16},[`& .${f.A.switchBase}`]:{padding:4,[`&.${f.A.checked}`]:{transform:"translateX(16px)"}}}}]}),b=(0,p.Ay)(u.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${f.A.input}`]:t.input},"default"!==r.color&&t[`color${(0,c.A)(r.color)}`]]}})((({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}),[`&.${f.A.checked}`]:{transform:"translateX(20px)"},[`&.${f.A.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${f.A.checked} + .${f.A.track}`]:{opacity:.5},[`&.${f.A.disabled} + .${f.A.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${f.A.input}`]:{left:"-100%",width:"300%"}})),(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((([,e])=>e.main&&e.light)).map((([t])=>({props:{color:t},style:{[`&.${f.A.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.A.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,s.a)(e.palette[t].main,.62):(0,s.e$)(e.palette[t].main,.55)}`}},[`&.${f.A.checked} + .${f.A.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}})))]}))),y=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({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)}))),x=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),w=a.forwardRef((function(e,t){const r=g({props:e,name:"MuiSwitch"}),{className:a,color:s="primary",edge:u=!1,size:d="medium",sx:p}=r,w=(0,n.A)(r,m),A=(0,o.A)({},r,{color:s,edge:u,size:d}),C=(e=>{const{classes:t,edge:r,size:n,color:a,checked:i,disabled:s}=e,u={root:["root",r&&`edge${(0,c.A)(r)}`,`size${(0,c.A)(n)}`],switchBase:["switchBase",`color${(0,c.A)(a)}`,i&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,l.A)(u,f.n,t);return(0,o.A)({},t,d)})(A),S=(0,h.jsx)(x,{className:C.thumb,ownerState:A});return(0,h.jsxs)(v,{className:(0,i.A)(C.root,a),sx:p,ownerState:A,children:[(0,h.jsx)(b,(0,o.A)({type:"checkbox",icon:S,checkedIcon:S,ref:t,ownerState:A},w,{classes:(0,o.A)({},C,{root:C.switchBase})})),(0,h.jsx)(y,{className:C.track,ownerState:A})]})}))},96869:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,n:()=>a});var n=r(27553),o=r(17245);function a(e){return(0,o.Ay)("MuiSwitch",e)}const i=(0,n.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"])},42471:(e,t,r)=>{"use strict";r.d(t,{A:()=>I});var n=r(58168),o=r(98587),a=r(96540),i=r(34164),l=r(64111),s=r(14953),c=r(11848),u=r(3541),d=r(77623),p=r(21915),f=r(8641),h=r(54433),m=r(50779),g=r(38086),v=r(79716),b=r(28466),y=r(27553),x=r(17245);function w(e){return(0,x.Ay)("MuiFormHelperText",e)}const A=(0,y.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var C,S=r(74848);const k=["children","className","component","disabled","error","filled","focused","margin","required","variant"],_=(0,c.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${(0,b.A)(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})((({theme:e,ownerState:t})=>(0,n.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${A.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${A.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14}))),E=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiFormHelperText"}),{children:a,className:s,component:c="p"}=r,d=(0,o.A)(r,k),p=(0,v.A)(),f=(0,g.A)({props:r,muiFormControl:p,states:["variant","size","disabled","error","filled","focused","required"]}),h=(0,n.A)({},r,{component:c,contained:"filled"===f.variant||"outlined"===f.variant,variant:f.variant,size:f.size,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required}),m=(e=>{const{classes:t,contained:r,size:n,disabled:o,error:a,filled:i,focused:s,required:c}=e,u={root:["root",o&&"disabled",a&&"error",n&&`size${(0,b.A)(n)}`,r&&"contained",s&&"focused",i&&"filled",c&&"required"]};return(0,l.A)(u,w,t)})(h);return(0,S.jsx)(_,(0,n.A)({as:c,ownerState:h,className:(0,i.A)(m.root,s),ref:t},d,{children:" "===a?C||(C=(0,S.jsx)("span",{className:"notranslate",children:"​"})):a}))}));var j=r(2071);function R(e){return(0,x.Ay)("MuiTextField",e)}(0,y.A)("MuiTextField",["root"]);const M=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],P={standard:d.A,filled:p.A,outlined:f.A},O=(0,c.Ay)(m.A,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),I=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiTextField"}),{autoComplete:a,autoFocus:c=!1,children:d,className:p,color:f="primary",defaultValue:m,disabled:g=!1,error:v=!1,FormHelperTextProps:b,fullWidth:y=!1,helperText:x,id:w,InputLabelProps:A,inputProps:C,InputProps:k,inputRef:_,label:I,maxRows:T,minRows:$,multiline:L=!1,name:z,onBlur:F,onChange:D,onFocus:N,placeholder:B,required:H=!1,rows:V,select:W=!1,SelectProps:U,type:q,value:G,variant:K="outlined"}=r,X=(0,o.A)(r,M),Z=(0,n.A)({},r,{autoFocus:c,color:f,disabled:g,error:v,fullWidth:y,multiline:L,required:H,select:W,variant:K}),Y=(e=>{const{classes:t}=e;return(0,l.A)({root:["root"]},R,t)})(Z),Q={};"outlined"===K&&(A&&void 0!==A.shrink&&(Q.notched=A.shrink),Q.label=I),W&&(U&&U.native||(Q.id=void 0),Q["aria-describedby"]=void 0);const J=(0,s.A)(w),ee=x&&J?`${J}-helper-text`:void 0,te=I&&J?`${J}-label`:void 0,re=P[K],ne=(0,S.jsx)(re,(0,n.A)({"aria-describedby":ee,autoComplete:a,autoFocus:c,defaultValue:m,fullWidth:y,multiline:L,name:z,rows:V,maxRows:T,minRows:$,type:q,value:G,id:J,inputRef:_,onBlur:F,onChange:D,onFocus:N,placeholder:B,inputProps:C},Q,k));return(0,S.jsxs)(O,(0,n.A)({className:(0,i.A)(Y.root,p),disabled:g,error:v,fullWidth:y,ref:t,required:H,color:f,variant:K,ownerState:Z},X,{children:[null!=I&&""!==I&&(0,S.jsx)(h.A,(0,n.A)({htmlFor:J,id:te},A,{children:I})),W?(0,S.jsx)(j.A,(0,n.A)({"aria-describedby":ee,id:J,labelId:te,value:G,input:ne},U,{children:d})):ne,x&&(0,S.jsx)(E,(0,n.A)({id:ee},b,{children:x}))]}))}))},8532:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(3541),c=r(11848),u=r(27553),d=r(17245);function p(e){return(0,d.Ay)("MuiToolbar",e)}(0,u.A)("MuiToolbar",["root","gutters","regular","dense"]);var f=r(74848);const h=["className","component","disableGutters","variant"],m=(0,c.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})((({theme:e,ownerState:t})=>(0,o.A)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48})),(({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar)),g=a.forwardRef((function(e,t){const r=(0,s.A)({props:e,name:"MuiToolbar"}),{className:a,component:c="div",disableGutters:u=!1,variant:d="regular"}=r,g=(0,n.A)(r,h),v=(0,o.A)({},r,{component:c,disableGutters:u,variant:d}),b=(e=>{const{classes:t,disableGutters:r,variant:n}=e,o={root:["root",!r&&"gutters",n]};return(0,l.A)(o,p,t)})(v);return(0,f.jsx)(m,(0,o.A)({as:c,className:(0,i.A)(b.root,a),ref:t,ownerState:v},g))}))},47839:(e,t,r)=>{"use strict";r.d(t,{A:()=>L});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(42640),s=r(54856),c=r(64111),u=r(771),d=r(73788),p=r(11848),f=r(44675),h=r(3541),m=r(28466),g=r(87467),v=r(37591),b=r(83034),y=r(96852),x=r(1668),w=r(68851),A=r(41159),C=r(27553),S=r(17245);function k(e){return(0,S.Ay)("MuiTooltip",e)}const _=(0,C.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var E=r(74848);const j=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"],R=(0,p.Ay)(v.A,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((({theme:e,ownerState:t,open:r})=>(0,o.A)({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${_.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${_.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${_.arrow}`]:(0,o.A)({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${_.arrow}`]:(0,o.A)({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),M=(0,p.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,m.A)(r.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return(0,o.A)({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,u.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(r=16/14,Math.round(1e5*r)/1e5+"em"),fontWeight:e.typography.fontWeightRegular},{[`.${_.popper}[data-popper-placement*="left"] &`]:(0,o.A)({transformOrigin:"right center"},t.isRtl?(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${_.popper}[data-popper-placement*="right"] &`]:(0,o.A)({transformOrigin:"left center"},t.isRtl?(0,o.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"}):(0,o.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${_.popper}[data-popper-placement*="top"] &`]:(0,o.A)({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${_.popper}[data-popper-placement*="bottom"] &`]:(0,o.A)({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var r})),P=(0,p.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,u.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let O=!1;const I=new l.E;let T={x:0,y:0};function $(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const L=a.forwardRef((function(e,t){var r,u,p,C,S,_,L,z,F,D,N,B,H,V,W,U,q,G,K;const X=(0,h.A)({props:e,name:"MuiTooltip"}),{arrow:Z=!1,children:Y,components:Q={},componentsProps:J={},describeChild:ee=!1,disableFocusListener:te=!1,disableHoverListener:re=!1,disableInteractive:ne=!1,disableTouchListener:oe=!1,enterDelay:ae=100,enterNextDelay:ie=0,enterTouchDelay:le=700,followCursor:se=!1,id:ce,leaveDelay:ue=0,leaveTouchDelay:de=1500,onClose:pe,onOpen:fe,open:he,placement:me="bottom",PopperComponent:ge,PopperProps:ve={},slotProps:be={},slots:ye={},title:xe,TransitionComponent:we=g.A,TransitionProps:Ae}=X,Ce=(0,n.A)(X,j),Se=a.isValidElement(Y)?Y:(0,E.jsx)("span",{children:Y}),ke=(0,f.A)(),_e=(0,d.I)(),[Ee,je]=a.useState(),[Re,Me]=a.useState(null),Pe=a.useRef(!1),Oe=ne||se,Ie=(0,l.A)(),Te=(0,l.A)(),$e=(0,l.A)(),Le=(0,l.A)(),[ze,Fe]=(0,A.A)({controlled:he,default:!1,name:"Tooltip",state:"open"});let De=ze;const Ne=(0,x.A)(ce),Be=a.useRef(),He=(0,b.A)((()=>{void 0!==Be.current&&(document.body.style.WebkitUserSelect=Be.current,Be.current=void 0),Le.clear()}));a.useEffect((()=>He),[He]);const Ve=e=>{I.clear(),O=!0,Fe(!0),fe&&!De&&fe(e)},We=(0,b.A)((e=>{I.start(800+ue,(()=>{O=!1})),Fe(!1),pe&&De&&pe(e),Ie.start(ke.transitions.duration.shortest,(()=>{Pe.current=!1}))})),Ue=e=>{Pe.current&&"touchstart"!==e.type||(Ee&&Ee.removeAttribute("title"),Te.clear(),$e.clear(),ae||O&&ie?Te.start(O?ie:ae,(()=>{Ve(e)})):Ve(e))},qe=e=>{Te.clear(),$e.start(ue,(()=>{We(e)}))},{isFocusVisibleRef:Ge,onBlur:Ke,onFocus:Xe,ref:Ze}=(0,w.A)(),[,Ye]=a.useState(!1),Qe=e=>{Ke(e),!1===Ge.current&&(Ye(!1),qe(e))},Je=e=>{Ee||je(e.currentTarget),Xe(e),!0===Ge.current&&(Ye(!0),Ue(e))},et=e=>{Pe.current=!0;const t=Se.props;t.onTouchStart&&t.onTouchStart(e)};a.useEffect((()=>{if(De)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||We(e)}}),[We,De]);const tt=(0,y.A)(Se.ref,Ze,je,t);xe||0===xe||(De=!1);const rt=a.useRef(),nt={},ot="string"==typeof xe;ee?(nt.title=De||!ot||re?null:xe,nt["aria-describedby"]=De?Ne:null):(nt["aria-label"]=ot?xe:null,nt["aria-labelledby"]=De&&!ot?Ne:null);const at=(0,o.A)({},nt,Ce,Se.props,{className:(0,i.A)(Ce.className,Se.props.className),onTouchStart:et,ref:tt},se?{onMouseMove:e=>{const t=Se.props;t.onMouseMove&&t.onMouseMove(e),T={x:e.clientX,y:e.clientY},rt.current&&rt.current.update()}}:{}),it={};oe||(at.onTouchStart=e=>{et(e),$e.clear(),Ie.clear(),He(),Be.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Le.start(le,(()=>{document.body.style.WebkitUserSelect=Be.current,Ue(e)}))},at.onTouchEnd=e=>{Se.props.onTouchEnd&&Se.props.onTouchEnd(e),He(),$e.start(de,(()=>{We(e)}))}),re||(at.onMouseOver=$(Ue,at.onMouseOver),at.onMouseLeave=$(qe,at.onMouseLeave),Oe||(it.onMouseOver=Ue,it.onMouseLeave=qe)),te||(at.onFocus=$(Je,at.onFocus),at.onBlur=$(Qe,at.onBlur),Oe||(it.onFocus=Je,it.onBlur=Qe));const lt=a.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(Re),options:{element:Re,padding:4}}];return null!=(e=ve.popperOptions)&&e.modifiers&&(t=t.concat(ve.popperOptions.modifiers)),(0,o.A)({},ve.popperOptions,{modifiers:t})}),[Re,ve]),st=(0,o.A)({},X,{isRtl:_e,arrow:Z,disableInteractive:Oe,placement:me,PopperComponentProp:ge,touch:Pe.current}),ct=(e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:a}=e,i={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,m.A)(a.split("-")[0])}`],arrow:["arrow"]};return(0,c.A)(i,k,t)})(st),ut=null!=(r=null!=(u=ye.popper)?u:Q.Popper)?r:R,dt=null!=(p=null!=(C=null!=(S=ye.transition)?S:Q.Transition)?C:we)?p:g.A,pt=null!=(_=null!=(L=ye.tooltip)?L:Q.Tooltip)?_:M,ft=null!=(z=null!=(F=ye.arrow)?F:Q.Arrow)?z:P,ht=(0,s.X)(ut,(0,o.A)({},ve,null!=(D=be.popper)?D:J.popper,{className:(0,i.A)(ct.popper,null==ve?void 0:ve.className,null==(N=null!=(B=be.popper)?B:J.popper)?void 0:N.className)}),st),mt=(0,s.X)(dt,(0,o.A)({},Ae,null!=(H=be.transition)?H:J.transition),st),gt=(0,s.X)(pt,(0,o.A)({},null!=(V=be.tooltip)?V:J.tooltip,{className:(0,i.A)(ct.tooltip,null==(W=null!=(U=be.tooltip)?U:J.tooltip)?void 0:W.className)}),st),vt=(0,s.X)(ft,(0,o.A)({},null!=(q=be.arrow)?q:J.arrow,{className:(0,i.A)(ct.arrow,null==(G=null!=(K=be.arrow)?K:J.arrow)?void 0:G.className)}),st);return(0,E.jsxs)(a.Fragment,{children:[a.cloneElement(Se,at),(0,E.jsx)(ut,(0,o.A)({as:null!=ge?ge:v.A,placement:me,anchorEl:se?{getBoundingClientRect:()=>({top:T.y,left:T.x,right:T.x,bottom:T.y,width:0,height:0})}:Ee,popperRef:rt,open:!!Ee&&De,id:Ne,transition:!0},it,ht,{popperOptions:lt,children:({TransitionProps:e})=>(0,E.jsx)(dt,(0,o.A)({timeout:ke.transitions.duration.shorter},e,mt,{children:(0,E.jsxs)(pt,(0,o.A)({},gt,{children:[xe,Z?(0,E.jsx)(ft,(0,o.A)({},vt,{ref:Me})):null]}))}))}))]})}))},14073:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(39599),s=r(64111),c=r(11848),u=r(3541),d=r(28466),p=r(27553),f=r(17245);function h(e){return(0,f.Ay)("MuiTypography",e)}(0,p.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=r(74848);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,d.A)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>(0,o.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=a.forwardRef((function(e,t){const r=(0,u.A)({props:e,name:"MuiTypography"}),a=(e=>y[e]||e)(r.color),c=(0,l.A)((0,o.A)({},r,{color:a})),{align:p="inherit",className:f,component:x,gutterBottom:w=!1,noWrap:A=!1,paragraph:C=!1,variant:S="body1",variantMapping:k=b}=c,_=(0,n.A)(c,g),E=(0,o.A)({},c,{align:p,color:a,className:f,component:x,gutterBottom:w,noWrap:A,paragraph:C,variant:S,variantMapping:k}),j=x||(C?"p":k[S]||b[S])||"span",R=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:a,classes:i}=e,l={root:["root",a,"inherit"!==e.align&&`align${(0,d.A)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,s.A)(l,h,i)})(E);return(0,m.jsx)(v,(0,o.A)({as:j,ref:t,ownerState:E,className:(0,i.A)(R.root,f)},_))}))},55860:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(98587),o=r(58168),a=r(96540),i=r(34164),l=r(64111),s=r(28466),c=r(11848),u=r(39770),d=r(41159),p=r(79716),f=r(26606),h=r(27553),m=r(17245);function g(e){return(0,m.Ay)("PrivateSwitchBase",e)}(0,h.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var v=r(74848);const b=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],y=(0,c.Ay)(f.A)((({ownerState:e})=>(0,o.A)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),x=(0,c.Ay)("input",{shouldForwardProp:u.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),w=a.forwardRef((function(e,t){const{autoFocus:r,checked:a,checkedIcon:c,className:u,defaultChecked:f,disabled:h,disableFocusRipple:m=!1,edge:w=!1,icon:A,id:C,inputProps:S,inputRef:k,name:_,onBlur:E,onChange:j,onFocus:R,readOnly:M,required:P=!1,tabIndex:O,type:I,value:T}=e,$=(0,n.A)(e,b),[L,z]=(0,d.A)({controlled:a,default:Boolean(f),name:"SwitchBase",state:"checked"}),F=(0,p.A)();let D=h;F&&void 0===D&&(D=F.disabled);const N="checkbox"===I||"radio"===I,B=(0,o.A)({},e,{checked:L,disabled:D,disableFocusRipple:m,edge:w}),H=(e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,a={root:["root",r&&"checked",n&&"disabled",o&&`edge${(0,s.A)(o)}`],input:["input"]};return(0,l.A)(a,g,t)})(B);return(0,v.jsxs)(y,(0,o.A)({component:"span",className:(0,i.A)(H.root,u),centerRipple:!0,focusRipple:!m,disabled:D,tabIndex:null,role:void 0,onFocus:e=>{R&&R(e),F&&F.onFocus&&F.onFocus(e)},onBlur:e=>{E&&E(e),F&&F.onBlur&&F.onBlur(e)},ownerState:B,ref:t},$,{children:[(0,v.jsx)(x,(0,o.A)({autoFocus:r,checked:a,defaultChecked:f,className:H.input,disabled:D,id:N?C:void 0,name:_,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;z(t),j&&j(e,t)},readOnly:M,ref:k,required:P,ownerState:B,tabIndex:O,type:I},"checkbox"===I&&void 0===T?{}:{value:T},S)),L?c:A]}))}))},602:(e,t,r)=>{"use strict";r.d(t,{A:()=>a}),r(96540);var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},76544:(e,t,r)=>{"use strict";r.d(t,{A:()=>O});var n=r(58168),o=r(98587),a=r(35697),i=r(94521),l=r(94188),s=r(33571),c=r(58749),u=r(771);const d={black:"#000",white:"#fff"},p={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"},f={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"},h={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"},m={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"},g={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"},v={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"},b={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"},y=["mode","contrastThreshold","tonalOffset"],x={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:d.white,default:d.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}},w={text:{primary:d.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:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function A(e,t,r,n){const o=n.light||n,a=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,u.a)(e.main,o):"dark"===t&&(e.dark=(0,u.e$)(e.main,a)))}const C=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],S={textTransform:"uppercase"},k='"Roboto", "Helvetica", "Arial", sans-serif';function _(e,t){const r="function"==typeof t?t(e):t,{fontFamily:a=k,fontSize:l=14,fontWeightLight:s=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:p=16,allVariants:f,pxToRem:h}=r,m=(0,o.A)(r,C),g=l/14,v=h||(e=>e/p*g+"rem"),b=(e,t,r,o,i)=>{return(0,n.A)({fontFamily:a,fontWeight:e,fontSize:v(t),lineHeight:r},a===k?{letterSpacing:(l=o/t,Math.round(1e5*l)/1e5+"em")}:{},i,f);var l},y={h1:b(s,96,1.167,-1.5),h2:b(s,60,1.2,-.5),h3:b(c,48,1.167,0),h4:b(c,34,1.235,.25),h5:b(c,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(c,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(c,16,1.5,.15),body2:b(c,14,1.43,.15),button:b(u,14,1.75,.4,S),caption:b(c,12,1.66,.4),overline:b(c,12,2.66,1,S),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,i.A)((0,n.A)({htmlFontSize:p,pxToRem:v,fontFamily:a,fontSize:l,fontWeightLight:s,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},y),m,{clone:!1})}function E(...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 j=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)];var R=r(17091);const M={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const O=function(e={},...t){const{mixins:r={},palette:C={},transitions:S={},typography:k={}}=e,E=(0,o.A)(e,P);if(e.vars)throw new Error((0,a.A)(18));const O=function(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:l=.2}=e,s=(0,o.A)(e,y),c=e.primary||function(e="light"){return"dark"===e?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),C=e.secondary||function(e="light"){return"dark"===e?{main:f[200],light:f[50],dark:f[400]}:{main:f[500],light:f[300],dark:f[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:h[500],light:h[300],dark:h[700]}:{main:h[700],light:h[400],dark:h[800]}}(t),k=e.info||function(e="light"){return"dark"===e?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),_=e.success||function(e="light"){return"dark"===e?{main:b[400],light:b[300],dark:b[700]}:{main:b[800],light:b[500],dark:b[900]}}(t),E=e.warning||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function j(e){return(0,u.eM)(e,w.text.primary)>=r?w.text.primary:x.text.primary}const R=({color:e,name:t,mainShade:r=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=(0,n.A)({},e)).main&&e[r]&&(e.main=e[r]),!e.hasOwnProperty("main"))throw new Error((0,a.A)(11,t?` (${t})`:"",r));if("string"!=typeof e.main)throw new Error((0,a.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return A(e,"light",o,l),A(e,"dark",i,l),e.contrastText||(e.contrastText=j(e.main)),e},M={dark:w,light:x};return(0,i.A)((0,n.A)({common:(0,n.A)({},d),mode:t,primary:R({color:c,name:"primary"}),secondary:R({color:C,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:S,name:"error"}),warning:R({color:E,name:"warning"}),info:R({color:k,name:"info"}),success:R({color:_,name:"success"}),grey:p,contrastThreshold:r,getContrastText:j,augmentColor:R,tonalOffset:l},M[t]),s)}(C),I=(0,c.A)(e);let T=(0,i.A)(I,{mixins:($=I.breakpoints,L=r,(0,n.A)({toolbar:{minHeight:56,[$.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[$.up("sm")]:{minHeight:64}}},L)),palette:O,shadows:j.slice(),typography:_(O,k),transitions:(0,R.Ay)(S),zIndex:(0,n.A)({},M)});var $,L;return T=(0,i.A)(T,E),T=t.reduce(((e,t)=>(0,i.A)(e,t)),T),T.unstable_sxConfig=(0,n.A)({},l.A,null==E?void 0:E.unstable_sxConfig),T.unstable_sx=function(e){return(0,s.A)({sx:e,theme:this})},T}},17091:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u,p0:()=>l});var n=r(98587),o=r(58168);const a=["duration","easing","delay"],i={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)"},l={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function s(e){return`${Math.round(e)}ms`}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,o.A)({},i,e.easing),r=(0,o.A)({},l,e.duration);return(0,o.A)({getAutoHeightDuration:c,create:(e=["all"],o={})=>{const{duration:i=r.standard,easing:l=t.easeInOut,delay:c=0}=o;return(0,n.A)(o,a),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof i?i:s(i)} ${l} ${"string"==typeof c?c:s(c)}`)).join(",")}},e,{easing:t,duration:r})}},22765:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=(0,r(76544).A)()},58312:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n="$$material"},39770:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(64438);const o=e=>(0,n.A)(e)&&"classes"!==e},64438:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},11848:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});var n=r(56461),o=r(22765),a=r(58312),i=r(39770);const l=(0,n.Ay)({themeId:a.A,defaultTheme:o.A,rootShouldForwardProp:i.A})},44675:(e,t,r)=>{"use strict";r.d(t,{A:()=>i}),r(96540);var n=r(82858),o=r(22765),a=r(58312);function i(){const e=(0,n.A)(o.A);return e[a.A]||e}},3541:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(44467),o=r(22765),a=r(58312);function i({props:e,name:t}){return(0,n.A)({props:e,name:t,defaultTheme:o.A,themeId:a.A})}},35186:(e,t,r)=>{"use strict";r.d(t,{c:()=>o,q:()=>n});const n=e=>e.scrollTop;function o(e,t){var r,n;const{timeout:o,easing:a,style:i={}}=e;return{duration:null!=(r=i.transitionDuration)?r:"number"==typeof o?o:o[t.mode]||0,easing:null!=(n=i.transitionTimingFunction)?n:"object"==typeof a?a[t.mode]:a,delay:i.transitionDelay}}},28466:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(38659).A},75003:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(58168),o=r(96540),a=r(98587),i=r(34164),l=r(64111),s=r(28466),c=r(3541),u=r(11848),d=r(27553),p=r(17245);function f(e){return(0,p.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=r(74848);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,s.A)(r.color)}`],t[`fontSize${(0,s.A)(r.fontSize)}`]]}})((({theme:e,ownerState:t})=>{var r,n,o,a,i,l,s,c,u,d,p,f,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=e.transitions)||null==(n=r.create)?void 0:n.call(r,"fill",{duration:null==(o=e.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=e.typography)||null==(i=a.pxToRem)?void 0:i.call(a,20))||"1.25rem",medium:(null==(l=e.typography)||null==(s=l.pxToRem)?void 0:s.call(l,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(p=(e.vars||e).palette)||null==(p=p[t.color])?void 0:p.main)?d:{action:null==(f=(e.vars||e).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}})),v=o.forwardRef((function(e,t){const r=(0,c.A)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:p="inherit",component:v="svg",fontSize:b="medium",htmlColor:y,inheritViewBox:x=!1,titleAccess:w,viewBox:A="0 0 24 24"}=r,C=(0,a.A)(r,m),S=o.isValidElement(u)&&"svg"===u.type,k=(0,n.A)({},r,{color:p,component:v,fontSize:b,instanceFontSize:e.fontSize,inheritViewBox:x,viewBox:A,hasSvgAsChild:S}),_={};x||(_.viewBox=A);const E=(e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root","inherit"!==t&&`color${(0,s.A)(t)}`,`fontSize${(0,s.A)(r)}`]};return(0,l.A)(o,f,n)})(k);return(0,h.jsxs)(g,(0,n.A)({as:v,className:(0,i.A)(E.root,d),focusable:"false",color:y,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},_,C,S&&u.props,{ownerState:k,children:[S?u.props.children:u,w?(0,h.jsx)("title",{children:w}):null]}))}));v.muiName="SvgIcon";const b=v;function y(e,t){function r(r,o){return(0,h.jsx)(b,(0,n.A)({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return r.muiName=b.muiName,o.memo(o.forwardRef(r))}},1935:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(84965).A},25602:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);const o=function(e,t){var r,o;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},96248:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(86249).A},93749:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(61489).A},41159:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(93833).A},2778:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(50173).A},83034:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(66111).A},96852:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(54871).A},1668:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(14953).A},68851:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(67749).A},76081:(e,t,r)=>{"use strict";r.d(t,{h:()=>o});var n=r(3541);function o(e){return n.A}},39940:(e,t,r)=>{"use strict";r.d(t,{A:()=>a}),r(96540);var n=r(17437),o=r(74848);function a(e){const{styles:t,defaultTheme:r={}}=e,a="function"==typeof t?e=>{return t(null==(n=e)||0===Object.keys(n).length?r:e);var n}:t;return(0,o.jsx)(n.mL,{styles:a})}},48750:(e,t,r)=>{"use strict";r.d(t,{A:()=>l}),r(96540);var n=r(40085),o=r(84300),a=r(74848);let i;function l(e){const{injectFirst:t,children:r}=e;return t&&i?(0,a.jsx)(n.C,{value:i,children:r}):r}"object"==typeof document&&(i=(0,o.A)({key:"css",prepend:!0}))},9359:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalStyles:()=>x.A,StyledEngineProvider:()=>y.A,ThemeContext:()=>s.T,css:()=>b.AH,default:()=>w,internal_processStyles:()=>A,keyframes:()=>b.i7});var n=r(58168),o=r(96540),a=r(36289),i=/^((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|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)-.*))$/,l=(0,a.A)((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),s=r(40085),c=r(30041),u=r(13451),d=r(71287),p=l,f=function(e){return"theme"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?p:f},m=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},g=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,c.SF)(t,r,n),(0,d.s)((function(){return(0,c.sk)(t,r,n)})),null},v=function e(t,r){var a,i,l=t.__emotion_real===t,d=l&&t.__emotion_base||t;void 0!==r&&(a=r.label,i=r.target);var p=m(t,r,l),f=p||h(d),v=!f("as");return function(){var b=arguments,y=l&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&y.push("label:"+a+";"),null==b[0]||void 0===b[0].raw)y.push.apply(y,b);else{y.push(b[0][0]);for(var x=b.length,w=1;w{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},771:(e,t,r)=>{"use strict";var n=r(24994);t.X4=function(e,t){return e=l(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,s(e)},t.e$=u,t.tL=function(e,t=.15){return c(e)>.5?u(e,t):d(e,t)},t.eM=function(e,t){const r=c(e),n=c(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)},t.a=d;var o=n(r(72108)),a=n(r(14966));function i(e,t=0,r=1){return(0,a.default)(e,t,r)}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,o.default)(9,e));let n,a=e.substring(t+1,e.length-1);if("color"===r){if(a=a.split(" "),n=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error((0,o.default)(10,n))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:r,values:a,colorSpace:n}}function s(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function c(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(function(e){e=l(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),i=(e,t=(e+r/30)%12)=>o-a*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*i(0)),Math.round(255*i(8)),Math.round(255*i(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),s({type:c,values: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 u(e,t){if(e=l(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return s(e)}function d(e,t){if(e=l(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return s(e)}},56461:(e,t,r)=>{"use strict";var n=r(24994);t.Ay=function(e={}){const{themeId:t,defaultTheme:r=m,rootShouldForwardProp:n=h,slotShouldForwardProp:s=h}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:r,themeId:t}))}));return u.__mui_systemSx=!0,(e,c={})=>{(0,i.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:f,skipVariantsResolver:m,skipSx:x,overridesResolver:w=b(g(f))}=c,A=(0,a.default)(c,p),C=void 0!==m?m:f&&"Root"!==f&&"root"!==f||!1,S=x||!1;let k=h;"Root"===f||"root"===f?k=n:f?k=s:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const _=(0,i.default)(e,(0,o.default)({shouldForwardProp:k,label:void 0},A)),E=e=>"function"==typeof e&&e.__emotion_real!==e||(0,l.isPlainObject)(e)?n=>y(e,(0,o.default)({},n,{theme:v({theme:n.theme,defaultTheme:r,themeId:t})})):e,j=(n,...a)=>{let i=E(n);const l=a?a.map(E):[];d&&w&&l.push((e=>{const n=v((0,o.default)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[d]||!n.components[d].styleOverrides)return null;const a=n.components[d].styleOverrides,i={};return Object.entries(a).forEach((([t,r])=>{i[t]=y(r,(0,o.default)({},e,{theme:n}))})),w(e,i)})),d&&!C&&l.push((e=>{var n;const a=v((0,o.default)({},e,{defaultTheme:r,themeId:t}));return y({variants:null==a||null==(n=a.components)||null==(n=n[d])?void 0:n.variants},(0,o.default)({},e,{theme:a}))})),S||l.push(u);const s=l.length-a.length;if(Array.isArray(n)&&s>0){const e=new Array(s).fill("");i=[...n,...e],i.raw=[...n.raw,...e]}const c=_(i,...l);return e.muiName&&(c.muiName=e.muiName),c};return _.withConfig&&(j.withConfig=_.withConfig),j}};var o=n(r(94634)),a=n(r(54893)),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}(r(9359)),l=r(70819),s=(n(r(78217)),n(r(51172)),n(r(3142))),c=n(r(83857));const u=["ownerState"],d=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function h(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,s.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v({defaultTheme:e,theme:t,themeId:r}){return n=t,0===Object.keys(n).length?e:t[r]||t;var n}function b(e){return e?(t,r)=>r[e]:null}function y(e,t){let{ownerState:r}=t,n=(0,a.default)(t,u);const i="function"==typeof e?e((0,o.default)({ownerState:r},n)):e;if(Array.isArray(i))return i.flatMap((e=>y(e,(0,o.default)({ownerState:r},n))));if(i&&"object"==typeof i&&Array.isArray(i.variants)){const{variants:e=[]}=i;let t=(0,a.default)(i,d);return e.forEach((e=>{let a=!0;"function"==typeof e.props?a=e.props((0,o.default)({ownerState:r},n,r)):Object.keys(e.props).forEach((t=>{(null==r?void 0:r[t])!==e.props[t]&&n[t]!==e.props[t]&&(a=!1)})),a&&(Array.isArray(t)||(t=[t]),t.push("function"==typeof e.style?e.style((0,o.default)({ownerState:r},n,r)):e.style))})),t}return i}},73788:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,I:()=>c});var n=r(58168),o=r(98587),a=r(96540),i=r(74848);const l=["value"],s=a.createContext(),c=()=>{const e=a.useContext(s);return null!=e&&e},u=function(e){let{value:t}=e,r=(0,o.A)(e,l);return(0,i.jsx)(s.Provider,(0,n.A)({value:null==t||t},r))}},89452:(e,t,r)=>{"use strict";r.d(t,{EU:()=>l,NI:()=>i,iZ:()=>c,kW:()=>u,vf:()=>s,zu:()=>o});var n=r(94521);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${o[e]}px)`};function i(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||a;return t.reduce(((n,o,a)=>(n[e.up(e.keys[a])]=r(t[a]),n)),{})}if("object"==typeof t){const e=n.breakpoints||a;return Object.keys(t).reduce(((n,a)=>{if(-1!==Object.keys(e.values||o).indexOf(a))n[e.up(a)]=r(t[a],a);else{const e=a;n[e]=t[e]}return n}),{})}return r(t)}function l(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}function s(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function c(e,...t){const r=l(e),o=[r,...t].reduce(((e,t)=>(0,n.A)(e,t)),{});return s(Object.keys(r),o)}function u({values:e,breakpoints:t,base:r}){const n=r||function(e,t){if("object"!=typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach(((t,n)=>{n{null!=e[t]&&(r[t]=!0)})),r}(e,t),o=Object.keys(n);if(0===o.length)return e;let a;return o.reduce(((t,r,n)=>(Array.isArray(e)?(t[r]=null!=e[n]?e[n]:e[a],a=n):"object"==typeof e?(t[r]=null!=e[r]?e[r]:e[a],a=r):t[r]=e,t)),{})}},24279:(e,t,r)=>{"use strict";r.d(t,{X4:()=>s,a:()=>u,e$:()=>c});var n=r(35697),o=r(76937);function a(e,t=0,r=1){return(0,o.A)(e,t,r)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?`rgb${4===r.length?"a":""}(${r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,n.A)(9,e));let o,a=e.substring(t+1,e.length-1);if("color"===r){if(a=a.split(" "),o=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,n.A)(10,o))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:r,values:a,colorSpace:o}}function l(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function s(e,t){return e=i(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function c(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return l(e)}function u(e,t){if(e=i(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return l(e)}},28336:(e,t,r)=>{"use strict";function n(e,t){const r=this;return r.vars&&"function"==typeof r.getColorSchemeSelector?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}r.d(t,{A:()=>n})},58094:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(98587),o=r(58168);const a=["values","unit","step"],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)=>(0,o.A)({},e,{[t.key]:t.val})),{})};function l(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:l=5}=e,s=(0,n.A)(e,a),c=i(t),u=Object.keys(c);function d(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function p(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-l/100}${r})`}function f(e,n){const o=u.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[u[o]]?t[u[o]]:n)-l/100}${r})`}return(0,o.A)({keys:u,values:c,up:d,down:p,between:f,only:function(e){return u.indexOf(e)+1{"use strict";r.d(t,{A:()=>f});var n=r(58168),o=r(98587),a=r(94521),i=r(58094);const l={borderRadius:4};var s=r(68248),c=r(33571),u=r(94188),d=r(28336);const p=["breakpoints","palette","spacing","shape"],f=function(e={},...t){const{breakpoints:r={},palette:f={},spacing:h,shape:m={}}=e,g=(0,o.A)(e,p),v=(0,i.A)(r),b=function(e=8){if(e.mui)return e;const t=(0,s.LX)({spacing:e}),r=(...e)=>(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" ");return r.mui=!0,r}(h);let y=(0,a.A)({breakpoints:v,direction:"ltr",components:{},palette:(0,n.A)({mode:"light"},f),spacing:b,shape:(0,n.A)({},l,m)},g);return y.applyStyles=d.A,y=t.reduce(((e,t)=>(0,a.A)(e,t)),y),y.unstable_sxConfig=(0,n.A)({},u.A,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},3142:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>a.A});var n=r(58749),o=r(58094),a=r(28336)},14620:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(94521);const o=function(e,t){return t?(0,n.A)(e,t,{clone:!1}):e}},68248:(e,t,r)=>{"use strict";r.d(t,{LX:()=>h,MA:()=>f,_W:()=>m,Lc:()=>v,Ms:()=>b});var n=r(89452),o=r(86481),a=r(14620);const i={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return e=>(void 0===t[e]&&(t[e]=(e=>{if(e.length>2){if(!s[e])return[e];e=s[e]}const[t,r]=e.split(""),n=i[t],o=l[r]||"";return Array.isArray(o)?o.map((e=>n+e)):[n+o]})(e)),t[e])}(),u=["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"],p=[...u,...d];function f(e,t,r,n){var a;const i=null!=(a=(0,o.Yn)(e,t,!1))?a:r;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function h(e){return f(e,"spacing",8)}function m(e,t){if("string"==typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function g(e,t){const r=h(e.theme);return Object.keys(e).map((o=>function(e,t,r,o){if(-1===t.indexOf(r))return null;const a=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=m(t,r),e)),{})}(c(r),o),i=e[r];return(0,n.NI)(e,i,a)}(e,t,o,r))).reduce(a.A,{})}function v(e){return g(e,u)}function b(e){return g(e,d)}function y(e){return g(e,p)}v.propTypes={},v.filterProps=u,b.propTypes={},b.filterProps=d,y.propTypes={},y.filterProps=p},86481:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l,BO:()=>i,Yn:()=>a});var n=r(38659),o=r(89452);function a(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function i(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:a(e,r)||n,t&&(o=t(o,n,e)),o}const l=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:l,transform:s}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=a(e.theme,l)||{};return(0,o.NI)(e,c,(e=>{let o=i(u,s,e);return e===o&&"string"==typeof e&&(o=i(u,s,`${t}${"default"===e?"":(0,n.A)(e)}`,e)),!1===r?o:{[r]:o}}))};return c.propTypes={},c.filterProps=[t],c}},94188:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});var n=r(68248),o=r(86481),a=r(14620);const i=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),r=e=>Object.keys(e).reduce(((r,n)=>t[n]?(0,a.A)(r,t[n](e)):r),{});return r.propTypes={},r.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),r};var l=r(89452);function s(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",s),d=c("borderTop",s),p=c("borderRight",s),f=c("borderBottom",s),h=c("borderLeft",s),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),b=c("borderBottomColor"),y=c("borderLeftColor"),x=c("outline",s),w=c("outlineColor"),A=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n._W)(t,e)});return(0,l.NI)(e,e.borderRadius,r)}return null};A.propTypes={},A.filterProps=["borderRadius"],i(u,d,p,f,h,m,g,v,b,y,A,x,w);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.MA)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n._W)(t,e)});return(0,l.NI)(e,e.gap,r)}return null};C.propTypes={},C.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.MA)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n._W)(t,e)});return(0,l.NI)(e,e.columnGap,r)}return null};S.propTypes={},S.filterProps=["columnGap"];const k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.MA)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n._W)(t,e)});return(0,l.NI)(e,e.rowGap,r)}return null};function _(e,t){return"grey"===t?t:e}function E(e){return e<=1&&0!==e?100*e+"%":e}k.propTypes={},k.filterProps=["rowGap"],i(C,S,k,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"})),i((0,o.Ay)({prop:"color",themeKey:"palette",transform:_}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:_}));const j=(0,o.Ay)({prop:"width",transform:E}),R=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const o=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||l.zu[t];return o?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:E(t)}};return(0,l.NI)(e,e.maxWidth,t)}return null};R.filterProps=["maxWidth"];const M=(0,o.Ay)({prop:"minWidth",transform:E}),P=(0,o.Ay)({prop:"height",transform:E}),O=(0,o.Ay)({prop:"maxHeight",transform:E}),I=(0,o.Ay)({prop:"minHeight",transform:E}),T=((0,o.Ay)({prop:"size",cssProperty:"width",transform:E}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:E}),i(j,R,M,P,O,I,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:s},borderTop:{themeKey:"borders",transform:s},borderRight:{themeKey:"borders",transform:s},borderBottom:{themeKey:"borders",transform:s},borderLeft:{themeKey:"borders",transform:s},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:s},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:A},color:{themeKey:"palette",transform:_},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_},backgroundColor:{themeKey:"palette",transform:_},p:{style:n.Ms},pt:{style:n.Ms},pr:{style:n.Ms},pb:{style:n.Ms},pl:{style:n.Ms},px:{style:n.Ms},py:{style:n.Ms},padding:{style:n.Ms},paddingTop:{style:n.Ms},paddingRight:{style:n.Ms},paddingBottom:{style:n.Ms},paddingLeft:{style:n.Ms},paddingX:{style:n.Ms},paddingY:{style:n.Ms},paddingInline:{style:n.Ms},paddingInlineStart:{style:n.Ms},paddingInlineEnd:{style:n.Ms},paddingBlock:{style:n.Ms},paddingBlockStart:{style:n.Ms},paddingBlockEnd:{style:n.Ms},m:{style:n.Lc},mt:{style:n.Lc},mr:{style:n.Lc},mb:{style:n.Lc},ml:{style:n.Lc},mx:{style:n.Lc},my:{style:n.Lc},margin:{style:n.Lc},marginTop:{style:n.Lc},marginRight:{style:n.Lc},marginBottom:{style:n.Lc},marginLeft:{style:n.Lc},marginX:{style:n.Lc},marginY:{style:n.Lc},marginInline:{style:n.Lc},marginInlineStart:{style:n.Lc},marginInlineEnd:{style:n.Lc},marginBlock:{style:n.Lc},marginBlockStart:{style:n.Lc},marginBlockEnd:{style:n.Lc},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:k},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:E},maxWidth:{style:R},minWidth:{transform:E},height:{transform:E},maxHeight:{transform:E},minHeight:{transform:E},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},39599:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(58168),o=r(98587),a=r(94521),i=r(94188);const l=["sx"],s=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:i.A;return Object.keys(e).forEach((t=>{o[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n};function c(e){const{sx:t}=e,r=(0,o.A)(e,l),{systemProps:i,otherProps:c}=s(r);let u;return u=Array.isArray(t)?[i,...t]:"function"==typeof t?(...e)=>{const r=t(...e);return(0,a.Q)(r)?(0,n.A)({},i,r):i}:(0,n.A)({},i,t),(0,n.A)({},c,{sx:u})}},83857:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>n.k,unstable_defaultSxConfig:()=>a.A});var n=r(33571),o=r(39599),a=r(94188)},33571:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,k:()=>s});var n=r(38659),o=r(14620),a=r(86481),i=r(89452),l=r(94188);function s(){function e(e,t,r,o){const l={[e]:t,theme:r},s=o[e];if(!s)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:p}=s;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const f=(0,a.Yn)(r,u)||{};return p?p(l):(0,i.NI)(l,t,(t=>{let r=(0,a.BO)(f,d,t);return t===r&&"string"==typeof t&&(r=(0,a.BO)(f,d,`${e}${"default"===t?"":(0,n.A)(t)}`,t)),!1===c?r:{[c]:r}}))}return function t(r){var n;const{sx:a,theme:s={}}=r||{};if(!a)return null;const c=null!=(n=s.unstable_sxConfig)?n:l.A;function u(r){let n=r;if("function"==typeof r)n=r(s);else if("object"!=typeof r)return r;if(!n)return null;const a=(0,i.EU)(s.breakpoints),l=Object.keys(a);let u=a;return Object.keys(n).forEach((r=>{const a="function"==typeof(l=n[r])?l(s):l;var l;if(null!=a)if("object"==typeof a)if(c[r])u=(0,o.A)(u,e(r,a,s,c));else{const e=(0,i.NI)({theme:s},a,(e=>({[r]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),r=new Set(t);return e.every((e=>r.size===Object.keys(e).length))}(e,a)?u=(0,o.A)(u,e):u[r]=t({sx:a,theme:s})}else u=(0,o.A)(u,e(r,a,s,c))})),(0,i.vf)(l,u)}return Array.isArray(a)?a.map(u):u(a)}}const c=s();c.filterProps=["sx"];const u=c},15327:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>d});var o=r(96540),a=r(50173),i=r(37340),l=r(53951);function s(e,t,r,n,i){const[l,s]=o.useState((()=>i&&r?r(e).matches:n?n(e).matches:t));return(0,a.A)((()=>{let t=!0;if(!r)return;const n=r(e),o=()=>{t&&s(n.matches)};return o(),n.addListener(o),()=>{t=!1,n.removeListener(o)}}),[e,r]),l}const c=(n||(n=r.t(o,2))).useSyncExternalStore;function u(e,t,r,n,a){const i=o.useCallback((()=>t),[t]),l=o.useMemo((()=>{if(a&&r)return()=>r(e).matches;if(null!==n){const{matches:t}=n(e);return()=>t}return i}),[i,e,n,a,r]),[s,u]=o.useMemo((()=>{if(null===r)return[i,()=>()=>{}];const t=r(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[i,r,e]);return c(u,s,l)}function d(e,t={}){const r=(0,l.A)(),n="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:a=(n?window.matchMedia:null),ssrMatchMedia:d=null,noSsr:p=!1}=(0,i.A)({name:"MuiUseMediaQuery",props:t,theme:r});let f="function"==typeof e?e(r):e;return f=f.replace(/^@media( ?)/m,""),(void 0!==c?u:s)(f,o,a,d,p)}},82858:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(58749),o=r(53951);const a=(0,n.A)(),i=function(e=a){return(0,o.A)(e)}},37340:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(46311);function o(e){const{theme:t,name:r,props:o}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.A)(t.components[r].defaultProps,o):o}},44467:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(37340),o=r(82858);function a({props:e,name:t,defaultTheme:r,themeId:a}){let i=(0,o.A)(r);return a&&(i=i[a]||i),(0,n.A)({theme:i,name:t,props:e})}},53951:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(40085);const a=function(e=null){const t=n.useContext(o.T);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},72923:(e,t,r)=>{"use strict";t.A=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(96540)),o=r(9359);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}t.A=function(e=null){const t=n.useContext(o.ThemeContext);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},12067:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});const n=e=>e,o=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},38659:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(35697);function o(e){if("string"!=typeof e)throw new Error((0,n.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},78217:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r(38659)},76937:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}},14966:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r(76937)},64111:(e,t,r)=>{"use strict";function n(e,t,r=void 0){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}r.d(t,{A:()=>n})},84965:(e,t,r)=>{"use strict";function n(e,t=166){let r;function n(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(this,n)}),t)}return n.clear=()=>{clearTimeout(r)},n}r.d(t,{A:()=>n})},94521:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,Q:()=>o});var n=r(58168);function o(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(!o(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=a(e[r])})),t}function i(e,t,r={clone:!0}){const l=r.clone?(0,n.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((n=>{"__proto__"!==n&&(o(t[n])&&n in e&&o(e[n])?l[n]=i(e[n],t[n],r):r.clone?l[n]=o(t[n])?a(t[n]):t[n]:l[n]=t[n])})),l}},70819:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,isPlainObject:()=>n.Q});var n=r(94521)},35697:(e,t,r)=>{"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;en})},72108:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A});var n=r(35697)},17245:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>a,li:()=>o});var n=r(12067);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 a(e,t,r="Mui"){const a=o[t];return a?`${r}-${a}`:`${n.A.generate(e)}-${t}`}},27553:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(17245);function o(e,t,r="Mui"){const o={};return t.forEach((t=>{o[t]=(0,n.Ay)(e,t,r)})),o}},51172:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s,getFunctionName:()=>a});var n=r(44363);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function a(e){const t=`${e}`.match(o);return t&&t[1]||""}function i(e,t=""){return e.displayName||e.name||a(e)||t}function l(e,t,r){const n=i(t);return e.displayName||(""!==n?`${r}(${n})`:r)}function s(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return i(e,"Component");if("object"==typeof e)switch(e.$$typeof){case n.ForwardRef:return l(e,e.render,"ForwardRef");case n.Memo:return l(e,e.type,"memo");default:return}}}},36809:(e,t,r)=>{"use strict";function n(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}r.d(t,{A:()=>n})},86249:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{A:()=>n})},61489:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(86249);function o(e){return(0,n.A)(e).defaultView||window}},46311:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(58168);function o(e,t){const r=(0,n.A)({},t);return Object.keys(e).forEach((a=>{if(a.toString().match(/^(components|slots)$/))r[a]=(0,n.A)({},e[a],r[a]);else if(a.toString().match(/^(componentsProps|slotProps)$/)){const i=e[a]||{},l=t[a];r[a]={},l&&Object.keys(l)?i&&Object.keys(i)?(r[a]=(0,n.A)({},l),Object.keys(i).forEach((e=>{r[a][e]=o(i[e],l[e])}))):r[a]=l:r[a]=i}else void 0===r[a]&&(r[a]=e[a])})),r}},13721:(e,t,r)=>{"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{A:()=>n})},93833:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o({controlled:e,default:t,name:r,state:o="value"}){const{current:a}=n.useRef(void 0!==e),[i,l]=n.useState(t);return[a?e:i,n.useCallback((e=>{a||l(e)}),[])]}},50173:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);const o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},66111:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(50173);const a=function(e){const t=n.useRef(e);return(0,o.A)((()=>{t.current=e})),n.useRef(((...e)=>(0,t.current)(...e))).current}},54871:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(13721);function a(...e){return n.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.A)(e,t)}))}),e)}},14953:(e,t,r)=>{"use strict";var n;r.d(t,{A:()=>l});var o=r(96540);let a=0;const i=(n||(n=r.t(o,2)))["useId".toString()];function l(e){if(void 0!==i){const t=i();return null!=e?e:t}return function(e){const[t,r]=o.useState(e),n=e||t;return o.useEffect((()=>{null==t&&(a+=1,r(`mui-${a}`))}),[t]),n}(e)}},67749:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(96540),o=r(42640);let a=!0,i=!1;const l=new o.E,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function u(){a=!1}function d(){"hidden"===this.visibilityState&&i&&(a=!0)}function p(){const e=n.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return a||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!s[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(i=!0,l.start(100,(()=>{i=!1})),t.current=!1,!0)},ref:e}}},42640:(e,t,r)=>{"use strict";r.d(t,{E:()=>i,A:()=>l});var n=r(96540);const o={},a=[];class i{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new i}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function l(){const e=function(e,t){const r=n.useRef(o);return r.current===o&&(r.current=e(void 0)),r}(i.create).current;var t;return t=e.disposeEffect,n.useEffect(t,a),e}},22529:(e,t,r)=>{"use strict";r.d(t,{z:()=>Vc});var n=r(96540),o=r(5556),a=r.n(o),i=r(58168),l=r(98587),s=r(55149),c=r(28466),u=r(96852),d=r(2778),p=r(64111),f=r(11848),h=r(24279),m=r(74787);const g=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${m.x.autoHeight}`]:t.autoHeight},{[`&.${m.x.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${m.x["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${m.x["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${m.x["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${m.x.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`& .${m.x.editBooleanCell}`]:t.editBooleanCell},{[`& .${m.x["cell--editing"]}`]:t["cell--editing"]},{[`& .${m.x["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${m.x["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${m.x["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${m.x["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${m.x.cell}`]:t.cell},{[`& .${m.x.cellContent}`]:t.cellContent},{[`& .${m.x.cellCheckbox}`]:t.cellCheckbox},{[`& .${m.x.cellSkeleton}`]:t.cellSkeleton},{[`& .${m.x.checkboxInput}`]:t.checkboxInput},{[`& .${m.x["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${m.x["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${m.x["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${m.x["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${m.x["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${m.x["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${m.x["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${m.x["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${m.x.columnHeader}`]:t.columnHeader},{[`& .${m.x.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${m.x.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${m.x.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${m.x["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${m.x["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${m.x.columnSeparator}`]:t.columnSeparator},{[`& .${m.x.filterIcon}`]:t.filterIcon},{[`& .${m.x.iconSeparator}`]:t.iconSeparator},{[`& .${m.x.menuIcon}`]:t.menuIcon},{[`& .${m.x.menuIconButton}`]:t.menuIconButton},{[`& .${m.x.menuOpen}`]:t.menuOpen},{[`& .${m.x.menuList}`]:t.menuList},{[`& .${m.x["row--editable"]}`]:t["row--editable"]},{[`& .${m.x["row--editing"]}`]:t["row--editing"]},{[`& .${m.x["row--dragging"]}`]:t["row--dragging"]},{[`& .${m.x.row}`]:t.row},{[`& .${m.x.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${m.x.rowReorderCell}`]:t.rowReorderCell},{[`& .${m.x["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${m.x.sortIcon}`]:t.sortIcon},{[`& .${m.x.withBorder}`]:t.withBorder},{[`& .${m.x.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${m.x.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${m.x.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${m.x["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})((({theme:e})=>{const t="light"===e.palette.mode?(0,h.a)((0,h.X4)(e.palette.divider,1),.88):(0,h.e$)((0,h.X4)(e.palette.divider,1),.68);return(0,i.A)({flex:1,boxSizing:"border-box",position:"relative",border:`1px solid ${t}`,borderRadius:e.shape.borderRadius,color:e.palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",flexDirection:"column",[`&.${m.x.autoHeight}`]:{height:"auto",[`& .${m.x["row--lastVisible"]} .${m.x.cell}`]:{borderBottomColor:"transparent"}},[`& .${m.x["virtualScrollerContent--overflowed"]} .${m.x["row--lastVisible"]} .${m.x.cell}`]:{borderBottomColor:"transparent"},[`& .${m.x.columnHeader}, & .${m.x.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${m.x.columnHeader}:focus-within, & .${m.x.cell}:focus-within`]:{outline:`solid ${(0,h.X4)(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${m.x.columnHeader}:focus, & .${m.x.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${m.x.columnHeaderCheckbox}, & .${m.x.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${m.x.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${m.x["columnHeader--sorted"]} .${m.x.iconButtonContainer}, & .${m.x["columnHeader--filtered"]} .${m.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${m.x.columnHeader}:not(.${m.x["columnHeader--sorted"]}) .${m.x.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${m.x.columnHeader}:not(.${m.x["columnHeader--sorted"]}):hover .${m.x.sortIcon}`]:{opacity:.5},[`& .${m.x.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${m.x.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${m.x["columnHeader--filledGroup"]} .${m.x.columnHeaderTitleContainer}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${m.x["columnHeader--filledGroup"]}.${m.x["columnHeader--showColumnBorder"]} .${m.x.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${m.x["columnHeader--filledGroup"]}.${m.x["columnHeader--showColumnBorder"]}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${m.x.sortIcon}, & .${m.x.filterIcon}`]:{fontSize:"inherit"},[`& .${m.x["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${m.x["columnHeader--alignCenter"]} .${m.x.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${m.x["columnHeader--alignRight"]} .${m.x.columnHeaderDraggableContainer}, & .${m.x["columnHeader--alignRight"]} .${m.x.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${m.x["columnHeader--alignCenter"]} .${m.x.menuIcon}, & .${m.x["columnHeader--alignRight"]} .${m.x.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${m.x["columnHeader--alignRight"]} .${m.x.menuIcon}, & .${m.x["columnHeader--alignRight"]} .${m.x.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${m.x["columnHeader--moving"]}`]:{backgroundColor:e.palette.action.hover},[`& .${m.x.columnSeparator}`]:{position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},[`& .${m.x["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${m.x["columnSeparator--sideRight"]}`]:{right:-12},[`& .${m.x["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:e.palette.text.primary,"@media (hover: none)":{color:t}},[`&.${m.x["columnSeparator--resizing"]}`]:{color:e.palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${m.x.iconSeparator}`]:{color:"inherit"},[`& .${m.x.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`& .${m.x.columnHeader}:hover`]:{[`& .${m.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${m.x.menuIcon}`]:{width:"auto",visibility:"visible"}},[`.${m.x.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${m.x.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:(0,h.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:(0,h.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(0,h.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${m.x.cell}`]:{display:"flex",alignItems:"center",borderBottom:`1px solid ${t}`},[`& .${m.x.row}:not(.${m.x["row--dynamicHeight"]}) > .${m.x.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${m.x.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${m.x.cell}.${m.x["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:e.palette.background.paper,"&:focus-within":{outline:`solid ${e.palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${m.x["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${m.x["row--editing"]} .${m.x.cell}`]:{boxShadow:e.shadows[0],backgroundColor:e.palette.background.paper},[`& .${m.x.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${m.x.booleanCell}[data-value="true"]`]:{color:e.palette.text.secondary},[`& .${m.x.booleanCell}[data-value="false"]`]:{color:e.palette.text.disabled},[`& .${m.x.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${m.x.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:e.palette.action.disabledOpacity},[`& .${m.x["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${m.x.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`& .${m.x.withBorder}`]:{borderRight:`1px solid ${t}`},[`& .${m.x["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${m.x["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${m.x["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${m.x.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${m.x.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${m.x["columnHeader--dragging"]}, & .${m.x["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity},[`& .${m.x["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity,[`& .${m.x.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${m.x.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${m.x.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${m.x.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${m.x.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}));var v="NOT_FOUND",b=function(e,t){return e===t};function y(e,t){var r,n,o="object"==typeof t?t:{equalityCheck:t},a=o.equalityCheck,i=void 0===a?b:a,l=o.maxSize,s=void 0===l?1:l,c=o.resultEqualityCheck,u=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return v}return{get:n,put:function(t,o){n(t)===v&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(s,u);function p(){var t=d.get(arguments);if(t===v){if(t=e.apply(null,arguments),c){var r=d.getEntries().find((function(e){return c(e.value,t)}));r&&(t=r.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}function x(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{let r=!1;const n=Array.isArray(e)?e.join("\n"):e;return()=>{r||(r=!0,"error"===t?console.error(n):console.warn(n))}},C=(e,t)=>e,S={cache:null},k=(A(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`."]),(...e)=>{null===S.cache&&(S.cache={});const t=(...t)=>{const[r,n]=t,o=!!r.current,a=o?r.current.instanceId:null!=n?n:"default",i=o?r.current.state:r;null===S.cache&&(S.cache={});const{cache:l}=S;if(l[a]&&l[a].get(e))return l[a].get(e)(i,a);const s=w(...e);return l[a]||(l[a]=new Map),l[a].set(e,s),s(i,a)};return t.acceptsApiRef=!0,t}),_=e=>e.columns,E=k(_,(e=>e.all)),j=k(_,(e=>e.lookup)),R=k(E,j,((e,t)=>e.map((e=>t[e])))),M=k(_,(e=>e.columnVisibilityModel)),P=k(R,M,((e,t)=>e.filter((e=>!1!==t[e.field])))),O=(k(P,(e=>e.map((e=>e.field)))),k(P,(e=>{const t=[];let r=0;for(let n=0;n{const r=e.length;return 0===r?0:t[r-1]+e[r-1].computedWidth})),T=k(R,(e=>e.filter((e=>e.filterable)))),$=k(R,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{}))),L=(C(E),C(R),C(P),C(T),C(k(T,(e=>e.map((e=>e.field))))),C(k(P,(e=>e.length))),C(k(O,I,((e,t)=>({totalWidth:t,positions:e})))));A(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const z=(e,t)=>function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state),F=n.createContext(void 0);function D(){const e=n.useContext(F);if(void 0===e)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}var N=r(90441);const B=e=>e.density,H=k(B,(e=>e.value)),V=k(B,(e=>e.rowHeight)),W=k(B,(e=>e.headerHeight)),U=k(B,(e=>e.headerGroupingMaxDepth)),q=k(B,(e=>e.factor)),G=k(B,(e=>e.headerHeight*(1+e.headerGroupingMaxDepth))),K=e=>e.rows,X=k(K,(e=>e.totalRowCount)),Z=k(K,(e=>e.loading)),Y=k(K,(e=>e.totalTopLevelRowCount)),Q=k(K,(e=>e.idRowsLookup)),J=k(K,(e=>e.idToIdLookup)),ee=k(K,(e=>e.tree)),te=k(K,(e=>e.groupingName)),re=k(K,(e=>e.treeDepth)),ne=k(K,(e=>e.ids)),oe=k(K,(e=>null==e?void 0:e.additionalRowGroups)),ae=k(oe,(e=>null==e?void 0:e.pinnedRows)),ie=k(ae,(e=>{var t,r;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(r=e.bottom)?void 0:r.length)||0)}));var le=r(74848);const se=["children","className"],ce=n.forwardRef((function(e,t){const r=(0,N.A)(),{children:o,className:a}=e,f=(0,l.A)(e,se),h=D(),v=z(h,P),b=z(h,X),y=z(h,H),x=z(h,U),w=n.useRef(null),A=(0,u.A)(w,t),C=z(h,ie),S=(0,i.A)({},r,{density:y}),k=(e=>{const{autoHeight:t,density:r,classes:n}=e,o={root:["root",t&&"autoHeight",`root--density${(0,c.A)(r)}`]};return(0,p.A)(o,m.B,n)})(S);h.current.rootElementRef=w;const[_,E]=n.useState(!1);return(0,d.A)((()=>{E(!0)}),[]),(0,d.A)((()=>{_&&h.current.unstable_updateGridDimensionsRef()}),[h,_]),_?(0,le.jsx)(g,(0,i.A)({ref:A,className:(0,s.A)(a,k.root),ownerState:S,role:"grid","aria-colcount":v.length,"aria-rowcount":x+1+C+b,"aria-multiselectable":!r.disableMultipleSelection,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},f,{children:o})):null}));function ue(e,t){const r=n.useRef(null);if(r.current)return r.current;const o=e.current.getLogger(t);return r.current=o,o}const de=e=>{const{classes:t}=e;return(0,p.A)({root:["main"]},m.B,t)},pe=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})((()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})));function fe(e){const t=(0,N.A)(),r=de(t);return(0,le.jsx)(pe,{className:r.root,ownerState:t,children:e.children})}class he extends n.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.api.current&&(this.logError(e),this.props.api.current.showError({error:e,errorInfo:t}))}logError(e,t){this.props.logger.error(`An unexpected error occurred. Error: ${e&&e.message}. `,e,t)}render(){var e;return this.props.hasError||null!=(e=this.state)&&e.hasError?this.props.render(this.state):this.props.children}}function me(e){const{children:t}=e,r=D(),n=ue(r,"GridErrorHandler"),o=(0,N.A)(),a=r.current.state.error;return(0,le.jsx)(he,{hasError:null!=a,api:r,logger:n,render:e=>{var t;return(0,le.jsx)(fe,{children:(0,le.jsx)(o.components.ErrorOverlay,(0,i.A)({},e,a,null==(t=o.componentsProps)?void 0:t.errorOverlay))})},children:t})}function ge(){var e;const t=D(),r=(0,N.A)(),o=n.useRef(null);return t.current.headerRef=o,(0,le.jsx)("div",{ref:o,children:(0,le.jsx)(r.components.Header,(0,i.A)({},null==(e=r.componentsProps)?void 0:e.header))})}var ve=r(83034),be=r(93749);const ye=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style"],xe=n.forwardRef((function(e,t){const{children:r,defaultHeight:o=null,defaultWidth:a=null,disableHeight:s=!1,disableWidth:c=!1,nonce:p,onResize:f,style:h}=e,m=(0,l.A)(e,ye),[g,v]=n.useState({height:o,width:a}),b=n.useRef(null),y=n.useRef(null),x=(0,ve.A)((()=>{if(y.current){const e=y.current.offsetHeight||0,t=y.current.offsetWidth||0,r=(0,be.A)(y.current).getComputedStyle(y.current),n=parseInt(r.paddingLeft,10)||0,o=parseInt(r.paddingRight,10)||0,a=e-(parseInt(r.paddingTop,10)||0)-(parseInt(r.paddingBottom,10)||0),i=t-n-o;(!s&&g.height!==a||!c&&g.width!==i)&&(v({height:a,width:i}),f&&f({height:a,width:i}))}}));(0,d.A)((()=>{var e;if(y.current=b.current.parentElement,!y)return;const t=(0,be.A)(null!=(e=y.current)?e:void 0),r=function(e,t){var r=function(e){var t=e.__resizeTriggers__,r=t.firstElementChild,n=t.lastElementChild,o=r.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,o.style.width=r.offsetWidth+1+"px",o.style.height=r.offsetHeight+1+"px",r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight},n=function(e){if(!(e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var n=this;r(this),this.__resizeRAF__&&t.cancelAnimationFrame(this.__resizeRAF__),this.__resizeRAF__=t.requestAnimationFrame((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(n)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach((function(t){t.call(n,e)})))}))}},o=!1,a="",i="animationstart",l="Webkit Moz O ms".split(" "),s="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),c=document.createElement("fakeelement");if(void 0!==c.style.animationName&&(o=!0),!1===o)for(var u=0;u div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .Mui-resizeTriggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o="ShadowRoot"===r.constructor.name?r:t.head||t.getElementsByTagName("head")[0],a=t.createElement("style");a.id="muiDetectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(t.createTextNode(n)),o.appendChild(a)}}(l,o.getRootNode()),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=l.createElement("div")).className="Mui-resizeTriggers",o.__resizeTriggers__.innerHTML='
',o.appendChild(o.__resizeTriggers__),r(o),o.addEventListener("scroll",n,!0),i&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName==d&&r(o)},o.__resizeTriggers__.addEventListener(i,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(a)},removeResizeListener:function(e,t){if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",n,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(i,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(p,t);return r.addResizeListener(y.current,x),x(),()=>{r.removeResizeListener(y.current,x)}}),[p,x]);const w={overflow:"visible"},A={};s||(w.height=0,A.height=g.height),c||(w.width=0,A.width=g.width);const C=(0,u.A)(b,t);return(0,le.jsx)("div",(0,i.A)({ref:C,style:(0,i.A)({},w,h)},m,{children:null===g.height&&null===g.width?null:r(A)}))})),we=e=>e.sorting,Ae=k(we,(e=>e.sortedRows)),Ce=k(Ae,Q,((e,t)=>e.map((e=>({id:e,model:t[e]}))))),Se=k(we,(e=>e.sortModel)),ke=k(Se,(e=>e.reduce(((t,r,n)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?n+1:void 0},t)),{}))),_e=e=>e.filter,Ee=k(_e,(e=>e.filterModel)),je=(k(Ee,(e=>e.quickFilterValues)),k(_e,(e=>e.visibleRowsLookup))),Re=k(_e,(e=>e.filteredRowsLookup)),Me=(k(_e,(e=>e.filteredDescendantCountLookup)),k(je,Ce,((e,t)=>t.filter((t=>!1!==e[t.id]))))),Pe=k(Me,(e=>e.map((e=>e.id)))),Oe=k(Re,Ce,((e,t)=>t.filter((t=>!1!==e[t.id])))),Ie=k(Oe,(e=>e.map((e=>e.id)))),Te=k(Me,ee,re,((e,t,r)=>r<2?e:e.filter((e=>{var r;return 0===(null==(r=t[e.id])?void 0:r.depth)})))),$e=k(Me,(e=>e.length)),Le=k(Te,(e=>e.length)),ze=k(Ee,j,((e,t)=>{var r;return null==(r=e.items)?void 0:r.filter((e=>{var r,n;if(!e.columnField)return!1;const o=t[e.columnField];if(null==o||!o.filterOperators||0===(null==o||null==(r=o.filterOperators)?void 0:r.length))return!1;const a=o.filterOperators.find((t=>t.value===e.operatorValue));return!!a&&(!a.InputComponent||null!=e.value&&""!==(null==(n=e.value)?void 0:n.toString()))}))})),Fe=k(ze,(e=>e.reduce(((e,t)=>(e[t.columnField]?e[t.columnField].push(t):e[t.columnField]=[t],e)),{})));function De(e){var t,r;const o=D(),a=(0,N.A)(),l=z(o,G),[s,c]=n.useState((()=>{var e,t;return null!=(e=null==(t=o.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),u=n.useCallback((()=>{var e,t;c(null!=(e=null==(t=o.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[o]);(0,d.A)((()=>o.current.subscribeEvent("viewportInnerSizeChange",u)),[o,u]);let p=null!=(t=null==s?void 0:s.height)?t:0;return a.autoHeight&&0===p&&(p="auto"),s?(0,le.jsx)("div",(0,i.A)({style:{height:p,width:null!=(r=null==s?void 0:s.width)?r:0,position:"absolute",top:l,bottom:"auto"===p?0:void 0}},e)):null}function Ne(){const e=D(),t=(0,N.A)(),r=z(e,X),n=z(e,$e),o=z(e,Z),a=!o&&r>0&&0===n;let l=null;var s,c,u;return o||0!==r||(l=(0,le.jsx)(t.components.NoRowsOverlay,(0,i.A)({},null==(s=t.componentsProps)?void 0:s.noRowsOverlay))),a&&(l=(0,le.jsx)(t.components.NoResultsOverlay,(0,i.A)({},null==(c=t.componentsProps)?void 0:c.noResultsOverlay))),o&&(l=(0,le.jsx)(t.components.LoadingOverlay,(0,i.A)({},null==(u=t.componentsProps)?void 0:u.loadingOverlay))),null===l?null:(0,le.jsx)(De,{children:l})}function Be(e){const{children:t,VirtualScrollerComponent:r,ColumnHeadersComponent:o}=e,a=D(),i=(0,N.A)(),l=z(a,G),[s,c]=n.useState(i.disableVirtualization),u=n.useCallback((()=>{c(!0)}),[]),d=n.useCallback((()=>{c(!1)}),[]);n.useEffect((()=>{c(i.disableVirtualization)}),[i.disableVirtualization]),a.current.unstable_disableVirtualization=u,a.current.unstable_enableVirtualization=d;const p=n.useRef(null),f=n.useRef(null),h=n.useRef(null),m=n.useRef(null);a.current.columnHeadersContainerElementRef=f,a.current.columnHeadersElementRef=p,a.current.windowRef=h,a.current.renderingZoneRef=m;const g=n.useCallback((e=>{a.current.publishEvent("resize",e)}),[a]);return(0,le.jsxs)(fe,{children:[(0,le.jsx)(Ne,{}),(0,le.jsx)(o,{ref:f,innerRef:p}),(0,le.jsx)(xe,{nonce:i.nonce,disableHeight:i.autoHeight,onResize:g,children:e=>{const t={width:e.width,height:e.height?e.height-l:"auto",marginTop:l};return(0,le.jsx)(r,{ref:h,style:t,disableVirtualization:s})}}),t]})}function He(){var e;const t=D(),r=(0,N.A)(),o=n.useRef(null);return t.current.footerRef=o,r.hideFooter?null:(0,le.jsx)("div",{ref:o,children:(0,le.jsx)(r.components.Footer,(0,i.A)({},null==(e=r.componentsProps)?void 0:e.footer))})}var Ve=r(86980);const We=({apiRef:e,props:t,children:r})=>(0,le.jsx)(Ve.y.Provider,{value:t,children:(0,le.jsx)(F.Provider,{value:e,children:r})});function Ue(e){return"function"==typeof e}function qe(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Ge=(e,t,r)=>Math.max(t,Math.min(r,e));function Ke(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 r=e.length;if(r!==t.length)return!1;for(let n=0;n{},Qe={debug:Ye,info:Ye,warn:Ye,error:Ye},Je=["debug","info","warn","error"];function et(e,t,r=console){const n=Je.indexOf(t);if(-1===n)throw new Error(`MUI: Log level ${t} not recognized.`);return Je.reduce(((t,o,a)=>(t[o]=a>=n?(...t)=>{const[n,...a]=t;r[o](`MUI: ${e} - ${n}`,...a)}:Ye,t)),{})}function tt(e,t,r){const o=n.useRef(t),[a]=n.useState(Object.keys(t)),i=n.useCallback((()=>{e.current&&a.forEach((t=>{e.current.hasOwnProperty(t)||(e.current[t]=(...e)=>o.current[t](...e))}))}),[a,e]);n.useEffect((()=>{o.current=t}),[t]),n.useEffect((()=>{i()}),[i]),i()}class rt{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const n=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(r.cleanupToken,n)}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 nt{constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}var ot;!function(e){e.DataGrid="DataGrid",e.DataGridPro="DataGridPro"}(ot||(ot={}));class at{}const it=function(e){let t=0;return function(r,o,a,i){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new nt:new rt);const[l]=n.useState(new at),s=n.useRef(null),c=n.useRef();c.current=a;const u=n.useRef(null);if(!s.current&&c.current){const n=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=c.current)||n.call(c,e,t,r)};s.current=r.current.subscribeEvent(o,n,i),t+=1,u.current={cleanupToken:t},e.registry.register(l,(()=>{var e;null==(e=s.current)||e.call(s),s.current=null,u.current=null}),u.current)}else!c.current&&s.current&&(s.current(),s.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));n.useEffect((()=>{if(!s.current&&c.current){const e=(e,t,r)=>{var n;t.defaultMuiPrevented||null==(n=c.current)||n.call(c,e,t,r)};s.current=r.current.subscribeEvent(o,e,i)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var e;null==(e=s.current)||e.call(s),s.current=null}}),[r,o,i])}}({registry:null}),lt={isFirst:!0};function st(e,t,r){it(e,t,r,lt)}class ct{constructor(){this.maxListeners=10,this.warnOnce=!1,this.events={}}on(e,t,r={}){let n=this.events[e];n||(n={highPriority:new Map,regular:new Map},this.events[e]=n),r.isFirst?n.highPriority.set(t,!0):n.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 r=this.events[e];if(!r)return;const n=Array.from(r.highPriority.keys()),o=Array.from(r.regular.keys());for(let e=n.length-1;e>=0;e-=1){const o=n[e];r.highPriority.has(o)&&o.apply(this,t)}for(let e=0;e{const r=function(e,t){const r=n.useRef();r.current||(r.current={unstable_eventManager:new ct,unstable_caches:{},state:{},instanceId:ut},ut+=1),n.useImperativeHandle(e,(()=>r.current),[r]);const o=n.useCallback(((...e)=>{const[n,o,a={}]=e;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const i=t.signature===ot.DataGridPro?{api:r.current}:{};r.current.unstable_eventManager.emit(n,o,a,i)}),[r,t.signature]),a=n.useCallback(((e,t,n)=>{r.current.unstable_eventManager.on(e,t,n);const o=r.current;return()=>{o.unstable_eventManager.removeListener(e,t)}}),[r]),i=n.useCallback((e=>{r.current.publishEvent("componentError",e)}),[r]);return tt(r,{subscribeEvent:a,publishEvent:o,showError:i}),n.useEffect((()=>{const e=r.current;return()=>{var t;void 0!==(t=e.instanceId)?S.cache&&S.cache[t]&&delete S.cache[t]:S.cache=null,e.publishEvent("unmount")}}),[r]),r}(e,t);return((e,t)=>{e.current.getLogger=n.useCallback((e=>Ze?et(e,"debug",t.logger):t.logLevel?et(e,t.logLevel.toString(),t.logger):Qe),[t.logLevel,t.logger])})(r,t),function(e,t){const r=n.useCallback((t=>{e.current.setState((e=>(0,i.A)({},e,{error:t})))}),[e]);n.useEffect((()=>{t.error?r({error:t.error}):r(null)}),[r,t.error]),it(e,"componentError",r)}(r,t),((e,t)=>{const r=n.useRef({}),[,o]=n.useState(),a=n.useCallback((e=>{const{stateId:t}=e,n=(0,l.A)(e,mt);r.current[t]=(0,i.A)({},n,{stateId:t})}),[]),s=n.useCallback(((n,o)=>{let a;if(a=Ue(n)?n(e.current.state):n,e.current.state===a)return!1;let i=!1;const l=[];if(Object.keys(r.current).forEach((t=>{const n=r.current[t],o=n.stateSelector(e.current.state,e.current.instanceId),s=n.stateSelector(a,e.current.instanceId);s!==o&&(l.push({stateId:n.stateId,hasPropChanged:s!==n.propModel}),void 0!==n.propModel&&s!==n.propModel&&(i=!0))})),l.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${l[0].stateId}, therefore, you're not allowed to update ${l.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=a,e.current.publishEvent&&e.current.publishEvent("stateChange",a)),1===l.length){const{stateId:n,hasPropChanged:s}=l[0],c=r.current[n],u=c.stateSelector(a,e.current.instanceId);if(c.propOnChange&&s){const r=t.signature===ot.DataGridPro?{api:e.current,reason:o}:{reason:o};c.propOnChange(u,r)}i||e.current.publishEvent(c.changeEvent,u,{reason:o})}return!i}),[e,t.signature]),c=n.useCallback(((t,r,n)=>e.current.setState((e=>(0,i.A)({},e,{[t]:r(e[t])})),n)),[e]),u=n.useCallback((()=>o((()=>e.current.state))),[e]);tt(e,{setState:s,forceUpdate:u,unstable_updateControlState:c,unstable_registerControlState:a})})(r,t),(e=>{const t=n.useRef({}),r=n.useCallback((e=>{e&&Object.values(e.appliers).forEach((e=>{e()}))}),[]);tt(e,{unstable_registerPipeProcessor:n.useCallback(((e,n,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const a=t.current[e];return a.processors.get(n)!==o&&(a.processors.set(n,o),r(a)),()=>{t.current[e].processors.set(n,null)}}),[r]),unstable_registerPipeApplier:n.useCallback(((e,r,n)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[r]=n,()=>{const n=t.current[e].appliers,o=(0,l.A)(n,[r].map(pt));t.current[e].appliers=o})),[]),unstable_requestPipeProcessorsApplication:n.useCallback((e=>{const n=t.current[e];r(n)}),[r]),unstable_applyPipeProcessors:n.useCallback(((...e)=>{const[r,n,o]=e;return t.current[r]?Array.from(t.current[r].processors.values()).reduce(((e,t)=>t?t(e,o):e),n):n}),[])})})(r),(e=>{const t=n.useRef(new Map),r=n.useRef({}),o=n.useCallback(((t,n,o)=>{const a=()=>{const e=r.current[n],o=(0,l.A)(e,[t].map(pt));r.current[n]=o};r.current[n]||(r.current[n]={});const i=r.current[n],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.unstable_getActiveStrategy(ht[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),a):a}),[e]),a=n.useCallback(((t,n)=>{const o=e.current.unstable_getActiveStrategy(ht[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const a=r.current[t];if(!a||!a[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,a[o])(n)}),[e]),i=n.useCallback((e=>{var r;const n=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(r=null==n?void 0:n[0])?r:ft}),[]),s=n.useCallback(((r,n,o)=>{t.current.set(n,{group:r,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);tt(e,{unstable_registerStrategyProcessor:o,unstable_applyStrategyProcessor:a,unstable_getActiveStrategy:i,unstable_setStrategyAvailability:s})})(r),((e,t)=>{const r=n.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.getLocaleText=r})(r,t),r},vt=(e,t,r)=>{const o=n.useRef(!1);o.current||(t.current.state=e(t.current.state,r,t),o.current=!0)};function bt(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 r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const yt=e=>e.columnMenu,xt=e=>(0,i.A)({},e,{columnMenu:{open:!1}}),wt=e=>{const t=n.useRef(!0);t.current&&(t.current=!1,e())},At=(e,t,r)=>{const o=n.useRef(),a=n.useRef(`mui-${Math.round(1e9*Math.random())}`),i=n.useCallback((()=>{o.current=e.current.unstable_registerPipeProcessor(t,a.current,r)}),[e,r,t]);wt((()=>{i()}));const l=n.useRef(!0);n.useEffect((()=>(l.current?l.current=!1:i(),()=>{o.current&&(o.current(),o.current=null)})),[i])},Ct=(e,t,r)=>{const o=n.useRef(),a=n.useRef(`mui-${Math.round(1e9*Math.random())}`),i=n.useCallback((()=>{o.current=e.current.unstable_registerPipeApplier(t,a.current,r)}),[e,r,t]);wt((()=>{i()}));const l=n.useRef(!0);n.useEffect((()=>(l.current?l.current=!1:i(),()=>{o.current&&(o.current(),o.current=null)})),[i])};var St=r(83826),kt=r(75003);const _t=(0,kt.A)((0,le.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Et=(0,kt.A)((0,le.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),jt=(0,kt.A)((0,le.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Rt=(0,kt.A)((0,le.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Mt=(0,kt.A)((0,le.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Pt=(0,kt.A)((0,le.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"),Ot=(0,kt.A)((0,le.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"),It=((0,kt.A)((0,le.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,kt.A)((0,le.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,kt.A)((0,le.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")),Tt=(0,kt.A)((0,le.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),$t=(0,kt.A)((0,le.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Lt=(0,kt.A)((0,le.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),zt=(0,kt.A)((0,le.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Ft=(0,kt.A)((0,le.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"),Dt=(0,kt.A)((0,le.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"),Nt=(0,kt.A)((0,le.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Bt=(0,kt.A)((0,le.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Ht=(0,kt.A)((0,le.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"),Vt=(0,kt.A)((0,le.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"),Wt=(0,kt.A)((0,le.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"),Ut=(0,kt.A)((0,le.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),qt=(0,kt.A)((0,le.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");var Gt=r(1668),Kt=r(73896);function Xt(e){return"object"==typeof e&&null!==e?e.value:e}function Zt(e,t){if(void 0===t)return;const r=t.find((t=>{const r=Xt(t);return String(r)===String(e)}));return Xt(r)}const Yt=["item","applyValue","type","apiRef","focusElementRef"],Qt=({valueOptions:e,valueFormatter:t,field:r},n,o)=>("function"==typeof e?["",...e({field:r})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,l=a?e.value:e,s=t&&""!==e?t({value:e,field:r,api:n}):e,c=a?e.label:s;return(0,le.jsx)(o,{value:l,children:c},i)})),Jt=500;function er(e){var t,r,o,a,s;const{item:c,applyValue:u,type:d,apiRef:p,focusElementRef:f}=e,h=(0,l.A)(e,Yt),m=n.useRef(),[g,v]=n.useState(null!=(t=c.value)?t:""),[b,y]=n.useState(!1),x=(0,Gt.A)(),w=(0,N.A)(),A=null==(o=((null==(r=w.componentsProps)?void 0:r.baseSelect)||{}).native)||o,C="singleSelect"===d?{select:!0,SelectProps:(0,i.A)({native:A},null==(a=w.componentsProps)?void 0:a.baseSelect),children:Qt(p.current.getColumn(c.columnField),p.current,A?"option":Kt.A)}:{},S=n.useCallback((e=>{let t=e.target.value;if("singleSelect"===d){const e=p.current.getColumn(c.columnField),r="function"==typeof e.valueOptions?e.valueOptions({field:e.field}):e.valueOptions;t=Zt(t,r)}clearTimeout(m.current),v(String(t)),y(!0),m.current=setTimeout((()=>{u((0,i.A)({},c,{value:t})),y(!1)}),Jt)}),[p,u,c,d]);n.useEffect((()=>()=>{clearTimeout(m.current)}),[]),n.useEffect((()=>{var e;const t=null!=(e=c.value)?e:"";v(String(t))}),[c.value]);const k=b?{endAdornment:(0,le.jsx)(Ht,{})}:h.InputProps;return(0,le.jsx)(w.components.BaseTextField,(0,i.A)({id:x,label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:S,variant:"standard",type:d||"text",InputProps:k,InputLabelProps:{shrink:!0},inputRef:f},C,h,null==(s=w.componentsProps)?void 0:s.baseTextField))}const tr=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","isValidating","debounceMs","isProcessingProps","onValueChange"],rr=(0,f.Ay)(St.Ay,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((({theme:e})=>(0,i.A)({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}))),nr=n.forwardRef(((e,t)=>{var r,o;const a=(0,N.A)(),{id:s,value:c,field:u,colDef:f,hasFocus:h,debounceMs:g=(null!=(r=a.experimentalFeatures)&&r.newEditingApi?200:Jt),isProcessingProps:v,onValueChange:b}=e,y=(0,l.A)(e,tr),x=D(),w=n.useRef(),[A,C]=n.useState(c),S=(e=>{const{classes:t}=e;return(0,p.A)({root:["editInputCell"]},m.B,t)})(a),k=n.useCallback((async e=>{var t;const r=e.target.value;b&&await b(e,r);const n=x.current.getColumn(u);let o=r;n.valueParser&&null!=(t=a.experimentalFeatures)&&t.newEditingApi&&(o=n.valueParser(r,x.current.getCellParams(s,u))),C(o),x.current.setEditCellValue({id:s,field:u,value:o,debounceMs:g,unstable_skipValueParser:!0},e)}),[x,g,u,s,b,null==(o=a.experimentalFeatures)?void 0:o.newEditingApi]),_=x.current.unstable_getEditCellMeta?x.current.unstable_getEditCellMeta(s,u):{};return n.useEffect((()=>{"debouncedSetEditCellValue"!==_.changeReason&&C(c)}),[_.changeReason,c]),(0,d.A)((()=>{h&&w.current.focus()}),[h]),(0,le.jsx)(rr,(0,i.A)({ref:t,inputRef:w,className:S.root,ownerState:a,fullWidth:!0,type:"number"===f.type?f.type:"text",value:null!=A?A:"",onChange:k,endAdornment:v?(0,le.jsx)(Ht,{}):void 0},y))})),or=A(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),ar=(e,t)=>t&&e.length>1?(or(),[e[0]]):e,ir=(e,t)=>r=>(0,i.A)({},r,{sorting:(0,i.A)({},r.sorting,{sortModel:ar(e,t)})}),lr=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},sr=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,cr=new Intl.Collator,ur=(e,t)=>{const r=sr(e,t);return null!==r?r:Number(e)-Number(t)},dr=(e,t)=>{const r=sr(e,t);return null!==r?r:e>t?1:e{const t=n.useRef({});return n.useEffect((()=>{t.current=e})),t.current};var gr=r(66111),vr=r(13721);function br(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function yr(e={}){const{ignoreAccents:t=!0,ignoreCase:r=!0,limit:n,matchFrom:o="any",stringify:a,trim:i=!1}=e;return(e,{inputValue:l,getOptionLabel:s})=>{let c=i?l.trim():l;r&&(c=c.toLowerCase()),t&&(c=br(c));const u=c?e.filter((e=>{let n=(a||s)(e);return r&&(n=n.toLowerCase()),t&&(n=br(n)),"start"===o?0===n.indexOf(c):n.indexOf(c)>-1})):e;return"number"==typeof n?u.slice(0,n):u}}function xr(e,t){for(let r=0;r{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};var Cr=r(771),Sr=r(37591),kr=r(3541),_r=r(27553),Er=r(17245);function jr(e){return(0,Er.Ay)("MuiListSubheader",e)}(0,_r.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Rr=["className","color","component","disableGutters","disableSticky","inset"],Mr=(0,f.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,c.A)(r.color)}`],!r.disableGutters&&t.gutters,r.inset&&t.inset,!r.disableSticky&&t.sticky]}})((({theme:e,ownerState:t})=>(0,i.A)({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)},"primary"===t.color&&{color:(e.vars||e).palette.primary.main},"inherit"===t.color&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}))),Pr=n.forwardRef((function(e,t){const r=(0,kr.A)({props:e,name:"MuiListSubheader"}),{className:n,color:o="default",component:a="li",disableGutters:s=!1,disableSticky:u=!1,inset:d=!1}=r,f=(0,l.A)(r,Rr),h=(0,i.A)({},r,{color:o,component:a,disableGutters:s,disableSticky:u,inset:d}),m=(e=>{const{classes:t,color:r,disableGutters:n,inset:o,disableSticky:a}=e,i={root:["root","default"!==r&&`color${(0,c.A)(r)}`,!n&&"gutters",o&&"inset",!a&&"sticky"]};return(0,p.A)(i,jr,t)})(h);return(0,le.jsx)(Mr,(0,i.A)({as:a,className:(0,pr.A)(m.root,n),ref:t,ownerState:h},f))}));Pr.muiSkipListHighlight=!0;const Or=Pr;var Ir=r(60538),Tr=r(11641),$r=r(82022),Lr=r(25571),zr=r(51175),Fr=r(71023),Dr=r(6959);const Nr=(0,kt.A)((0,le.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");var Br=r(602),Hr=r(76081);function Vr(e){return(0,Er.Ay)("MuiAutocomplete",e)}const Wr=(0,_r.A)("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 Ur,qr;const Gr=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Kr=["ref"],Xr=(0,Hr.h)("MuiAutocomplete"),Zr=(0,f.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{fullWidth:n,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:l}=r;return[{[`& .${Wr.tag}`]:t.tag},{[`& .${Wr.tag}`]:t[`tagSize${(0,c.A)(l)}`]},{[`& .${Wr.inputRoot}`]:t.inputRoot},{[`& .${Wr.input}`]:t.input},{[`& .${Wr.input}`]:i&&t.inputFocused},t.root,n&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Wr.focused} .${Wr.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Wr.clearIndicator}`]:{visibility:"visible"}},[`& .${Wr.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Wr.inputRoot}`]:{flexWrap:"wrap",[`.${Wr.hasPopupIcon}&, .${Wr.hasClearIcon}&`]:{paddingRight:30},[`.${Wr.hasPopupIcon}.${Wr.hasClearIcon}&`]:{paddingRight:56},[`& .${Wr.input}`]:{width:0,minWidth:30}},[`& .${Lr.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Lr.A.root}.${zr.A.sizeSmall}`]:{[`& .${Lr.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Fr.A.root}`]:{padding:9,[`.${Wr.hasPopupIcon}&, .${Wr.hasClearIcon}&`]:{paddingRight:39},[`.${Wr.hasPopupIcon}.${Wr.hasClearIcon}&`]:{paddingRight:65},[`& .${Wr.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Wr.endAdornment}`]:{right:9}},[`& .${Fr.A.root}.${zr.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Wr.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Dr.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${Wr.hasPopupIcon}&, .${Wr.hasClearIcon}&`]:{paddingRight:39},[`.${Wr.hasPopupIcon}.${Wr.hasClearIcon}&`]:{paddingRight:65},[`& .${Dr.A.input}`]:{padding:"7px 4px"},[`& .${Wr.endAdornment}`]:{right:9}},[`& .${Dr.A.root}.${zr.A.sizeSmall}`]:{paddingBottom:1,[`& .${Dr.A.input}`]:{padding:"2.5px 4px"}},[`& .${zr.A.hiddenLabel}`]:{paddingTop:8},[`& .${Dr.A.root}.${zr.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Wr.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Dr.A.root}.${zr.A.hiddenLabel}.${zr.A.sizeSmall}`]:{[`& .${Wr.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Wr.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Wr.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Wr.input}`]:{opacity:1}}}]}),Yr=(0,f.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Qr=(0,f.Ay)(Tr.A,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Jr=(0,f.Ay)(Tr.A,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,i.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),en=(0,f.Ay)(Sr.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Wr.option}`]:t.option},t.popper,r.disablePortal&&t.popperDisablePortal]}})((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),tn=(0,f.Ay)(Ir.A,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>(0,i.A)({},e.typography.body1,{overflow:"auto"}))),rn=(0,f.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),nn=(0,f.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),on=(0,f.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Wr.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"},[`&.${Wr.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"},[`&.${Wr.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,Cr.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Wr.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,Cr.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Wr.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,Cr.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),an=(0,f.Ay)(Or,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),ln=(0,f.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Wr.option}`]:{paddingLeft:24}}),sn=n.forwardRef((function(e,t){var r,o,a,s;const d=Xr({props:e,name:"MuiAutocomplete"}),{autoComplete:f=!1,autoHighlight:h=!1,autoSelect:m=!1,blurOnSelect:g=!1,ChipProps:v,className:b,clearIcon:y=Ur||(Ur=(0,le.jsx)(Nr,{fontSize:"small"})),clearOnBlur:x=!d.freeSolo,clearOnEscape:w=!1,clearText:A="Clear",closeText:C="Close",componentsProps:S={},defaultValue:k=(d.multiple?[]:null),disableClearable:_=!1,disableCloseOnSelect:E=!1,disabled:j=!1,disabledItemsFocusable:R=!1,disableListWrap:M=!1,disablePortal:P=!1,filterSelectedOptions:O=!1,forcePopupIcon:I="auto",freeSolo:T=!1,fullWidth:$=!1,getLimitTagsText:L=(e=>`+${e}`),getOptionLabel:z,groupBy:F,handleHomeEndKeys:D=!d.freeSolo,includeInputInList:N=!1,limitTags:B=-1,ListboxComponent:H="ul",ListboxProps:V,loading:W=!1,loadingText:U="Loading…",multiple:q=!1,noOptionsText:G="No options",openOnFocus:K=!1,openText:X="Open",PaperComponent:Z=Ir.A,PopperComponent:Y=Sr.A,popupIcon:Q=qr||(qr=(0,le.jsx)(Br.A,{})),readOnly:J=!1,renderGroup:ee,renderInput:te,renderOption:re,renderTags:ne,selectOnFocus:oe=!d.freeSolo,size:ae="medium",slotProps:ie={}}=d,se=(0,l.A)(d,Gr),{getRootProps:ce,getInputProps:ue,getInputLabelProps:de,getPopupIndicatorProps:pe,getClearProps:fe,getTagProps:he,getListboxProps:me,getOptionProps:ge,value:ve,dirty:be,expanded:ye,id:xe,popupOpen:we,focused:Ae,focusedTag:Ce,anchorEl:Se,setAnchorEl:ke,inputValue:_e,groupedOptions:Ee}=function(e){const{unstable_isActiveElementInListbox:t=Ar,unstable_classNamePrefix:r="Mui",autoComplete:o=!1,autoHighlight:a=!1,autoSelect:l=!1,blurOnSelect:s=!1,clearOnBlur:c=!e.freeSolo,clearOnEscape:u=!1,componentName:d="useAutocomplete",defaultValue:p=(e.multiple?[]:null),disableClearable:f=!1,disableCloseOnSelect:h=!1,disabled:m,disabledItemsFocusable:g=!1,disableListWrap:v=!1,filterOptions:b=wr,filterSelectedOptions:y=!1,freeSolo:x=!1,getOptionDisabled:w,getOptionKey:A,getOptionLabel:C=(e=>{var t;return null!=(t=e.label)?t:e}),groupBy:S,handleHomeEndKeys:k=!e.freeSolo,id:_,includeInputInList:E=!1,inputValue:j,isOptionEqualToValue:R=((e,t)=>e===t),multiple:M=!1,onChange:P,onClose:O,onHighlightChange:I,onInputChange:T,onOpen:$,open:L,openOnFocus:z=!1,options:F,readOnly:D=!1,selectOnFocus:N=!e.freeSolo,value:B}=e,H=(0,fr.A)(_);let V=C;V=e=>{const t=C(e);return"string"!=typeof t?String(t):t};const W=n.useRef(!1),U=n.useRef(!0),q=n.useRef(null),G=n.useRef(null),[K,X]=n.useState(null),[Z,Y]=n.useState(-1),Q=a?0:-1,J=n.useRef(Q),[ee,te]=(0,hr.A)({controlled:B,default:p,name:d}),[re,ne]=(0,hr.A)({controlled:j,default:"",name:d,state:"inputValue"}),[oe,ae]=n.useState(!1),ie=n.useCallback(((e,t)=>{if(!(M?ee.length!y||!(M?ee:[ee]).some((t=>null!==t&&R(e,t))))),{inputValue:de&&ce?"":re,getOptionLabel:V}):[],he=mr({filteredOptions:fe,value:ee,inputValue:re});n.useEffect((()=>{const e=ee!==he.value;oe&&!e||x&&!e||ie(null,ee)}),[ee,ie,oe,he.value,x]);const me=le&&fe.length>0&&!D,ge=(0,gr.A)((e=>{-1===e?q.current.focus():K.querySelector(`[data-tag-index="${e}"]`).focus()}));n.useEffect((()=>{M&&Z>ee.length-1&&(Y(-1),ge(-1))}),[ee,M,Z,ge]);const ve=(0,gr.A)((({event:e,index:t,reason:n="auto"})=>{if(J.current=t,-1===t?q.current.removeAttribute("aria-activedescendant"):q.current.setAttribute("aria-activedescendant",`${H}-option-${t}`),I&&I(e,-1===t?null:fe[t],n),!G.current)return;const o=G.current.querySelector(`[role="option"].${r}-focused`);o&&(o.classList.remove(`${r}-focused`),o.classList.remove(`${r}-focusVisible`));let a=G.current;if("listbox"!==G.current.getAttribute("role")&&(a=G.current.parentElement.querySelector('[role="listbox"]')),!a)return;if(-1===t)return void(a.scrollTop=0);const i=G.current.querySelector(`[data-option-index="${t}"]`);if(i&&(i.classList.add(`${r}-focused`),"keyboard"===n&&i.classList.add(`${r}-focusVisible`),a.scrollHeight>a.clientHeight&&"mouse"!==n&&"touch"!==n)){const e=i,t=a.clientHeight+a.scrollTop,r=e.offsetTop+e.offsetHeight;r>t?a.scrollTop=r-a.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0){if(!pe)return;const a=function(e,t){if(!G.current||e<0||e>=fe.length)return-1;let r=e;for(;;){const n=G.current.querySelector(`[data-option-index="${r}"]`),o=!g&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!o)return r;if(r="next"===t?(r+1)%fe.length:(r-1+fe.length)%fe.length,r===e)return-1}}((()=>{const e=fe.length-1;if("reset"===t)return Q;if("start"===t)return 0;if("end"===t)return e;const r=J.current+t;return r<0?-1===r&&E?-1:v&&-1!==J.current||Math.abs(t)>1?0:e:r>e?r===e+1&&E?-1:v||Math.abs(t)>1?e:0:r})(),r);if(ve({index:a,reason:n,event:e}),o&&"reset"!==t)if(-1===a)q.current.value=re;else{const e=V(fe[a]);q.current.value=e,0===e.toLowerCase().indexOf(re.toLowerCase())&&re.length>0&&q.current.setSelectionRange(re.length,e.length)}})),ye=n.useCallback((()=>{if(!pe)return;const e=(()=>{if(-1!==J.current&&he.filteredOptions&&he.filteredOptions.length!==fe.length&&he.inputValue===re&&(M?ee.length===he.value.length&&he.value.every(((e,t)=>V(ee[t])===V(e))):(e=he.value,t=ee,(e?V(e):"")===(t?V(t):"")))){const e=he.filteredOptions[J.current];if(e)return xr(fe,(t=>V(t)===V(e)))}var e,t;return-1})();if(-1!==e)return void(J.current=e);const t=M?ee[0]:ee;if(0!==fe.length&&null!=t){if(G.current)if(null==t)J.current>=fe.length-1?ve({index:fe.length-1}):ve({index:J.current});else{const e=fe[J.current];if(M&&e&&-1!==xr(ee,(t=>R(e,t))))return;const r=xr(fe,(e=>R(e,t)));-1===r?be({diff:"reset"}):ve({index:r})}}else be({diff:"reset"})}),[fe.length,!M&&ee,y,be,ve,pe,re,M]),xe=(0,gr.A)((e=>{(0,vr.A)(G,e),e&&ye()}));n.useEffect((()=>{ye()}),[ye]);const we=e=>{le||(se(!0),ue(!0),$&&$(e))},Ae=(e,t)=>{le&&(se(!1),O&&O(e,t))},Ce=(e,t,r,n)=>{if(M){if(ee.length===t.length&&ee.every(((e,r)=>e===t[r])))return}else if(ee===t)return;P&&P(e,t,r,n),te(t)},Se=n.useRef(!1),ke=(e,t,r="selectOption",n="options")=>{let o=r,a=t;if(M){a=Array.isArray(ee)?ee.slice():[];const e=xr(a,(e=>R(t,e)));-1===e?a.push(t):"freeSolo"!==n&&(a.splice(e,1),o="removeOption")}ie(e,a),Ce(e,a,o,{option:t}),h||e&&(e.ctrlKey||e.metaKey)||Ae(e,o),(!0===s||"touch"===s&&Se.current||"mouse"===s&&!Se.current)&&q.current.blur()},_e=(e,t)=>{if(!M)return;""===re&&Ae(e,"toggleInput");let r=Z;-1===Z?""===re&&"previous"===t&&(r=ee.length-1):(r+="next"===t?1:-1,r<0&&(r=0),r===ee.length&&(r=-1)),r=function(e,t){if(-1===e)return-1;let r=e;for(;;){if("next"===t&&r===ee.length||"previous"===t&&-1===r)return-1;const e=K.querySelector(`[data-tag-index="${r}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return r;r+="next"===t?1:-1}}(r,t),Y(r),ge(r)},Ee=e=>{W.current=!0,ne(""),T&&T(e,"","clear"),Ce(e,M?[]:null,"clear")},je=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==Z&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(Y(-1),ge(-1)),229!==t.which))switch(t.key){case"Home":pe&&k&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":pe&&k&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"ArrowLeft":_e(t,"previous");break;case"ArrowRight":_e(t,"next");break;case"Enter":if(-1!==J.current&&pe){const e=fe[J.current],r=!!w&&w(e);if(t.preventDefault(),r)return;ke(t,e,"selectOption"),o&&q.current.setSelectionRange(q.current.value.length,q.current.value.length)}else x&&""!==re&&!1===de&&(M&&t.preventDefault(),ke(t,re,"createOption","freeSolo"));break;case"Escape":pe?(t.preventDefault(),t.stopPropagation(),Ae(t,"escape")):u&&(""!==re||M&&ee.length>0)&&(t.preventDefault(),t.stopPropagation(),Ee(t));break;case"Backspace":if(M&&!D&&""===re&&ee.length>0){const e=-1===Z?ee.length-1:Z,r=ee.slice();r.splice(e,1),Ce(t,r,"removeOption",{option:ee[e]})}break;case"Delete":if(M&&!D&&""===re&&ee.length>0&&-1!==Z){const e=Z,r=ee.slice();r.splice(e,1),Ce(t,r,"removeOption",{option:ee[e]})}}},Re=e=>{ae(!0),z&&!W.current&&we(e)},Me=e=>{t(G)?q.current.focus():(ae(!1),U.current=!0,W.current=!1,l&&-1!==J.current&&pe?ke(e,fe[J.current],"blur"):l&&x&&""!==re?ke(e,re,"blur","freeSolo"):c&&ie(e,ee),Ae(e,"blur"))},Pe=e=>{const t=e.target.value;re!==t&&(ne(t),ue(!1),T&&T(e,t,"input")),""===t?f||M||Ce(e,null,"clear"):we(e)},Oe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));J.current!==t&&ve({event:e,index:t,reason:"mouse"})},Ie=e=>{ve({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Se.current=!0},Te=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));ke(e,fe[t],"selectOption"),Se.current=!1},$e=e=>t=>{const r=ee.slice();r.splice(e,1),Ce(t,r,"removeOption",{option:ee[e]})},Le=e=>{le?Ae(e,"toggleInput"):we(e)},ze=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==H&&e.preventDefault()},Fe=e=>{e.currentTarget.contains(e.target)&&(q.current.focus(),N&&U.current&&q.current.selectionEnd-q.current.selectionStart==0&&q.current.select(),U.current=!1)},De=e=>{m||""!==re&&le||Le(e)};let Ne=x&&re.length>0;Ne=Ne||(M?ee.length>0:null!==ee);let Be=fe;return S&&(new Map,Be=fe.reduce(((e,t,r)=>{const n=S(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:r,index:r,group:n,options:[t]}),e}),[])),m&&oe&&Me(),{getRootProps:(e={})=>(0,i.A)({"aria-owns":me?`${H}-listbox`:null},e,{onKeyDown:je(e),onMouseDown:ze,onClick:Fe}),getInputLabelProps:()=>({id:`${H}-label`,htmlFor:H}),getInputProps:()=>({id:H,value:re,onBlur:Me,onFocus:Re,onChange:Pe,onMouseDown:De,"aria-activedescendant":pe?"":null,"aria-autocomplete":o?"both":"list","aria-controls":me?`${H}-listbox`:void 0,"aria-expanded":me,autoComplete:"off",ref:q,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ee}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Le}),getTagProps:({index:e})=>(0,i.A)({key:e,"data-tag-index":e,tabIndex:-1},!D&&{onDelete:$e(e)}),getListboxProps:()=>({role:"listbox",id:`${H}-listbox`,"aria-labelledby":`${H}-label`,ref:xe,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{var r;const n=(M?ee:[ee]).some((e=>null!=e&&R(t,e))),o=!!w&&w(t);return{key:null!=(r=null==A?void 0:A(t))?r:V(t),tabIndex:-1,role:"option",id:`${H}-option-${e}`,onMouseMove:Oe,onClick:Te,onTouchStart:Ie,"data-option-index":e,"aria-disabled":o,"aria-selected":n}},id:H,inputValue:re,value:ee,dirty:Ne,expanded:pe&&K,popupOpen:pe,focused:oe||-1!==Z,anchorEl:K,setAnchorEl:X,focusedTag:Z,groupedOptions:Be}}((0,i.A)({},d,{componentName:"Autocomplete"})),je=!_&&!j&&be&&!J,Re=(!T||!0===I)&&!1!==I,{onMouseDown:Me}=ue(),{ref:Pe}=null!=V?V:{},Oe=me(),{ref:Ie}=Oe,Te=(0,l.A)(Oe,Kr),$e=(0,u.A)(Ie,Pe),Le=z||(e=>{var t;return null!=(t=e.label)?t:e}),ze=(0,i.A)({},d,{disablePortal:P,expanded:ye,focused:Ae,fullWidth:$,getOptionLabel:Le,hasClearIcon:je,hasPopupIcon:Re,inputFocused:-1===Ce,popupOpen:we,size:ae}),Fe=(e=>{const{classes:t,disablePortal:r,expanded:n,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:l,inputFocused:s,popupOpen:u,size:d}=e,f={root:["root",n&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",s&&"inputFocused"],tag:["tag",`tagSize${(0,c.A)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,p.A)(f,Vr,t)})(ze);let De;if(q&&ve.length>0){const e=e=>(0,i.A)({className:Fe.tag,disabled:j},he(e));De=ne?ne(ve,e,ze):ve.map(((t,r)=>(0,le.jsx)($r.A,(0,i.A)({label:Le(t),size:ae},e({index:r}),v))))}if(B>-1&&Array.isArray(De)){const e=De.length-B;!Ae&&e>0&&(De=De.splice(0,B),De.push((0,le.jsx)("span",{className:Fe.tag,children:L(e)},De.length)))}const Ne=ee||(e=>(0,le.jsxs)("li",{children:[(0,le.jsx)(an,{className:Fe.groupLabel,ownerState:ze,component:"div",children:e.group}),(0,le.jsx)(ln,{className:Fe.groupUl,ownerState:ze,children:e.children})]},e.key)),Be=re||((e,t)=>(0,n.createElement)("li",(0,i.A)({},e,{key:e.key}),Le(t))),He=(e,t)=>{const r=ge({option:e,index:t});return Be((0,i.A)({},r,{className:Fe.option}),e,{selected:r["aria-selected"],index:t,inputValue:_e},ze)},Ve=null!=(r=ie.clearIndicator)?r:S.clearIndicator,We=null!=(o=ie.paper)?o:S.paper,Ue=null!=(a=ie.popper)?a:S.popper,qe=null!=(s=ie.popupIndicator)?s:S.popupIndicator,Ge=e=>(0,le.jsx)(en,(0,i.A)({as:Y,disablePortal:P,style:{width:Se?Se.clientWidth:null},ownerState:ze,role:"presentation",anchorEl:Se,open:we},Ue,{className:(0,pr.A)(Fe.popper,null==Ue?void 0:Ue.className),children:(0,le.jsx)(tn,(0,i.A)({ownerState:ze,as:Z},We,{className:(0,pr.A)(Fe.paper,null==We?void 0:We.className),children:e}))}));let Ke=null;return!W&&Ee.length>0?Ke=Ge((0,le.jsx)(on,(0,i.A)({as:H,className:Fe.listbox,ownerState:ze},Te,V,{ref:$e,children:Ee.map(((e,t)=>F?Ne({key:e.key,group:e.group,children:e.options.map(((t,r)=>He(t,e.index+r)))}):He(e,t)))}))):W&&0===Ee.length?Ke=Ge((0,le.jsx)(rn,{className:Fe.loading,ownerState:ze,children:U})):0!==Ee.length||T||W||(Ke=Ge((0,le.jsx)(nn,{className:Fe.noOptions,ownerState:ze,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:G}))),(0,le.jsxs)(n.Fragment,{children:[(0,le.jsx)(Zr,(0,i.A)({ref:t,className:(0,pr.A)(Fe.root,b),ownerState:ze},ce(se),{children:te({id:xe,disabled:j,fullWidth:!0,size:"small"===ae?"small":void 0,InputLabelProps:de(),InputProps:(0,i.A)({ref:ke,className:Fe.inputRoot,startAdornment:De,onClick:e=>{e.target===e.currentTarget&&Me(e)}},(je||Re)&&{endAdornment:(0,le.jsxs)(Yr,{className:Fe.endAdornment,ownerState:ze,children:[je?(0,le.jsx)(Qr,(0,i.A)({},fe(),{"aria-label":A,title:A,ownerState:ze},Ve,{className:(0,pr.A)(Fe.clearIndicator,null==Ve?void 0:Ve.className),children:y})):null,Re?(0,le.jsx)(Jr,(0,i.A)({},pe(),{disabled:j,"aria-label":we?C:X,title:we?C:X,ownerState:ze},qe,{className:(0,pr.A)(Fe.popupIndicator,null==qe?void 0:qe.className),children:Q})):null]})}),inputProps:(0,i.A)({className:Fe.input,disabled:j,readOnly:J},ue())})})),Se?Ke:null]})})),cn=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function un(e){const{item:t,applyValue:r,type:o,apiRef:a,focusElementRef:s,color:c,error:u,helperText:d,size:p,variant:f}=e,h=(0,l.A)(e,cn),m={color:c,error:u,helperText:d,size:p,variant:f},[g,v]=n.useState(t.value||[]),b=(0,Gt.A)(),y=(0,N.A)();n.useEffect((()=>{var e;const r=null!=(e=t.value)?e:[];v(r.map(String))}),[t.value]);const x=n.useCallback(((e,n)=>{v(n.map(String)),r((0,i.A)({},t,{value:[...n]}))}),[r,t]);return(0,le.jsx)(sn,(0,i.A)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:r}=t;return null==r||""===r?[]:[r]},id:b,value:g,onChange:x,renderTags:(e,t)=>e.map(((e,r)=>(0,le.jsx)($r.A,(0,i.A)({variant:"outlined",size:"small",label:e},t({index:r}))))),renderInput:e=>{var t;return(0,le.jsx)(y.components.BaseTextField,(0,i.A)({},e,{label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,i.A)({},e.InputLabelProps,{shrink:!0}),inputRef:s,type:o||"text"},m,null==(t=y.componentsProps)?void 0:t.baseTextField))}},h))}const dn={width:100,minWidth:50,maxWidth:1/0,hide:!1,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const r=sr(e,t);return null!==r?r:"string"==typeof e?cr.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(qe(r),"i");return({value:e})=>null!=e&&n.test(e.toString())},InputComponent:er},{value:"equals",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&0===n.compare(r,e.toString())},InputComponent:er},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`^${qe(r)}.*$`,"i");return({value:e})=>null!=e&&n.test(e.toString())},InputComponent:er},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`.*${qe(r)}$`,"i");return({value:e})=>null!=e&&n.test(e.toString())},InputComponent:er},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map((e=>e.trim())),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&r.some((t=>0===n.compare(t,e.toString()||"")))},InputComponent:un}])(),renderEditCell:e=>(0,le.jsx)(nr,(0,i.A)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(qe(e),"i");return({value:e})=>null!=e&&t.test(e.toString())}},pn=e=>null==e?null:Number(e),fn=()=>[{label:"=",value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>pn(t)===e.value,InputComponent:er,InputComponentProps:{type:"number"}},{label:"!=",value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>pn(t)!==e.value,InputComponent:er,InputComponentProps:{type:"number"}},{label:">",value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&pn(t)>e.value,InputComponent:er,InputComponentProps:{type:"number"}},{label:">=",value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&pn(t)>=e.value,InputComponent:er,InputComponentProps:{type:"number"}},{label:"<",value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&pn(t)null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&pn(t)<=e.value,InputComponent:er,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?({value:t})=>null!=t&&e.value.includes(Number(t)):null,InputComponent:un,InputComponentProps:{type:"number"}}],hn=(C(fn),(0,i.A)({},dn,{type:"number",align:"right",headerAlign:"right",sortComparator:ur,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e}(e)?e.toLocaleString():e||"",filterOperators:fn(),getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:({value:t})=>pn(t)===pn(e)})),mn=["item","applyValue","type","apiRef","focusElementRef","InputProps"];function gn(e){var t,r;const{item:o,applyValue:a,type:s,apiRef:c,focusElementRef:u,InputProps:d}=e,p=(0,l.A)(e,mn),f=n.useRef(),[h,m]=n.useState(null!=(t=o.value)?t:""),[g,v]=n.useState(!1),b=(0,Gt.A)(),y=(0,N.A)(),x=n.useCallback((e=>{const t=e.target.value;clearTimeout(f.current),m(String(t)),v(!0),f.current=setTimeout((()=>{a((0,i.A)({},o,{value:t})),v(!1)}),500)}),[a,o]);return n.useEffect((()=>()=>{clearTimeout(f.current)}),[]),n.useEffect((()=>{var e;const t=null!=(e=o.value)?e:"";m(String(t))}),[o.value]),(0,le.jsx)(y.components.BaseTextField,(0,i.A)({id:b,label:c.current.getLocaleText("filterPanelInputLabel"),placeholder:c.current.getLocaleText("filterPanelInputPlaceholder"),value:h,onChange:x,variant:"standard",type:s||"text",InputLabelProps:{shrink:!0},inputRef:u,InputProps:(0,i.A)({},g?{endAdornment:(0,le.jsx)(Ht,{})}:{},d,{inputProps:(0,i.A)({max:"datetime-local"===s?"9999-12-31T23:59":"9999-12-31"},null==d?void 0:d.inputProps)})},p,null==(r=y.componentsProps)?void 0:r.baseTextField))}const vn=/(\d+)-(\d+)-(\d+)/,bn=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function yn(e,t,r,n){if(!e.value)return null;const[o,a,i,l,s]=e.value.match(r?bn:vn).slice(1).map(Number),c=new Date(o,a-1,i,l||0,s||0).getTime();return({value:e})=>{if(!e)return!1;const o=e instanceof Date?e:new Date(e.toString());if(n)return t(o.getTime(),c);const a=(e instanceof Date?new Date(o):o).setHours(r?o.getHours():0,r?o.getMinutes():0,0,0);return t(a,c)}}const xn=e=>[{value:"is",getApplyFilterFn:t=>yn(t,((e,t)=>e===t),e),InputComponent:gn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>yn(t,((e,t)=>e!==t),e),InputComponent:gn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>yn(t,((e,t)=>e>t),e),InputComponent:gn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>yn(t,((e,t)=>e>=t),e),InputComponent:gn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>yn(t,((e,t)=>eyn(t,((e,t)=>e<=t),e),InputComponent:gn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1}],wn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","inputProps","isValidating","isProcessingProps","onValueChange"],An=(0,f.Ay)(St.Ay)({fontSize:"inherit"});function Cn(e){const{id:t,value:r,field:o,colDef:a,hasFocus:s,inputProps:c,onValueChange:u}=e,f=(0,l.A)(e,wn),h="dateTime"===a.type,g=D(),v=n.useRef(),b=n.useMemo((()=>{let e,t;return e=null==r?null:r instanceof Date?r:new Date((null!=r?r:"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,h?16:10),{parsed:e,formatted:t}}),[r,h]),[y,x]=n.useState(b),w=(e=>{const{classes:t}=e;return(0,p.A)({root:["editInputCell"]},m.B,t)})({classes:(0,N.A)().classes}),A=n.useCallback((async e=>{const r=e.target.value;let n;if(""===r)n=null;else{const[e,t]=r.split("T"),[o,a,i]=e.split("-");if(n=new Date,n.setFullYear(Number(o),Number(a)-1,Number(i)),n.setHours(0,0,0,0),t){const[e,r]=t.split(":");n.setHours(Number(e),Number(r),0,0)}}u&&await u(e,n),x({parsed:n,formatted:r}),g.current.setEditCellValue({id:t,field:o,value:n},e)}),[g,o,t,u]);return n.useEffect((()=>{x((e=>{var t,r;return b.parsed!==e.parsed&&(null==(t=b.parsed)?void 0:t.getTime())!==(null==(r=e.parsed)?void 0:r.getTime())?b:e}))}),[b]),(0,d.A)((()=>{s&&v.current.focus()}),[s]),(0,le.jsx)(An,(0,i.A)({inputRef:v,fullWidth:!0,className:w.root,type:h?"datetime-local":"date",inputProps:(0,i.A)({max:h?"9999-12-31T23:59":"9999-12-31"},c),value:y.formatted,onChange:A},f))}const Sn=e=>(0,le.jsx)(Cn,(0,i.A)({},e)),kn=(0,i.A)({},dn,{type:"date",sortComparator:dr,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleDateString():null!=e?e:""},filterOperators:xn(),renderEditCell:Sn,getApplyQuickFilterFn:void 0}),_n=(0,i.A)({},dn,{type:"dateTime",sortComparator:dr,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleString():null!=e?e:""},filterOperators:xn(!0),renderEditCell:Sn,getApplyQuickFilterFn:void 0}),En=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","getValue"],jn=e=>{const{value:t}=e,r=(0,l.A)(e,En),o=D(),a=(0,N.A)(),s=(e=>{const{classes:t}=e;return(0,p.A)({root:["booleanCell"]},m.B,t)})({classes:a.classes}),c=n.useMemo((()=>t?a.components.BooleanCellTrueIcon:a.components.BooleanCellFalseIcon),[a.components.BooleanCellFalseIcon,a.components.BooleanCellTrueIcon,t]);return(0,le.jsx)(c,(0,i.A)({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},r))},Rn=n.memo(jn),Mn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Pn(e){var t;const{id:r,value:o,field:a,className:c,hasFocus:u,onValueChange:f}=e,h=(0,l.A)(e,Mn),g=D(),v=n.useRef(null),b=(0,Gt.A)(),[y,x]=n.useState(o),w=(0,N.A)(),A=(e=>{const{classes:t}=e;return(0,p.A)({root:["editBooleanCell"]},m.B,t)})({classes:w.classes}),C=n.useCallback((async e=>{const t=e.target.checked;f&&await f(e,t),x(t),await g.current.setEditCellValue({id:r,field:a,value:t},e)}),[g,a,r,f]);return n.useEffect((()=>{x(o)}),[o]),(0,d.A)((()=>{u&&v.current.focus()}),[u]),(0,le.jsx)("label",(0,i.A)({htmlFor:b,className:(0,s.A)(A.root,c)},h,{children:(0,le.jsx)(w.components.BaseCheckbox,(0,i.A)({id:b,inputRef:v,checked:Boolean(y),onChange:C,size:"small"},null==(t=w.componentsProps)?void 0:t.baseCheckbox))}))}const On=["item","applyValue","apiRef","focusElementRef"];const In=(0,i.A)({},dn,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>e.rowNode.isAutoGenerated?"":(0,le.jsx)(Rn,(0,i.A)({},e)),renderEditCell:e=>(0,le.jsx)(Pn,(0,i.A)({},e)),sortComparator:ur,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:[{value:"is",getApplyFilterFn:e=>{if(!e.value)return null;const t="true"===e.value;return({value:e})=>Boolean(e)===t},InputComponent:function(e){var t,r,o,a;const{item:s,applyValue:c,apiRef:u,focusElementRef:d}=e,p=(0,l.A)(e,On),[f,h]=n.useState(s.value||""),m=(0,N.A)(),g=null==(r=((null==(t=m.componentsProps)?void 0:t.baseSelect)||{}).native)||r,v=g?"option":Kt.A,b=n.useCallback((e=>{const t=e.target.value;h(t),c((0,i.A)({},s,{value:t}))}),[c,s]);return n.useEffect((()=>{h(s.value||"")}),[s.value]),(0,le.jsxs)(m.components.BaseTextField,(0,i.A)({label:u.current.getLocaleText("filterPanelInputLabel"),value:f,onChange:b,select:!0,variant:"standard",SelectProps:(0,i.A)({native:g,displayEmpty:!0},null==(o=m.componentsProps)?void 0:o.baseSelect),InputLabelProps:{shrink:!0},inputRef:d},p,null==(a=m.componentsProps)?void 0:a.baseTextField,{children:[(0,le.jsx)(v,{value:"",children:u.current.getLocaleText("filterValueAny")}),(0,le.jsx)(v,{value:"true",children:u.current.getLocaleText("filterValueTrue")}),(0,le.jsx)(v,{value:"false",children:u.current.getLocaleText("filterValueFalse")})]}))}}],getApplyQuickFilterFn:void 0,aggregable:!1}),Tn=e=>"Escape"===e,$n=e=>"Enter"===e,Ln=e=>"Tab"===e,zn=e=>" "===e,Fn=e=>"Delete"===e||"Backspace"===e;function Dn(e){return 1===e.key.length&&!1===e.ctrlKey&&!1===e.metaKey}const Nn=["Enter","Escape","Tab"],Bn=["Enter","Tab"],Hn=e=>Bn.indexOf(e)>-1,Vn=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||zn(e),Wn=e=>!!e.key;var Un,qn,Gn;!function(e){e.Cell="cell",e.Row="row"}(Un||(Un={})),function(e){e.Edit="edit",e.View="view"}(qn||(qn={})),function(e){e.Edit="edit",e.View="view"}(Gn||(Gn={}));const Kn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"];function Xn(e){var t,r,o;const a=(0,N.A)(),{id:s,value:c,api:u,field:p,row:f,colDef:h,hasFocus:m,error:g,onValueChange:v,initialOpen:b=a.editMode===Un.Cell}=e,y=(0,l.A)(e,Kn),x=D(),w=n.useRef(),A=n.useRef(),[C,S]=n.useState(b),k=null!=(r=((null==(t=a.componentsProps)?void 0:t.baseSelect)||{}).native)&&r;let _;return _="function"==typeof h.valueOptions?h.valueOptions({id:s,row:f,field:p}):h.valueOptions,h.valueFormatter&&(_=_.map((e=>{if("object"==typeof e)return e;const t={field:p,api:u,value:e};return{value:e,label:String(h.valueFormatter(t))}}))),(0,d.A)((()=>{m&&A.current.focus()}),[m]),(0,le.jsx)(a.components.BaseSelect,(0,i.A)({ref:w,inputRef:A,value:c,onChange:async e=>{var t;S(!1);const r=Zt(e.target.value,_);v&&await v(e,r);const n=await x.current.setEditCellValue({id:s,field:p,value:r},e);if((null==(t=a.experimentalFeatures)||!t.newEditingApi)&&a.editMode!==Un.Row&&!1!==n&&await Promise.resolve(x.current.commitCellChange({id:s,field:p},e))&&(x.current.setCellMode(s,p,"view"),e.key)){const t=x.current.getCellParams(s,p);x.current.publishEvent("cellNavigationKeyDown",t,e)}},open:C,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||S(!0)},MenuProps:{onClose:(e,t)=>{var r;a.editMode!==Un.Row?("backdropClick"===t||Tn(e.key))&&(null!=(r=a.experimentalFeatures)&&r.newEditingApi?x.current.stopCellEditMode({id:s,field:p,ignoreModifications:!0}):x.current.setCellMode(s,p,"view")):S(!1)}},error:g,native:k,fullWidth:!0},y,null==(o=a.componentsProps)?void 0:o.baseSelect,{children:_.map((e=>((e,t)=>{const r="object"==typeof e,n=r?e.value:e,o=r?e.value:e,a=r?e.label:e;return(0,le.jsx)(t,{value:o,children:a},n)})(e,k?"option":Kt.A)))}))}const Zn=["item","applyValue","type","apiRef","focusElementRef"],Yn=({valueOptions:e,valueFormatter:t,field:r},n,o)=>("function"==typeof e?["",...e({field:r})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,l=a?e.value:e,s=t&&""!==e?t({value:e,field:r,api:n}):e,c=a?e.label:s;return(0,le.jsx)(o,{value:l,children:c},i)}));function Qn(e){var t,r,o,a,s;const{item:c,applyValue:u,type:d,apiRef:p,focusElementRef:f}=e,h=(0,l.A)(e,Zn),[m,g]=n.useState(null!=(t=c.value)?t:""),v=(0,Gt.A)(),b=(0,N.A)(),y=null==(o=((null==(r=b.componentsProps)?void 0:r.baseSelect)||{}).native)||o,x=c.columnField?p.current.getColumn(c.columnField):null,w=n.useMemo((()=>{if(null!==x)return"function"==typeof x.valueOptions?x.valueOptions({field:x.field}):x.valueOptions}),[x]),A=n.useCallback((e=>{let t=e.target.value;t=Zt(t,w),g(String(t)),u((0,i.A)({},c,{value:t}))}),[u,c,w]);return n.useEffect((()=>{var e;let t;if(void 0!==w){if(t=Zt(c.value,w),t!==c.value)return void u((0,i.A)({},c,{value:t}))}else t=c.value;t=null!=(e=t)?e:"",g(String(t))}),[c,w,u]),(0,le.jsx)(b.components.BaseTextField,(0,i.A)({id:v,label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),value:m,onChange:A,variant:"standard",type:d||"text",InputLabelProps:{shrink:!0},inputRef:f,select:!0,SelectProps:(0,i.A)({native:y},null==(a=b.componentsProps)?void 0:a.baseSelect)},h,null==(s=b.componentsProps)?void 0:s.baseTextField,{children:Yn(p.current.getColumn(c.columnField),p.current,y?"option":Kt.A)}))}const Jn=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],eo=(e,t)=>Xt(e)===Xt(t),to=yr();const ro=e=>null==e||"object"!=typeof e?e:e.value,no=(0,i.A)({},dn,{type:"singleSelect",renderEditCell:e=>(0,le.jsx)(Xn,(0,i.A)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>ro(t)===ro(e.value),InputComponent:Qn},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>ro(t)!==ro(e.value),InputComponent:Qn},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(ro);return({value:e})=>t.includes(ro(e))},InputComponent:function(e){const{item:t,applyValue:r,apiRef:o,focusElementRef:a,color:s,error:c,helperText:u,size:d,variant:p="standard"}=e,f=(0,l.A)(e,Jn),h={color:s,error:c,helperText:u,size:d,variant:p},m=(0,Gt.A)(),g=(0,N.A)(),v=t.columnField?o.current.getColumn(t.columnField):null,b=n.useMemo((()=>null!=v&&v.valueOptions?"function"==typeof v.valueOptions?v.valueOptions({field:v.field}):v.valueOptions:[]),[v]),y=n.useMemo((()=>null==b?void 0:b.map(Xt)),[b]),{valueFormatter:x,field:w}=o.current.getColumn(t.columnField),A=e=>"object"==typeof e?e.label:x&&""!==e?x({value:e,field:w,api:o.current}):e,C=n.useMemo((()=>Array.isArray(t.value)?void 0!==b?t.value.map((e=>{const t=Xt(e);return(null==y?void 0:y.findIndex((e=>e===t)))||0})).filter((e=>e>=0)).map((e=>b[e])):t.value:[]),[t.value,b,y]);n.useEffect((()=>{Array.isArray(t.value)&&C.length===t.value.length||r((0,i.A)({},t,{value:C.map(Xt)}))}),[t,C,r]);const S=n.useCallback(((e,n)=>{r((0,i.A)({},t,{value:[...n.map(Xt)]}))}),[r,t]);return(0,le.jsx)(sn,(0,i.A)({multiple:!0,options:b,isOptionEqualToValue:eo,filterOptions:to,id:m,value:C,onChange:S,renderTags:(e,t)=>e.map(((e,r)=>(0,le.jsx)($r.A,(0,i.A)({variant:"outlined",size:"small",label:A(e)},t({index:r}))))),renderInput:e=>{var t;return(0,le.jsx)(g.components.BaseTextField,(0,i.A)({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,i.A)({},e.InputLabelProps,{shrink:!0}),inputRef:a,type:"singleSelect"},h,null==(t=g.componentsProps)?void 0:t.baseTextField))}},f))}}],getApplyQuickFilterFn:(e,t,r)=>{if(!e)return null;const{valueOptions:n,valueFormatter:o,field:a}=t,i=[ro(e).toString()],l="function"==typeof n?n({field:a}):n||[];return l&&l.forEach((t=>{let n,l;"object"==typeof t?(n=t.value,l=t.label):(n=t,l=o?o({value:t,field:a,api:r.current}):t),l.slice(0,e.length).toLowerCase()===e.toLowerCase()&&(i.includes(n)||i.push(n.toString()))})),({value:e})=>null!=e&&i.includes(ro(e).toString())}});var oo=r(88116),ao=r(84475),io=r(87467);const lo=["open","target","onClickAway","children","position","className","onExited"],so=(0,f.Ay)(Sr.A,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((({theme:e})=>({zIndex:e.zIndex.modal,[`& .${m.x.menuList}`]:{outline:0}}))),co={"bottom-start":"top left","bottom-end":"top right"},uo=e=>{var t;const{open:r,target:o,onClickAway:a,children:c,position:u,className:d,onExited:f}=e,h=(0,l.A)(e,lo),g=D(),v=n.useRef(o),b=n.useRef(r),y=(0,N.A)(),x=(e=>{const{classes:t}=e;return(0,p.A)({root:["menu"]},m.B,t)})(y);return n.useEffect((()=>{b.current&&v.current&&v.current.focus();const e=r?"menuOpen":"menuClose";g.current.publishEvent(e,{target:o}),b.current=r,v.current=o}),[g,r,o]),(0,le.jsx)(so,(0,i.A)({as:y.components.BasePopper,className:(0,s.A)(d,x.root),ownerState:y,open:r,anchorEl:o,transition:!0,placement:u},h,null==(t=y.componentsProps)?void 0:t.basePopper,{children:({TransitionProps:e,placement:t})=>{return(0,le.jsx)(ao.x,{onClickAway:a,mouseEvent:"onMouseDown",children:(0,le.jsx)(io.A,(0,i.A)({},e,{style:{transformOrigin:co[t]},onExited:(r=null==e?void 0:e.onExited,e=>{r&&r(),f&&f(e)}),children:(0,le.jsx)(Ir.A,{children:c})}))});var r}}))},po=["colDef","id","api","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","getValue","tabIndex","position","focusElementRef"],fo=e=>{const{colDef:t,id:r,hasFocus:o,tabIndex:a,position:s="bottom-end",focusElementRef:c}=e,u=(0,l.A)(e,po),[d,p]=n.useState(-1),[f,h]=n.useState(!1),g=D(),v=n.useRef(null),b=n.useRef(null),y=n.useRef(!1),x=n.useRef({}),w=(0,Gt.A)(),A=(0,Gt.A)(),C=(0,N.A)();if(n.useLayoutEffect((()=>{o||Object.entries(x.current).forEach((([e,t])=>{null==t||t.stop({},(()=>{delete x.current[e]}))}))}),[o]),n.useEffect((()=>{d<0||!v.current||d>=v.current.children.length||v.current.children[d].focus({preventScroll:!0})}),[d]),n.useEffect((()=>{o||(p(-1),y.current=!1)}),[o]),n.useImperativeHandle(c,(()=>({focus(){y.current||p(0)}})),[]),!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const S=t.getActions(g.current.getRowParams(r)),k=S.filter((e=>!e.props.showInMenu)),_=S.filter((e=>e.props.showInMenu)),E=k.length+(_.length?1:0);n.useEffect((()=>{d>=E&&p(E-1)}),[d,E]);const j=()=>{h(!1)},R=e=>t=>{x.current[e]=t},M=(e,t)=>r=>{p(e),y.current=!0,t&&t(r)};return(0,le.jsxs)("div",(0,i.A)({role:"menu",ref:v,tabIndex:-1,className:m.x.actionsCell,onKeyDown:e=>{if(E<=1)return;let t=d;"ArrowRight"===e.key?t+=1:"ArrowLeft"===e.key&&(t-=1),t<0||t>=E||t!==d&&(e.preventDefault(),e.stopPropagation(),p(t))}},u,{children:[k.map(((e,t)=>n.cloneElement(e,{key:t,touchRippleRef:R(t),onClick:M(t,e.props.onClick),tabIndex:d===t?a:-1}))),_.length>0&&A&&(0,le.jsx)(Tr.A,{ref:b,id:A,"aria-label":g.current.getLocaleText("actionsCellMore"),"aria-controls":w,"aria-expanded":f?"true":void 0,"aria-haspopup":"true",role:"menuitem",size:"small",onClick:()=>{h(!0),p(E-1),y.current=!0},touchRippleRef:R(A),tabIndex:d===k.length?a:-1,children:(0,le.jsx)(C.components.MoreActionsIcon,{fontSize:"small"})}),_.length>0&&(0,le.jsx)(uo,{onClickAway:j,onClick:j,open:f,target:b.current,position:s,children:(0,le.jsx)(oo.A,{id:w,className:m.x.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Enter","Escape"].includes(e.key)&&j()},"aria-labelledby":A,variant:"menu",autoFocusItem:!0,children:_.map(((e,t)=>n.cloneElement(e,{key:t})))})})]}))},ho="actions",mo=(0,i.A)({},dn,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,le.jsx)(fo,(0,i.A)({},e)),getApplyQuickFilterFn:void 0}),go="__default__",vo=["maxWidth","minWidth","width","flex"],bo=(e={})=>{const t=(0,i.A)({},{string:dn,number:hn,date:kn,dateTime:_n,boolean:In,singleSelect:no,[ho]:mo,[go]:dn});return Object.entries(e).forEach((([e,r])=>{t[e]?t[e]=(0,i.A)({},t[e],r):t[e]=(0,i.A)({},t[r.extendType||go],r)})),t},yo=(e,t)=>{const r={};let n=0,o=0;const a=[];e.all.forEach((t=>{const l=(0,i.A)({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])l.computedWidth=0;else{let e;l.flex&&l.flex>0?(n+=l.flex,e=0,a.push(l)):e=Ge(l.width,l.minWidth,l.maxWidth),o+=e,l.computedWidth=e}r[t]=l}));const l=Math.max(t-o,0);if(n>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const n={all:{},frozenFields:[],freeze:e=>{const t=n.all[e];t&&!0!==t.frozen&&(n.all[e].frozen=!0,n.frozenFields.push(e))}};return function o(){if(n.frozenFields.length===r.length)return;const a={min:{},max:{}};let i=e,l=t,s=0;n.frozenFields.forEach((e=>{i-=n.all[e].computedWidth,l-=n.all[e].flex}));for(let e=0;et.maxWidth&&(s+=t.maxWidth-o,o=t.maxWidth,a.max[t.field]=!0),n.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}s<0?Object.keys(a.max).forEach((e=>{n.freeze(e)})):s>0?Object.keys(a.min).forEach((e=>{n.freeze(e)})):r.forEach((({field:e})=>{n.freeze(e)})),o()}(),n.all}({initialFreeSpace:l,totalFlexUnits:n,flexColumns:a});Object.keys(e).forEach((t=>{r[t].computedWidth=e[t].computedWidth}))}return(0,i.A)({},e,{lookup:r})},xo=({apiRef:e,columnsToUpsert:t,initialState:r,columnTypes:n,currentColumnVisibilityModel:o=M(e),shouldRegenColumnVisibilityModelFromColumns:a,keepOnlyColumnsToUpsert:l=!1})=>{var s,c,u,d;const p=!e.current.state.columns;let f;if(p)f={all:[],lookup:{}};else{const t=_(e.current.state);f={all:l?[]:[...t.all],lookup:(0,i.A)({},t.lookup)}}let h={};l&&!p&&(h=Object.keys(f.lookup).reduce(((e,t)=>(0,i.A)({},e,{[t]:!1})),{}));const m={};t.forEach((e=>{const{field:t}=e;m[t]=!0,h[t]=!0;let r=f.lookup[t];null==r?(r=(0,i.A)({},((e,t)=>t&&e[t]?e[t]:e[go])(n,e.type),{field:t,hasBeenResized:!1}),f.all.push(t)):l&&f.all.push(t);let o=r.hasBeenResized;vo.forEach((t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))})),f.lookup[t]=(0,i.A)({},r,{hide:null!=e.hide&&e.hide},e,{hasBeenResized:o})})),l&&!p&&Object.keys(f.lookup).forEach((e=>{h[e]||delete f.lookup[e]}));const g=(0,i.A)({},f.lookup),v=e.current.unstable_applyPipeProcessors("hydrateColumns",f);let b={};if(a){let t=!1;const r=(0,i.A)({},o);p?v.all.forEach((e=>{r[e]=!f.lookup[e].hide})):l&&Object.keys(r).forEach((e=>{v.lookup[e]||(delete r[e],t=!0)})),v.all.forEach((n=>{if(!m[n]&&g[n]===v.lookup[n])return;let a=o[n];void 0===a&&(a=!!p||!!_(e.current.state).lookup[n]);const i=!v.lookup[n].hide;i!==a&&(t=!0,r[n]=i)})),b=t||p?r:o}else b=o;const y=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:n={}}=t,o=Object.keys(n);if(0===o.length&&0===r.length)return e;const a={},l=[];for(let t=0;t!a[e]))],c=(0,i.A)({},e.lookup);for(let e=0;e{r[e]=-1===t?1/0:t})),c[t]=r}return{all:s,lookup:c}})(v,r),x=(0,i.A)({},y,{columnVisibilityModel:b});return yo(x,null!=(s=null==(c=(u=e.current).getRootDimensions)||null==(d=c.call(u))?void 0:d.viewportInnerSize.width)?s:0)},wo=e=>t=>(0,i.A)({},t,{columns:e});function Ao({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:n,visibleRows:o}){let a=e;for(let i=r;i{var n,o,a,l,s,c,u;const d=!!t.columnVisibilityModel||!(null==(n=t.initialState)||null==(o=n.columns)||!o.columnVisibilityModel);r.current.unstable_caches.columns={isUsingColumnVisibilityModel:d};const p=bo(t.columnTypes),f=xo({apiRef:r,columnTypes:p,columnsToUpsert:t.columns,initialState:null==(a=t.initialState)?void 0:a.columns,shouldRegenColumnVisibilityModelFromColumns:!d,currentColumnVisibilityModel:null!=(l=null!=(s=t.columnVisibilityModel)?s:null==(c=t.initialState)||null==(u=c.columns)?void 0:u.columnVisibilityModel)?l:{},keepOnlyColumnsToUpsert:!0});return(0,i.A)({},e,{columns:f})};var _o;function Eo(e){return void 0!==e.field}!function(e){e.Compact="compact",e.Standard="standard",e.Comfortable="comfortable"}(_o||(_o={}));const jo=k((e=>e.columnGrouping),(e=>e.lookup)),Ro=["groupId","children"],Mo=(e,t,r)=>{if(Eo(e)){if(void 0!==r[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurrs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:n,children:o}=e;o.forEach((e=>{Mo(e,[...t,n],r)}))},Po=e=>{if(!e)return{};const t={};return e.forEach((e=>{Mo(e,[],t)})),t},Oo=e=>{let t={};return e.forEach((e=>{if(Eo(e))return;const{groupId:r,children:n}=e,o=(0,l.A)(e,Ro);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");n||console.warn(`MUI: group groupId=${r} has no children.`);const a=(0,i.A)({},o,{groupId:r}),s=Oo(n);if(void 0!==s[r]||void 0!==t[r])throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=(0,i.A)({},t,s,{[r]:a})})),(0,i.A)({},t)},Io=(e,t)=>{var r;const n=Oo(null!=(r=t.columnGroupingModel)?r:[]);return(0,i.A)({},e,{columnGrouping:{lookup:n,groupCollapsedModel:{}}})},To=(e,t,r,n)=>{switch(e){case _o.Compact:return{value:e,headerHeight:Math.floor(.7*t),rowHeight:Math.floor(.7*r),headerGroupingMaxDepth:n,factor:.7};case _o.Comfortable:return{value:e,headerHeight:Math.floor(1.3*t),rowHeight:Math.floor(1.3*r),headerGroupingMaxDepth:n,factor:1.3};default:return{value:e,headerHeight:t,rowHeight:r,headerGroupingMaxDepth:n,factor:1}}},$o=(e,t)=>{let r;if(null==t.columnGroupingModel||0===Object.keys(t.columnGroupingModel).length)r=0;else{const n=Po(t.columnGroupingModel),o=e.columns,a=o.all.filter((e=>!1!==o.columnVisibilityModel[e]));r=0===a.length?0:Math.max(...a.map((e=>{var t,r;return null!=(t=null==(r=n[e])?void 0:r.length)?t:0})))}return(0,i.A)({},e,{density:To(t.density,t.headerHeight,t.rowHeight,r)})},Lo=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","getValue","api"],zo=n.forwardRef((function(e,t){var r;const{field:o,id:a,value:s,rowNode:c,hasFocus:d,tabIndex:f}=e,h=(0,l.A)(e,Lo),g=D(),v=(0,N.A)(),b=(e=>{const{classes:t}=e;return(0,p.A)({root:["checkboxInput"]},m.B,t)})({classes:v.classes}),y=n.useRef(null),x=n.useRef(),w=(0,u.A)(y,t),A=g.current.getCellElement(a,o);n.useLayoutEffect((()=>{0===f&&A&&(A.tabIndex=-1)}),[A,f]),n.useEffect((()=>{if(d){var e;const t=null==(e=y.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else x.current&&x.current.stop({})}),[d]);const C=n.useCallback((t=>{zn(t.key)&&t.stopPropagation(),Vn(t.key)&&!t.shiftKey&&g.current.publishEvent("cellNavigationKeyDown",e,t)}),[g,e]);if("footer"===c.position)return null;const S=g.current.isRowSelectable(a),k=g.current.getLocaleText(s?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return c.isPinned?null:(0,le.jsx)(v.components.BaseCheckbox,(0,i.A)({ref:w,tabIndex:f,checked:s,onChange:e=>{const t={value:e.target.checked,id:a};g.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:b.root,inputProps:{"aria-label":k},onKeyDown:C,disabled:!S,touchRippleRef:x},null==(r=v.componentsProps)?void 0:r.baseCheckbox,h))})),Fo=e=>e.focus,Do=k(Fo,(e=>e.cell)),No=k(Fo,(e=>e.columnHeader)),Bo=e=>e.tabIndex,Ho=k(Bo,(e=>e.cell)),Vo=k(Bo,(e=>e.columnHeader)),Wo=e=>e.selection,Uo=k(Wo,(e=>e.length)),qo=k(Wo,Q,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),Go=k(Wo,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{}))),Ko=e=>e.pagination,Xo=k(Ko,(e=>e.page)),Zo=k(Ko,(e=>e.pageSize)),Yo=(k(Ko,(e=>e.pageCount)),k(Ko,ee,re,Me,Te,((e,t,r,n,o)=>{const a=o.length,i=Math.min(e.pageSize*e.page,a-1),l=Math.min(i+e.pageSize-1,a-1);if(-1===i||-1===l)return null;if(r<2)return{firstRowIndex:i,lastRowIndex:l};const s=o[i],c=l-i+1,u=n.findIndex((e=>e.id===s.id));let d=u,p=0;for(;d0)&&(d+=1),0===e&&(p+=1)}return{firstRowIndex:u,lastRowIndex:d-1}}))),Qo=k(Me,Yo,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),Jo=k(Pe,Yo,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),ea=["field","colDef"],ta=n.forwardRef((function(e,t){var r;const o=(0,l.A)(e,ea),[,a]=n.useState(!1),s=D(),c=(0,N.A)(),u=(e=>{const{classes:t}=e;return(0,p.A)({root:["checkboxInput"]},m.B,t)})({classes:c.classes}),d=z(s,Vo),f=z(s,Wo),h=z(s,Pe),g=z(s,Jo),v=n.useMemo((()=>"function"!=typeof c.isRowSelectable?f:f.filter((e=>!!s.current.getRow(e)&&c.isRowSelectable(s.current.getRowParams(e))))),[s,c.isRowSelectable,f]),b=n.useMemo((()=>(c.pagination&&c.checkboxSelectionVisibleOnly?g:h).reduce(((e,t)=>(e[t]=!0,e)),{})),[c.pagination,c.checkboxSelectionVisibleOnly,g,h]),y=n.useMemo((()=>v.filter((e=>b[e])).length),[v,b]),x=y>0&&y0,A=null!==d&&d.field===e.field?0:-1;n.useLayoutEffect((()=>{const t=s.current.getColumnHeaderElement(e.field);0===A&&t&&(t.tabIndex=-1)}),[A,s,e.field]);const C=n.useCallback((t=>{" "===t.key&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!w}),Vn(t.key)&&!t.shiftKey&&s.current.publishEvent("columnHeaderNavigationKeyDown",e,t)}),[s,e,w]),S=n.useCallback((()=>{a((e=>!e))}),[]);n.useEffect((()=>s.current.subscribeEvent("selectionChange",S)),[s,S]);const k=s.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,le.jsx)(c.components.BaseCheckbox,(0,i.A)({ref:t,indeterminate:x,checked:w,onChange:e=>{const t={value:e.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",t)},className:u.root,inputProps:{"aria-label":k},tabIndex:A,onKeyDown:C},null==(r=c.componentsProps)?void 0:r.baseCheckbox,o))})),ra="__check__",na=(0,i.A)({},In,{field:ra,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,valueGetter:e=>void 0!==Go(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>(0,le.jsx)(ta,(0,i.A)({},e)),renderCell:e=>(0,le.jsx)(zo,(0,i.A)({},e))}),oa=(e,t)=>{if("string"==typeof e){const r=e.replace(/"/g,'""');return[t,"\n","\r"].some((e=>r.includes(e)))?`"${r}"`:r}return e};A(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);const aa=({apiRef:e,options:t})=>{const r=R(e);return t.fields?t.fields.map((e=>r.find((t=>t.field===e)))).filter((e=>!!e)):(t.allColumns?r:P(e)).filter((e=>!e.disableExport))},ia=({apiRef:e})=>{var t,r;const n=Ie(e),o=ee(e),a=e.current.getSelectedRows(),i=n.filter((e=>{var t;return"body"===(null!=(t=o[e].position)?t:"body")})),l=ae(e),s=(null==l||null==(t=l.top)?void 0:t.map((e=>e.id)))||[],c=(null==l||null==(r=l.bottom)?void 0:r.map((e=>e.id)))||[];return i.unshift(...s),i.push(...c),a.size>0?i.filter((e=>a.has(e))):i},la=["hideMenu","options"],sa=["hideMenu","options"],ca=e=>{const t=D(),{hideMenu:r,options:n}=e,o=(0,l.A)(e,la);return(0,le.jsx)(Kt.A,(0,i.A)({onClick:()=>{t.current.exportDataAsCsv(n),null==r||r()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))},ua=e=>{const t=D(),{hideMenu:r,options:n}=e,o=(0,l.A)(e,sa);return(0,le.jsx)(Kt.A,(0,i.A)({onClick:()=>{t.current.exportDataAsPrint(n),null==r||r()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))},da=e=>{const t=ue(e,"useGridCsvExport"),r=n.useCallback(((r={})=>{var n,o;return t.debug("Get data as CSV"),function(e){const{columns:t,rowIds:r,getCellParams:n,delimiterCharacter:o,includeHeaders:a}=e,i=r.reduce(((e,r)=>`${e}${((e,t,r,n)=>t.map((t=>{const o=r(e,t.field);return oa(o.formattedValue,n)})))(r,t,n,o).join(o)}\r\n`),"").trim();return a?`${t.filter((e=>e.field!==na.field)).map((e=>oa(e.headerName||e.field,o))).join(o)}\r\n${i}`.trim():i}({columns:aa({apiRef:e,options:r}),rowIds:(null!=(n=r.getRowsToExport)?n:ia)({apiRef:e}),getCellParams:e.current.getCellParams,delimiterCharacter:r.delimiter||",",includeHeaders:null==(o=r.includeHeaders)||o})}),[t,e]),o=n.useCallback((e=>{t.debug("Export data as CSV");const n=r(e);!function(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",n],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[t,r]);tt(e,{getDataAsCsv:r,exportDataAsCsv:o});const a=n.useCallback(((e,t)=>{var r;return null!=(r=t.csvOptions)&&r.disableToolbarButton?e:[...e,{component:(0,le.jsx)(ca,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);At(e,"exportMenu",a)};var pa=r(96248);const fa=e=>e.rowsMeta,ha="client";var ma;!function(e){e.And="and",e.Or="or"}(ma||(ma={}));const ga=()=>({items:[],linkOperator:ma.And,quickFilterValues:[],quickFilterLogicOperator:ma.And}),va=(e,t,r,o)=>{const a=n.useCallback((()=>{e.current.unstable_registerStrategyProcessor(t,r,o)}),[e,o,r,t]);wt((()=>{a()}));const i=n.useRef(!0);n.useEffect((()=>{i.current?i.current=!1:a()}),[a])},ba=(e,t)=>{const r=(0,i.A)({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operatorValue){const e=j(t)[r.columnField];r.operatorValue=e&&e.filterOperators[0].value}return r},ya=A(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),xa=A("MUI: The 'id' field is required on `filterModel.items` when you use multiple filters.","error"),wa=A(["MUI: One of your filtering item have no `operatorValue` provided.","This property will become required on `@mui/x-data-grid@6.X`."]),Aa=(e,t,r)=>{const n=e.items.length>1;let o;n&&t?(ya(),o=[e.items[0]]):o=e.items;const a=n&&o.some((e=>null==e.id)),l=o.some((e=>null==e.operatorValue));return a&&xa(),l&&wa(),l||a?(0,i.A)({},e,{items:o.map((e=>ba(e,r)))}):e.items!==o?(0,i.A)({},e,{items:o}):e},Ca=(e,t,r)=>n=>(0,i.A)({},n,{filterModel:Aa(e,t,r)}),Sa=(e,t)=>{if(!e.columnField||!e.operatorValue)return null;const r=t.current.getColumn(e.columnField);if(!r)return null;let n;if(r.valueParser){var o;const t=r.valueParser;n=Array.isArray(e.value)?null==(o=e.value)?void 0:o.map((e=>t(e))):t(e.value)}else n=e.value;const a=(0,i.A)({},e,{value:n}),l=r.filterOperators;if(null==l||!l.length)throw new Error(`MUI: No filter operators found for column '${r.field}'.`);const s=l.find((e=>e.value===a.operatorValue));if(!s)throw new Error(`MUI: No filter operator found for column '${r.field}' and operator value '${a.operatorValue}'.`);const c=s.getApplyFilterFn(a,r);return"function"!=typeof c?null:{fn:e=>{const r=t.current.getCellParams(e,a.columnField);return c(r)},item:a}},ka=(e,t,r,n)=>{var o,a;const i=r.items.filter((e=>null!==Sa(e,n))),l=e.filter((e=>null!=e)),s=t.filter((e=>null!=e)),c=null!=(o=r.quickFilterLogicOperator)?o:ga().quickFilterLogicOperator,u=null!=(a=r.linkOperator)?a:ga().linkOperator;if(l.length>0){const e=e=>l.some((t=>t[e.id]));if(u===ma.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(s.length>0&&null!=r.quickFilterValues){const e=e=>s.some((t=>t[e]));if(c===ma.And){if(!r.quickFilterValues.every(e))return!1}else if(!r.quickFilterValues.some(e))return!1}return!0},_a=(e,t,r)=>{var n,o,a,l;const s=null!=(n=null!=(o=t.filterModel)?o:null==(a=t.initialState)||null==(l=a.filter)?void 0:l.filterModel)?n:ga();return(0,i.A)({},e,{filter:{filterModel:Aa(s,t.disableMultipleColumnsFiltering,r),visibleRowsLookup:{},filteredDescendantCountLookup:{}}})},Ea=(e,t)=>{let r,n;return t.pagination&&"client"===t.paginationMode?(n=Yo(e),r=Qo(e)):(r=Me(e),n=0===r.length?null:{firstRowIndex:0,lastRowIndex:r.length-1}),{rows:r,range:n}},ja=(e,t)=>{const r=Ea(e,t);return n.useMemo((()=>({rows:r.rows,range:r.range})),[r.rows,r.range])},Ra=e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null},tabIndex:{cell:null,columnHeader:null}}),Ma="__detail_panel_toggle__",Pa=["rowsBeforePartialUpdates"],Oa=(e,t,r)=>{const n=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}(n,e,r),n},Ia=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:n,idRowsLookup:{},idToIdLookup:{},ids:[]};for(let r=0;r{const o=e.current.unstable_caches.rows,a=(0,l.A)(o,Pa),s=null!=r?r:0,c=e.current.unstable_applyStrategyProcessor("rowTreeCreation",(0,i.A)({},a,{previousTree:t})),u=e.current.unstable_applyPipeProcessors("hydrateRows",c),d=1===u.treeDepth?u.ids.length:Object.values(u.tree).filter((e=>null==e.parent&&!e.isPinned)).length;return(0,i.A)({},u,{groupingResponseBeforeRowHydration:c,loading:n,totalRowCount:Math.max(s,u.ids.length),totalTopLevelRowCount:Math.max(s,d)})},$a=(e,t,r)=>{var n;const o=null==(n=e[t])?void 0:n.children;if(null==o)return[];const a=[];for(let t=0;tt+e.current.unstable_getRowHeight(r.id)),0))||0,bottom:(null==n||null==(r=n.bottom)?void 0:r.reduce(((t,r)=>t+e.current.unstable_getRowHeight(r.id)),0))||0}}const za=e=>e?0:100,Fa=e=>t=>(0,i.A)({},t,{pagination:(0,i.A)({},t.pagination,{pageSize:e})}),Da=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,Na=e=>e.pageCount?(0,i.A)({},e,{page:Math.max(Math.min(e.page,e.pageCount-1),0)}):e,Ba=e=>t=>(0,i.A)({},t,{pagination:Na((0,i.A)({},t.pagination,{page:e}))}),Ha=(A(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),(e,t)=>{var r,n,o,a,l,s,c,u;let d;return d=null!=t.pageSize?t.pageSize:null!=(null==(r=t.initialState)||null==(n=r.pagination)?void 0:n.pageSize)?t.initialState.pagination.pageSize:za(t.autoPageSize),(0,i.A)({},e,{pagination:{pageSize:d,page:null!=(o=null!=(a=t.page)?a:null==(l=t.initialState)||null==(s=l.pagination)?void 0:s.page)?o:0,pageCount:Da(null!=(c=t.rowCount)?c:0,d),rowCount:null!=(u=t.rowCount)?u:0}})}),Va=e=>e.preferencePanel,Wa=(e,t)=>{var r,n;return(0,i.A)({},e,{preferencePanel:null!=(r=null==(n=t.initialState)?void 0:n.preferencePanel)?r:{open:!1}})},Ua=e=>e.editRows;function qa(e){return"function"==typeof e.then}const Ga=e=>(0,i.A)({},e,{editRows:{}});function Ka(e,t){var r;const o=ue(e,"useGridEditRows");((e,t)=>{var r;const o=ue(e,"useGridEditRows"),a=e=>(...r)=>{t.editMode===Un.Cell&&e(...r)},l=n.useCallback(((t,r,n)=>{e.current.getCellMode(t,r)!==n&&(o.debug(`Switching cell id: ${t} field: ${r} to mode: ${n}`),e.current.setState((o=>{const a=(0,i.A)({},o.editRows);return a[t]=(0,i.A)({},a[t]),n===qn.Edit?a[t][r]={value:e.current.getCellValue(t,r)}:(delete a[t][r],Object.keys(a[t]).length||delete a[t]),(0,i.A)({},o,{editRows:a})})),e.current.forceUpdate(),e.current.publishEvent("cellModeChange",e.current.getCellParams(t,r)))}),[e,o]),s=n.useCallback(((t,r)=>{const n=Ua(e.current.state);return n[t]&&n[t][r]?qn.Edit:qn.View}),[e]),c=n.useCallback(((r,n={})=>{var o;const{id:a,field:l}=r;e.current.unstable_runPendingEditCellValueMutation(a,l);const s=e.current.getEditRowsModel();if(!s[a]||!s[a][l])throw new Error(`MUI: Cell at id: ${a} and field: ${l} is not in edit mode.`);const c=s[a][l],u=e.current.getColumn(l),d=e.current.getRow(a);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating){const e=s[a][l];if(e.isValidating||e.error)return!1}const p=(0,i.A)({},r,{value:c.value});let f=!!c.error;if(!f&&"function"==typeof u.preProcessEditCellProps){const t=u.preProcessEditCellProps({id:a,row:d,props:c});if(qa(t))return t.then((t=>(e.current.unstable_setEditCellProps({id:a,field:l,props:t}),!t.error&&(e.current.publishEvent("cellEditCommit",p,n),!0))));e.current.unstable_setEditCellProps({id:a,field:l,props:t}),f=!!t.error}return!f&&(e.current.publishEvent("cellEditCommit",p,n),!0)}),[e,null==(r=t.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),u=n.useCallback((t=>{const r=e.current.getColumn(t.field),n=e.current.getRow(t.id);return new Promise((o=>{let a={value:t.value};const l=e.current.getEditRowsModel()[t.id][t.field];if("function"!=typeof r.preProcessEditCellProps)return e.current.unstable_setEditCellProps((0,i.A)({},t,{props:a})),void o(!0);a=e.current.unstable_setEditCellProps((0,i.A)({},t,{props:(0,i.A)({},l,{isValidating:!0})})),Promise.resolve(r.preProcessEditCellProps({id:t.id,row:n,props:(0,i.A)({},a,{value:e.current.unstable_parseValue(t.id,t.field,t.value)})})).then((r=>{e.current.unstable_setEditCellProps((0,i.A)({},t,{props:(0,i.A)({},r,{isValidating:!1})})),o(!r.error)}))}))}),[e]);tt(e,{setCellMode:l,getCellMode:s,commitCellChange:c,unstable_setCellEditingEditCellValue:u});const d=n.useCallback((async(t,r)=>{if(229===r.which)return;const{id:n,field:o,cellMode:a,isEditable:i}=t;if(!i)return;const l=a===qn.Edit,s=r.ctrlKey||r.metaKey||r.altKey;if(l||!(e=>$n(e.key)||Fn(e.key)||Dn(e))(r)||s||" "===r.key&&r.shiftKey||e.current.publishEvent("cellEditStart",t,r),!l&&Fn(r.key)&&(e.current.setEditCellValue({id:n,field:o,value:""}),e.current.commitCellChange({id:n,field:o},r),e.current.publishEvent("cellEditStop",t,r)),l&&Hn(r.key)){const t={id:n,field:o};if(!await e.current.commitCellChange(t,r))return}var c;l&&(c=r.key,Nn.indexOf(c)>-1)&&e.current.publishEvent("cellEditStop",t,r)}),[e]),p=n.useCallback(((t,r)=>{t.isEditable&&e.current.publishEvent("cellEditStart",t,r)}),[e]),f=async(t,r)=>{t.cellMode!==qn.View&&(await e.current.commitCellChange(t,r),e.current.publishEvent("cellEditStop",t,r))},h=(0,ve.A)(((e,t)=>{f(e,t)})),m=(0,ve.A)((()=>{const t=Do(e);if(!t)return;const r=e.current.getCellParams(t.id,t.field);f(r,{})})),g=n.useCallback(((t,r)=>{t.isEditable&&(e.current.setCellMode(t.id,t.field,qn.Edit),Wn(r)&&Dn(r)&&e.current.unstable_setEditCellProps({id:t.id,field:t.field,props:{value:""}}))}),[e]),v=n.useCallback(((t,r)=>{e.current.setCellMode(t.id,t.field,qn.View),Wn(r)&&(Hn(r.key)?e.current.publishEvent("cellNavigationKeyDown",t,r):("Escape"===r.key||Fn(r.key))&&e.current.setCellFocus(t.id,t.field))}),[e]),b=n.useCallback((t=>{const{id:r,field:n}=t,a=e.current.getEditRowsModel(),{value:l}=a[r][n];o.debug(`Setting cell id: ${r} field: ${n} to value: ${null==l?void 0:l.toString()}`);const s=e.current.getRow(r);if(s){const r=e.current.getColumn(t.field);let o=(0,i.A)({},s,{[n]:l});r.valueSetter&&(o=r.valueSetter({row:s,value:l})),e.current.updateRows([o])}}),[e,o]),y=n.useCallback((t=>{const r=e.current.getRow(t.id),n=e.current.getColumn(t.field),o=n.preProcessEditCellProps?n.preProcessEditCellProps({id:t.id,row:r,props:t.props}):t.props;qa(o)?o.then((r=>{e.current.unstable_setEditCellProps((0,i.A)({},t,{props:r}))})):e.current.unstable_setEditCellProps((0,i.A)({},t,{props:o}))}),[e]);it(e,"cellKeyDown",a(d)),it(e,"cellDoubleClick",a(p)),it(e,"cellFocusOut",a(h)),it(e,"columnHeaderDragStart",a(m)),it(e,"cellEditStart",a(g)),it(e,"cellEditStop",a(v)),it(e,"cellEditCommit",a(b)),it(e,"editCellPropsChange",a(y)),st(e,"cellEditCommit",t.onCellEditCommit),st(e,"cellEditStart",t.onCellEditStart),st(e,"cellEditStop",t.onCellEditStop)})(e,t),((e,t)=>{var r,o;const a=n.useRef(null),l=n.useRef(null),s=z(e,R),c=e=>(...r)=>{t.editMode===Un.Row&&e(...r)},u=n.useCallback(((t,r)=>{r!==e.current.getRowMode(t)&&(e.current.setState((n=>{const o=(0,i.A)({},n.editRows);return r===Gn.Edit?(o[t]={},s.forEach((r=>{const n=e.current.getCellParams(t,r.field);n.isEditable&&(o[t][r.field]={value:n.value})}))):delete o[t],(0,i.A)({},n,{editRows:o})})),e.current.forceUpdate())}),[e,s]),d=n.useCallback((r=>t.editMode===Un.Cell?Gn.View:Ua(e.current.state)[r]?Gn.Edit:Gn.View),[e,t.editMode]),p=n.useCallback(((r,n={})=>{var o;if(t.editMode===Un.Cell)throw new Error("MUI: You can't commit changes when the edit mode is 'cell'.");e.current.unstable_runPendingEditCellValueMutation(r);const a=e.current.getEditRowsModel()[r];if(!a)throw new Error(`MUI: Row at id: ${r} is not being edited.`);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating&&!Object.keys(a).reduce(((e,t)=>e&&!a[t].isValidating&&!a[t].error),!0))return!1;if(Object.values(a).some((e=>!!e.error)))return!1;const i=Object.keys(a).filter((t=>"function"==typeof e.current.getColumn(t).preProcessEditCellProps));if(i.length>0){const t=e.current.getRow(r),o=i.map((async n=>{const o=e.current.getColumn(n),i=await Promise.resolve(o.preProcessEditCellProps({id:r,row:t,props:a[n]}));return e.current.unstable_setEditCellProps({id:r,field:n,props:i}),i.error}));return Promise.all(o).then((t=>!t.some((e=>!!e))&&(e.current.publishEvent("rowEditCommit",r,n),!0)))}return e.current.publishEvent("rowEditCommit",r,n),!0}),[e,t.editMode,null==(r=t.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),f=n.useCallback((t=>{const r=e.current.getEditRowsModel()[t.id],n=e.current.getRow(t.id);let o=!0;return new Promise((a=>{Object.keys(r).forEach((async a=>{const l=e.current.getColumn(a);let s=a===t.field?{value:t.value}:r[a];s=e.current.unstable_setEditCellProps({id:t.id,field:a,props:(0,i.A)({},s,{isValidating:!0})}),l.preProcessEditCellProps&&(s=await Promise.resolve(l.preProcessEditCellProps({id:t.id,row:n,props:(0,i.A)({},s,{value:a===t.field?e.current.unstable_parseValue(t.id,a,t.value):s.value})}))),s.error&&(o=!1),e.current.unstable_setEditCellProps({id:t.id,field:a,props:(0,i.A)({},s,{isValidating:!1})})})),a(o)}))}),[e]);tt(e,{setRowMode:u,getRowMode:d,commitRowChange:p,unstable_setRowEditingEditCellValue:f});const h=n.useCallback((async(r,n)=>{if(229===n.which)return;const{cellMode:o,isEditable:a}=r;if(!a)return;const i=o===qn.Edit,l=e.current.getRowParams(r.id);if(i)if("Enter"===n.key){var s;if(!await e.current.commitRowChange(r.id)&&null!=(s=t.experimentalFeatures)&&s.preventCommitWhileValidating)return;e.current.publishEvent("rowEditStop",l,n)}else"Escape"===n.key&&e.current.publishEvent("rowEditStop",l,n);else"Enter"===n.key&&e.current.publishEvent("rowEditStart",l,n)}),[e,null==(o=t.experimentalFeatures)?void 0:o.preventCommitWhileValidating]),m=n.useCallback(((t,r)=>{if(!t.isEditable)return;const n=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStart",n,r)}),[e]),g=n.useCallback((t=>{const r=e.current.getRow(t.id),n=e.current.getEditRowsModel()[t.id];Object.keys(n).forEach((async o=>{const a=e.current.getColumn(o);if(a.preProcessEditCellProps){const i=o===t.field?t.props:n[o],l=await Promise.resolve(a.preProcessEditCellProps({id:t.id,row:r,props:i}));e.current.unstable_setEditCellProps({id:t.id,field:o,props:l})}else o===t.field&&e.current.unstable_setEditCellProps(t)}))}),[e]),v=n.useCallback((t=>{e.current.setRowMode(t.id,Gn.Edit)}),[e]),b=n.useCallback(((t,r)=>{e.current.setRowMode(t.id,Gn.View),"Enter"===r.key&&e.current.publishEvent("cellNavigationKeyDown",t,r)}),[e]),y=n.useCallback((t=>{const r=e.current.getEditRowsModel()[t];if(!r)throw new Error(`MUI: Row at id: ${t} is not being edited.`);const n=e.current.getRow(t);if(n){let t=(0,i.A)({},n);Object.keys(r).forEach((n=>{const o=e.current.getColumn(n),a=r[n].value;o.valueSetter?t=o.valueSetter({row:t,value:a}):t[n]=a})),e.current.updateRows([t])}}),[e]),x=n.useCallback((e=>{l.current=e}),[]),w=async(t,r)=>{t.cellMode!==qn.View&&(l.current=null,a.current=setTimeout((async()=>{var n;if((null==(n=l.current)?void 0:n.id)!==t.id){await e.current.commitRowChange(t.id,r);const n=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStop",n,r)}})))},A=(0,ve.A)(((e,t)=>{w(e,t)})),C=(0,ve.A)((()=>{const t=Do(e);if(!t)return;const r=e.current.getCellParams(t.id,t.field);w(r,{})}));it(e,"cellKeyDown",c(h)),it(e,"cellDoubleClick",c(m)),it(e,"editCellPropsChange",c(g)),it(e,"rowEditStart",c(v)),it(e,"rowEditStop",c(b)),it(e,"rowEditCommit",c(y)),it(e,"cellFocusIn",c(x)),it(e,"cellFocusOut",c(A)),it(e,"columnHeaderDragStart",c(C)),st(e,"rowEditCommit",t.onRowEditCommit),st(e,"rowEditStart",t.onRowEditStart),st(e,"rowEditStop",t.onRowEditStop)})(e,t);const a=n.useRef({});e.current.unstable_registerControlState({stateId:"editRows",propModel:t.editRowsModel,propOnChange:t.onEditRowsModelChange,stateSelector:Ua,changeEvent:"editRowsModelChange"});const l=n.useCallback((e=>!e.rowNode.isAutoGenerated&&!e.rowNode.isPinned&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!t.isCellEditable||t.isCellEditable(e))),[t.isCellEditable]),s=n.useCallback(((e,t)=>{if(a.current[e])if(t){if(a.current[e][t]){const[,r]=a.current[e][t];r()}}else Object.keys(a.current[e]).forEach((t=>{const[,r]=a.current[e][t];r()}))}),[]),c=n.useCallback(((r,n={})=>{((e,t,r,n)=>{if(!r)return void n();if(a.current[e]||(a.current[e]={}),a.current[e][t]){const[r]=a.current[e][t];clearTimeout(r)}const o=setTimeout((()=>{n(),delete a.current[e][t]}),r);a.current[e][t]=[o,()=>{n();const[r]=a.current[e][t];clearTimeout(r),delete a.current[e][t]}]})(r.id,r.field,r.debounceMs,(()=>{var o;if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating)return"row"===t.editMode?e.current.unstable_setRowEditingEditCellValue(r):e.current.unstable_setCellEditingEditCellValue(r);const a={id:r.id,field:r.field,props:{value:r.value}};return e.current.publishEvent("editCellPropsChange",a,n)}))}),[e,t.editMode,null==(r=t.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),u=n.useCallback(((t,r,n)=>{const o=e.current.getColumn(r);return o.valueParser?o.valueParser(n,e.current.getCellParams(t,r)):n}),[e]),d=n.useCallback((t=>{const{id:r,field:n,props:a}=t;return o.debug(`Setting cell props on id: ${r} field: ${n}`),e.current.setState((e=>{const t=(0,i.A)({},e.editRows);return t[r]=(0,i.A)({},e.editRows[r]),t[r][n]=(0,i.A)({},a,{value:u(r,n,a.value)}),(0,i.A)({},e,{editRows:t})})),e.current.forceUpdate(),Ua(e.current.state)[r][n]}),[e,o,u]),p=n.useCallback((t=>{Ua(e.current.state)!==t&&(o.debug("Setting editRows model"),e.current.setState((e=>(0,i.A)({},e,{editRows:t}))),e.current.forceUpdate())}),[e,o]),f=n.useCallback((()=>Ua(e.current.state)),[e]),h=n.useCallback(((e,t)=>{const r=t.detail>1;e.isEditable&&e.cellMode===qn.View&&r&&t.preventDefault()}),[]);it(e,"cellMouseDown",h),st(e,"editCellPropsChange",t.onEditCellPropsChange),tt(e,{isCellEditable:l,setEditRowsModel:p,getEditRowsModel:f,setEditCellValue:c,unstable_setEditCellProps:d,unstable_parseValue:u,unstable_runPendingEditCellValueMutation:s}),n.useEffect((()=>{void 0!==t.editRowsModel&&e.current.setEditRowsModel(t.editRowsModel)}),[e,t.editRowsModel])}var Xa,Za;!function(e){e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown"}(Xa||(Xa={})),function(e){e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown"}(Za||(Za={}));const Ya=["id","field"],Qa=["id","field"],Ja=A(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error");var ei,ti;!function(e){e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown"}(ei||(ei={})),function(e){e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown"}(ti||(ti={}));const ri=["id"],ni=["id"],oi=A(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),ai=e=>(0,i.A)({},e,{editRows:{}}),ii=(e,t)=>{((e,t)=>{const[r,o]=n.useState({}),a=n.useRef(r),s=n.useRef({}),{processRowUpdate:c,onProcessRowUpdateError:u,cellModesModel:d,onCellModesModelChange:p,signature:f}=t,h=e=>(...r)=>{t.editMode===Un.Cell&&e(...r)},m=n.useCallback(((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)}),[e]),g=n.useCallback(((t,r,n)=>{if(e.current.getCellMode(t,r)!==n)throw new Error(`MUI: The cell with id=${t} and field=${r} is not in ${n} mode.`)}),[e]),v=n.useCallback(((t,r)=>{if(!t.isEditable)return;if(t.cellMode===qn.Edit)return;const n=(0,i.A)({},t,{reason:Xa.cellDoubleClick});e.current.publishEvent("cellEditStart",n,r)}),[e]),b=n.useCallback(((t,r)=>{if(t.cellMode===qn.View)return;if(e.current.getCellMode(t.id,t.field)===qn.View)return;const n=(0,i.A)({},t,{reason:Za.cellFocusOut});e.current.publishEvent("cellEditStop",n,r)}),[e]),y=n.useCallback(((t,r)=>{if(t.cellMode===qn.Edit){if(229===r.which)return;let n;if("Escape"===r.key?n=Za.escapeKeyDown:"Enter"===r.key?n=Za.enterKeyDown:"Tab"===r.key&&(n=r.shiftKey?Za.shiftTabKeyDown:Za.tabKeyDown,r.preventDefault()),n){const o=(0,i.A)({},t,{reason:n});e.current.publishEvent("cellEditStop",o,r)}}else if(t.isEditable){let n;if(" "===r.key&&r.shiftKey)return;if(Dn(r)||(r.ctrlKey||r.metaKey)&&"v"===r.key?n=Xa.printableKeyDown:"Enter"===r.key?n=Xa.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(n=Xa.deleteKeyDown),n){const o=(0,i.A)({},t,{reason:n,key:r.key});e.current.publishEvent("cellEditStart",o,r)}}}),[e]),x=n.useCallback((t=>{const{id:r,field:o,reason:a,key:i}=t,l={id:r,field:o};a===Xa.printableKeyDown?n.version.startsWith("18")?l.initialValue=i:l.deleteValue=!0:a===Xa.deleteKeyDown&&(l.deleteValue=!0),e.current.startCellEditMode(l)}),[e]),w=n.useCallback((r=>{const{id:n,field:o,reason:a}=r;let i;e.current.unstable_runPendingEditCellValueMutation(n,o),a===Za.enterKeyDown?i="below":a===Za.tabKeyDown?i="right":a===Za.shiftTabKeyDown&&(i="left");let l="escapeKeyDown"===a;Ua(e.current.state)[n][o].isProcessingProps&&!t.disableIgnoreModificationsIfProcessingProps&&(l=!0),e.current.stopCellEditMode({id:n,field:o,ignoreModifications:l,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);it(e,"cellDoubleClick",h(v)),it(e,"cellFocusOut",h(b)),it(e,"cellKeyDown",h(y)),it(e,"cellEditStart",h(x)),it(e,"cellEditStop",h(w)),st(e,"cellEditStart",t.onCellEditStart),st(e,"cellEditStop",t.onCellEditStop);const A=n.useCallback(((t,r)=>{const n=Ua(e.current.state);return n[t]&&n[t][r]?qn.Edit:qn.View}),[e]),C=(0,gr.A)((r=>{const n=r!==t.cellModesModel;if(p&&n){const t=f===ot.DataGridPro?{api:e.current}:{};p(r,t)}t.cellModesModel&&n||(o(r),a.current=r,e.current.publishEvent("cellModesModelChange",r))})),S=n.useCallback(((e,t,r)=>{const n=(0,i.A)({},a.current);if(null!==r)n[e]=(0,i.A)({},n[e],{[t]:(0,i.A)({},r)});else{const r=n[e],o=(0,l.A)(r,[t].map(pt));n[e]=o,0===Object.keys(n[e]).length&&delete n[e]}C(n)}),[C]),k=n.useCallback(((t,r,n)=>{e.current.setState((e=>{const o=(0,i.A)({},e.editRows);return null!==n?o[t]=(0,i.A)({},o[t],{[r]:(0,i.A)({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),(0,i.A)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),_=n.useCallback((e=>{const{id:t,field:r}=e,n=(0,l.A)(e,Ya);m(t,r),g(t,r,qn.View),S(t,r,(0,i.A)({mode:qn.Edit},n))}),[m,g,S]),E=(0,gr.A)((t=>{const{id:r,field:n,deleteValue:o,initialValue:a}=t;let i=e.current.getCellValue(r,n);(o||a)&&(i=o?"":a),k(r,n,{value:i,error:!1,isProcessingProps:!1}),e.current.setCellFocus(r,n)})),j=n.useCallback((e=>{const{id:t,field:r}=e,n=(0,l.A)(e,Qa);g(t,r,qn.Edit),S(t,r,(0,i.A)({mode:qn.View},n))}),[g,S]),R=(0,gr.A)((async t=>{const{id:r,field:n,ignoreModifications:o,cellToFocusAfter:a="none"}=t;g(r,n,qn.Edit),e.current.unstable_runPendingEditCellValueMutation(r,n);const i=()=>{k(r,n,null),S(r,n,null),"none"!==a&&e.current.unstable_moveFocusToRelativeCell(r,n,a)};if(o)return void i();const l=Ua(e.current.state),{error:d,isProcessingProps:p}=l[r][n];if(d||p)return s.current[r][n].mode=qn.Edit,void S(r,n,{mode:qn.Edit});const f=e.current.unstable_getRowWithUpdatedValuesFromCellEditing(r,n);if(c){const t=e=>{s.current[r][n].mode=qn.Edit,S(r,n,{mode:qn.Edit}),u?u(e):Ja()};try{const n=e.current.getRow(r);Promise.resolve(c(f,n)).then((t=>{e.current.updateRows([t]),i()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),i()})),M=n.useCallback((async t=>{var r,n;const{id:o,field:a,value:l,debounceMs:s,unstable_skipValueParser:c}=t;m(o,a),g(o,a,qn.Edit);const u=e.current.getColumn(a),d=e.current.getRow(o);let p=l;u.valueParser&&!c&&(p=u.valueParser(l,e.current.getCellParams(o,a)));let f=Ua(e.current.state),h=(0,i.A)({},f[o][a],{value:p,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=l!==f[o][a].value;h=(0,i.A)({},h,{isProcessingProps:!0}),k(o,a,h),h=await Promise.resolve(u.preProcessEditCellProps({id:o,row:d,props:h,hasChanged:e}))}return e.current.getCellMode(o,a)!==qn.View&&(f=Ua(e.current.state),h=(0,i.A)({},h,{isProcessingProps:!1}),h.value=u.preProcessEditCellProps?f[o][a].value:p,k(o,a,h),f=Ua(e.current.state),!(null!=(r=f[o])&&null!=(n=r[a])&&n.error))}),[e,m,g,k]),P=n.useCallback(((t,r)=>{const n=e.current.getColumn(r),o=Ua(e.current.state),{value:a}=o[t][r],l=e.current.getRow(t);return n.valueSetter?n.valueSetter({value:a,row:l}):(0,i.A)({},l,{[r]:a})}),[e]);tt(e,{getCellMode:A,startCellEditMode:_,stopCellEditMode:j,unstable_setCellEditingEditCellValue:M,unstable_getRowWithUpdatedValuesFromCellEditing:P}),n.useEffect((()=>{d&&C(d)}),[d,C]),n.useEffect((()=>{const t=J(e),n=s.current;s.current=Xe(r),Object.entries(r).forEach((([e,r])=>{Object.entries(r).forEach((([r,o])=>{var a,l,s;const c=(null==(a=n[e])||null==(l=a[r])?void 0:l.mode)||qn.View,u=null!=(s=t[e])?s:e;o.mode===qn.Edit&&c===qn.View?E((0,i.A)({id:u,field:r},o)):o.mode===qn.View&&c===qn.Edit&&R((0,i.A)({id:u,field:r},o))}))}))}),[e,r,E,R])})(e,t),((e,t)=>{const[r,o]=n.useState({}),a=n.useRef(r),s=n.useRef({}),c=n.useRef(null),u=n.useRef(null),{processRowUpdate:d,onProcessRowUpdateError:p,rowModesModel:f,onRowModesModelChange:h,signature:m}=t,g=e=>(...r)=>{t.editMode===Un.Row&&e(...r)},v=n.useCallback(((t,r)=>{const n=e.current.getCellParams(t,r);if(!e.current.isCellEditable(n))throw new Error(`MUI: The cell with id=${t} and field=${r} is not editable.`)}),[e]),b=n.useCallback(((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI: The row with id=${t} is not in ${r} mode.`)}),[e]),y=n.useCallback(((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===Gn.Edit)return;const n=e.current.getRowParams(t.id),o=(0,i.A)({},n,{field:t.field,reason:ei.cellDoubleClick});e.current.publishEvent("rowEditStart",o,r)}),[e]),x=n.useCallback((e=>{u.current=e}),[]),w=n.useCallback(((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==Gn.View&&(u.current=null,c.current=setTimeout((()=>{var n;if(c.current=null,(null==(n=u.current)?void 0:n.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===Gn.View)return;const n=e.current.getRowParams(t.id),o=(0,i.A)({},n,{field:t.field,reason:ti.rowFocusOut});e.current.publishEvent("rowEditStop",o,r)}})))}),[e]);n.useEffect((()=>()=>{clearTimeout(c.current)}),[]);const A=n.useCallback(((t,r)=>{if(t.cellMode===Gn.Edit){if(229===r.which)return;let n;if("Escape"===r.key)n=ti.escapeKeyDown;else if("Enter"===r.key)n=ti.enterKeyDown;else if("Tab"===r.key){const o=E(e).filter((r=>e.current.isCellEditable(e.current.getCellParams(t.id,r))));r.shiftKey?t.field===o[0]&&(n=ti.shiftTabKeyDown):t.field===o[o.length-1]&&(n=ti.tabKeyDown),n&&r.preventDefault()}if(n){const o=e.current.getRowParams(t.id),a=(0,i.A)({},o,{reason:n,field:t.field});e.current.publishEvent("rowEditStop",a,r)}}else if(t.isEditable){let n;if(" "===r.key&&r.shiftKey)return;if(Dn(r)||(r.ctrlKey||r.metaKey)&&"v"===r.key?n=ei.printableKeyDown:"Enter"===r.key?n=ei.enterKeyDown:"Delete"!==r.key&&"Backspace"!==r.key||(n=ei.deleteKeyDown),n){const o=e.current.getRowParams(t.id),a=(0,i.A)({},o,{field:t.field,key:r.key,reason:n});e.current.publishEvent("rowEditStart",a,r)}}}),[e]),C=n.useCallback((t=>{const{id:r,field:o,reason:a,key:i}=t,l={id:r,fieldToFocus:o};a===ei.printableKeyDown?n.version.startsWith("18")?l.initialValue=i:l.deleteValue=!!o:a===ei.deleteKeyDown&&(l.deleteValue=!!o),e.current.startRowEditMode(l)}),[e]),S=n.useCallback((r=>{const{id:n,reason:o,field:a}=r;let i;e.current.unstable_runPendingEditCellValueMutation(n),o===ti.enterKeyDown?i="below":o===ti.tabKeyDown?i="right":o===ti.shiftTabKeyDown&&(i="left");let l="escapeKeyDown"===o;const s=Ua(e.current.state);l||t.disableIgnoreModificationsIfProcessingProps||(l=Object.values(s[n]).some((e=>e.isProcessingProps))),e.current.stopRowEditMode({id:n,ignoreModifications:l,field:a,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);it(e,"cellDoubleClick",g(y)),it(e,"cellFocusIn",g(x)),it(e,"cellFocusOut",g(w)),it(e,"cellKeyDown",g(A)),it(e,"rowEditStart",g(C)),it(e,"rowEditStop",g(S)),st(e,"rowEditStart",t.onRowEditStart),st(e,"rowEditStop",t.onRowEditStop);const k=n.useCallback((r=>{if(t.editMode===Un.Cell)return Gn.View;const n=Ua(e.current.state);return n[r]&&Object.keys(n[r]).length>0?Gn.Edit:Gn.View}),[e,t.editMode]),_=(0,gr.A)((r=>{const n=r!==t.rowModesModel;if(h&&n){const t=m===ot.DataGridPro?{api:e.current}:{};h(r,t)}t.rowModesModel&&n||(o(r),a.current=r,e.current.publishEvent("rowModesModelChange",r))})),j=n.useCallback(((e,t)=>{const r=(0,i.A)({},a.current);null!==t?r[e]=(0,i.A)({},t):delete r[e],_(r)}),[_]),R=n.useCallback(((t,r)=>{e.current.setState((e=>{const n=(0,i.A)({},e.editRows);return null!==r?n[t]=r:delete n[t],(0,i.A)({},e,{editRows:n})})),e.current.forceUpdate()}),[e]),M=n.useCallback(((t,r,n)=>{e.current.setState((e=>{const o=(0,i.A)({},e.editRows);return null!==n?o[t]=(0,i.A)({},o[t],{[r]:(0,i.A)({},n)}):(delete o[t][r],0===Object.keys(o[t]).length&&delete o[t]),(0,i.A)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),P=n.useCallback((e=>{const{id:t}=e,r=(0,l.A)(e,ri);b(t,Gn.View),j(t,(0,i.A)({mode:Gn.Edit},r))}),[b,j]),O=(0,gr.A)((t=>{const{id:r,fieldToFocus:n,deleteValue:o,initialValue:a}=t,i=E(e).reduce(((t,i)=>{if(!e.current.getCellParams(r,i).isEditable)return t;let l=e.current.getCellValue(r,i);return n===i&&(o||a)&&(l=o?"":a),t[i]={value:l,error:!1,isProcessingProps:!1},t}),{});R(r,i),n&&e.current.setCellFocus(r,n)})),I=n.useCallback((e=>{const{id:t}=e,r=(0,l.A)(e,ni);b(t,Gn.Edit),j(t,(0,i.A)({mode:Gn.View},r))}),[b,j]),T=(0,gr.A)((t=>{const{id:r,ignoreModifications:n,field:o,cellToFocusAfter:a="none"}=t;e.current.unstable_runPendingEditCellValueMutation(r);const i=()=>{"none"!==a&&o&&e.current.unstable_moveFocusToRelativeCell(r,o,a),R(r,null),j(r,null)};if(n)return void i();const l=Ua(e.current.state),c=e.current.getRow(r);if(Object.values(l[r]).some((e=>e.isProcessingProps)))return void(s.current[r].mode=Gn.Edit);if(Object.values(l[r]).some((e=>e.error)))return s.current[r].mode=Gn.Edit,void j(r,{mode:Gn.Edit});const u=e.current.unstable_getRowWithUpdatedValuesFromRowEditing(r);if(d){const t=e=>{s.current[r].mode=Gn.Edit,j(r,{mode:Gn.Edit}),p?p(e):oi()};try{Promise.resolve(d(u,c)).then((t=>{e.current.updateRows([t]),i()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([u]),i()})),$=n.useCallback((t=>{const{id:r,field:n,value:o,debounceMs:a,unstable_skipValueParser:s}=t;v(r,n);const c=e.current.getColumn(n),u=e.current.getRow(r);let d=o;c.valueParser&&!s&&(d=c.valueParser(o,e.current.getCellParams(r,n)));let p=Ua(e.current.state),f=(0,i.A)({},p[r][n],{value:d,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return c.preProcessEditCellProps||M(r,n,f),new Promise((t=>{const o=[];if(c.preProcessEditCellProps){const a=f.value!==p[r][n].value;f=(0,i.A)({},f,{isProcessingProps:!0}),M(r,n,f);const s=p[r],h=(0,l.A)(s,[n].map(pt)),m=Promise.resolve(c.preProcessEditCellProps({id:r,row:u,props:f,hasChanged:a,otherFieldsProps:h})).then((o=>{e.current.getRowMode(r)!==Gn.View?(p=Ua(e.current.state),(o=(0,i.A)({},o,{isProcessingProps:!1})).value=c.preProcessEditCellProps?p[r][n].value:d,M(r,n,o)):t(!1)}));o.push(m)}Object.entries(p[r]).forEach((([a,s])=>{if(a===n)return;const c=e.current.getColumn(a);if(!c.preProcessEditCellProps)return;s=(0,i.A)({},s,{isProcessingProps:!0}),M(r,a,s),p=Ua(e.current.state);const d=p[r],f=(0,l.A)(d,[a].map(pt)),h=Promise.resolve(c.preProcessEditCellProps({id:r,row:u,props:s,hasChanged:!1,otherFieldsProps:f})).then((n=>{e.current.getRowMode(r)!==Gn.View?(n=(0,i.A)({},n,{isProcessingProps:!1}),M(r,a,n)):t(!1)}));o.push(h)})),Promise.all(o).then((()=>{e.current.getRowMode(r)===Gn.Edit?(p=Ua(e.current.state),t(!p[r][n].error)):t(!1)}))}))}),[e,v,M]),L=n.useCallback((t=>{const r=Ua(e.current.state),n=e.current.getRow(t);let o=(0,i.A)({},n);return Object.entries(r[t]).forEach((([t,r])=>{const n=e.current.getColumn(t);n.valueSetter?o=n.valueSetter({value:r.value,row:o}):o[t]=r.value})),o}),[e]);tt(e,{getRowMode:k,startRowEditMode:P,stopRowEditMode:I,unstable_setRowEditingEditCellValue:$,unstable_getRowWithUpdatedValuesFromRowEditing:L}),n.useEffect((()=>{f&&_(f)}),[f,_]),n.useEffect((()=>{const t=J(e),n=s.current;s.current=Xe(r),Object.entries(r).forEach((([e,r])=>{var o,a;const l=(null==(o=n[e])?void 0:o.mode)||Gn.View,s=null!=(a=t[e])?a:e;r.mode===Gn.Edit&&l===Gn.View?O((0,i.A)({id:s},r)):r.mode===Gn.View&&l===Gn.Edit&&T((0,i.A)({id:s},r))}))}),[e,r,O,T])})(e,t);const r=n.useRef({}),{isCellEditable:o}=t,a=n.useCallback((e=>!e.rowNode.isAutoGenerated&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(o?o(e):!e.rowNode.isPinned)),[o]);n.useEffect((()=>{const e=r.current;return()=>{Object.entries(e).forEach((([t,r])=>{Object.keys(r).forEach((r=>{const[n]=e[t][r];clearTimeout(n),delete e[t][r]}))}))}}),[]);const s=n.useCallback(((e,t)=>{if(r.current[e])if(t){if(r.current[e][t]){const[,n]=r.current[e][t];n()}}else Object.keys(r.current[e]).forEach((t=>{const[,n]=r.current[e][t];n()}))}),[]),c=n.useCallback((n=>{const{id:o,field:a,debounceMs:i}=n;return new Promise((l=>{((e,t,n,o)=>{if(!n)return void o();if(r.current[e]||(r.current[e]={}),r.current[e][t]){const[n]=r.current[e][t];clearTimeout(n)}const a=setTimeout((()=>{o(),delete r.current[e][t]}),n);r.current[e][t]=[a,()=>{const[n]=r.current[e][t];clearTimeout(n),o(),delete r.current[e][t]}]})(o,a,i,(async()=>{const r=t.editMode===Un.Row?e.current.unstable_setRowEditingEditCellValue:e.current.unstable_setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===qn.Edit){const e=await r(n);l(e)}}))}))}),[e,t.editMode]),u=n.useCallback(((r,n)=>t.editMode===Un.Cell?e.current.unstable_getRowWithUpdatedValuesFromCellEditing(r,n):e.current.unstable_getRowWithUpdatedValuesFromRowEditing(r)),[e,t.editMode]),d=n.useCallback(((t,r)=>({changeReason:Ua(e.current.state)[t][r].changeReason})),[e]);tt(e,{isCellEditable:a,setEditCellValue:c,unstable_runPendingEditCellValueMutation:s,unstable_getRowWithUpdatedValues:u,unstable_getEditCellMeta:d})},li=(e,t,r)=>(r.current.unstable_caches.rows=Ia({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,i.A)({},e,{rows:Ta({apiRef:r,previousTree:null,rowCountProp:t.rowCount,loadingProp:t.loading})})),si=({ids:e,idRowsLookup:t,idToIdLookup:r,previousTree:n})=>{const o={};for(let t=0;tnull==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],pi=(e,t)=>{var r;return(0,i.A)({},e,{selection:null!=(r=di(t.selectionModel))?r:[]})},fi=(e,t)=>{var r,n,o,a;const l=null!=(r=null!=(n=t.sortModel)?n:null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)?r:[];return(0,i.A)({},e,{sorting:{sortModel:ar(l,t.disableMultipleColumnsSorting),sortedRows:[]}})};function hi(e){const{clientHeight:t,scrollTop:r,offsetHeight:n,offsetTop:o}=e,a=o+n;return n>t?o:a-t>r?a-t:o(0,i.A)({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),vi=e=>{var t,r;const o=gt(void 0,e);return((e,t)=>{var r;const o=n.useCallback((e=>{var r;if(null==(r=t.experimentalFeatures)||!r.columnGrouping)return e;const n=Po(t.columnGroupingModel);return e.all.forEach((t=>{var r,o;const a=null!=(r=n[t])?r:[],l=e.lookup[t];(function(e){return void 0!==e.groupPath})(l)&&Ke(a,null==l?void 0:l.groupPath)||(e.lookup[t]=(0,i.A)({},e.lookup[t],{groupPath:null!=(o=n[t])?o:[]}))})),e}),[t.columnGroupingModel,null==(r=t.experimentalFeatures)?void 0:r.columnGrouping]);At(e,"hydrateColumns",o)})(o,e),((e,t)=>{const r=(e=>{const{classes:t}=e;return n.useMemo((()=>(0,p.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},m.B,t)),[t])})({classes:t.classes}),o=n.useCallback((n=>{const o=(0,i.A)({},na,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,l=null!=n.lookup[ra];return a&&!l?(n.lookup[ra]=o,n.all=[ra,...n.all]):!a&&l?(delete n.lookup[ra],n.all=n.all.filter((e=>e!==ra))):a&&l&&(n.lookup[ra]=(0,i.A)({},o,n.lookup[ra])),n}),[e,r,t.checkboxSelection]);At(e,"hydrateColumns",o)})(o,e),(e=>{va(e,ft,"rowTreeCreation",si)})(o),vt(pi,o,e),vt(ko,o,e),vt(Io,o,e),vt(li,o,e),vt(null!=(t=e.experimentalFeatures)&&t.newEditingApi?ai:Ga,o,e),vt(Ra,o,e),vt(fi,o,e),vt(Wa,o,e),vt(_a,o,e),vt($o,o,e),vt(Ha,o,e),vt(gi,o,e),vt(xt,o,e),((e,t)=>{const r=ue(e,"useGridKeyboardNavigation"),o=ja(e,t).rows,a=n.useMemo((()=>function(e,t){const r=ae(e)||{};return[...r.top||[],...t,...r.bottom||[]]}(e,o)),[e,o]),i=n.useCallback(((t,n,o="left")=>{const a=Me(e),i=e.current.unstable_getCellColSpanInfo(n,t);i&&i.spannedByColSpan&&("left"===o?t=i.leftVisibleCellIndex:"right"===o&&(t=i.rightVisibleCellIndex));const l=a.findIndex((e=>e.id===n));r.debug(`Navigating to cell row ${l}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:l});const s=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(n,s)}),[e,r]),l=n.useCallback(((t,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,n)}),[e,r]),s=n.useCallback((e=>a[e].id),[a]),c=n.useCallback(((t,r)=>{const n=e.current.getRootDimensions();if(0===a.length||!n)return;const o=e.current.unstable_getViewportPageSize(),c=t.field?e.current.getColumnIndex(t.field):0,u=a.findIndex((e=>e.id===t.id)),d=a.length-1,p=P(e).length-1;let f=!0;switch(r.key){case"ArrowDown":case"Enter":u0?i(c,s(u-1)):l(c,r);break;case"ArrowRight":c0&&i(c-1,s(u));break;case"Tab":r.shiftKey&&c>0?i(c-1,s(u),"left"):!r.shiftKey&&c=0?i(c,s(e)):l(c,r);break}case"Home":r.ctrlKey||r.metaKey||r.shiftKey?i(0,s(0)):i(0,s(u));break;case"End":r.ctrlKey||r.metaKey||r.shiftKey?i(p,s(d)):i(p,s(u));break;default:f=!1}f&&r.preventDefault()}),[e,a,i,l,s]),u=n.useCallback(((t,r)=>{const n=r.currentTarget.querySelector(`.${m.x.columnHeaderTitleContainerContent}`);if(n&&n.contains(r.target)&&t.field!==na.field)return;if(!e.current.getRootDimensions())return;const o=e.current.unstable_getViewportPageSize(),c=t.field?e.current.getColumnIndex(t.field):0,u=a.length-1,d=P(e).length-1;let p=!0;switch(r.key){case"ArrowDown":i(c,s(0));break;case"ArrowRight":c0&&l(c-1,r);break;case"PageDown":null!==u&&i(c,s(Math.min(0+o,u)));break;case"Home":l(0,r);break;case"End":l(d,r);break;case"Enter":(r.ctrlKey||r.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:p=!1}p&&r.preventDefault()}),[e,a,i,l,s]),d=n.useCallback(((t,r)=>{if(!r.currentTarget.contains(r.target))return;const n=e.current.getCellParams(t.id,t.field);n.cellMode!==qn.Edit&&Vn(r.key)&&e.current.publishEvent("cellNavigationKeyDown",n,r)}),[e]);it(e,"cellNavigationKeyDown",c),it(e,"columnHeaderKeyDown",u),it(e,"cellKeyDown",d)})(o,e),((e,t)=>{const r=ue(e,"useGridSelection"),o=n.useMemo((()=>di(t.selectionModel,Wo(e.current.state))),[e,t.selectionModel]),a=n.useRef(null);e.current.unstable_registerControlState({stateId:"selection",propModel:o,propOnChange:t.onSelectionModelChange,stateSelector:Wo,changeEvent:"selectionChange"});const{checkboxSelection:l,disableMultipleSelection:s,disableSelectionOnClick:c,pagination:u,paginationMode:d,isRowSelectable:p}=t,f=!s||l,h=ja(e,t),g=n.useCallback((t=>{var r;let n=t;const o=null!=(r=a.current)?r:t,i=e.current.isRowSelected(t);if(i){const t=Pe(e),r=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===n));if(r===a)return;n=r>a?t[a+1]:t[a-1]}a.current=t,e.current.selectRowRange({startId:o,endId:n},!i)}),[e]),v=n.useCallback((t=>{Wo(e.current.state)!==t&&(r.debug("Setting selection model"),e.current.setState((e=>(0,i.A)({},e,{selection:t}))),e.current.forceUpdate())}),[e,r]),b=n.useCallback((t=>Wo(e.current.state).includes(t)),[e]),y=n.useCallback((t=>{if(p&&!p(e.current.getRowParams(t)))return!1;const r=e.current.getRowNode(t);return!("footer"===(null==r?void 0:r.position)||null!=r&&r.isPinned)}),[e,p]),x=n.useCallback((()=>qo(e)),[e]),w=n.useCallback(((t,n=!0,o=!1)=>{if(e.current.isRowSelectable(t))if(a.current=t,o)r.debug(`Setting selection for row ${t}`),e.current.setSelectionModel(n?[t]:[]);else{r.debug(`Toggling selection for row ${t}`);const o=Wo(e.current.state).filter((e=>e!==t));n&&o.push(t),(o.length<2||f)&&e.current.setSelectionModel(o)}}),[e,r,f]),A=n.useCallback(((t,n=!0,o=!1)=>{r.debug("Setting selection for several rows");const a=t.filter((t=>e.current.isRowSelectable(t)));let l;if(o)l=n?a:[];else{const t=(0,i.A)({},Go(e));a.forEach((e=>{n?t[e]=e:delete t[e]})),l=Object.values(t)}(l.length<2||f)&&e.current.setSelectionModel(l)}),[e,r,f]),C=n.useCallback((({startId:t,endId:n},o=!0,a)=>{if(!e.current.getRow(t)||!e.current.getRow(n))return;r.debug(`Expanding selection from row ${t} to row ${n}`);const i=Pe(e),l=i.indexOf(t),s=i.indexOf(n),[c,u]=l>s?[s,l]:[l,s],d=i.slice(c,u+1);e.current.selectRows(d,o,a)}),[e,r]);tt(e,{selectRow:w,selectRows:A,selectRowRange:C,setSelectionModel:v,getSelectedRows:x,isRowSelected:b,isRowSelectable:y});const S=n.useCallback((()=>{if(t.keepNonExistentRowsSelected)return;const r=Wo(e.current.state),n=Q(e),o=(0,i.A)({},Go(e));let a=!1;r.forEach((e=>{n[e]||(delete o[e],a=!0)})),a&&e.current.setSelectionModel(Object.values(o))}),[e,t.keepNonExistentRowsSelected]),k=n.useCallback(((t,r)=>{const n=r.metaKey||r.ctrlKey,o=!l&&!n&&!Wn(r),a=!f||o,i=e.current.isRowSelected(t);a?e.current.selectRow(t,!!o||!i,!0):e.current.selectRow(t,!i,!1)}),[e,f,l]),_=n.useCallback(((t,r)=>{var n;if(c)return;const o=null==(n=r.target.closest(`.${m.x.cell}`))?void 0:n.getAttribute("data-field");o!==na.field&&o!==Ma&&(o&&e.current.getColumn(o).type===ho||e.current.getRowNode(t.id).isPinned||(r.shiftKey&&(f||l)?g(t.id):k(t.id,r)))}),[c,f,l,e,g,k]),E=n.useCallback(((e,t)=>{var r;f&&t.shiftKey&&(null==(r=window.getSelection())||r.removeAllRanges())}),[f]),j=n.useCallback(((t,r)=>{r.nativeEvent.shiftKey?g(t.id):e.current.selectRow(t.id,t.value)}),[e,g]),R=n.useCallback((r=>{const n=t.checkboxSelectionVisibleOnly&&t.pagination?Jo(e):Pe(e);e.current.selectRows(n,r.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination]),M=n.useCallback(((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==qn.Edit&&r.currentTarget.contains(r.target)){if(Vn(r.key)&&r.shiftKey){const n=Do(e);if(n&&n.id!==t.id){r.preventDefault();const o=e.current.isRowSelected(n.id);if(!f)return void e.current.selectRow(n.id,!o,!0);const a=e.current.getRowIndexRelativeToVisibleRows(n.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let l,s;a>i?o?(l=i,s=a-1):(l=i,s=a):o?(l=a+1,s=i):(l=a,s=i);const c=h.rows.slice(l,s+1).map((e=>e.id));return void e.current.selectRows(c,!o)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void k(t.id,r);"a"===r.key.toLowerCase()&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),A(e.current.getAllRowIds(),!0))}}),[e,k,A,h.rows,f]);it(e,"sortedRowsSet",S),it(e,"rowClick",_),it(e,"rowSelectionCheckboxChange",j),it(e,"headerSelectionCheckboxChange",R),it(e,"cellMouseDown",E),it(e,"cellKeyDown",M),n.useEffect((()=>{void 0!==o&&e.current.setSelectionModel(o)}),[e,o]);const P=null!=o;n.useEffect((()=>{if(P)return;const t=Wo(e.current.state);if(y){const r=t.filter((e=>y(e)));r.length{const t=Wo(e.current.state);if(!f&&t.length>1){const{rows:r}=Ea(e,{pagination:u,paginationMode:d}),n=r.reduce(((e,{id:t})=>(e[t]=!0,e)),{}),o=t.find((e=>{let t=!0;return y&&(t=y(e)),t&&n[e]}));e.current.setSelectionModel(void 0!==o?[o]:[])}}),[e,f,l,s,y,u,d])})(o,e),function(e,t){var r,o;const a=ue(e,"useGridColumns"),l=n.useMemo((()=>bo(t.columnTypes)),[t.columnTypes]),s=n.useRef(t.columns),c=n.useRef(l);e.current.unstable_registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:M,changeEvent:"columnVisibilityModelChange"});const u=n.useCallback((t=>{a.debug("Updating columns state."),e.current.setState(wo(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.all)}),[a,e]),d=n.useCallback((t=>j(e)[t]),[e]),p=n.useCallback((()=>R(e)),[e]),f=n.useCallback((()=>P(e)),[e]),h=n.useCallback((()=>L(e)),[e]),m=n.useCallback(((t,r=!0)=>(r?P(e):R(e)).findIndex((e=>e.field===t))),[e]),g=n.useCallback((t=>{const r=m(t);return O(e)[r]}),[e,m]),v=n.useCallback((t=>{M(e)!==t&&(e.current.setState((r=>(0,i.A)({},r,{columns:xo({apiRef:e,columnTypes:l,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!1,currentColumnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.forceUpdate())}),[e,l]),b=n.useCallback((t=>{const r=xo({apiRef:e,columnTypes:l,columnsToUpsert:t,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!0,keepOnlyColumnsToUpsert:!1});u(r)}),[e,u,l]),y=n.useCallback((t=>e.current.updateColumns([t])),[e]),x=n.useCallback(((t,r)=>{if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var n;const o=M(e);if(r!==(null==(n=o[t])||n)){const n=(0,i.A)({},o,{[t]:r});e.current.setColumnVisibilityModel(n)}}else{const n=e.current.getColumn(t),o=(0,i.A)({},n,{hide:!r});e.current.updateColumns([o]);const a={field:t,colDef:o,isVisible:r};e.current.publishEvent("columnVisibilityChange",a)}}),[e]),w=n.useCallback(((t,r)=>{const n=E(e),o=n.findIndex((e=>e===t));if(o===r)return;a.debug(`Moving column ${t} to index ${r}`);const l=[...n],s=l.splice(o,1)[0];l.splice(r,0,s),u((0,i.A)({},_(e.current.state),{all:l}));const c={field:t,element:e.current.getColumnHeaderElement(t),colDef:e.current.getColumn(t),targetIndex:r,oldIndex:o};e.current.publishEvent("columnOrderChange",c)}),[e,a,u]),A=n.useCallback(((t,r)=>{a.debug(`Updating column ${t} width to ${r}`);const n=e.current.getColumn(t),o=(0,i.A)({},n,{width:r});e.current.updateColumns([o]),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:o,width:r})}),[e,a]);tt(e,{getColumn:d,getAllColumns:p,getColumnIndex:m,getColumnPosition:g,getVisibleColumns:f,getColumnsMeta:h,updateColumn:y,updateColumns:b,setColumnVisibilityModel:v,setColumnVisibility:x,setColumnIndex:w,setColumnWidth:A});const C=n.useCallback(((r,n)=>{const o={};if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var a,l,s;const r=M(e);(!n.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(a=null==(l=t.initialState)||null==(s=l.columns)?void 0:s.columnVisibilityModel)?a:{}).length>0||Object.keys(r).length>0)&&(o.columnVisibilityModel=r)}o.orderedFields=E(e);const c=R(e),u={};return c.forEach((e=>{if(e.hasBeenResized){const t={};vo.forEach((r=>{let n=e[r];n===1/0&&(n=-1),t[r]=n})),u[e.field]=t}})),Object.keys(u).length>0&&(o.dimensions=u),(0,i.A)({},r,{columns:o})}),[e,t.columnVisibilityModel,null==(r=t.initialState)?void 0:r.columns]),S=n.useCallback(((t,r)=>{var n;const o=e.current.unstable_caches.columns.isUsingColumnVisibilityModel?null==(n=r.stateToRestore.columns)?void 0:n.columnVisibilityModel:void 0,a=r.stateToRestore.columns;if(null==o&&null==a)return t;const i=xo({apiRef:e,columnTypes:l,columnsToUpsert:[],initialState:a,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,currentColumnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(wo(i)),null!=a&&e.current.publishEvent("columnsChange",i.all),t}),[e,l]),k=n.useCallback(((e,r)=>{if(r===So.columns){var n;const e=t.components.ColumnsPanel;return(0,le.jsx)(e,(0,i.A)({},null==(n=t.componentsProps)?void 0:n.columnsPanel))}return e}),[t.components.ColumnsPanel,null==(o=t.componentsProps)?void 0:o.columnsPanel]);At(e,"exportState",C),At(e,"restoreState",S),At(e,"preferencePanel",k);const I=n.useRef(null);it(e,"viewportInnerSizeChange",(t=>{I.current!==t.width&&(I.current=t.width,u(yo(_(e.current.state),t.width)))})),st(e,"columnVisibilityChange",t.onColumnVisibilityChange);const T=n.useCallback((()=>{a.info("Columns pipe processing have changed, regenerating the columns");const t=xo({apiRef:e,columnTypes:l,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,keepOnlyColumnsToUpsert:!1});u(t)}),[e,a,u,l]);Ct(e,"hydrateColumns",T);const $=n.useRef(!0);n.useEffect((()=>{if($.current)return void($.current=!1);if(a.info(`GridColumns have changed, new length ${t.columns.length}`),s.current===t.columns&&c.current===l)return;const r=xo({apiRef:e,columnTypes:l,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});s.current=t.columns,c.current=l,u(r)}),[a,e,u,t.columns,l]),n.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,a,t.columnVisibilityModel])}(o,e),((e,t)=>{const r=ue(e,"useGridRows"),o=ja(e,t),a=n.useRef(Date.now()),l=n.useRef(null),s=n.useCallback((t=>{var r;return null!=(r=Q(e)[t])?r:null}),[e]),c=n.useMemo((()=>o.rows.reduce(((e,{id:t},r)=>(e[t]=r,e)),{})),[o.rows]),u=n.useCallback(((r,n)=>{const o=()=>{l.current=null,a.current=Date.now(),e.current.setState((r=>(0,i.A)({},r,{rows:Ta({apiRef:e,previousTree:ee(e),rowCountProp:t.rowCount,loadingProp:t.loading})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(l.current&&(clearTimeout(l.current),l.current=null),e.current.unstable_caches.rows=r,!n)return void o();const s=t.throttleRowsMs-(Date.now()-a.current);s>0?l.current=setTimeout(o,s):o()}),[t.throttleRowsMs,t.rowCount,t.loading,e]),d=n.useCallback((n=>{r.debug(`Updating all rows, new length ${n.length}`);const o=Ia({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.unstable_caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,u(o,!0)}),[r,t.getRowId,t.loading,t.rowCount,u,e]),p=n.useCallback((r=>{if(t.signature===ot.DataGrid&&r.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const n=new Map;r.forEach((e=>{const r=Oa(e,t.getRowId,"A row was provided without id when calling updateRows():");n.has(r)?n.set(r,(0,i.A)({},n.get(r),e)):n.set(r,e)}));const o=[],a=e.current.unstable_caches.rows,l={rowsBeforePartialUpdates:a.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:a.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:a.rowCountPropBeforePartialUpdates,idRowsLookup:(0,i.A)({},a.idRowsLookup),idToIdLookup:(0,i.A)({},a.idToIdLookup),ids:[...a.ids]};n.forEach(((t,r)=>"delete"===t._action?(delete l.idRowsLookup[r],delete l.idToIdLookup[r],void o.push(r)):e.current.getRow(r)?void(l.idRowsLookup[r]=(0,i.A)({},e.current.getRow(r),t)):(l.idRowsLookup[r]=t,l.idToIdLookup[r]=r,void l.ids.push(r)))),o.length>0&&(l.ids=l.ids.filter((e=>!o.includes(e)))),u(l,!0)}),[t.signature,t.getRowId,u,e]),f=n.useCallback((()=>{const t=ne(e),r=Q(e);return new Map(t.map((e=>[e,r[e]])))}),[e]),h=n.useCallback((()=>X(e)),[e]),m=n.useCallback((()=>ne(e)),[e]),g=n.useCallback((e=>c[e]),[c]),v=n.useCallback(((t,r)=>{const n=e.current.getRowNode(t);if(!n)throw new Error(`MUI: No row with id #${t} found`);const o=(0,i.A)({},n,{childrenExpanded:r});e.current.setState((e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{tree:(0,i.A)({},e.rows.tree,{[t]:o})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",o)}),[e]),b=n.useCallback((t=>{var r;return null!=(r=ee(e)[t])?r:null}),[e]),y=n.useCallback((({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:n,applyFiltering:o})=>{const a=ee(e);let i;if(n){const n=a[r];if(!n)return[];const o=Ae(e);i=[];for(let e=o.findIndex((e=>e===r))+1;en.depth;e+=1){const r=o[e],n=a[r];t&&n.isAutoGenerated||i.push(r)}}else i=$a(a,r,t);if(o){const t=Re(e);i=i.filter((e=>!1!==t[e]))}return i}),[e]),x={getRow:s,getRowModels:f,getRowsCount:h,getAllRowIds:m,setRows:d,setRowIndex:n.useCallback(((t,n)=>{const o=ne(e),a=o.findIndex((e=>e===t));if(-1===a||a===n)return;r.debug(`Moving row ${t} to index ${n}`);const l=[...o];l.splice(n,0,l.splice(a,1)[0]),e.current.setState((e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{ids:l})}))),e.current.unstable_caches.rows.ids=l,e.current.publishEvent("rowsSet")}),[e,r]),updateRows:p,setRowChildrenExpansion:v,getRowNode:b,getRowIndexRelativeToVisibleRows:g,getRowGroupChildren:y,unstable_replaceRows:n.useCallback(((r,n)=>{if(t.signature===ot.DataGrid&&n.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===n.length)return;const o=[...ne(e)],a=Q(e),l=J(e),s=ee(e),c=(0,i.A)({},a),u=(0,i.A)({},l),d=(0,i.A)({},s),p=n.map((e=>({id:Oa(e,t.getRowId,"A row was provided without id when calling replaceRows()."),model:e})));p.forEach(((e,t)=>{const[n]=o.splice(r+t,1,e.id);delete c[n],delete u[n],delete d[n]})),p.forEach((e=>{const t={id:e.id,parent:null,depth:0,groupingKey:null,groupingField:null};c[e.id]=e.model,u[e.id]=e.id,d[e.id]=t})),e.current.unstable_caches.rows.idRowsLookup=c,e.current.unstable_caches.rows.idToIdLookup=u,e.current.unstable_caches.rows.ids=o,e.current.setState((e=>{const t={idRowsLookup:c,idToIdLookup:u,tree:d,ids:o};return(0,i.A)({},e,{rows:(0,i.A)({},e.rows,t,{groupingResponseBeforeRowHydration:(0,i.A)({},e.rows.groupingResponseBeforeRowHydration,t)})})})),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},w=n.useCallback((()=>{let n;r.info("Row grouping pre-processing have changed, regenerating the row tree"),n=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows?e.current.unstable_caches.rows:Ia({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),u(n,!1)}),[r,e,t.rows,t.getRowId,t.loading,t.rowCount,u]),A=n.useCallback((e=>{"rowTreeCreation"===e&&w()}),[w]),C=n.useCallback((()=>{e.current.unstable_getActiveStrategy("rowTree")!==te(e)&&w()}),[e,w]);it(e,"activeStrategyProcessorChange",A),it(e,"strategyAvailabilityChange",C);const S=n.useCallback((()=>{e.current.setState((t=>(0,i.A)({},t,{rows:(0,i.A)({},t.rows,e.current.unstable_applyPipeProcessors("hydrateRows",t.rows.groupingResponseBeforeRowHydration))}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e]);Ct(e,"hydrateRows",S),tt(e,x),n.useEffect((()=>()=>{null!==l.current&&clearTimeout(l.current)}),[]);const k=n.useRef(!0);n.useEffect((()=>{if(k.current)return void(k.current=!1);const n=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows,o=e.current.unstable_caches.rows.loadingPropBeforePartialUpdates===t.loading,a=e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(n)return o||(e.current.setState((e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{loading:t.loading})}))),e.current.unstable_caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(a||(e.current.setState((e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));r.debug(`Updating all rows, new length ${t.rows.length}`),u(Ia({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),!1)}),[t.rows,t.rowCount,t.getRowId,t.loading,r,u,e])})(o,e),function(e){const t=n.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),r=n.useCallback(((...t)=>e.current.getCellValue(...t)),[e]),o=n.useCallback((t=>{const n=e.current.getRow(t);if(!n)throw new Error(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n,getValue:r}}),[e,r]),a=n.useCallback(((t,n)=>{const o=e.current.getRow(t),a=e.current.getRowNode(t);if(!o||!a)throw new Error(`No row with id #${t} found`);const i=Do(e),l=Ho(e);return{id:t,field:n,row:o,rowNode:a,value:o[n],colDef:e.current.getColumn(n),cellMode:e.current.getCellMode(t,n),getValue:r,api:e.current,hasFocus:null!==i&&i.field===n&&i.id===t,tabIndex:l&&l.field===n&&l.id===t?0:-1}}),[e,r]),i=n.useCallback(((t,n)=>{const o=e.current.getColumn(n),a=e.current.getCellValue(t,n),i=e.current.getRow(t),l=e.current.getRowNode(t);if(!i||!l)throw new Error(`No row with id #${t} found`);const s=Do(e),c=Ho(e),u={id:t,field:n,row:i,rowNode:l,colDef:o,cellMode:e.current.getCellMode(t,n),getValue:r,hasFocus:null!==s&&s.field===n&&s.id===t,tabIndex:c&&c.field===n&&c.id===t?0:-1,value:a,formattedValue:a};return o&&o.valueFormatter&&(u.formattedValue=o.valueFormatter({id:t,field:u.field,value:u.value,api:e.current})),u.isEditable=o&&e.current.isCellEditable(u),u}),[e,r]),l=n.useCallback(((t,r)=>{const n=e.current.getColumn(r);if(!n||!n.valueGetter){const n=e.current.getRow(t);if(!n)throw new Error(`No row with id #${t} found`);return n[r]}return n.valueGetter(a(t,r))}),[e,a]),s=n.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${ci(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),c=n.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(ui(t))}(e.current.rootElementRef.current,t):null),[e]),u=n.useCallback(((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const n=`${ui(t)} .${m.x.cell}[data-field="${ci(r)}"]`;return e.querySelector(n)}(e.current.rootElementRef.current,{id:t,field:r}):null),[e]);tt(e,{getCellValue:l,getCellParams:i,getCellElement:u,getRowParams:o,getRowElement:c,getColumnHeaderParams:t,getColumnHeaderElement:s})}(o),(e=>{const t=n.useRef({}),r=n.useCallback(((e,r,n)=>{const o=t.current;o[e]||(o[e]={}),o[e][r]=n}),[]),o=n.useCallback(((e,r)=>{var n;return null==(n=t.current[e])?void 0:n[r]}),[]),a=n.useCallback((t=>{const{columnIndex:n,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:l}=t,s=l.length,c=l[n],u="function"==typeof c.colSpan?c.colSpan(e.current.getCellParams(o,c.field)):c.colSpan;if(!u||1===u)return r(o,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let d=c.computedWidth;for(let e=1;e=a&&t{for(let o=t;o1&&(o+=i.colSpan-1)}}),[a]);tt(e,{unstable_getCellColSpanInfo:o,unstable_calculateColSpan:i});const l=n.useCallback((()=>{t.current={}}),[]);it(e,"columnOrderChange",l)})(o),((e,t)=>{var r;const o=n.useCallback((t=>{var r,n;return null!=(r=null==(n=j(e)[t])?void 0:n.groupPath)?r:[]}),[e]),a=n.useCallback((()=>jo(e)),[e]);tt(e,{unstable_getColumnGroupPath:o,unstable_getAllGroupDetails:a});const l=n.useRef(!0);n.useEffect((()=>{var r,n;if(l.current)return void(l.current=!1);if(null==(r=t.experimentalFeatures)||!r.columnGrouping)return;const o=Oo(null!=(n=t.columnGroupingModel)?n:[]);e.current.setState((e=>(0,i.A)({},e,{columnGrouping:(0,i.A)({},e.columnGrouping,{lookup:o})})))}),[e,t.columnGroupingModel,null==(r=t.experimentalFeatures)?void 0:r.columnGrouping])})(o,e),(null!=(r=e.experimentalFeatures)&&r.newEditingApi?ii:Ka)(o,e),((e,t)=>{const r=ue(e,"useGridFocus"),o=n.useRef(null),a=n.useCallback(((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)}),[e]),l=n.useCallback(((t,n)=>{const o=Do(e);(null==o?void 0:o.id)===t&&(null==o?void 0:o.field)===n||(e.current.setState((e=>(r.debug(`Focusing on cell with id=${t} and field=${n}`),(0,i.A)({},e,{tabIndex:{cell:{id:t,field:n},columnHeader:null},focus:{cell:{id:t,field:n},columnHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(o&&a(o,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,n))))}),[e,r,a]),s=n.useCallback(((t,n={})=>{const o=Do(e);a(o,n),e.current.setState((e=>(r.debug(`Focusing on column header with colIndex=${t}`),(0,i.A)({},e,{tabIndex:{columnHeader:{field:t},cell:null},focus:{columnHeader:{field:t},cell:null}})))),e.current.forceUpdate()}),[e,r,a]),c=n.useCallback(((r,n,o)=>{let a=e.current.getColumnIndex(n),i=e.current.getRowIndexRelativeToVisibleRows(r);const l=P(e);"right"===o?a+=1:"left"===o?a-=1:i+=1;const s=Ea(e,{pagination:t.pagination,paginationMode:t.paginationMode});a>=l.length?(i+=1,i=0&&(a=l.length-1)),i=Ge(i,0,s.rows.length-1);const c=s.rows[i],u=e.current.unstable_getCellColSpanInfo(c.id,a);u&&u.spannedByColSpan&&("left"===o||"below"===o?a=u.leftVisibleCellIndex:"right"===o&&(a=u.rightVisibleCellIndex)),a=Ge(a,0,l.length-1);const d=l[a];e.current.setCellFocus(c.id,d.field)}),[e,t.pagination,t.paginationMode]),u=n.useCallback((({id:t,field:r})=>{e.current.setCellFocus(t,r)}),[e]),d=n.useCallback(((t,r)=>{"Enter"===r.key||"Tab"===r.key||Vn(r.key)||e.current.setCellFocus(t.id,t.field)}),[e]),p=n.useCallback((({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)}),[e]),f=n.useCallback((()=>{r.debug("Clearing focus"),e.current.setState((e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null}})))}),[r,e]),h=n.useCallback((e=>{o.current=e}),[]),m=n.useCallback((t=>{const r=o.current;o.current=null;const n=Do(e);if(!n)return void(r&&e.current.setCellFocus(r.id,r.field));if((null==r?void 0:r.id)===n.id&&(null==r?void 0:r.field)===n.field)return;const l=e.current.getCellElement(n.id,n.field);null!=l&&l.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState((e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null}}))),e.current.forceUpdate(),a(n,t)))}),[e,a]),g=n.useCallback((t=>{if("view"===t.cellMode)return;const r=Do(e);(null==r?void 0:r.id)===t.id&&(null==r?void 0:r.field)===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),v=n.useCallback((()=>{const t=Do(e);t&&!e.current.getRow(t.id)&&e.current.setState((e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null}})))}),[e]);tt(e,{setCellFocus:l,setColumnHeaderFocus:s,unstable_moveFocusToRelativeCell:c}),n.useEffect((()=>{const t=(0,pa.A)(e.current.rootElementRef.current);return t.addEventListener("click",m),()=>{t.removeEventListener("click",m)}}),[e,m]),it(e,"columnHeaderBlur",f),it(e,"cellDoubleClick",u),it(e,"cellMouseDown",h),it(e,"cellKeyDown",d),it(e,"cellModeChange",g),it(e,"columnHeaderFocus",p),it(e,"rowsSet",v)})(o,e),((e,t)=>{var r;const o=ue(e,"useGridPreferencesPanel"),a=n.useRef(),l=n.useRef(),s=n.useCallback((()=>{o.debug("Hiding Preferences Panel");const t=Va(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((e=>(0,i.A)({},e,{preferencePanel:{open:!1}}))),e.current.forceUpdate()}),[e,o]),c=n.useCallback((()=>{l.current=setTimeout((()=>clearTimeout(a.current)),0)}),[]),u=n.useCallback((()=>{a.current=setTimeout(s,100)}),[s]),d=n.useCallback((t=>{o.debug("Opening Preferences Panel"),c(),e.current.setState((e=>(0,i.A)({},e,{preferencePanel:(0,i.A)({},e.preferencePanel,{open:!0,openedPanelValue:t})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[o,c,e]);tt(e,{showPreferences:d,hidePreferences:u});const p=n.useCallback(((r,n)=>{var o;const a=Va(e.current.state);return!n.exportOnlyDirtyModels||null!=(null==(o=t.initialState)?void 0:o.preferencePanel)||a.open?(0,i.A)({},r,{preferencePanel:a}):r}),[e,null==(r=t.initialState)?void 0:r.preferencePanel]),f=n.useCallback(((t,r)=>{const n=r.stateToRestore.preferencePanel;return null!=n&&e.current.setState((e=>(0,i.A)({},e,{preferencePanel:n}))),t}),[e]);At(e,"exportState",p),At(e,"restoreState",f),n.useEffect((()=>()=>{clearTimeout(a.current),clearTimeout(l.current)}),[])})(o,e),((e,t)=>{var r,o,a;const l=ue(e,"useGridFilter");e.current.unstable_registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Ee,changeEvent:"filterModelChange"});const s=n.useCallback((()=>{e.current.setState((r=>{const n=Ee(r,e.current.instanceId),o=t.filterMode===ha?((e,t)=>{const r=((e,t)=>{const{items:r}=e,n=r.map((e=>Sa(e,t))).filter((e=>!!e));return 0===n.length?null:(e,t)=>{const r={};return(t?n.filter((e=>t(e.item.columnField))):n).forEach((t=>{r[t.item.id]=t.fn(e)})),r}})(e,t),n=((e,t)=>{const{quickFilterValues:r=[]}=e;if(0===r.length)return null;const n=E(t),o={};n.forEach((e=>{const n=t.current.getColumn(e),a=null==n?void 0:n.getApplyQuickFilterFn;a&&(o[e]=r.map((e=>a(e,n,t))))}));const a=r.filter(((e,t)=>Object.keys(o).some((e=>null!=o[e][t]))));return 0===a.length?null:(e,r)=>{const n={},i=[];Object.keys(o).forEach((o=>{r&&!r(o)||(n[o]=t.current.getCellParams(e,o),i.push(o))}));const l={};return a.forEach(((e,t)=>{const r=i.some((e=>{var r,a;return null!=o[e][t]&&(null==(r=(a=o[e])[t])?void 0:r.call(a,n[e]))}));l[e]=r})),l}})(e,t);return(e,t)=>({passingFilterItems:r&&r(e,t),passingQuickFilterValues:n&&n(e,t)})})(n,e):null,a=e.current.unstable_applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:null!=n?n:ga()});return(0,i.A)({},r,{filter:(0,i.A)({},r.filter,a)})})),e.current.publishEvent("filteredRowsSet")}),[t.filterMode,e]),c=n.useCallback((()=>{s(),e.current.forceUpdate()}),[e,s]),u=n.useCallback((t=>{const r=Ee(e),n=[...r.items],o=n.findIndex((e=>e.id===t.id));-1===o?n.push(t):n[o]=t,e.current.setFilterModel((0,i.A)({},r,{items:n}),"upsertFilterItem")}),[e]),d=n.useCallback((t=>{const r=Ee(e),n=[...r.items];t.forEach((e=>{const r=t.findIndex((t=>t.id===e.id));-1===r?n.push(e):n[r]=e})),e.current.setFilterModel((0,i.A)({},r,{items:t}),"upsertFilterItems")}),[e]),p=n.useCallback((t=>{const r=Ee(e),n=r.items.filter((e=>e.id!==t.id));n.length!==r.items.length&&e.current.setFilterModel((0,i.A)({},r,{items:n}),"deleteFilterItem")}),[e]),f=n.useCallback((r=>{if(l.debug("Displaying filter panel"),r){const n=Ee(e),o=n.items.filter((t=>{var r;if(void 0!==t.value)return!0;const n=null==(r=e.current.getColumn(t.columnField).filterOperators)?void 0:r.find((e=>e.value===t.operatorValue));return!(void 0===(null==n?void 0:n.requiresFilterValue)||(null==n?void 0:n.requiresFilterValue))}));let a;a=o.find((e=>e.columnField===r))?o:t.disableMultipleColumnsFiltering?[ba({columnField:r},e)]:[...o,ba({columnField:r},e)],e.current.setFilterModel((0,i.A)({},n,{items:a}))}e.current.showPreferences(So.filters)}),[e,l,t.disableMultipleColumnsFiltering]),h=n.useCallback((()=>{l.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,l]),m=n.useCallback((t=>{const r=Ee(e);r.linkOperator!==t&&e.current.setFilterModel((0,i.A)({},r,{linkOperator:t}),"changeLogicOperator")}),[e]),g=n.useCallback((t=>{const r=Ee(e);Ke(r.quickFilterValues,t)||e.current.setFilterModel((0,i.A)({},r,{quickFilterValues:[...t]}))}),[e]),v=n.useCallback(((r,n)=>{Ee(e)!==r&&(l.debug("Setting filter model"),e.current.unstable_updateControlState("filter",Ca(r,t.disableMultipleColumnsFiltering,e),n),e.current.unstable_applyFilters())}),[e,l,t.disableMultipleColumnsFiltering]),b=n.useCallback((()=>{const t=Me(e);return new Map(t.map((e=>[e.id,e.model])))}),[e]);tt(e,{setFilterLinkOperator:m,unstable_applyFilters:c,deleteFilterItem:p,upsertFilterItem:u,upsertFilterItems:d,setFilterModel:v,showFilterPanel:f,hideFilterPanel:h,getVisibleRowModels:b,setQuickFilterValues:g});const y=n.useCallback(((r,n)=>{var o,a;const l=Ee(e);return n.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(o=t.initialState)||null==(a=o.filter)?void 0:a.filterModel)&&Ke(l,ga())?r:(0,i.A)({},r,{filter:{filterModel:l}})}),[e,t.filterModel,null==(r=t.initialState)||null==(o=r.filter)?void 0:o.filterModel]),x=n.useCallback(((r,n)=>{var o;const a=null==(o=n.stateToRestore.filter)?void 0:o.filterModel;return null==a?r:(e.current.unstable_updateControlState("filter",Ca(a,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,i.A)({},r,{callbacks:[...r.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),w=n.useCallback(((e,r)=>{if(r===So.filters){var n;const e=t.components.FilterPanel;return(0,le.jsx)(e,(0,i.A)({},null==(n=t.componentsProps)?void 0:n.filterPanel))}return e}),[t.components.FilterPanel,null==(a=t.componentsProps)?void 0:a.filterPanel]),A=n.useCallback((r=>{if(t.filterMode===ha&&r.isRowMatchingFilters){const t=ne(e),n={};for(let o=0;o{l.debug("onColUpdated - GridColumns changed, applying filters");const t=Ee(e),r=$(e),n=t.items.filter((e=>e.columnField&&r[e.columnField]));n.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]);it(e,"rowsSet",s),it(e,"rowExpansionChange",e.current.unstable_applyFilters),it(e,"columnsChange",C),it(e,"activeStrategyProcessorChange",S),wt((()=>{e.current.unstable_applyFilters()})),n.useEffect((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,l,t.filterModel])})(o,e),((e,t)=>{var r,o;const a=ue(e,"useGridSorting");e.current.unstable_registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Se,changeEvent:"sortModelChange"});const l=n.useCallback(((t,r)=>{const n=Se(e),o=n.findIndex((e=>e.field===t));let a=[...n];return o>-1?r?a.splice(o,1,r):a.splice(o,1):a=[...n,r],a}),[e]),s=n.useCallback(((r,n)=>{var o;const a=Se(e).find((e=>e.field===r.field));if(a){var l;const e=void 0===n?lr(null!=(l=r.sortingOrder)?l:t.sortingOrder,a.sort):n;return null==e?void 0:(0,i.A)({},a,{sort:e})}return{field:r.field,sort:void 0===n?lr(null!=(o=r.sortingOrder)?o:t.sortingOrder):n}}),[e,t.sortingOrder]),c=n.useCallback((()=>{e.current.setState((r=>{if("server"===t.sortingMode)return a.debug("Skipping sorting rows as sortingMode = server"),(0,i.A)({},r,{sorting:(0,i.A)({},r.sorting,{sortedRows:ne(r,e.current.instanceId)})});const n=((e,t)=>{const r=e.map((e=>((e,t)=>{const r=t.current.getColumn(e.field);return r?{getSortCellParams:e=>({id:e,field:r.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*r.sortComparator(...e):r.sortComparator}:null})(e,t))).filter((e=>!!e));return 0===r.length?null:e=>e.map((e=>({node:e,params:r.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>{return n=e,o=t,r.reduce(((e,t,r)=>{if(0!==e)return e;const a=n.params[r],i=o.params[r];return t.comparator(a.value,i.value,a,i)}),0);var n,o})).map((e=>e.node.id))})(Se(r,e.current.instanceId),e),o=e.current.unstable_applyStrategyProcessor("sorting",{sortRowList:n});return(0,i.A)({},r,{sorting:(0,i.A)({},r.sorting,{sortedRows:o})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,a,t.sortingMode]),u=n.useCallback((r=>{Se(e)!==r&&(a.debug("Setting sort model"),e.current.setState(ir(r,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,a,t.disableMultipleColumnsSorting]),d=n.useCallback(((r,n,o)=>{if(!r.sortable)return;const a=s(r,n);let i;i=!o||t.disableMultipleColumnsSorting?a?[a]:[]:l(r.field,a),e.current.setSortModel(i)}),[e,l,s,t.disableMultipleColumnsSorting]),p=n.useCallback((()=>Se(e)),[e]),f=n.useCallback((()=>Ce(e).map((e=>e.model))),[e]),h=n.useCallback((()=>Ae(e)),[e]),m=n.useCallback((t=>e.current.getSortedRowIds().indexOf(t)),[e]),g=n.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);tt(e,{getSortModel:p,getSortedRows:f,getSortedRowIds:h,getRowIndex:m,getRowIdFromRowIndex:g,setSortModel:u,sortColumn:d,applySorting:c});const v=n.useCallback(((r,n)=>{var o,a;const l=Se(e);return!n.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)||l.length>0?(0,i.A)({},r,{sorting:{sortModel:l}}):r}),[e,t.sortModel,null==(r=t.initialState)||null==(o=r.sorting)?void 0:o.sortModel]),b=n.useCallback(((r,n)=>{var o;const a=null==(o=n.stateToRestore.sorting)?void 0:o.sortModel;return null==a?r:(e.current.setState(ir(a,t.disableMultipleColumnsSorting)),(0,i.A)({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),y=n.useCallback((t=>{const r=ee(e);if(!t.sortRowList){const t=[],n=[];return ne(e).forEach((e=>{r[e].isPinned||("footer"===r[e].position?n.push(e):t.push(e))})),[...t,...n]}const n=[],o=[];return Object.values(r).forEach((e=>{e.isPinned||("footer"===e.position?o.push(e.id):n.push(e))})),[...t.sortRowList(n),...o]}),[e]);At(e,"exportState",v),At(e,"restoreState",b),va(e,ft,"sorting",y);const x=n.useCallback((({colDef:e},t)=>{const r=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,r)}),[d]),w=n.useCallback((({colDef:e},t)=>{!$n(t.key)||t.ctrlKey||t.metaKey||d(e,void 0,t.shiftKey)}),[d]),A=n.useCallback((()=>{const t=Se(e),r=j(e);if(t.length>0){const n=t.filter((e=>r[e.field]));n.length{"sorting"===t&&e.current.applySorting()}),[e]);it(e,"columnHeaderClick",x),it(e,"columnHeaderKeyDown",w),it(e,"rowsSet",e.current.applySorting),it(e,"columnsChange",A),it(e,"activeStrategyProcessorChange",C),wt((()=>{e.current.applySorting()})),n.useEffect((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(o,e),((e,t)=>{const r=z(e,P),o=r.length>0?Math.max(...r.map((e=>{var t,r;return null!=(t=null==(r=e.groupPath)?void 0:r.length)?t:0}))):0,a=ue(e,"useDensity"),l=n.useCallback(((r,n=t.headerHeight,l=t.rowHeight,s=o)=>{a.debug(`Set grid density to ${r}`),e.current.setState((e=>{const t=B(e),o=To(r,n,l,s);return Ke(t,o)?e:(0,i.A)({},e,{density:o})})),e.current.forceUpdate()}),[a,e,t.headerHeight,t.rowHeight,o]);n.useEffect((()=>{e.current.setDensity(t.density,t.headerHeight,t.rowHeight,o)}),[e,t.density,t.rowHeight,t.headerHeight,o]),tt(e,{setDensity:l})})(o,e),((e,t)=>{((e,t)=>{var r,o;const a=ue(e,"useGridPageSize"),l=z(e,V);e.current.unstable_registerControlState({stateId:"pageSize",propModel:t.pageSize,propOnChange:t.onPageSizeChange,stateSelector:Zo,changeEvent:"pageSizeChange"});const s=n.useCallback((t=>{t!==Zo(e)&&(a.debug(`Setting page size to ${t}`),e.current.setState(Fa(t)),e.current.forceUpdate())}),[e,a]);tt(e,{setPageSize:s});const c=n.useCallback(((r,n)=>{var o,a;const l=Zo(e);return n.exportOnlyDirtyModels&&null==t.pageSize&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.pageSize)&&l===za(t.autoPageSize)?r:(0,i.A)({},r,{pagination:(0,i.A)({},r.pagination,{pageSize:l})})}),[e,t.pageSize,null==(r=t.initialState)||null==(o=r.pagination)?void 0:o.pageSize,t.autoPageSize]),u=n.useCallback(((t,r)=>{var n;const o=null==(n=r.stateToRestore.pagination)?void 0:n.pageSize;return null!=o&&e.current.setState(Fa(o)),t}),[e]);At(e,"exportState",c),At(e,"restoreState",u);const d=n.useCallback((()=>{const r=e.current.getRootDimensions();if(!t.autoPageSize||!r)return;const n=La(e),o=Math.floor((r.viewportInnerSize.height-n.top-n.bottom)/l);e.current.setPageSize(o)}),[e,t.autoPageSize,l]);it(e,"viewportInnerSizeChange",d),n.useEffect((()=>{null==t.pageSize||t.autoPageSize||e.current.setPageSize(t.pageSize)}),[e,t.autoPageSize,t.pageSize]),n.useEffect((()=>{d()}),[d])})(e,t),((e,t)=>{var r,o;const a=ue(e,"useGridPage"),l=z(e,Le);e.current.unstable_registerControlState({stateId:"page",propModel:t.page,propOnChange:t.onPageChange,stateSelector:Xo,changeEvent:"pageChange"});const s=n.useCallback((t=>{a.debug(`Setting page to ${t}`),e.current.setState(Ba(t)),e.current.forceUpdate()}),[e,a]);tt(e,{setPage:s});const c=n.useCallback(((r,n)=>{var o,a;const l=Xo(e);return n.exportOnlyDirtyModels&&null==t.page&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.page)&&0===l?r:(0,i.A)({},r,{pagination:(0,i.A)({},r.pagination,{page:l})})}),[e,t.page,null==(r=t.initialState)||null==(o=r.pagination)?void 0:o.page]),u=n.useCallback(((t,r)=>{var n,o;const a=null!=(n=null==(o=r.stateToRestore.pagination)?void 0:o.page)?n:Xo(e);return e.current.setState(Ba(a)),t}),[e]);At(e,"exportState",c),At(e,"restoreState",u),it(e,"pageSizeChange",(t=>{e.current.setState((e=>{const r=Da(e.pagination.rowCount,t);return(0,i.A)({},e,{pagination:Na((0,i.A)({},e.pagination,{pageCount:r,page:e.pagination.page}))})})),e.current.forceUpdate()})),it(e,"pageChange",(()=>e.current.scrollToIndexes({rowIndex:Xo(e)*Zo(e)}))),n.useEffect((()=>{}),[t.rowCount,t.paginationMode]),n.useEffect((()=>{e.current.setState((e=>{const r=void 0!==t.rowCount?t.rowCount:l,n=Da(r,e.pagination.pageSize),o=null==t.page?e.pagination.page:t.page;return(0,i.A)({},e,{pagination:Na((0,i.A)({},e.pagination,{page:o,rowCount:r,pageCount:n}))})})),e.current.forceUpdate()}),[l,t.rowCount,t.page,t.paginationMode,e])})(e,t)})(o,e),((e,t)=>{const{getRowHeight:r,getRowSpacing:o,getEstimatedRowHeight:a}=t,l=n.useRef({}),s=n.useRef(-1),u=n.useRef(!1),d=z(e,V),p=z(e,_e),f=z(e,Ko),h=z(e,we),m=ja(e,t),g=z(e,ae),v=n.useCallback((()=>{var t,n;u.current=!1;const c=q(e.current.state,e.current.instanceId),p=t=>{l.current[t.id]||(l.current[t.id]={sizes:{baseCenter:d},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:n,needsFirstMeasurement:s,sizes:p}=l.current[t.id];let f=d;const h=p.baseCenter;if(n)f=h;else if(r){const e=r((0,i.A)({},t,{densityFactor:c}));if("auto"===e){if(s){const e=a?a((0,i.A)({},t,{densityFactor:c})):d;f=null!=e?e:d}else f=h;u.current=!0,l.current[t.id].autoHeight=!0}else f=null!=e?e:d,l.current[t.id].needsFirstMeasurement=!1,l.current[t.id].autoHeight=!1}else l.current[t.id].needsFirstMeasurement=!1;const g=Object.entries(p).reduce(((e,[t,r])=>(/^base[A-Z]/.test(t)&&(e[t]=r),e)),{}),v=(0,i.A)({},g,{baseCenter:f});if(o){var b,y;const r=e.current.getRowIndexRelativeToVisibleRows(t.id),n=o((0,i.A)({},t,{isFirstVisible:0===r,isLastVisible:r===m.rows.length-1,indexRelativeToCurrentPage:r}));v.spacingTop=null!=(b=n.top)?b:0,v.spacingBottom=null!=(y=n.bottom)?y:0}const x=e.current.unstable_applyPipeProcessors("rowHeight",v,t);return l.current[t.id].sizes=x,x},f=[],h=m.rows.reduce(((e,t)=>{f.push(e);let r=0,n=0;const o=p(t);return Object.entries(o).forEach((([e,t])=>{/^base[A-Z]/.test(e)?r=t>r?t:r:n+=t})),e+r+n}),0);null==g||null==(t=g.top)||t.forEach((e=>{p(e)})),null==g||null==(n=g.bottom)||n.forEach((e=>{p(e)})),e.current.setState((e=>(0,i.A)({},e,{rowsMeta:{currentPageTotalHeight:h,positions:f}}))),u.current||(s.current=1/0),e.current.forceUpdate()}),[e,m.rows,d,r,o,a,g]),b=n.useCallback((e=>{const t=l.current[e];return t?t.sizes.baseCenter:d}),[d]),y=n.useCallback(((e,t)=>{l.current[e].sizes.baseCenter=t,l.current[e].isResized=!0,l.current[e].needsFirstMeasurement=!1,v()}),[v]),x=n.useMemo((()=>(0,mi.A)(v)),[v]),w=n.useCallback(((e,t,r)=>{if(!l.current[e]||!l.current[e].autoHeight)return;const n=l.current[e].sizes[`base${(0,c.A)(r)}`]!==t;l.current[e].needsFirstMeasurement=!1,l.current[e].sizes[`base${(0,c.A)(r)}`]=t,n&&x()}),[x]),A=n.useCallback((e=>{var t;return(null==(t=l.current[e])?void 0:t.autoHeight)||!1}),[]),C=n.useCallback((()=>s.current),[]),S=n.useCallback((e=>{u.current&&e>s.current&&(s.current=e)}),[]),k=n.useCallback((()=>{l.current={},v()}),[v]);n.useEffect((()=>{v()}),[d,p,f,h,v]),Ct(e,"rowHeight",v),tt(e,{unstable_getLastMeasuredRowIndex:C,unstable_setLastMeasuredRowIndex:S,unstable_rowHasAutoHeight:A,unstable_getRowHeight:b,unstable_getRowInternalSizes:e=>{var t;return null==(t=l.current[e])?void 0:t.sizes},unstable_setRowHeight:y,unstable_storeRowHeightMeasurement:w,resetRowHeights:k})})(o,e),((e,t)=>{const r=ue(e,"useGridScroll"),o=e.current.columnHeadersElementRef,a=e.current.windowRef,i=z(e,Me),l=n.useCallback((n=>{const o=X(e),l=P(e);if(null!=n.rowIndex&&0===o||0===l.length)return!1;r.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let s={};if(null!=n.colIndex){const t=O(e);let r;if(void 0!==n.rowIndex){var c;const t=null==(c=i[n.rowIndex])?void 0:c.id,o=e.current.unstable_getCellColSpanInfo(t,n.colIndex);o&&!o.spannedByColSpan&&(r=o.cellProps.width)}void 0===r&&(r=l[n.colIndex].computedWidth),s.left=hi({clientHeight:a.current.clientWidth,scrollTop:a.current.scrollLeft,offsetHeight:r,offsetTop:t[n.colIndex]})}if(null!=n.rowIndex){var u,d;const r=fa(e.current.state),o=Xo(e),i=Zo(e),l=t.pagination?n.rowIndex-o*i:n.rowIndex,c=r.positions[l+1]?r.positions[l+1]-r.positions[l]:r.currentPageTotalHeight-r.positions[l],p=(null==(u=a.current.querySelector(`.${m.x["pinnedRows--top"]}`))?void 0:u.clientHeight)||0,f=(null==(d=a.current.querySelector(`.${m.x["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;s.top=hi({clientHeight:a.current.clientHeight-p-f,scrollTop:a.current.scrollTop,offsetHeight:c,offsetTop:r.positions[l]})}return s=e.current.unstable_applyPipeProcessors("scrollToIndexes",s,n),(void 0!==typeof s.left||void 0!==typeof s.top)&&(e.current.scroll(s),!0)}),[r,e,a,t.pagination,i]),s=n.useCallback((e=>{a.current&&null!=e.left&&o.current&&(o.current.scrollLeft=e.left,a.current.scrollLeft=e.left,r.debug(`Scrolling left: ${e.left}`)),a.current&&null!=e.top&&(a.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[a,o,r]),c=n.useCallback((()=>null!=a&&a.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0}),[a]);tt(e,{scroll:s,scrollToIndexes:l,getScrollPosition:c})})(o,e),(e=>{const t=ue(e,"useGridColumnMenu"),r=n.useCallback((r=>{e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),(0,i.A)({},e,{columnMenu:{open:!0,field:r}}))))&&(e.current.hidePreferences(),e.current.forceUpdate())}),[e,t]),o=n.useCallback((()=>{e.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),(0,i.A)({},e,{columnMenu:(0,i.A)({},e.columnMenu,{open:!1,field:void 0})})):e))&&e.current.forceUpdate()}),[e,t]),a=n.useCallback((n=>{t.debug("Toggle Column Menu");const a=yt(e.current.state);a.open&&a.field===n?o():r(n)}),[e,t,r,o]);tt(e,{showColumnMenu:r,hideColumnMenu:o,toggleColumnMenu:a});const l=n.useCallback(((t,r)=>{if(!r.target.classList.contains(m.x.menuIconButton))return;if(!r.relatedTarget)return;const n=r.relatedTarget.classList.contains(m.x.menuList),o="menuitem"===r.relatedTarget.getAttribute("role");(n||o)&&e.current.setColumnHeaderFocus(t.field)}),[e]);it(e,"columnResizeStart",o),it(e,"columnHeaderFocus",l),it(e,"virtualScrollerWheel",e.current.hideColumnMenu),it(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(o),da(o),((e,t)=>{const r=ue(e,"useGridPrintExport"),o=n.useRef(null),a=n.useRef(null),l=n.useRef({});n.useEffect((()=>{o.current=(0,pa.A)(e.current.rootElementRef.current)}),[e]);const s=n.useCallback(((t,r)=>new Promise((n=>{if(!t&&!r)return void n();const o=aa({apiRef:e,options:{fields:t,allColumns:r}}).map((e=>e.field)),a=R(e),i={};a.forEach((e=>{i[e.field]=o.includes(e.field)})),e.current.setColumnVisibilityModel(i),n()}))),[e]),c=n.useCallback((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}),[]),u=n.useCallback(((t,r)=>{var n,a;const l=(0,i.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1},r),s=t.contentDocument;if(!s)return;const c=G(e),u=fa(e.current.state),d=e.current.rootElementRef.current,p=d.cloneNode(!0),f=p.querySelector(`.${m.x.virtualScroller}`);f.style.height="auto",f.style.width="auto",f.parentElement.style.width="auto",f.parentElement.style.height="auto",p.querySelector(`.${m.x.main}`).style.overflow="visible";const h=function(){const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):null}();h&&h>=108&&(p.style.contain="size"),p.querySelector(`.${m.x.columnHeaders}`).querySelector(`.${m.x.columnHeadersInner}`).style.width="100%";let g=(null==(n=d.querySelector(`.${m.x.toolbarContainer}`))?void 0:n.clientHeight)||0,v=(null==(a=d.querySelector(`.${m.x.footerContainer}`))?void 0:a.clientHeight)||0;var b,y;l.hideToolbar&&(null==(b=p.querySelector(`.${m.x.toolbarContainer}`))||b.remove(),g=0),l.hideFooter&&(null==(y=p.querySelector(`.${m.x.footerContainer}`))||y.remove(),v=0),p.style.height=`${u.currentPageTotalHeight+c+g+v}px`;const x=document.createElement("div");x.appendChild(p),s.body.innerHTML=x.innerHTML;const w="function"==typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"==typeof w){const e=s.createElement("style");e.appendChild(s.createTextNode(w)),s.head.appendChild(e)}if(l.bodyClassName&&s.body.classList.add(...l.bodyClassName.split(" ")),l.copyStyles){const e=o.current.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t{var r,n;o.current.body.removeChild(t),e.current.restoreState(a.current||{}),null!=(r=a.current)&&null!=(n=r.columns)&&n.columnVisibilityModel||e.current.setColumnVisibilityModel(l.current),e.current.unstable_enableVirtualization(),a.current=null,l.current={}}),[e]),p=n.useCallback((async n=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(a.current=e.current.exportState(),l.current=M(e),t.pagination){const t=$e(e);e.current.setPageSize(t)}await s(null==n?void 0:n.fields,null==n?void 0:n.allColumns),e.current.unstable_disableVirtualization(),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const i=c(null==n?void 0:n.fileName);i.onload=()=>{u(i,n),i.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&d(i)}))},o.current.body.appendChild(i)}),[t,r,e,c,u,d,s]);tt(e,{exportDataAsPrint:p});const f=n.useCallback(((e,t)=>{var r;return null!=(r=t.printOptions)&&r.disableToolbarButton?e:[...e,{component:(0,le.jsx)(ua,{options:t.printOptions}),componentName:"printExport"}]}),[]);At(e,"exportMenu",f)})(o,e),(e=>{const t=n.useCallback(((t=!1)=>{if(0===e.current.getSelectedRows().size)return;const r=e.current.getDataAsCsv({includeHeaders:t,delimiter:"\t"});navigator.clipboard?navigator.clipboard.writeText(r).catch((()=>{bt(r)})):bt(r)}),[e]),r=n.useCallback((t=>{const r=t.ctrlKey||t.metaKey||t.altKey;var n,o;"C"===String.fromCharCode(t.keyCode)&&r&&(n=t.target,""!==(null==(o=window.getSelection())?void 0:o.toString())||n&&(n.selectionEnd||0)-(n.selectionStart||0)>0||e.current.unstable_copySelectedRowsToClipboard(t.altKey))}),[e]);((e,t,r,o,a)=>{const i=ue(e,"useNativeEventListener"),[l,s]=n.useState(!1),c=n.useRef(o),u=n.useCallback((e=>c.current&&c.current(e)),[]);n.useEffect((()=>{c.current=o}),[o]),n.useEffect((()=>{let n;if(n=Ue(t)?t():t&&t.current?t.current:null,n&&r&&!l){i.debug(`Binding native ${r} event`),n.addEventListener(r,u,a);const t=n;s(!0);const o=()=>{i.debug(`Clearing native ${r} event`),t.removeEventListener(r,u,a)};e.current.subscribeEvent("unmount",o)}}),[t,u,r,l,i,a,e])})(e,e.current.rootElementRef,"keydown",r),tt(e,{unstable_copySelectedRowsToClipboard:t})})(o),function(e,t){const r=ue(e,"useResizeContainer"),o=n.useRef(!1),a=n.useRef(null),i=n.useRef(null),l=z(e,fa),s=z(e,G),c=n.useCallback((()=>{var r;const n=null==(r=e.current.rootElementRef)?void 0:r.current,o=I(e),c=La(e);if(!a.current)return;let u,d,p,f;if(null!=t.scrollbarSize)u=t.scrollbarSize;else if(o&&n){const e=(0,pa.A)(n).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",n.appendChild(e),u=e.offsetWidth-e.clientWidth,n.removeChild(e)}else u=0;if(t.autoHeight)f=!1,p=Math.round(o)>a.current.width,d={width:a.current.width,height:l.currentPageTotalHeight+(p?u:0)};else{d={width:a.current.width,height:a.current.height-s};const e=(({content:e,container:t,scrollBarSize:r})=>{const n=e.width>t.width,o=e.height>t.height;let a=!1,i=!1;return(n||o)&&(a=n,i=e.height+(a?r:0)>t.height,i&&(a=e.width+r>t.width)),{hasScrollX:a,hasScrollY:i}})({content:{width:Math.round(o),height:l.currentPageTotalHeight},container:{width:d.width,height:d.height-c.top-c.bottom},scrollBarSize:u});f=e.hasScrollY,p=e.hasScrollX}const h={viewportOuterSize:d,viewportInnerSize:{width:d.width-(f?u:0),height:d.height-(p?u:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:u},m=i.current;i.current=h,h.viewportInnerSize.width===(null==m?void 0:m.viewportInnerSize.width)&&h.viewportInnerSize.height===(null==m?void 0:m.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)}),[e,t.scrollbarSize,t.autoHeight,s,l.currentPageTotalHeight]),u=n.useCallback((()=>{c(),e.current.publishEvent("debouncedResize",a.current)}),[e,c]),p=n.useCallback((()=>i.current),[]),f=n.useCallback((()=>{const r=e.current.getRootDimensions();if(!r)return 0;const n=Ea(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.unstable_getRenderContext(),r=t.lastRowIndex-t.firstRowIndex;return Math.min(r-1,n.rows.length)}const o=Math.floor(r.viewportInnerSize.height/V(e));return Math.min(o,n.rows.length)}),[e,t.pagination,t.paginationMode,t.getRowHeight]);tt(e,{resize:u,getRootDimensions:p,unstable_getViewportPageSize:f,unstable_updateGridDimensionsRef:c});const h=n.useMemo((()=>(0,mi.A)(u,60)),[u]),m=n.useRef(!0),g=n.useCallback((e=>{a.current=e;const n=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||o.current||t.autoHeight||n||(r.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")),o.current=!0),0!==e.width||o.current||n||(r.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")),o.current=!0),m.current)return u(),void(m.current=!1);h()}),[t.autoHeight,h,r,u]);(0,d.A)((()=>c()),[c]),st(e,"sortedRowsSet",c),st(e,"pageChange",c),st(e,"pageSizeChange",c),st(e,"columnsChange",c),it(e,"resize",g),st(e,"debouncedResize",t.onResize)}(o,e),function(e,t){st(e,"columnHeaderClick",t.onColumnHeaderClick),st(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),st(e,"columnHeaderOver",t.onColumnHeaderOver),st(e,"columnHeaderOut",t.onColumnHeaderOut),st(e,"columnHeaderEnter",t.onColumnHeaderEnter),st(e,"columnHeaderLeave",t.onColumnHeaderLeave),st(e,"columnOrderChange",t.onColumnOrderChange),st(e,"cellClick",t.onCellClick),st(e,"cellDoubleClick",t.onCellDoubleClick),st(e,"cellKeyDown",t.onCellKeyDown),st(e,"cellFocusOut",t.onCellFocusOut),st(e,"preferencePanelClose",t.onPreferencePanelClose),st(e,"preferencePanelOpen",t.onPreferencePanelOpen),st(e,"menuOpen",t.onMenuOpen),st(e,"menuClose",t.onMenuClose),st(e,"rowDoubleClick",t.onRowDoubleClick),st(e,"rowClick",t.onRowClick),st(e,"componentError",t.onError),st(e,"stateChange",t.onStateChange)}(o,e),(e=>{const t=n.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),r=n.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e]);tt(e,{exportState:t,restoreState:r})})(o),o},bi={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",errorOverlayDefaultLabel:"An error occurred.",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",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelDeleteIconLabel:"Delete",filterPanelLinkOperator:"Logic operator",filterPanelOperators:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide",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 yi=r(27558),xi=r(42471),wi=r(50779),Ai=r(2071),Ci=r(72205),Si=r(61224),ki=r(47839);const _i=["align","children","colIndex","colDef","cellMode","field","formattedValue","hasFocus","height","isEditable","rowId","tabIndex","value","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","onClick","onDoubleClick","onMouseDown","onMouseUp","onKeyDown","onDragEnter","onDragOver"];let Ei;var ji=r(17437);function Ri(e){return(0,Er.Ay)("MuiSkeleton",e)}(0,_r.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Mi=["animation","className","component","height","style","variant","width"];let Pi,Oi,Ii,Ti,$i=e=>e;const Li=(0,ji.i7)(Pi||(Pi=$i` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),zi=(0,ji.i7)(Oi||(Oi=$i` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),Fi=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})((({theme:e,ownerState:t})=>{const r=(a=e.shape.borderRadius,String(a).match(/[\d.\-+]*\s*(.*)/)[1]||""||"px"),n=(o=e.shape.borderRadius,parseFloat(o));var o,a;return(0,i.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,h.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${r}/${Math.round(n/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})}),(({ownerState:e})=>"pulse"===e.animation&&(0,ji.AH)(Ii||(Ii=$i` animation: ${0} 2s ease-in-out 0.5s infinite; `),Li)),(({ownerState:e,theme:t})=>"wave"===e.animation&&(0,ji.AH)(Ti||(Ti=$i` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 2s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),zi,(t.vars||t).palette.action.hover))),Di=n.forwardRef((function(e,t){const r=(0,kr.A)({props:e,name:"MuiSkeleton"}),{animation:n="pulse",className:o,component:a="span",height:s,style:c,variant:u="text",width:d}=r,f=(0,l.A)(r,Mi),h=(0,i.A)({},r,{animation:n,component:a,variant:u,hasChildren:Boolean(f.children)}),m=(e=>{const{classes:t,variant:r,animation:n,hasChildren:o,width:a,height:i}=e,l={root:["root",r,n,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]};return(0,p.A)(l,Ri,t)})(h);return(0,le.jsx)(Fi,(0,i.A)({as:a,ref:t,className:(0,pr.A)(m.root,o),ownerState:h},f,{style:(0,i.A)({width:d,height:s},c)}))})),Ni=["field","align","width","contentWidth"];var Bi=r(92538);function Hi(e){return(0,Er.Ay)("MuiBadge",e)}const Vi=(0,_r.A)("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"]),Wi=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Ui=(0,Hr.h)("MuiBadge"),qi=(0,f.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Gi=(0,f.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${(0,c.A)(r.anchorOrigin.vertical)}${(0,c.A)(r.anchorOrigin.horizontal)}${(0,c.A)(r.overlap)}`],"default"!==r.color&&t[`color${(0,c.A)(r.color)}`],r.invisible&&t.invisible]}})((({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth: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.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r,n;return(null!=(r=e.vars)?r:e).palette[t].main&&(null!=(n=e.vars)?n:e).palette[t].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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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%",[`&.${Vi.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})}}]}})),Ki=n.forwardRef((function(e,t){var r,n,o,a,s,u;const d=Ui({props:e,name:"MuiBadge"}),{anchorOrigin:f={vertical:"top",horizontal:"right"},className:h,component:m,components:g={},componentsProps:v={},children:b,overlap:y="rectangular",color:x="default",invisible:w=!1,max:A=99,badgeContent:C,slots:S,slotProps:k,showZero:_=!1,variant:E="standard"}=d,j=(0,l.A)(d,Wi),{badgeContent:R,invisible:M,max:P,displayValue:O}=function(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,a=mr({badgeContent:t,max:n});let i=r;!1!==r||0!==t||o||(i=!0);const{badgeContent:l,max:s=n}=i?a:e;return{badgeContent:l,invisible:i,max:s,displayValue:l&&Number(l)>s?`${s}+`:l}}({max:A,invisible:w,badgeContent:C,showZero:_}),I=mr({anchorOrigin:f,color:x,overlap:y,variant:E,badgeContent:C}),T=M||null==R&&"dot"!==E,{color:$=x,overlap:L=y,anchorOrigin:z=f,variant:F=E}=T?I:d,D="dot"!==F?O:void 0,N=(0,i.A)({},d,{badgeContent:R,invisible:T,max:P,displayValue:D,showZero:_,anchorOrigin:z,color:$,overlap:L,variant:F}),B=(e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:a,classes:i={}}=e,l={root:["root"],badge:["badge",a,n&&"invisible",`anchorOrigin${(0,c.A)(r.vertical)}${(0,c.A)(r.horizontal)}`,`anchorOrigin${(0,c.A)(r.vertical)}${(0,c.A)(r.horizontal)}${(0,c.A)(o)}`,`overlap${(0,c.A)(o)}`,"default"!==t&&`color${(0,c.A)(t)}`]};return(0,p.A)(l,Hi,i)})(N),H=null!=(r=null!=(n=null==S?void 0:S.root)?n:g.Root)?r:qi,V=null!=(o=null!=(a=null==S?void 0:S.badge)?a:g.Badge)?o:Gi,W=null!=(s=null==k?void 0:k.root)?s:v.root,U=null!=(u=null==k?void 0:k.badge)?u:v.badge,q=(0,Bi.Q)({elementType:H,externalSlotProps:W,externalForwardedProps:j,additionalProps:{ref:t,as:m},ownerState:N,className:(0,pr.A)(null==W?void 0:W.className,B.root,h)}),G=(0,Bi.Q)({elementType:V,externalSlotProps:U,ownerState:N,className:(0,pr.A)(B.badge,null==U?void 0:U.className)});return(0,le.jsxs)(H,(0,i.A)({},q,{children:[b,(0,le.jsx)(V,(0,i.A)({},G,{children:D}))]}))})),Xi=["className"],Zi=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Yi=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,Xi),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["iconButtonContainer"]},m.B,t)})(o);return(0,le.jsx)(Zi,(0,i.A)({ref:t,className:(0,s.A)(a.root,r),ownerState:o},n))})),Qi=["hideMenu","currentColumn","open","id","labelledby","className","children"],Ji=n.forwardRef((function(e,t){const{hideMenu:r,open:o,id:a,labelledby:c,className:u,children:d}=e,p=(0,l.A)(e,Qi),f=n.useCallback((e=>{var t;Ln(e.key)&&e.preventDefault(),t=e.key,(Ln(t)||Tn(t))&&r(e)}),[r]);return(0,le.jsx)(oo.A,(0,i.A)({id:a,ref:t,className:(0,s.A)(m.x.menuList,u),"aria-labelledby":c,onKeyDown:f,autoFocus:o},p,{children:d}))})),el=e=>{const{onClick:t}=e,r=D(),o=(0,N.A)(),a=n.useCallback((e=>{t(e),r.current.showPreferences(So.columns)}),[r,t]);return o.disableColumnSelector?null:(0,le.jsx)(Kt.A,{onClick:a,children:r.current.getLocaleText("columnMenuShowColumns")})},tl=e=>{const{column:t,onClick:r}=e,o=D(),a=(0,N.A)(),i=n.useCallback((e=>{r(e),o.current.showFilterPanel(null==t?void 0:t.field)}),[o,null==t?void 0:t.field,r]);return a.disableColumnFilter||null==t||!t.filterable?null:(0,le.jsx)(Kt.A,{onClick:i,children:o.current.getLocaleText("columnMenuFilter")})},rl=e=>{const{column:t,onClick:r}=e,o=D(),a=(0,N.A)(),i=n.useRef(),l=1===P(o).filter((e=>!0!==e.disableColumnMenu)).length,s=n.useCallback((e=>{l||(r(e),i.current=setTimeout((()=>{o.current.setColumnVisibility(null==t?void 0:t.field,!1)}),100))}),[o,null==t?void 0:t.field,r,l]);return n.useEffect((()=>()=>clearTimeout(i.current)),[]),a.disableColumnSelector||!1===t.hideable?null:(0,le.jsx)(Kt.A,{onClick:s,disabled:l,children:o.current.getLocaleText("columnMenuHideColumn")})};function nl(e){var t;const{column:r,onClick:o}=e,a=D(),i=z(a,Se),l=(0,N.A)(),s=null!=(t=r.sortingOrder)?t:l.sortingOrder,c=n.useMemo((()=>{if(!r)return null;const e=i.find((e=>e.field===r.field));return null==e?void 0:e.sort}),[r,i]),u=n.useCallback((e=>{o(e);const t=e.currentTarget.getAttribute("data-value")||null;a.current.sortColumn(r,t)}),[a,r,o]);return r&&r.sortable?(0,le.jsxs)(n.Fragment,{children:[s.includes(null)?(0,le.jsx)(Kt.A,{onClick:u,disabled:null==c,children:a.current.getLocaleText("columnMenuUnsort")}):null,s.includes("asc")?(0,le.jsx)(Kt.A,{onClick:u,"data-value":"asc",disabled:"asc"===c,children:a.current.getLocaleText("columnMenuSortAsc")}):null,s.includes("desc")?(0,le.jsx)(Kt.A,{onClick:u,"data-value":"desc",disabled:"desc"===c,children:a.current.getLocaleText("columnMenuSortDesc")}):null]}):null}const ol=n.forwardRef((function(e,t){const{hideMenu:r,currentColumn:o}=e,a=D(),l=[(0,le.jsx)(nl,{onClick:r,column:o}),(0,le.jsx)(tl,{onClick:r,column:o}),(0,le.jsx)(rl,{onClick:r,column:o}),(0,le.jsx)(el,{onClick:r,column:o})],s=a.current.unstable_applyPipeProcessors("columnMenu",l,o);return(0,le.jsx)(Ji,(0,i.A)({ref:t},e,{children:s.map(((e,t)=>n.cloneElement(e,{key:t,onClick:r,column:o})))}))})),al=["className","rowCount","visibleRowCount"],il=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)}))),ll=n.forwardRef((function(e,t){const{className:r,rowCount:n,visibleRowCount:o}=e,a=(0,l.A)(e,al),c=D(),u=(0,N.A)(),d=(e=>{const{classes:t}=e;return(0,p.A)({root:["rowCount"]},m.B,t)})(u);if(0===n)return null;const f=ot.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"}}))),ul=n.forwardRef((function(e,t){const{className:r,selectedRowCount:n}=e,o=(0,l.A)(e,sl),a=D(),c=(0,N.A)(),u=(e=>{const{classes:t}=e;return(0,p.A)({root:["selectedRowCount"]},m.B,t)})(c),d=a.current.getLocaleText("footerRowSelected")(n);return(0,le.jsx)(cl,(0,i.A)({ref:t,className:(0,s.A)(u.root,r),ownerState:c},o,{children:d}))})),dl=["className"],pl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})((({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:`1px solid ${"light"===e.palette.mode?(0,h.a)((0,h.X4)(e.palette.divider,1),.88):(0,h.e$)((0,h.X4)(e.palette.divider,1),.68)}`}))),fl=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,dl),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["footerContainer"]},m.B,t)})(o);return(0,le.jsx)(pl,(0,i.A)({ref:t,className:(0,s.A)(a.root,r),ownerState:o},n))})),hl=n.forwardRef((function(e,t){var r;const n=D(),o=(0,N.A)(),a=z(n,Y),l=z(n,Uo),s=z(n,Le),c=!o.hideFooterSelectedRowCount&&l>0?(0,le.jsx)(ul,{selectedRowCount:l}):(0,le.jsx)("div",{}),u=o.hideFooterRowCount||o.pagination?null:(0,le.jsx)(ll,{rowCount:a,visibleRowCount:s}),d=o.pagination&&!o.hideFooterPagination&&o.components.Pagination&&(0,le.jsx)(o.components.Pagination,(0,i.A)({},null==(r=o.componentsProps)?void 0:r.pagination));return(0,le.jsxs)(fl,(0,i.A)({ref:t},e,{children:[c,u,d]}))})),ml=n.forwardRef((function(e,t){var r,n;const o=(0,N.A)();return(0,le.jsxs)("div",(0,i.A)({ref:t},e,{children:[(0,le.jsx)(o.components.PreferencesPanel,(0,i.A)({},null==(r=o.componentsProps)?void 0:r.preferencesPanel)),o.components.Toolbar&&(0,le.jsx)(o.components.Toolbar,(0,i.A)({},null==(n=o.componentsProps)?void 0:n.toolbar))]}))})),gl=n.forwardRef((function(e,t){var r,n,o;const a=D(),l=z(a,R),s=(0,N.A)(),c=z(a,Va),u=a.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(r=c.openedPanelValue)?r:So.filters);return(0,le.jsx)(s.components.Panel,(0,i.A)({ref:t,as:s.components.BasePopper,open:l.length>0&&c.open},null==(n=s.componentsProps)?void 0:n.panel,e,null==(o=s.componentsProps)?void 0:o.basePopper,{children:u}))}));var vl=r(73357),bl=r(9899);const yl=n.forwardRef((function(e,t){return(0,le.jsx)(bl.$,(0,i.A)({ref:t},e,{children:(0,le.jsx)(vl.A,{})}))})),xl=n.forwardRef((function(e,t){const r=D().current.getLocaleText("noRowsLabel");return(0,le.jsx)(bl.$,(0,i.A)({ref:t},e,{children:r}))}));var wl=r(25419);const Al=n.createContext(),Cl=n.createContext();function Sl(e){return(0,Er.Ay)("MuiTableCell",e)}const kl=(0,_r.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),_l=["align","className","component","padding","scope","size","sortDirection","variant"],El=(0,f.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,c.A)(r.size)}`],"normal"!==r.padding&&t[`padding${(0,c.A)(r.padding)}`],"inherit"!==r.align&&t[`align${(0,c.A)(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>(0,i.A)({},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,Cr.a)((0,Cr.X4)(e.palette.divider,1),.88):(0,Cr.e$)((0,Cr.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${kl.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),jl=n.forwardRef((function(e,t){const r=(0,kr.A)({props:e,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:u,scope:d,size:f,sortDirection:h,variant:m}=r,g=(0,l.A)(r,_l),v=n.useContext(Al),b=n.useContext(Cl),y=b&&"head"===b.variant;let x;x=s||(y?"th":"td");let w=d;"td"===x?w=void 0:!w&&y&&(w="col");const A=m||b&&b.variant,C=(0,i.A)({},r,{align:o,component:x,padding:u||(v&&v.padding?v.padding:"normal"),size:f||(v&&v.size?v.size:"medium"),sortDirection:h,stickyHeader:"head"===A&&v&&v.stickyHeader,variant:A}),S=(e=>{const{classes:t,variant:r,align:n,padding:o,size:a,stickyHeader:i}=e,l={root:["root",r,i&&"stickyHeader","inherit"!==n&&`align${(0,c.A)(n)}`,"normal"!==o&&`padding${(0,c.A)(o)}`,`size${(0,c.A)(a)}`]};return(0,p.A)(l,Sl,t)})(C);let k=null;return h&&(k="asc"===h?"ascending":"descending"),(0,le.jsx)(El,(0,i.A)({as:x,ref:t,className:(0,pr.A)(S.root,a),"aria-sort":k,scope:w,ownerState:C},g))}));var Rl=r(8532),Ml=r(73788);const Pl=(0,kt.A)((0,le.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ol=(0,kt.A)((0,le.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),Il=(0,kt.A)((0,le.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),Tl=(0,kt.A)((0,le.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),$l=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],Ll=n.forwardRef((function(e,t){var r,n,o,a,s,c,u,d;const{backIconButtonProps:p,count:f,disabled:h=!1,getItemAriaLabel:m,nextIconButtonProps:g,onPageChange:v,page:b,rowsPerPage:y,showFirstButton:x,showLastButton:w,slots:A={},slotProps:C={}}=e,S=(0,l.A)(e,$l),k=(0,Ml.I)(),_=null!=(r=A.firstButton)?r:Tr.A,E=null!=(n=A.lastButton)?n:Tr.A,j=null!=(o=A.nextButton)?o:Tr.A,R=null!=(a=A.previousButton)?a:Tr.A,M=null!=(s=A.firstButtonIcon)?s:Tl,P=null!=(c=A.lastButtonIcon)?c:Il,O=null!=(u=A.nextButtonIcon)?u:Ol,I=null!=(d=A.previousButtonIcon)?d:Pl,T=k?E:_,$=k?j:R,L=k?R:j,z=k?_:E,F=k?C.lastButton:C.firstButton,D=k?C.nextButton:C.previousButton,N=k?C.previousButton:C.nextButton,B=k?C.firstButton:C.lastButton;return(0,le.jsxs)("div",(0,i.A)({ref:t},S,{children:[x&&(0,le.jsx)(T,(0,i.A)({onClick:e=>{v(e,0)},disabled:h||0===b,"aria-label":m("first",b),title:m("first",b)},F,{children:k?(0,le.jsx)(P,(0,i.A)({},C.lastButtonIcon)):(0,le.jsx)(M,(0,i.A)({},C.firstButtonIcon))})),(0,le.jsx)($,(0,i.A)({onClick:e=>{v(e,b-1)},disabled:h||0===b,color:"inherit","aria-label":m("previous",b),title:m("previous",b)},null!=D?D:p,{children:k?(0,le.jsx)(O,(0,i.A)({},C.nextButtonIcon)):(0,le.jsx)(I,(0,i.A)({},C.previousButtonIcon))})),(0,le.jsx)(L,(0,i.A)({onClick:e=>{v(e,b+1)},disabled:h||-1!==f&&b>=Math.ceil(f/y)-1,color:"inherit","aria-label":m("next",b),title:m("next",b)},null!=N?N:g,{children:k?(0,le.jsx)(I,(0,i.A)({},C.previousButtonIcon)):(0,le.jsx)(O,(0,i.A)({},C.nextButtonIcon))})),w&&(0,le.jsx)(z,(0,i.A)({onClick:e=>{v(e,Math.max(0,Math.ceil(f/y)-1))},disabled:h||b>=Math.ceil(f/y)-1,"aria-label":m("last",b),title:m("last",b)},B,{children:k?(0,le.jsx)(M,(0,i.A)({},C.firstButtonIcon)):(0,le.jsx)(P,(0,i.A)({},C.lastButtonIcon))}))]}))}));function zl(e){return(0,Er.Ay)("MuiTablePagination",e)}const Fl=(0,_r.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Dl;const Nl=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],Bl=(0,f.Ay)(jl,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),Hl=(0,f.Ay)(Rl.A,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,i.A)({[`& .${Fl.actions}`]:t.actions},t.toolbar)})((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Fl.actions}`]:{flexShrink:0,marginLeft:20}}))),Vl=(0,f.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),Wl=(0,f.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((({theme:e})=>(0,i.A)({},e.typography.body2,{flexShrink:0}))),Ul=(0,f.Ay)(Ai.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,i.A)({[`& .${Fl.selectIcon}`]:t.selectIcon,[`& .${Fl.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Fl.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),ql=(0,f.Ay)(Kt.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Gl=(0,f.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((({theme:e})=>(0,i.A)({},e.typography.body2,{flexShrink:0})));function Kl({from:e,to:t,count:r}){return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`}function Xl(e){return`Go to ${e} page`}const Zl=n.forwardRef((function(e,t){var r;const o=(0,kr.A)({props:e,name:"MuiTablePagination"}),{ActionsComponent:a=Ll,backIconButtonProps:s,className:c,colSpan:u,component:d=jl,count:f,disabled:h=!1,getItemAriaLabel:m=Xl,labelDisplayedRows:g=Kl,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:b,onPageChange:y,onRowsPerPageChange:x,page:w,rowsPerPage:A,rowsPerPageOptions:C=[10,25,50,100],SelectProps:S={},showFirstButton:k=!1,showLastButton:_=!1,slotProps:E={},slots:j={}}=o,R=(0,l.A)(o,Nl),M=o,P=(e=>{const{classes:t}=e;return(0,p.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},zl,t)})(M),O=null!=(r=null==E?void 0:E.select)?r:S,I=O.native?"option":ql;let T;d!==jl&&"td"!==d||(T=u||1e3);const $=(0,Gt.A)(O.id),L=(0,Gt.A)(O.labelId);return(0,le.jsx)(Bl,(0,i.A)({colSpan:T,ref:t,as:d,ownerState:M,className:(0,pr.A)(P.root,c)},R,{children:(0,le.jsxs)(Hl,{className:P.toolbar,children:[(0,le.jsx)(Vl,{className:P.spacer}),C.length>1&&(0,le.jsx)(Wl,{className:P.selectLabel,id:L,children:v}),C.length>1&&(0,le.jsx)(Ul,(0,i.A)({variant:"standard"},!O.variant&&{input:Dl||(Dl=(0,le.jsx)(St.Ay,{}))},{value:A,onChange:x,id:$,labelId:L},O,{classes:(0,i.A)({},O.classes,{root:(0,pr.A)(P.input,P.selectRoot,(O.classes||{}).root),select:(0,pr.A)(P.select,(O.classes||{}).select),icon:(0,pr.A)(P.selectIcon,(O.classes||{}).icon)}),disabled:h,children:C.map((e=>(0,n.createElement)(I,(0,i.A)({},!(0,wl.g)(I)&&{ownerState:M},{className:P.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,le.jsx)(Gl,{className:P.displayedRows,children:g({from:0===f?0:w*A+1,to:-1===f?(w+1)*A:-1===A?f:Math.min(f,(w+1)*A),count:-1===f?-1:f,page:w})}),(0,le.jsx)(a,{className:P.actions,backIconButtonProps:s,count:f,nextIconButtonProps:b,onPageChange:y,page:w,rowsPerPage:A,showFirstButton:k,showLastButton:_,slotProps:E.actions,slots:j.actions,getItemAriaLabel:m,disabled:h})]})}))})),Yl=(0,f.Ay)(Zl)((({theme:e})=>({[`& .${Fl.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Fl.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),Ql=n.forwardRef((function(e,t){var r;const o=D(),a=(0,N.A)(),l=z(o,Ko),s=n.useMemo((()=>Math.floor(l.rowCount/(l.pageSize||1))),[l.rowCount,l.pageSize]),c=n.useCallback((e=>{const t=Number(e.target.value);o.current.setPageSize(t)}),[o]),u=n.useCallback(((e,t)=>{o.current.setPage(t)}),[o]);return(0,le.jsx)(Yl,(0,i.A)({ref:t,component:"div",count:l.rowCount,page:l.page<=s?l.page:s,rowsPerPageOptions:null!=(r=a.rowsPerPageOptions)&&r.includes(l.pageSize)?a.rowsPerPageOptions:[],rowsPerPage:l.pageSize,onPageChange:u,onRowsPerPageChange:c},o.current.getLocaleText("MuiTablePagination"),e))})),Jl=["className"],es=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function ts(e){const{className:t}=e,r=(0,l.A)(e,Jl),n=(0,N.A)(),o=(e=>{const{classes:t}=e;return(0,p.A)({root:["panelContent"]},m.B,t)})(n);return(0,le.jsx)(es,(0,i.A)({className:(0,s.A)(t,o.root),ownerState:n},r))}const rs=["className"],ns=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"})));function os(e){const{className:t}=e,r=(0,l.A)(e,rs),n=(0,N.A)(),o=(e=>{const{classes:t}=e;return(0,p.A)({root:["panelFooter"]},m.B,t)})(n);return(0,le.jsx)(ns,(0,i.A)({className:(0,s.A)(t,o.root),ownerState:n},r))}var as=r(35487);const is=["className","slotProps"],ls=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),ss=()=>!0,cs=n.forwardRef((function(e,t){const{className:r,slotProps:n={}}=e,o=(0,l.A)(e,is),a=(0,N.A)(),c=(e=>{const{classes:t}=e;return(0,p.A)({root:["panelWrapper"]},m.B,t)})(a);return(0,le.jsx)(as.s,(0,i.A)({open:!0,disableEnforceFocus:!0,isEnabled:ss},n.TrapFocus,{children:(0,le.jsx)(ls,(0,i.A)({ref:t,tabIndex:-1,className:(0,s.A)(r,c.root),ownerState:a},o))}))}));var us=r(54433);const ds=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","linkOperators","columnsSort","deleteIconProps","linkOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],ps=["InputComponentProps"],fs=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((({theme:e})=>({display:"flex",padding:e.spacing(1)}))),hs=(0,f.Ay)(wi.A,{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)}))),ms=(0,f.Ay)(wi.A,{name:"MuiDataGrid",slot:"FilterFormLinkOperatorInput",overridesResolver:(e,t)=>t.filterFormLinkOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),gs=(0,f.Ay)(wi.A,{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),vs=(0,f.Ay)(wi.A,{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),bs=(0,f.Ay)(wi.A,{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),ys=e=>{switch(e){case ma.And:return"filterPanelOperatorAnd";case ma.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `linkOperator` property in the `GridFilterPanel`.")}},xs=e=>e.headerName||e.field,ws=new Intl.Collator,As=n.forwardRef((function(e,t){var r,o,a,u,d,f,h;const{item:g,hasMultipleFilters:v,deleteFilter:b,applyFilterChanges:y,multiFilterOperator:x,showMultiFilterOperators:w,disableMultiFilterOperator:A,applyMultiFilterOperatorChanges:C,focusElementRef:S,linkOperators:k=[ma.And,ma.Or],columnsSort:_,deleteIconProps:E={},linkOperatorInputProps:j={},operatorInputProps:R={},columnInputProps:M={},valueInputProps:P={}}=e,O=(0,l.A)(e,ds),I=D(),$=z(I,T),L=(0,Gt.A)(),F=(0,Gt.A)(),B=(0,Gt.A)(),H=(0,Gt.A)(),V=(0,N.A)(),W=(e=>{const{classes:t}=e;return(0,p.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],linkOperatorInput:["filterFormLinkOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},m.B,t)})(V),U=n.useRef(null),q=n.useRef(null),G=v&&k.length>0,K=(null==(r=V.componentsProps)?void 0:r.baseFormControl)||{},X=null==(a=((null==(o=V.componentsProps)?void 0:o.baseSelect)||{}).native)||a,Z=X?"option":Kt.A,{InputComponentProps:Y}=P,Q=(0,l.A)(P,ps),J=n.useMemo((()=>{switch(_){case"asc":return $.sort(((e,t)=>ws.compare(xs(e),xs(t))));case"desc":return $.sort(((e,t)=>-ws.compare(xs(e),xs(t))));default:return $}}),[$,_]),ee=g.columnField?I.current.getColumn(g.columnField):null,te=n.useMemo((()=>{var e;return g.operatorValue&&ee?null==(e=ee.filterOperators)?void 0:e.find((e=>e.value===g.operatorValue)):null}),[g,ee]),re=n.useCallback((e=>{const t=e.target.value,r=I.current.getColumn(t);if(r.field===ee.field)return;const n=r.filterOperators.find((e=>e.value===g.operatorValue))||r.filterOperators[0],o=!n.InputComponent||n.InputComponent!==(null==te?void 0:te.InputComponent);y((0,i.A)({},g,{columnField:t,operatorValue:n.value,value:o?void 0:g.value}))}),[I,y,g,ee,te]),ne=n.useCallback((e=>{const t=e.target.value,r=null==ee?void 0:ee.filterOperators.find((e=>e.value===t)),n=!(null!=r&&r.InputComponent)||(null==r?void 0:r.InputComponent)!==(null==te?void 0:te.InputComponent);y((0,i.A)({},g,{operatorValue:t,value:n?void 0:g.value}))}),[y,g,ee,te]),oe=n.useCallback((e=>{const t=e.target.value===ma.And.toString()?ma.And:ma.Or;C(t)}),[C]);return n.useImperativeHandle(S,(()=>({focus:()=>{var e;null!=te&&te.InputComponent?null==U||null==(e=U.current)||e.focus():q.current.focus()}})),[te]),(0,le.jsxs)(fs,(0,i.A)({ref:t,className:W.root,ownerState:V},O,{children:[(0,le.jsx)(hs,(0,i.A)({variant:"standard",as:V.components.BaseFormControl},K,E,{className:(0,s.A)(W.deleteIcon,K.className,E.className),ownerState:V,children:(0,le.jsx)(Tr.A,{"aria-label":I.current.getLocaleText("filterPanelDeleteIconLabel"),title:I.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{V.disableMultipleColumnsFiltering?void 0===g.value?b(g):y((0,i.A)({},g,{value:void 0})):b(g)},size:"small",children:(0,le.jsx)(V.components.FilterPanelDeleteIcon,{fontSize:"small"})})})),(0,le.jsx)(ms,(0,i.A)({variant:"standard",as:V.components.BaseFormControl},K,j,{sx:(0,i.A)({display:G?"flex":"none",visibility:w?"visible":"hidden"},K.sx||{},j.sx||{}),className:(0,s.A)(W.linkOperatorInput,K.className,j.className),ownerState:V,children:(0,le.jsx)(V.components.BaseSelect,(0,i.A)({inputProps:{"aria-label":I.current.getLocaleText("filterPanelLinkOperator")},value:x,onChange:oe,disabled:!!A||1===k.length,native:X},null==(u=V.componentsProps)?void 0:u.baseSelect,{children:k.map((e=>(0,le.jsx)(Z,{value:e.toString(),children:I.current.getLocaleText(ys(e))},e.toString())))}))})),(0,le.jsxs)(gs,(0,i.A)({variant:"standard",as:V.components.BaseFormControl},K,M,{className:(0,s.A)(W.columnInput,K.className,M.className),ownerState:V,children:[(0,le.jsx)(us.A,{htmlFor:L,id:F,children:I.current.getLocaleText("filterPanelColumns")}),(0,le.jsx)(V.components.BaseSelect,(0,i.A)({labelId:F,id:L,label:I.current.getLocaleText("filterPanelColumns"),value:g.columnField||"",onChange:re,native:X},null==(d=V.componentsProps)?void 0:d.baseSelect,{children:J.map((e=>(0,le.jsx)(Z,{value:e.field,children:xs(e)},e.field)))}))]})),(0,le.jsxs)(vs,(0,i.A)({variant:"standard",as:V.components.BaseFormControl},K,R,{className:(0,s.A)(W.operatorInput,K.className,R.className),ownerState:V,children:[(0,le.jsx)(us.A,{htmlFor:B,id:H,children:I.current.getLocaleText("filterPanelOperators")}),(0,le.jsx)(V.components.BaseSelect,(0,i.A)({labelId:H,label:I.current.getLocaleText("filterPanelOperators"),id:B,value:g.operatorValue,onChange:ne,native:X,inputRef:q},null==(f=V.componentsProps)?void 0:f.baseSelect,{children:null==ee||null==(h=ee.filterOperators)?void 0:h.map((e=>(0,le.jsx)(Z,{value:e.value,children:e.label||I.current.getLocaleText(`filterOperator${(0,c.A)(e.value)}`)},e.value)))}))]})),(0,le.jsx)(bs,(0,i.A)({variant:"standard",as:V.components.BaseFormControl},K,Q,{className:(0,s.A)(W.valueInput,K.className,Q.className),ownerState:V,children:null!=te&&te.InputComponent?(0,le.jsx)(te.InputComponent,(0,i.A)({apiRef:I,item:g,applyValue:y,focusElementRef:U},te.InputComponentProps,Y)):null}))]}))})),Cs=["linkOperators","columnsSort","filterFormProps","children"],Ss=n.forwardRef((function(e,t){var r;const o=D(),a=(0,N.A)(),s=z(o,Ee),c=z(o,T),u=n.useRef(null),{linkOperators:d=[ma.And,ma.Or],columnsSort:p,filterFormProps:f}=e,h=(0,l.A)(e,Cs),m=n.useCallback((e=>{o.current.upsertFilterItem(e)}),[o]),g=n.useCallback((e=>{o.current.setFilterLinkOperator(e)}),[o]),v=n.useCallback((()=>{const e=c.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?{columnField:e.field,operatorValue:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}:null}),[c]),b=n.useMemo((()=>{if(s.items.length)return s.items;const e=v();return e?[e]:[]}),[s.items,v]),y=b.length>1,x=n.useCallback((e=>{const t=1===b.length;o.current.deleteFilterItem(e),t&&o.current.hideFilterPanel()}),[o,b.length]);return n.useEffect((()=>{d.length>0&&s.linkOperator&&!d.includes(s.linkOperator)&&g(d[0])}),[d,g,s.linkOperator]),n.useEffect((()=>{b.length>0&&u.current.focus()}),[b.length]),(0,le.jsxs)(cs,(0,i.A)({ref:t},h,{children:[(0,le.jsx)(ts,{children:b.map(((e,t)=>(0,le.jsx)(As,(0,i.A)({item:e,applyFilterChanges:m,deleteFilter:x,hasMultipleFilters:y,showMultiFilterOperators:t>0,multiFilterOperator:s.linkOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:g,focusElementRef:t===b.length-1?u:null,linkOperators:d,columnsSort:p},f),null==e.id?t:e.id)))}),!a.disableMultipleColumnsFiltering&&(0,le.jsx)(os,{children:(0,le.jsx)(a.components.BaseButton,(0,i.A)({onClick:()=>{const e=v();e&&o.current.upsertFilterItems([...b,e])},startIcon:(0,le.jsx)(Nt,{})},null==(r=a.componentsProps)?void 0:r.baseButton,{children:o.current.getLocaleText("filterPanelAddFilter")}))})]}))}));var ks=r(96869),_s=r(68864);const Es=["className"],js=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})((({theme:e})=>({padding:e.spacing(1)})));function Rs(e){const{className:t}=e,r=(0,l.A)(e,Es),n=(0,N.A)(),o=(e=>{const{classes:t}=e;return(0,p.A)({root:["panelHeader"]},m.B,t)})(n);return(0,le.jsx)(js,(0,i.A)({className:(0,s.A)(t,o.root),ownerState:n},r))}const Ms=["sort","searchPredicate","autoFocusSearchField"],Ps=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),Os=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})((({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${ks.A.root}`]:{marginRight:e.spacing(.5)}}))),Is=((0,f.Ay)(Tr.A)({justifyContent:"flex-end"}),new Intl.Collator),Ts=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,$s=["children","className","classes"],Ls=(0,_r.A)("MuiDataGrid",["panel","paper"]),zs=(0,f.Ay)(Sr.A,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((({theme:e})=>({zIndex:e.zIndex.modal}))),Fs=(0,f.Ay)(Ir.A,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>({backgroundColor:e.palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}))),Ds=n.forwardRef(((e,t)=>{var r;const{children:o,className:a}=e,c=(0,l.A)(e,$s),u=D(),d=(0,N.A)(),p=Ls,[f,h]=n.useState(!1),m=n.useCallback((()=>{u.current.hidePreferences()}),[u]),g=n.useCallback((e=>{Tn(e.key)&&u.current.hidePreferences()}),[u]),v=n.useMemo((()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{h(!0)},effect:()=>()=>{h(!1)}}]),[]),b=null==(r=u.current.columnHeadersContainerElementRef)?void 0:r.current;return b?(0,le.jsx)(zs,(0,i.A)({ref:t,placement:"bottom-start",className:(0,s.A)(a,p.panel),ownerState:d,anchorEl:b,modifiers:v},c,{children:(0,le.jsx)(ao.x,{mouseEvent:"onMouseUp",onClickAway:m,children:(0,le.jsx)(Fs,{className:p.paper,ownerState:d,elevation:8,onKeyDown:g,children:f&&o})})})):null})),Ns=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","cellFocus","cellTabIndex","editRowsState","isLastVisible","onClick","onDoubleClick","onMouseEnter","onMouseLeave"],Bs=["changeReason"],Hs=({width:e})=>{if(!e)return null;const t={width:e};return(0,le.jsx)("div",{className:"MuiDataGrid-cell",style:t})},Vs=n.forwardRef((function(e,t){var r;const{selected:o,rowId:a,row:c,index:d,style:f,position:h,rowHeight:g,className:v,visibleColumns:b,renderedColumns:y,containerWidth:x,firstColumnToRender:w,cellFocus:A,cellTabIndex:C,editRowsState:S,isLastVisible:k=!1,onClick:_,onDoubleClick:E,onMouseEnter:j,onMouseLeave:R}=e,M=(0,l.A)(e,Ns),P=D(),O=n.useRef(null),T=(0,N.A)(),$=ja(P,T),L=z(P,I),F=z(P,Se),B=z(P,re),H=z(P,U),V=(0,u.A)(O,t),W=d+H+2,{hasScrollX:q,hasScrollY:G}=null!=(r=P.current.getRootDimensions())?r:{hasScrollX:!1,hasScrollY:!1},K=(e=>{const{editable:t,editing:r,selected:n,isLastVisible:o,rowHeight:a,classes:i}=e,l={root:["row",n&&"selected",t&&"row--editable",r&&"row--editing",o&&"row--lastVisible","auto"===a&&"row--dynamicHeight"]};return(0,p.A)(l,m.B,i)})({selected:o,isLastVisible:k,classes:T.classes,editing:P.current.getRowMode(a)===Gn.Edit,editable:T.editMode===Un.Row,rowHeight:g});n.useLayoutEffect((()=>{"auto"===g&&O.current&&"undefined"==typeof ResizeObserver&&P.current.unstable_storeRowHeightMeasurement(a,O.current.clientHeight,h)}),[P,g,a,h]),n.useLayoutEffect((()=>{if($.range){const e=P.current.getRowIndexRelativeToVisibleRows(a);null!=e&&P.current.unstable_setLastMeasuredRowIndex(e)}const e=O.current;if(!e||"auto"!==g||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver((e=>{const[t]=e,r=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;P.current.unstable_storeRowHeightMeasurement(a,r,h)}));return t.observe(e),()=>t.disconnect()}),[P,$.range,d,g,a,h]);const X=n.useCallback(((e,t)=>r=>{(1!==r.target.nodeType||r.currentTarget.contains(r.target))&&P.current.getRow(a)&&(P.current.publishEvent(e,P.current.getRowParams(a),r),t&&t(r))}),[P,a]),Z=n.useCallback((e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,m.x.cell),r=null==t?void 0:t.getAttribute("data-field");if(r){if(r===na.field)return;if(r===Ma)return;if("__reorder__"===r)return;if(P.current.getCellMode(a,r)===qn.Edit)return;if(P.current.getColumn(r).type===ho)return}X("rowClick",_)(e)}),[P,_,X,a]),Y=n.useCallback(((e,t)=>{var r;const n=P.current.getCellParams(a,e.field),o=[],u=T.disableColumnReorder&&e.disableReorder||!T.rowReordering&&!!F.length&&B>1&&Object.keys(S).length>0;e.cellClassName&&o.push((0,s.A)("function"==typeof e.cellClassName?e.cellClassName(n):e.cellClassName));const d=S[a]?S[a][e.field]:null;let p=null;var f;if(null==d&&e.renderCell&&(p=e.renderCell((0,i.A)({},n,{api:P.current})),o.push((0,s.A)(m.x["cell--withRenderer"],null==(f=T.classes)?void 0:f["cell--withRenderer"]))),null!=d&&e.renderEditCell){var h;let t=c;P.current.unstable_getRowWithUpdatedValues&&(t=P.current.unstable_getRowWithUpdatedValues(a,e.field));const r=(0,l.A)(d,Bs),u=(0,i.A)({},n,{row:t},r,{api:P.current});p=e.renderEditCell(u),o.push((0,s.A)(m.x["cell--editing"],null==(h=T.classes)?void 0:h["cell--editing"]))}T.getCellClassName&&o.push(T.getCellClassName(n));const v=null!==A&&A.id===a&&A.field===e.field,b=null!==C&&C.id===a&&C.field===e.field&&"view"===n.cellMode?0:-1;return(0,le.jsx)(T.components.Cell,(0,i.A)({value:n.value,field:e.field,width:t.width,rowId:a,height:g,showRightBorder:t.showRightBorder,formattedValue:n.formattedValue,align:e.align||"left",cellMode:n.cellMode,colIndex:t.indexRelativeToAllColumns,isEditable:n.isEditable,hasFocus:v,tabIndex:b,className:(0,s.A)(o),colSpan:t.colSpan,disableDragEvents:u},null==(r=T.componentsProps)?void 0:r.cell,{children:p}),e.field)}),[P,C,S,A,T,c,g,a,B,F.length]),Q=P.current.unstable_getRowInternalSizes(a);let J=g;if("auto"===J&&Q){let e=0;const t=Object.entries(Q).reduce(((t,[r,n])=>/^base[A-Z]/.test(r)?(e+=1,n>t?n:t):t),0);t>0&&e>1&&(J=t)}const ee=(0,i.A)({},f,{maxHeight:"auto"===g?"none":g,minHeight:J});if(null!=Q&&Q.spacingTop&&(ee["border"===T.rowSpacingType?"borderTopWidth":"marginTop"]=Q.spacingTop),null!=Q&&Q.spacingBottom){const e="border"===T.rowSpacingType?"borderBottomWidth":"marginBottom";let t=ee[e];"number"!=typeof t&&(t=parseInt(t||"0",10)),t+=Q.spacingBottom,ee[e]=t}const te=P.current.unstable_applyPipeProcessors("rowClassName",[],a);if("function"==typeof T.getRowClassName){var ne;const e=d-((null==(ne=$.range)?void 0:ne.firstRowIndex)||0),t=(0,i.A)({},P.current.getRowParams(a),{isFirstVisible:0===e,isLastVisible:e===$.rows.length-1,indexRelativeToCurrentPage:e});te.push(T.getRowClassName(t))}const oe=function(e,t,r){const n=(o=e,()=>{let e=o+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var o;return()=>t+(r-t)*n()}(1e4,20,80),ae=[];for(let e=0;e0&&(0,le.jsx)(Hs,{width:ie})]}))})),Ws=["sortingOrder"],Us=n.memo((function(e){const{sortingOrder:t}=e,r=(0,l.A)(e,Ws),n=(0,N.A)(),[o]=t,a="asc"===o?n.components.ColumnSortedAscendingIcon:n.components.ColumnSortedDescendingIcon;return a?(0,le.jsx)(a,(0,i.A)({},r)):null})),qs=["error","hasError","errorInfo"],Gs=n.forwardRef((function(e,t){const{error:r}=e,n=(0,l.A)(e,qs),o=D(),a=o.current.getLocaleText("errorOverlayDefaultLabel"),s=z(o,V);return(0,le.jsx)(bl.$,(0,i.A)({ref:t,sx:{width:"100%",minHeight:2*s}},n,{children:(null==r?void 0:r.message)||a}))})),Ks=n.forwardRef((function(e,t){const r=D().current.getLocaleText("noResultsOverlayLabel");return(0,le.jsx)(bl.$,(0,i.A)({ref:t},e,{children:r}))})),Xs={BooleanCellTrueIcon:Ut,BooleanCellFalseIcon:Dt,ColumnMenuIcon:Ft,OpenFilterButtonIcon:Mt,FilterPanelDeleteIcon:Dt,ColumnFilteredIcon:Pt,ColumnSelectorIcon:It,ColumnUnsortedIcon:Us,ColumnSortedAscendingIcon:_t,ColumnSortedDescendingIcon:Et,ColumnResizeIcon:Tt,DensityCompactIcon:$t,DensityStandardIcon:Lt,DensityComfortableIcon:zt,ExportIcon:Wt,MoreActionsIcon:qt,TreeDataCollapseIcon:Rt,TreeDataExpandIcon:jt,GroupingCriteriaCollapseIcon:Rt,GroupingCriteriaExpandIcon:jt,DetailPanelExpandIcon:Nt,DetailPanelCollapseIcon:Bt,RowReorderIcon:Vt,QuickFilterIcon:Ot,QuickFilterClearIcon:Dt},Zs=(0,i.A)({},Xs,{BaseCheckbox:yi.A,BaseTextField:xi.A,BaseFormControl:wi.A,BaseSelect:Ai.A,BaseSwitch:Ci.A,BaseButton:Si.A,BaseTooltip:ki.A,BasePopper:Sr.A,Cell:function(e){const{align:t,children:r,colIndex:o,cellMode:a,field:u,formattedValue:d,hasFocus:f,height:h,isEditable:g,rowId:v,tabIndex:b,value:y,width:x,className:w,showRightBorder:A,colSpan:C,disableDragEvents:S,onClick:k,onDoubleClick:_,onMouseDown:E,onMouseUp:j,onKeyDown:R,onDragEnter:M,onDragOver:P}=e,O=(0,l.A)(e,_i),I=null==d?y:d,T=n.useRef(null),$=n.useRef(null),L=D(),z=(e=>{const{align:t,showRightBorder:r,isEditable:n,classes:o}=e,a={root:["cell",`cell--text${(0,c.A)(t)}`,n&&"cell--editable",r&&"withBorder"],content:["cellContent"]};return(0,p.A)(a,m.B,o)})({align:t,showRightBorder:A,isEditable:g,classes:(0,N.A)().classes}),F=n.useCallback((e=>t=>{const r=L.current.getCellParams(v,u||"");L.current.publishEvent(e,r,t),j&&j(t)}),[L,u,j,v]),B=n.useCallback((e=>t=>{const r=L.current.getCellParams(v,u||"");L.current.publishEvent(e,r,t),E&&E(t)}),[L,u,E,v]),H=n.useCallback(((e,t)=>r=>{if(!r.currentTarget.contains(r.target))return;if(!L.current.getRow(v))return;const n=L.current.getCellParams(v,u||"");L.current.publishEvent(e,n,r),t&&t(r)}),[L,u,v]),V={minWidth:x,maxWidth:x,minHeight:h,maxHeight:"auto"===h?"none":h};n.useEffect((()=>{if(!f||a===qn.Edit)return;const e=(0,pa.A)(L.current.rootElementRef.current);if(T.current&&!T.current.contains(e.activeElement)){const e=T.current.querySelector('[tabindex="0"]'),t=$.current||e||T.current;if(void 0===Ei&&document.createElement("div").focus({get preventScroll(){return Ei=!0,!1}}),Ei)t.focus({preventScroll:!0});else{const e=L.current.getScrollPosition();t.focus(),L.current.scroll(e)}}}),[f,a,L]);let W=O.onFocus;const U="actions"===L.current.getColumn(u).type,q=S?null:{onDragEnter:H("cellDragEnter",M),onDragOver:H("cellDragOver",P)};return(0,le.jsx)("div",(0,i.A)({ref:T,className:(0,s.A)(w,z.root),role:"cell","data-field":u,"data-colindex":o,"aria-colindex":o+1,"aria-colspan":C,style:V,tabIndex:"view"!==a&&g||U?-1:b,onClick:H("cellClick",k),onDoubleClick:H("cellDoubleClick",_),onMouseDown:B("cellMouseDown"),onMouseUp:F("cellMouseUp"),onKeyDown:H("cellKeyDown",R)},q,O,{onFocus:W,children:(()=>{if(null==r){const e=null==I?void 0:I.toString();return(0,le.jsx)("div",{title:e,className:z.content,children:e})}return n.isValidElement(r)&&U?n.cloneElement(r,{focusElementRef:$}):r})()}))},SkeletonCell:function(e){const{align:t,width:r,contentWidth:n}=e,o=(0,l.A)(e,Ni),a=(e=>{const{align:t,classes:r}=e,n={root:["cell","cellSkeleton",`cell--text${(0,c.A)(t)}`]};return(0,p.A)(n,m.B,r)})({classes:(0,N.A)().classes,align:t});return(0,le.jsx)("div",(0,i.A)({className:a.root,style:{width:r}},o,{children:(0,le.jsx)(Di,{width:`${n}%`})}))},ColumnHeaderFilterIconButton:function(e){var t;const{counter:r,field:o,onClick:a}=e,l=D(),s=(0,N.A)(),c=(e=>{const{classes:t}=e;return(0,p.A)({icon:["filterIcon"]},m.B,t)})((0,i.A)({},e,{classes:s.classes})),u=n.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:r}=Va(l.current.state);t&&r===So.filters?l.current.hideFilterPanel():l.current.showFilterPanel(),a&&a(l.current.getColumnHeaderParams(o),e)}),[l,o,a]);if(!r)return null;const d=(0,le.jsx)(Tr.A,{onClick:u,color:"default","aria-label":l.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,children:(0,le.jsx)(s.components.ColumnFilteredIcon,{className:c.icon,fontSize:"small"})});return(0,le.jsx)(s.components.BaseTooltip,(0,i.A)({title:l.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},null==(t=s.componentsProps)?void 0:t.baseTooltip,{children:(0,le.jsxs)(Yi,{children:[r>1&&(0,le.jsx)(Ki,{badgeContent:r,color:"default",children:d}),1===r&&d]})}))},ColumnMenu:ol,ErrorOverlay:Gs,Footer:hl,Header:ml,Toolbar:null,PreferencesPanel:gl,LoadingOverlay:yl,NoResultsOverlay:Ks,NoRowsOverlay:xl,Pagination:Ql,FilterPanel:Ss,ColumnsPanel:function(e){var t,r,o;const a=D(),s=n.useRef(null),c=z(a,R),u=z(a,M),d=(0,N.A)(),[f,h]=n.useState(""),g=(e=>{const{classes:t}=e;return(0,p.A)({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},m.B,t)})(d),{sort:v,searchPredicate:b=Ts,autoFocusSearchField:y=!0}=e,x=(0,l.A)(e,Ms),w=n.useMemo((()=>{switch(v){case"asc":return[...c].sort(((e,t)=>Is.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...c].sort(((e,t)=>-Is.compare(e.headerName||e.field,t.headerName||t.field)));default:return c}}),[c,v]),A=e=>{const{name:t}=e.target;a.current.setColumnVisibility(t,!1===u[t])},C=n.useCallback((e=>{if(a.current.unstable_caches.columns.isUsingColumnVisibilityModel){const t=M(a),r=(0,i.A)({},t);return c.forEach((t=>{t.hideable&&(e?delete r[t.field]:r[t.field]=!1)})),a.current.setColumnVisibilityModel(r)}return a.current.updateColumns(c.map((t=>!1!==t.hideable?{field:t.field,hide:!e}:t)))}),[a,c]),S=n.useCallback((e=>{h(e.target.value)}),[]),k=n.useMemo((()=>{if(!f)return w;const e=f.toLowerCase();return w.filter((t=>b(t,e)))}),[w,f,b]),_=n.useRef(null);n.useEffect((()=>{y?s.current.focus():_.current&&"function"==typeof _.current.focus&&_.current.focus()}),[y]);let E=!1;const j=e=>!1===E&&!1!==e.hideable&&(E=!0,!0);return(0,le.jsxs)(cs,(0,i.A)({},x,{children:[(0,le.jsx)(Rs,{children:(0,le.jsx)(d.components.BaseTextField,(0,i.A)({label:a.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:a.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:s,value:f,onChange:S,variant:"standard",fullWidth:!0},null==(t=d.componentsProps)?void 0:t.baseTextField))}),(0,le.jsx)(ts,{children:(0,le.jsx)(Ps,{className:g.root,ownerState:d,children:k.map((e=>{var t;return(0,le.jsxs)(Os,{className:g.columnsPanelRow,ownerState:d,children:[(0,le.jsx)(_s.A,{control:(0,le.jsx)(d.components.BaseSwitch,(0,i.A)({disabled:!1===e.hideable,checked:!1!==u[e.field],onClick:A,name:e.field,size:"small",inputRef:j(e)?_:void 0},null==(t=d.componentsProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!d.disableColumnReorder&&!1]},e.field)}))})}),(0,le.jsxs)(os,{children:[(0,le.jsx)(d.components.BaseButton,(0,i.A)({onClick:()=>C(!1)},null==(r=d.componentsProps)?void 0:r.baseButton,{children:a.current.getLocaleText("columnsPanelHideAllButton")})),(0,le.jsx)(d.components.BaseButton,(0,i.A)({onClick:()=>C(!0)},null==(o=d.componentsProps)?void 0:o.baseButton,{children:a.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:Ds,Row:Vs}),Ys={apiRef:void 0,disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},Qs={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,density:_o.Standard,disableExtendRowFullWidth:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleSelection:!1,disableMultipleColumnsSorting:!1,disableSelectionOnClick:!1,disableVirtualization:!1,disableIgnoreModificationsIfProcessingProps:!1,editMode:Un.Cell,filterMode:ha,headerHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:ha,rowHeight:52,rowsPerPageOptions:[25,50,100],rowSpacingType:"margin",showCellRightBorder:!1,showColumnRightBorder:!1,sortingOrder:["asc","desc",null],sortingMode:ha,throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1},Js=["className"],ec=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",position:"relative","@media print":{overflow:"hidden"}}),tc=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,Js),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["virtualScroller"]},m.B,t)})(o);return(0,le.jsx)(ec,(0,i.A)({ref:t,className:(0,s.A)(a.root,r),ownerState:o},n))})),rc=["className","style"],nc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),oc=n.forwardRef((function(e,t){const{className:r,style:n}=e,o=(0,l.A)(e,rc),a=(0,N.A)(),c=(0,i.A)({},a,{overflowedContent:!a.autoHeight&&"auto"===(null==n?void 0:n.minHeight)}),u=(e=>{const{classes:t,overflowedContent:r}=e,n={root:["virtualScrollerContent",r&&"virtualScrollerContent--overflowed"]};return(0,p.A)(n,m.B,t)})(c);return(0,le.jsx)(nc,(0,i.A)({ref:t,className:(0,s.A)(u.root,r),ownerState:c,style:n},o))})),ac=["className"],ic=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),lc=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,ac),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["virtualScrollerRenderZone"]},m.B,t)})(o);return(0,le.jsx)(ic,(0,i.A)({ref:t,className:(0,s.A)(a.root,r),ownerState:o},n))}));var sc=r(40961);const cc=["style"];function uc(e,t,r=0,n=t.length){if(t.length<=0)return-1;if(r>=n)return r;const o=r+Math.floor((n-r)/2);return e<=t[o]?uc(e,t,r,o):uc(e,t,o+1,n)}const dc=({firstIndex:e,lastIndex:t,buffer:r,minFirstIndex:n,maxLastIndex:o})=>[Ge(e-r,n,o),Ge(t+r,n,o)],pc=["className","disableVirtualization"],fc=n.forwardRef((function(e,t){const{className:r,disableVirtualization:o}=e,a=(0,l.A)(e,pc),{getRootProps:s,getContentProps:c,getRenderZoneProps:p,getRows:f}=(e=>{var t,r;const o=D(),a=(0,N.A)(),s=z(o,P),{ref:c,disableVirtualization:p,onRenderZonePositioning:f,renderZoneMinColumnIndex:h=0,renderZoneMaxColumnIndex:m=s.length,getRowProps:g}=e,v=z(o,O),b=z(o,I),y=z(o,V),x=z(o,Do),w=z(o,Ho),A=z(o,fa),C=z(o,Ua),S=z(o,Go),k=ja(o,a),_=n.useRef(null),E=n.useRef(null),j=(0,u.A)(c,E),[R,M]=n.useState(null),T=n.useRef(R),$=n.useRef({top:0,left:0}),[L,F]=n.useState({width:null,height:null}),B=n.useRef(b),H=n.useCallback((e=>{var t,r;const n=o.current.unstable_getLastMeasuredRowIndex();let a=n===1/0;null!=(t=k.range)&&t.lastRowIndex&&!a&&(a=n>=k.range.lastRowIndex);const i=Ge(n-((null==(r=k.range)?void 0:r.firstRowIndex)||0),0,A.positions.length);return a||A.positions[i]>=e?uc(e,A.positions):function(e,t,r){let n=1;for(;r{if(p)return{firstRowIndex:0,lastRowIndex:k.rows.length,firstColumnIndex:0,lastColumnIndex:s.length};const{top:e,left:t}=$.current,r=Math.min(H(e),A.positions.length-1),n=a.autoHeight?r+k.rows.length:H(e+L.height);let i=!1,l=0,c=v.length;const[u,d]=dc({firstIndex:r,lastIndex:n,minFirstIndex:0,maxLastIndex:k.rows.length,buffer:a.rowBuffer});for(let e=u;e{p?_.current.style.transform="translate3d(0px, 0px, 0px)":(E.current.scrollLeft=0,E.current.scrollTop=0)}),[p]),(0,d.A)((()=>{F({width:E.current.clientWidth,height:E.current.clientHeight})}),[A.currentPageTotalHeight]);const U=n.useCallback((e=>{F({width:e.width,height:e.height})}),[]);it(o,"resize",U);const q=n.useCallback((e=>{const[t,r]=dc({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:k.rows.length,buffer:a.rowBuffer}),[n]=dc({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:h,maxLastIndex:m,buffer:a.columnBuffer}),i=Ao({firstColumnToRender:n,apiRef:o,firstRowToRender:t,lastRowToRender:r,visibleRows:k.rows}),l=fa(o.current.state).positions[t],s=O(o)[i];_.current.style.transform=`translate3d(${s}px, ${l}px, 0px)`,"function"==typeof f&&f({top:l,left:s})}),[o,k.rows,f,h,m,a.columnBuffer,a.rowBuffer]),G=n.useCallback((e=>{if(T.current&&((t=e)===(r=T.current)||t.firstRowIndex===r.firstRowIndex&&t.lastRowIndex===r.lastRowIndex&&t.firstColumnIndex===r.firstColumnIndex&&t.lastColumnIndex===r.lastColumnIndex))return void q(e);var t,r;M(e),q(e);const[n,i]=dc({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:k.rows.length,buffer:a.rowBuffer});o.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:n,lastRowToRender:i}),T.current=e}),[o,M,T,k.rows.length,a.rowBuffer,q]);(0,d.A)((()=>{if(null==L.width)return;const e=W();G(e);const{top:t,left:r}=$.current,n={top:t,left:r,renderContext:e};o.current.publishEvent("rowsScroll",n)}),[o,W,L.width,G]);const K=e=>{const{scrollTop:t,scrollLeft:r}=e.currentTarget;if($.current.top=t,$.current.left=r,r<0||t<0||!T.current)return;const n=p?T.current:W(),i=Math.abs(n.firstRowIndex-T.current.firstRowIndex),l=Math.abs(n.lastRowIndex-T.current.lastRowIndex),s=Math.abs(n.firstColumnIndex-T.current.firstColumnIndex),c=Math.abs(n.lastColumnIndex-T.current.lastColumnIndex),u=i>=a.rowThreshold||l>=a.rowThreshold||s>=a.columnThreshold||c>=a.columnThreshold||B.current!==b;o.current.publishEvent("rowsScroll",{top:t,left:r,renderContext:u?n:T.current},e),u&&(sc.flushSync((()=>{G(n)})),B.current=b)},X=e=>{o.current.publishEvent("virtualScrollerWheel",{},e)},Z=e=>{o.current.publishEvent("virtualScrollerTouchMove",{},e)},Y=L.width&&b>L.width,Q=n.useMemo((()=>{const e=Math.max(A.currentPageTotalHeight,1);let t=!1;null!=E&&E.current&&e<=(null==E?void 0:E.current.clientHeight)&&(t=!0);const r={width:Y?b:"auto",height:e,minHeight:t?"100%":"auto"};return a.autoHeight&&0===k.rows.length&&(r.height=2*y),r}),[E,b,A.currentPageTotalHeight,k.rows.length,Y,a.autoHeight,y]);n.useEffect((()=>{o.current.publishEvent("virtualScrollerContentSizeChange")}),[o,Q]),a.autoHeight&&0===k.rows.length&&(Q.height=2*y);const J={};Y||(J.overflowX="hidden"),a.autoHeight&&(J.overflowY="hidden");const ee=n.useCallback((()=>T.current),[]);return o.current.unstable_getRenderContext=ee,{renderContext:R,updateRenderZonePosition:q,getRows:(e={renderContext:R})=>{const{renderContext:t,minFirstColumn:r=h,maxLastColumn:n=m,availableSpace:l=L.width,rowIndexOffset:c=0,position:u="center"}=e;if(!t||null==l)return null;const d=p?0:a.rowBuffer,f=p?0:a.columnBuffer,[v,b]=dc({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:k.rows.length,buffer:d}),y=[];if(e.rows)e.rows.forEach((e=>{y.push(e),o.current.unstable_calculateColSpan({rowId:e.id,minFirstColumn:r,maxLastColumn:n,columns:s})}));else{if(!k.range)return null;for(let e=v;e{let{style:t={}}=e,r=(0,l.A)(e,cc);return(0,i.A)({ref:j,onScroll:K,onWheel:X,onTouchMove:Z,style:(0,i.A)({},t,J)},r)},getContentProps:({style:e={}}={})=>({style:(0,i.A)({},e,Q)}),getRenderZoneProps:()=>({ref:_})}})({ref:t,disableVirtualization:o});return(0,le.jsx)(tc,(0,i.A)({className:r},s(a),{children:(0,le.jsx)(oc,(0,i.A)({},c(),{children:(0,le.jsx)(lc,(0,i.A)({},p(),{children:f()}))}))}))}));function hc(e){const{direction:t,index:r,sortingOrder:n}=e,o=D(),a=(0,N.A)(),l=(e=>{const{classes:t}=e;return(0,p.A)({icon:["sortIcon"]},m.B,t)})((0,i.A)({},e,{classes:a.classes})),s=function(e,t,r,n){let o;const a={};return"asc"===t?o=e.ColumnSortedAscendingIcon:"desc"===t?o=e.ColumnSortedDescendingIcon:(o=e.ColumnUnsortedIcon,a.sortingOrder=n),o?(0,le.jsx)(o,(0,i.A)({fontSize:"small",className:r},a)):null}(a.components,t,l.icon,n);if(!s)return null;const c=(0,le.jsx)(Tr.A,{tabIndex:-1,"aria-label":o.current.getLocaleText("columnHeaderSortIconLabel"),title:o.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",children:s});return(0,le.jsxs)(Yi,{children:[null!=r&&(0,le.jsx)(Ki,{badgeContent:r,color:"default",children:c}),null==r&&c]})}const mc=n.memo(hc),gc=n.memo((e=>{const{column:t,open:r,columnMenuId:o,columnMenuButtonId:a,iconButtonRef:l}=e,s=D(),c=(0,N.A)(),u=(e=>{const{classes:t,open:r}=e,n={root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]};return(0,p.A)(n,m.B,t)})((0,i.A)({},e,{classes:c.classes})),d=n.useCallback((e=>{e.preventDefault(),e.stopPropagation(),s.current.toggleColumnMenu(t.field)}),[s,t.field]);return(0,le.jsx)("div",{className:u.root,children:(0,le.jsx)(Tr.A,{ref:l,tabIndex:-1,className:u.button,"aria-label":s.current.getLocaleText("columnMenuLabel"),title:s.current.getLocaleText("columnMenuLabel"),size:"small",onClick:d,"aria-expanded":r?"true":void 0,"aria-haspopup":"true","aria-controls":o,id:a,children:(0,le.jsx)(c.components.ColumnMenuIcon,{fontSize:"small"})})})}));function vc({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:o,field:a,open:l,target:s,onExited:c}){const u=D(),d=u.current.getColumn(a),p=n.useCallback((e=>{e.stopPropagation(),u.current.hideColumnMenu()}),[u]);return s?(0,le.jsx)(uo,{placement:"bottom-"+("right"===d.align?"start":"end"),open:l,target:s,onClickAway:p,onExited:c,children:(0,le.jsx)(r,(0,i.A)({currentColumn:d,hideMenu:p,open:l,id:e,labelledby:t},o))}):null}const bc=["className"],yc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})((({theme:e})=>({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:e.typography.fontWeightMedium}))),xc=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,bc),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["columnHeaderTitle"]},m.B,t)})(o);return(0,le.jsx)(yc,(0,i.A)({ref:t,className:(0,s.A)(a.root,r),ownerState:o},n))}));function wc(e){var t;const{label:r,description:o,columnWidth:a}=e,l=(0,N.A)(),s=n.useRef(null),[c,u]=n.useState("");return n.useEffect((()=>{if(!o&&s&&s.current){const t=(e=s.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;u(t?r:"")}var e}),[s,a,o,r]),(0,le.jsx)(l.components.BaseTooltip,(0,i.A)({title:o||c},null==(t=l.componentsProps)?void 0:t.baseTooltip,{children:(0,le.jsx)(xc,{ref:s,children:r})}))}const Ac=["resizable","resizing","height","side"];var Cc;function Sc(e){const{height:t,side:r=Cc.Right}=e,o=(0,l.A)(e,Ac),a=(0,N.A)(),s=(e=>{const{resizable:t,resizing:r,classes:n,side:o}=e,a={root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,c.A)(o)}`],icon:["iconSeparator"]};return(0,p.A)(a,m.B,n)})((0,i.A)({},e,{side:r,classes:a.classes})),u=n.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,le.jsx)("div",(0,i.A)({className:s.root,style:{minHeight:t,opacity:a.showColumnRightBorder?0:1}},o,{onClick:u,children:(0,le.jsx)(a.components.ColumnResizeIcon,{className:s.icon})}))}!function(e){e.Left="left",e.Right="right"}(Cc||(Cc={}));const kc=n.memo(Sc),_c=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","disableHeaderSeparator"],Ec=n.forwardRef((function(e,t){const{classes:r,columnMenuOpen:o,colIndex:a,height:c,isResizing:d,sortDirection:p,hasFocus:f,tabIndex:h,separatorSide:m,isDraggable:g,headerComponent:v,description:b,width:y,columnMenuIconButton:x=null,columnMenu:w=null,columnTitleIconButtons:A=null,headerClassName:C,label:S,resizable:k,draggableContainerProps:_,columnHeaderSeparatorProps:E,disableHeaderSeparator:j}=e,R=(0,l.A)(e,_c),M=D(),P=(0,N.A)(),O=n.useRef(null),[I,T]=n.useState(o),$=(0,u.A)(O,t);let L="none";return null!=p&&(L="asc"===p?"ascending":"descending"),n.useEffect((()=>{I||T(o)}),[I,o]),n.useLayoutEffect((()=>{const e=M.current.state.columnMenu;if(f&&!e.open){const e=O.current.querySelector('[tabindex="0"]')||O.current;null==e||e.focus(),M.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[M,f]),(0,le.jsxs)("div",(0,i.A)({ref:$,className:(0,s.A)(r.root,C),style:{height:c,width:y,minWidth:y,maxWidth:y},role:"columnheader",tabIndex:h,"aria-colindex":a+1,"aria-sort":L,"aria-label":null==v?S:void 0},R,{children:[(0,le.jsxs)("div",(0,i.A)({className:r.draggableContainer,draggable:g},_,{children:[(0,le.jsxs)("div",{className:r.titleContainer,children:[(0,le.jsx)("div",{className:r.titleContainerContent,children:void 0!==v?v:(0,le.jsx)(wc,{label:S,description:b,columnWidth:y})}),A]}),x]})),!j&&(0,le.jsx)(kc,(0,i.A)({resizable:!P.disableColumnResize&&!!k,resizing:d,height:c,side:m},E)),w]}))}));function jc(e){var t,r,o,a,l;const{column:s,columnMenuOpen:c,colIndex:u,headerHeight:d,isResizing:f,isLastColumn:h,sortDirection:g,sortIndex:v,filterItemsCounter:b,hasFocus:y,tabIndex:x,extendRowFullWidth:w,disableReorder:A,separatorSide:C}=e,S=D(),k=(0,N.A)(),_=n.useRef(null),E=(0,Gt.A)(),j=(0,Gt.A)(),R=n.useRef(null),[M,P]=n.useState(c),{hasScrollX:O,hasScrollY:I}=null!=(t=S.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},T=n.useMemo((()=>!k.disableColumnReorder&&!A&&!s.disableReorder),[k.disableColumnReorder,A,s.disableReorder]);let $;s.renderHeader&&($=s.renderHeader(S.current.getColumnHeaderParams(s.field)));const L=h?!(h&&O&&!I||w):k.showColumnRightBorder,z=(e=>{const{column:t,classes:r,isDragging:n,sortDirection:o,showRightBorder:a,filterItemsCounter:i}=e,l=null!=o,s=null!=i&&i>0,c="number"===t.type,u={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",n&&"columnHeader--moving",l&&"columnHeader--sorted",s&&"columnHeader--filtered",c&&"columnHeader--numeric",a&&"withBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,p.A)(u,m.B,r)})((0,i.A)({},e,{classes:k.classes,showRightBorder:L})),F=n.useCallback((e=>t=>{t.currentTarget.contains(t.target)&&S.current.publishEvent(e,S.current.getColumnHeaderParams(s.field),t)}),[S,s.field]),B=n.useMemo((()=>({onClick:F("columnHeaderClick"),onDoubleClick:F("columnHeaderDoubleClick"),onMouseOver:F("columnHeaderOver"),onMouseOut:F("columnHeaderOut"),onMouseEnter:F("columnHeaderEnter"),onMouseLeave:F("columnHeaderLeave"),onKeyDown:F("columnHeaderKeyDown"),onFocus:F("columnHeaderFocus"),onBlur:F("columnHeaderBlur")})),[F]),H=n.useMemo((()=>T?{onDragStart:F("columnHeaderDragStart"),onDragEnter:F("columnHeaderDragEnter"),onDragOver:F("columnHeaderDragOver"),onDragEnd:F("columnHeaderDragEnd")}:{}),[T,F]),V=n.useMemo((()=>({onMouseDown:F("columnSeparatorMouseDown")})),[F]);n.useEffect((()=>{M||P(c)}),[M,c]);const W=n.useCallback((()=>{P(!1)}),[]),U=!k.disableColumnMenu&&!s.disableColumnMenu&&(0,le.jsx)(gc,{column:s,columnMenuId:E,columnMenuButtonId:j,open:M,iconButtonRef:R}),q=(0,le.jsx)(vc,{columnMenuId:E,columnMenuButtonId:j,field:s.field,open:c,target:R.current,ContentComponent:k.components.ColumnMenu,contentComponentProps:null==(r=k.componentsProps)?void 0:r.columnMenu,onExited:W}),G=null!=(o=s.sortingOrder)?o:k.sortingOrder,K=(0,le.jsxs)(n.Fragment,{children:[!k.disableColumnFilter&&(0,le.jsx)(k.components.ColumnHeaderFilterIconButton,(0,i.A)({field:s.field,counter:b},null==(a=k.componentsProps)?void 0:a.columnHeaderFilterIconButton)),s.sortable&&!s.hideSortIcons&&(0,le.jsx)(mc,{direction:g,index:v,sortingOrder:G})]});n.useLayoutEffect((()=>{const e=S.current.state.columnMenu;if(y&&!e.open){const e=_.current.querySelector('[tabindex="0"]')||_.current;null==e||e.focus(),S.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[S,y]);const X="function"==typeof s.headerClassName?s.headerClassName({field:s.field,colDef:s}):s.headerClassName,Z=null!=(l=s.headerName)?l:s.field;return(0,le.jsx)(Ec,(0,i.A)({ref:_,classes:z,columnMenuOpen:c,colIndex:u,height:d,isResizing:f,sortDirection:g,hasFocus:y,tabIndex:x,separatorSide:C,isDraggable:T,headerComponent:$,description:s.description,elementId:s.field,width:s.computedWidth,columnMenuIconButton:U,columnTitleIconButtons:K,headerClassName:X,label:Z,resizable:!k.disableColumnResize&&!!s.resizable,"data-field":s.field,columnMenu:q,draggableContainerProps:H,columnHeaderSeparatorProps:V},B))}function Rc(e){var t,r;const{groupId:n,width:o,depth:a,maxDepth:l,fields:s,height:c,colIndex:u,isLastColumn:d,extendRowFullWidth:f}=e,h=(0,N.A)(),g=D(),v=z(g,jo),{hasScrollX:b,hasScrollY:y}=null!=(t=g.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},x=n?v[n]:{},{headerName:w=(null!=n?n:""),description:A="",headerAlign:C}=x;let S;const k=n&&(null==(r=v[n])?void 0:r.renderHeaderGroup),_={groupId:n,headerName:w,description:A,depth:a,maxDepth:l,fields:s,colIndex:u,isLastColumn:d};n&&k&&(S=k(_));const E=d?!(d&&b&&!y||f):h.showColumnRightBorder,j=h.showColumnRightBorder,R=(0,i.A)({},e,{classes:h.classes,showRightBorder:E,showColumnBorder:j,headerAlign:C,depth:a,isDragging:!1}),M=null!=w?w:n,P=(0,fr.A)(),O=null===n?`empty-group-cell-${P}`:n,I=(e=>{const{classes:t,headerAlign:r,isDragging:n,showRightBorder:o,showColumnBorder:a,groupId:i}=e,l={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",o&&"withBorder",a&&"columnHeader--showColumnBorder",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,p.A)(l,m.B,t)})(R),T="function"==typeof x.headerClassName?x.headerClassName(_):x.headerClassName;return(0,le.jsx)(Ec,{classes:I,columnMenuOpen:!1,colIndex:u,height:c,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:-1,isDraggable:!1,headerComponent:S,headerClassName:T,description:A,elementId:O,width:o,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:M,"aria-colspan":s.length,"data-fields":`|-${s.join("-|-")}-|`,disableHeaderSeparator:!0})}const Mc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"}))),Pc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${m.x["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${m.x["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${m.x["scrollArea--left"]}`]:{left:0},[`&.${m.x["scrollArea--right"]}`]:{right:0}})));function Oc(e){const{scrollDirection:t}=e,r=n.useRef(null),o=D(),a=n.useRef(),[l,c]=n.useState(!1),u=z(o,W),d=n.useRef({left:0,top:0}),f=(0,N.A)(),h=(0,i.A)({},f,{scrollDirection:t}),g=(e=>{const{scrollDirection:t,classes:r}=e,n={root:["scrollArea",`scrollArea--${t}`]};return(0,p.A)(n,m.B,r)})(h),v=n.useCallback((e=>{d.current=e}),[]),b=n.useCallback((e=>{let n;if("left"===t)n=e.clientX-r.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");n=Math.max(1,e.clientX-r.current.getBoundingClientRect().left)}n=1.5*(n-1)+1,clearTimeout(a.current),a.current=setTimeout((()=>{o.current.scroll({left:d.current.left+n,top:d.current.top})}))}),[t,o]);n.useEffect((()=>()=>{clearTimeout(a.current)}),[]);const y=n.useCallback((()=>{c((e=>!e))}),[]);return it(o,"rowsScroll",v),it(o,"columnHeaderDragStart",y),it(o,"columnHeaderDragEnd",y),l?(0,le.jsx)(Pc,{ref:r,className:(0,s.A)(g.root),ownerState:h,onDragOver:b,style:{height:u}}):null}const Ic=n.memo(Oc),Tc=["className"],$c=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})((({theme:e})=>({position:"absolute",top:0,left:0,right:0,overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:`1px solid ${"light"===e.palette.mode?(0,h.a)((0,h.X4)(e.palette.divider,1),.88):(0,h.e$)((0,h.X4)(e.palette.divider,1),.68)}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius}))),Lc=n.forwardRef((function(e,t){const{className:r}=e,n=(0,l.A)(e,Tc),o=(0,N.A)(),a=(e=>{const{classes:t}=e;return(0,p.A)({root:["columnHeaders"]},m.B,t)})(o);return(0,le.jsx)($c,(0,i.A)({ref:t,className:(0,s.A)(r,a.root),ownerState:o},n))})),zc=["isDragging","className"],Fc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${m.x.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${m.x.columnHeaderDropZone} .${m.x.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${m.x["columnHeadersInner--scrollable"]} .${m.x.columnHeader}:last-child`]:{borderRight:"none"}}))),Dc=n.forwardRef((function(e,t){var r,n;const{isDragging:o,className:a}=e,c=(0,l.A)(e,zc),u=D(),d=(0,N.A)(),f=(0,i.A)({},d,{isDragging:o,hasScrollX:null!=(r=null==(n=u.current.getRootDimensions())?void 0:n.hasScrollX)&&r}),h=(e=>{const{isDragging:t,hasScrollX:r,classes:n}=e,o={root:["columnHeadersInner",t&&"columnHeaderDropZone",r&&"columnHeadersInner--scrollable"]};return(0,p.A)(o,m.B,n)})(f);return(0,le.jsx)(Fc,(0,i.A)({ref:t,className:(0,s.A)(a,h.root),ownerState:f},c))})),Nc=["innerRef","className"],Bc=n.forwardRef((function(e,t){const{innerRef:r}=e,o=(0,l.A)(e,Nc),{isDragging:a,getRootProps:s,getInnerProps:c,getColumnHeaders:d,getColumnGroupHeaders:p}=(e=>{const{innerRef:t,minColumnIndex:r=0}=e,[o,a]=n.useState(""),[l,s]=n.useState(""),c=D(),d=z(c,P),p=z(c,O),f=z(c,Vo),h=z(c,Ho),m=z(c,No),g=z(c,W),v=z(c,U),b=z(c,G),x=z(c,Fe),w=z(c,ke),A=z(c,yt),C=(0,N.A)(),S=n.useRef(null),k=(0,u.A)(t,S),[_,E]=n.useState(null),j=n.useRef(_),R=n.useRef(0),M=ja(c,C);n.useEffect((()=>{c.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[c]);const I=n.useRef(y(Co,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((r=>e[r]===t[r]))})),T=n.useCallback((e=>{const[t,n]=dc({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:M.rows.length,buffer:C.rowBuffer}),o=I.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:r,columnBuffer:C.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:c,visibleRows:M.rows}),a=o>0?R.current-p[o]:R.current;S.current.style.transform=`translate3d(${-a}px, 0px, 0px)`}),[p,r,C.columnBuffer,c,M.rows,C.rowBuffer]);n.useLayoutEffect((()=>{_&&T(_)}),[_,T]);const $=n.useCallback((({left:e,renderContext:t=null},r)=>{var n,o;if(!S.current)return;if(R.current===e&&(null==(n=j.current)?void 0:n.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(o=j.current)?void 0:o.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;R.current=e;let a=!1;t===j.current&&j.current?a=!0:(function(e){return!!e.target}(r)?(sc.flushSync((()=>{E(t)})),a=!0):E(t),j.current=t),t&&a&&T(t)}),[T]),L=n.useCallback((e=>s(e.field)),[]),F=n.useCallback((()=>s("")),[]),B=n.useCallback((e=>a(e.field)),[]),H=n.useCallback((()=>a("")),[]);it(c,"columnResizeStart",L),it(c,"columnResizeStop",F),it(c,"columnHeaderDragStart",B),it(c,"columnHeaderDragEnd",H),it(c,"rowsScroll",$);const V=e=>{const{renderContext:t=_,minFirstColumn:n=r,maxLastColumn:o=d.length}=e||{};if(!t)return null;const[a,i]=dc({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:M.rows.length,buffer:C.rowBuffer}),l=I.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:C.columnBuffer,apiRef:c,firstRowToRender:a,lastRowToRender:i,visibleRows:M.rows}),s=Math.min(t.lastColumnIndex+C.columnBuffer,o);return{renderedColumns:d.slice(l,s),firstColumnToRender:l,lastColumnToRender:s,minFirstColumn:n,maxLastColumn:o}},q=(e=[],t)=>e.slice(0,t+1),K={minHeight:b,maxHeight:b,lineHeight:`${g}px`};return{renderContext:_,getColumnHeaders:(e,t={})=>{const r=V(e);if(null==r)return null;const{renderedColumns:n,firstColumnToRender:a}=r,s=[];for(let e=0;e{if(0===v)return null;const t=V(e);if(null==t||0===t.renderedColumns.length)return null;const{renderedColumns:n,firstColumnToRender:o,lastColumnToRender:a,maxLastColumn:l}=t,s=[],c=[];for(let e=0;e=r&&null!=(h=d[g])&&h.groupPath&&Ke(q(null==(m=d[g])?void 0:m.groupPath,e),C);){var h,m,b;const e=d[g];var y,x;s+=null!=(b=e.computedWidth)?b:0,0===t.length?t.push({width:null!=(y=e.computedWidth)?y:0,fields:[e.field],groupId:v,groupParents:C,colIndex:g}):(t[0].width+=null!=(x=e.computedWidth)?x:0,t[0].fields.push(e.field),t[0].colIndex=g),g-=1}const _=n.reduce(((t,r,n)=>{var a;const l=t[t.length-1];var s,c,u;return r.groupPath&&r.groupPath.length>e?l&&l.groupId===r.groupPath[e]?[...t.slice(0,t.length-1),(0,i.A)({},l,{width:l.width+(null!=(c=r.computedWidth)?c:0),fields:[...l.fields,r.field]})]:[...t,{groupId:r.groupPath[e],groupParents:q(r.groupPath,e),width:null!=(s=r.computedWidth)?s:0,fields:[r.field],colIndex:o+n}]:l&&null===l.groupId&&Ke(q(r.groupPath,e),l.groupParents)?[...t.slice(0,t.length-1),(0,i.A)({},l,{width:l.width+(null!=(u=r.computedWidth)?u:0),fields:[...l.fields,r.field]})]:[...t,{groupId:null,groupParents:q(r.groupPath,e),width:null!=(a=r.computedWidth)?a:0,fields:[r.field],colIndex:o+n}]}),t);g=a;const E=_[_.length-1].groupId;for(;null!==E&&g{s.push((0,le.jsx)(Mc,{style:{height:`${g}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:C,children:e.elements.map((({groupId:e,width:r,fields:n,colIndex:o},a)=>(0,le.jsx)(Rc,{groupId:e,width:r,fields:n,colIndex:o,depth:t,isLastColumn:o===d.length-n.length,extendRowFullWidth:!C.disableExtendRowFullWidth,maxDepth:c.length,height:g},a)))},t))})),s},isDragging:!!o,getRootProps:(e={})=>(0,i.A)({style:K},e),getInnerProps:()=>({ref:k,role:"rowgroup"})}})({innerRef:r});return(0,le.jsxs)(Lc,(0,i.A)({ref:t},s(o),{children:[(0,le.jsx)(Ic,{scrollDirection:"left"}),(0,le.jsxs)(Dc,(0,i.A)({isDragging:a},c(),{children:[p(),d()]})),(0,le.jsx)(Ic,{scrollDirection:"right"})]}))})),Hc=n.forwardRef((function(e,t){const r=(e=>{if(e.pageSize>100)throw new Error("'props.pageSize' cannot exceed 100 in DataGrid.");const t=(0,kr.A)({props:e,name:"MuiDataGrid"}),r=n.useMemo((()=>(0,i.A)({},bi,t.localeText)),[t.localeText]),o=n.useMemo((()=>{const e=t.components;if(!e)return(0,i.A)({},Zs);const r={};return Object.entries(Zs).forEach((([t,n])=>{r[t]=void 0===e[t]?n:e[t]})),r}),[t.components]);return n.useMemo((()=>(0,i.A)({},Qs,t,{localeText:r,components:o},Ys)),[t,r,o])})(e),o=vi(r);return(0,le.jsx)(We,{apiRef:o,props:r,children:(0,le.jsx)(ce,{className:r.className,style:r.style,sx:r.sx,ref:t,children:(0,le.jsxs)(me,{children:[(0,le.jsx)(ge,{}),(0,le.jsx)(Be,{ColumnHeadersComponent:Bc,VirtualScrollerComponent:fc}),(0,le.jsx)(He,{})]})})})})),Vc=n.memo(Hc);Hc.propTypes={"aria-label":a().string,"aria-labelledby":a().string,autoHeight:a().bool,autoPageSize:a().bool,cellModesModel:a().object,checkboxSelection:a().bool,classes:a().object,columnBuffer:a().number,columnGroupingModel:a().arrayOf(a().object),columns:(a().array.isRequired,()=>null),columnThreshold:a().number,columnTypes:a().object,columnVisibilityModel:a().object,components:a().object,componentsProps:a().object,density:a().oneOf(["comfortable","compact","standard"]),disableColumnFilter:a().bool,disableColumnMenu:a().bool,disableColumnSelector:a().bool,disableDensitySelector:a().bool,disableExtendRowFullWidth:a().bool,disableIgnoreModificationsIfProcessingProps:a().bool,disableSelectionOnClick:a().bool,disableVirtualization:a().bool,editMode:a().oneOf(["cell","row"]),editRowsModel:a().object,error:a().any,experimentalFeatures:a().shape({columnGrouping:a().bool,newEditingApi:a().bool,preventCommitWhileValidating:a().bool,warnIfFocusStateIsNotSynced:a().bool}),filterMode:a().oneOf(["client","server"]),filterModel:a().shape({items:a().arrayOf(a().shape({columnField:a().string.isRequired,id:a().oneOfType([a().number,a().string]),operatorValue:a().string,value:a().any})).isRequired,linkOperator:a().oneOf(["and","or"]),quickFilterLogicOperator:a().oneOf(["and","or"]),quickFilterValues:a().array}),getCellClassName:a().func,getDetailPanelContent:a().func,getEstimatedRowHeight:a().func,getRowClassName:a().func,getRowHeight:a().func,getRowId:a().func,getRowSpacing:a().func,headerHeight:a().number,hideFooter:a().bool,hideFooterPagination:a().bool,hideFooterSelectedRowCount:a().bool,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,onCellEditCommit:a().func,onCellEditStart:a().func,onCellEditStop:a().func,onCellFocusOut:a().func,onCellKeyDown:a().func,onCellModesModelChange:a().func,onColumnHeaderClick:a().func,onColumnHeaderDoubleClick:a().func,onColumnHeaderEnter:a().func,onColumnHeaderLeave:a().func,onColumnHeaderOut:a().func,onColumnHeaderOver:a().func,onColumnOrderChange:a().func,onColumnVisibilityChange:a().func,onColumnVisibilityModelChange:a().func,onEditCellPropsChange:a().func,onEditRowsModelChange:a().func,onError:a().func,onFilterModelChange:a().func,onMenuClose:a().func,onMenuOpen:a().func,onPageChange:a().func,onPageSizeChange:a().func,onPreferencePanelClose:a().func,onPreferencePanelOpen:a().func,onProcessRowUpdateError:a().func,onResize:a().func,onRowClick:a().func,onRowDoubleClick:a().func,onRowEditCommit:a().func,onRowEditStart:a().func,onRowEditStop:a().func,onRowModesModelChange:a().func,onSelectionModelChange:a().func,onSortModelChange:a().func,onStateChange:a().func,page:a().number,pageSize:(a().number,()=>null),pagination:e=>!1===e.pagination?new Error(["MUI: `` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:a().oneOf(["client","server"]),processRowUpdate:a().func,rowBuffer:a().number,rowCount:a().number,rowHeight:a().number,rowModesModel:a().object,rows:a().arrayOf(a().object).isRequired,rowSpacingType:a().oneOf(["border","margin"]),rowsPerPageOptions:a().arrayOf(a().number),rowThreshold:a().number,scrollbarSize:a().number,selectionModel:(a().oneOfType([a().number,a().string,a().array]),()=>null),showCellRightBorder:a().bool,showColumnRightBorder:a().bool,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])}},9899:(e,t,r)=>{"use strict";r.d(t,{$:()=>m});var n=r(58168),o=r(98587),a=r(96540),i=r(55149),l=r(64111),s=r(11848),c=r(24279),u=r(74787),d=r(90441),p=r(74848);const f=["className"],h=(0,s.Ay)("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})((({theme:e})=>({position:"absolute",top:0,zIndex:4,width:"100%",height:"100%",pointerEvents:"none",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:(0,c.X4)(e.palette.background.default,e.palette.action.disabledOpacity)}))),m=a.forwardRef((function(e,t){const{className:r}=e,a=(0,o.A)(e,f),s=(0,d.A)(),c=(e=>{const{classes:t}=e;return(0,l.A)({root:["overlay"]},u.B,t)})(s);return(0,p.jsx)(h,(0,n.A)({ref:t,className:(0,i.A)(c.root,r),ownerState:s},a))}))},74787:(e,t,r)=>{"use strict";r.d(t,{B:()=>o,x:()=>a});var n=r(17245);function o(e){return(0,n.Ay)("MuiDataGrid",e)}const a=(0,r(27553).A)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","autoHeight","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLinkOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","root","root--densityStandard","root--densityComfortable","root--densityCompact","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},86980:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});const n=r(96540).createContext(void 0)},90441:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(86980);const a=()=>{const e=n.useContext(o.y);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},55149:(e,t,r)=>{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to});const o=function(){for(var e,t,r=0,o="";r{"use strict";r.d(t,{A:()=>f});var n=r(96540),o=r(5556),a=r.n(o),i=r(61224),l=r(51749),s=r(11641),c=r(65189),u=r(67110),d=r(74848);const p=(0,n.forwardRef)((({disabled:e,defaultColor:t,color:r,onOpen:o,onClose:a,onChange:p},f)=>{const[h,m]=(0,n.useState)(t),[g,v]=(0,n.useState)(null),b=(0,n.useCallback)((e=>{p?.(e.hex),m(e.hex)}),[p]),y=(0,n.useCallback)((()=>{p?.(t||""),m(t||"")}),[t,p]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.A,{ref:f,disabled:e,sx:{margin:.5,minWidth:32,minHeight:32,backgroundColor:r??h,"&:hover":{backgroundColor:r??h}},onClick:e=>{o?.(),v(e.target)}}),(0,d.jsxs)(l.Ay,{open:!!g,anchorEl:g,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},slotProps:{paper:{elevation:0,sx:{padding:1,backgroundColor:"unset",zIndex:2300}}},onClose:()=>{a?.(),v(null)},children:[(0,d.jsx)(c.xk,{color:r??h,onChange:b}),(0,d.jsx)(s.A,{size:"small",sx:{marginTop:.5,backgroundColor:e=>e.palette.background.default,boxShadow:e=>e.shadows[2]},onClick:y,children:(0,d.jsx)(u.A,{})})]})]})}));p.defaultProps={defaultColor:""},p.propTypes={disabled:a().bool,defaultColor:a().string,color:a().string,onOpen:a().func,onClose:a().func,onChange:a().func};const f=p},41695:(e,t,r)=>{"use strict";r.d(t,{Qh:()=>f,r6:()=>P,FF:()=>L,k1:()=>Le,p9:()=>Ne,YG:()=>Ge});var n=r(96540),o=r(5556),a=r.n(o),i=r(15327),l=r(50936),s=r(44635),c=r(37211),u=r(74848);const d=(0,n.forwardRef)((({divider:e,nested:t,column:r,header:n,children:o,onClick:a},d)=>{const p=(0,i.A)((e=>{let t=r;return r||(t=1),"always"===r&&(t=99999),e.breakpoints.down(t)})),f=(0,u.jsxs)(l.A,{sx:{width:"100%"},direction:p?"column":"row",alignItems:p?"flex-start":"center",children:[(0,u.jsx)(l.A,{sx:{width:"100%"},direction:"row",justifyContent:"space-between",children:n}),(0,u.jsx)(l.A,{sx:p?{width:"100%"}:void 0,alignItems:"center",children:o})]});return(0,u.jsx)(s.Ay,{ref:d,disablePadding:!!a,divider:e,sx:!a&&t?{paddingLeft:4}:void 0,children:a?(0,u.jsx)(c.A,{sx:a&&t?{paddingLeft:4}:void 0,onClick:a,children:f}):f})})),p={divider:a().bool,nested:a().bool,column:a().oneOf(["xs","sm","md","lg","xl","always"]),header:a().element,children:a().node,onClick:a().func};d.propTypes=p;const f=d;var h=r(61224),m=r(71543),g=r(60538),v=r(83826),b=r(82241),y=r(75003);const x=(0,y.A)((0,u.jsx)("path",{d:"M14 17H4v2h10zm6-8H4v2h16zM4 15h16v-2H4zM4 5v2h16V5z"}),"Subject"),w=(0,y.A)((0,u.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove"),A=(0,y.A)((0,u.jsx)("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2M3 19c0 1.1.9 2 2 2h3V10H3z"}),"TableChart");var C=r(9899),S=r(22529);function k({textEditable:e,removeDisabled:t,onModeChange:r,onRemove:n}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(l.A,{direction:"row",children:[(0,u.jsx)(l.A,{sx:{flexGrow:1},direction:"row",children:e&&(0,u.jsx)(h.A,{variant:"text",startIcon:(0,u.jsx)(x,{}),onClick:r,children:"텍스트 편집 모드로 전환"})}),(0,u.jsx)(h.A,{variant:"text",startIcon:(0,u.jsx)(w,{}),disabled:t,onClick:n,children:"삭제"})]}),(0,u.jsx)(m.A,{})]})}function _({noRowsText:e}){return(0,u.jsx)(C.$,{children:e})}function E({rows:e,columns:t,textEditable:r,noRowsText:o,onModeChange:a,onChange:i}){const[l,s]=(0,n.useState)([]),c=(0,n.useCallback)((({id:t,field:r,value:n})=>{const o=e.map((e=>e.id===t?{...e,[r]:n}:e));i(o)}),[e,i]),d=(0,n.useCallback)((e=>{s(e)}),[]),p=(0,n.useCallback)((()=>{i(e.filter((e=>!l.includes(e.id))))}),[e,l,i]);return(0,u.jsx)(S.z,{rows:e,columns:t,autoHeight:!0,rowHeight:40,pagination:!0,checkboxSelection:!0,disableColumnMenu:!0,disableSelectionOnClick:!0,sx:{width:"100%"},components:{Toolbar:k,NoRowsOverlay:_},componentsProps:{toolbar:{textEditable:r,removeDisabled:!(l.length>0),onModeChange:a,onRemove:p},noRowsOverlay:{noRowsText:o}},initialState:{pagination:{pageSize:10}},rowsPerPageOptions:[10,25,50,100],onCellEditCommit:c,onSelectionModelChange:d})}function j({rows:e,columns:t,onChange:r,onModeChange:o}){const[a,i]=(0,n.useState)(""),[s,c]=(0,n.useState)(!1),d=(0,n.useCallback)((e=>{i(e.target.value)}),[]),p=(0,n.useCallback)((()=>{try{const e=a.split("\n").map((e=>{const r=e.split("::").map(((e,r)=>[t[r].field,e]));return Object.fromEntries(r)}));r(e),o()}catch(e){console.warn(e),c(!0)}}),[t,a,r,o]);return(0,n.useEffect)((()=>{i(e.map((e=>Object.values(e).join("::"))).join("\n")||"")}),[e]),(0,u.jsxs)(g.A,{variant:"outlined",sx:{width:"100%"},children:[(0,u.jsx)(l.A,{direction:"row",justifyContent:"space-between",children:(0,u.jsx)(h.A,{variant:"text",startIcon:(0,u.jsx)(A,{}),onClick:p,children:"테이블 편집 모드로 전환"})}),(0,u.jsx)(m.A,{}),(0,u.jsx)(v.Ay,{fullWidth:!0,componentsProps:{input:{sx:{padding:"8.5px 14px"}}},multiline:!0,minRows:6,maxRows:6,error:s,value:a,onChange:d})]})}const R=(0,n.forwardRef)((({divider:e,nested:t,primary:r,secondary:o,rows:a,columns:i,textEditable:l,noRowsText:s,onChange:c},d)=>{const[p,h]=(0,n.useState)(!1),m=(0,n.useCallback)((()=>{h(!p)}),[p]);return(0,u.jsx)(f,{ref:d,divider:e,nested:t,column:"always",header:(0,u.jsx)(b.A,{primary:r,secondary:o}),children:p?(0,u.jsx)(j,{rows:a,columns:i,onChange:c,onModeChange:m}):(0,u.jsx)(E,{rows:a,columns:i,textEditable:l,noRowsText:s,onModeChange:m,onChange:c})})})),M={divider:a().bool,nested:a().bool,primary:a().node,secondary:a().node,rows:a().array,columns:a().array,textEditable:a().bool,noRowsText:a().string,onChange:a().func};R.propTypes=M;const P=R;var O=r(71468),I=r(2071);const T=(0,n.forwardRef)((({divider:e,nested:t,primary:r,secondary:o,children:a,value:i,action:l,onChange:s},c)=>{const d=(0,O.wA)(),p=(0,n.useCallback)((e=>{d(l(e.target.value))}),[d,l]);return(0,u.jsx)(f,{ref:c,divider:e,nested:t,column:"lg",header:(0,u.jsx)(b.A,{primary:r,secondary:o}),children:(0,u.jsx)(I.A,{sx:{minWidth:160,width:"100%"},displayEmpty:!0,value:i,onChange:s||p,children:a})})})),$={divider:a().bool,nested:a().bool,primary:a().node,secondary:a().node,value:a().oneOfType([a().string,a().number]),action:a().func,onChange:a().func,children:a().node};T.propTypes=$;const L=T;var z=r(98587),F=r(58168),D=r(34164),N=r(92538),B=r(25419),H=r(64111),V=r(86249),W=r(93833),U=r(76937),q=r(67749),G=r(54871),K=r(50173),X=r(66111);const Z={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var Y=r(34718);function Q(e,t){return e-t}function J(e,t){var r;const{index:n}=null!=(r=e.reduce(((e,r,n)=>{const o=Math.abs(t-r);return null===e||oe===t)){return e.length===t.length&&e.every(((e,n)=>r(e,t[n])))}(e,t)}const ae={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},ie=e=>e;let le;function se(){return void 0===le&&(le="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),le}function ce(e){const{"aria-labelledby":t,defaultValue:r,disabled:o=!1,disableSwap:a=!1,isRtl:i=!1,marks:l=!1,max:s=100,min:c=0,name:u,onChange:d,onChangeCommitted:p,orientation:f="horizontal",rootRef:h,scale:m=ie,step:g=1,shiftStep:v=10,tabIndex:b,value:y}=e,x=n.useRef(),[w,A]=n.useState(-1),[C,S]=n.useState(-1),[k,_]=n.useState(!1),E=n.useRef(0),[j,R]=(0,W.A)({controlled:y,default:null!=r?r:c,name:"Slider"}),M=d&&((e,t,r)=>{const n=e.nativeEvent||e,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:u}}),d(o,t,r)}),P=Array.isArray(j);let O=P?j.slice().sort(Q):[j];O=O.map((e=>null==e?c:(0,U.A)(e,c,s)));const I=!0===l&&null!==g?[...Array(Math.floor((s-c)/g)+1)].map(((e,t)=>({value:c+g*t}))):l||[],T=I.map((e=>e.value)),{isFocusVisibleRef:$,onBlur:L,onFocus:z,ref:D}=(0,q.A)(),[N,B]=n.useState(-1),H=n.useRef(),le=(0,G.A)(D,H),ce=(0,G.A)(h,le),ue=e=>t=>{var r;const n=Number(t.currentTarget.getAttribute("data-index"));z(t),!0===$.current&&B(n),S(n),null==e||null==(r=e.onFocus)||r.call(e,t)},de=e=>t=>{var r;L(t),!1===$.current&&B(-1),S(-1),null==e||null==(r=e.onBlur)||r.call(e,t)},pe=(e,t)=>{const r=Number(e.currentTarget.getAttribute("data-index")),n=O[r],o=T.indexOf(n);let i=t;if(I&&null==g){const e=T[T.length-1];i=i>e?e:it=>{var r;if(null!==g){const e=Number(t.currentTarget.getAttribute("data-index")),r=O[e];let n=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?n=Math.max(r-v,c):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(n=Math.min(r+v,s)),null!==n&&(pe(t,n),t.preventDefault())}null==e||null==(r=e.onKeyDown)||r.call(e,t)};(0,K.A)((()=>{var e;o&&H.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[o]),o&&-1!==w&&A(-1),o&&-1!==N&&B(-1);const he=n.useRef();let me=f;i&&"horizontal"===f&&(me+="-reverse");const ge=({finger:e,move:t=!1})=>{const{current:r}=H,{width:n,height:o,bottom:i,left:l}=r.getBoundingClientRect();let u,d;if(u=0===me.indexOf("vertical")?(i-e.y)/o:(e.x-l)/n,-1!==me.indexOf("-reverse")&&(u=1-u),d=function(e,t,r){return(r-t)*e+t}(u,c,s),g)d=function(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}(d,g,c);else{const e=J(T,d);d=T[e]}d=(0,U.A)(d,c,s);let p=0;if(P){p=t?he.current:J(O,d),a&&(d=(0,U.A)(d,O[p-1]||-1/0,O[p+1]||1/0));const e=d;d=re({values:O,newValue:d,index:p}),a&&t||(p=d.indexOf(e),he.current=p)}return{newValue:d,activeIndex:p}},ve=(0,X.A)((e=>{const t=ee(e,x);if(!t)return;if(E.current+=1,"mousemove"===e.type&&0===e.buttons)return void be(e);const{newValue:r,activeIndex:n}=ge({finger:t,move:!0});ne({sliderRef:H,activeIndex:n,setActive:A}),R(r),!k&&E.current>2&&_(!0),M&&!oe(r,j)&&M(e,r,n)})),be=(0,X.A)((e=>{const t=ee(e,x);if(_(!1),!t)return;const{newValue:r}=ge({finger:t,move:!0});A(-1),"touchend"===e.type&&S(-1),p&&p(e,r),x.current=void 0,xe()})),ye=(0,X.A)((e=>{if(o)return;se()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const r=ee(e,x);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});ne({sliderRef:H,activeIndex:n,setActive:A}),R(t),M&&!oe(t,j)&&M(e,t,n)}E.current=0;const n=(0,V.A)(H.current);n.addEventListener("touchmove",ve,{passive:!0}),n.addEventListener("touchend",be,{passive:!0})})),xe=n.useCallback((()=>{const e=(0,V.A)(H.current);e.removeEventListener("mousemove",ve),e.removeEventListener("mouseup",be),e.removeEventListener("touchmove",ve),e.removeEventListener("touchend",be)}),[be,ve]);n.useEffect((()=>{const{current:e}=H;return e.addEventListener("touchstart",ye,{passive:se()}),()=>{e.removeEventListener("touchstart",ye),xe()}}),[xe,ye]),n.useEffect((()=>{o&&xe()}),[o,xe]);const we=te(P?O[0]:c,c,s),Ae=te(O[O.length-1],c,s)-we,Ce=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),S(-1)};return{active:w,axis:me,axisProps:ae,dragging:k,focusedThumbIndex:N,getHiddenInputProps:(r={})=>{var n;const a=(0,Y.h)(r),l={onChange:(d=a||{},e=>{var t;null==(t=d.onChange)||t.call(d,e),pe(e,e.target.valueAsNumber)}),onFocus:ue(a||{}),onBlur:de(a||{}),onKeyDown:fe(a||{})};var d;const p=(0,F.A)({},a,l);return(0,F.A)({tabIndex:b,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":m(s),"aria-valuemin":m(c),name:u,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(n=e.step)?n:void 0,disabled:o},r,p,{style:(0,F.A)({},Z,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{const t=(0,Y.h)(e),r={onMouseDown:(n=t||{},e=>{var t;if(null==(t=n.onMouseDown)||t.call(n,e),o)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const r=ee(e,x);if(!1!==r){const{newValue:t,activeIndex:n}=ge({finger:r});ne({sliderRef:H,activeIndex:n,setActive:A}),R(t),M&&!oe(t,j)&&M(e,t,n)}E.current=0;const a=(0,V.A)(H.current);a.addEventListener("mousemove",ve,{passive:!0}),a.addEventListener("mouseup",be)})};var n;const a=(0,F.A)({},t,r);return(0,F.A)({},e,{ref:ce},a)},getThumbProps:(e={})=>{const t=(0,Y.h)(e),r={onMouseOver:(n=t||{},e=>{var t;null==(t=n.onMouseOver)||t.call(n,e);const r=Number(e.currentTarget.getAttribute("data-index"));S(r)}),onMouseLeave:Ce(t||{})};var n;return(0,F.A)({},e,t,r)},marks:I,open:C,range:P,rootRef:ce,trackLeap:Ae,trackOffset:we,values:O,getThumbStyle:e=>({pointerEvents:-1!==w&&w!==e?"none":void 0})}}var ue=r(771),de=r(73788),pe=r(76081),fe=r(11848),he=r(64438);var me=r(28466),ge=r(27553),ve=r(17245);function be(e){return(0,ve.Ay)("MuiSlider",e)}const ye=(0,ge.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),xe=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],we=(0,pe.h)("MuiSlider");function Ae(e){return e}const Ce=(0,fe.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,me.A)(r.color)}`],"medium"!==r.size&&t[`size${(0,me.A)(r.size)}`],r.marked&&t.marked,"vertical"===r.orientation&&t.vertical,"inverted"===r.track&&t.trackInverted,!1===r.track&&t.trackFalse]}})((({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${ye.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${ye.dragging}`]:{[`& .${ye.thumb}, & .${ye.track}`]:{transition:"none"}},variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}})),Se=(0,fe.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ke=(0,fe.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t,track:"inverted"},style:(0,F.A)({},e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:(0,F.A)({backgroundColor:(0,ue.a)(e.palette[t].main,.62),borderColor:(0,ue.a)(e.palette[t].main,.62)},e.applyStyles("dark",{backgroundColor:(0,ue.e$)(e.palette[t].main,.5)}),e.applyStyles("dark",{borderColor:(0,ue.e$)(e.palette[t].main,.5)})))})))]}})),_e=(0,fe.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${(0,me.A)(r.color)}`],"medium"!==r.size&&t[`thumbSize${(0,me.A)(r.size)}`]]}})((({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${ye.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter((t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main})).map((t=>({props:{color:t},style:{[`&:hover, &.${ye.focusVisible}`]:(0,F.A)({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,ue.X4)(e.palette[t].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${ye.active}`]:(0,F.A)({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${(0,ue.X4)(e.palette[t].main,.16)}`})}}))),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}})),Ee=(0,fe.Ay)((function(e){const{children:t,className:r,value:o}=e,a=(e=>{const{open:t}=e;return{offset:(0,D.A)(t&&ye.valueLabelOpen),circle:ye.valueLabelCircle,label:ye.valueLabelLabel}})(e);return t?n.cloneElement(t,{className:(0,D.A)(t.props.className)},(0,u.jsxs)(n.Fragment,{children:[t.props.children,(0,u.jsx)("span",{className:(0,D.A)(a.offset,r),"aria-hidden":!0,children:(0,u.jsx)("span",{className:a.circle,children:(0,u.jsx)("span",{className:a.label,children:o})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((({theme:e})=>(0,F.A)({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${ye.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${ye.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),je=(0,fe.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,he.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})((({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Re=(0,fe.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,he.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((({theme:e})=>(0,F.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),Me=({children:e})=>e,Pe=n.forwardRef((function(e,t){var r,o,a,i,l,s,c,d,p,f,h,m,g,v,b,y,x,w,A,C,S,k,_,E;const j=we({props:e,name:"MuiSlider"}),R=(0,de.I)(),{"aria-label":M,"aria-valuetext":P,"aria-labelledby":O,component:I="span",components:T={},componentsProps:$={},color:L="primary",classes:V,className:W,disableSwap:U=!1,disabled:q=!1,getAriaLabel:G,getAriaValueText:K,marks:X=!1,max:Z=100,min:Y=0,orientation:Q="horizontal",shiftStep:J=10,size:ee="medium",step:re=1,scale:ne=Ae,slotProps:oe,slots:ae,track:ie="normal",valueLabelDisplay:le="off",valueLabelFormat:se=Ae}=j,ue=(0,z.A)(j,xe),pe=(0,F.A)({},j,{isRtl:R,max:Z,min:Y,classes:V,disabled:q,disableSwap:U,orientation:Q,marks:X,color:L,size:ee,step:re,shiftStep:J,scale:ne,track:ie,valueLabelDisplay:le,valueLabelFormat:se}),{axisProps:fe,getRootProps:he,getHiddenInputProps:ge,getThumbProps:ve,open:ye,active:Pe,axis:Oe,focusedThumbIndex:Ie,range:Te,dragging:$e,marks:Le,values:ze,trackOffset:Fe,trackLeap:De,getThumbStyle:Ne}=ce((0,F.A)({},pe,{rootRef:t}));pe.marked=Le.length>0&&Le.some((e=>e.label)),pe.dragging=$e,pe.focusedThumbIndex=Ie;const Be=(e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:a,classes:i,color:l,size:s}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===o&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",l&&`color${(0,me.A)(l)}`,s&&`size${(0,me.A)(s)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",s&&`thumbSize${(0,me.A)(s)}`,l&&`thumbColor${(0,me.A)(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,H.A)(c,be,i)})(pe),He=null!=(r=null!=(o=null==ae?void 0:ae.root)?o:T.Root)?r:Ce,Ve=null!=(a=null!=(i=null==ae?void 0:ae.rail)?i:T.Rail)?a:Se,We=null!=(l=null!=(s=null==ae?void 0:ae.track)?s:T.Track)?l:ke,Ue=null!=(c=null!=(d=null==ae?void 0:ae.thumb)?d:T.Thumb)?c:_e,qe=null!=(p=null!=(f=null==ae?void 0:ae.valueLabel)?f:T.ValueLabel)?p:Ee,Ge=null!=(h=null!=(m=null==ae?void 0:ae.mark)?m:T.Mark)?h:je,Ke=null!=(g=null!=(v=null==ae?void 0:ae.markLabel)?v:T.MarkLabel)?g:Re,Xe=null!=(b=null!=(y=null==ae?void 0:ae.input)?y:T.Input)?b:"input",Ze=null!=(x=null==oe?void 0:oe.root)?x:$.root,Ye=null!=(w=null==oe?void 0:oe.rail)?w:$.rail,Qe=null!=(A=null==oe?void 0:oe.track)?A:$.track,Je=null!=(C=null==oe?void 0:oe.thumb)?C:$.thumb,et=null!=(S=null==oe?void 0:oe.valueLabel)?S:$.valueLabel,tt=null!=(k=null==oe?void 0:oe.mark)?k:$.mark,rt=null!=(_=null==oe?void 0:oe.markLabel)?_:$.markLabel,nt=null!=(E=null==oe?void 0:oe.input)?E:$.input,ot=(0,N.Q)({elementType:He,getSlotProps:he,externalSlotProps:Ze,externalForwardedProps:ue,additionalProps:(0,F.A)({},(pt=He,(!pt||!(0,B.g)(pt))&&{as:I})),ownerState:(0,F.A)({},pe,null==Ze?void 0:Ze.ownerState),className:[Be.root,W]}),at=(0,N.Q)({elementType:Ve,externalSlotProps:Ye,ownerState:pe,className:Be.rail}),it=(0,N.Q)({elementType:We,externalSlotProps:Qe,additionalProps:{style:(0,F.A)({},fe[Oe].offset(Fe),fe[Oe].leap(De))},ownerState:(0,F.A)({},pe,null==Qe?void 0:Qe.ownerState),className:Be.track}),lt=(0,N.Q)({elementType:Ue,getSlotProps:ve,externalSlotProps:Je,ownerState:(0,F.A)({},pe,null==Je?void 0:Je.ownerState),className:Be.thumb}),st=(0,N.Q)({elementType:qe,externalSlotProps:et,ownerState:(0,F.A)({},pe,null==et?void 0:et.ownerState),className:Be.valueLabel}),ct=(0,N.Q)({elementType:Ge,externalSlotProps:tt,ownerState:pe,className:Be.mark}),ut=(0,N.Q)({elementType:Ke,externalSlotProps:rt,ownerState:pe,className:Be.markLabel}),dt=(0,N.Q)({elementType:Xe,getSlotProps:ge,externalSlotProps:nt,ownerState:pe});var pt;return(0,u.jsxs)(He,(0,F.A)({},ot,{children:[(0,u.jsx)(Ve,(0,F.A)({},at)),(0,u.jsx)(We,(0,F.A)({},it)),Le.filter((e=>e.value>=Y&&e.value<=Z)).map(((e,t)=>{const r=te(e.value,Y,Z),o=fe[Oe].offset(r);let a;return a=!1===ie?-1!==ze.indexOf(e.value):"normal"===ie&&(Te?e.value>=ze[0]&&e.value<=ze[ze.length-1]:e.value<=ze[0])||"inverted"===ie&&(Te?e.value<=ze[0]||e.value>=ze[ze.length-1]:e.value>=ze[0]),(0,u.jsxs)(n.Fragment,{children:[(0,u.jsx)(Ge,(0,F.A)({"data-index":t},ct,!(0,B.g)(Ge)&&{markActive:a},{style:(0,F.A)({},o,ct.style),className:(0,D.A)(ct.className,a&&Be.markActive)})),null!=e.label?(0,u.jsx)(Ke,(0,F.A)({"aria-hidden":!0,"data-index":t},ut,!(0,B.g)(Ke)&&{markLabelActive:a},{style:(0,F.A)({},o,ut.style),className:(0,D.A)(Be.markLabel,ut.className,a&&Be.markLabelActive),children:e.label})):null]},t)})),ze.map(((e,t)=>{const r=te(e,Y,Z),n=fe[Oe].offset(r),o="off"===le?Me:qe;return(0,u.jsx)(o,(0,F.A)({},!(0,B.g)(o)&&{valueLabelFormat:se,valueLabelDisplay:le,value:"function"==typeof se?se(ne(e),t):se,index:t,open:ye===t||Pe===t||"on"===le,disabled:q},st,{children:(0,u.jsx)(Ue,(0,F.A)({"data-index":t},lt,{className:(0,D.A)(Be.thumb,lt.className,Pe===t&&Be.active,Ie===t&&Be.focusVisible),style:(0,F.A)({},n,Ne(t),lt.style),children:(0,u.jsx)(Xe,(0,F.A)({"data-index":t,"aria-label":G?G(t):M,"aria-valuenow":ne(e),"aria-labelledby":O,"aria-valuetext":K?K(ne(e),t):P,value:ze[t]},dt))}))}),t)}))]}))})),Oe=Pe;var Ie=r(43714);const Te=(0,n.forwardRef)((({divider:e,nested:t,primary:r,secondary:o,opacityOnChange:a,sliderProps:i,value:l,action:s,onChange:c},d)=>{const p=(0,O.wA)(),h=(0,Ie.vf)(),m=(0,n.useCallback)(((e,t)=>{a&&h(a),p(s(t))}),[p,s,a,h]);return(0,u.jsx)(f,{ref:d,divider:e,nested:t,column:"lg",header:(0,u.jsx)(b.A,{primary:r,secondary:o}),children:(0,u.jsx)(Oe,{sx:{minWidth:160,width:"100%"},...i,value:l,onChange:c||m,onChangeCommitted:a?()=>h(1):void 0})})})),$e={divider:a().bool,nested:a().bool,primary:a().node,secondary:a().node,opacityOnChange:a().number,sliderProps:a().object,value:a().number,action:a().func,onChange:a().func};Te.propTypes=$e;const Le=Te;var ze=r(72205);const Fe=(0,n.forwardRef)((({divider:e,nested:t,primary:r,secondary:o,value:a,action:i,onChange:l},s)=>{const c=(0,O.wA)(),d=(0,n.useCallback)((()=>{c(i())}),[c,i]);return(0,u.jsx)(f,{ref:s,divider:e,nested:t,header:(0,u.jsx)(b.A,{primary:r,secondary:o}),onClick:l||d,children:(0,u.jsx)(ze.A,{checked:a})})})),De={divider:a().bool,nested:a().bool,primary:a().node,secondary:a().node,value:a().bool,action:a().func,onChange:a().func};Fe.propTypes=De;const Ne=Fe;var Be=r(11641),He=r(42471),Ve=r(16740);const We=(0,y.A)((0,u.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ue=(0,n.forwardRef)((({divider:e,nested:t,primary:r,secondary:o,multiline:a,manualSave:i,value:l,errorText:s,action:c,saveFormat:d,onChange:p},h)=>{const m=(0,O.wA)(),[g,v]=(0,n.useState)(""),[y,x]=(0,n.useState)(!1);(0,n.useEffect)((()=>{v(l)}),[l]);const w=(0,n.useCallback)((()=>{try{const e=d?.(g)||g;m(c(e))}catch(e){x(!0)}}),[m,c,d,g]),A=(0,n.useCallback)((e=>{x(!1),v(e.target.value),i||m(c(e.target.value))}),[m,c,i]);return(0,u.jsx)(f,{ref:h,divider:e,nested:t,column:"always",header:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(b.A,{primary:r,secondary:o}),i&&(0,u.jsx)(Be.A,{disabled:g===l,onClick:w,children:g!==l?(0,u.jsx)(Ve.A,{}):(0,u.jsx)(We,{})})]}),children:(0,u.jsx)(He.A,{fullWidth:!0,multiline:a,minRows:a?6:void 0,maxRows:a?6:void 0,error:y,value:g,helperText:y?s:"",onChange:p||A})})})),qe={divider:a().bool,nested:a().bool,primary:a().node,secondary:a().node,multiline:a().bool,manualSave:a().bool,value:a().string,errorText:a().string,action:a().func,saveFormat:a().func,onChange:a().func};Ue.propTypes=qe;const Ge=Ue},73185:(e,t,r)=>{"use strict";r.d(t,{s4:()=>p,RY:()=>m,SC:()=>S});var n=r(96540),o=r(5556),a=r.n(o),i=r(11848),l=r(74848);const s=(0,i.Ay)("span",{name:"BadgeTag"})((({theme:e})=>({"&:empty":{display:"none"},marginLeft:"4px",padding:"1px 5px",borderRadius:"1em",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,fontSize:"0.85em"}))),c=(0,i.Ay)("span",{name:"BadgeText"})((({theme:e})=>({"&:empty":{display:"none"},"&::before":{content:'"["'},"&::after":{content:'"]"'},padding:"1px 5px",color:e.palette.primary.main}))),u={red:"#ec4545",green:"#258d25",blue:"#0a96f2"};function d({variant:e="badge",color:t,children:r}){return"badge"===e?(0,l.jsx)(s,{sx:{background:u[t]},children:r}):"text"===e?(0,l.jsx)(c,{sx:{color:u[t]},children:r}):null}d.propTypes={variant:a().oneOf(["badge","text"]),color:a().string,children:a().node};const p=(0,n.memo)(d);var f=r(60538);function h({title:e}){return(0,l.jsx)(f.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minWidth:24,height:24,paddingX:.5,marginX:1,backgroundColor:"primary.main",color:"primary.contrastText"},children:e})}h.propTypes={title:a().string};const m=h;var g=r(77867),v=r(58031),b=r(46831),y=r(22477),x=r(58763),w=r(61224);const A=[{label:"예",value:!0,key:"Enter"},{label:"아니오",value:!1,key:"Escape",variant:"contained"}];function C({open:e,confirmRef:t,title:r,content:o,buttonList:a=A}){const i=(0,n.useCallback)((e=>{t.current("function"==typeof e?e():e)}),[t]);(0,n.useEffect)((()=>{if(!e)return;const t=e=>{const t=a.find((t=>t.key===e.key))?.value;void 0!==t&&i(t)};return document.addEventListener("keyup",t),()=>document.removeEventListener("keyup",t)}),[e,a,i]);const s="string"==typeof o?(0,l.jsx)(g.A,{children:o}):o;return(0,l.jsxs)(v.A,{open:e,children:[(0,l.jsx)(b.A,{children:r}),(0,l.jsx)(y.A,{children:s}),(0,l.jsx)(x.A,{children:a.map((({variant:e,label:t,value:r})=>(0,l.jsx)(w.A,{variant:e,onClick:()=>i(r),children:t},t)))})]})}function S(){const e=(0,n.useRef)(),[t,r]=(0,n.useState)(!1),[o,a]=(0,n.useState)(void 0);return[(0,n.useCallback)((t=>new Promise((n=>{a(t),e.current=e=>{n(e),r(!1)},r(!0)}))),[]),()=>C({...o,open:t,confirmRef:e})]}C.propTypes={open:a().bool.isRequired,confirmRef:a().object.isRequired,title:a().string.isRequired,content:a().oneOfType([a().string,a().node]).isRequired,buttonList:a().arrayOf(a().shape({label:a().string.isRequired,value:a().any.isRequired,variant:a().string}))}},92020:(e,t,r)=>{"use strict";r.d(t,{U:()=>n,z:()=>o});const n="AR_BOARD_REFRESH",o="AR_COMMENT_REFRESH"},21601:(e,t,r)=>{"use strict";r.d(t,{BH:()=>l,Bo:()=>T,Ce:()=>C,FW:()=>P,Fy:()=>w,IE:()=>_,JZ:()=>o,Kh:()=>y,L7:()=>g,LX:()=>W,Lu:()=>H,MI:()=>j,NM:()=>n,RH:()=>d,Vd:()=>E,X3:()=>i,YK:()=>m,Yn:()=>b,Z_:()=>L,Zj:()=>M,Zy:()=>a,_2:()=>V,af:()=>A,aw:()=>c,cS:()=>O,eb:()=>p,f2:()=>I,fj:()=>h,fw:()=>$,hH:()=>z,iT:()=>k,jM:()=>B,je:()=>R,lY:()=>S,mh:()=>s,n1:()=>N,nc:()=>D,ns:()=>F,r4:()=>f,sx:()=>x,tW:()=>v,uy:()=>u});const n=".content-wrapper",o=".board-title ~ .btns-board",a=".article-list + .btns-board",i=".board-title + .alert-danger",l="div.included-article-list:not(:first-child)",s=".article-wrapper ~ div.btns-board",c=".fr-box",u="footer",d="ul.navbar-nav",p="div.included-article-list .list-table",f="div.article-list .list-table",h=".article-wrapper",m="#comment",g="#comment .list-area",v=".vrow.notice:not(.notice-unfilter)",b=".vrow.column:not(.notice):not(.head), .vrow.hybrid",y=".vrow.column:not(.notice-unfilter):not(.head), .vrow.hybrid",x=".article-head .title",w=".article-head .user-info, .article-head .member-info",A=".article-info",C='.article-content img:not([class$="emoticon"]):not(.twemoji)',S='.article-content video[data-orig="gif"]:not([class$="emoticon"])',k=".article-content img:not(.twemoji), .article-content video",_='.article-body *[class$="emoticon"]',E=".article-body .article-link a",j=".article-body",R=".article-content",M=".edit-menu",P=".article-menu",O=".article-wrapper .user-info",I="#comment .comment-wrapper",T="#comment .comment-item",$="#comment .title",L="#comment .user-info",z="#comment .reply-form__user-info",F="#comment .emoticon",D="span.user-info",N=".board-title span.user-info, .vrow:not(.notice) span.user-info",B='a[href^="/u/@"]',H=".emoticon-info",V=".emoticon-info .title",W=".emoticon-info .author"},8070:(e,t,r)=>{"use strict";r.d(t,{lr:()=>y,Tc:()=>d,xV:()=>v,d8:()=>p,_W:()=>u,OX:()=>f,VU:()=>w,sy:()=>h});var n=r(43816);const o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let a;const i=new Uint8Array(16);function l(){if(!a&&(a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(i)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));const c=function(e,t,r){if(o.randomUUID&&!t&&!e)return o.randomUUID();const n=(e=e||{}).random||(e.rng||l)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}(n)};function u(e,t,r){let n=GM_getValue(e);const o=t?.version||0,a=n?.version||0;return r&&o>a&&(n&&GM_setValue(`${e}_v${a}`,n),n=r(n,t),GM_setValue(e,n)),{...t,...n}}function d(e){GM_deleteValue(e)}function p(){const e=GM_listValues().reduce(((e,t)=>({...e,[t]:GM_getValue(t)})),{});return JSON.stringify(e)}function f(e){const t=JSON.parse(e);Object.entries(t).forEach((([e,t])=>{GM_setValue(e,t)}))}function h(){GM_listValues().forEach((e=>GM_deleteValue(e)))}let m,g=!1;function v(){g=!0}const b=c();function y(){const e=new BroadcastChannel(`AR_SYNC_${GM_info.script.version}`);let t=!1;return r=>n=>o=>{if(g)return n(o);t||(e.onmessage=({data:e})=>{e.$windowId!==b&&e.$actionId&&e.$actionId!==m&&(m=e.$actionId,r.dispatch(e))},t=!0);const a=r.getState(),i=n(o);if(o.type.indexOf("/$")>-1&&!o.$actionId){const t=r.getState();Object.entries(t).filter((([,e])=>!!e.storage)).forEach((([e,t])=>{a[e].storage!==t.storage&&function(e,t){GM_setValue(e,t)}(e,t.storage)}));const n=o;n.$actionId=c(),n.$windowId=b,m=n.$actionId,e.postMessage(n)}return i}}const x=(0,n.VP)("!INIT_MONKEY_SYNC");function w({dispatch:e}){e(x())}},80806:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(86775),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(41695),u=r(43126),d=r(44794),p=r(74848);const f=(0,o.forwardRef)(((e,t)=>{const{hideDefaultImage:r,resizeImage:n,resizeVideo:f,hideUnvote:h,blockMediaNewWindow:m,ignoreSpoilerFilter:g,ignoreExternalLinkWarning:v,ratedownGuard:b}=(0,a.d4)((e=>e[u.default.id].storage));return(0,p.jsxs)(o.Fragment,{ref:t,children:[(0,p.jsx)(i.A,{variant:"subtitle1",children:u.default.name}),(0,p.jsx)(i.A,{variant:"subtitle2",children:"모양 설정"}),(0,p.jsx)(l.A,{children:(0,p.jsxs)(s.A,{disablePadding:!0,children:[(0,p.jsx)(c.p9,{divider:!0,primary:"대문 이미지 숨김",value:r,action:d.$toggleDefaultImage}),(0,p.jsx)(c.k1,{divider:!0,primary:"이미지 크기",opacityOnChange:.6,value:n,action:d.$setResizeImage}),(0,p.jsx)(c.k1,{divider:!0,primary:"동영상 크기",opacityOnChange:.6,value:f,action:d.$setResizeVideo}),(0,p.jsx)(c.p9,{divider:!0,primary:"비추천 버튼 숨김",value:h,action:d.$toggleUnvote})]})}),(0,p.jsx)(i.A,{variant:"subtitle2",children:"동작 설정"}),(0,p.jsx)(l.A,{children:(0,p.jsxs)(s.A,{disablePadding:!0,children:[(0,p.jsx)(c.p9,{divider:!0,primary:"이미지, 동영상 새 창 열기 방지",secondary:"새로고침 후에 적용됩니다.",value:m,action:d.$toggleBlockMediaNewWindow}),(0,p.jsx)(c.p9,{divider:!0,primary:"스포일러 경고 무시",value:g,action:d.$toggleIgnoreSpoilerFilter}),(0,p.jsx)(c.p9,{divider:!0,primary:"외부 링크 오픈 시 경고 무시",secondary:"새로고침 후에 적용됩니다.",value:v,action:d.$toggleIgnoreExternalLinkWarning}),(0,p.jsx)(c.p9,{divider:!0,primary:"비추천 방지",secondary:"비추천 버튼을 클릭하면 재확인 창이 표시됩니다.",value:b,action:d.$toggleRateDownGuard})]})})]})}));f.displayName=`ConfigMenuView(${u.default.id})`;const h=f,m={key:u.default.id,order:-2,Icon:n.A,label:u.default.name,View:h}},22141:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(96540),o=r(71468),a=r(59839),i=r(63493),l=r(47839),s=r(11641),c=r(75003),u=r(74848);const d=(0,c.A)([(0,u.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),(0,u.jsx)("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var p=r(21601),f=r(36742),h=r(73185),m=r(43126);const g=".article-content img:not(.twemoji), .article-content video";function v({value:e}){return e?(0,u.jsx)(a.A,{styles:{"#defaultImage":{display:"none"}}}):null}function b({value:e}){return(0,u.jsx)(a.A,{styles:{".article-body":{"& img, & video:not([controls])":{'&:not([class$="emoticon"])':{maxWidth:`${e}% !important`}}}}})}function y({value:e}){return(0,u.jsx)(a.A,{styles:{".article-body video[controls]":{maxWidth:`${e}% !important`}}})}function x({value:e}){return e?(0,u.jsx)(a.A,{styles:{"#rateDownForm":{display:"none"}}}):null}function w(){const e=(0,f.f)(p.BH),[t,r]=(0,h.SC)(),{hideDefaultImage:a,resizeImage:c,resizeVideo:w,hideUnvote:A,blockMediaNewWindow:C,ignoreSpoilerFilter:S,ignoreExternalLinkWarning:k,ratedownGuard:_}=(0,o.d4)((e=>e[m.default.id].storage)),[E,j]=(0,n.useState)(null),[R,M]=(0,n.useState)(null);(0,n.useEffect)((()=>{e&&j(document.querySelector(p.fj))}),[e]),(0,n.useEffect)((()=>{E&&C&&E.querySelectorAll(`${p.Ce}, ${p.lY}`).forEach((e=>{const t=document.createElement("a");e.insertAdjacentElement("beforebegin",t),t.append(e)}))}),[E,C]),(0,n.useEffect)((()=>{S&&(document.querySelector(".spoiler-alert-content")?.style.setProperty("display","none"),document.querySelector(".spoiler-filter.active")?.classList.remove("active"))}),[S]),(0,n.useEffect)((()=>{E&&k&&E.querySelectorAll("a.external").forEach((e=>{e.href=e.href.replace(/^https:\/\/.*\/https:\/\//,"https://"),e.href=e.href.replace(/^https:\/\/.*\/http:\/\//,"http://"),e.classList.remove("external")}))}),[E,k]),(0,n.useEffect)((()=>{if(!E||!_)return;const e=E.querySelector("#rateDown");if(!e)return;const r=async n=>{n.preventDefault(),await t({title:"비추천 재확인",content:"정말 비추천하시겠습니까?"})&&(e.removeEventListener("click",r),e.click())};return e.addEventListener("click",r),()=>e.removeEventListener("click",r)}),[E,_,t]),(0,n.useEffect)((()=>{if(!E)return;const e=E.querySelector(g);if(!e)return;const t=window.getComputedStyle(e);if("none"===t.getPropertyValue("display"))return;const r=parseInt(t.getPropertyValue("width"),10),n=parseInt(t.getPropertyValue("height"),10);if(r<10&&n<10){const t=document.createElement("span");e.parentElement.insertAdjacentElement("afterbegin",t),t.append(e);const r=document.createElement("span");e.parentElement.insertAdjacentElement("afterbegin",r),M({container:r,preview:e})}}),[E]);const P=(0,n.useCallback)((()=>{M((({preview:e,container:t})=>{e.style={width:"",height:""},e.parentElement.replaceWith(e),t.remove()}))}),[]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(v,{value:a}),(0,u.jsx)(b,{value:c}),(0,u.jsx)(y,{value:w}),(0,u.jsx)(x,{value:A}),(0,u.jsx)(r,{}),R&&(0,u.jsx)(i.Z,{container:R.container,children:(0,u.jsx)(l.A,{placement:"right",title:"미리보기 확대",children:(0,u.jsx)(s.A,{onClick:P,size:"large",children:(0,u.jsx)(d,{})})})})]})}},43126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ArticleCustom",name:"게시물 모양",description:"게시물 UI/UX를 수정합니다."}},44794:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setResizeImage:()=>c,$setResizeVideo:()=>u,$toggleBlockMediaNewWindow:()=>p,$toggleDefaultImage:()=>s,$toggleIgnoreExternalLinkWarning:()=>h,$toggleIgnoreSpoilerFilter:()=>f,$toggleRateDownGuard:()=>m,$toggleUnvote:()=>d,default:()=>g,slice:()=>l});var n=r(43816),o=r(8070),a=r(43126);const i={storage:(0,o._W)(a.default.id,{version:1,hideDefaultImage:!1,resizeImage:100,resizeVideo:100,hideUnvote:!1,blockMediaNewWindow:!1,ignoreExternalLinkWarning:!1,ignoreSpoilerFilter:!1,ratedownGuard:!1},(function(e,t){if(0===(e?.version||0)){const e=Object.keys(t).filter((e=>"version"!==e)),r=[],n=(0,o._W)("LayoutCustom");n&&r.push(...Object.entries(n).filter((t=>e.includes(t[0]))));const a=(0,o._W)("ExperienceCustom");return a&&r.push(...Object.entries(a).filter((t=>e.includes(t[0])))),{...t,...Object.fromEntries(r)}}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleDefaultImage(e){e.storage.hideDefaultImage=!e.storage.hideDefaultImage},$setResizeImage(e,t){e.storage.resizeImage=t.payload},$setResizeVideo(e,t){e.storage.resizeVideo=t.payload},$toggleUnvote(e){e.storage.hideUnvote=!e.storage.hideUnvote},$toggleBlockMediaNewWindow(e){e.storage.blockMediaNewWindow=!e.storage.blockMediaNewWindow},$toggleIgnoreSpoilerFilter(e){e.storage.ignoreSpoilerFilter=!e.storage.ignoreSpoilerFilter},$toggleIgnoreExternalLinkWarning(e){e.storage.ignoreExternalLinkWarning=!e.storage.ignoreExternalLinkWarning},$toggleRateDownGuard(e){e.storage.ratedownGuard=!e.storage.ratedownGuard}}}),{$toggleDefaultImage:s,$setResizeImage:c,$setResizeVideo:u,$toggleUnvote:d,$toggleBlockMediaNewWindow:p,$toggleIgnoreSpoilerFilter:f,$toggleIgnoreExternalLinkWarning:h,$toggleRateDownGuard:m}=l.actions,g=l.reducer},60987:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(75003),o=r(74848);const a=(0,n.A)([(0,o.jsx)("path",{d:"M15.5 5H11l5 7-5 7h4.5l5-7z"},"0"),(0,o.jsx)("path",{d:"M8.5 5H4l5 7-5 7h4.5l5-7z"},"1")],"DoubleArrow");var i=r(96540),l=r(71468),s=r(14073),c=r(60538),u=r(49799),d=r(44635),p=r(69067),f=r(82241),h=r(44448),m=r(50936),g=r(41695),v=r(73185),b=r(42050),y=r(2630);const x=(0,i.forwardRef)(((e,t)=>{const{enabled:r,autoDecode:n,clipboardDecode:a}=(0,l.d4)((e=>e[b.default.id].storage));return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(s.A,{variant:"subtitle1",children:b.default.name}),(0,o.jsx)(c.A,{children:(0,o.jsx)(u.A,{disablePadding:!0,children:(0,o.jsx)(g.p9,{primary:"사용",value:r,action:y.$toggleEnabled})})}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"디코딩"}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(g.p9,{divider:!0,primary:"자동 복호화",secondary:"원문이 링크인 코드를 자동으로 복호화합니다.",value:n,action:y.$toggleAutoDecode}),(0,o.jsx)(g.p9,{primary:"복사된 텍스트 복호화",secondary:"복사한 텍스트가 복호화 될 것 같으면 맞는 메뉴를 보여줍니다.",value:a,action:y.$toggleClipboardDecode})]})}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"인코딩"}),(0,o.jsx)(c.A,{children:(0,o.jsx)(u.A,{disablePadding:!0,children:(0,o.jsx)(d.Ay,{children:(0,o.jsx)(p.A,{sx:{width:"100%"},children:(0,o.jsx)(c.A,{variant:"outlined",children:(0,o.jsx)(u.A,{disablePadding:!0,children:(0,o.jsxs)(d.Ay,{children:[(0,o.jsx)(f.A,{primary:"인코딩"}),(0,o.jsx)(h.A,{children:(0,o.jsxs)(m.A,{direction:"row",children:[(0,o.jsx)(v.RY,{title:"Ctrl"}),"+",(0,o.jsx)(v.RY,{title:"Space"})]})})]})})})})})})})]})}));x.displayName=`ConfigMenuView(${b.default.id})`;const w=x,A={key:b.default.id,Icon:a,label:b.default.name,View:w}},89761:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(75003),p=r(74848);const f=(0,d.A)((0,p.jsx)("path",{d:"M11 18V6l-8.5 6zm.5-6 8.5 6V6z"}),"FastRewind");var h=r(89930),m=r(42050),g=r(2630);function v({target:e,closeMenu:t}){const r=(0,o.wA)(),a=(0,h.E)({key:m.default.id,selector:".base64",dataExtractor:()=>e},[e]),i=(0,n.useCallback)((()=>{r((0,g.toggleTemporaryDisabled)()),t()}),[r,t]);return a?(0,p.jsx)(l.A,{children:(0,p.jsxs)(s.A,{onClick:i,children:[(0,p.jsx)(c.A,{children:(0,p.jsx)(f,{})}),(0,p.jsx)(u.A,{children:"복호화 임시해제"})]})}):null}v.propTypes={target:i().object,closeMenu:i().func};const b=v,y={key:m.default.id,View:b,order:900}},56637:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(96540),o=r(71468);const a=new TextEncoder,i=new TextDecoder;function l(e){const t=atob(e),r=Uint8Array.from(t,(e=>e.codePointAt(0)));return i.decode(r)}var s=r(42050);const c=function(){const{enabled:e,encodeType:t}=(0,o.d4)((e=>e[s.default.id].storage));return(0,n.useEffect)((()=>{if(!e)return;if("disabled"===t)return;const r=e=>{e.target.matches("input, textarea, [contenteditable]")&&e.ctrlKey&&"Space"===e.code&&(e.preventDefault(),(async()=>{const t=window.getSelection();let r="";switch(t.type){case"Range":r=t.toString().replace(/[\u200B-\u200D\uFEFF]/g,"").trim();break;case"Caret":r=(await navigator.clipboard.readText()).replace(/[\u200B-\u200D\uFEFF]/g,"").trim()}const n=function(e){const t=a.encode(e),r=String.fromCharCode(...t);return btoa(r)}(r),o=t.getRangeAt(0);if(e.target.matches("input, textarea")){const t=e.target.value,r=t.substring(0,e.target.selectionStart)+n+t.substring(e.target.selectionEnd);return void(e.target.value=r)}if("Range"===t.type){if(o.commonAncestorContainer.parentElement.matches("a")&&o.commonAncestorContainer.parentElement.textContent===r)return void(o.commonAncestorContainer.parentElement.outerHTML=n);o.deleteContents()}const i=document.createTextNode(n);o.insertNode(i)})())};return document.addEventListener("keydown",r,!0),()=>{document.removeEventListener("keydown",r,!0)}}),[e,t]),null};var u=r(33066),d=r(69067),p=r(14073),f=r(61224),h=r(21601),m=r(92020),g=r(36742),v=r(28027),b=r(74848);const y={normal:/^([A-Za-z0-9+/]{4})+([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/,candidateUrl:/(aHR0|YUhS)([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=?|[A-Za-z0-9+/]{2}(==)?)?/,includeBreakLine:/(aHR0|YUhS)[A-Za-z0-9+/]*((<\/[a-z]+>(
)?<[a-z]+( [a-z]+(="[^"]*"))*>|
|\n)[A-Za-z0-9+/]+)+={0,2}/,excludePaddingChar:/^([A-Za-z0-9+/]{4})+([A-Za-z0-9+/]{3}|[A-Za-z0-9+/]{2})?$/,url:/^(https?:\/\/(www\.)?)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/},x={fix:"패딩 부호(=)가 빠진것 같습니다. 복원 후 복호화하시겠습니까?",url:"링크 주소 같습니다. 여시겠습니까?",more:"추가로 복호화할 수 있습니다.",final:"복호화 되었습니다."};function w(e,t=200){let r=e;const n=new RegExp(y.includeBreakLine);for(let e=0,o=n.exec(r)?.[0];e<=t&&o;e+=1,o=n.exec(r)?.[0]){if(e===t){console.warn(`[tryDecodeAll] 줄바꿈 정리 시도가 ${t}번을 넘었습니다.`);break}const n=o.replaceAll("
","").replaceAll("\n","").replaceAll(/<\/[a-z]+><[a-z]+( [a-z]+(="[^"]*")?)*>/g,"");r=r.replace(o,n)}const o=new RegExp(y.candidateUrl),a=new RegExp(y.url);for(let e=0,n=o.exec(r)?.[0];e<=t&&n;e+=1,n=o.exec(r)?.[0]){if(e===t){console.warn(`[tryDecodeAll] 복호화 시도가 ${t}번을 넘었습니다.`);break}try{if(n.length%4!=0){const e=4-n.length%4;n=`${n}${"=".repeat(e)}`}const e=l(n).split(/\shttp/).map(((e,t)=>t>0?`http${e.trim()}`:e.trim())).map((e=>o.test(e)?e:a.test(e)?`${e}`:`

${e.replace(//g,">")} (⚠️ URL 형식에 맞지 않음)

`));r=r.replace(o,e.join("
"))}catch(e){console.warn(`[tryDecodeAll] 복호화 오류\n원문: ${n}`,e);break}}return r}const A=function(){const e=(0,g.f)(h.BH),t=(0,g.f)(h.mh),{enabled:r,autoDecode:a,clipboardDecode:i}=(0,o.d4)((e=>e[s.default.id].storage)),{temporaryDisabled:c}=(0,o.d4)((e=>e[s.default.id])),[A,C]=(0,n.useState)();(0,n.useEffect)((()=>{if(!r)return;if(!a)return;if(!e)return;if(c)return;const t=document.querySelector(h.je);if(!t)return;const n=t.innerHTML;return t.innerHTML=w(t.innerHTML),()=>{t.innerHTML=n}}),[e,a,r,c]),(0,n.useEffect)((()=>{if(!r)return;if(!a)return;if(!t)return;if(c)return;const e=document.querySelectorAll(h.Bo),n=()=>{e.forEach((e=>{const t=e.querySelector(".message pre");if(!t)return;const r=t.innerHTML;t.dataset.orig=r,t.innerHTML=w(r,5)}))};return n(),window.addEventListener(m.z,n),()=>{e.forEach((e=>{const t=e.querySelector(".message pre");t&&(t.innerHTML=t.dataset.orig)})),window.removeEventListener(m.z,n)}}),[r,a,t,c]);const S=(0,n.useCallback)((e=>{let t;try{t=l(e)}catch(e){console.info("[Base64] 복호화 실패",e),C((e=>({...e,text:t,type:"final"})))}y.url.test(t)?C((e=>({...e,text:t,type:"url"}))):C((e=>({...e,text:t,type:y.normal.test(t)?"more":"final"})))}),[]);return(0,n.useEffect)((()=>{if(!r)return;if(!i)return;const e=e=>{if(e.target.matches("input, textarea, [contenteditable]"))return;const t=window.getSelection().toLocaleString().replaceAll("\n","").trim();y.excludePaddingChar.test(t)&&C((e=>({...e,text:t,type:"fix"}))),y.normal.test(t)&&S(t)};return document.addEventListener("copy",e),()=>document.removeEventListener("copy",e)}),[i,r,S]),A?(0,b.jsx)(u.A,{anchorOrigin:{horizontal:"center",vertical:"bottom"},open:!!A,onClose:()=>C(void 0),autoHideDuration:3e3,message:(0,b.jsxs)(d.A,{sx:{maxWidth:300},children:[(0,b.jsx)(p.A,{children:x[A.type]||"알 수 없는 타입"}),(0,b.jsx)(p.A,{sx:{overflow:"hidden",textOverflow:"ellipsis"},children:`"${A.text}"`})]}),action:(0,b.jsxs)(b.Fragment,{children:["more"===A.type&&(0,b.jsx)(f.A,{variant:"text",color:"inherit",size:"small",onClick:()=>{S(A.text)},children:(0,b.jsx)(p.A,{children:"복호화"})}),"fix"===A.type&&(0,b.jsx)(f.A,{variant:"text",color:"inherit",size:"small",onClick:()=>{const e=4-A.text.length%4,t=`${A.text}${"=".repeat(e)}`;S(t)},children:(0,b.jsx)(p.A,{children:"복원"})}),"url"===A.type&&(0,b.jsx)(f.A,{variant:"text",color:"inherit",size:"small",onClick:()=>{const e=new URL(A.text,"https://a");(0,v.ho)(e.href,v.u6),C(void 0)},children:(0,b.jsx)(p.A,{children:"열기"})}),(0,b.jsx)(f.A,{variant:"text",color:"inherit",size:"small",onClick:()=>{navigator.clipboard.writeText(A.text),C(void 0)},children:(0,b.jsx)(p.A,{children:"복사"})})]})}):null};function C(){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{}),(0,b.jsx)(A,{})]})}},42050:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"Base64",name:"BASE64",description:"암호화 기능을 제공합니다."}},2630:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$toggleAutoDecode:()=>c,$toggleClipboardDecode:()=>u,$toggleEnabled:()=>s,default:()=>p,slice:()=>l,toggleTemporaryDisabled:()=>d});var n=r(43816),o=r(8070),a=r(42050);const i={storage:(0,o._W)(a.default.id,{version:0,enabled:!1,autoDecode:!0,clipboardDecode:!0}),temporaryDisabled:!1},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleEnabled(e){e.storage.enabled=!e.storage.enabled},$toggleAutoDecode(e){e.storage.autoDecode=!e.storage.autoDecode},$toggleClipboardDecode(e){e.storage.clipboardDecode=!e.storage.clipboardDecode},toggleTemporaryDisabled(e){e.temporaryDisabled=!e.temporaryDisabled}}}),{$toggleEnabled:s,$toggleAutoDecode:c,$toggleClipboardDecode:u,toggleTemporaryDisabled:d}=l.actions,p=l.reducer},93115:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(86775),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(73896),u=r(41695),d=r(68079),p=r(91667),f=r(74848);const h=(0,o.forwardRef)(((e,t)=>{const{unfoldLongComment:r,modifiedIndicator:n,reverseComment:h,hideVoiceComment:m,foldComment:g,wideClickArea:v,alternativeSubmitKey:b}=(0,a.d4)((e=>e[d.default.id].storage));return(0,f.jsxs)(o.Fragment,{ref:t,children:[(0,f.jsx)(i.A,{variant:"subtitle1",children:d.default.name}),(0,f.jsx)(i.A,{variant:"subtitle2",children:"모양 설정"}),(0,f.jsx)(l.A,{children:(0,f.jsxs)(s.A,{disablePadding:!0,children:[(0,f.jsx)(u.p9,{divider:!0,primary:"장문 댓글 바로보기",secondary:"4줄 이상 작성된 댓글을 바로 펼쳐봅니다.",value:r,action:p.$toggleLongComment}),(0,f.jsx)(u.p9,{divider:!0,primary:"댓글 *수정됨 표시",value:n,action:p.$toggleModifiedIndicator}),(0,f.jsx)(u.p9,{divider:!0,primary:"댓글 입력창을 가장 위로 올리기",value:h,action:p.$toggleReverseComment}),(0,f.jsx)(u.p9,{divider:!0,primary:"음성 댓글 버튼 숨기기",value:m,action:p.$toggleHideVoiceComment})]})}),(0,f.jsx)(i.A,{variant:"subtitle2",children:"동작 설정"}),(0,f.jsx)(l.A,{children:(0,f.jsxs)(s.A,{disablePadding:!0,children:[(0,f.jsx)(u.p9,{divider:!0,primary:"댓글 접기",secondary:"게시물 댓글을 접고 댓글 보기 버튼을 추가합니다.",value:g,action:p.$toggleFold}),(0,f.jsx)(u.p9,{divider:!0,primary:"넓은 답글 버튼 사용",secondary:"댓글 어디를 클릭하든 답글창이 열립니다.",value:v,action:p.$toggleWideArea}),(0,f.jsxs)(u.FF,{primary:"댓글 작성키 변경",value:b,action:p.$setAlternativeSubmitKey,children:[(0,f.jsx)(c.A,{value:"",children:"Enter"}),(0,f.jsx)(c.A,{value:"ctrlKey",children:"Ctrl+Enter"}),(0,f.jsx)(c.A,{value:"shiftKey",children:"Shift+Enter"})]})]})})]})}));h.displayName=`ConfigMenuView(${d.default.id})`;const m=h,g={key:d.default.id,order:-1,Icon:n.A,label:d.default.name,View:m}},49247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(96540),o=r(71468),a=r(59839),i=r(63493),l=r(61224),s=r(21601),c=r(92020),u=r(36742),d=r(78383),p=r(68079),f=r(74848);function h({value:e}){return e?(0,f.jsx)(a.A,{styles:{"#comment":{"& .message":{maxHeight:"none !important"},"& .btn-more":{display:" none !important"}}}}):null}function m({value:e}){return e?null:(0,f.jsx)(a.A,{styles:{"b.modified":{display:"none"}}})}function g({value:e}){return e?(0,f.jsx)(a.A,{styles:{"#comment":{display:"flex",flexDirection:"column","& .title":{order:0},"& #commentForm":{order:1},"& .list-area":{order:2}}}}):null}function v({value:e}){return e?(0,f.jsx)(a.A,{styles:{"#comment .btn-voicecmt":{display:"none !important"}}}):null}const b=(0,f.jsx)(a.A,{styles:{"#comment:not(.temp-show)":{display:"none"}}});function y(){const e=(0,u.f)(s.mh),{unfoldLongComment:t,modifiedIndicator:r,reverseComment:a,hideVoiceComment:y,foldComment:x,wideClickArea:w,alternativeSubmitKey:A}=(0,o.d4)((e=>e[p.default.id].storage)),[C,S]=(0,n.useState)(null),[k,_]=(0,n.useState)(null),[E,j]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(!e)return;const t=()=>{S(document.querySelector(s.YK))};t(),window.addEventListener(c.z,t)}),[e]),(0,n.useEffect)((()=>{if(C&&x&&!Object.keys((0,d.$Z)()).includes("cp")&&!k){const e=document.createElement("div");C.insertAdjacentElement("afterend",e),_(e)}}),[C,x,k]),(0,n.useEffect)((()=>{if(!C||!w)return;const e=e=>{if(e.target.closest("form"))return;const t=e.target.closest("a, .emoticon, .btn-more, .message");t?.classList.contains("message")&&(e.preventDefault(),t.parentNode.querySelector(".reply-link").click())};return C.addEventListener("click",e),()=>C.removeEventListener("click",e)}),[C,w]),(0,n.useEffect)((()=>{if(!C)return;if(!A)return;const e=e=>{e.target.matches('[name="content"]')&&"Enter"===e.key&&(e.stopPropagation(),e[A]&&(e.preventDefault(),e.target.closest("form").querySelector('[type="submit"]').click()))};return document.body.addEventListener("keydown",e,!0),()=>{document.body.removeEventListener("keydown",e,!0)}}),[A,C]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h,{value:t}),(0,f.jsx)(m,{value:r}),(0,f.jsx)(g,{value:a}),(0,f.jsx)(v,{value:y}),x&&k&&!E&&(0,f.jsxs)(i.Z,{container:k,children:[b,(0,f.jsx)(l.A,{fullWidth:!0,onClick:()=>j(!0),children:"댓글 펼치기"})]})]})}},68079:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"CommentCustom",name:"댓글 모양",description:"게시물 UI/UX를 수정합니다."}},91667:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setAlternativeSubmitKey:()=>h,$toggleFold:()=>p,$toggleHideVoiceComment:()=>d,$toggleLongComment:()=>s,$toggleModifiedIndicator:()=>c,$toggleReverseComment:()=>u,$toggleWideArea:()=>f,default:()=>m,slice:()=>l});var n=r(43816),o=r(8070),a=r(68079);const i={storage:(0,o._W)(a.default.id,{version:1,unfoldLongComment:!1,modifiedIndicator:!1,reverseComment:!1,hideVoiceComment:!1,foldComment:!1,wideClickArea:!0,alternativeSubmitKey:""},(function(e,t){if(0===(e?.version||0)){const e=Object.keys(t).filter((e=>"version"!==e)),r=[],n=(0,o._W)("LayoutCustom");n&&r.push(...Object.entries(n).filter((t=>e.includes(t[0]))));const a=(0,o._W)("ExperienceCustom");return a&&r.push(...Object.entries(a).filter((t=>e.includes(t[0])))),{...t,...Object.fromEntries(r)}}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleLongComment(e){e.storage.unfoldLongComment=!e.storage.unfoldLongComment},$toggleModifiedIndicator(e){e.storage.modifiedIndicator=!e.storage.modifiedIndicator},$toggleReverseComment(e){e.storage.reverseComment=!e.storage.reverseComment},$toggleHideVoiceComment(e){e.storage.hideVoiceComment=!e.storage.hideVoiceComment},$toggleFold(e){e.storage.foldComment=!e.storage.foldComment},$toggleWideArea(e){e.storage.wideClickArea=!e.storage.wideClickArea},$setAlternativeSubmitKey(e,t){e.storage.alternativeSubmitKey=t.payload}}}),{$toggleLongComment:s,$toggleModifiedIndicator:c,$toggleReverseComment:u,$toggleHideVoiceComment:d,$toggleFold:p,$toggleWideArea:f,$setAlternativeSubmitKey:h}=l.actions,m=l.reducer},70959:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(96540),o=r(59839),a=r(63493),i=r(11641),l=r(40250),s=r(21601),c=r(92020),u=r(36742),d=r(78383),p=r(74848);const f=(0,p.jsx)(o.A,{styles:{".reply-form__user-info":{alignItems:"center"}}}),h=function(){const e=(0,u.f)(s.mh),[t,r]=(0,n.useState)({top:void 0,bottom:void 0}),o=(0,n.useRef)(void 0);(0,n.useEffect)((()=>{if(!e)return;o.current=document.querySelector(s.L7),new MutationObserver((()=>{o.current.parentElement||(o.current=document.querySelector(s.L7),window.dispatchEvent(new Event(c.z)))})).observe(document.querySelector(s.YK),{childList:!0,subtree:!0});const t=document.createElement("span"),n=document.createElement("span");document.querySelector(s.fw)?.append(t),document.querySelector(s.hH)?.prepend(n),r({top:t,bottom:n})}),[e]);const h=(0,n.useCallback)((async()=>{const e=await fetch(window.location.href);if(!e.ok)return void console.warn("[CommentRefresh] 네트워크 오류");const t=await e.text(),r=(0,d.YE)(t).querySelector(s.L7);r&&(o.current.replaceWith(r),o.current=r,r.querySelector(".fetch-comment").addEventListener("click",h),unsafeWindow.applyLocalTimeFix(),window.dispatchEvent(new Event(c.z)))}),[]);return(0,p.jsxs)(p.Fragment,{children:[f,t.top&&(0,p.jsx)(a.Z,{container:t.top,children:(0,p.jsx)(i.A,{size:"small",sx:{color:"var(--color-text-muted)"},onClick:h,children:(0,p.jsx)(l.A,{})})}),t.bottom&&(0,p.jsx)(a.Z,{container:t.bottom,children:(0,p.jsx)(i.A,{size:"small",sx:{color:"var(--color-text-muted)"},onClick:h,children:(0,p.jsx)(l.A,{})})})]})}},28607:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"CommentRefresh",name:"댓글 새로고침",description:"댓글 새로고침 버튼을 추가합니다."}},49899:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(75003),o=r(74848);const a={Icon:(0,n.A)((0,o.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),label:"게시물",order:2}},14366:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(96540),o=r(71468),a=r(61224),i=r(26566),l=r(81839),s=r(39923),c=r(74848);function u(){const e=(0,o.wA)(),{open:t}=(0,o.d4)((e=>e[l.default.id])),r=(0,n.useCallback)((()=>{e((0,s.setOpen)(!0))}),[e]);return(0,c.jsx)(a.A,{size:"small",variant:"text",startIcon:(0,c.jsx)(i.A,{}),onClick:r,disabled:t,children:"이미지 다운로더"})}},61903:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>j});var n=r(26566),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(73896),u=r(41695),d=r(81839),p=r(39923),f=r(5556),h=r.n(f),m=r(82241),g=r(69067),v=r(42471),b=r(11641),y=r(94405),x=r(99682),w=r(46213),A=r(74848);const C=(0,o.forwardRef)((({divider:e,nested:t,primary:r,secondary:n,selectableList:i,value:l,action:s},d)=>{const p=(0,a.wA)(),f=(0,o.useRef)(void 0),h=(0,o.useRef)({start:0,end:0}),[C,S]=(0,o.useState)(null),k=(0,o.useCallback)((e=>{p(s(e.target.value))}),[s,p]),_=(0,o.useCallback)((e=>{h.current={start:e.target.selectionStart,end:e.target.selectionEnd}}),[]),E=(0,o.useCallback)((e=>{S(e.target)}),[]),j=(0,o.useCallback)((()=>{S(null)}),[]),R=(0,o.useCallback)((e=>{const t=e.target.getAttribute("value"),r=f.current.value,{start:n,end:o}=h.current,a=r.substr(0,n)+t+r.substr(o);f.current.value=a,p(s(f.current.value)),S(null)}),[s,p]);return(0,A.jsx)(u.Qh,{ref:d,divider:e,nested:t,column:"always",header:(0,A.jsx)(m.A,{primary:r,secondary:n}),children:(0,A.jsxs)(g.A,{sx:{width:"100%"},children:[(0,A.jsx)(v.A,{fullWidth:!0,inputRef:f,inputProps:{sx:{paddingRight:4.5}},value:l,onSelect:_,onChange:k}),(0,A.jsx)(b.A,{sx:{position:"absolute",bottom:11,right:19},size:"small",onClick:E,children:(0,A.jsx)(x.A,{})}),(0,A.jsx)(y.A,{anchorEl:C,open:!!C,onClose:j,children:i.map((e=>(0,A.jsx)(c.A,{value:w.u[e].STRING,onClick:R,children:w.u[e].LABEL},e)))})]})})})),S={divider:h().bool,nested:h().bool,primary:h().string,secondary:h().string,selectableList:h().array,value:h().string,action:h().func};C.propTypes=S;const k=C,_=(0,o.forwardRef)(((e,t)=>{const{enabled:r,contextMenuEnabled:n,downloadMethod:f,startWithZero:h,fileName:m,zipName:g,zipExtension:v,zipImageName:b}=(0,a.d4)((e=>e[d.default.id].storage));return(0,A.jsxs)(o.Fragment,{ref:t,children:[(0,A.jsx)(i.A,{variant:"subtitle1",children:d.default.name}),(0,A.jsx)(i.A,{variant:"subtitle2",children:"동작 설정"}),(0,A.jsx)(l.A,{children:(0,A.jsxs)(s.A,{disablePadding:!0,children:[(0,A.jsx)(u.p9,{divider:!0,primary:"다운로더 사용",secondary:"사이트에서 제공하는 다운로드 기능을 대체합니다.",value:r,action:p.$toggleEnable}),(0,A.jsx)(u.p9,{divider:!0,primary:"우클릭 메뉴 사용",value:n,action:p.$toggleContextMenu}),(0,A.jsxs)(u.FF,{divider:!0,primary:"다운로드 방식",value:f,action:p.$setDownloadMethod,children:[(0,A.jsx)(c.A,{value:"fetch",children:"fetch"}),(0,A.jsx)(c.A,{value:"xhr+fetch",children:"XHR+fetch"}),(0,A.jsx)(c.A,{value:"xhr",children:"XHR"})]})]})}),(0,A.jsx)(i.A,{variant:"subtitle2",children:"저장될 이름 설정"}),(0,A.jsx)(l.A,{children:(0,A.jsxs)(s.A,{disablePadding:!0,children:[(0,A.jsx)(u.p9,{divider:!0,primary:"숫자 0부터 사용",secondary:"%num% 변수 사용 시 0부터 카운트 됩니다",value:h,action:p.$toggleStartWithZero}),(0,A.jsx)(k,{divider:!0,primary:"우클릭 저장 시 이미지 이름",selectableList:["CHANNEL","CHANNEL_ID","TITLE","CATEGORY","AUTHOR","ARTICLE_ID","DATE","TIME","URL","ORIG"],value:m,action:p.$setFileName}),(0,A.jsx)(k,{divider:!0,primary:"일괄 다운로드 시 압축파일 이름",selectableList:["CHANNEL","CHANNEL_ID","TITLE","CATEGORY","AUTHOR","ARTICLE_ID","DATE","TIME","URL"],value:g,action:p.$setZipName}),(0,A.jsxs)(u.FF,{divider:!0,primary:"일괄 다운로드 시 압축파일 확장자",value:v,action:p.$setZipExtension,children:[(0,A.jsx)(c.A,{value:"zip",children:"zip"}),(0,A.jsx)(c.A,{value:"cbz",children:"cbz"})]}),(0,A.jsx)(k,{primary:"일괄 다운로드 시 압축파일 내 이미지 이름",selectableList:["CHANNEL","CHANNEL_ID","TITLE","CATEGORY","AUTHOR","ARTICLE_ID","DATE","TIME","URL","ORIG","NUMBER"],value:b,action:p.$setZipImageName})]})})]})}));_.displayName=`ConfigMenuView(${d.default.id})`;const E=_,j={key:d.default.id,Icon:n.A,label:d.default.name,View:E}},61690:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(17332),p=r(26566),f=r(42828),h=r(71451),m=r.n(h),g=r(21601),v=r(89930),b=r(46117),y=r(50060),x=r(78383),w=r(92129),A=r(81839),C=r(74848);function S({target:e,closeMenu:t}){const{contextMenuEnabled:r,downloadMethod:a,fileName:i}=(0,o.d4)((e=>e[A.default.id].storage)),h=(0,y.HZ)(),S=(0,b.X)(),k=(0,v.E)({key:A.default.id,selector:r?`${g.Ce}, ${g.lY}`:"NULL",dataExtractor:()=>{if(e)return(0,w.u)(e)}},[e]),_=(0,n.useCallback)((()=>{(async()=>{const{orig:e}=k;try{t(),S({msg:"이미지를 다운로드 중..."});const r=await(0,x.Em)(e,{responseType:"blob"}).then((e=>e.response)),n=document.createElement("canvas"),o=n.getContext("2d"),a=await new Promise((e=>{const t=new Image;t.onload=()=>{n.width=t.width,n.height=t.height,o.drawImage(t,0,0),n.toBlob((t=>{e(t)}))},t.src=URL.createObjectURL(r)}));n.remove();const i=new ClipboardItem({[a.type]:a});navigator.clipboard.write([i]),S({msg:"클립보드에 이미지가 복사되었습니다.",time:3e3})}catch(t){console.warn("다운로드 실패",e,t),S({msg:"이미지 다운로드에 실패했습니다.",time:3e3})}})()}),[t,k,S]),E=(0,n.useCallback)((()=>{(async()=>{let{orig:e}=k;const{ext:r,uploadName:n}=k;try{t();const o=(0,w.G)(i,{content:h,fileName:n});switch(a){case"fetch":{const t=await fetch(e),n=Number(t.headers.get("content-length")),a=t.body,i=m().createWriteStream(`${o}.${r}`,{size:n});a.pipeTo(i);break}case"xhr+fetch":{const t=await(0,x.Em)(e,{responseType:"blob"}),n=Number(t.responseHeaders.split("content-length: ")[1].split("\r")[0])||0;e=t.finalUrl;const a=(await fetch(e)).body,i=m().createWriteStream(`${o}.${r}`,{size:n});a.pipeTo(i);break}case"xhr":{S({msg:"다운로드 준비 중..."});const t=await(0,x.Em)(e,{responseType:"blob"}),n=Number(t.responseHeaders.split("content-length: ")[1].split("\r")[0])||0,a=t.response.stream(),i=m().createWriteStream(`${o}.${r}`,{size:n});a.pipeTo(i),S();break}default:throw new Error("확인할 수 없는 다운로드 방식 사용")}}catch(e){console.warn(`[ImageDownload] ${n} 다운로드 실패`,e),S({msg:"이미지 다운로드에 실패했습니다.",time:3e3})}})()}),[k,t,a,i,h,S]),j=(0,n.useCallback)((()=>{t(),navigator.clipboard.writeText(k.orig)}),[t,k]);return k?(0,C.jsxs)(l.A,{children:[(0,C.jsxs)(s.A,{onClick:_,children:[(0,C.jsx)(c.A,{children:(0,C.jsx)(d.A,{})}),(0,C.jsx)(u.A,{children:"클립보드로 복사"})]}),(0,C.jsxs)(s.A,{onClick:E,children:[(0,C.jsx)(c.A,{children:(0,C.jsx)(p.A,{})}),(0,C.jsx)(u.A,{children:"이미지 저장"})]}),(0,C.jsxs)(s.A,{onClick:j,children:[(0,C.jsx)(c.A,{children:(0,C.jsx)(f.A,{})}),(0,C.jsx)(u.A,{children:"이미지 주소 복사"})]})]}):null}S.propTypes={target:i().object,closeMenu:i().func};const k=S,_={key:A.default.id,View:k,order:900}},21903:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_s});var n=r(96540),o=r(71468),a=r(59839),i=r(63493),l=r(61224),s=r(26566),c=r(21601),u=r(36742),d=r(58031),p=r(22477),f=r(73357),h=r(46831),m=r(11641),g=r(58763),v=r(14073),b=r(17809);function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var x=r(84997),w=r(32321),A=r(22231);function C(e){return C="function"==typeof w&&"symbol"==typeof A?function(e){return typeof e}:function(e){return e&&"function"==typeof w&&e.constructor===w&&e!==w.prototype?"symbol":typeof e},C(e)}var S=r(19280);function k(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var r=e[S];if(void 0!==r){var n=r.call(e,"string");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}function _(e,t){for(var r=0;r=0;)e[t]=0}r(65881);const R=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),M=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),P=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),I=new Array(576);j(I);const T=new Array(60);j(T);const $=new Array(512);j($);const L=new Array(256);j(L);const z=new Array(29);j(z);const F=new Array(30);function D(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let N,B,H;function V(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}j(F);const W=e=>e<256?$[e]:$[256+(e>>>7)],U=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},q=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{q(e,r[2*t],r[2*t+1])},K=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},X=(e,t,r)=>{const n=new Array(16);let o,a,i=0;for(o=1;o<=15;o++)i=i+r[o-1]<<1,n[o]=i;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=K(n[t]++,t))}},Z=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Y=e=>{e.bi_valid>8?U(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Q=(e,t,r,n)=>{const o=2*t,a=2*r;return e[o]{const n=e.heap[r];let o=r<<1;for(;o<=e.heap_len&&(o{let n,o,a,i,l=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+l++],n+=(255&e.pending_buf[e.sym_buf+l++])<<8,o=e.pending_buf[e.sym_buf+l++],0===n?G(e,o,t):(a=L[o],G(e,a+256+1,t),i=R[a],0!==i&&(o-=z[a],q(e,o,i)),n--,a=W(n),G(e,a,r),i=M[a],0!==i&&(n-=F[a],q(e,n,i)))}while(l{const r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)J(e,r,i);s=a;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],J(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,r[2*s]=r[2*i]+r[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,r[2*i+1]=r[2*l+1]=s,e.heap[1]=s++,J(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,u,d,p,f,h,m=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(r[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)u=e.heap[c],p=r[2*r[2*u+1]+1]+1,p>s&&(p=s,m++),r[2*u+1]=p,u>n||(e.bl_count[p]++,f=0,u>=l&&(f=i[u-l]),h=r[2*u],e.opt_len+=h*(p+f),a&&(e.static_len+=h*(o[2*u+1]+f)));if(0!==m){do{for(p=s-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[s]--,m-=2}while(m>0);for(p=s;0!==p;p--)for(u=e.bl_count[p];0!==u;)d=e.heap[--c],d>n||(r[2*d+1]!==p&&(e.opt_len+=(p-r[2*d+1])*r[2*d],r[2*d+1]=p),u--)}})(e,t),X(r,c,e.bl_count)},re=(e,t,r)=>{let n,o,a=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=i,i=t[2*(n+1)+1],++l{let n,o,a=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),n=0;n<=r;n++)if(o=i,i=t[2*(n+1)+1],!(++l{q(e,0+(n?1:0),3),Y(e),U(e,r),U(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var ie={_tr_init:e=>{oe||((()=>{let e,t,r,n,o;const a=new Array(16);for(r=0,n=0;n<28;n++)for(z[n]=r,e=0;e<1<>=7;n<30;n++)for(F[n]=o<<7,e=0;e<1<{let o,a,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),te(e,e.l_desc),te(e,e.d_desc),i=(e=>{let t;for(re(e,e.dyn_ltree,e.l_desc.max_code),re(e,e.dyn_dtree,e.d_desc.max_code),te(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*O[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?ae(e,t,r,n):4===e.strategy||a===o?(q(e,2+(n?1:0),3),ee(e,I,T)):(q(e,4+(n?1:0),3),((e,t,r,n)=>{let o;for(q(e,t-257,5),q(e,r-1,5),q(e,n-4,4),o=0;o(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(L[r]+256+1)]++,e.dyn_dtree[2*W(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{q(e,2,3),G(e,256,I),(e=>{16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},le=(e,t,r,n)=>{let o=65535&e,a=e>>>16&65535,i=0;for(;0!==r;){i=r>2e3?2e3:r,r-=i;do{o=o+t[n++]|0,a=a+o|0}while(--i);o%=65521,a%=65521}return o|a<<16};const se=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var ce=(e,t,r,n)=>{const o=se,a=n+r;e^=-1;for(let r=n;r>>8^o[255&(e^t[r])];return~e},ue={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},de={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:pe,_tr_stored_block:fe,_tr_flush_block:he,_tr_tally:me,_tr_align:ge}=ie,{Z_NO_FLUSH:ve,Z_PARTIAL_FLUSH:be,Z_FULL_FLUSH:ye,Z_FINISH:xe,Z_BLOCK:we,Z_OK:Ae,Z_STREAM_END:Ce,Z_STREAM_ERROR:Se,Z_DATA_ERROR:ke,Z_BUF_ERROR:_e,Z_DEFAULT_COMPRESSION:Ee,Z_FILTERED:je,Z_HUFFMAN_ONLY:Re,Z_RLE:Me,Z_FIXED:Pe,Z_DEFAULT_STRATEGY:Oe,Z_UNKNOWN:Ie,Z_DEFLATED:Te}=de,$e=258,Le=262,ze=42,Fe=113,De=666,Ne=(e,t)=>(e.msg=ue[t],t),Be=e=>2*e-(e>4?9:0),He=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ve=e=>{let t,r,n,o=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=o?r-o:0}while(--t);t=o,n=t;do{r=e.prev[--n],e.prev[n]=r>=o?r-o:0}while(--t)};let We=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},qe=(e,t)=>{he(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ue(e.strm)},Ge=(e,t)=>{e.pending_buf[e.pending++]=t},Ke=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Xe=(e,t,r,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),r),1===e.state.wrap?e.adler=le(e.adler,t,o,r):2===e.state.wrap&&(e.adler=ce(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)},Ze=(e,t)=>{let r,n,o=e.max_chain_length,a=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-Le?e.strstart-(e.w_size-Le):0,c=e.window,u=e.w_mask,d=e.prev,p=e.strstart+$e;let f=c[a+i-1],h=c[a+i];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do{if(r=t,c[r+i]===h&&c[r+i-1]===f&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&ai){if(e.match_start=t,i=n,n>=l)break;f=c[a+i-1],h=c[a+i]}}}while((t=d[t&u])>s&&0!=--o);return i<=e.lookahead?i:e.lookahead},Ye=e=>{const t=e.w_size;let r,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Le)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ve(e),n+=t),0===e.strm.avail_in)break;if(r=Xe(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=We(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=We(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n,o,a=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i=0,l=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ue(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(Xe(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===i);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Xe(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,a=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=a||(n||t===xe)&&t!==ve&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,i=t===xe&&0===e.strm.avail_in&&r===n?1:0,fe(e,e.block_start,r,i),e.block_start+=r,Ue(e.strm)),i?3:1)},Je=(e,t)=>{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=We(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Le&&(e.match_length=Ze(e,r)),e.match_length>=3)if(n=me(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=We(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=We(e,e.ins_h,e.window[e.strstart+1]);else n=me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(qe(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===xe?(qe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(qe(e,!1),0===e.strm.avail_out)?1:2},et=(e,t)=>{let r,n,o;for(;;){if(e.lookahead=3&&(e.ins_h=We(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=me(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=We(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(qe(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=me(e,0,e.window[e.strstart-1]),n&&qe(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=me(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===xe?(qe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(qe(e,!1),0===e.strm.avail_out)?1:2};function tt(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}const rt=[new tt(0,0,0,0,Qe),new tt(4,4,8,4,Je),new tt(4,5,16,8,Je),new tt(4,6,32,32,Je),new tt(4,4,16,16,et),new tt(8,16,32,32,et),new tt(8,16,128,128,et),new tt(8,32,128,256,et),new tt(32,128,258,1024,et),new tt(32,258,258,4096,et)];function nt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Te,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),He(this.dyn_ltree),He(this.dyn_dtree),He(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),He(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),He(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ot=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ze&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Fe&&t.status!==De?1:0},at=e=>{if(ot(e))return Ne(e,Se);e.total_in=e.total_out=0,e.data_type=Ie;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ze:Fe,e.adler=2===t.wrap?0:1,t.last_flush=-2,pe(t),Ae},it=e=>{const t=at(e);var r;return t===Ae&&((r=e.state).window_size=2*r.w_size,He(r.head),r.max_lazy_match=rt[r.level].max_lazy,r.good_match=rt[r.level].good_length,r.nice_match=rt[r.level].nice_length,r.max_chain_length=rt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},lt=(e,t,r,n,o,a)=>{if(!e)return Se;let i=1;if(t===Ee&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>9||r!==Te||n<8||n>15||t<0||t>9||a<0||a>Pe||8===n&&1!==i)return Ne(e,Se);8===n&&(n=9);const l=new nt;return e.state=l,l.strm=e,l.status=ze,l.wrap=i,l.gzhead=null,l.w_bits=n,l.w_size=1<lt(e,t,Te,15,8,Oe),deflateInit2:lt,deflateReset:it,deflateResetKeep:at,deflateSetHeader:(e,t)=>ot(e)||2!==e.state.wrap?Se:(e.state.gzhead=t,Ae),deflate:(e,t)=>{if(ot(e)||t>we||t<0)return e?Ne(e,Se):Se;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===De&&t!==xe)return Ne(e,0===e.avail_out?_e:Se);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Ue(e),0===e.avail_out)return r.last_flush=-1,Ae}else if(0===e.avail_in&&Be(t)<=Be(n)&&t!==xe)return Ne(e,_e);if(r.status===De&&0!==e.avail_in)return Ne(e,_e);if(r.status===ze&&0===r.wrap&&(r.status=Fe),r.status===ze){let t=Te+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=Re||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Ke(r,t),0!==r.strstart&&(Ke(r,e.adler>>>16),Ke(r,65535&e.adler)),e.adler=1,r.status=Fe,Ue(e),0!==r.pending)return r.last_flush=-1,Ae}if(57===r.status)if(e.adler=0,Ge(r,31),Ge(r,139),Ge(r,8),r.gzhead)Ge(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ge(r,255&r.gzhead.time),Ge(r,r.gzhead.time>>8&255),Ge(r,r.gzhead.time>>16&255),Ge(r,r.gzhead.time>>24&255),Ge(r,9===r.level?2:r.strategy>=Re||r.level<2?4:0),Ge(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ge(r,255&r.gzhead.extra.length),Ge(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ce(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Ge(r,0),Ge(r,0),Ge(r,0),Ge(r,0),Ge(r,0),Ge(r,9===r.level?2:r.strategy>=Re||r.level<2?4:0),Ge(r,3),r.status=Fe,Ue(e),0!==r.pending)return r.last_flush=-1,Ae;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=ce(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=o,Ue(e),0!==r.pending)return r.last_flush=-1,Ae;t=0,n-=o}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=ce(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=ce(e.adler,r.pending_buf,r.pending-n,n)),Ue(e),0!==r.pending)return r.last_flush=-1,Ae;n=0}t=r.gzindexn&&(e.adler=ce(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=ce(e.adler,r.pending_buf,r.pending-n,n)),Ue(e),0!==r.pending)return r.last_flush=-1,Ae;n=0}t=r.gzindexn&&(e.adler=ce(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Ue(e),0!==r.pending))return r.last_flush=-1,Ae;Ge(r,255&e.adler),Ge(r,e.adler>>8&255),e.adler=0}if(r.status=Fe,Ue(e),0!==r.pending)return r.last_flush=-1,Ae}if(0!==e.avail_in||0!==r.lookahead||t!==ve&&r.status!==De){let n=0===r.level?Qe(r,t):r.strategy===Re?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Ye(e),0===e.lookahead)){if(t===ve)return 1;break}if(e.match_length=0,r=me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(qe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===xe?(qe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(qe(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===Me?((e,t)=>{let r,n,o,a;const i=e.window;for(;;){if(e.lookahead<=$e){if(Ye(e),e.lookahead<=$e&&t===ve)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=i[o],n===i[++o]&&n===i[++o]&&n===i[++o])){a=e.strstart+$e;do{}while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=me(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(qe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===xe?(qe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(qe(e,!1),0===e.strm.avail_out)?1:2})(r,t):rt[r.level].func(r,t);if(3!==n&&4!==n||(r.status=De),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),Ae;if(2===n&&(t===be?ge(r):t!==we&&(fe(r,0,0,!1),t===ye&&(He(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Ue(e),0===e.avail_out))return r.last_flush=-1,Ae}return t!==xe?Ae:r.wrap<=0?Ce:(2===r.wrap?(Ge(r,255&e.adler),Ge(r,e.adler>>8&255),Ge(r,e.adler>>16&255),Ge(r,e.adler>>24&255),Ge(r,255&e.total_in),Ge(r,e.total_in>>8&255),Ge(r,e.total_in>>16&255),Ge(r,e.total_in>>24&255)):(Ke(r,e.adler>>>16),Ke(r,65535&e.adler)),Ue(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?Ae:Ce)},deflateEnd:e=>{if(ot(e))return Se;const t=e.state.status;return e.state=null,t===Fe?Ne(e,ke):Ae},deflateSetDictionary:(e,t)=>{let r=t.length;if(ot(e))return Se;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==ze||n.lookahead)return Se;if(1===o&&(e.adler=le(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===o&&(He(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const a=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Ye(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=We(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Ye(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=i,e.input=l,e.avail_in=a,n.wrap=o,Ae},deflateInfo:"pako deflate (from Nodeca project)"};const ct=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ut={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)ct(r,t)&&(e[t]=r[t])}}return e},flattenChunks:e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;pt[254]=pt[254]=1;var ft={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,a,i=e.length,l=0;for(o=0;o>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},buf2string:(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,o;const a=new Array(2*r);for(o=0,n=0;n4)a[o++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&dt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+pt[e[r]]>t?r:t}},ht=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const mt=Object.prototype.toString,{Z_NO_FLUSH:gt,Z_SYNC_FLUSH:vt,Z_FULL_FLUSH:bt,Z_FINISH:yt,Z_OK:xt,Z_STREAM_END:wt,Z_DEFAULT_COMPRESSION:At,Z_DEFAULT_STRATEGY:Ct,Z_DEFLATED:St}=de;function kt(e){this.options=ut.assign({level:At,method:St,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ct},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ht,this.strm.avail_out=0;let r=st.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xt)throw new Error(ue[r]);if(t.header&&st.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?ft.string2buf(t.dictionary):"[object ArrayBuffer]"===mt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=st.deflateSetDictionary(this.strm,e),r!==xt)throw new Error(ue[r]);this._dict_set=!0}}function _t(e,t){const r=new kt(t);if(r.push(e,!0),r.err)throw r.msg||ue[r.err];return r.result}kt.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let o,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?yt:gt,"string"==typeof e?r.input=ft.string2buf(e):"[object ArrayBuffer]"===mt.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(a===vt||a===bt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=st.deflate(r,a),o===wt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=st.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===xt;if(0!==r.avail_out){if(a>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},kt.prototype.onData=function(e){this.chunks.push(e)},kt.prototype.onEnd=function(e){e===xt&&(this.result=ut.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Et={Deflate:kt,deflate:_t,deflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,_t(e,t)},constants:de};const jt=16209;var Rt=function(e,t){let r,n,o,a,i,l,s,c,u,d,p,f,h,m,g,v,b,y,x,w,A,C,S,k;const _=e.state;r=e.next_in,S=e.input,n=r+(e.avail_in-5),o=e.next_out,k=e.output,a=o-(t-e.avail_out),i=o+(e.avail_out-257),l=_.dmax,s=_.wsize,c=_.whave,u=_.wnext,d=_.window,p=_.hold,f=_.bits,h=_.lencode,m=_.distcode,g=(1<<_.lenbits)-1,v=(1<<_.distbits)-1;e:do{f<15&&(p+=S[r++]<>>24,p>>>=y,f-=y,y=b>>>16&255,0===y)k[o++]=65535&b;else{if(!(16&y)){if(64&y){if(32&y){_.mode=16191;break e}e.msg="invalid literal/length code",_.mode=jt;break e}b=h[(65535&b)+(p&(1<>>=y,f-=y),f<15&&(p+=S[r++]<>>24,p>>>=y,f-=y,y=b>>>16&255,16&y){if(w=65535&b,y&=15,fl){e.msg="invalid distance too far back",_.mode=jt;break e}if(p>>>=y,f-=y,y=o-a,w>y){if(y=w-y,y>c&&_.sane){e.msg="invalid distance too far back",_.mode=jt;break e}if(A=0,C=d,0===u){if(A+=s-y,y2;)k[o++]=C[A++],k[o++]=C[A++],k[o++]=C[A++],x-=3;x&&(k[o++]=C[A++],x>1&&(k[o++]=C[A++]))}else{A=o-w;do{k[o++]=k[A++],k[o++]=k[A++],k[o++]=k[A++],x-=3}while(x>2);x&&(k[o++]=k[A++],x>1&&(k[o++]=k[A++]))}break}if(64&y){e.msg="invalid distance code",_.mode=jt;break e}b=m[(65535&b)+(p&(1<>3,r-=x,f-=x<<3,p&=(1<{const s=l.bits;let c,u,d,p,f,h,m=0,g=0,v=0,b=0,y=0,x=0,w=0,A=0,C=0,S=0,k=null;const _=new Uint16Array(16),E=new Uint16Array(16);let j,R,M,P=null;for(m=0;m<=15;m++)_[m]=0;for(g=0;g=1&&0===_[b];b--);if(y>b&&(y=b),0===b)return o[a++]=20971520,o[a++]=20971520,l.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(E[1]=0,m=1;m<15;m++)E[m+1]=E[m]+_[m];for(g=0;g852||2===e&&C>592)return 1;for(;;){j=m-w,i[g]+1=h?(R=P[i[g]-h],M=k[i[g]-h]):(R=96,M=0),c=1<>w)+u]=j<<24|R<<16|M}while(0!==u);for(c=1<>=1;if(0!==c?(S&=c-1,S+=c):S=0,g++,0==--_[m]){if(m===b)break;m=t[r+i[g]]}if(m>y&&(S&p)!==d){for(0===w&&(w=y),f+=v,x=m-w,A=1<852||2===e&&C>592)return 1;d=S&p,o[d]=y<<24|x<<16|f-a}}return 0!==S&&(o[f+S]=m-w<<24|64<<16),l.bits=y,0};const{Z_FINISH:$t,Z_BLOCK:Lt,Z_TREES:zt,Z_OK:Ft,Z_STREAM_END:Dt,Z_NEED_DICT:Nt,Z_STREAM_ERROR:Bt,Z_DATA_ERROR:Ht,Z_MEM_ERROR:Vt,Z_BUF_ERROR:Wt,Z_DEFLATED:Ut}=de,qt=16180,Gt=16190,Kt=16191,Xt=16192,Zt=16194,Yt=16199,Qt=16200,Jt=16206,er=16209,tr=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function rr(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const nr=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},or=e=>{if(nr(e))return Bt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=qt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Ft},ar=e=>{if(nr(e))return Bt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,or(e)},ir=(e,t)=>{let r;if(nr(e))return Bt;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Bt:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,ar(e))},lr=(e,t)=>{if(!e)return Bt;const r=new rr;e.state=r,r.strm=e,r.window=null,r.mode=qt;const n=ir(e,t);return n!==Ft&&(e.state=null),n};let sr,cr,ur=!0;const dr=e=>{if(ur){sr=new Int32Array(512),cr=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Tt(1,e.lens,0,288,sr,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Tt(2,e.lens,0,32,cr,0,e.work,{bits:5}),ur=!1}e.lencode=sr,e.lenbits=9,e.distcode=cr,e.distbits=5},pr=(e,t,r,n)=>{let o;const a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),a.window.set(t.subarray(r-n,r-n+o),a.wnext),(n-=o)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whavelr(e,15),inflateInit2:lr,inflate:(e,t)=>{let r,n,o,a,i,l,s,c,u,d,p,f,h,m,g,v,b,y,x,w,A,C,S=0;const k=new Uint8Array(4);let _,E;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(nr(e)||!e.output||!e.input&&0!==e.avail_in)return Bt;r=e.state,r.mode===Kt&&(r.mode=Xt),i=e.next_out,o=e.output,s=e.avail_out,a=e.next_in,n=e.input,l=e.avail_in,c=r.hold,u=r.bits,d=l,p=s,C=Ft;e:for(;;)switch(r.mode){case qt:if(0===r.wrap){r.mode=Xt;break}for(;u<16;){if(0===l)break e;l--,c+=n[a++]<>>8&255,r.check=ce(r.check,k,2,0),c=0,u=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=er;break}if((15&c)!==Ut){e.msg="unknown compression method",r.mode=er;break}if(c>>>=4,u-=4,A=8+(15&c),0===r.wbits&&(r.wbits=A),A>15||A>r.wbits){e.msg="invalid window size",r.mode=er;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(k[0]=255&c,k[1]=c>>>8&255,r.check=ce(r.check,k,2,0)),c=0,u=0,r.mode=16182;case 16182:for(;u<32;){if(0===l)break e;l--,c+=n[a++]<>>8&255,k[2]=c>>>16&255,k[3]=c>>>24&255,r.check=ce(r.check,k,4,0)),c=0,u=0,r.mode=16183;case 16183:for(;u<16;){if(0===l)break e;l--,c+=n[a++]<>8),512&r.flags&&4&r.wrap&&(k[0]=255&c,k[1]=c>>>8&255,r.check=ce(r.check,k,2,0)),c=0,u=0,r.mode=16184;case 16184:if(1024&r.flags){for(;u<16;){if(0===l)break e;l--,c+=n[a++]<>>8&255,r.check=ce(r.check,k,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>l&&(f=l),f&&(r.head&&(A=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(a,a+f),A)),512&r.flags&&4&r.wrap&&(r.check=ce(r.check,n,f,a)),l-=f,a+=f,r.length-=f),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===l)break e;f=0;do{A=n[a+f++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A))}while(A&&f>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Kt;break;case 16189:for(;u<32;){if(0===l)break e;l--,c+=n[a++]<>>=7&u,u-=7&u,r.mode=Jt;break}for(;u<3;){if(0===l)break e;l--,c+=n[a++]<>>=1,u-=1,3&c){case 0:r.mode=16193;break;case 1:if(dr(r),r.mode=Yt,t===zt){c>>>=2,u-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=er}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===l)break e;l--,c+=n[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=er;break}if(r.length=65535&c,c=0,u=0,r.mode=Zt,t===zt)break e;case Zt:r.mode=16195;case 16195:if(f=r.length,f){if(f>l&&(f=l),f>s&&(f=s),0===f)break e;o.set(n.subarray(a,a+f),i),l-=f,a+=f,s-=f,i+=f,r.length-=f;break}r.mode=Kt;break;case 16196:for(;u<14;){if(0===l)break e;l--,c+=n[a++]<>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=er;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,_={bits:r.lenbits},C=Tt(0,r.lens,0,19,r.lencode,0,r.work,_),r.lenbits=_.bits,C){e.msg="invalid code lengths set",r.mode=er;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,v=S>>>16&255,b=65535&S,!(g<=u);){if(0===l)break e;l--,c+=n[a++]<>>=g,u-=g,r.lens[r.have++]=b;else{if(16===b){for(E=g+2;u>>=g,u-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=er;break}A=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===b){for(E=g+3;u>>=g,u-=g,A=0,f=3+(7&c),c>>>=3,u-=3}else{for(E=g+7;u>>=g,u-=g,A=0,f=11+(127&c),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=er;break}for(;f--;)r.lens[r.have++]=A}}if(r.mode===er)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=er;break}if(r.lenbits=9,_={bits:r.lenbits},C=Tt(1,r.lens,0,r.nlen,r.lencode,0,r.work,_),r.lenbits=_.bits,C){e.msg="invalid literal/lengths set",r.mode=er;break}if(r.distbits=6,r.distcode=r.distdyn,_={bits:r.distbits},C=Tt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,_),r.distbits=_.bits,C){e.msg="invalid distances set",r.mode=er;break}if(r.mode=Yt,t===zt)break e;case Yt:r.mode=Qt;case Qt:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=a,e.avail_in=l,r.hold=c,r.bits=u,Rt(e,p),i=e.next_out,o=e.output,s=e.avail_out,a=e.next_in,n=e.input,l=e.avail_in,c=r.hold,u=r.bits,r.mode===Kt&&(r.back=-1);break}for(r.back=0;S=r.lencode[c&(1<>>24,v=S>>>16&255,b=65535&S,!(g<=u);){if(0===l)break e;l--,c+=n[a++]<>y)],g=S>>>24,v=S>>>16&255,b=65535&S,!(y+g<=u);){if(0===l)break e;l--,c+=n[a++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,r.length=b,0===v){r.mode=16205;break}if(32&v){r.back=-1,r.mode=Kt;break}if(64&v){e.msg="invalid literal/length code",r.mode=er;break}r.extra=15&v,r.mode=16201;case 16201:if(r.extra){for(E=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;S=r.distcode[c&(1<>>24,v=S>>>16&255,b=65535&S,!(g<=u);){if(0===l)break e;l--,c+=n[a++]<>y)],g=S>>>24,v=S>>>16&255,b=65535&S,!(y+g<=u);){if(0===l)break e;l--,c+=n[a++]<>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,64&v){e.msg="invalid distance code",r.mode=er;break}r.offset=b,r.extra=15&v,r.mode=16203;case 16203:if(r.extra){for(E=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=er;break}r.mode=16204;case 16204:if(0===s)break e;if(f=p-s,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=er;break}f>r.wnext?(f-=r.wnext,h=r.wsize-f):h=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=o,h=i-r.offset,f=r.length;f>s&&(f=s),s-=f,r.length-=f;do{o[i++]=m[h++]}while(--f);0===r.length&&(r.mode=Qt);break;case 16205:if(0===s)break e;o[i++]=r.length,s--,r.mode=Qt;break;case Jt:if(r.wrap){for(;u<32;){if(0===l)break e;l--,c|=n[a++]<{if(nr(e))return Bt;let t=e.state;return t.window&&(t.window=null),e.state=null,Ft},inflateGetHeader:(e,t)=>{if(nr(e))return Bt;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,Ft):Bt},inflateSetDictionary:(e,t)=>{const r=t.length;let n,o,a;return nr(e)?Bt:(n=e.state,0!==n.wrap&&n.mode!==Gt?Bt:n.mode===Gt&&(o=1,o=le(o,t,r,0),o!==n.check)?Ht:(a=pr(e,t,r,r),a?(n.mode=16210,Vt):(n.havedict=1,Ft)))},inflateInfo:"pako inflate (from Nodeca project)"},hr=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const mr=Object.prototype.toString,{Z_NO_FLUSH:gr,Z_FINISH:vr,Z_OK:br,Z_STREAM_END:yr,Z_NEED_DICT:xr,Z_STREAM_ERROR:wr,Z_DATA_ERROR:Ar,Z_MEM_ERROR:Cr}=de;function Sr(e){this.options=ut.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ht,this.strm.avail_out=0;let r=fr.inflateInit2(this.strm,t.windowBits);if(r!==br)throw new Error(ue[r]);if(this.header=new hr,fr.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=ft.string2buf(t.dictionary):"[object ArrayBuffer]"===mr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=fr.inflateSetDictionary(this.strm,t.dictionary),r!==br)))throw new Error(ue[r])}function kr(e,t){const r=new Sr(t);if(r.push(e),r.err)throw r.msg||ue[r.err];return r.result}Sr.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let a,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?vr:gr,"[object ArrayBuffer]"===mr.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),a=fr.inflate(r,i),a===xr&&o&&(a=fr.inflateSetDictionary(r,o),a===br?a=fr.inflate(r,i):a===Ar&&(a=xr));r.avail_in>0&&a===yr&&r.state.wrap>0&&0!==e[r.next_in];)fr.inflateReset(r),a=fr.inflate(r,i);switch(a){case wr:case Ar:case xr:case Cr:return this.onEnd(a),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(0===r.avail_out||a===yr))if("string"===this.options.to){let e=ft.utf8border(r.output,r.next_out),t=r.next_out-e,o=ft.buf2string(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==br||0!==l){if(a===yr)return a=fr.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Sr.prototype.onData=function(e){this.chunks.push(e)},Sr.prototype.onEnd=function(e){e===br&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ut.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _r={Inflate:Sr,inflate:kr,inflateRaw:function(e,t){return(t=t||{}).raw=!0,kr(e,t)},ungzip:kr,constants:de};const{Deflate:Er,deflate:jr,deflateRaw:Rr,gzip:Mr}=Et,{Inflate:Pr,inflate:Or,inflateRaw:Ir,ungzip:Tr}=_r;var $r=r(72601),Lr=r.n($r),zr=r(75951),Fr=r.n(zr),Dr=r(47764),Nr=r(5363),Br=r(53375);function Hr(e,t){var r;return Hr=Nr?Br(r=Nr).call(r):function(e,t){return e.__proto__=t,e},Hr(e,t)}var Vr=r(27415);function Wr(e){var t;return Wr=Nr?Br(t=Vr).call(t):function(e){return e.__proto__||Vr(e)},Wr(e)}var Ur=r(76307),qr=r.n(Ur),Gr=r(40910),Kr=r.n(Gr),Xr=r(8103),Zr=r.n(Xr),Yr=r(42864),Qr=r.n(Yr),Jr=r(46052),en=r.n(Jr),tn=r(66771),rn=r.n(tn),nn=r(79188),on=r.n(nn),an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol(".concat(e,")")};function ln(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function sn(e){return this instanceof sn?(this.v=e,this):new sn(e)}function cn(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:sn(e[n](t)),done:!1}:o?o(t):t}:o}}function un(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=ln(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function dn(){}function pn(e){return"object"==typeof e&&null!==e||"function"==typeof e}"function"==typeof SuppressedError&&SuppressedError;var fn=dn;function hn(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}var mn=Promise,gn=Promise.prototype.then,vn=Promise.reject.bind(mn);function bn(e){return new mn(e)}function yn(e){return bn((function(t){return t(e)}))}function xn(e){return vn(e)}function wn(e,t,r){return gn.call(e,t,r)}function An(e,t,r){wn(wn(e,t,r),void 0,fn)}function Cn(e,t){An(e,t)}function Sn(e,t){An(e,void 0,t)}function kn(e,t,r){return wn(e,t,r)}function _n(e){wn(e,void 0,fn)}var En=function(e){if("function"==typeof queueMicrotask)En=queueMicrotask;else{var t=yn(void 0);En=function(e){return wn(t,e)}}return En(e)};function jn(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Rn(e,t,r){try{return yn(jn(e,t,r))}catch(e){return xn(e)}}var Mn=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,o=e._elements,a=o[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),o[r]=void 0,a},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}(),Pn=an("[[AbortSteps]]"),On=an("[[ErrorSteps]]"),In=an("[[CancelSteps]]"),Tn=an("[[PullSteps]]"),$n=an("[[ReleaseSteps]]");function Ln(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?Nn(e):"closed"===t._state?function(e){Nn(e),Vn(e)}(e):Bn(e,t._storedError)}function zn(e,t){return qi(e._ownerReadableStream,t)}function Fn(e){var t=e._ownerReadableStream;"readable"===t._state?Hn(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){Bn(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[$n](),t._reader=void 0,e._ownerReadableStream=void 0}function Dn(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Nn(e){e._closedPromise=bn((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function Bn(e,t){Nn(e),Hn(e,t)}function Hn(e,t){void 0!==e._closedPromise_reject&&(_n(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Vn(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var Wn=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},Un=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function qn(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError("".concat(t," is not an object."));var r}function Gn(e,t){if("function"!=typeof e)throw new TypeError("".concat(t," is not a function."))}function Kn(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError("".concat(t," is not an object."))}function Xn(e,t,r){if(void 0===e)throw new TypeError("Parameter ".concat(t," is required in '").concat(r,"'."))}function Zn(e,t,r){if(void 0===e)throw new TypeError("".concat(t," is required in '").concat(r,"'."))}function Yn(e){return Number(e)}function Qn(e){return 0===e?0:e}function Jn(e,t){var r=Number.MAX_SAFE_INTEGER,n=Number(e);if(n=Qn(n),!Wn(n))throw new TypeError("".concat(t," is not a finite number"));if((n=function(e){return Qn(Un(e))}(n))<0||n>r)throw new TypeError("".concat(t," is outside the accepted range of ").concat(0," to ").concat(r,", inclusive"));return Wn(n)&&0!==n?n:0}function eo(e,t){if(!Wi(e))throw new TypeError("".concat(t," is not a ReadableStream."))}function to(e){return new co(e)}function ro(e,t){e._reader._readRequests.push(t)}function no(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function oo(e){return e._reader._readRequests.length}function ao(e){var t=e._reader;return void 0!==t&&!!uo(t)}var io,lo,so,co=function(){function e(e){if(Xn(e,1,"ReadableStreamDefaultReader"),eo(e,"First parameter"),Ui(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Ln(this,e),this._readRequests=new Mn}return Object.defineProperty(e.prototype,"closed",{get:function(){return uo(this)?this._closedPromise:xn(ho("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),uo(this)?void 0===this._ownerReadableStream?xn(Dn("cancel")):zn(this,e):xn(ho("cancel"))},e.prototype.read=function(){if(!uo(this))return xn(ho("read"));if(void 0===this._ownerReadableStream)return xn(Dn("read from"));var e,t,r=bn((function(r,n){e=r,t=n}));return po(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!uo(this))throw ho("releaseLock");var e;void 0!==this._ownerReadableStream&&(Fn(e=this),fo(e,new TypeError("Reader was released")))},e}();function uo(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof co}function po(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[Tn](t)}function fo(e,t){var r=e._readRequests;e._readRequests=new Mn,r.forEach((function(e){e._errorSteps(t)}))}function ho(e){return new TypeError("ReadableStreamDefaultReader.prototype.".concat(e," can only be used on a ReadableStreamDefaultReader"))}function mo(e){return e.slice()}function go(e,t,r,n,o){new Uint8Array(e).set(new Uint8Array(r,n,o),t)}Object.defineProperties(co.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),hn(co.prototype.cancel,"cancel"),hn(co.prototype.read,"read"),hn(co.prototype.releaseLock,"releaseLock"),"symbol"==typeof an.toStringTag&&Object.defineProperty(co.prototype,an.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});var vo=function(e){return(vo="function"==typeof e.transfer?function(e){return e.transfer()}:"function"==typeof structuredClone?function(e){return structuredClone(e,{transfer:[e]})}:function(e){return e})(e)},bo=function(e){return(bo="boolean"==typeof e.detached?function(e){return e.detached}:function(e){return 0===e.byteLength})(e)};function yo(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,o=new ArrayBuffer(n);return go(o,0,e,t,n),o}function xo(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError("".concat(String(t)," is not a function"));return r}}var wo,Ao=null!==(so=null!==(io=an.asyncIterator)&&void 0!==io?io:null===(lo=an.for)||void 0===lo?void 0:lo.call(an,"Symbol.asyncIterator"))&&void 0!==so?so:"@@asyncIterator";function Co(e,t,r){if(void 0===t&&(t="sync"),void 0===r)if("async"===t){if(void 0===(r=xo(e,Ao)))return function(e){var t,r=((t={})[an.iterator]=function(){return e.iterator},t),n=function(){return function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof sn?Promise.resolve(r.value.v).then(s,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}var r}function s(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments,(function(){return function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]0)na(this,e);else{var r=this._autoAllocateChunkSize;if(void 0!==r){var n=void 0;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}var o={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}ro(t,e),Do(this)}},e.prototype[$n]=function(){if(this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new Mn,this._pendingPullIntos.push(e)}},e}();function zo(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Lo}function Fo(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof $o}function Do(e){var t=function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&(!e._closeRequested&&(!!e._started&&(!!(ao(t)&&oo(t)>0)||(!!(ma(t)&&ha(t)>0)||aa(e)>0))))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,An(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Do(e)),null}),(function(t){return ra(e,t),null}))))}function No(e){Xo(e),e._pendingPullIntos=new Mn}function Bo(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=Ho(t);"default"===t.readerType?no(e,n,r):function(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function Ho(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Vo(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Wo(e,t,r,n){var o;try{o=yo(t,r,r+n)}catch(t){throw ra(e,t),t}Vo(e,o,0,n)}function Uo(e,t){t.bytesFilled>0&&Wo(e,t.buffer,t.byteOffset,t.bytesFilled),Qo(e)}function qo(e,t){var r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,o=r,a=!1,i=n-n%t.elementSize;i>=t.minimumFill&&(o=i-t.bytesFilled,a=!0);for(var l=e._queue;o>0;){var s=l.peek(),c=Math.min(o,s.byteLength),u=t.byteOffset+t.bytesFilled;go(t.buffer,u,s.buffer,s.byteOffset,c),s.byteLength===c?l.shift():(s.byteOffset+=c,s.byteLength-=c),e._queueTotalSize-=c,Go(0,c,t),o-=c}return a}function Go(e,t,r){r.bytesFilled+=t}function Ko(e){0===e._queueTotalSize&&e._closeRequested?(Jo(e),Gi(e._controlledReadableByteStream)):Do(e)}function Xo(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Zo(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();qo(e,t)&&(Qo(e),Bo(e._controlledReadableByteStream,t))}}function Yo(e,t){var r=e._pendingPullIntos.peek();Xo(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&Qo(e);var r=e._controlledReadableByteStream;if(ma(r))for(;ha(r)>0;)Bo(r,Qo(e))}(e,r):function(e,t,r){if(Go(0,t,r),"none"===r.readerType)return Uo(e,r),void Zo(e);if(!(r.bytesFilled0){var o=r.byteOffset+r.bytesFilled;Wo(e,r.buffer,o-n,n)}r.bytesFilled-=n,Bo(e._controlledReadableByteStream,r),Zo(e)}}(e,t,r),Do(e)}function Qo(e){return e._pendingPullIntos.shift()}function Jo(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function ea(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!=0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ra(e,n),n}}Jo(e),Gi(t)}}function ta(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,o=t.byteOffset,a=t.byteLength;if(bo(n))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");var i=vo(n);if(e._pendingPullIntos.length>0){var l=e._pendingPullIntos.peek();if(bo(l.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Xo(e),l.buffer=vo(l.buffer),"none"===l.readerType&&Uo(e,l)}ao(r)?(function(e){for(var t=e._controlledReadableByteStream._reader;t._readRequests.length>0;){if(0===e._queueTotalSize)return;na(e,t._readRequests.shift())}}(e),0===oo(r)?Vo(e,i,o,a):(e._pendingPullIntos.length>0&&Qo(e),no(r,new Uint8Array(i,o,a),!1))):ma(r)?(Vo(e,i,o,a),Zo(e)):Vo(e,i,o,a),Do(e)}}function ra(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(No(e),Io(e),Jo(e),Ki(r,t))}function na(e,t){var r=e._queue.shift();e._queueTotalSize-=r.byteLength,Ko(e);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function oa(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create($o.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}function aa(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function ia(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=vo(r.buffer),Yo(e,t)}function la(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=vo(t.buffer),Yo(e,n)}function sa(e,t,r,n,o,a,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Io(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,t._autoAllocateChunkSize=i,t._pendingPullIntos=new Mn,e._readableStreamController=t,An(yn(r()),(function(){return t._started=!0,Do(t),null}),(function(e){return ra(t,e),null}))}function ca(e){return new TypeError("ReadableStreamBYOBRequest.prototype.".concat(e," can only be used on a ReadableStreamBYOBRequest"))}function ua(e){return new TypeError("ReadableByteStreamController.prototype.".concat(e," can only be used on a ReadableByteStreamController"))}function da(e,t){if("byob"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamReaderMode"));return e}function pa(e){return new ga(e)}function fa(e,t){e._reader._readIntoRequests.push(t)}function ha(e){return e._reader._readIntoRequests.length}function ma(e){var t=e._reader;return void 0!==t&&!!va(t)}Object.defineProperties(Lo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),hn(Lo.prototype.close,"close"),hn(Lo.prototype.enqueue,"enqueue"),hn(Lo.prototype.error,"error"),"symbol"==typeof an.toStringTag&&Object.defineProperty(Lo.prototype,an.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var ga=function(){function e(e){if(Xn(e,1,"ReadableStreamBYOBReader"),eo(e,"First parameter"),Ui(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!zo(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Ln(this,e),this._readIntoRequests=new Mn}return Object.defineProperty(e.prototype,"closed",{get:function(){return va(this)?this._closedPromise:xn(xa("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),va(this)?void 0===this._ownerReadableStream?xn(Dn("cancel")):zn(this,e):xn(xa("cancel"))},e.prototype.read=function(e,t){if(void 0===t&&(t={}),!va(this))return xn(xa("read"));if(!ArrayBuffer.isView(e))return xn(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return xn(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return xn(new TypeError("view's buffer must have non-zero byteLength"));if(bo(e.buffer))return xn(new TypeError("view's buffer has been detached"));var r;try{r=function(e,t){var r;return qn(e,t),{min:Jn(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,"".concat(t," has member 'min' that"))}}(t,"options")}catch(e){return xn(e)}var n,o,a=r.min;if(0===a)return xn(new TypeError("options.min must be greater than 0"));if(function(e){return To(e.constructor)}(e)){if(a>e.byteLength)return xn(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(a>e.length)return xn(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return xn(Dn("read from"));var i=bn((function(e,t){n=e,o=t}));return ba(this,e,a,{_chunkSteps:function(e){return n({value:e,done:!1})},_closeSteps:function(e){return n({value:e,done:!0})},_errorSteps:function(e){return o(e)}}),i},e.prototype.releaseLock=function(){if(!va(this))throw xa("releaseLock");var e;void 0!==this._ownerReadableStream&&(Fn(e=this),ya(e,new TypeError("Reader was released")))},e}();function va(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof ga}function ba(e,t,r,n){var o=e._ownerReadableStream;o._disturbed=!0,"errored"===o._state?n._errorSteps(o._storedError):function(e,t,r,n){var o,a=e._controlledReadableByteStream,i=t.constructor,l=function(e){return To(e)?1:e.BYTES_PER_ELEMENT}(i),s=t.byteOffset,c=t.byteLength,u=r*l;try{o=vo(t.buffer)}catch(f){return void n._errorSteps(f)}var d={buffer:o,bufferByteLength:o.byteLength,byteOffset:s,byteLength:c,bytesFilled:0,minimumFill:u,elementSize:l,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(d),void fa(a,n);if("closed"!==a._state){if(e._queueTotalSize>0){if(qo(e,d)){var p=Ho(d);return Ko(e),void n._chunkSteps(p)}if(e._closeRequested){var f=new TypeError("Insufficient bytes to fill elements in the given buffer");return ra(e,f),void n._errorSteps(f)}}e._pendingPullIntos.push(d),fa(a,n),Do(e)}else{var h=new i(d.buffer,d.byteOffset,0);n._closeSteps(h)}}(o._readableStreamController,t,r,n)}function ya(e,t){var r=e._readIntoRequests;e._readIntoRequests=new Mn,r.forEach((function(e){e._errorSteps(t)}))}function xa(e){return new TypeError("ReadableStreamBYOBReader.prototype.".concat(e," can only be used on a ReadableStreamBYOBReader"))}function wa(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(Ro(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Aa(e){return e.size||function(){return 1}}function Ca(e,t){qn(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:Yn(r),size:void 0===n?void 0:Sa(n,"".concat(t," has member 'size' that"))}}function Sa(e,t){return Gn(e,t),function(t){return Yn(e(t))}}function ka(e,t,r){return Gn(e,r),function(r){return Rn(e,t,[r])}}function _a(e,t,r){return Gn(e,r),function(){return Rn(e,t,[])}}function Ea(e,t,r){return Gn(e,r),function(r){return jn(e,t,[r])}}function ja(e,t,r){return Gn(e,r),function(r,n){return Rn(e,t,[r,n])}}function Ra(e,t){if(!Ta(e))throw new TypeError("".concat(t," is not a WritableStream."))}Object.defineProperties(ga.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),hn(ga.prototype.cancel,"cancel"),hn(ga.prototype.read,"read"),hn(ga.prototype.releaseLock,"releaseLock"),"symbol"==typeof an.toStringTag&&Object.defineProperty(ga.prototype,an.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var Ma="function"==typeof AbortController,Pa=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:Kn(e,"First parameter");var r=Ca(t,"Second parameter"),n=function(e,t){qn(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,o=null==e?void 0:e.start,a=null==e?void 0:e.type,i=null==e?void 0:e.write;return{abort:void 0===r?void 0:ka(r,e,"".concat(t," has member 'abort' that")),close:void 0===n?void 0:_a(n,e,"".concat(t," has member 'close' that")),start:void 0===o?void 0:Ea(o,e,"".concat(t," has member 'start' that")),write:void 0===i?void 0:ja(i,e,"".concat(t," has member 'write' that")),type:a}}(e,"First parameter");if(Ia(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var o=Aa(r);!function(e,t,r,n){var o,a,i,l,s=Object.create(Ya.prototype);o=void 0!==t.start?function(){return t.start(s)}:function(){},a=void 0!==t.write?function(e){return t.write(e,s)}:function(){return yn(void 0)},i=void 0!==t.close?function(){return t.close()}:function(){return yn(void 0)},l=void 0!==t.abort?function(e){return t.abort(e)}:function(){return yn(void 0)},Ja(e,s,o,a,i,l,r,n)}(this,n,wa(r,1),o)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Ta(this))throw ii("locked");return $a(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Ta(this)?$a(this)?xn(new TypeError("Cannot abort a stream that already has a writer")):La(this,e):xn(ii("abort"))},e.prototype.close=function(){return Ta(this)?$a(this)?xn(new TypeError("Cannot close a stream that already has a writer")):Ba(this)?xn(new TypeError("Cannot close an already-closing stream")):za(this):xn(ii("close"))},e.prototype.getWriter=function(){if(!Ta(this))throw ii("getWriter");return Oa(this)},e}();function Oa(e){return new Wa(e)}function Ia(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new Mn,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ta(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof Pa}function $a(e){return void 0!==e._writer}function La(e,t){var r;if("closed"===e._state||"errored"===e._state)return yn(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);var n=e._state;if("closed"===n||"errored"===n)return yn(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var o=!1;"erroring"===n&&(o=!0,t=void 0);var a=bn((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:o}}));return e._pendingAbortRequest._promise=a,o||Da(e,t),a}function za(e){var t=e._state;if("closed"===t||"errored"===t)return xn(new TypeError("The stream (in ".concat(t," state) is not in the writable state and cannot be closed")));var r,n=bn((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),o=e._writer;return void 0!==o&&e._backpressure&&"writable"===t&&bi(o),Oo(r=e._writableStreamController,Za,0),ri(r),n}function Fa(e,t){"writable"!==e._state?Na(e):Da(e,t)}function Da(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Ga(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&Na(e)}function Na(e){e._state="errored",e._writableStreamController[On]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new Mn,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void Ha(e);An(e._writableStreamController[Pn](r._reason),(function(){return r._resolve(),Ha(e),null}),(function(t){return r._reject(t),Ha(e),null}))}else Ha(e)}function Ba(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function Ha(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&pi(t,e._storedError)}function Va(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){hi(e)}(r):bi(r)),e._backpressure=t}Object.defineProperties(Pa.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),hn(Pa.prototype.abort,"abort"),hn(Pa.prototype.close,"close"),hn(Pa.prototype.getWriter,"getWriter"),"symbol"==typeof an.toStringTag&&Object.defineProperty(Pa.prototype,an.toStringTag,{value:"WritableStream",configurable:!0});var Wa=function(){function e(e){if(Xn(e,1,"WritableStreamDefaultWriter"),Ra(e,"First parameter"),$a(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!Ba(e)&&e._backpressure?hi(this):gi(this),ui(this);else if("erroring"===t)mi(this,e._storedError),ui(this);else if("closed"===t)gi(this),ui(this),fi(this);else{var r=e._storedError;mi(this,r),di(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Ua(this)?this._closedPromise:xn(si("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ua(this))throw si("desiredSize");if(void 0===this._ownerWritableStream)throw ci("desiredSize");return e=this._ownerWritableStream,"errored"===(t=e._state)||"erroring"===t?null:"closed"===t?0:ti(e._writableStreamController);var e,t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Ua(this)?this._readyPromise:xn(si("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Ua(this)?void 0===this._ownerWritableStream?xn(ci("abort")):function(e,t){return La(e._ownerWritableStream,t)}(this,e):xn(si("abort"))},e.prototype.close=function(){if(!Ua(this))return xn(si("close"));var e=this._ownerWritableStream;return void 0===e?xn(ci("close")):Ba(e)?xn(new TypeError("Cannot close an already-closing stream")):qa(this)},e.prototype.releaseLock=function(){if(!Ua(this))throw si("releaseLock");void 0!==this._ownerWritableStream&&Ka(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),Ua(this)?void 0===this._ownerWritableStream?xn(ci("write to")):Xa(this,e):xn(si("write"))},e}();function Ua(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Wa}function qa(e){return za(e._ownerWritableStream)}function Ga(e,t){"pending"===e._readyPromiseState?vi(e,t):function(e,t){mi(e,t)}(e,t)}function Ka(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ga(e,r),function(e,t){"pending"===e._closedPromiseState?pi(e,t):function(e,t){di(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Xa(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,o=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return ni(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return xn(ci("write to"));var a=r._state;if("errored"===a)return xn(r._storedError);if(Ba(r)||"closed"===a)return xn(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return xn(r._storedError);var i=function(e){return bn((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{Oo(e,t,r)}catch(t){return void ni(e,t)}var n=e._controlledWritableStream;Ba(n)||"writable"!==n._state||Va(n,oi(e)),ri(e)}(n,t,o),i}Object.defineProperties(Wa.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),hn(Wa.prototype.abort,"abort"),hn(Wa.prototype.close,"close"),hn(Wa.prototype.releaseLock,"releaseLock"),hn(Wa.prototype.write,"write"),"symbol"==typeof an.toStringTag&&Object.defineProperty(Wa.prototype,an.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Za={},Ya=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Qa(this))throw li("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Qa(this))throw li("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Qa(this))throw li("error");"writable"===this._controlledWritableStream._state&&ai(this,e)},e.prototype[Pn]=function(e){var t=this._abortAlgorithm(e);return ei(this),t},e.prototype[On]=function(){Io(this)},e}();function Qa(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Ya}function Ja(e,t,r,n,o,a,i,l){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Io(t),t._abortReason=void 0,t._abortController=function(){if(Ma)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=l,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=o,t._abortAlgorithm=a;var s=oi(t);Va(e,s),An(yn(r()),(function(){return t._started=!0,ri(t),null}),(function(r){return t._started=!0,Fa(e,r),null}))}function ei(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ti(e){return e._strategyHWM-e._queueTotalSize}function ri(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=e._queue.peek().value;r===Za?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),Po(e);var r=e._closeAlgorithm();ei(e),An(r,(function(){return function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&fi(t)}(t),null}),(function(e){return function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),Fa(e,t)}(t,e),null}))}(e):function(e,t){var r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r),An(e._writeAlgorithm(t),(function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(Po(e),!Ba(r)&&"writable"===t){var n=oi(e);Va(r,n)}return ri(e),null}),(function(t){return"writable"===r._state&&ei(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Fa(e,t)}(r,t),null}))}(e,r)}}else Na(t)}function ni(e,t){"writable"===e._controlledWritableStream._state&&ai(e,t)}function oi(e){return ti(e)<=0}function ai(e,t){var r=e._controlledWritableStream;ei(e),Da(r,t)}function ii(e){return new TypeError("WritableStream.prototype.".concat(e," can only be used on a WritableStream"))}function li(e){return new TypeError("WritableStreamDefaultController.prototype.".concat(e," can only be used on a WritableStreamDefaultController"))}function si(e){return new TypeError("WritableStreamDefaultWriter.prototype.".concat(e," can only be used on a WritableStreamDefaultWriter"))}function ci(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function ui(e){e._closedPromise=bn((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function di(e,t){ui(e),pi(e,t)}function pi(e,t){void 0!==e._closedPromise_reject&&(_n(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function fi(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function hi(e){e._readyPromise=bn((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function mi(e,t){hi(e),vi(e,t)}function gi(e){hi(e),bi(e)}function vi(e,t){void 0!==e._readyPromise_reject&&(_n(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function bi(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Ya.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof an.toStringTag&&Object.defineProperty(Ya.prototype,an.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var yi,xi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0,wi=(function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}(yi=null==xi?void 0:xi.DOMException)?yi:void 0)||function(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return hn(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function Ai(e,t,r,n,o,a){var i=to(e),l=Oa(t);e._disturbed=!0;var s=!1,c=yn(void 0);return bn((function(u,d){var p,f,h,m;if(void 0!==a){if(p=function(){var r=void 0!==a.reason?a.reason:new wi("Aborted","AbortError"),i=[];n||i.push((function(){return"writable"===t._state?La(t,r):yn(void 0)})),o||i.push((function(){return"readable"===e._state?qi(e,r):yn(void 0)})),y((function(){return Promise.all(i.map((function(e){return e()})))}),!0,r)},a.aborted)return void p();a.addEventListener("abort",p)}if(b(e,i._closedPromise,(function(e){return n?x(!0,e):y((function(){return La(t,e)}),!0,e),null})),b(t,l._closedPromise,(function(t){return o?x(!0,t):y((function(){return qi(e,t)}),!0,t),null})),f=e,h=i._closedPromise,m=function(){return r?x():y((function(){return function(e){var t=e._ownerWritableStream,r=t._state;return Ba(t)||"closed"===r?yn(void 0):"errored"===r?xn(t._storedError):qa(e)}(l)})),null},"closed"===f._state?m():Cn(h,m),Ba(t)||"closed"===t._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");o?x(!0,g):y((function(){return qi(e,g)}),!0,g)}function v(){var e=c;return wn(c,(function(){return e!==c?v():void 0}))}function b(e,t,r){"errored"===e._state?r(e._storedError):Sn(t,r)}function y(e,r,n){function o(){return An(e(),(function(){return w(r,n)}),(function(e){return w(!0,e)})),null}s||(s=!0,"writable"!==t._state||Ba(t)?o():Cn(v(),o))}function x(e,r){s||(s=!0,"writable"!==t._state||Ba(t)?w(e,r):Cn(v(),(function(){return w(e,r)})))}function w(e,t){return Ka(l),Fn(i),void 0!==a&&a.removeEventListener("abort",p),e?d(t):u(void 0),null}_n(bn((function(e,t){!function r(n){n?e():wn(s?yn(!0):wn(l._readyPromise,(function(){return bn((function(e,t){po(i,{_chunkSteps:function(t){c=wn(Xa(l,t),void 0,dn),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))})),r,t)}(!1)})))}))}var Ci=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Si(this))throw Ti("desiredSize");return Pi(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Si(this))throw Ti("close");if(!Oi(this))throw new TypeError("The stream is not in a state that permits close");ji(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Si(this))throw Ti("enqueue");if(!Oi(this))throw new TypeError("The stream is not in a state that permits enqueue");return Ri(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Si(this))throw Ti("error");Mi(this,e)},e.prototype[In]=function(e){Io(this);var t=this._cancelAlgorithm(e);return Ei(this),t},e.prototype[Tn]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=Po(this);this._closeRequested&&0===this._queue.length?(Ei(this),Gi(t)):ki(this),e._chunkSteps(r)}else ro(t,e),ki(this)},e.prototype[$n]=function(){},e}();function Si(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof Ci}function ki(e){_i(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,An(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,ki(e)),null}),(function(t){return Mi(e,t),null}))))}function _i(e){var t=e._controlledReadableStream;return!!Oi(e)&&!!e._started&&(!!(Ui(t)&&oo(t)>0)||Pi(e)>0)}function Ei(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ji(e){if(Oi(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Ei(e),Gi(t))}}function Ri(e,t){if(Oi(e)){var r=e._controlledReadableStream;if(Ui(r)&&oo(r)>0)no(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw Mi(e,t),t}try{Oo(e,t,n)}catch(t){throw Mi(e,t),t}}ki(e)}}function Mi(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(Io(e),Ei(e),Ki(r,t))}function Pi(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Oi(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function Ii(e,t,r,n,o,a,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Io(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,e._readableStreamController=t,An(yn(r()),(function(){return t._started=!0,ki(t),null}),(function(e){return Mi(t,e),null}))}function Ti(e){return new TypeError("ReadableStreamDefaultController.prototype.".concat(e," can only be used on a ReadableStreamDefaultController"))}function $i(e,t,r){return Gn(e,r),function(r){return Rn(e,t,[r])}}function Li(e,t,r){return Gn(e,r),function(r){return Rn(e,t,[r])}}function zi(e,t,r){return Gn(e,r),function(r){return jn(e,t,[r])}}function Fi(e,t){if("bytes"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamType"));return e}function Di(e,t){qn(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,o=null==e?void 0:e.preventClose,a=null==e?void 0:e.signal;return void 0!==a&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError("".concat(t," is not an AbortSignal."))}(a,"".concat(t," has member 'signal' that")),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(o),signal:a}}Object.defineProperties(Ci.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),hn(Ci.prototype.close,"close"),hn(Ci.prototype.enqueue,"enqueue"),hn(Ci.prototype.error,"error"),"symbol"==typeof an.toStringTag&&Object.defineProperty(Ci.prototype,an.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var Ni=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:Kn(e,"First parameter");var r=Ca(t,"Second parameter"),n=function(e,t){qn(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,o=null==r?void 0:r.cancel,a=null==r?void 0:r.pull,i=null==r?void 0:r.start,l=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:Jn(n,"".concat(t," has member 'autoAllocateChunkSize' that")),cancel:void 0===o?void 0:$i(o,r,"".concat(t," has member 'cancel' that")),pull:void 0===a?void 0:Li(a,r,"".concat(t," has member 'pull' that")),start:void 0===i?void 0:zi(i,r,"".concat(t," has member 'start' that")),type:void 0===l?void 0:Fi(l,"".concat(t," has member 'type' that"))}}(e,"First parameter");if(Vi(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n,o,a,i=Object.create(Lo.prototype);n=void 0!==t.start?function(){return t.start(i)}:function(){},o=void 0!==t.pull?function(){return t.pull(i)}:function(){return yn(void 0)},a=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return yn(void 0)};var l=t.autoAllocateChunkSize;if(0===l)throw new TypeError("autoAllocateChunkSize must be greater than 0");sa(e,i,n,o,a,r,l)}(this,n,wa(r,0))}else{var o=Aa(r);!function(e,t,r,n){var o,a,i,l=Object.create(Ci.prototype);o=void 0!==t.start?function(){return t.start(l)}:function(){},a=void 0!==t.pull?function(){return t.pull(l)}:function(){return yn(void 0)},i=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return yn(void 0)},Ii(e,l,o,a,i,r,n)}(this,n,wa(r,1),o)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Wi(this))throw Xi("locked");return Ui(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Wi(this)?Ui(this)?xn(new TypeError("Cannot cancel a stream that already has a reader")):qi(this,e):xn(Xi("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!Wi(this))throw Xi("getReader");return void 0===function(e,t){qn(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:da(r,"".concat(t," has member 'mode' that"))}}(e,"First parameter").mode?to(this):pa(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!Wi(this))throw Xi("pipeThrough");Xn(e,1,"pipeThrough");var r=function(e,t){qn(e,t);var r=null==e?void 0:e.readable;Zn(r,"readable","ReadableWritablePair"),eo(r,"".concat(t," has member 'readable' that"));var n=null==e?void 0:e.writable;return Zn(n,"writable","ReadableWritablePair"),Ra(n,"".concat(t," has member 'writable' that")),{readable:r,writable:n}}(e,"First parameter"),n=Di(t,"Second parameter");if(Ui(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if($a(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return _n(Ai(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!Wi(this))return xn(Xi("pipeTo"));if(void 0===e)return xn("Parameter 1 is required in 'pipeTo'.");if(!Ta(e))return xn(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=Di(t,"Second parameter")}catch(e){return xn(e)}return Ui(this)?xn(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):$a(e)?xn(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Ai(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!Wi(this))throw Xi("tee");return mo(zo((e=this)._readableStreamController)?function(e){var t,r,n,o,a,i=to(e),l=!1,s=!1,c=!1,u=!1,d=!1,p=bn((function(e){a=e}));function f(e){Sn(e._closedPromise,(function(t){return e!==i||(ra(n._readableStreamController,t),ra(o._readableStreamController,t),u&&d||a(void 0)),null}))}function h(){va(i)&&(Fn(i),f(i=to(e))),po(i,{_chunkSteps:function(t){En((function(){s=!1,c=!1;var r=t,i=t;if(!u&&!d)try{i=Mo(t)}catch(t){return ra(n._readableStreamController,t),ra(o._readableStreamController,t),void a(qi(e,t))}u||ta(n._readableStreamController,r),d||ta(o._readableStreamController,i),l=!1,s?g():c&&v()}))},_closeSteps:function(){l=!1,u||ea(n._readableStreamController),d||ea(o._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&ia(n._readableStreamController,0),o._readableStreamController._pendingPullIntos.length>0&&ia(o._readableStreamController,0),u&&d||a(void 0)},_errorSteps:function(){l=!1}})}function m(t,r){uo(i)&&(Fn(i),f(i=pa(e)));var p=r?o:n,h=r?n:o;ba(i,t,1,{_chunkSteps:function(t){En((function(){s=!1,c=!1;var n=r?d:u;if(r?u:d)n||la(p._readableStreamController,t);else{var o=void 0;try{o=Mo(t)}catch(t){return ra(p._readableStreamController,t),ra(h._readableStreamController,t),void a(qi(e,t))}n||la(p._readableStreamController,t),ta(h._readableStreamController,o)}l=!1,s?g():c&&v()}))},_closeSteps:function(e){l=!1;var t=r?d:u,n=r?u:d;t||ea(p._readableStreamController),n||ea(h._readableStreamController),void 0!==e&&(t||la(p._readableStreamController,e),!n&&h._readableStreamController._pendingPullIntos.length>0&&ia(h._readableStreamController,0)),t&&n||a(void 0)},_errorSteps:function(){l=!1}})}function g(){if(l)return s=!0,yn(void 0);l=!0;var e=oa(n._readableStreamController);return null===e?h():m(e._view,!1),yn(void 0)}function v(){if(l)return c=!0,yn(void 0);l=!0;var e=oa(o._readableStreamController);return null===e?h():m(e._view,!0),yn(void 0)}function b(){}return n=Hi(b,g,(function(n){if(u=!0,t=n,d){var o=mo([t,r]),i=qi(e,o);a(i)}return p})),o=Hi(b,v,(function(n){if(d=!0,r=n,u){var o=mo([t,r]),i=qi(e,o);a(i)}return p})),f(i),[n,o]}(e):function(e,t){var r,n,o,a,i,l=to(e),s=!1,c=!1,u=!1,d=!1,p=bn((function(e){i=e}));function f(){return s?(c=!0,yn(void 0)):(s=!0,po(l,{_chunkSteps:function(e){En((function(){c=!1;var t=e,r=e;u||Ri(o._readableStreamController,t),d||Ri(a._readableStreamController,r),s=!1,c&&f()}))},_closeSteps:function(){s=!1,u||ji(o._readableStreamController),d||ji(a._readableStreamController),u&&d||i(void 0)},_errorSteps:function(){s=!1}}),yn(void 0))}function h(){}return o=Bi(h,f,(function(t){if(u=!0,r=t,d){var o=mo([r,n]),a=qi(e,o);i(a)}return p})),a=Bi(h,f,(function(t){if(d=!0,n=t,u){var o=mo([r,n]),a=qi(e,o);i(a)}return p})),Sn(l._closedPromise,(function(e){return Mi(o._readableStreamController,e),Mi(a._readableStreamController,e),u&&d||i(void 0),null})),[o,a]}(e));var e},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!Wi(this))throw Xi("values");return function(e,t){var r=to(e),n=new ko(r,t),o=Object.create(_o);return o._asyncIteratorImpl=n,o}(this,function(e,t){qn(e,"First parameter");var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e).preventCancel)},e.prototype[Ao]=function(e){return this.values(e)},e.from=function(e){return pn(r=t=e)&&void 0!==r.getReader?function(e){var t;return t=Bi(dn,(function(){var r;try{r=e.read()}catch(e){return xn(e)}return kn(r,(function(e){if(!pn(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(e.done)ji(t._readableStreamController);else{var r=e.value;Ri(t._readableStreamController,r)}}))}),(function(t){try{return yn(e.cancel(t))}catch(e){return xn(e)}}),0)}(t.getReader()):function(e){var t,r=Co(e,"async");return t=Bi(dn,(function(){var e;try{e=function(e){var t=jn(e.nextMethod,e.iterator,[]);if(!pn(t))throw new TypeError("The iterator.next() method must return an object");return t}(r)}catch(e){return xn(e)}return kn(yn(e),(function(e){if(!pn(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");var r=function(e){return Boolean(e.done)}(e);if(r)ji(t._readableStreamController);else{var n=function(e){return e.value}(e);Ri(t._readableStreamController,n)}}))}),(function(e){var t,n,o=r.iterator;try{t=xo(o,"return")}catch(e){return xn(e)}if(void 0===t)return yn(void 0);try{n=jn(t,o,[e])}catch(e){return xn(e)}return kn(yn(n),(function(e){if(!pn(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}),0),t}(t);var t,r},e}();function Bi(e,t,r,n,o){void 0===n&&(n=1),void 0===o&&(o=function(){return 1});var a=Object.create(Ni.prototype);return Vi(a),Ii(a,Object.create(Ci.prototype),e,t,r,n,o),a}function Hi(e,t,r){var n=Object.create(Ni.prototype);return Vi(n),sa(n,Object.create(Lo.prototype),e,t,r,0,void 0),n}function Vi(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Wi(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Ni}function Ui(e){return void 0!==e._reader}function qi(e,t){if(e._disturbed=!0,"closed"===e._state)return yn(void 0);if("errored"===e._state)return xn(e._storedError);Gi(e);var r=e._reader;if(void 0!==r&&va(r)){var n=r._readIntoRequests;r._readIntoRequests=new Mn,n.forEach((function(e){e._closeSteps(void 0)}))}return kn(e._readableStreamController[In](t),dn)}function Gi(e){e._state="closed";var t=e._reader;if(void 0!==t&&(Vn(t),uo(t))){var r=t._readRequests;t._readRequests=new Mn,r.forEach((function(e){e._closeSteps()}))}}function Ki(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(Hn(r,t),uo(r)?fo(r,t):ya(r,t))}function Xi(e){return new TypeError("ReadableStream.prototype.".concat(e," can only be used on a ReadableStream"))}function Zi(e,t){qn(e,t);var r=null==e?void 0:e.highWaterMark;return Zn(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Yn(r)}}Object.defineProperties(Ni,{from:{enumerable:!0}}),Object.defineProperties(Ni.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),hn(Ni.from,"from"),hn(Ni.prototype.cancel,"cancel"),hn(Ni.prototype.getReader,"getReader"),hn(Ni.prototype.pipeThrough,"pipeThrough"),hn(Ni.prototype.pipeTo,"pipeTo"),hn(Ni.prototype.tee,"tee"),hn(Ni.prototype.values,"values"),"symbol"==typeof an.toStringTag&&Object.defineProperty(Ni.prototype,an.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Ni.prototype,Ao,{value:Ni.prototype.values,writable:!0,configurable:!0});var Yi=function(e){return e.byteLength};hn(Yi,"size");var Qi=function(){function e(e){Xn(e,1,"ByteLengthQueuingStrategy"),e=Zi(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!el(this))throw Ji("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!el(this))throw Ji("size");return Yi},enumerable:!1,configurable:!0}),e}();function Ji(e){return new TypeError("ByteLengthQueuingStrategy.prototype.".concat(e," can only be used on a ByteLengthQueuingStrategy"))}function el(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof Qi}Object.defineProperties(Qi.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof an.toStringTag&&Object.defineProperty(Qi.prototype,an.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var tl=function(){return 1};hn(tl,"size");var rl=function(){function e(e){Xn(e,1,"CountQueuingStrategy"),e=Zi(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ol(this))throw nl("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ol(this))throw nl("size");return tl},enumerable:!1,configurable:!0}),e}();function nl(e){return new TypeError("CountQueuingStrategy.prototype.".concat(e," can only be used on a CountQueuingStrategy"))}function ol(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof rl}function al(e,t,r){return Gn(e,r),function(r){return Rn(e,t,[r])}}function il(e,t,r){return Gn(e,r),function(r){return jn(e,t,[r])}}function ll(e,t,r){return Gn(e,r),function(r,n){return Rn(e,t,[r,n])}}function sl(e,t,r){return Gn(e,r),function(r){return Rn(e,t,[r])}}Object.defineProperties(rl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof an.toStringTag&&Object.defineProperty(rl.prototype,an.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var cl=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=Ca(t,"Second parameter"),o=Ca(r,"Third parameter"),a=function(e,t){qn(e,t);var r=null==e?void 0:e.cancel,n=null==e?void 0:e.flush,o=null==e?void 0:e.readableType,a=null==e?void 0:e.start,i=null==e?void 0:e.transform,l=null==e?void 0:e.writableType;return{cancel:void 0===r?void 0:sl(r,e,"".concat(t," has member 'cancel' that")),flush:void 0===n?void 0:al(n,e,"".concat(t," has member 'flush' that")),readableType:o,start:void 0===a?void 0:il(a,e,"".concat(t," has member 'start' that")),transform:void 0===i?void 0:ll(i,e,"".concat(t," has member 'transform' that")),writableType:l}}(e,"First parameter");if(void 0!==a.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==a.writableType)throw new RangeError("Invalid writableType specified");var i,l=wa(o,0),s=Aa(o),c=wa(n,1),u=Aa(n);!function(e,t,r,n,o,a){function i(){return t}e._writable=function(e,t,r,n,o,a){void 0===o&&(o=1),void 0===a&&(a=function(){return 1});var i=Object.create(Pa.prototype);return Ia(i),Ja(i,Object.create(Ya.prototype),e,t,r,n,o,a),i}(i,(function(t){return function(e,t){var r=e._transformStreamController;return e._backpressure?kn(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return yl(r,t)})):yl(r,t)}(e,t)}),(function(){return function(e){var t=e._transformStreamController;if(void 0!==t._finishPromise)return t._finishPromise;var r=e._readable;t._finishPromise=bn((function(e,r){t._finishPromise_resolve=e,t._finishPromise_reject=r}));var n=t._flushAlgorithm();return vl(t),An(n,(function(){return"errored"===r._state?Al(t,r._storedError):(ji(r._readableStreamController),wl(t)),null}),(function(e){return Mi(r._readableStreamController,e),Al(t,e),null})),t._finishPromise}(e)}),(function(t){return function(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._readable;r._finishPromise=bn((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var o=r._cancelAlgorithm(t);return vl(r),An(o,(function(){return"errored"===n._state?Al(r,n._storedError):(Mi(n._readableStreamController,t),wl(r)),null}),(function(e){return Mi(n._readableStreamController,e),Al(r,e),null})),r._finishPromise}(e,t)}),r,n),e._readable=Bi(i,(function(){return function(e){return hl(e,!1),e._backpressureChangePromise}(e)}),(function(t){return function(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._writable;r._finishPromise=bn((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var o=r._cancelAlgorithm(t);return vl(r),An(o,(function(){return"errored"===n._state?Al(r,n._storedError):(ni(n._writableStreamController,t),fl(e),wl(r)),null}),(function(t){return ni(n._writableStreamController,t),fl(e),Al(r,t),null})),r._finishPromise}(e,t)}),o,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,hl(e,!0),e._transformStreamController=void 0}(this,bn((function(e){i=e})),c,u,l,s),function(e,t){var r,n,o,a=Object.create(ml.prototype);r=void 0!==t.transform?function(e){return t.transform(e,a)}:function(e){try{return bl(a,e),yn(void 0)}catch(e){return xn(e)}},n=void 0!==t.flush?function(){return t.flush(a)}:function(){return yn(void 0)},o=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return yn(void 0)},function(e,t,r,n,o){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=o,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}(e,a,r,n,o)}(this,a),void 0!==a.start?i(a.start(this._transformStreamController)):i(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!ul(this))throw Cl("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!ul(this))throw Cl("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function ul(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof cl}function dl(e,t){Mi(e._readable._readableStreamController,t),pl(e,t)}function pl(e,t){vl(e._transformStreamController),ni(e._writable._writableStreamController,t),fl(e)}function fl(e){e._backpressure&&hl(e,!1)}function hl(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=bn((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(cl.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof an.toStringTag&&Object.defineProperty(cl.prototype,an.toStringTag,{value:"TransformStream",configurable:!0});var ml=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!gl(this))throw xl("desiredSize");return Pi(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!gl(this))throw xl("enqueue");bl(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!gl(this))throw xl("error");var t;t=e,dl(this._controlledTransformStream,t)},e.prototype.terminate=function(){if(!gl(this))throw xl("terminate");var e;ji((e=this._controlledTransformStream)._readable._readableStreamController),pl(e,new TypeError("TransformStream terminated"))},e}();function gl(e){return!!pn(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof ml}function vl(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function bl(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Oi(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Ri(n,t)}catch(e){throw pl(r,e),r._readable._storedError}var o=function(e){return!_i(e)}(n);o!==r._backpressure&&hl(r,!0)}function yl(e,t){return kn(e._transformAlgorithm(t),void 0,(function(t){throw dl(e._controlledTransformStream,t),t}))}function xl(e){return new TypeError("TransformStreamDefaultController.prototype.".concat(e," can only be used on a TransformStreamDefaultController"))}function wl(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Al(e,t){void 0!==e._finishPromise_reject&&(_n(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Cl(e){return new TypeError("TransformStream.prototype.".concat(e," can only be used on a TransformStream"))}let Sl;Object.defineProperties(ml.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),hn(ml.prototype.enqueue,"enqueue"),hn(ml.prototype.error,"error"),hn(ml.prototype.terminate,"terminate"),"symbol"==typeof an.toStringTag&&Object.defineProperty(ml.prototype,an.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),Lr().BigInt?(Sl={},Sl.BigInt=e=>BigInt(e),Sl.toNumber=e=>Number(e),Sl.add=(e,t)=>e+t,Sl.subtract=(e,t)=>e-t,Sl.multiply=(e,t)=>e*t,Sl.divide=(e,t)=>e/t,Sl.remainder=(e,t)=>e%t,Sl.exponentiate=(e,t)=>e**t,Sl.leftShift=(e,t)=>e<e>>t,Sl.bitwiseAnd=(e,t)=>e&t,Sl.bitwiseOr=(e,t)=>e|t,Sl.bitwiseXor=(e,t)=>e^t,Sl.equal=(e,t)=>e===t,Sl.notEqual=(e,t)=>e!==t,Sl.lessThan=(e,t)=>ee<=t,Sl.greaterThan=(e,t)=>e>t,Sl.greaterThanOrEqual=(e,t)=>e>=t,Sl.EQ=(e,t)=>e===t,Sl.NE=(e,t)=>e!==t,Sl.LT=(e,t)=>ee<=t,Sl.GT=(e,t)=>e>t,Sl.GE=(e,t)=>e>=t,Sl.ADD=(e,t)=>e+t,Sl.unaryMinus=e=>-e,Sl.bitwiseNot=e=>~e,Sl.asIntN=(e,t)=>BigInt.asIntN(e,t),Sl.asUintN=(e,t)=>BigInt.asUintN(e,t)):Sl=Fr();var kl=Sl;let _l=function(){function e(){y(this,e),this.crc=-1}return E(e,[{key:"append",value:function(e){let t=0|this.crc;const{table:r}=this;for(let n=0,o=0|e.length;n>>8^r[255&(t^e[n])];this.crc=t}},{key:"get",value:function(){return~this.crc>>>0}}]),e}();var El;function jl(e){var t=function(){if("undefined"==typeof Reflect||!on())return!1;if(on().sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(on()(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Wr(e);if(t){var o=Wr(this).constructor;r=on()(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}_l.prototype.table=((e,t,r,n)=>{for(t=0;t<256;t++){for(n=t,r=0;r<8;r++)n=1&n?n>>>1^3988292384:n>>>1;e[t]=n}return e})([],0,0,0),new TextDecoder;const Rl=new TextEncoder;let Ml=function(){function e(){y(this,e),this.files=qr()(null),this.offset=kl.BigInt(0)}return E(e,[{key:"transform",value:async function(e,t){var r,n,o,a;const i=e.directory&&!Kr()(r=Zr()(n=e.name).call(n)).call(r,"/")?`${Zr()(o=e.name).call(o)}/`:Zr()(a=e.name).call(a);this.files[i]&&t.abort(new Error("File already exists."));const l=Rl.encode(i);this.files[i]={directory:!!e.directory,nameBuf:l,offset:this.offset,comment:Rl.encode(e.comment||""),compressedLength:kl.BigInt(0),uncompressedLength:kl.BigInt(0),header:new Uint8Array(26)};const s=this.files[i],{header:c}=s,u=new Date(void 0===e.lastModified?Qr()():e.lastModified),d=new DataView(c.buffer),p=new Uint8Array(30+l.length);d.setUint32(0,335546376),d.setUint16(6,(u.getHours()<<6|u.getMinutes())<<5|u.getSeconds()/2,!0),d.setUint16(8,(u.getFullYear()-1980<<4|u.getMonth()+1)<<5|u.getDate(),!0),d.setUint16(22,l.length,!0),p.set([80,75,3,4]),p.set(c,4),p.set(l,30),this.offset=kl.add(this.offset,kl.BigInt(p.length)),t.enqueue(p);const f=new Uint8Array(16);if(f.set([80,75,7,8]),e.stream){s.crc=new _l;const r=e.stream().getReader();for(;;){const e=await r.read();if(e.done)break;const n=e.value;s.crc.append(n),s.uncompressedLength=kl.add(s.uncompressedLength,kl.BigInt(n.length)),s.compressedLength=kl.add(s.compressedLength,kl.BigInt(n.length)),t.enqueue(n)}d.setUint32(10,s.crc.get(),!0),d.setUint32(14,kl.toNumber(s.compressedLength),!0),d.setUint32(18,kl.toNumber(s.uncompressedLength),!0),f.set(c.subarray(10,22),4)}d.setUint16(22,l.length,!0),this.offset=kl.add(this.offset,kl.add(s.compressedLength,kl.BigInt(16))),t.enqueue(f)}},{key:"flush",value:function(e){var t,r;let n,o=0,a=0;en()(t=rn()(this.files)).call(t,(e=>{n=this.files[e],o+=46+n.nameBuf.length+n.comment.length}));const i=new Uint8Array(o+22),l=new DataView(i.buffer);en()(r=rn()(this.files)).call(r,(e=>{n=this.files[e],l.setUint32(a,1347092738),l.setUint16(a+4,5120),l.setUint16(a+32,n.comment.length,!0),l.setUint8(a+38,n.directory?16:0),l.setUint32(a+42,kl.toNumber(n.offset),!0),i.set(n.header,a+6),i.set(n.nameBuf,a+46),i.set(n.comment,a+46+n.nameBuf.length),a+=46+n.nameBuf.length+n.comment.length})),l.setUint32(a,1347093766),l.setUint16(a+8,rn()(this.files).length,!0),l.setUint16(a+10,rn()(this.files).length,!0),l.setUint32(a+12,o,!0),l.setUint32(a+16,kl.toNumber(this.offset),!0),e.enqueue(i),this.files=qr()(null),this.offset=0}}]),e}(),Pl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Dr(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),x(e,"prototype",{writable:!1}),t&&Hr(e,t)}(r,e);var t=jl(r);function r(){return y(this,r),t.call(this,new Ml)}return E(r)}(Lr().TransformStream||(null===(El=Lr().WebStreamsPolyfill)||void 0===El?void 0:El.TransformStream)||cl);var Ol=r(71451),Il=r.n(Ol),Tl=r(50060),$l=r(78383),Ll=r(5556),zl=r.n(Ll),Fl=r(15327),Dl=r(69067),Nl=r(98587),Bl=r(58168),Hl=r(64111),Vl=r(34164),Wl=r(11848),Ul=r(3541),ql=r(27553),Gl=r(17245);function Kl(e){return(0,Gl.Ay)("MuiImageList",e)}(0,ql.A)("MuiImageList",["root","masonry","quilted","standard","woven"]);const Xl=n.createContext({});var Zl=r(74848);const Yl=["children","className","cols","component","rowHeight","gap","style","variant"],Ql=(0,Wl.Ay)("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})((({ownerState:e})=>(0,Bl.A)({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===e.variant&&{display:"block"}))),Jl=n.forwardRef((function(e,t){const r=(0,Ul.A)({props:e,name:"MuiImageList"}),{children:o,className:a,cols:i=2,component:l="ul",rowHeight:s="auto",gap:c=4,style:u,variant:d="standard"}=r,p=(0,Nl.A)(r,Yl),f=n.useMemo((()=>({rowHeight:s,gap:c,variant:d})),[s,c,d]);n.useEffect((()=>{}),[]);const h="masonry"===d?(0,Bl.A)({columnCount:i,columnGap:c},u):(0,Bl.A)({gridTemplateColumns:`repeat(${i}, 1fr)`,gap:c},u),m=(0,Bl.A)({},r,{component:l,gap:c,rowHeight:s,variant:d}),g=(e=>{const{classes:t,variant:r}=e,n={root:["root",r]};return(0,Hl.A)(n,Kl,t)})(m);return(0,Zl.jsx)(Ql,(0,Bl.A)({as:l,className:(0,Vl.A)(g.root,g[d],a),ref:t,style:h,ownerState:m},p,{children:(0,Zl.jsx)(Xl.Provider,{value:f,children:o})}))}));r(44363);var es=r(25602);function ts(e){return(0,Gl.Ay)("MuiImageListItem",e)}const rs=(0,ql.A)("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),ns=["children","className","cols","component","rows","style"],os=(0,Wl.Ay)("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${rs.img}`]:t.img},t.root,t[r.variant]]}})((({ownerState:e})=>(0,Bl.A)({display:"block",position:"relative"},"standard"===e.variant&&{display:"flex",flexDirection:"column"},"woven"===e.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{[`& .${rs.img}`]:(0,Bl.A)({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===e.variant&&{height:"auto",flexGrow:1})}))),as=n.forwardRef((function(e,t){const r=(0,Ul.A)({props:e,name:"MuiImageListItem"}),{children:o,className:a,cols:i=1,component:l="li",rows:s=1,style:c}=r,u=(0,Nl.A)(r,ns),{rowHeight:d="auto",gap:p,variant:f}=n.useContext(Xl);let h="auto";"woven"===f?h=void 0:"auto"!==d&&(h=d*s+p*(s-1));const m=(0,Bl.A)({},r,{cols:i,component:l,gap:p,rowHeight:d,rows:s,variant:f}),g=(e=>{const{classes:t,variant:r}=e,n={root:["root",r],img:["img"]};return(0,Hl.A)(n,ts,t)})(m);return(0,Zl.jsx)(os,(0,Bl.A)({as:l,className:(0,Vl.A)(g.root,g[f],a),ref:t,style:(0,Bl.A)({height:h,gridColumnEnd:"masonry"!==f?`span ${i}`:void 0,gridRowEnd:"masonry"!==f?`span ${s}`:void 0,marginBottom:"masonry"===f?p:void 0,breakInside:"masonry"===f?"avoid":void 0},c),ownerState:m},u,{children:n.Children.map(o,(e=>n.isValidElement(e)?"img"===e.type||(0,es.A)(e,["Image"])?n.cloneElement(e,{className:(0,Vl.A)(g.img,e.props.className)}):e:null))}))}));var is=r(28466);function ls(e){return(0,Gl.Ay)("MuiImageListItemBar",e)}(0,ql.A)("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const ss=["actionIcon","actionPosition","className","subtitle","title","position"],cs=(0,Wl.Ay)("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,is.A)(r.position)}`]]}})((({theme:e,ownerState:t})=>(0,Bl.A)({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},"bottom"===t.position&&{bottom:0},"top"===t.position&&{top:0},"below"===t.position&&{position:"relative",background:"transparent",alignItems:"normal"}))),us=(0,Wl.Ay)("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.titleWrap,t[`titleWrap${(0,is.A)(r.position)}`],r.actionIcon&&t[`titleWrapActionPos${(0,is.A)(r.actionPosition)}`]]}})((({theme:e,ownerState:t})=>(0,Bl.A)({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden"},"below"===t.position&&{padding:"6px 0 12px",color:"inherit"},t.actionIcon&&"left"===t.actionPosition&&{paddingLeft:0},t.actionIcon&&"right"===t.actionPosition&&{paddingRight:0}))),ds=(0,Wl.Ay)("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})((({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),ps=(0,Wl.Ay)("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})((({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),fs=(0,Wl.Ay)("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actionIcon,t[`actionIconActionPos${(0,is.A)(r.actionPosition)}`]]}})((({ownerState:e})=>(0,Bl.A)({},"left"===e.actionPosition&&{order:-1}))),hs=n.forwardRef((function(e,t){const r=(0,Ul.A)({props:e,name:"MuiImageListItemBar"}),{actionIcon:n,actionPosition:o="right",className:a,subtitle:i,title:l,position:s="bottom"}=r,c=(0,Nl.A)(r,ss),u=(0,Bl.A)({},r,{position:s,actionPosition:o}),d=(e=>{const{classes:t,position:r,actionIcon:n,actionPosition:o}=e,a={root:["root",`position${(0,is.A)(r)}`],titleWrap:["titleWrap",`titleWrap${(0,is.A)(r)}`,n&&`titleWrapActionPos${(0,is.A)(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${(0,is.A)(o)}`]};return(0,Hl.A)(a,ls,t)})(u);return(0,Zl.jsxs)(cs,(0,Bl.A)({ownerState:u,className:(0,Vl.A)(d.root,a),ref:t},c,{children:[(0,Zl.jsxs)(us,{ownerState:u,className:d.titleWrap,children:[(0,Zl.jsx)(ds,{className:d.title,children:l}),i?(0,Zl.jsx)(ps,{className:d.subtitle,children:i}):null]}),n?(0,Zl.jsx)(fs,{ownerState:u,className:d.actionIcon,children:n}):null]}))}));var ms=r(27558),gs=r(75003);const vs=(0,gs.A)((0,Zl.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),bs=(0,gs.A)((0,Zl.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");function ys({imgList:e,selection:t,onChange:r}){const o=(0,Fl.A)((e=>e.breakpoints.down("lg"))),a=(0,n.useCallback)((e=>()=>{const n=t.includes(e)?t.filter((t=>t!==e)):[...t,e];r(n)}),[r,t]);return 0===e.length?(0,Zl.jsx)(Dl.A,{sx:{display:"flex",minHeight:"200px",justifyContent:"center",alignItems:"center"},children:(0,Zl.jsx)(v.A,{children:"이 게시물에는 이미지가 없습니다."})}):(0,Zl.jsx)(Jl,{cols:o?3:6,rowHeight:o?100:180,children:e.map(((e,r)=>(0,Zl.jsxs)(as,{onClick:a(r),children:[(0,Zl.jsx)("img",{style:{overflow:"hidden"},src:e,alt:e,loading:"lazy"}),(0,Zl.jsx)(hs,{sx:{background:"linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%)"},position:"top",actionPosition:"left",actionIcon:(0,Zl.jsx)(ms.A,{size:"small",sx:{color:"white","&.Mui-checked":{color:"white"}},icon:(0,Zl.jsx)(vs,{}),checkedIcon:(0,Zl.jsx)(bs,{}),checked:t.includes(r),onClick:a(r)})})]},`${e}_${r}`)))})}ys.propTypes={imgList:zl().array.isRequired,selection:zl().array.isRequired,onChange:zl().func.isRequired};const xs=ys;var ws=r(92129),As=r(39923),Cs=r(81839);const Ss=function(){const e=(0,o.wA)(),t=(0,Tl.HZ)(),{downloadMethod:r,startWithZero:a,zipImageName:i,zipName:s,zipExtension:u}=(0,o.d4)((e=>e[Cs.default.id].storage)),{open:y}=(0,o.d4)((e=>e[Cs.default.id])),x=(0,n.useMemo)((()=>{const e=-1!==window.location.pathname.indexOf("/e/")?c.IE:`${c.Ce}, ${c.lY}`;return[...document.querySelectorAll(e)].reduce(((e,t)=>{try{e.push((0,ws.u)(t))}catch(e){console.warn("[ImageDownloader]",e)}return e}),[])}),[]),[w,A]=(0,n.useState)([]),[C,S]=(0,n.useState)(!1);(0,n.useEffect)((()=>{y&&A([...new Array(x.length).keys()])}),[x,y]);const k=(0,n.useCallback)((e=>{A(e)}),[]),_=(0,n.useCallback)((()=>{w.length===x.length?A([]):A([...new Array(x.length).keys()])}),[x,w]),E=(0,n.useCallback)((async()=>{e((0,As.setOpen)(!1)),A([]),S(!0);const n=x.map((()=>!1));w.forEach((e=>{n[e]=!0}));const o=n.map(((e,t)=>e?x[t]:void 0)).filter((e=>!!e));let l=0;const c=(await o.reduce((async(e,t)=>{try{switch(r){case"fetch":{const e=await fetch(t.orig,{method:"HEAD"});if(!e.ok)throw new Error("서버 접속 실패");const r=Number(e.headers.get("content-length"));l+=r;break}case"xhr+fetch":case"xhr":{const e=await(0,$l.Em)(t.orig,{method:"HEAD"});if(200!==e.status)throw new Error("서버 접속 실패");const r=Number(e.responseHeaders.split("content-length: ")[1].split("\r")[0])||0;l+=r,t.orig=e.finalUrl;break}default:throw new Error("다운로드 방식 설정값이 이상합니다.")}const n=await e;return n.push(t),n}catch(t){return console.warn("[ImageDownloader] 이미지를 처리할 수 없습니다.",t),e}}),[])).values(),d=e=>{e.preventDefault();const t="지금 창을 닫으면 다운로드가 중단됩니다. 계속하시겠습니까?";return e.returnValue=t,t};let p=a?0:1;const f={},h=new ReadableStream({start(){(0,As.setOpen)(!1),window.addEventListener("beforeunload",d)},async pull(e){const{done:n,value:o}=c.next();if(n)return window.removeEventListener("beforeunload",d),e.close();const{orig:a,ext:l,uploadName:s}=o,u=(0,ws.G)(i,{content:t,index:p,fileName:s}),h=f[u]>0?`${u}(${f[u]})`:u;switch(f[u]=f[u]>0?f[u]+1:1,p+=1,r){case"fetch":case"xhr+fetch":{const t=await fetch(a).then((e=>e.body));return e.enqueue({name:`${h}.${l}`,stream:()=>t})}case"xhr":{const t=await(0,$l.Em)(a,{responseType:"blob"}).then((({response:e})=>e.stream()));return e.enqueue({name:`${h}.${l}`,stream:()=>t})}default:return void console.warn("[ImageDownload] 확인할 수 없는 다운로드 방식 사용")}},cancel(){window.removeEventListener("beforeunload",d)}}),m=(0,ws.G)(s,{content:t});h.pipeThrough(new Pl).pipeTo(Il().createWriteStream(`${m}.${u}`,{size:l}))}),[e,x,w,s,t,a,u,i,r]),j=(0,n.useCallback)((()=>{e((0,As.setOpen)(!1))}),[e]),R=(0,n.useCallback)((e=>{e.key&&"Enter"!==e.key||0!==w.length&&E()}),[E,w]),M=x.map((({thumb:e})=>e));return C?(0,Zl.jsx)(d.A,{fullWidth:!0,maxWidth:"lg",open:y,TransitionProps:{onExited:()=>S(!1)},children:(0,Zl.jsx)(p.A,{sx:{textAlign:"center"},children:(0,Zl.jsx)(f.A,{color:"primary"})})}):(0,Zl.jsxs)(d.A,{fullWidth:!0,maxWidth:"lg",open:y,onClose:j,onKeyUp:R,children:[(0,Zl.jsx)(h.A,{children:"이미지 다운로더"}),(0,Zl.jsx)(m.A,{size:"large",sx:{position:"absolute",top:8,right:8},onClick:j,children:(0,Zl.jsx)(b.A,{})}),(0,Zl.jsx)(p.A,{children:(0,Zl.jsx)(xs,{imgList:M,selection:w,onChange:k})}),(0,Zl.jsxs)(g.A,{children:[(0,Zl.jsx)(v.A,{children:`${w.length}/${M.length}`}),(0,Zl.jsx)(l.A,{onClick:_,children:w.length!==x.length?"전체 선택":"선택 해제"}),(0,Zl.jsx)(l.A,{variant:"contained",color:"primary",disabled:0===w.length,onClick:E,children:"다운로드"})]})]})},ks=(0,Zl.jsx)(a.A,{styles:{"#imageToZipBtn":{display:"none"}}});function _s(){const e=(0,o.wA)(),t=(0,u.f)(c.BH),{enabled:r}=(0,o.d4)((e=>e[Cs.default.id].storage)),{open:a}=(0,o.d4)((e=>e[Cs.default.id])),[d,p]=(0,n.useState)(null);(0,n.useEffect)((()=>{if(!r)return;if(!t)return;const e=document.querySelector(c.FW);if(e){if(!d){const t=document.createElement("span");t.classList.add("float-left"),e.insertAdjacentElement("afterbegin",t),p(t)}}else d||p(document.querySelector(c.MI).insertAdjacentElement("afterend",document.createElement("div")))}),[t,d,r]);const f=(0,n.useCallback)((()=>{e((0,As.setOpen)(!0))}),[e]);return d&&r?(0,Zl.jsxs)(Zl.Fragment,{children:[ks,(0,Zl.jsx)(i.Z,{container:d,children:(0,Zl.jsx)(l.A,{sx:{borderColor:"var(--color-border-outer)",color:"var(--color-text-color)"},size:"small",startIcon:(0,Zl.jsx)(s.A,{}),disabled:a,onClick:f,children:"이미지 다운로더"})}),(0,Zl.jsx)(Ss,{})]}):null}},81839:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ImageDownloader",name:"이미지 다운로더",description:"게시물 내 이미지를 다운로드합니다."}},46213:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,u:()=>n});const n={CHANNEL:{STRING:"%channel%",REGEX:/%channel%/,LABEL:"채널 이름",getValue:e=>e.content.channel.name},CHANNEL_ID:{STRING:"%channelId%",REGEX:/%channelI(D|d)%/,LABEL:"채널 SLUG",getValue:e=>e.content.channel.id},TITLE:{STRING:"%title%",REGEX:/%title%/,LABEL:"게시물 제목",getValue:e=>e.content.article.title},CATEGORY:{STRING:"%category%",REGEX:/%category%/,LABEL:"게시물 글머리",getValue:e=>e.content.article.category},AUTHOR:{STRING:"%author%",REGEX:/%author%/,LABEL:"게시물 작성자",getValue:e=>e.content.article.author},ARTICLE_ID:{STRING:"%articleId%",REGEX:/%articleI(D|d)%/,LABEL:"게시물 번호",getValue:e=>e.content.article.id},DATE:{STRING:"%date%",REGEX:/%date%/,LABEL:"게시물 작성일",getValue:e=>e.content.article.date},TIME:{STRING:"%time%",REGEX:/%time%/,LABEL:"게시물 작성 시간",getValue:e=>e.content.article.time},URL:{STRING:"%url%",REGEX:/%url%/,LABEL:"게시물 URL",getValue:e=>e.content.article.url},ORIG:{STRING:"%orig%",REGEX:/%orig%/,LABEL:"이미지 업로드 명",getValue:e=>e.fileName||""},NUMBER:{STRING:"%num%",REGEX:/%num%/,LABEL:"이미지 번호",getValue:e=>`${e.index}`.padStart(3,"0")}};function o(e,t){let r=e;return Object.values(n).forEach((({REGEX:e,getValue:n})=>{r=r.replace(e,n(t))})),r}},92129:(e,t,r)=>{"use strict";r.d(t,{G:()=>n.A,u:()=>o});var n=r(46213);function o(e){const t=e.src||e.dataset.src,r="IMG"===e.tagName,n="https://arca.live/",o=new URL(`${(r?t:e.dataset.originalurl)||t}&type=orig`,n).toString(),a=new URL(r?t:e.poster,n).toString(),i=o.split("?")[0].substr(-10,10).split(".").pop();return{orig:o,thumb:a,ext:i,uploadName:t.match(/[0-9a-f]{64}/g)[0]}}},39923:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setDownloadMethod:()=>u,$setFileName:()=>p,$setZipExtension:()=>h,$setZipImageName:()=>m,$setZipName:()=>f,$toggleContextMenu:()=>c,$toggleEnable:()=>s,$toggleStartWithZero:()=>d,default:()=>v,setOpen:()=>g,slice:()=>l});var n=r(43816),o=r(8070),a=r(81839);const i={storage:(0,o._W)(a.default.id,{enabled:!0,contextMenuEnabled:!0,downloadMethod:"fetch",startWithZero:!1,fileName:"%title%",zipName:"%title%",zipExtension:"zip",zipImageName:"%num%"}),open:!1},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleEnable(e){e.storage.enabled=!e.storage.enabled},$toggleContextMenu(e){e.storage.contextMenuEnabled=!e.storage.contextMenuEnabled},$setDownloadMethod(e,t){e.storage.downloadMethod=t.payload},$toggleStartWithZero(e){e.storage.startWithZero=!e.storage.startWithZero},$setFileName(e,t){e.storage.fileName=t.payload},$setZipName(e,t){e.storage.zipName=t.payload},$setZipExtension(e,t){e.storage.zipExtension=t.payload},$setZipImageName(e,t){e.storage.zipImageName=t.payload},setOpen(e,t){e.open=t.payload}}}),{$toggleEnable:s,$toggleContextMenu:c,$setDownloadMethod:u,$toggleStartWithZero:d,$setFileName:p,$setZipName:f,$setZipExtension:h,$setZipImageName:m,setOpen:g}=l.actions,v=l.reducer},98186:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(68125),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(73896),u=r(28027),d=r(41695),p=r(45714),f=r(4598),h=r(74848);const m=(0,o.forwardRef)(((e,t)=>{const{contextMenuEnabled:r,openType:n,searchBySource:m,searchGoogleMethod:g,saucenaoBypass:v,showGoogle:b,showBing:y,showYandex:x,showSauceNao:w,showIqdb:A,showTraceMoe:C,showImgOps:S,showTinEye:k}=(0,a.d4)((e=>e[p.default.id].storage));return(0,h.jsxs)(o.Fragment,{ref:t,children:[(0,h.jsx)(i.A,{variant:"subtitle1",children:p.default.name}),(0,h.jsx)(i.A,{variant:"subtitle2",children:"동작 설정"}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(s.A,{disablePadding:!0,children:[(0,h.jsx)(d.p9,{divider:!0,primary:"사용",secondary:"이미지에서 우클릭 메뉴가 활성화됩니다.",value:r,action:f.$toggleContextMenu}),(0,h.jsxs)(d.FF,{divider:!0,primary:"검색 결과 창을 여는 방식",value:n,action:f.$setOpenType,children:[(0,h.jsx)(c.A,{value:u.u6,children:"새 창으로"}),(0,h.jsx)(c.A,{value:u.h4,children:"백그라운드 창으로"})]}),(0,h.jsx)(d.p9,{divider:!0,primary:"원본 이미지로 검색",secondary:"검색 속도가 하락하지만 좀 더 정확한 이미지를 찾을 수도 있습니다.",value:m,action:f.$toggleSearchBySource}),(0,h.jsxs)(d.FF,{divider:!0,primary:"구글 이미지 검색 방식",value:g,action:f.$setSearchGoogleMethod,children:[(0,h.jsx)(c.A,{value:"lens",children:"구글 렌즈"}),(0,h.jsx)(c.A,{value:"source",children:"소스 검색"})]}),(0,h.jsx)(d.p9,{primary:"SauceNao 바이패스 활성화",secondary:"정상적으로 검색되지 않을 때만 사용 바랍니다.",value:v,action:f.$toggleSauceNaoBypass})]})}),(0,h.jsx)(i.A,{variant:"subtitle2",children:"사용할 검색 사이트"}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(s.A,{disablePadding:!0,children:[(0,h.jsx)(d.p9,{divider:!0,primary:"Google",value:b,action:f.$toggleShowGoogle}),(0,h.jsx)(d.p9,{divider:!0,primary:"Bing",value:y,action:f.$toggleShowBing}),(0,h.jsx)(d.p9,{divider:!0,primary:"Yandex",value:x,action:f.$toggleShowYandex}),(0,h.jsx)(d.p9,{divider:!0,primary:"SauceNao",value:w,action:f.$toggleShowSauceNao}),(0,h.jsx)(d.p9,{divider:!0,primary:"IQDB",value:A,action:f.$toggleShowIqdb}),(0,h.jsx)(d.p9,{divider:!0,primary:"TraceMoe",value:C,action:f.$toggleShowTraceMoe}),(0,h.jsx)(d.p9,{divider:!0,primary:"ImgOps",value:S,action:f.$toggleShowImgOps}),(0,h.jsx)(d.p9,{divider:!0,primary:"TinEye",value:k,action:f.$toggleShowTinEye})]})})]})}));m.displayName=`ConfigMenuView(${p.default.id})`;const g=m,v={key:p.default.id,Icon:n.A,label:p.default.name,View:g}},66485:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(72550),p=r(59956),f=r(21601),h=r(89930),m=r(46117),g=r(78383),v=r(28027),b=r(45714),y=r(74848);function x({target:e,closeMenu:t}){const{contextMenuEnabled:r,openType:a,searchBySource:i,searchGoogleMethod:x,saucenaoBypass:w,showGoogle:A,showBing:C,showYandex:S,showSauceNao:k,showIqdb:_,showTraceMoe:E,showImgOps:j,showTinEye:R}=(0,o.d4)((e=>e[b.default.id].storage)),M=(0,m.X)(),P=(0,h.E)({key:b.default.id,selector:r?f.Ce:"NULL",dataExtractor:()=>{if(e)return`${e.src}${i?"&type=orig":""}`}},[e,i]),O=(0,n.useCallback)((()=>{A&&((0,v.ho)(`${{lens:"https://lens.google.com/uploadbyurl?hl=ko&re=df&st=1668437351496&ep=gsbubu&url=",source:"https://www.google.com/searchbyimage?client=app&image_url="}[x]}${encodeURIComponent(P)}`,a),t())}),[A,P,x,a,t]),I=(0,n.useCallback)((()=>{C&&((0,v.ho)(`https://www.bing.com/images/search?view=detailv2&iss=sbi&FORM=SBIHMP&sbisrc=UrlPaste&idpbck=1&q=imgurl:${encodeURIComponent(P)}`,a),t())}),[C,P,a,t]),T=(0,n.useCallback)((()=>{S&&(GM_openInTab(`https://yandex.com/images/search?rpt=imageview&url=${encodeURIComponent(P)}`),t())}),[S,t,P]),$=(0,n.useCallback)((()=>{if(k)return w?void(async()=>{try{t(),M({msg:"SauceNao에서 검색 중..."});const e=await fetch(P).then((e=>e.blob()));if(e.size>15728640)return void M({msg:"업로드 용량 제한(15MB)을 초과했습니다.",time:3e3});const r=new FormData;r.append("file",e,`image.${e.type.split("/")[1]}`),r.append("frame",1),r.append("database",999);const n=await(0,g.Em)("https://saucenao.com/search.php",{method:"POST",data:r}).then((({response:e})=>e.querySelector("#yourimage a")?.href.split("image=")[1]));if(!n)return void M({msg:"이미지 업로드에 실패했습니다.",time:3e3});M(),(0,v.ho)(`https://saucenao.com/search.php?db=999&url=https://saucenao.com/userdata/tmp/${n}`,a)}catch(e){M({msg:"오류가 발생했습니다. 개발자 도구(F12)의 콘솔 창을 확인 바랍니다.",time:3e3}),console.error(e)}})():((0,v.ho)(`https://saucenao.com/search.php?db=999&url=${encodeURIComponent(P)}`,a),void t())}),[k,w,a,P,t,M]),L=(0,n.useCallback)((()=>{_&&(GM_openInTab(`https://iqdb.org/?url=${encodeURIComponent(P)}`,a),t())}),[_,t,P,a]),z=(0,n.useCallback)((()=>{E&&(GM_openInTab(`https://trace.moe/?url=${encodeURIComponent(P)}`,a),t())}),[E,t,P,a]),F=(0,n.useCallback)((()=>{j&&(GM_openInTab(`https://imgops.com/${P}`,a),t())}),[j,t,P,a]),D=(0,n.useCallback)((()=>{R&&(GM_openInTab(`https://tineye.com/search?url=${encodeURIComponent(P)}`,a),t())}),[R,t,P,a]),N=(0,n.useCallback)((()=>{O(),I(),T(),$(),L(),z(),F(),D()}),[O,I,T,$,L,z,F,D]);return P?(0,y.jsxs)(l.A,{children:[(0,y.jsxs)(s.A,{onClick:N,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(d.A,{})}),(0,y.jsx)(u.A,{children:"모든 사이트로 검색"})]}),A&&(0,y.jsxs)(s.A,{onClick:O,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"Google 검색"})]}),C&&(0,y.jsxs)(s.A,{onClick:I,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"Bing 검색"})]}),S&&(0,y.jsxs)(s.A,{onClick:T,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"Yandex 검색"})]}),k&&(0,y.jsxs)(s.A,{onClick:$,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"SauceNao 검색"})]}),_&&(0,y.jsxs)(s.A,{onClick:L,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"IQDB 검색"})]}),E&&(0,y.jsxs)(s.A,{onClick:z,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"TraceMoe 검색"})]}),j&&(0,y.jsxs)(s.A,{onClick:F,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"ImgOps 검색"})]}),R&&(0,y.jsxs)(s.A,{onClick:D,children:[(0,y.jsx)(c.A,{children:(0,y.jsx)(p.A,{})}),(0,y.jsx)(u.A,{children:"TinEye 검색"})]})]}):null}x.propTypes={target:i().object,closeMenu:i().func};const w=x,A={key:b.default.id,View:w,order:901}},45714:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ImageSearch",name:"이미지 검색",description:"게시물 내 이미지를 검색하는 메뉴를 제공합니다."}},4598:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setOpenType:()=>d,$setSearchGoogleMethod:()=>f,$toggleContextMenu:()=>u,$toggleSauceNaoBypass:()=>h,$toggleSearchBySource:()=>p,$toggleShowBing:()=>g,$toggleShowGoogle:()=>m,$toggleShowImgOps:()=>w,$toggleShowIqdb:()=>y,$toggleShowSauceNao:()=>b,$toggleShowTinEye:()=>A,$toggleShowTraceMoe:()=>x,$toggleShowYandex:()=>v,default:()=>C,slice:()=>c});var n=r(43816),o=r(8070),a=r(28027),i=r(45714);const l={contextMenuEnabled:!0,openType:a.h4,searchBySource:!1,searchGoogleMethod:"lens",saucenaoBypass:!1,showGoogle:!0,showBing:!0,showYandex:!0,showSauceNao:!0,showIqdb:!0,showTraceMoe:!0,showImgOps:!0,showTinEye:!0},s={storage:(0,o._W)(i.default.id,l)},c=(0,n.Z0)({name:i.default.id,initialState:s,reducers:{$toggleContextMenu(e){e.storage.contextMenuEnabled=!e.storage.contextMenuEnabled},$setOpenType(e,t){e.storage.openType=t.payload},$toggleSearchBySource(e){e.storage.searchBySource=!e.storage.searchBySource},$setSearchGoogleMethod(e,t){e.storage.searchGoogleMethod=t.payload},$toggleSauceNaoBypass(e){e.storage.saucenaoBypass=!e.storage.saucenaoBypass},$toggleShowGoogle(e){e.storage.showGoogle=!e.storage.showGoogle},$toggleShowBing(e){e.storage.showBing=!e.storage.showBing},$toggleShowYandex(e){e.storage.showYandex=!e.storage.showYandex},$toggleShowSauceNao(e){e.storage.showSauceNao=!e.storage.showSauceNao},$toggleShowIqdb(e){e.storage.showIqdb=!e.storage.showIqdb},$toggleShowTraceMoe(e){e.storage.showTraceMoe=!e.storage.showTraceMoe},$toggleShowImgOps(e){e.storage.showImgOps=!e.storage.showImgOps},$toggleShowTinEye(e){e.storage.showTinEye=!e.storage.showTinEye}}}),{$toggleContextMenu:u,$setOpenType:d,$toggleSearchBySource:p,$setSearchGoogleMethod:f,$toggleSauceNaoBypass:h,$toggleShowGoogle:m,$toggleShowBing:g,$toggleShowYandex:v,$toggleShowSauceNao:b,$toggleShowIqdb:y,$toggleShowTraceMoe:x,$toggleShowImgOps:w,$toggleShowTinEye:A}=c.actions,C=c.reducer},72020:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(96540),o=r(71468),a=r(61224),i=r(59956),l=r(21601),s=r(36742),c=r(63965),u=r(74848);function d(){const{blockAll:e,blockDeleted:t,blockReported:r}=(0,o.d4)((e=>e[c.default.id].storage)),d=(0,s.f)(l.X3),p=(0,n.useCallback)((()=>{document.querySelector(l.je).classList.add("media-blocker-unhide")}),[]);return e||d&&t||document.referrer.includes("/reports/")&&r?(0,u.jsx)(a.A,{size:"small",variant:"text",startIcon:(0,u.jsx)(i.A,{}),onClick:p,children:"이미지 숨기기 해제"}):null}},95589:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(53540),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(52848),u=r(41695),d=r(63965),p=r(36189),f=r(74848);const h=(0,o.forwardRef)(((e,t)=>{const{blockAll:r,blockDeleted:n,blockReported:h}=(0,a.d4)((e=>e[d.default.id].storage));return(0,f.jsxs)(o.Fragment,{ref:t,children:[(0,f.jsx)(i.A,{variant:"subtitle1",children:d.default.name}),(0,f.jsx)(l.A,{children:(0,f.jsxs)(s.A,{disablePadding:!0,children:[(0,f.jsx)(u.p9,{divider:!0,primary:"모든 게시물의 이미지 차단",value:r,action:p.$toggleBlockAll}),(0,f.jsxs)(c.A,{in:!r,children:[(0,f.jsx)(u.p9,{divider:!0,primary:"삭제된 게시물 이미지 차단",secondary:"채널 관리자 전용",value:n,action:p.$toggleBlockDeleted}),(0,f.jsx)(u.p9,{primary:"신고된 게시물 이미지 차단",secondary:"채널 관리자 전용, 이동 전 페이지가 신고 목록 일 때 동작합니다.",value:h,action:p.$toggleBlockReported})]})]})})]})}));h.displayName=`ConfigMenuView(${d.default.id})`;const m=h,g={key:d.default.id,Icon:n.A,label:d.default.name,View:m}},17752:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(96540),o=r(71468),a=r(21601),i=r(36742),l=r(5556),s=r.n(l),c=r(59839),u=r(63493),d=r(11641),p=r(37591),f=r(59956),h=r(74848);const m=(0,h.jsx)(c.A,{styles:{".article-content":{"&:not(.media-blocker-unhide)":{"& .media-blocker":{display:"none"},"& .media-blocker-btns.removed":{display:"none"}},"&.media-blocker-unhide .media-blocker-btns":{display:"none"}}}});function g({referenceElement:e,container:t}){const[r,o]=(0,n.useState)(null);(0,n.useEffect)((()=>{t.classList.add("media-blocker-btns"),e.classList.add("media-blocker")}),[t,e]);const a=(0,n.useCallback)((e=>{o(e.currentTarget)}),[]),i=(0,n.useCallback)((()=>{o(null)}),[]),l=(0,n.useCallback)((r=>{r.preventDefault(),t.classList.add("removed"),e.classList.remove("media-blocker")}),[t,e]);let s="";return"IMG"===e.nodeName?s=`${e.src}&type=list`:"VIDEO"===e.nodeName&&"v1"===e.dataset.version?s=`${e.src}.gif`:"VIDEO"===e.nodeName&&"v2"===e.dataset.version&&(s=e.poster),(0,h.jsxs)(h.Fragment,{children:[m,(0,h.jsx)(u.Z,{container:t,children:(0,h.jsx)(d.A,{onMouseEnter:a,onMouseLeave:i,onClick:l,size:"large",children:(0,h.jsx)(f.A,{})})}),(0,h.jsx)(p.A,{open:!!r,anchorEl:r,placement:"right",children:(0,h.jsx)("img",{width:100,height:100,src:s,alt:""})})]})}g.propTypes={referenceElement:s().object,container:s().object};const v=g;var b=r(63965);function y(){const{blockAll:e,blockDeleted:t,blockReported:r}=(0,o.d4)((e=>e[b.default.id].storage)),l=(0,i.f)(a.BH),s=(0,i.f)(a.X3),[c,u]=(0,n.useState)([]);return(0,n.useEffect)((()=>{if(!l)return;if(!(e||s&&t||document.referrer.includes("/reports/")&&r))return;const n=[...document.querySelectorAll(a.iT)].map((e=>{const t=document.createElement("div");return e.insertAdjacentElement("afterend",t),{element:e,container:t}}));return u(n),()=>u([])}),[s,l,e,t,r]),0===c.length?null:(0,h.jsx)(h.Fragment,{children:c.map((({element:e,container:t})=>(0,h.jsx)(v,{referenceElement:e,container:t},e.src)))})}},63965:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"MediaBlocker",name:"미디어 차단",description:"게시물 내 이미지, 동영상을 차단합니다."}},36189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$toggleBlockAll:()=>s,$toggleBlockDeleted:()=>c,$toggleBlockReported:()=>u,default:()=>d,slice:()=>l});var n=r(43816),o=r(8070),a=r(63965);const i={storage:(0,o._W)(a.default.id,{blockAll:!1,blockDeleted:!0,blockReported:!0})},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleBlockAll(e){e.storage.blockAll=!e.storage.blockAll},$toggleBlockDeleted(e){e.storage.blockDeleted=!e.storage.blockDeleted},$toggleBlockReported(e){e.storage.blockReported=!e.storage.blockReported}}}),{$toggleBlockAll:s,$toggleBlockDeleted:c,$toggleBlockReported:u}=l.actions,d=l.reducer},90180:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(40250),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(73896),u=r(41695),d=r(41208),p=r(86624),f=r(74848);const h=(0,o.forwardRef)(((e,t)=>{const{countdown:r,maxTime:n,refreshOnArticle:h,progressPos:m}=(0,a.d4)((e=>e[d.default.id].storage));return(0,f.jsxs)(o.Fragment,{ref:t,children:[(0,f.jsx)(i.A,{variant:"subtitle1",children:d.default.name}),(0,f.jsx)(l.A,{children:(0,f.jsxs)(s.A,{disablePadding:!0,children:[(0,f.jsxs)(u.FF,{divider:!0,primary:"갱신 시간 설정",value:r,action:p.$setTimeLimit,children:[(0,f.jsx)(c.A,{value:0,children:"사용 안 함"}),(0,f.jsx)(c.A,{value:5,children:"5초"}),(0,f.jsx)(c.A,{value:10,children:"10초"}),(0,f.jsx)(c.A,{value:20,children:"20초"}),(0,f.jsx)(c.A,{value:30,children:"30초"}),(0,f.jsx)(c.A,{value:60,children:"1분"})]}),(0,f.jsxs)(u.FF,{divider:!0,primary:"최대 갱신 스킵 시간",secondary:"이 시간만큼 게시물 갱신이 없으면 반드시 새로고침합니다.",value:n,action:p.$setMaxTime,children:[(0,f.jsx)(c.A,{value:-1,children:"사용 안 함"}),(0,f.jsx)(c.A,{value:60,children:"1분"}),(0,f.jsx)(c.A,{value:120,children:"2분"}),(0,f.jsx)(c.A,{value:300,children:"5분"}),(0,f.jsx)(c.A,{value:600,children:"10분"})]}),(0,f.jsx)(u.p9,{divider:!0,primary:"게시물 조회 중에도 갱신",secondary:"단, 1페이지를 확실히 보장할 수 있을 때만 동작합니다.",value:h,action:p.$toggleRefreshOnArticle}),(0,f.jsxs)(u.FF,{primary:"갱신 애니메이션 위치",value:m,action:p.$setProgressPos,children:[(0,f.jsx)(c.A,{value:"hidden",children:"숨김"}),(0,f.jsx)(c.A,{value:"bottom left",children:"왼쪽 아래"}),(0,f.jsx)(c.A,{value:"bottom right",children:"오른쪽 아래"}),(0,f.jsx)(c.A,{value:"top left",children:"왼쪽 위"}),(0,f.jsx)(c.A,{value:"top right",children:"오른쪽 위"})]})]})})]})}));h.displayName=`ConfigMenuView(${d.default.id})`;const m=h,g={key:d.default.id,Icon:n.A,label:d.default.name,View:m}},76350:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(96540),o=r(71468),a=r(59839),i=r(20973),l=r(69067),s=r(21601),c=r(92020),u=r(36742),d=r(83502),p=r(41208),f=r(5556),h=r.n(f),m=r(11848),g=r(74848);const v={top:{left:{top:60,bottom:"unset",left:16,right:"unset"},right:{top:60,bottom:"unset",left:"unset",right:16}},bottom:{left:{top:"unset",bottom:20,left:16,right:"unset"},right:{top:"unset",bottom:60,left:"unset",right:16}}},b=(0,m.Ay)("div")((({pos:e,animate:t,count:r})=>({position:"fixed",border:"6px solid #d3d3d3",borderTop:"6px solid #3d414d",borderRadius:"50%",width:40,height:40,top:v[e[0]][e[1]].top,bottom:v[e[0]][e[1]].bottom,left:v[e[0]][e[1]].left,right:v[e[0]][e[1]].right,animationName:t?"refresh-spin":"",animationDuration:`${r}s`,animationTimingFunction:"ease-in-out",animationIterationCount:"infinite","@keyframes refresh-spin":{"0%":{transform:"rotate(0deg)",boxShadow:"0 0 15px #3d414d"},"5%":{boxShadow:"0 0 10px #3d414d"},"15%":{boxShadow:"0 0 0px #3d414d"},"100%":{transform:"rotate(360deg)",boxShadow:"0 0 0px #3d414d"}}}))),y=(0,n.forwardRef)((({pos:e,count:t,animate:r},o)=>{const[a,i]=(0,n.useState)(["bottom","left"]);return(0,n.useEffect)((()=>{"hidden"!==e[0]&&i(e)}),[e]),(0,g.jsx)(b,{ref:o,pos:a,count:t,animate:r})}));y.propTypes={pos:h().array,count:h().number,animate:h().bool};const x=y;var w=r(78383);const A=(0,g.jsx)(a.A,{styles:{".refreshed":{animationName:"refreshed-animate",animationDuration:"0.5s"},"@keyframes refreshed-animate":{"0%":{backgroundColor:"var(--color-bg-focus)"},"100%":{backgroundColor:"transparent"}}}}),C=function(){const[e,t]=(0,d._)(),r=(0,u.f)(s.Zy),{countdown:a,maxTime:f,refreshOnArticle:h,progressPos:m}=(0,o.d4)((e=>e[p.default.id].storage)),[v,b]=(0,n.useState)(),[y,C]=(0,n.useState)({management:!1,unfocus:!1,api:!1}),S=(0,n.useRef)({newArticle:0,accTime:0,mouseTimer:void 0}),k=(0,n.useMemo)((()=>{if(0===a)return!1;const e=(t=window.location.search,Object.fromEntries(new URLSearchParams(t)));var t;const r=Object.keys(e),n=["after","before","near"],o=parseInt(e.p,10),i=r.some((e=>n.includes(e)));return!(o>1)&&(!i&&!!(!window.location.pathname.split("/")[3]||h&&e.p))}),[a,h]),_=(0,n.useCallback)((async()=>{if(S.current.newArticle<1){if(-1===f)return;if(S.current.accTimee.remove())),t.notices.reverse(),t.notices.forEach((e=>{n.insertAdjacentElement("afterend",e)}));const o=[...e.querySelectorAll(s.Yn)].map((e=>e.pathname||e.querySelector("a.title").pathname));t.articles.forEach((e=>{const t=e.pathname||e.querySelector("a.title").pathname;o.includes(t)||e.classList.add("refreshed")})),[...e.querySelectorAll(s.Yn)].forEach((e=>e.remove())),t.articles.forEach((t=>{e.append(t)})),t.articles.forEach((e=>{const t=e.querySelector("noscript");t?.replaceWith(t.firstElementChild)})),unsafeWindow.applyLocalTimeFix()}(v,e),window.dispatchEvent(new Event(c.U)),S.current.newArticle=0,S.current.accTime=0)}),[v,a,f]);return(0,n.useEffect)((()=>{if(!k)return;if(!r)return;const e=document.querySelector(s.r4);b(e);const t=()=>{S.current.mouseTimer&&clearTimeout(S.current.mouseTimer),S.current.mouseTimer=setTimeout((()=>{S.current.mouseTimer=null}),1e3)};return e.addEventListener("mousemove",t),()=>e.removeEventListener("mousemove",t)}),[r,k]),(0,n.useEffect)((()=>{if(!r)return;const n={callback:e=>{"na"===e.data&&(S.current.newArticle+=1)},type:"after"};return e(n),()=>t(n)}),[r,e,t]),(0,n.useEffect)((()=>{if(!k)return;if(!v)return;const e=({target:e})=>{"INPUT"===e.tagName&&(e.classList.contains("batch-check-all")?C((t=>({...t,management:e.checked}))):C((e=>({...e,management:!!v.querySelector(".batch-check:checked")}))))},t=()=>{C((e=>({...e,unfocus:document.hidden}))),document.hidden||_()};return v.addEventListener("click",e),document.addEventListener("visibilitychange",t),unsafeWindow.ArcaRefresher??={},unsafeWindow.ArcaRefresher.toggleRefresh=()=>{C((e=>({...e,api:!e.api})))},()=>{v.removeEventListener("click",e),document.removeEventListener("visibilitychange",t)}}),[v,k,_]),(0,n.useEffect)((()=>{if(!k)return;if(y.management||y.unfocus||y.api)return;const e=setInterval(_,1e3*a);return()=>clearInterval(e)}),[a,k,y,_]),(0,g.jsxs)(g.Fragment,{children:[A,(0,g.jsx)(i.A,{in:k&&"hidden"!==m,children:(0,g.jsx)(l.A,{children:(0,g.jsx)(x,{pos:m.split(" "),count:k?a:0,animate:!(y.management||y.unfocus||y.api)})})})]})}},41208:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"AutoRefresher",name:"자동 새로고침",description:"일정 시간 간격으로 게시물을 새로 가져옵니다."}},86624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setMaxTime:()=>c,$setProgressPos:()=>d,$setTimeLimit:()=>s,$toggleRefreshOnArticle:()=>u,default:()=>p,slice:()=>l});var n=r(43816),o=r(8070),a=r(41208);const i={storage:(0,o._W)(a.default.id,{countdown:5,maxTime:-1,refreshOnArticle:!1,progressPos:"bottom left"})},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$setTimeLimit(e,t){e.storage.countdown=t.payload},$setMaxTime(e,t){e.storage.maxTime=t.payload},$toggleRefreshOnArticle(e){e.storage.refreshOnArticle=!e.storage.refreshOnArticle},$setProgressPos(e,t){e.storage.progressPos=t.payload}}}),{$setTimeLimit:s,$setMaxTime:c,$toggleRefreshOnArticle:u,$setProgressPos:d}=l.actions,p=l.reducer},35386:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(86775),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(41695),u=r(2306),d=r(72486),p=r(74848);const f=(0,o.forwardRef)(((e,t)=>{const{userinfoWidth:r,rateCount:n,contextMenuEnabled:f,openArticleNewWindow:h,enhancedArticleManage:m}=(0,a.d4)((e=>e[u.default.id].storage));return(0,p.jsxs)(o.Fragment,{ref:t,children:[(0,p.jsx)(i.A,{variant:"subtitle1",children:u.default.name}),(0,p.jsx)(i.A,{variant:"subtitle2",children:"모양 설정"}),(0,p.jsx)(l.A,{children:(0,p.jsxs)(s.A,{disablePadding:!0,children:[(0,p.jsx)(c.k1,{divider:!0,primary:"게시판 이용자 너비",opacityOnChange:.6,value:r,action:d.$setUserInfoWith}),(0,p.jsx)(c.p9,{primary:"추천 수 표시",value:n,action:d.$toggleRateCount})]})}),(0,p.jsx)(i.A,{variant:"subtitle2",children:"동작 설정"}),(0,p.jsx)(l.A,{children:(0,p.jsxs)(s.A,{disablePadding:!0,children:[(0,p.jsx)(c.p9,{divider:!0,primary:"게시물 새 창에서 열기",secondary:"게시판 화면에서 게시물을 클릭하면 새 창에서 열리게 합니다.",value:h,action:d.$toggleArticleNewWindow}),(0,p.jsx)(c.p9,{primary:"개선된 게시물 관리 사용",secondary:"체크박스의 클릭 범위를 여유롭게 만들고 드래그로 한번에 선택할 수 있습니다.",value:m,action:d.$toggleEnhancedArticleManage})]})}),(0,p.jsx)(i.A,{variant:"subtitle2",children:"우클릭 메뉴"}),(0,p.jsx)(l.A,{children:(0,p.jsx)(s.A,{disablePadding:!0,children:(0,p.jsx)(c.p9,{divider:!0,primary:"우클릭 메뉴 사용",value:f,action:d.$toggleContextMenu})})})]})}));f.displayName=`ConfigMenuView(${u.default.id})`;const h=f,m={key:u.default.id,order:-1,Icon:n.A,label:u.default.name,View:h}},38983:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(98818),p=r(75003),f=r(74848);const h=(0,p.A)((0,f.jsx)("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"}),"Bookmark");var m=r(21601),g=r(89930),v=r(46117),b=r(50060),y=r(28027),x=r(2306);function w({target:e,closeMenu:t}){const{contextMenuEnabled:r}=(0,o.d4)((e=>e[x.default.id].storage)),{user:a,channel:i}=(0,b.HZ)(),p=(0,v.X)(),w=(0,g.E)({key:x.default.id,selector:`${r?m.Yn:"NULL"}`,dataExtractor:()=>{if(!e)return;const t=e.href||e.querySelector("a.title").href;return{articleId:t.split("/").pop().split("?")[0],url:t}}},[e]),A=(0,n.useCallback)((()=>{(0,y.ho)(w.url,y.h4),t()}),[t,w]),C=(0,n.useCallback)((async()=>{t();const e=await fetch(`https://arca.live/api/scrap?slug=${i.id}&articleId=${w.articleId}`).then((e=>e.json()));e.result?p({msg:`스크랩 ${e.isScrap?"되었습니다":"취소되었습니다"}.`,time:3e3}):p({msg:"스크랩 실패 (서버 오류?)",time:3e3})}),[i,t,w,p]);return w?(0,f.jsxs)(l.A,{children:[(0,f.jsxs)(s.A,{onClick:A,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:"새 창으로 열기"})]}),a&&(0,f.jsxs)(s.A,{onClick:C,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(h,{})}),(0,f.jsx)(u.A,{children:"게시물 스크랩"})]})]}):null}w.propTypes={target:i().object,closeMenu:i().func};const A=w,C={key:x.default.id,View:A,order:100}},87434:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(96540),o=r(71468),a=r(59839),i=r(21601),l=r(92020),s=r(36742),c=r(2306),u=r(74848);function d({value:e}){return(0,u.jsx)(a.A,{styles:{".vcol.col-author":{width:`calc(7rem * (1 + ${.01*e})) !important`}}})}function p({value:e}){return e?null:(0,u.jsx)(a.A,{styles:{"html body.body .board-article .article-list .list-table":{"& .vrow-inner .vrow-bottom .vcol.col-view":{"&::after":{content:'""',margin:0},marginRight:0},"& .vcol.col-rate":{display:"none !important"}}}})}function f(){const e=(0,s.f)(i.Zy),{userinfoWidth:t,rateCount:r,openArticleNewWindow:a,enhancedArticleManage:f}=(0,o.d4)((e=>e[c.default.id].storage));return(0,n.useEffect)((()=>{if(!e||!a)return;const t=document.querySelector(`${i.r4}, ${i.eb}`),r=()=>{t.querySelectorAll(`${i.tW}, ${i.Yn}`).forEach((e=>{e.setAttribute("target","_blank")}))};return r(),window.addEventListener(l.U,r),()=>{t.querySelectorAll(`${i.tW}, ${i.Yn}`).forEach((e=>{e.setAttribute("target","")})),window.removeEventListener(l.U,r)}}),[e,a]),(0,n.useEffect)((()=>{if(!e)return;if(!f)return;if(!document.querySelector(".article-list.admin"))return;const t=document.querySelector(i.r4);let r,n=!1,o=!1;const a=e=>{if(e.target.matches('input[type="checkbox"]'))return;o&&(e.preventDefault(),o=!1);const t=e.target.closest("a.vrow:not(.notice)");if(t&&e.pageX{if(0!==e.button)return;const t=e.target.closest("a.vrow:not(.notice)");if(!t)return;e.preventDefault(),r=t;const o=t.querySelector('input[type="checkbox"]');n=!o.checked},s=e=>{0===e.button&&(e.preventDefault(),r=void 0)},c=e=>{if(!r)return;e.preventDefault();const t=e.target.closest("a.vrow:not(.notice)");if(!t||r===t)return;const a=r.querySelector('input[type="checkbox"]');a.checked!==n&&(a.click(),o=!0);const i=t.querySelector('input[type="checkbox"]');i.checked!==n&&i.click()};return t.addEventListener("click",a),t.addEventListener("mousedown",l),t.addEventListener("mouseup",s),t.addEventListener("mousemove",c),()=>{t.removeEventListener("click",a),t.removeEventListener("mousedown",l),t.removeEventListener("mouseup",s),t.removeEventListener("mousemove",c)}}),[e,f]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(d,{value:t}),(0,u.jsx)(p,{value:r})]})}},2306:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"BoardCustom",name:"게시판 모양",description:"게시판 UI/UX를 수정합니다."}},72486:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setUserInfoWith:()=>s,$toggleArticleNewWindow:()=>u,$toggleContextMenu:()=>p,$toggleEnhancedArticleManage:()=>d,$toggleRateCount:()=>c,default:()=>f,slice:()=>l});var n=r(43816),o=r(8070),a=r(2306);const i={storage:(0,o._W)(a.default.id,{version:1,userinfoWidth:10,rateCount:!0,openArticleNewWindow:!1,enhancedArticleManage:!0,contextMenuEnabled:!0},(function(e,t){if(0===(e?.version||0)){const e=Object.keys(t).filter((e=>"version"!==e)),r=[],n=(0,o._W)("LayoutCustom");n&&r.push(...Object.entries(n).filter((t=>e.includes(t[0]))));const a=(0,o._W)("ExperienceCustom");return a&&r.push(...Object.entries(a).filter((t=>e.includes(t[0])))),{...t,...Object.fromEntries(r)}}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$setUserInfoWith(e,t){e.storage.userinfoWidth=t.payload},$toggleRateCount(e){e.storage.rateCount=!e.storage.rateCount},$toggleArticleNewWindow(e){e.storage.openArticleNewWindow=!e.storage.openArticleNewWindow},$toggleEnhancedArticleManage(e){e.storage.enhancedArticleManage=!e.storage.enhancedArticleManage},$toggleContextMenu(e){e.storage.contextMenuEnabled=!e.storage.contextMenuEnabled}}}),{$setUserInfoWith:s,$toggleRateCount:c,$toggleArticleNewWindow:u,$toggleEnhancedArticleManage:d,$toggleContextMenu:p}=l.actions,f=l.reducer},98367:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>L});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"m20.71 5.63-2.34-2.34a.9959.9959 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"Colorize");var i=r(96540),l=r(71468),s=r(14073),c=r(60538),u=r(49799),d=r(44635),p=r(8239),f=r(50060),h=r(77226),m=r(49694),g=r(5556),v=r.n(g),b=r(71543),y=r(69067),x=r(50936),w=r(47839),A=r(11641);const C=(0,n.A)((0,o.jsx)("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),S=(0,n.A)((0,o.jsx)("path",{d:"M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z"}),"FormatStrikethrough"),k=(0,n.A)((0,o.jsx)("path",{d:"M11 11h-1v2h2v-1l9.73 9.73L20.46 23 14 16.54V21H3v-2h2V7.54l-4-4 1.27-1.27zm3 .49L5.51 3H14v1h5v12.49l-2-2V6h-3z"}),"NoMeetingRoom"),_=(0,n.A)((0,o.jsx)("path",{d:"M14 6v15H3v-2h2V3h9v1h5v15h2v2h-4V6zm-4 5v2h2v-2z"}),"MeetingRoom"),E=(0,n.A)((0,o.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var j=r(14165),R=r(36698);const M={badge:"",bgcolor:"",bold:!1,through:!1,disableVisited:!1};function P({divider:e,id:t,label:r,initValue:n,onChange:a}){const[l,s]=(0,i.useState)({...M,...n}),c=(0,i.useCallback)((e=>r=>{const n={...l,[e]:r};s(n),a(t,n)}),[t,a,l]),u=(0,i.useCallback)((e=>()=>{const r={...l,[e]:!l[e]};s(r),a(t,r)}),[t,a,l]),d=(0,i.useCallback)((()=>{const e={...M};s(e),a(t,e)}),[t,a]),{badge:f=null,bgcolor:h=null,bold:m,through:g,disableVisited:v}=l,P={margin:"0.25rem",...f?{backgroundColor:f,color:(0,R.E)(f)}:{backgroundColor:"var(--color-board-category)"}},O={...h&&{background:`linear-gradient(90deg, ${h}, rgba(0, 0, 0, 0))`,color:(0,R.E)(h)},...m&&{fontWeight:"bold"},...g&&{textDecoration:"line-through"}};return(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(p.Ay,{item:!0,xs:12,children:(0,o.jsx)(b.A,{})}),(0,o.jsx)(p.Ay,{item:!0,sm:6,xs:12,children:(0,o.jsxs)(y.A,{sx:{display:"flex",height:"100%",minHeight:"48px",width:"100%",alignItems:"center",...O},children:[(0,o.jsx)("span",{className:"badge badge-success",style:P,children:r}),(0,o.jsx)("span",{className:"title",children:"게시물 제목"})]})}),(0,o.jsx)(p.Ay,{item:!0,sm:6,xs:12,children:(0,o.jsxs)(x.A,{direction:"row",sx:{alignItems:"center"},children:[(0,o.jsx)(w.A,{title:"카테고리 색",children:(0,o.jsx)("span",{children:(0,o.jsx)(j.A,{color:f,onChange:c("badge")})})}),(0,o.jsx)(w.A,{title:"배경색",children:(0,o.jsx)("span",{children:(0,o.jsx)(j.A,{color:h,onChange:c("bgcolor")})})}),(0,o.jsx)(w.A,{title:"굵게",children:(0,o.jsx)(A.A,{onClick:u("bold"),size:"large",children:(0,o.jsx)(C,{})})}),(0,o.jsx)(w.A,{title:"취소선",children:(0,o.jsx)(A.A,{onClick:u("through"),size:"large",children:(0,o.jsx)(S,{})})}),(0,o.jsx)(w.A,{title:v?"방문 표시 안함":"방문 표시",children:(0,o.jsx)(A.A,{onClick:u("disableVisited"),size:"large",children:v?(0,o.jsx)(k,{}):(0,o.jsx)(_,{})})}),(0,o.jsx)(w.A,{title:"리셋",children:(0,o.jsx)(A.A,{onClick:d,size:"large",children:(0,o.jsx)(E,{})})})]})})]})}function O(e,t){return e.badge===t.badge&&e.bgcolor===t.bgcolor&&e.bold===t.bold&&e.through===t.through&&e.disableVisited===t.disableVisited}P.propTypes={divider:v().bool,id:v().string,label:v().string,initValue:v().object,onChange:v().func};const I=(0,i.memo)(P,O),T=(0,i.forwardRef)(((e,t)=>{const r=(0,l.wA)(),{channel:n,category:a}=(0,f.HZ)(),g=(0,l.d4)((e=>e[h.default.id].storage.color[n.id])),v=(0,i.useCallback)(((e,t)=>{r((0,m.$setCategoryStyle)({channel:n.id,category:e,value:t}))}),[n,r]);return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(s.A,{variant:"subtitle1",children:h.default.name}),(0,o.jsx)(c.A,{children:(0,o.jsx)(u.A,{disablePadding:!0,children:(0,o.jsx)(d.Ay,{children:(0,o.jsx)(c.A,{sx:{width:"100%"},variant:"outlined",children:(0,o.jsx)(p.Ay,{container:!0,children:a?.id2NameMap?Object.entries(a.id2NameMap).map((([e,t],r)=>(0,o.jsx)(I,{divider:0!==r,id:e,label:t,initValue:g?.[e],onChange:v},e))):(0,o.jsx)(p.Ay,{item:!0,xs:12,children:(0,o.jsx)(s.A,{align:"center",children:"카테고리를 확인할 수 없습니다."})})})})})})})]})}));T.displayName=`ConfigMenuView(${h.default.id})`;const $=T,L={key:h.default.id,Icon:a,label:h.default.name,View:$}},11170:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(96540),o=r(40961),a=r(71468),i=r(21601),l=r(92020),s=r(50060),c=r(36698),u=r(77226),d=r(74848);function p(){const{channel:e,category:t}=(0,s.HZ)(),{color:r}=(0,a.d4)((e=>e[u.default.id].storage)),[p,f]=(0,n.useState)(null);if((0,n.useLayoutEffect)((()=>{if(!t)return;const e=Object.values(t.id2NameMap).map((e=>[e,Math.random().toString(36).substring(2)]));f(Object.fromEntries(e))}),[t]),(0,n.useLayoutEffect)((()=>{if(!p)return;const e=document.querySelector(`${i.r4}, ${i.eb}`);e.classList.add("ARColor");const t=()=>{e.querySelectorAll(i.Yn).forEach((e=>{const t=e.querySelector(".badge")?.textContent||"글머리없음";p[t]&&e.classList.add(`color-${p[t]}`)}))};return t(),window.addEventListener(l.U,t),()=>{window.removeEventListener(l.U,t)}}),[p]),!r[e.id])return null;const h=Object.entries(r[e.id]).map((([e,r])=>{const{badge:n,bgcolor:o,bold:a,through:i,disableVisited:l}=r,s=p?.[t.id2NameMap?.[e]];return s?`.ARColor .color-${s} {\n ${o?`background-color: ${o} !important;`:""}\n ${o?`color: ${(0,c.E)(o)};`:""}\n ${a?"font-weight: bold;":""}\n ${i?"text-decoration: line-through;":""}\n }\n .ARColor .color-${s}:visited {\n ${l?`color: ${o?(0,c.E)(o):"var(--color-text-color)"} !important;`:""}\n }\n .ARColor .color-${s} .badge {\n ${n?`background-color: ${n} !important;`:""}\n ${n?`border: 1px solid ${n} !important;`:""}\n ${n?`color: ${(0,c.E)(n)} !important`:""}\n }`:""}));return o.createPortal((0,d.jsx)("style",{children:h}),document.head)}},77226:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"CategoryStyler",name:"카테고리 스타일러",description:"특정 카테고리(말머리)에 속한 게시물의 배경색, 텍스트 스타일 설정을 할 수 있습니다."}},49694:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setCategoryStyle:()=>s,$setStyle:()=>c,default:()=>u,slice:()=>l});var n=r(43816),o=r(8070),a=r(77226);const i={storage:(0,o._W)(a.default.id,{color:{}})},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$setCategoryStyle(e,t){const{channel:r,category:n,value:o}=t.payload;e.storage.color[r]||(e.storage.color[r]={}),e.storage.color[r][n]=o},$setStyle(e,t){const{channel:r,color:n}=t.payload;e.storage.color[r]=n}}}),{$setCategoryStyle:s,$setStyle:c}=l.actions,u=l.reducer},34132:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(75003),o=r(74848);const a={Icon:(0,n.A)((0,o.jsx)("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"List"),label:"게시판",order:1}},25628:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(55764),o=r(96540),a=r(14073),i=r(42471),l=r(60538),s=r(49799),c=r(82241),u=r(75003),d=r(74848);const p=(0,u.A)((0,d.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch");var f=r(71451),h=r.n(f),m=r(8070),g=r(41695),v=r(73185),b=r(6419);const y=r(92748),x=y.keys().map((e=>y(e).default.id)),w=(0,o.forwardRef)(((e,t)=>{const r=(0,o.useRef)(),[n,u]=(0,v.SC)(),f=(0,o.useCallback)((async()=>{const e=GM_listValues().filter((e=>!x.includes(e))),t=e.reduce(((e,t)=>({...e,[t]:GM_getValue(t)})),{});await n({title:"정리하기 전에...",content:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.A,{children:"다음 데이터들을 삭제합니다."}),(0,d.jsx)(a.A,{variant:"caption",children:"_v0, _v1 등의 이름을 가진 데이터는 백업데이터로 삭제해도 문제되지 않습니다."}),(0,d.jsx)(i.A,{sx:{my:2},fullWidth:!0,multiline:!0,minRows:6,maxRows:6,value:JSON.stringify(t)})]})})&&e.forEach((e=>GM_deleteValue(e)))}),[n]),y=(0,o.useCallback)((()=>{r.current.click()}),[]),w=(0,o.useCallback)((e=>{(async()=>{try{const t=e.target.files[0],r=await new Promise((e=>{const r=new FileReader;r.onload=()=>{e(r.result)},r.readAsText(t)}));(0,m.OX)(r),window.location.reload()}catch(e){console.error(e)}})()}),[]),A=(0,o.useCallback)((()=>{const e=(0,m.d8)(),t=new Blob([e],{type:"text/plain"}).stream(),r=h().createWriteStream("setting.txt");return t.pipeTo(r)}),[]),C=(0,o.useCallback)((async()=>{await n({title:"초기화 재확인",content:"모든 설정을 초기화하시겠습니까?"})&&((0,m.sy)(),window.location.reload())}),[n]);return(0,d.jsxs)(o.Fragment,{ref:t,children:[(0,d.jsx)(a.A,{variant:"subtitle1",children:b.default.name}),(0,d.jsx)(a.A,{variant:"subtitle2",children:"데이터 정리"}),(0,d.jsx)(l.A,{children:(0,d.jsx)(s.A,{disablePadding:!0,children:(0,d.jsx)(g.Qh,{header:(0,d.jsx)(c.A,{primary:"데이터 정리"}),onClick:f,children:(0,d.jsx)(p,{})})})}),(0,d.jsx)(a.A,{variant:"subtitle2",children:"설정 관리"}),(0,d.jsx)(l.A,{children:(0,d.jsxs)(s.A,{disablePadding:!0,children:[(0,d.jsxs)(g.Qh,{divider:!0,header:(0,d.jsx)(c.A,{primary:"설정 가져오기",secondary:"⚠ 페이지가 새로고침됩니다."}),onClick:y,children:[(0,d.jsx)(p,{}),(0,d.jsx)("input",{ref:r,type:"file",accept:"text/plain",onChange:w,style:{display:"none"}})]}),(0,d.jsx)(g.Qh,{divider:!0,header:(0,d.jsx)(c.A,{primary:"설정 내보내기"}),onClick:A,children:(0,d.jsx)(p,{})}),(0,d.jsx)(g.Qh,{divider:!0,header:(0,d.jsx)(c.A,{primary:"설정 초기화"}),onClick:C,children:(0,d.jsx)(p,{})})]})}),(0,d.jsx)(u,{})]})}));w.displayName=`ConfigMenuView(${b.default.id})`;const A=w,C={key:b.default.id,Icon:n.A,label:b.default.name,View:A}},6419:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"DataManagement",name:"데이터 관리",description:"스크립트 데이터를 내보내거나 가져옵니다."}},55094:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var i=r(96540),l=r(71468),s=r(14073),c=r(60538),u=r(49799),d=r(82241),p=r(73896);const f=(0,n.A)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}),"Help"),h=(0,n.A)((0,o.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");var m=r(98818),g=r(41695),v=r(73185),b=r(88174),y=r(24578),x=r(97936);const w=(0,i.forwardRef)(((e,t)=>{const r=(0,l.wA)(),[n,a]=(0,v.SC)(),{notiLevel:w}=(0,l.d4)((e=>e[b.default.id].storage)),A=(0,i.useCallback)((async e=>{if(e.target.value===x.Qh){let e;if(e=await n({title:"알림 설정 재확인",content:"업데이트 소식을 알리지 않는다고 선택하신게 맞습니까?",buttonList:[{label:"예",value:!0},{label:"아니오",value:!1,variant:"contained"}]}),!e)return;if(e=await n({title:"알림 설정 재재확인",content:"귀하가 새로운 기능을 마주했을 때 문의 게시판에 가기 전에\n 이것이 리프레셔 기능인지, 사이트에서 제공하는 기능인지\n 직접 구분 못함에 동의합니까?\n ",buttonList:[{label:"예",value:!1},{label:"아니오",value:!0,variant:"contained"}]}),!e)return;if(e=await n({title:"알림 설정 재재재확인",content:"앞선 재확인 절차의 문구를 잘 읽었음에 동의합니다.",buttonList:[{label:"홬인",value:!1},{label:"확인",value:!0},{label:"획인",value:!1},{label:"흭인",value:!1,variant:"contained"}]}),!e)return}r((0,y.$setNotiLevel)(e.target.value))}),[n,r]),C=(0,i.useCallback)((()=>{GM_openInTab("https://arca.live/b/namurefresher")}),[]),S=(0,i.useCallback)((()=>{GM_openInTab("https://github.com/lekakid/ArcaRefresher")}),[]),k=(0,i.useCallback)((()=>{GM_openInTab("https://github.com/sponsors/lekakid")}),[]),_=(0,i.useCallback)((()=>{GM_openInTab("https://www.buymeacoffee.com/kinglekakid")}),[]);return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(s.A,{variant:"subtitle1",children:b.default.name}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(g.Qh,{divider:!0,header:(0,o.jsx)(d.A,{primary:"버전"}),children:(0,o.jsx)(s.A,{children:GM_info.script.version})}),(0,o.jsxs)(g.FF,{primary:"업데이트 알림 수준",value:w,onChange:A,children:[(0,o.jsx)(p.A,{value:x.Qh,children:"알리지 않음"}),(0,o.jsx)(p.A,{value:x.Hk,children:"기능 업데이트 마다"}),(0,o.jsx)(p.A,{value:x.wn,children:"핫픽스 업데이트 마다"})]})]})}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"문의"}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(g.Qh,{divider:!0,header:(0,o.jsx)(d.A,{primary:"아카리프레셔 채널 (문의 접수)"}),onClick:C,children:(0,o.jsx)(f,{})}),(0,o.jsx)(g.Qh,{header:(0,o.jsx)(d.A,{primary:"Github"}),onClick:S,children:(0,o.jsx)(h,{})})]})}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"후원"}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(g.Qh,{divider:!0,header:(0,o.jsx)(d.A,{primary:"Github Sponsors"}),onClick:k,children:(0,o.jsx)(m.A,{})}),(0,o.jsx)(g.Qh,{divider:!0,header:(0,o.jsx)(d.A,{primary:"Buy Me a Coffee"}),onClick:_,children:(0,o.jsx)(m.A,{})})]})}),(0,o.jsx)(a,{})]})}));w.displayName=`ConfigMenuView(${b.default.id})`;const A=w,C={key:b.default.id,Icon:a,label:b.default.name,View:A}},76142:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(96540),o=r(71468),a=r(61224),i=r(69067),l=r(11641),s=r(33066),c=r(17809),u=r(8070),d=r(88174),p=r(24578),f=r(97936),h=r(74848);const m=1,g=-1,v=-2;function b(){const e=(0,o.wA)(),{checkedVersion:t,notiLevel:r}=(0,o.d4)((e=>e[d.default.id].storage)),[b,y]=(0,n.useState)(null),[x,w]=(0,n.useState)({open:!1,mode:0});(0,n.useEffect)((()=>{const e=new BroadcastChannel(`AR_${d.default.id}`);y(e)}),[]),(0,n.useEffect)((()=>{b&&(b.onmessage=({data:e})=>{"disable_storage"===e.msg&&((0,u.xV)(),w({open:!0,mode:v}))})}),[b,e]),(0,n.useEffect)((()=>{if(!b)return;const{type:n,diff:o}=(0,f.UD)(GM_info.script.version,t);o<0&&w({open:!0,mode:g}),o>0&&(n>=r?w({open:!0,mode:m}):e((0,p.$setCheckedVersion)(GM_info.script.version))),0!==o&&b.postMessage({msg:"disable_storage"})}),[b,t,r,e]);const A=(0,n.useCallback)((()=>{const t=(0,f.qg)(GM_info.script.version);t.patch="*",GM_openInTab(`https://arca.live/b/namurefresher?category=%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8&target=title&keyword=${(0,f.fj)(t)}`),w({open:!1,mode:0}),e((0,p.$setCheckedVersion)(GM_info.script.version))}),[e]),C=(0,n.useCallback)((()=>{e((0,p.$setCheckedVersion)(GM_info.script.version)),w({open:!1,mode:0})}),[e]),S=(0,n.useCallback)((()=>{window.location.reload()}),[]),k=(0,n.useCallback)((()=>{w({open:!1,mode:0}),e((0,p.$setCheckedVersion)(GM_info.script.version))}),[e]);let _,E="";switch(x.mode){case m:E="리프레셔가 업데이트 되었습니다.",_=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.A,{size:"small",variant:"text",color:"inherit",onClick:A,children:(0,h.jsx)(i.A,{sx:{fontWeight:"bold"},children:"업데이트 내역"})}),(0,h.jsx)(l.A,{size:"small",color:"inherit",onClick:k,children:(0,h.jsx)(c.A,{})})]});break;case g:E="리프레셔를 다운그레이드 하셨나요?",_=(0,h.jsx)(a.A,{size:"small",variant:"text",color:"inherit",onClick:C,children:(0,h.jsx)(i.A,{sx:{fontWeight:"bold"},children:"예"})});break;case v:E="이 탭의 스크립트 버전이 맞지 않습니다.\n 이 탭에서 변경한 설정, 메모 등이 저장되지 않습니다.",_=(0,h.jsx)(a.A,{size:"small",variant:"text",color:"inherit",onClick:S,children:(0,h.jsx)(i.A,{sx:{fontWeight:"bold"},children:"새로고침"})})}return(0,h.jsx)(s.A,{anchorOrigin:{horizontal:"center",vertical:"bottom"},open:x.open,message:E,ClickAwayListenerProps:{mouseEvent:!1},action:_})}},88174:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"VersionInfo",name:"버전 정보",description:"리프레셔 공지사항과 스크립트 정보를 겸합니다."}},97936:(e,t,r)=>{"use strict";r.d(t,{Hk:()=>o,Qh:()=>i,UD:()=>c,fj:()=>s,qg:()=>l,wn:()=>a});const n=2,o=1,a=0,i=99;function l(e){const t=e.split(".");return{major:Number(t[0]),minor:Number(t[1]),patch:Number(t[2])}}function s({major:e,minor:t,patch:r}){return`${e}.${t}.${r}`}function c(e,t){const r=l(e),i=l(t);return r.major!==i.major?{type:n,diff:r.major-i.major}:r.minor!==i.minor?{type:o,diff:r.minor-i.minor}:{type:a,diff:r.patch-i.patch}}},24578:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setCheckedVersion:()=>u,$setNotiLevel:()=>d,default:()=>p,slice:()=>c});var n=r(43816),o=r(8070),a=r(97936),i=r(88174);const l={checkedVersion:"",notiLevel:a.Hk},s={storage:(0,o._W)(i.default.id,l)},c=(0,n.Z0)({name:i.default.id,initialState:s,reducers:{$setCheckedVersion(e,t){e.storage.checkedVersion=t.payload},$setNotiLevel(e,t){e.storage.notiLevel=t.payload}}}),{$setCheckedVersion:u,$setNotiLevel:d}=c.actions,p=c.reducer},16460:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(65997),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(41695),u=r(32176),d=r(8392),p=r(74848);const f=(0,o.forwardRef)(((e,t)=>{const{enabled:r}=(0,a.d4)((e=>e[u.default.id].storage));return(0,p.jsxs)(o.Fragment,{ref:t,children:[(0,p.jsx)(i.A,{variant:"subtitle1",children:u.default.name}),(0,p.jsx)(l.A,{children:(0,p.jsx)(s.A,{disablePadding:!0,children:(0,p.jsx)(c.p9,{primary:"사용",secondary:"구독 채널 목록을 그룹화 할 수 있습니다.",value:r,action:d.$toggleEnabled})})})]})}));f.displayName=`ConfigMenuView(${u.default.id})`;const h=f,m={key:u.default.id,Icon:n.A,label:u.default.name,View:h}},61540:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Ee});var n=r(96540),o=r(5556),a=r.n(o),i=r(71468),l=r(44635),s=r(37211),c=r(57873),u=r(82241),d=r(52848),p=r(49799),f=r(98587),h=r(58168),m=r(34164),g=r(64111),v=r(28466),b=r(11848),y=r(3541),x=r(68851),w=r(96852),A=r(14073),C=r(27553),S=r(17245);function k(e){return(0,S.Ay)("MuiLink",e)}const _=(0,C.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var E=r(86481),j=r(771);const R={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},M=({theme:e,ownerState:t})=>{const r=(e=>R[e]||e)(t.color),n=(0,E.Yn)(e,`palette.${r}`,!1)||t.color,o=(0,E.Yn)(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,j.X4)(n,.4)};var P=r(74848);const O=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],I=(0,b.Ay)(A.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${(0,v.A)(r.underline)}`],"button"===r.component&&t.button]}})((({theme:e,ownerState:t})=>(0,h.A)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,h.A)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:M({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{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"},[`&.${_.focusVisible}`]:{outline:"auto"}}))),T=n.forwardRef((function(e,t){const r=(0,y.A)({props:e,name:"MuiLink"}),{className:o,color:a="primary",component:i="a",onBlur:l,onFocus:s,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,b=(0,f.A)(r,O),{isFocusVisibleRef:A,onBlur:C,onFocus:S,ref:_}=(0,x.A)(),[E,j]=n.useState(!1),M=(0,w.A)(t,_),T=(0,h.A)({},r,{color:a,component:i,focusVisible:E,underline:u,variant:d}),$=(e=>{const{classes:t,component:r,focusVisible:n,underline:o}=e,a={root:["root",`underline${(0,v.A)(o)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,g.A)(a,k,t)})(T);return(0,P.jsx)(I,(0,h.A)({color:a,className:(0,m.A)($.root,o),classes:c,component:i,onBlur:e=>{C(e),!1===A.current&&j(!1),l&&l(e)},onFocus:e=>{S(e),!0===A.current&&j(!0),s&&s(e)},ref:M,ownerState:T,variant:d,sx:[...Object.keys(R).includes(a)?[]:[{color:a}],...Array.isArray(p)?p:[p]]},b))})),$=T;var L=r(71543),z=r(63493),F=r(51749),D=r(65997),N=r(21601),B=r(36742),H=r(78383),V=r(50936),W=r(47839),U=r(61224),q=r(58031),G=r(46831),K=r(11641),X=r(22477),Z=r(60538),Y=r(44448),Q=r(72205),J=r(42471),ee=r(82022),te=r(94405),re=r(73896),ne=r(15327),oe=r(72730),ae=r(2071),ie=r(22529),le=r(55764),se=r(17809),ce=r(99682),ue=r(75003);const de=(0,ue.A)((0,P.jsx)("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z"}),"Input");var pe=r(67110);const fe=(0,ue.A)((0,P.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"}),"CreateNewFolder"),he=(0,ue.A)((0,P.jsx)("path",{d:"M22 8v10c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2l.01-12c0-1.1.89-2 1.99-2h6l2 2h8c1.1 0 2 .9 2 2m-5.5 2V9h-2v1H12v1.5h1v4c0 .83.67 1.5 1.5 1.5h2c.83 0 1.5-.67 1.5-1.5v-4h1V10zm0 5.5h-2v-4h2z"}),"FolderDelete"),me=(0,ue.A)((0,P.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-6 12v-3h-4v-4h4V8l5 5z"}),"DriveFileMove");var ge=r(73185),ve=r(8392),be=r(32176);const ye={memo:"",groups:[],best:!1};function xe({id:e,value:t}){const r=(0,i.wA)(),{channelInfoTable:o}=(0,i.d4)((e=>e[be.default.id].storage)),[a,c]=(0,n.useState)(!1),d=(0,n.useCallback)((()=>{const t={...ye,...o[e],best:!o[e]?.best};r((0,ve.$setChannelInfo)({id:e,info:t}))}),[e,o,r]),f=(0,n.useCallback)((t=>{if(!/^[0-9]*$/.test(t.target.value))return void t.preventDefault();const n={...ye,...o[e],cut:parseInt(t.target.value,10)};r((0,ve.$setChannelInfo)({id:e,info:n}))}),[e,o,r]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(V.A,{sx:{width:"100%"},direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(A.A,{variant:"body2",children:t}),(0,P.jsx)(W.A,{title:"상세 편집",children:(0,P.jsx)(U.A,{sx:{minWidth:40,px:"3px"},size:"small",onClick:()=>c(!0),children:(0,P.jsx)(le.A,{})})})]}),(0,P.jsxs)(q.A,{open:a,onClose:()=>c(!1),children:[(0,P.jsxs)(G.A,{children:[t," 설정"]}),(0,P.jsx)(K.A,{size:"large",sx:{position:"absolute",top:8,right:8},onClick:()=>c(!1),children:(0,P.jsx)(se.A,{})}),(0,P.jsx)(X.A,{children:(0,P.jsx)(Z.A,{variant:"outlined",children:(0,P.jsxs)(p.A,{disablePadding:!0,children:[(0,P.jsx)(l.Ay,{divider:!0,disablePadding:!0,children:(0,P.jsxs)(s.A,{onClick:d,children:[(0,P.jsx)(u.A,{primary:"개념글 페이지로"}),(0,P.jsx)(Y.A,{children:(0,P.jsx)(Q.A,{checked:o[e]?.best||!1,onClick:d})})]})}),(0,P.jsx)(l.Ay,{children:(0,P.jsx)(J.A,{sx:{my:1},label:"추천 컷",onChange:f,value:o[e]?.cut||0})})]})})})]})]})}function we({id:e,value:t}){const r=(0,i.wA)(),{groupList:o,channelInfoTable:a}=(0,i.d4)((e=>e[be.default.id].storage)),[l,s]=(0,n.useState)(!1),c=t=>()=>{const n={...ye,...a[e]};n.groups=[...n.groups,t].sort(),r((0,ve.$setChannelInfo)({id:e,info:n})),s(void 0)},u=t=>()=>{const n={...ye,...a[e]};n.groups=n.groups.filter((e=>e!==t)),r((0,ve.$setChannelInfo)({id:e,info:n}))},d=o.filter((e=>!t?.includes(e)));return(0,P.jsxs)(V.A,{sx:{width:"100%"},direction:"row",gap:1,children:[t?.map((e=>(0,P.jsx)(ee.A,{label:e,onDelete:u(e)},e))),d.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(K.A,{size:"small",onClick:e=>s(e.target),children:(0,P.jsx)(ce.A,{})}),(0,P.jsx)(te.A,{anchorEl:l,open:!!l,onClose:()=>{s(void 0)},children:d.map((e=>(0,P.jsx)(re.A,{onClick:c(e),children:e},e)))})]})]})}xe.propTypes={id:a().string,value:a().string},we.propTypes={id:a().string,value:a().array};const Ae=[{field:"channel",headerName:"채널",flex:1,minWidth:200,renderCell:xe},{field:"memo",headerName:"메모",flex:1,minWidth:200,editable:!0},{field:"groups",headerName:"그룹",flex:2,minWidth:400,renderCell:we}];function Ce({subs:e,open:t,onClose:r}){const o=(0,i.wA)(),a=(0,ne.A)((e=>e.breakpoints.down("lg"))),[l,s]=(0,ge.SC)(),{groupList:c,channelInfoTable:u}=(0,i.d4)((e=>e[be.default.id].storage)),d=(0,n.useRef)(void 0),[p,f]=(0,n.useState)(""),[h,m]=(0,n.useState)([]),g=e?.map((({id:e,label:t})=>({id:e,channel:t,memo:u[e]?.memo,groups:u[e]?.groups})))||[],v=(0,n.useCallback)((async()=>{const e=await l({title:"이름 입력",content:(0,P.jsx)(J.A,{inputRef:d}),buttonList:[{label:"확인",value:()=>d.current.value,key:"Enter"},{label:"취소",value:!1,key:"Escape",variant:"contained"}]});e&&o((0,ve.$addGroup)({name:e}))}),[l,o,d]),b=(0,n.useCallback)((async()=>{await l({title:"삭제",content:"정말 삭제하시겠습니까?"})&&(f(""),o((0,ve.$removeGroup)({name:p})))}),[o,l,p]),y=(0,n.useCallback)((async()=>{const e=await l({title:"이름 입력",content:(0,P.jsx)(J.A,{inputRef:d,defaultValue:p}),buttonList:[{label:"확인",value:()=>d.current.value,key:"Enter"},{label:"취소",value:!1,key:"Escape",variant:"contained"}]});e&&p!==e&&(o((0,ve.$renameGroup)({prev:p,next:e})),f(e))}),[p,d,l,o]),x=(0,n.useCallback)((()=>{h.forEach((e=>{if(u[e]?.groups?.includes(p))return;const t={...ye,...u[e]};t.groups=[...t.groups,p].sort(),o((0,ve.$setChannelInfo)({id:e,info:t}))})),m([])}),[h,u,p,o]),w=(0,n.useCallback)((()=>{h.forEach((e=>{const t={...ye,...u[e]};t.groups=[],o((0,ve.$setChannelInfo)({id:e,info:t}))})),m([])}),[h,u,o]),A=(0,n.useCallback)((({field:e,id:t,value:r})=>{const n={...ye,...u[t],[e]:r};o((0,ve.$setChannelInfo)({id:t,info:n}))}),[u,o]),C=(0,P.jsxs)(oe.A,{fullWidth:a,children:[(0,P.jsx)(U.A,{startIcon:(0,P.jsx)(de,{}),disabled:!(h.length>0&&p),onClick:x,children:"그룹에 추가"}),(0,P.jsx)(U.A,{startIcon:(0,P.jsx)(pe.A,{}),disabled:!(h.length>0),onClick:w,children:"모든 그룹 삭제"})]});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(q.A,{fullWidth:!0,maxWidth:"md",open:t,onClose:r,children:[(0,P.jsx)(G.A,{children:"구독 그룹 편집"}),(0,P.jsx)(K.A,{size:"large",sx:{position:"absolute",top:8,right:8},onClick:r,children:(0,P.jsx)(se.A,{})}),(0,P.jsxs)(X.A,{children:[(0,P.jsxs)(V.A,{sx:{marginBottom:1},direction:a?"column":"row",gap:1,children:[(0,P.jsxs)(ae.A,{displayEmpty:!0,sx:{width:a?"100%":200,color:""===p?"grey":void 0},value:p,onChange:e=>f(e.target.value),children:[(0,P.jsx)(re.A,{sx:{color:"grey"},value:"",children:"그룹 선택"}),c.map((e=>(0,P.jsx)(re.A,{value:e,children:e},e)))]}),(0,P.jsxs)(V.A,{sx:{width:"100%"},direction:a?"column":"row",justifyContent:"space-between",gap:2,children:[(0,P.jsxs)(oe.A,{fullWidth:a,children:[(0,P.jsx)(U.A,{startIcon:(0,P.jsx)(fe,{}),onClick:v,children:"추가"}),(0,P.jsx)(U.A,{startIcon:(0,P.jsx)(he,{}),disabled:!p,onClick:b,children:"제거"}),(0,P.jsx)(U.A,{startIcon:(0,P.jsx)(me,{}),disabled:!p,onClick:y,children:"이름 편집"})]}),C]})]}),(0,P.jsx)(ie.z,{autoHeight:!0,disableColumnMenu:!0,disableSelectionOnClick:!0,checkboxSelection:!0,selectionModel:h,onSelectionModelChange:e=>m(e),rowsPerPageOptions:[10],pageSize:10,columns:Ae,rows:g,onCellEditCommit:A})]})]}),(0,P.jsx)(s,{})]})}Ce.propTypes={subs:a().array,open:a().bool,onClose:a().func};const Se=Ce;function ke({group:e,children:t}){const[r,o]=(0,n.useState)(!1);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(l.Ay,{dense:!0,disablePadding:!0,children:(0,P.jsxs)(s.A,{onClick:()=>o((e=>!e)),children:[(0,P.jsx)(c.A,{children:(0,P.jsx)(D.A,{})}),(0,P.jsx)(u.A,{disableTypography:!0,primary:e})]})}),(0,P.jsx)(d.A,{in:r,children:(0,P.jsx)(p.A,{disablePadding:!0,children:t})})]})}function _e({id:e,label:t,info:r}){const n={};return r?.best&&(n.mode="best"),r?.cut>0&&(n.cut=r.cut),(0,P.jsx)(l.Ay,{dense:!0,disablePadding:!0,children:(0,P.jsx)(s.A,{component:$,href:`/b/${e}${(0,H._b)(n)}`,children:(0,P.jsx)(u.A,{disableTypography:!0,primary:`${t}${r?.memo?` - ${r.memo}`:""}`})})})}function Ee(){const e=(0,i.wA)(),t=(0,B.f)(N.NM),{enabled:r,groupList:o,channelInfoTable:a}=(0,i.d4)((e=>e[be.default.id].storage)),{navChannelInfo:c}=(0,i.d4)((e=>e[be.default.id])),[d,f]=(0,n.useState)(),h=(0,n.useRef)(void 0),[m,g]=(0,n.useState)({subs:!1,main:!1,editor:!1});(0,n.useEffect)((()=>{if(!t)return;if(!r)return;const n=document.querySelector("nav .nav"),o=n.firstElementChild;o.style.display="none";const a=[...o.querySelectorAll('a.dropdown-item:not([href="/b/my"]):not([href="#"])')].map((e=>({label:e.firstElementChild.textContent,id:e.pathname.split("/").pop()})));e((0,ve.setNavChannelInfo)({subs:a}));const i=document.createElement("li");i.classList.add("nav-item","dropdown");const l=document.createElement("li");return l.classList.add("nav-item","dropdown"),n.insertAdjacentElement("afterbegin",i),n.insertAdjacentElement("afterbegin",l),f({subs:l,main:i}),()=>{o.style.removeProperty("display"),l.remove(),i.remove(),f(void 0)}}),[t,r,e]);const v=(0,n.useCallback)((e=>{e.preventDefault(),g((e=>({...e,subs:!0})))}),[]),b=(0,n.useCallback)((()=>{g((e=>({...e,subs:!1})))}),[]);if(!r)return null;let y;o.length>0&&(y=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L.A,{}),(0,P.jsx)(p.A,{children:o.map((e=>{const t=c.subs.filter((({id:t})=>a[t]?.groups.includes(e)));return(0,P.jsxs)(ke,{group:e,children:[0===t.length&&(0,P.jsx)(l.Ay,{dense:!0,children:"이 그룹은 비어있습니다."}),t.map((({label:e,id:t})=>(0,P.jsx)(_e,{id:t,label:e,info:a[t]},t)))]},e)}))})]}));const x=c.subs.filter((({id:e})=>!(a[e]?.groups.length>0)));let w;return x.length>0?w=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L.A,{}),(0,P.jsxs)(p.A,{children:[x.map((({label:e,id:t})=>(0,P.jsx)(_e,{id:t,label:e,memo:a[t]?.memo||"",best:a[t]?.best},t)))," "]})]}):0===o.length&&(w=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L.A,{}),(0,P.jsx)(p.A,{children:(0,P.jsx)(l.Ay,{children:"구독 채널이 없습니다."})})]})),(0,P.jsxs)(P.Fragment,{children:[d?.subs&&(0,P.jsxs)(z.Z,{container:d.subs,children:[(0,P.jsxs)("a",{ref:h,"aria-expanded":"false",className:"nav-link dropdown-toggle",href:"#",onClick:v,children:["구독",(0,P.jsx)("span",{className:"d-none d-md-inline",children:" "}),(0,P.jsx)("span",{className:"d-none d-md-inline",children:"채널"}),"\n"]}),(0,P.jsxs)(F.Ay,{anchorEl:h.current,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{horizontal:"center",vertical:"top"},transitionDuration:150,disableScrollLock:!0,open:m.subs,onClose:b,children:[(0,P.jsxs)(p.A,{children:[(0,P.jsx)(l.Ay,{dense:!0,disablePadding:!0,children:(0,P.jsx)(s.A,{onClick:()=>g((e=>({...e,subs:!1,editor:!0}))),children:(0,P.jsx)(u.A,{disableTypography:!0,primary:"그룹 편집"})})}),(0,P.jsx)(l.Ay,{dense:!0,disablePadding:!0,children:(0,P.jsx)(s.A,{component:$,href:"/b/my",children:(0,P.jsx)(u.A,{disableTypography:!0,primary:"구독 중인 채널"})})})]}),y,w]})]}),(0,P.jsx)(Se,{subs:c.subs,open:m.editor,onClose:()=>g((e=>({...e,editor:!1})))})]})}ke.propTypes={group:a().string,children:a().node},_e.propTypes={id:a().string,label:a().string,info:a().object}},32176:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ChannelManager",name:"구독 채널 매니저",description:"채널 목록을 관리합니다."}},8392:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$addGroup:()=>c,$removeGroup:()=>d,$renameGroup:()=>u,$setChannelInfo:()=>p,$toggleEnabled:()=>s,default:()=>h,setNavChannelInfo:()=>f,slice:()=>l});var n=r(43816),o=r(8070),a=r(32176);const i={storage:(0,o._W)(a.default.id,{enabled:!1,groupList:[],channelInfoTable:{}}),navChannelInfo:{subs:[],main:[]}},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleEnabled(e){e.storage.enabled=!e.storage.enabled},$addGroup(e,t){const{name:r}=t.payload;e.storage.groupList.includes(r)||(e.storage.groupList.push(r),e.storage.groupList=e.storage.groupList.sort())},$renameGroup(e,t){const{prev:r,next:n}=t.payload,o=e.storage.groupList.indexOf(r);-1!==o&&(e.storage.groupList.includes(n)?e.storage.groupList.splice(o,1):e.storage.groupList.splice(o,1,n),e.storage.channelInfoTable=Object.fromEntries(Object.entries(e.storage.channelInfoTable).map((([e,t])=>{const o=t.groups.indexOf(r);return-1===o||(t.groups.includes(n)?t.groups.splice(o,1):t.groups.splice(o,1,n)),[e,t]}))))},$removeGroup(e,t){const{name:r}=t.payload;e.storage.groupList=e.storage.groupList.filter((e=>e!==r)),e.storage.channelInfoTable=Object.fromEntries(Object.entries(e.storage.channelInfoTable).map((([e,t])=>{const n=t.groups.filter((e=>e!==r));return[e,{...t,groups:n}]})))},$setChannelInfo(e,t){const{id:r,info:n}=t.payload;e.storage.channelInfoTable[r]=n},setNavChannelInfo(e,t){e.navChannelInfo=t.payload}}}),{$toggleEnabled:s,$addGroup:c,$renameGroup:u,$removeGroup:d,$setChannelInfo:p,setNavChannelInfo:f}=l.actions,h=l.reducer},640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={Icon:r(9547).A,label:"사이트",order:0}},5554:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(53540),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(73896),u=r(52848),d=r(44635),p=r(82241),f=r(69067),h=r(8239),m=r(41695),g=r(50060),v=r(67529),b=r(21737),y=r(22240),x=r(5556),w=r.n(x),A=r(71543),C=r(47839),S=r(11641),k=r(75003),_=r(74848);const E=(0,k.A)((0,_.jsx)("path",{d:"M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2m-3 6.42 3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4z"}),"BrokenImage");var j=r(42828);const R=(0,k.A)((0,_.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),M=(0,k.A)((0,_.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),P={mutePreview:!1,muteArticle:!1};function O({divider:e,id:t,label:r,initValue:n,onChange:a}){const[i,l]=(0,o.useState)({...P,...n}),s=(0,o.useCallback)((e=>()=>{const r={...i,[e]:!i[e]};l(r),a(t,r)}),[i,a,t]),{mutePreview:c,muteArticle:u}=i;return(0,_.jsxs)(_.Fragment,{children:[e&&(0,_.jsx)(h.Ay,{item:!0,xs:12,children:(0,_.jsx)(A.A,{})}),(0,_.jsx)(h.Ay,{item:!0,xs:6,children:(0,_.jsx)(f.A,{sx:{display:"flex",height:"100%",minHeight:"48px",width:"100%",alignItems:"center"},children:(0,_.jsx)("span",{className:"badge badge-success",style:{margin:"0.25rem"},children:r})})}),(0,_.jsx)(h.Ay,{item:!0,xs:6,children:(0,_.jsxs)(f.A,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:[(0,_.jsx)(C.A,{title:"미리보기 뮤트",children:(0,_.jsx)(S.A,{onClick:s("mutePreview"),size:"large",children:c?(0,_.jsx)(E,{}):(0,_.jsx)(j.A,{})})}),(0,_.jsx)(C.A,{title:"게시물 뮤트",children:(0,_.jsx)(S.A,{onClick:s("muteArticle"),size:"large",children:u?(0,_.jsx)(R,{}):(0,_.jsx)(M,{})})})]})})]})}O.propTypes={divider:w().bool,id:w().string,label:w().string,initValue:w().object,onChange:w().func};const I=(0,o.memo)(O),T=[{field:"name",headerName:"이름",flex:1}],$=(0,o.forwardRef)(((e,t)=>{const r=(0,a.wA)(),{channel:n,category:x}=(0,g.HZ)(),{contextRange:w,boardBarPos:A,hideCountBar:C,hideMutedMark:S,muteIncludeReply:k,hideServiceNotice:E,hideNoPermission:j,hideClosedDeal:R,user:M,keyword:P,channel:O,muteAllEmot:$,category:{[n.id]:L}}=(0,a.d4)((e=>e[v.default.id].storage)),z=(0,a.d4)(y.A),F=(0,o.useCallback)((e=>{const t=e.split("\n").filter((e=>e));return RegExp(t.join("|")),t}),[]),D=(0,o.useCallback)((e=>{const t=e.map((({id:e,name:t,bundle:r,url:n})=>[e,{name:t,bundle:r,url:n}]));r((0,b.$setEmoticonList)(Object.fromEntries(t)))}),[r]),N=(0,o.useCallback)(((e,t)=>{r((0,b.$setCategoryConfig)({channel:n.id,category:e,config:t}))}),[n,r]);return(0,_.jsxs)(o.Fragment,{ref:t,children:[(0,_.jsx)(i.A,{variant:"subtitle1",children:v.default.name}),(0,_.jsx)(l.A,{children:(0,_.jsx)(s.A,{disablePadding:!0,children:(0,_.jsxs)(m.FF,{primary:"우클릭 메뉴 호출 범위",value:w,action:b.$setContextRange,children:[(0,_.jsx)(c.A,{value:"articleItem",children:"게시글"}),(0,_.jsx)(c.A,{value:"nickname",children:"닉네임"})]})})}),(0,_.jsx)(i.A,{variant:"subtitle2",children:"모양 설정"}),(0,_.jsx)(l.A,{children:(0,_.jsxs)(s.A,{disablePadding:!0,children:[(0,_.jsx)(m.p9,{divider:!0,primary:"[공통] 뮤트 카운트 바 숨김",secondary:"뮤트된 게시물이 몇개인지 표시되는 바를 제거합니다.",value:C,action:b.$toggleCountBar}),(0,_.jsx)(m.p9,{divider:!0,primary:"[공통] 뮤트 표시 숨김",secondary:"댓글, 알림의 뮤트 처리 표시를 숨깁니다.",value:S,action:b.$toggleMutedMark}),(0,_.jsxs)(m.FF,{divider:!0,primary:"[게시판] 뮤트 카운트 바 위치",value:A,action:b.$setBoardBarPos,children:[(0,_.jsx)(c.A,{value:"afterbegin",children:"게시판 위"}),(0,_.jsx)(c.A,{value:"afterend",children:"게시판 아래"})]}),(0,_.jsx)(m.p9,{primary:"[댓글] 답글도 같이 뮤트",value:k,action:b.$toggleIncludeReply})]})}),(0,_.jsx)(i.A,{variant:"subtitle2",children:"특정 컨텐츠"}),(0,_.jsx)(l.A,{children:(0,_.jsxs)(s.A,{disablePadding:!0,children:[(0,_.jsx)(m.p9,{divider:!0,primary:"[모든 채널] 서비스 공지사항 숨김",value:E,action:b.$toggleHideNoticeService}),(0,_.jsx)(m.p9,{divider:!0,primary:"[모든 채널] 운영 관련(권한 없음) 숨김",value:j,action:b.$toggleHideNoPermission}),(0,_.jsx)(m.p9,{primary:"[핫딜 채널] 식은딜 숨김",value:R,action:b.$toggleHideClosedDeal})]})}),(0,_.jsx)(i.A,{variant:"subtitle2",children:"뮤트 조건"}),(0,_.jsx)(l.A,{children:(0,_.jsxs)(s.A,{disablePadding:!0,children:[(0,_.jsx)(m.YG,{divider:!0,primary:"검사할 닉네임",multiline:!0,manualSave:!0,value:M.join("\n"),errorText:"정규식 조건을 위반하는 항목이 있습니다.",action:b.$setUser,saveFormat:F}),(0,_.jsx)(m.YG,{divider:!0,primary:"검사할 키워드",multiline:!0,manualSave:!0,value:P.join("\n"),errorText:"정규식 조건을 위반하는 항목이 있습니다.",action:b.$setKeyword,saveFormat:F}),(0,_.jsx)(m.YG,{divider:!0,primary:"검사할 채널",secondary:"모든 채널을 대상으로 하는 게시판(베스트 라이브 등)에서 동작합니다.",multiline:!0,manualSave:!0,value:O.join("\n"),errorText:"정규식 조건을 위반하는 항목이 있습니다.",action:b.$setChannel,saveFormat:F}),(0,_.jsx)(m.p9,{divider:!0,primary:"모든 아카콘 뮤트",value:$,action:b.$toggleMuteAllEmot}),(0,_.jsx)(u.A,{in:!$,children:(0,_.jsx)(m.r6,{divider:!0,primary:"뮤트한 아카콘",columns:T,rows:z,noRowsText:"뮤트된 아카콘이 없습니다.",onChange:D})}),(0,_.jsx)(d.Ay,{children:(0,_.jsx)(p.A,{children:"카테고리 설정"})}),(0,_.jsx)(d.Ay,{children:(0,_.jsx)(f.A,{sx:{width:"100%"},children:(0,_.jsx)(l.A,{variant:"outlined",children:(0,_.jsx)(h.Ay,{container:!0,children:x?.id2NameMap?Object.entries(x.id2NameMap).map((([e,t],r)=>(0,_.jsx)(I,{divider:0!==r,id:e,label:t,initValue:L?.[e],onChange:N},e))):(0,_.jsx)(h.Ay,{item:!0,xs:12,children:(0,_.jsx)(i.A,{align:"center",children:"카테고리를 확인할 수 없습니다."})})})})})})]})})]})}));$.displayName=`ConfigMenuView(${v.default.id})`;const L=$,z={key:v.default.id,Icon:n.A,label:v.default.name,View:L}},78687:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(53540),p=r(75003),f=r(74848);const h=(0,p.A)((0,f.jsx)("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo");var m=r(21601),g=r(89930),v=r(46117),b=r(49802),y=r(78383),x=r(50060),w=r(89923),A=r(21737),C=r(67529);function S({target:e,closeMenu:t}){const r=(0,o.wA)(),{channel:a}=(0,x.HZ)(),{contextRange:i,user:p,category:{[a.id]:S}}=(0,o.d4)((e=>e[C.default.id].storage));let k;switch(i){case"articleItem":k=`${m.Kh}, ${m.nc}, ${m.jM}`;break;case"nickname":k=`${m.nc}, ${m.jM}`;break;default:console.warn("[Mute] contextRange 값이 올바르지 않음"),k=`${m.nc}, ${m.jM}`}const _=(0,v.X)(),E='[class$="emoticon"], .emoticon-wrapper > span, .article-body a.muted',j=".board-category .item a",R=(0,g.E)({key:C.default.id,selector:`${k}, ${E}, ${j}`,dataExtractor:()=>{if(e){if(e.matches(k)){let t=e;if(e.matches(".vrow")&&(t=e.querySelector("span.user-info")),!t)return;const r=new b.p(t).toUID();return{type:"user",uid:r,regex:`${r.replace(".","\\.")}$`}}if(e.matches(E)){let t=e,r=!1;return e.matches("span.muted")&&(t=e.parentElement.querySelector(".emoticon"),r=!0),e.matches("a.muted")&&(t=e.querySelector('[class$="emoticon"]'),r=!0),{type:"emoticon",muted:r,bundleId:t.dataset.storeId,emotId:parseInt(t.dataset.id,10),url:(0,w.pk)(t.src)}}if(e.matches(j)){const t=decodeURI((0,y.$Z)(e.search).category||"글머리없음");return{type:"category",id:t,label:"글머리없음"!==t?e.textContent.trim():"글머리없음"}}}}},[e]),M=(0,n.useCallback)((()=>{(async()=>{try{let{bundleId:e}=R;const{emotId:t,url:n}=R;e||(e=await(0,w.w4)(t));const o=await(0,w.kx)(e),{idList:a,urlList:i}=await(0,w.v8)(e);0===a.length?r((0,A.$addEmoticon)({id:e,emoticon:{name:o,bundle:[parseInt(t,10)],url:[(0,w.pk)(n)]}})):r((0,A.$addEmoticon)({id:e,emoticon:{name:o,bundle:a,url:i}}))}catch(e){_({msg:`${e.message}\n개발자 도구(F12)의 콘솔(Console)창 캡쳐와 함께 문의바랍니다.`,time:3e3}),console.error(e)}t()})()}),[t,R,r,_]),P=(0,n.useCallback)((()=>{(async()=>{try{let{bundleId:e,emotId:t}=R;const{url:n}=R;if(e||(e=await(0,w.w4)(t)),!t){const r=await(0,w.v8)(e),o=r.urlList.indexOf(n);t=r.idList[o]}const o=await(0,w.kx)(e);r((0,A.$addEmoticon)({id:e,emoticon:{name:o,bundle:[t||-1],url:[n]}}))}catch(e){_({msg:`${e.message}\n개발자 도구(F12)의 콘솔(Console)창 캡쳐와 함께 문의바랍니다.`,time:3e3}),console.error(e)}t()})()}),[t,R,r,_]),O=(0,n.useCallback)((()=>{(async()=>{try{let{bundleId:e}=R;const{emotId:t}=R;e||(e=await(0,w.w4)(t)),r((0,A.$removeEmoticon)({id:e}))}catch(e){_({msg:`${e.message}\n개발자 도구(F12)의 콘솔(Console)창 캡쳐와 함께 문의바랍니다.`,time:3e3}),console.error(e)}t()})()}),[t,R,r,_]),I=(0,n.useCallback)((()=>{(async()=>{try{let{bundleId:e}=R;const{emotId:t,url:n}=R;e||(e=await(0,w.w4)(t)),r((0,A.$removeEmoticon)({id:e,emotId:t,url:n}))}catch(e){_({msg:`${e.message}\n개발자 도구(F12)의 콘솔(Console)창 캡쳐와 함께 문의바랍니다.`,time:3e3}),console.error(e)}t()})()}),[t,R,r,_]),T=(0,n.useCallback)((()=>{const{regex:e}=R,n=p.includes(e);r(n?(0,A.$removeUser)(e):(0,A.$addUser)(e)),t()}),[R,p,r,t]),$=(0,n.useCallback)((e=>()=>{const n=S[R.id];r((0,A.$setCategoryConfig)({channel:a.id,category:R.id,config:{...n,[e]:!n?.[e]}})),t()}),[R,S,a,r,t]);if("emoticon"===R?.type)return(0,f.jsxs)(f.Fragment,{children:[!R.muted&&(0,f.jsxs)(l.A,{children:[(0,f.jsxs)(s.A,{onClick:M,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:"아카콘 묶음 뮤트"})]}),(0,f.jsxs)(s.A,{onClick:P,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:"이 아카콘만 뮤트"})]})]}),R.muted&&(0,f.jsxs)(l.A,{children:[(0,f.jsxs)(s.A,{onClick:O,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:"아카콘 묶음 뮤트 해제"})]}),(0,f.jsxs)(s.A,{onClick:I,children:[(0,f.jsx)(c.A,{children:(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:"이 아카콘만 뮤트 해제"})]})]})]});if("user"===R?.type){const e=p.includes(R.regex);return(0,f.jsx)(l.A,{children:(0,f.jsxs)(s.A,{onClick:T,children:[(0,f.jsx)(c.A,{children:e?(0,f.jsx)(h,{}):(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:e?"사용자 뮤트 해제":"사용자 뮤트"})]})})}if("category"===R?.type){const e=S[R.id];return(0,f.jsxs)(l.A,{children:[(0,f.jsx)(s.A,{sx:{opacity:"1 !important"},dense:!0,disabled:!0,children:R.label}),(0,f.jsxs)(s.A,{onClick:$("mutePreview"),children:[(0,f.jsx)(c.A,{children:e?.mutePreview?(0,f.jsx)(h,{}):(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:e?.mutePreview?"미리보기 뮤트 해제":"미리보기 뮤트"})]}),(0,f.jsxs)(s.A,{onClick:$("muteArticle"),children:[(0,f.jsx)(c.A,{children:e?.muteArticle?(0,f.jsx)(h,{}):(0,f.jsx)(d.A,{})}),(0,f.jsx)(u.A,{children:e?.muteArticle?"게시물 뮤트 해제":"게시물 뮤트"})]})]})}return null}S.propTypes={target:i().object,closeMenu:i().func};const k=S,_={key:C.default.id,View:k,order:202}},97020:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var n=r(96540),o=r(71468),a=r(21601),i=r(36742),l=r(22240);const s=function(){const e=(0,i.f)(a.NM),t=(0,o.d4)(l.K),[r,s]=(0,n.useState)(null);return(0,n.useEffect)((()=>{e&&s(document.querySelector(a.RH))}),[e]),(0,n.useEffect)((()=>{if(!r)return;if(!(t.channel?.length>0))return;const e=()=>{const e=[...r.querySelectorAll("li.nav-item.dropdown a.dropdown-item")],n=new RegExp(t.channel.join("|"));e.forEach((e=>{n.test(e.textContent.replace(" 채널",""))&&(e.style.display="none")}))},n=()=>{[...r.querySelectorAll("li.nav-item.dropdown a.dropdown-item")].forEach((e=>{e.style.removeProperty("display")}))};return"complete"!==document.readyState?(window.addEventListener("load",e),()=>{window.removeEventListener("load",e),n()}):(e(),()=>n())}),[r,t.channel]),null};var c=r(59839),u=r(92020),d=r(50060),p=r(49802),f=r(78321),h=r(40961),m=r(5556),g=r.n(m),v=r(8239),b=r(14073),y=r(82022),x=r(74848);const w={keyword:"키워드",user:"사용자",channel:"채널",category:"카테고리",deleted:"삭제됨",all:"전체"};function A({renderContainer:e,controlTarget:t,count:r,hide:o}){const[a,i]=(0,n.useState)(void 0);(0,n.useEffect)((()=>{i((e=>Object.fromEntries(Object.keys(r).map((t=>[t,e?.[t]])))))}),[r]);const l=(0,n.useCallback)((e=>()=>{const r="show-filtered"+("all"===e?"":`-${e}`);i((n=>(t.classList.toggle(r,!n[e]),{...n,[e]:!n[e]})))}),[t]);return 0===r.all||o&&0===r.deleted?null:a?h.createPortal((0,x.jsxs)(v.Ay,{container:!0,sx:{borderBottom:"1px solid var(--color-bd-outer)",alignItems:"center"},children:[(0,x.jsx)(v.Ay,{item:!0,sm:4,xs:12,sx:{paddingLeft:1},children:(0,x.jsx)(b.A,{variant:"subtitle1",children:"뮤트(리프레셔)"})}),(0,x.jsx)(v.Ay,{item:!0,sm:8,xs:12,sx:{paddingRight:1,textAlign:"end","& *":{marginLeft:.5}},children:Object.entries(r).map((([e,t])=>{if("preview"===e)return null;if(o&&"deleted"!==e)return null;const n="show-filtered"+("all"===e?"":`-${e}`);return r[e]>0&&(0,x.jsx)(y.A,{variant:a[e]?"outlined":"default",size:"small",className:n,"data-key":e,onClick:l(e),label:`${w[e]} (${t})`},e)}))})]}),e):null}A.propTypes={renderContainer:g().object,controlTarget:g().object,count:g().object,hide:g().bool},A.defaultProps={count:{keyword:0,user:0,channel:0,category:0,deleted:0,all:0},hide:!1};const C=A;var S=r(89923),k=r(67529);const _=["live","headline","replay","breaking"],E=(0,x.jsx)(c.A,{styles:{".body .article-list":{"& .frontend-header":{display:"none !important"},"& .list-table.show-filtered-category .filtered-category":{display:"flex !important"},"& .list-table.show-filtered-channel .filtered-channel":{display:"flex !important"},"& .filtered-preview .vrow-preview":{display:"none !important"},"& .filtered-emoticon":{display:"none !important"}},".hide-service-notice .notice-service":{display:"none !important"},'.hide-no-permission .vrow[href$="#c_"]':{display:"none !important"},".hide-closed-deal .vrow.ar-closed":{display:"none !important"}}}),j=function(){const e=(0,o.wA)(),{channel:t,category:r}=(0,d.HZ)(),i=(0,o.d4)((e=>(0,l.K)(e,t.id))),{boardBarPos:s,hideCountBar:c,hideServiceNotice:h,hideNoPermission:m,hideClosedDeal:g}=(0,o.d4)((e=>e[k.default.id].storage)),[v,b]=(0,n.useState)(void 0),[y,w]=(0,n.useState)(void 0),[A,j]=(0,n.useState)(void 0);return(0,n.useLayoutEffect)((()=>{if(!r)return;const e=document.querySelector(`${a.r4}, ${a.eb}`);if(!e)return;b(e);const t=document.createElement("div");w(t)}),[e,r]),(0,n.useLayoutEffect)((()=>{v&&(v.insertAdjacentElement(s,y),v.style.marginBottom="afterend"===s?"0":"")}),[v,y,s]),(0,n.useLayoutEffect)((()=>{if(!v)return;const e=_.includes(t.id),n=()=>{const t=[...v.querySelectorAll(a.Yn)].filter((e=>!e.href?.includes("#c_"))).map((t=>([...t.classList].forEach((e=>{e.includes("filtered")&&t.classList.toggle(e,!1)})),{element:t,user:new p.p(t.querySelector(".user-info")).toUID(),content:(0,f.Q)(t.querySelector(".title"))||"",channel:e?t.querySelector(".badge")?.textContent:void 0,category:e?void 0:r.name2IdMap[t.querySelector(".badge")?.textContent]||"글머리없음"}))),n=(0,S.MV)(t,i),o=Object.fromEntries(Object.entries(n).map((([e,t])=>("all"!==e&&t.forEach((t=>{"preview"!==e&&t.classList.add("filtered"),t.classList.add(`filtered-${e}`)})),[e,t.length]))).filter((e=>e)));j(o)};return"complete"===document.readyState&&n(),window.addEventListener("load",n),window.addEventListener(u.U,n),()=>{window.removeEventListener("load",n),window.removeEventListener(u.U,n)}}),[t,r,i,v]),(0,n.useLayoutEffect)((()=>{v&&v.querySelectorAll(".vrow-preview noscript, .vrow-preview img").forEach((e=>{const t=e.matches("img")?(0,S.pk)(e.src):(0,S.pk)(e.textContent.match(/(\/\/.+)type=list/g)[0]);i.emoticon.url[t]&&e.parentNode.classList.add("filtered-emoticon")}))}),[v,i.emoticon]),(0,n.useLayoutEffect)((()=>{document.documentElement.classList.toggle("hide-service-notice",h)}),[h]),(0,n.useLayoutEffect)((()=>{document.documentElement.classList.toggle("hide-no-permission",m)}),[m]),(0,n.useLayoutEffect)((()=>{v&&([...v.querySelectorAll(a.Yn)].filter((e=>e.querySelector(".deal-close"))).forEach((e=>e.classList.add("ar-closed"))),document.documentElement.classList.toggle("hide-closed-deal",g))}),[v,g]),y?(0,x.jsxs)(x.Fragment,{children:[E,(0,x.jsx)(C,{renderContainer:y,controlTarget:v,count:A,hide:c})]}):null},R=function(){const e=(0,i.f)(a.uy),{keyword:t,hideMutedMark:r}=(0,o.d4)((e=>e[k.default.id].storage));return(0,n.useLayoutEffect)((()=>{if(!e)return;const n=()=>{const e=[...unsafeWindow.LiveConfig?.mute?.keywords||[],...t];if(!e.length)return;const n=new RegExp(e.join("|"));document.querySelectorAll(".right-sidebar .sidebar-item .link-list a").forEach((e=>{n.test(e.lastChild.textContent)&&(r&&(e.style.display="none"),e.dataset.orig=e.lastChild.textContent,e.dataset.href=e.href,e.lastChild.textContent="[뮤트됨]",e.removeAttribute("href"))}))};return window.addEventListener("load",n),"complete"===document.readyState&&n(),()=>{window.removeEventListener("load",n),document.querySelectorAll(".right-sidebar .sidebar-item .link-list a[data-orig]").forEach((e=>{e.lastChild.textContent=e.dataset.orig,e.href=e.dataset.href,delete e.dataset.orig,delete e.dataset.href,e.style.removeProperty("display")}))}}),[e,r,t]),null},M=(0,x.jsx)(c.A,{styles:{".article-content":{"& .muted":{"& img, & video":{display:"none"},"&::after":{position:"inherit",bottom:"unset",right:"unset",content:'"[아카콘 뮤트됨]"',fontSize:"inherit",background:"unset",color:"inherit",fontWeight:"inherit",padding:"unset"}}}}}),P=function(){const e=(0,i.f)(a.BH),t=(0,o.d4)(l.K),{hideMutedMark:r,muteAllEmot:s}=(0,o.d4)((e=>e[k.default.id].storage)),[c,u]=(0,n.useState)(null);return(0,n.useEffect)((()=>{e&&u(document.querySelector(a.fj))}),[e]),(0,n.useEffect)((()=>{if(!c)return;const e=()=>{[...document.querySelectorAll(a.IE)].forEach((e=>{const{src:r}=e,n=(0,S.pk)(r),o=e.closest("a");o&&(s||t.emoticon.url[n])&&(o.classList.add("muted"),o.dataset.href=o.href,o.removeAttribute("href"),o.title=s?"알 수 없음":t.emoticon.url[n])}))},r=()=>{[...document.querySelectorAll(a.IE)].forEach((e=>{const{src:r}=e,n=(0,S.pk)(r),o=e.closest("a");o&&t.emoticon.url[n]&&(o.classList.remove("muted"),o.href=o.dataset.href,delete o.dataset.href,o.removeAttribute("title"))}))};return"complete"!==document.readyState?(window.addEventListener("load",e),()=>{window.removeEventListener("load",e),r()}):(e(),()=>r())}),[c,t.emoticon,r,s]),M},O=(0,x.jsx)(c.A,{styles:{".body #comment":{"& .frontend-header":{display:"none"},"& .list-area":{"& .comment-wrapper.filtered":{display:"none"},"&.show-filtered .comment-wrapper.filtered":{display:"block"},"&.show-filtered-deleted .comment-wrapper.filtered-deleted":{display:"block"},"&.show-filtered-keyword .comment-wrapper.filtered-keyword":{display:"block"},"&.show-filtered-user .comment-wrapper.filtered-user":{display:"block"},"& .comment-item.muted-keyword":{"& .text pre":{color:"var(--color-text-muted) !important"},color:"var(--color-text-muted) !important"},"&:not(.show-filtered):not(.show-filtered-keyword) .comment-item.muted-keyword":{"& .text pre":{display:"none"},"& .text:after":{content:'"[키워드 뮤트됨]"'}},"& .comment-item.muted-user":{"& .text pre":{color:"var(--color-text-muted) !important"},color:"var(--color-text-muted) !important"},"&:not(.show-filtered):not(.show-filtered-user) .comment-item.muted-user":{"& .text pre":{display:"none"},"& .text:after":{content:'"[이용자 뮤트됨]"'},"& .emoticon-wrapper":{"& .emoticon":{display:"none"},"&:after":{content:'"[이용자 뮤트됨]"'},height:0}},"& .emoticon-muted":{"& .emoticon-wrapper, & .combo_emoticon-wrapper":{width:"auto !important",height:"auto !important",textDecoration:"none !important","& > img, & > video":{display:"none !important"}}},"& .hide-emoticon-muted":{display:"none !important"}}}}}),I=function(){const e=(0,o.wA)(),t=(0,i.f)(a.mh),r=(0,o.d4)(l.K),{hideCountBar:s,hideMutedMark:c,muteIncludeReply:d,muteAllEmot:h}=(0,o.d4)((e=>e[k.default.id].storage)),[m,g]=(0,n.useState)(void 0),[v,b]=(0,n.useState)(void 0),[y,w]=(0,n.useState)(void 0);return(0,n.useLayoutEffect)((()=>{if(!t)return;const e=document.querySelector(a.L7);if(!e)return;g(e);const r=document.createElement("div");e.insertAdjacentElement("beforebegin",r),b(r),window.addEventListener(u.z,(()=>{const e=document.querySelector(a.L7);g(e),e.insertAdjacentElement("beforebegin",r)}))}),[e,t]),(0,n.useLayoutEffect)((()=>{if(!t)return;const e=()=>{document.querySelectorAll(a.ns).forEach((e=>{const t=Number(e.dataset.id);if((h||r.emoticon.bundle[t])&&e.closest(d?a.f2:a.Bo).classList.add(c?"hide-emoticon-muted":"emoticon-muted"),!h&&!r.emoticon.bundle[t]||c)return;const n=document.createElement("span");n.append("[아카콘 뮤트됨]"),n.classList.add("muted"),n.title=h?"알 수 없음":r.emoticon.bundle[t],e.closest(".emoticon-wrapper, .combo_emoticon-wrapper").append(n)}))};return e(),window.addEventListener(u.z,e),()=>{document.querySelectorAll(a.ns).forEach((e=>{e.closest(d?a.f2:a.Bo).classList.remove(c?"hide-emoticon-muted":"emoticon-muted"),e.closest(".emoticon-wrapper, .combo_emoticon-wrapper").querySelector("span")?.remove()})),window.removeEventListener(u.z,e)}}),[t,r.emoticon,c,d,h]),(0,n.useLayoutEffect)((()=>{if(!m)return;const e=()=>{const e=[...document.querySelectorAll(d?a.f2:a.Bo)].map((e=>({element:e,user:new p.p(e.querySelector(".user-info")).toUID(),content:(0,f.Q)(e.querySelector(".message pre"))||"",deleted:d?e.querySelector(".comment-item").classList.contains("deleted"):e.classList.contains("deleted")}))),t=(0,S.MV)(e,r),n=Object.fromEntries(Object.entries(t).map((([e,t])=>("all"!==e&&t.forEach((t=>{"deleted"===e||c||t.matches(".comment-wrapper")?(t.classList.add("filtered"),t.classList.add(`filtered-${e}`)):t.classList.add(`muted-${e}`)})),[e,t.length]))));w(n)};return"complete"===document.readyState&&e(),window.addEventListener("load",e),window.addEventListener(u.z,e),()=>{[...document.querySelectorAll(d?a.f2:a.Bo)].forEach((e=>{[...e.classList].forEach((t=>{(t.includes("filtered")||t.includes("muted"))&&e.classList.remove(t)}))})),window.removeEventListener("load",e),window.removeEventListener(u.z,e)}}),[m,r,c,d]),v?(0,x.jsxs)(x.Fragment,{children:[O,(0,x.jsx)(C,{renderContainer:v,controlTarget:m,count:y,hide:s})]}):null};var T=r(83502);const $=(0,x.jsx)(c.A,{styles:{"#toastbox":{"& .filtered-emoticon":{width:"auto !important",height:"auto !important",textDecoration:"none !important","&::after":{content:'"[아카콘 뮤트됨]"'},"& > img, & > video":{display:"none !important"}}}}}),L=function(){const[e,t]=(0,T._)(),r=(0,o.d4)(l.K),{hideMutedMark:a,muteAllEmot:i}=(0,o.d4)((e=>e[k.default.id].storage));return(0,n.useEffect)((()=>{const n={callback:e=>{const t=e.data.split("|");if("n"!==t[0])return;const n=JSON.parse(t[1]);if(n.mediaUrl){const t=(0,S.pk)(n.mediaUrl);if(i||r.emoticon.url[t]){if(a)return void(e.ignore=!0);delete n.mediaUrl,n.title="Arca Refresher",n.message="[뮤트된 아카콘]"}}const o=r.user.length>0?new RegExp(r.user.join("|")):void 0;if(o?.test(n.username)){if(a)return void(e.ignore=!0);n.mediaUrl&&delete n.mediaUrl,n.title="Arca Refresher",n.message="[뮤트된 이용자의 알림]"}e.data=`${t[0]}|${JSON.stringify(n)}`},type:"before"};return e(n),()=>t(n)}),[r,a,i,e,t]),$},z=(0,x.jsx)(c.A,{styles:{"#toastbox":{"& .filtered-emoticon":{width:"auto !important",height:"auto !important",textDecoration:"none !important","&::after":{content:'"[아카콘 뮤트됨]"'},"& > img, & > video":{display:"none !important"}}}}}),F=function(){const[e,t]=(0,T._)(),r=(0,o.d4)(l.K),{hideMutedMark:a,muteAllEmot:i}=(0,o.d4)((e=>e[k.default.id].storage));return(0,n.useEffect)((()=>{const n={callback:e=>{const t=e.data.split("|");if("nc"!==t[0]||!t[1])return;const n=JSON.parse(t[1]),o=n.nickname.split('data-filter="')[1].split('"')[0],i=r.user.length>0?new RegExp(r.user.join("|")):void 0;if(i?.test(o)){if(a)return void(e.ignore=!0);n.content="[채팅 뮤트됨]"}e.data=`${t[0]}|${JSON.stringify(n)}`},type:"before"};return e(n),()=>t(n)}),[r,a,i,e,t]),z};function D(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{}),(0,x.jsx)(j,{}),(0,x.jsx)(R,{}),(0,x.jsx)(P,{}),(0,x.jsx)(I,{}),(0,x.jsx)(L,{}),(0,x.jsx)(F,{})]})}},67529:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"Mute",name:"뮤트",description:"게시물, 댓글, 이모티콘 등 여러 컨텐츠를 차단하는 기능입니다."}},89923:(e,t,r)=>{"use strict";function n(e,t){const r={user:[],keyword:[],category:[],preview:[],channel:[],deleted:[],all:[]},n=unsafeWindow.LiveConfig?.mute?.users||[],o=unsafeWindow.LiveConfig?.mute?.keywords||[],a=[...n,...t.user],i=[...o,...t.keyword],l=a.length>0?new RegExp(a.join("|")):void 0,s=i.length>0?new RegExp(i.join("|")):void 0,c=t.channel?.length>0?new RegExp(t.channel.join("|")):void 0;return e.forEach((({element:e,user:n,content:o,channel:a,category:i,deleted:u})=>{let d=!1;l?.test(n)&&(r.user.push(e),d=!0),s?.test(o)&&(r.keyword.push(e),d=!0),t.category?.[i]?.muteArticle&&(r.category.push(e),d=!0),t.category?.[i]?.mutePreview&&r.preview.push(e),c?.test(a)&&(r.channel.push(e),d=!0),u&&(r.deleted.push(e),d=!0),d&&r.all.push(e)})),r}async function o(e){const t=await fetch(`/api/emoticon/shop/${e}`,{method:"HEAD"});if(!t.redirected)throw new Error(`이모티콘(${e})이 포함된 번들 페이지를 조회하는데 실패했습니다.`);return t.url.match(/[0-9]+$/)[0]}r.d(t,{MV:()=>n,w4:()=>o,kx:()=>i,v8:()=>s,pk:()=>l});var a=r(78383);async function i(e){const t=await fetch(`/e/${e}`);if(!t.ok)return`삭제된 이모티콘 - ${e}`;const r=await t.text();return(0,a.YE)(r).title}function l(e){return new URL(e,"https://a").pathname.replace(".gif",".mp4").replace(".mp4.mp4",".mp4")}async function s(e){const t=await fetch(`/api/emoticon/${e}`);if(!t.ok)throw new Error(`번들(${e}) 이모티콘 목록을 받아오는데 실패했습니다.`);const r=await t.json();return{idList:r.map((e=>e.id)),urlList:r.map((e=>l(e.imageUrl)))}}},22240:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,K:()=>a});var n=r(8120),o=r(67529);const a=(0,n.Mz)((e=>e[o.default.id].storage.user),(e=>e[o.default.id].storage.keyword),(e=>e[o.default.id].storage.channel),(e=>e[o.default.id].storage.emoticon),((e,t)=>e[o.default.id].storage.category[t]),((e,t,r,n,o)=>{const a=Object.values(n).reduce(((e,{name:t,bundle:r,url:n})=>(e.bundle.push(...r.map((e=>[e,t]))),e.url.push(...n.map((e=>[e,t]))),e)),{bundle:[],url:[]});return{user:e,keyword:t,channel:r,emoticon:{bundle:Object.fromEntries(a.bundle),url:Object.fromEntries(a.url)},category:o}})),i=(0,n.Mz)([e=>e[o.default.id].storage.emoticon],(e=>Object.entries(e).map((([e,{name:t,bundle:r,url:n}])=>({id:e,name:t,bundle:r,url:n})))))},21737:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$addEmoticon:()=>k,$addKeyword:()=>x,$addUser:()=>v,$removeEmoticon:()=>_,$removeKeyword:()=>w,$removeUser:()=>b,$setBoardBarPos:()=>u,$setCategoryConfig:()=>j,$setChannel:()=>C,$setContextRange:()=>c,$setEmoticonList:()=>E,$setKeyword:()=>A,$setUser:()=>y,$toggleCountBar:()=>d,$toggleHideClosedDeal:()=>g,$toggleHideNoPermission:()=>m,$toggleHideNoticeService:()=>h,$toggleIncludeReply:()=>f,$toggleMuteAllEmot:()=>S,$toggleMutedMark:()=>p,default:()=>R,slice:()=>s});var n=r(43816),o=r(8070),a=r(89923),i=r(67529);const l={storage:(0,o._W)(i.default.id,{version:1,contextRange:"nickname",boardBarPos:"afterbegin",hideCountBar:!1,hideMutedMark:!1,muteIncludeReply:!1,hideServiceNotice:!1,hideNoPermission:!1,hideClosedDeal:!0,user:[],keyword:[],channel:[],muteAllEmot:!1,emoticon:{},category:{}},(function(e,t){if(!e)return t;if(0===(e?.version||0)){const t=Object.fromEntries(Object.entries(e.emoticon).map((([e,t])=>(t.url=t.url.map((e=>(0,a.pk)(e))),[e,t]))));return e.emoticon=t,e.version=1,e}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},s=(0,n.Z0)({name:i.default.id,initialState:l,reducers:{$setContextRange(e,t){e.storage.contextRange=t.payload},$setBoardBarPos(e,t){e.storage.boardBarPos=t.payload},$toggleCountBar(e){e.storage.hideCountBar=!e.storage.hideCountBar},$toggleMutedMark(e){e.storage.hideMutedMark=!e.storage.hideMutedMark},$toggleIncludeReply(e){e.storage.muteIncludeReply=!e.storage.muteIncludeReply},$toggleHideNoticeService(e){e.storage.hideServiceNotice=!e.storage.hideServiceNotice},$toggleHideNoPermission(e){e.storage.hideNoPermission=!e.storage.hideNoPermission},$toggleHideClosedDeal(e){e.storage.hideClosedDeal=!e.storage.hideClosedDeal},$addUser(e,t){e.storage.user.push(t.payload)},$removeUser(e,t){const r=e.storage.user.indexOf(t.payload);e.storage.user.splice(r,1)},$setUser(e,t){e.storage.user=t.payload},$addKeyword(e,t){e.storage.keyword.push(t.payload)},$removeKeyword(e,t){e.storage.keyword.push(t.payload)},$setKeyword(e,t){e.storage.keyword=t.payload},$setChannel(e,t){e.storage.channel=t.payload},$toggleMuteAllEmot(e){e.storage.muteAllEmot=!e.storage.muteAllEmot},$addEmoticon(e,t){const{id:r,emoticon:n}=t.payload;if(e.storage.emoticon[r]){const{bundle:t,url:o}=e.storage.emoticon[r],a=[...t,...n.bundle],i=[...o,...n.url];e.storage.emoticon[r]={...e.storage.emoticon[r],bundle:a.filter(((e,t)=>a.indexOf(e)===t)),url:i.filter(((e,t)=>i.indexOf(e)===t))}}else e.storage.emoticon[r]=n},$removeEmoticon(e,t){const{id:r,emotId:n,url:o}=t.payload;if(r&&(n||o)){if(!e.storage.emoticon[r])return void console.warn(`[Mute] 없는 이모티콘 삭제 시도 (${r})`);let t=e.storage.emoticon[r].bundle.indexOf(n);return-1===t&&(t=e.storage.emoticon[r].url.indexOf(o)),e.storage.emoticon[r].bundle=e.storage.emoticon[r].bundle.filter(((e,r)=>r!==t)),void(e.storage.emoticon[r].url=e.storage.emoticon[r].url.filter(((e,r)=>r!==t)))}if(r)return e.storage.emoticon[r]?void delete e.storage.emoticon[r]:void console.warn(`[Mute] 없는 이모티콘 삭제 시도 (${r})`);console.warn("[Mute] $removeEmoticon Payload 오류")},$setEmoticonList(e,t){e.storage.emoticon=t.payload},$setCategoryConfig(e,t){const{channel:r,category:n,config:o}=t.payload;e.storage.category[r]||(e.storage.category[r]={}),e.storage.category[r][n]=o}}}),{$setContextRange:c,$setBoardBarPos:u,$toggleCountBar:d,$toggleMutedMark:p,$toggleIncludeReply:f,$toggleHideNoticeService:h,$toggleHideNoPermission:m,$toggleHideClosedDeal:g,$addUser:v,$removeUser:b,$setUser:y,$addKeyword:x,$removeKeyword:w,$setKeyword:A,$setChannel:C,$toggleMuteAllEmot:S,$addEmoticon:k,$removeEmoticon:_,$setEmoticonList:E,$setCategoryConfig:j}=s.actions,R=s.reducer},61734:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var i=r(96540),l=r(71468),s=r(5556),c=r.n(s),u=r(8120),d=r(44635),p=r(37211),f=r(82241),h=r(44448),m=r(14073),g=r(60538),v=r(49799),b=r(47839),y=r(11641),x=r(58031),w=r(46831),A=r(22477),C=r(77867),S=r(40250),k=r(73185),_=r(41695),E=r(79369),j=r(19893),R=r(69556),M=r(85065);function P({divider:e,inputKey:t,children:r,onClick:n}){return(0,o.jsx)(d.Ay,{disablePadding:!0,divider:e,children:(0,o.jsxs)(p.A,{onClick:n,children:[(0,o.jsx)(f.A,{children:r}),(0,o.jsx)(h.A,{children:(0,o.jsx)(k.RY,{title:t})})]})})}P.propTypes={divider:c().bool,inputKey:c().string,children:c().node,onClick:c().func};const O=(0,u.Mz)((e=>e[M.default.id].storage.keyTable),(e=>Object.fromEntries(e.map((({action:e,key:t})=>[e,t]))))),I=(0,i.forwardRef)(((e,t)=>{const r=(0,l.wA)(),{enabled:n,compatibilityMode:a}=(0,l.d4)((e=>e[M.default.id].storage)),s=(0,l.d4)(O),{waitKeyInput:c}=(0,l.d4)((e=>e[M.default.id])),[u,p]=(0,i.useState)(void 0);(0,i.useEffect)((()=>{if(!c)return;const e=e=>{if(e.stopPropagation(),"Escape"!==e.code)return"Delete"===e.code?(r((0,E.$setKey)({action:c,key:"DISABLED"})),void r((0,E.setWaitKeyInput)(void 0))):void(R.A.test(e.code)?p("이 키는 사용할 수 없습니다."):(r((0,E.$setKey)({action:c,key:e.code})),r((0,E.setWaitKeyInput)(void 0)),p(void 0)));r((0,E.setWaitKeyInput)(void 0))};return document.addEventListener("keyup",e,!0),()=>document.removeEventListener("keyup",e,!0)}),[c,r]);const k=e=>()=>{r((0,E.setWaitKeyInput)(e))};return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(m.A,{variant:"subtitle1",children:M.default.name}),(0,o.jsx)(g.A,{children:(0,o.jsxs)(v.A,{disablePadding:!0,children:[(0,o.jsx)(_.p9,{divider:!0,primary:"사용",value:n,action:E.$toggleEnabled}),(0,o.jsx)(_.p9,{primary:"호환성 모드",secondary:(0,o.jsxs)(o.Fragment,{children:["⚠️이 옵션을 사용하면 키가 같지 않은 아카라이브 단축키가 동시에 동작할 수 있습니다.",(0,o.jsx)("br",{}),"키 입력을 사용하는 다른 스크립트를 쓰려면 켜주세요."]}),value:a,action:E.$toggleCompatibilityMode})]})}),(0,o.jsx)(m.A,{variant:"subtitle2",children:"키 설정"}),(0,o.jsx)(g.A,{children:(0,o.jsxs)(v.A,{disablePadding:!0,children:[(0,o.jsxs)(d.Ay,{children:[(0,o.jsx)(f.A,{children:"단축키 목록"}),(0,o.jsx)(h.A,{children:(0,o.jsx)(b.A,{title:"초기화",children:(0,o.jsx)(y.A,{onClick:()=>{r((0,E.$resetKeyMap)())},size:"large",children:(0,o.jsx)(S.A,{})})})})]}),(0,o.jsx)(d.Ay,{children:(0,o.jsx)(g.A,{variant:"outlined",sx:{width:"100%"},children:(0,o.jsx)(v.A,{disablePadding:!0,children:j.A.map((({action:e,label:t,defaultKey:r},n)=>{return(0,o.jsx)(P,{divider:n!==j.A.length-1,inputKey:(a=s[e]||r,a.replace("Key","").replace("Numpad","Num ").replace("Backquote","`").replace("Backslash","\\").replace("Add","+").replace("Subtract","-").replace("Minus","-").replace("Divide","/").replace("Multiply","*").replace("Equal","=").replace("Decimal",".").replace("ArrowUp","↑").replace("ArrowDown","↓").replace("ArrowLeft","ㅁ").replace("ArrowRight","→").replace("DISABLED","비활성화")).toUpperCase(),onClick:k(e),children:t},e);var a}))})})})]})}),(0,o.jsxs)(x.A,{open:!!c,children:[(0,o.jsx)(w.A,{children:"키 입력 대기 중..."}),(0,o.jsx)(A.A,{children:(0,o.jsxs)(C.A,{children:[(0,o.jsx)(m.A,{children:"키를 2개 이상 사용하는 단축키는 지원하지 않습니다"}),(0,o.jsx)(m.A,{children:"Delete 키를 누르면 기능을 비활성화 합니다"}),(0,o.jsx)(m.A,{children:"ESC 키를 눌러 키 변경을 취소합니다"}),u&&(0,o.jsx)(m.A,{children:`🚫 ${u}`})]})})]})]})}));I.displayName=`ConfigMenuView(${M.default.id})`;const T=I,$={key:M.default.id,Icon:a,label:M.default.name,View:T}},64789:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(96540),o=r(71468),a=r(43714),i=r(46117),l=r(50060),s=r(19893),c=r(69556),u=r(85065);function d(){const e=(0,i.X)(),t=(0,l.HZ)(),r=(0,a.FA)(),{enabled:d,compatibilityMode:p,keyTable:f}=(0,o.d4)((e=>e[u.default.id].storage));return(0,n.useEffect)((()=>{if(!d)return;if(r)return;const n=s.A.filter((({active:e})=>t.article?e.indexOf("article")>-1:!!t.category&&e.indexOf("board")>-1)),o=Object.fromEntries(f.map((({action:e,key:t})=>[e,t]))),a=Object.fromEntries(n.map((({action:e,defaultKey:t,callback:r})=>[o[e]||t,r])).filter((([e])=>!!e))),i=r=>{r.target.matches("input, textarea, [contenteditable]")||r.ctrlKey||r.altKey||r.shiftKey||r.metaKey||c.A.test(r.code)||((p&&a[r.code]||!p)&&r.stopPropagation(),a[r.code]?.(r,{content:t,setSnack:e}))};return document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("keydown",i,!0)}}),[t,t.article,t.board,d,p,r,f,e]),null}},85065:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ShortKey",name:"단축키",description:"아카라이브 단축키 기능을 대체합니다."}},19893:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(78383);const o=[{action:"write",label:"글 작성",active:"article|board",defaultKey:"KeyW",callback(){document.querySelector(".btn-arca-article-write")?.click()}},{action:"refresh",label:"새로고침",active:"article|board",defaultKey:"KeyR",callback(){window.location.reload()}},{action:"moveTop",label:"가장 위로 스크롤",active:"article|board",defaultKey:"KeyT",callback(){window.scrollTo(0,0)}},{action:"prevChannel",label:"이전 구독 채널",active:"article|board",defaultKey:"KeyZ",callback(e,{content:t}){const{subList:r}=unsafeWindow.LiveConfig,n=r.indexOf(t.channel.id);if(n<0)return;const o=(r.length+n-1)%r.length;window.location.href=`https://arca.live/b/${r[o]}`}},{action:"nextChannel",label:"다음 구독 채널",active:"article|board",defaultKey:"KeyX",callback(e,{content:t}){const{subList:r}=unsafeWindow.LiveConfig,n=r.indexOf(t.channel.id);if(n<0)return;const o=(n+1)%r.length;window.location.href=`https://arca.live/b/${r[o]}`}},{action:"prev",label:"이전 글/게시판 이전 페이지",active:"article|board",defaultKey:"KeyA",callback(){if(window.location.pathname.split("/").length>3){const e=document.querySelector(".article-view .vrow.active");if(!e){const e=document.querySelector(".article-view .vrow:last-child"),t=e.href||e.querySelector("a.title").href;window.location=t}if(e.previousElementSibling&&!e.previousElementSibling.matches(".notice")){const t=e.previousElementSibling.href||e.previousElementSibling.querySelector("a.title").href;return void(window.location=t)}}const e=document.querySelector(".article-list~.pagination-wrapper .active");e.previousElementSibling?.querySelector("a").click()}},{action:"next",label:"다음 글/게시판 다음 페이지",active:"article|board",defaultKey:"KeyS",callback(){if(window.location.pathname.split("/").length>3){const e=document.querySelector(".article-view .vrow.active");if(!e){const e=document.querySelector(".pagination-wrapper .active");return void e.nextElementSibling?.querySelector("a").click()}if(e.nextElementSibling){const t=e.nextElementSibling.href||e.nextElementSibling.querySelector("a.title").href;return void(window.location=t)}}const e=document.querySelector(".article-list~.pagination-wrapper .active");e.nextElementSibling?.querySelector("a").click()}},{action:"goBoard",label:"게시물 목록으로 이동/첫 페이지로 이동",active:"article|board",defaultKey:"KeyQ",callback(){const{host:e}=window.location,t=window.location.pathname.split("/");if(t.length<4){const r=(0,n.$Z)(),o=Object.keys(r);if(0===o.length)return;if(1===o.length&&"best"===r.mode)return;const a=t.slice(0,3).join("/"),i="best"===r.mode?"?mode=best":"";return void(window.location=`https://${e}${a}${i}`)}const r=t.slice(0,3).join("/"),{mode:o,before:a,after:i,near:l,tz:s,p:c}=(0,n.$Z)(),u={};o&&(u.mode=o),a&&(u.before=a),i&&(u.after=i),l&&(u.near=l),s&&(u.tz=s),c&&"1"!==c&&(u.p=c);const d=(0,n._b)(u);window.location=`https://${e}${r}${d}`}},{action:"goBest",label:"개념글 페이지 토글",active:"board",defaultKey:"KeyE",callback(){const{host:e}=window.location,t=window.location.pathname.split("/").slice(0,3).join("/");if("best"===(0,n.$Z)().mode)return void(window.location=`https://${e}${t}`);const r=(0,n._b)({mode:"best"});window.location=`https://${e}${t}${r}`}},{action:"comment",label:"댓글 목록/입력창으로 이동",active:"article",defaultKey:"KeyC",callback(e){e.preventDefault();const t=document.querySelector("#comment"),r=document.querySelector("nav.navbar"),n=t.offsetTop-r.clientHeight;window.scrollYe.json())).then((e=>{e.result?(r({msg:`스크랩 ${e.isScrap?"되었습니다":"취소되었습니다"}.`,time:3e3}),document.querySelector("#scrapForm .result").textContent=e.isScrap?"스크랩 됨":"스크랩"):r({msg:"스크랩 실패 (서버 오류?)",time:3e3})}))}}]},69556:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=/(Digit[0-9]|F[0-9]{1,2}|Escape|Shift|Control|Alt|Meta|Backspace|Enter|ContextMenu|\s)/},79369:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$resetKeyMap:()=>d,$setKey:()=>u,$toggleCompatibilityMode:()=>c,$toggleEnabled:()=>s,default:()=>f,setWaitKeyInput:()=>p,slice:()=>l});var n=r(43816),o=r(8070),a=r(85065);const i={storage:(0,o._W)(a.default.id,{enabled:!0,compatibilityMode:!1,keyTable:[]}),waitKeyInput:void 0},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleEnabled(e){e.storage.enabled=!e.storage.enabled},$toggleCompatibilityMode(e){e.storage.compatibilityMode=!e.storage.compatibilityMode},$setKey(e,t){const{action:r,key:n}=t.payload,o=e.storage.keyTable.findIndex((e=>e.action===r));o>-1?e.storage.keyTable[o].key=n:e.storage.keyTable.push(t.payload)},$resetKeyMap(e){e.storage.keyTable=[]},setWaitKeyInput(e,t){e.waitKeyInput=t.payload}}}),{$toggleEnabled:s,$toggleCompatibilityMode:c,$setKey:u,$resetKeyMap:d,setWaitKeyInput:p}=l.actions,f=l.reducer},42334:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(86775),o=r(96540),a=r(71468),i=r(15327),l=r(14073),s=r(60538),c=r(49799),u=r(73896),d=r(52848),p=r(41695),f=r(66590),h=r(21106),m=r(74848);function g(e){return`${e}px`}const v=(0,o.forwardRef)(((e,t)=>{const r=(0,i.A)((e=>e.breakpoints.down("lg"))),{notifyPosition:n,topNews:v,searchBar:b,recentVisit:y,sideContents:x,sideBests:w,sideNews:A,sideMenu:C,fontSizeEnabled:S,fontSize:k,spoofTitle:_,presetFavicon:E,spoofFavicon:j}=(0,a.d4)((e=>e[f.default.id].storage));return(0,m.jsxs)(o.Fragment,{ref:t,children:[(0,m.jsx)(l.A,{variant:"subtitle1",children:f.default.name}),(0,m.jsx)(l.A,{variant:"subtitle2",children:"모양 설정"}),(0,m.jsx)(s.A,{children:(0,m.jsxs)(c.A,{disablePadding:!0,children:[(0,m.jsxs)(p.FF,{divider:!0,primary:"알림 위치",value:n,action:e=>(unsafeWindow.showNotiAlert("[ArcaRefresher] 알림 위치가 변경되었습니다."),(0,h.$setNotifyPosition)(e)),children:[(0,m.jsx)(u.A,{value:"left",children:"왼쪽"}),(0,m.jsx)(u.A,{value:"right",children:"오른쪽"}),(0,m.jsx)(u.A,{value:"lefttop",children:"왼쪽 위"}),(0,m.jsx)(u.A,{value:"righttop",children:"오른쪽 위"})]}),r&&(0,m.jsx)(p.p9,{divider:!0,primary:"상단 뉴스 헤더 표시",value:v,action:h.$toggleTopNews}),(0,m.jsx)(p.p9,{divider:!0,primary:"검색창 표시",value:b,action:h.$toggleSearchBar}),(0,m.jsxs)(p.FF,{divider:!0,primary:"최근 방문 채널 위치",value:y,action:h.$setRecentVisit,children:[(0,m.jsx)(u.A,{value:"beforeAd",children:"광고 위"}),(0,m.jsx)(u.A,{value:"afterAd",children:"광고 아래"}),(0,m.jsx)(u.A,{value:"none",children:"숨김"})]}),!r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(p.p9,{divider:!0,primary:"우측 사이드 메뉴 표시",value:C,action:h.$toggleSideMenu}),(0,m.jsx)(d.A,{in:C,children:(0,m.jsxs)(c.A,{disablePadding:!0,children:[(0,m.jsx)(p.p9,{divider:!0,nested:!0,primary:"사이드 컨텐츠 패널 표시",value:x,action:h.$toggleSideContents}),(0,m.jsx)(p.p9,{divider:!0,nested:!0,primary:"개념글 패널 표시",value:w,action:h.$toggleSideBests}),(0,m.jsx)(p.p9,{divider:!0,nested:!0,primary:"뉴스 패널 표시",value:A,action:h.$toggleSideNews})]})})]}),(0,m.jsx)(p.p9,{divider:S,primary:"사이트 전체 폰트 크기 설정",secondary:"⚠ 사이트의 표시 설정을 무시합니다.",value:S,action:h.$toggleFontSizeEnabled}),(0,m.jsx)(d.A,{in:S,children:(0,m.jsx)(p.k1,{divider:!0,primary:"폰트 크기",sliderProps:{min:8,max:30,step:1,valueLabelFormat:g,valueLabelDisplay:"auto"},value:k,action:h.$setFontSize,opacityOnChange:.6})})]})}),(0,m.jsx)(l.A,{variant:"subtitle2",children:"동작 설정"}),(0,m.jsx)(s.A,{children:(0,m.jsxs)(c.A,{disablePadding:!0,children:[(0,m.jsx)(p.YG,{divider:!0,primary:"사이트 표시 제목 변경",secondary:"공란일 시 변경하지 않습니다.",value:_,action:h.$setSpoofTitle}),(0,m.jsxs)(p.FF,{divider:!0,primary:"사이트 파비콘 변경",secondary:(0,m.jsxs)(m.Fragment,{children:["사이트 대표 아이콘을 다른 사이트로 변경합니다.",(0,m.jsx)("br",{}),"사용 시 새 알림 기능이 비활성화됩니다."]}),value:E,action:h.$setPresetFavicon,children:[(0,m.jsx)(u.A,{value:"",children:"사용 안 함"}),(0,m.jsx)(u.A,{value:"google",children:"구글"}),(0,m.jsx)(u.A,{value:"gmail",children:"G Mail"}),(0,m.jsx)(u.A,{value:"naver",children:"네이버"}),(0,m.jsx)(u.A,{value:"custom",children:"커스텀"})]}),(0,m.jsx)(d.A,{in:"custom"===E,children:(0,m.jsx)(p.YG,{primary:"커스텀 파비콘 URL",manualSave:!0,value:j,action:h.$setSpoofFavicon})})]})})]})}));v.displayName=`ConfigMenuView(${f.default.id})`;const b=v,y={key:f.default.id,order:-1,Icon:n.A,label:f.default.name,View:b}},64446:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(96540),o=r(71468),a=r(59839),i=r(83502),l=r(66590),s=r(74848);function c({value:e}){return(0,s.jsx)(a.A,{styles:{".body #toastbox":{right:e.indexOf("left")>-1?"initial !important":void 0,height:e.indexOf("top")>-1?"calc(100% - 4rem - 52px)":void 0}}})}function u({value:e}){return e?null:(0,s.jsx)(a.A,{styles:{".topbar-area":{display:"none !important"}}})}function d({value:e}){return e?null:(0,s.jsx)(a.A,{styles:{"html li.nav-channel-search-wrapper":{display:"none !important"}}})}function p({value:e}){let t;switch(e){case"beforeAd":t={".board-article-list, .included-article-list":{display:"flex",flexDirection:"column","& .board-title":{order:-99},"& .board-title+.btns-board":{order:-98,marginBottom:"0.5rem"},"& .channel-visit-history":{order:-50,marginBottom:"0.5rem"}}};break;case"afterAd":t={".board-article-list, .included-article-list":{display:"inherit","& .channel-visit-history":{display:"inherit"}}};break;case"none":t={".board-article-list, .included-article-list":{"& .channel-visit-history":{display:"none"}}};break;default:t={".board-article-list":{display:"inherit","& .channel-visit-history":{display:"inherit"}}}}return(0,s.jsx)(a.A,{styles:t})}function f({value:e}){return e?null:(0,s.jsx)(a.A,{styles:e=>{const t=[1100,1200,1300,1500,1600].map((t=>[`html.width-${t}`,{"& .body .content-wrapper:not(.no-sidebar)":{[e.breakpoints.up(t+400)]:{gridTemplateColumns:"auto 1fr !important"},[e.breakpoints.down(t+400)]:{gridTemplateColumns:"1fr !important"}}}]));return{...Object.fromEntries(t),"html:not([class*=width])":{"& .body .content-wrapper":{gridTemplateColumns:"1fr !important"}},"html .board-article":{margin:0},"html .right-sidebar":{display:"none"}}}})}function h({value:e}){return e?null:(0,s.jsx)(a.A,{styles:{".sidebar .sidebar-item:first-child":{display:"none !important"}}})}function m({value:e}){return e?null:(0,s.jsx)(a.A,{styles:{".sidebar .sidebar-item:nth-child(2)":{display:"none !important"}}})}function g({value:e}){return e?null:(0,s.jsx)(a.A,{styles:{"#newsRank":{display:"none !important"}}})}function v({value:e}){return(0,s.jsx)(a.A,{styles:{html:{fontSize:`${e}px !important`}}})}function b({value:e}){return e?(0,s.jsx)(a.A,{styles:{".write-body .dark-theme":{"&.fr-box.fr-basic .fr-wrapper":{border:"1px solid var(--color-bd-outer)",borderBottom:"none",background:"var(--color-bg-body)"},"&.fr-box.fr-basic .fr-element":{color:"var(--color-text)"},"& .fr-second-toolbar":{background:"#353535",border:"1px solid var(--color-bd-outer)",color:"var(--color-text)"}}}}):null}function y(){const[e,t]=(0,i._)(),{notifyPosition:r,topNews:a,searchBar:y,recentVisit:x,sideContents:w,sideBests:A,sideNews:C,sideMenu:S,fontSizeEnabled:k,fontSize:_,fixDarkModeWriteForm:E,spoofTitle:j,spoofFavicon:R}=(0,o.d4)((e=>e[l.default.id].storage)),M=(0,n.useRef)(document.title);return(0,n.useEffect)((()=>{document.title=j||M.current}),[j]),(0,n.useEffect)((()=>{if(!R)return;const r=document.querySelector("#dynamic-favicon").href,n=e=>{document.querySelector("#dynamic-favicon").href=e};Object.defineProperty(unsafeWindow,"notificationBadge",{get:()=>"default",set(){}}),n(R),window.addEventListener("load",(()=>{n(R)}));const o={type:"before",callback(e){"na"===e.data.split("|").shift()&&Object.defineProperty(e,"ignore",{value:!0})}};return e(o),()=>{n(r),t(o),window.removeEventListener("load",n)}}),[R,e,t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c,{value:r}),(0,s.jsx)(u,{value:a}),(0,s.jsx)(d,{value:y}),(0,s.jsx)(p,{value:x}),(0,s.jsx)(f,{value:S}),(0,s.jsx)(h,{value:w}),(0,s.jsx)(m,{value:A}),(0,s.jsx)(g,{value:C}),k&&(0,s.jsx)(v,{value:_}),(0,s.jsx)(b,{value:E})]})}},66590:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"SiteCustom",name:"사이트 모양",description:"사이트 전반의 UI/UX를 수정합니다."}},21106:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setFontSize:()=>b,$setNotifyPosition:()=>c,$setPresetFavicon:()=>x,$setRecentVisit:()=>p,$setSpoofFavicon:()=>w,$setSpoofTitle:()=>y,$toggleFontSizeEnabled:()=>v,$toggleSearchBar:()=>d,$toggleSideBests:()=>m,$toggleSideContents:()=>h,$toggleSideMenu:()=>f,$toggleSideNews:()=>g,$toggleTopNews:()=>u,default:()=>A,slice:()=>s});var n=r(43816),o=r(8070),a=r(66590);const i={"":"",google:"https://www.google.com/s2/favicons?sz=64&domain=google.com",gmail:"https://ssl.gstatic.com/ui/v1/icons/mail/rfr/gmail.ico",naver:"https://www.google.com/s2/favicons?sz=64&domain=naver.com",custom:""},l={storage:(0,o._W)(a.default.id,{version:1,notifyPosition:"right",topNews:!0,searchBar:!0,recentVisit:"afterAd",sideMenu:!0,sideContents:!0,sideBests:!0,sideNews:!0,fontSizeEnabled:!1,fontSize:15,spoofTitle:"",presetFavicon:"",spoofFavicon:""},(function(e,t){if(0===(e?.version||0)){const e=Object.keys(t).filter((e=>"version"!==e)),r=[],n=(0,o._W)("LayoutCustom");n&&r.push(...Object.entries(n).filter((t=>e.includes(t[0]))));const a=(0,o._W)("ExperienceCustom");return a&&r.push(...Object.entries(a).filter((t=>e.includes(t[0])))),{...t,...Object.fromEntries(r)}}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},s=(0,n.Z0)({name:a.default.id,initialState:l,reducers:{$setNotifyPosition(e,t){e.storage.notifyPosition=t.payload},$toggleTopNews(e){e.storage.topNews=!e.storage.topNews},$toggleSearchBar(e){e.storage.searchBar=!e.storage.searchBar},$setRecentVisit(e,t){e.storage.recentVisit=t.payload},$toggleSideMenu(e){e.storage.sideMenu=!e.storage.sideMenu},$toggleSideContents(e){e.storage.sideContents=!e.storage.sideContents},$toggleSideBests(e){e.storage.sideBests=!e.storage.sideBests},$toggleSideNews(e){e.storage.sideNews=!e.storage.sideNews},$toggleFontSizeEnabled(e){e.storage.fontSizeEnabled=!e.storage.fontSizeEnabled},$setFontSize(e,t){e.storage.fontSize=t.payload},$setSpoofTitle(e,t){e.storage.spoofTitle=t.payload},$setPresetFavicon(e,t){e.storage.presetFavicon=t.payload,e.storage.spoofFavicon=i[t.payload]},$setSpoofFavicon(e,t){e.storage.spoofFavicon=t.payload}}}),{$setNotifyPosition:c,$toggleTopNews:u,$toggleSearchBar:d,$setRecentVisit:p,$toggleSideMenu:f,$toggleSideContents:h,$toggleSideBests:m,$toggleSideNews:g,$toggleFontSizeEnabled:v,$setFontSize:b,$setSpoofTitle:y,$setPresetFavicon:x,$setSpoofFavicon:w}=s.actions,A=s.reducer},49376:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>U});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3m13.71-9.37-1.34-1.34a.9959.9959 0 0 0-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41"}),"Brush");var i=r(96540),l=r(71468),s=r(15327),c=r(14073),u=r(42471),d=r(60538),p=r(49799),f=r(73896),h=r(44635),m=r(50936),g=r(2071),v=r(72730),b=r(47839),y=r(61224),x=r(69067),w=r(99682);const A=(0,n.A)((0,o.jsx)("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12z"}),"Label");var C=r(67110),S=r(41695),k=r(73185),_=r(96092),E=r(51700),j=r(5556),R=r.n(j),M=r(37211),P=r(82241),O=r(44448),I=r(52848);const T=(0,n.A)((0,o.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");var $=r(11692),L=r(14165),z=r(43714);const F=(0,i.forwardRef)((({disabled:e,groupData:t,defaultPreset:r,preset:n,onChange:a},l)=>{const[s,c]=(0,i.useState)((()=>({}))),u=(0,z.vf)(),d=(0,i.useCallback)((e=>()=>{c((t=>({...t,[e]:!t[e]})))}),[]),f=(0,i.useCallback)(((e,t)=>{const r={...n};r[e]=t,a?.(r)}),[a,n]);return(0,o.jsx)(p.A,{ref:l,disablePadding:!0,children:t.map((({key:a,text:l,rows:c},m)=>(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(h.Ay,{disablePadding:!0,divider:m(0,o.jsxs)(h.Ay,{sx:e?e=>({opacity:e.palette.action.disabledOpacity}):void 0,divider:mu(0),onClose:()=>u(1),onChange:e=>f(a,e)})})]},a)))})})]},a)))})}));F.propTypes={disabled:R().bool,groupData:R().array,defaultPreset:R().object,preset:R().object,onChange:R().func};const D=F,N=(e,t,r="")=>({key:e,primary:t,secondary:r}),B=[{key:"layout",text:"배경 및 외곽선",rows:[N("bg-navbar","상단 네비게이션 바"),N("bg-body","사이트 배경"),N("bg-main","컨텐츠 영역 배경"),N("bg-footer","최하단 푸터"),N("bd-navbar","상단 네비게이션 바 경계선"),N("bd-outer","외부 경계선"),N("bd-inner","내부 경계선"),N("bg-focus","게시물 포커스")]},{key:"detail",text:"세부 요소",rows:[N("bg-dropdown","드롭다운 메뉴"),N("bg-input","입력칸"),N("text-color","텍스트(기본)"),N("article-visited","조회한 게시물"),N("text-muted","비활성화"),N("link-color","링크"),N("board-category","글머리 배경"),N("board-category-text","글머리 텍스트"),N("user-icon-fixed","고정닉"),N("user-icon-public","반고정닉"),N("bd-btn-hover","버튼 포커스"),N("bg-highlight","새 댓글 강조"),N("bg-highlight-user","게시물 작성자 강조"),N("bg-link-card","댓글 링크 카드"),N("bg-link-card-thumbnail","댓글 링크 카드 빈 섬네일"),N("link-card-focus","댓글 링크 카드 포커스")]},{key:"wiki",text:"채널위키",rows:[N("broken-link-color","문서가 없는 링크"),N("text-highlight","검색 결과"),N("text-color-reverse","텍스트(반전)")]}],H={"bg-navbar":"#3d414d","bg-body":"#eee","bg-main":"#fff","bg-footer":"#fff","border-navbar":"#3d414d","border-outer":"#bbb","border-inner":"#ddd","bg-focus":"#eee","bg-dropdown":"#fff","bg-input":"#fff","text-color":"#000000","visited-article":"#bbb","text-muted":"#666666","link-color":"#0275d8","board-category":"#42464f","board-category-text":"#ffffff","user-icon-fixed":"#777","user-icon-public":"#777","btn-hover":"#007bff","bg-highlight":"#fff4cc","bg-highlight-user":"#efdf25cf","bg-link-card":"#F9F9F9","bg-link-card-thumbnail":"#EFEFEF","link-card-focus":"#eee","broken-link-color":"red","text-highlight":"yellow","text-color-reverse":"#d3d3d3"},V=(0,i.forwardRef)(((e,t)=>{const r=(0,l.wA)(),[n,a]=(0,k.SC)(),j=(0,s.A)((e=>e.breakpoints.down("lg"))),{enabled:R,current:M,theme:P}=(0,l.d4)((e=>e[_.default.id].storage)),[O,I]=(0,i.useState)(""),T=(0,i.useRef)(""),$=(0,i.useMemo)((()=>({...H,...P[O]})),[O,P]),L=(0,i.useCallback)((e=>{I(e.target.value)}),[]),z=(0,i.useCallback)((async()=>{const e=await n({title:"추가할 프리셋 이름",content:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"body2",children:"채널 slug로 지정 시 해당 채널에 항상 적용되는 테마가 됩니다."}),(0,o.jsx)(u.A,{fullWidth:!0,inputRef:T})]}),buttonList:[{label:"확인",value:()=>T.current.value,key:"Enter"},{label:"취소",value:!1,key:"Escape",variant:"contained"}]});e&&(r((0,E.$setPreset)({key:e,preset:{...H}})),I(e))}),[n,r]),F=(0,i.useCallback)((async()=>{const e=await n({title:"프리셋 이름 변경",content:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{variant:"body2",children:"채널 slug로 지정 시 해당 채널에 항상 적용되는 테마가 됩니다."}),(0,o.jsx)(u.A,{fullWidth:!0,inputRef:T,defaultValue:O})]}),buttonList:[{label:"확인",value:()=>T.current.value,key:"Enter"},{label:"취소",value:!1,key:"Escape",variant:"contained"}]});e&&O!==e&&(r((0,E.$renamePreset)({prev:O,next:e})),I(e))}),[O,n,r]),N=(0,i.useCallback)((async()=>{await n({title:"프리셋 삭제",content:`"${O}" 프리셋을 삭제합니다.`})&&(r((0,E.$setPreset)({key:O,preset:null})),O===M&&r((0,E.$setCurrent)("")),I(""))}),[O,M,n,r]),V=(0,i.useCallback)((e=>{r((0,E.$setPreset)({key:O,preset:e}))}),[r,O]);return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(c.A,{variant:"subtitle1",children:_.default.name}),(0,o.jsx)(d.A,{children:(0,o.jsxs)(p.A,{disablePadding:!0,children:[(0,o.jsx)(S.p9,{divider:!0,primary:"사용",value:R,action:E.$toggleEnable}),(0,o.jsxs)(S.FF,{divider:!0,primary:"전체 적용 테마",secondary:"모든 채널에서 사용할 프리셋입니다.",value:M,action:E.$setCurrent,children:[(0,o.jsx)(f.A,{value:"",children:"없음"}),Object.keys(P).map((e=>(0,o.jsx)(f.A,{value:e,children:e},e)))]}),(0,o.jsx)(h.Ay,{children:(0,o.jsxs)(m.A,{direction:j?"column":"row",width:"100%",gap:2,children:[(0,o.jsxs)(g.A,{displayEmpty:!0,sx:{flexGrow:1},value:O,onChange:L,children:[(0,o.jsx)(f.A,{value:"",children:"프리셋 선택"}),Object.keys(P).map((e=>(0,o.jsx)(f.A,{value:e,children:e},e)))]}),(0,o.jsxs)(v.A,{size:"large",fullWidth:j,children:[(0,o.jsx)(b.A,{title:"추가",children:(0,o.jsx)("span",{children:(0,o.jsx)(y.A,{onClick:z,children:(0,o.jsx)(w.A,{})})})}),(0,o.jsx)(b.A,{title:"이름 수정",children:(0,o.jsx)("span",{children:(0,o.jsx)(y.A,{disabled:!O,onClick:F,children:(0,o.jsx)(A,{})})})}),(0,o.jsx)(b.A,{title:"제거",children:(0,o.jsx)("span",{children:(0,o.jsx)(y.A,{disabled:!O,onClick:N,children:(0,o.jsx)(C.A,{})})})})]})]})}),(0,o.jsx)(h.Ay,{children:(0,o.jsx)(x.A,{sx:{width:"100%"},children:(0,o.jsx)(d.A,{variant:"outlined",children:(0,o.jsx)(D,{groupData:B,defaultPreset:H,preset:$,disabled:!O,onChange:V})})})})]})}),(0,o.jsx)(a,{})]})}));V.displayName=`ConfigMenuView(${_.default.id})`;const W=V,U={key:_.default.id,Icon:a,label:_.default.name,View:W}},72352:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(96540),o=r(40961),a=r(71468),i=r(50060),l=r(96092),s=r(74848);function c(){const{channel:e}=(0,i.HZ)(),{enabled:t,current:r,theme:c}=(0,a.d4)((e=>e[l.default.id].storage)),u=c[e.id]||c[r];return(0,n.useLayoutEffect)((()=>{if(t&&u)return document.documentElement.classList.add("theme-custom"),()=>document.documentElement.classList.remove("theme-custom")}),[u,t]),t&&u?o.createPortal((0,s.jsx)("style",{children:`\n html.theme-custom {\n ${Object.entries(u).map((([e,t])=>`--color-${e}: ${t} !important;`)).join("\n")}\n }\n `}),document.head):null}},96092:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"ThemeCustomizer",name:"테마 커스텀",description:"채널 별 혹은 전체 사이트 테마를 커스텀하는 기능을 제공합니다."}},51700:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$renamePreset:()=>d,$setCurrent:()=>c,$setPreset:()=>u,$toggleEnable:()=>s,default:()=>p,slice:()=>l});var n=r(43816),o=r(8070),a=r(96092);const i={storage:(0,o._W)(a.default.id,{version:3,enabled:!1,current:"",theme:{}},(function(e,t){if(!e)return t;switch(e?.version||0){case 0:case 1:case 2:{const t=[["highlight-color","bg-highlight"],["user-highlight","bg-highlight-user"],["border-navbar","bd-navbar"],["border-outer","bd-outer"],["border-inner","bd-inner"],["btn-hover","bd-btn-hover"],["visited-article","article-visited"]],r=Object.entries(e.theme).map((([e,r])=>(t.forEach((([e,t])=>{r[t]||(r[t]=r[e],delete r[e])})),[e,r]))),n={...e};return n.theme=Object.fromEntries(r),n.version=3,n}default:return console.warn("지원하지 않는 버전 데이터입니다.",e),t}}))},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$toggleEnable(e){e.storage.enabled=!e.storage.enabled},$setCurrent(e,t){e.storage.current=t.payload},$setPreset(e,t){const{key:r,preset:n}=t.payload;n?e.storage.theme[r]=n:delete e.storage.theme[r]},$renamePreset(e,t){const{prev:r,next:n}=t.payload;e.storage.theme[n]=e.storage.theme[r],delete e.storage.theme[r]}}}),{$toggleEnable:s,$setCurrent:c,$setPreset:u,$renamePreset:d}=l.actions,p=l.reducer},7183:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(96540),o=r(71468),a=r(61224),i=r(75003),l=r(74848);const s=(0,i.A)((0,l.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24m-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2z"}),"PeopleAltOutlined");var c=r(34540),u=r(38596);function d(){const e=(0,o.wA)(),{show:t}=(0,o.d4)((e=>e[c.default.id])),r=(0,n.useCallback)((()=>{e((0,u.toggleShow)())}),[e]);return(0,l.jsx)(a.A,{size:"small",variant:"text",startIcon:(0,l.jsx)(s,{}),onClick:r,children:t?"익명화 해제":"익명화"})}},87483:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25m-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75zm9 0H14v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12m0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5m0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2"}),"PeopleOutline");var i=r(96540),l=r(71468),s=r(14073),c=r(60538),u=r(49799),d=r(41695),p=r(34540),f=r(38596);const h=(0,i.forwardRef)(((e,t)=>{const{prefixList:r,suffixList:n,extraPrefix:a}=(0,l.d4)((e=>e[p.default.id].storage)),h=(0,i.useCallback)((e=>e.split("\n").filter((e=>e))),[]);return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(s.A,{variant:"subtitle1",children:p.default.name}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(d.YG,{divider:!0,primary:"익명화 앞단어",multiline:!0,manualSave:!0,value:r.join("\n"),action:f.$setPrefixList,saveFormat:h}),(0,o.jsx)(d.YG,{divider:!0,primary:"익명화 뒷단어",multiline:!0,manualSave:!0,value:n.join("\n"),action:f.$setSuffixList,saveFormat:h}),(0,o.jsx)(d.YG,{primary:"익명화 보조단어",secondary:"단어 조합보다 댓글이 더 많을 경우 사용됩니다.",value:a,action:f.$setExtraPrefix})]})})]})}));h.displayName=`ConfigMenuView(${p.default.id})`;const m=h,g={key:p.default.id,Icon:a,label:p.default.name,View:m}},61396:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(96540),o=r(71468),a=r(59839),i=r(21601),l=r(49802),s=r(36742),c=r(92020),u=r(34540),d=r(40961),p=r(74848);function f({container:e,children:t}){return d.createPortal((0,p.jsx)("span",{children:t}),e)}const h=(0,n.memo)(f),m=(0,p.jsx)(a.A,{styles:{".article-wrapper":{"& .user-info, & .avatar":{display:"none !important"}}}}),g=function(){const e=(0,s.f)(i.BH),{storage:t,show:r}=(0,o.d4)((e=>e[u.default.id])),a=(0,n.useRef)([]),[d,f]=(0,n.useState)([]);return(0,n.useEffect)((()=>{if(!e)return;const r=t.prefixList.reduce(((e,r)=>(e.push(...t.suffixList.map((e=>`${r} ${e}`))),e)),[]);r.sort((()=>Math.random()-.5));const n={},o=()=>{let e=0;const o=[...document.querySelectorAll(i.cS)].map(((o,i)=>{const s=(0,l.L)(o,i),c=new l.p(o).toUID(),u=n[c]||(n[c]=r.pop()||`${t.extraPrefix}${String(e+=1).padStart(3,"0")}`),d=a.current[i]||document.createElement("span");return d.classList.contains("anonymous")||(d.classList.add("anonymous"),a.current.push(d)),o.insertAdjacentElement("afterend",d),{key:s,nick:u,container:d}}));f(o)};return o(),window.addEventListener(c.z,o),()=>{window.removeEventListener(c.z,o)}}),[e,t]),r?(0,p.jsxs)(p.Fragment,{children:[m,d.map((({key:e,nick:t,container:r})=>(0,p.jsx)(h,{container:r,children:t},e)))]}):null}},34540:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"AnonymousNick",name:"익명화",description:"게시물 내 이용자들 닉네임을 임시로 숨깁니다."}},38596:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setExtraPrefix:()=>u,$setPrefixList:()=>s,$setSuffixList:()=>c,default:()=>p,slice:()=>l,toggleShow:()=>d});var n=r(43816),o=r(8070),a=r(34540);const i={storage:(0,o._W)(a.default.id,{prefixList:["웃는","화난","불쌍한","즐거운","건장한","해탈한","광기의","귀여운","곱슬머리","개구쟁이","자신있는","방구석","노래하는","책읽는","구르는","비틀거리는","힘든","순수한","행복한","불닭먹는"],suffixList:["미호","캬루","둘리","도바킨","테레사","윾돌이","보노보노","다비","공룡","아야"],extraPrefix:"비둘기"}),show:!1},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$setPrefixList(e,t){e.storage.prefixList=t.payload},$setSuffixList(e,t){e.storage.suffixList=t.payload},$setExtraPrefix(e,t){e.storage.extraPrefix=t.payload},toggleShow(e){e.show=!e.show}}}),{$setPrefixList:s,$setSuffixList:c,$setExtraPrefix:u,toggleShow:d}=l.actions,p=l.reducer},59860:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(75003),o=r(74848);const a={Icon:(0,n.A)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People"),label:"이용자",order:4}},98584:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(96540),o=r(63493),a=r(73185),i=r(21601),l=r(92020),s=r(36742),c=r(49802);const u={KT:{label:"KT",color:"blue",list:["1.96","1.97","1.98","1.99","1.100","1.101","1.102","1.103","1.104","1.105","1.106","1.107","1.108","1.109","1.110","1.111","39.4","39.5","39.6","39.7","49.16","49.17","49.18","49.19","49.20","49.21","49.22","49.23","49.24","49.25","49.26","49.27","49.28","49.29","49.30","49.31","49.56","49.57","49.58","49.59","49.60","49.61","49.62","49.63","110.68","110.69","110.70","110.71","116.200","116.201","118.234","118.235","119.194","163.213","163.222","163.229","163.255","175.216","175.217","175.218","175.219","175.220","175.221","175.222","175.223","211.246"]},SK:{label:"SK",color:"blue",list:["27.160","27.161","27.162","27.163","27.164","27.165","27.166","27.167","27.168","27.169","27.170","27.171","27.172","27.173","27.174","27.175","27.176","27.177","27.178","27.179","27.180","27.181","27.182","27.183","42.16","42.17","42.18","42.19","42.20","42.21","42.22","42.23","42.24","42.25","42.26","42.27","42.28","42.29","42.30","42.31","42.32","42.33","42.34","42.35","42.36","42.37","42.38","42.39","42.40","42.41","42.42","42.43","42.44","42.45","42.46","42.47","58.102","58.103","111.218","111.219","113.216","113.217","114.52","114.53","123.228","123.229","124.0","124.1","124.2","124.3","124.136","124.137","124.138","124.139","180.132","180.133","180.134","180.135","219.252","219.253","220.103","223.32","223.33","223.34","223.35","223.36","223.37","223.38","223.39","223.40","223.41","223.42","223.43","223.44","223.45","223.46","223.47","223.48","223.49","223.50","223.51","223.52","223.53","223.54","223.55","223.56","223.57","223.58","223.59","223.60","223.61","223.62","223.63"]},LG:{label:"LG",color:"blue",list:["106.96","109.97","109.98","109.99","106.100","106.101","106.102","106.103","117.110","117.111","211.36","223.168","223.169","223.170","223.171","223.172","223.173","223.174","223.175"]},zenmate:{label:"젠메이트",color:"red",list:["5.79","5.254","31.3","37.58","37.221","46.28","46.183","50.7","62.210","66.249","89.238","89.238","91.221","94.242","95.141","103.10","103.254","107.167","109.200","176.123","178.162","178.255","179.43","185.9","185.82","185.104","192.71","192.99","193.182","207.244","209.58"]},tor:{label:"토르",color:"red",list:["1.161","103.28","103.16","103.125","103.194","103.208","103.214","103.234","103.236","103.75","104.40","104.194","104.196","104.200","104.218","104.244","107.155","109.69","109.70","109.169","109.194","109.201","109.248","114.32","111.90","114.158","115.73","118.163","119.237","122.147","123.30","124.109","125.212","126.75","128.14","128.199","128.31","130.149","137.74","138.197","139.162","139.28","139.99","142.44","142.58","142.93","143.202","144.217","145.239","149.202","151.53","151.73","151.77","153.229","154.127","156.54","157.157","157.161","157.230","158.174","158.69","159.89","160.119","160.202","162.213","162.244","162.247","163.172","164.132","164.77","166.70","167.114","167.86","167.99","169.197","171.22","171.244","171.25","172.96","172.98","173.14","173.199","173.212","173.244","173.255","176.10","176.126","176.152","176.214","176.31","176.53","177.205","178.128","178.165","178.17","178.175","178.20","178.239","178.254","178.32","178.9","179.43","179.48","18.18","18.85","180.149","180.150","184.75","185.10","185.100","185.103","185.104","185.107","185.112","185.113","185.117","185.121","185.125","185.127","185.129","185.14","185.147","185.158","185.162","185.165","185.169","185.175","185.177","185.193","185.195","185.203","185.220","185.222","185.227","185.233","185.234","185.242","185.244","185.248","185.255","185.4","185.56","185.61","185.65","185.66","185.72","185.86","185.9","186.214","187.178","188.166","188.214","188.65","189.84","190.10","190.164","190.210","190.216","191.114","191.243","191.32","192.160","192.195","192.227","192.34","192.42","192.68","193.110","193.150","193.169","193.201","193.36","193.56","193.9","193.90","194.71","194.99","195.123","195.176","195.206","195.228","195.254","196.41","197.231","198.167","198.211","198.46","198.50","198.96","198.98","199.127","199.195","199.249","199.87","200.52","200.86","200.98","201.80","203.78","204.11","204.17","204.194","204.8","204.85","205.168","205.185","206.248","206.55","207.244","208.12","209.126","209.141","209.95","210.140","210.160","212.16","212.21","212.47","212.75","212.81","213.108","213.136","213.160","213.202","213.252","213.61","213.95","216.218","216.239","217.115","217.12","217.170","220.135","223.26","23.129","23.239","24.20","24.3","27.122","31.131","31.185","31.220","31.31","35.0","37.128","37.139","37.187","37.220","37.228","37.28","37.48","40.124","41.215","41.77","45.114","45.125","45.32","45.33","45.35","45.56","45.76","45.79","46.101","46.165","46.166","46.173","46.182","46.194","46.23","46.246","46.29","46.38","46.98","5.135","5.150","5.189","5.196","5.199","5.2","5.252","5.3","5.34","5.39","5.79","50.247","51.15","51.254","51.255","51.38","51.68","51.75","51.77","52.167","54.36","54.37","54.39","58.153","58.96","59.127","62.102","62.210","62.212","62.219","62.98","64.113","64.27","65.181","65.19","66.110","66.146","66.155","66.175","66.42","66.70","67.163","67.215","69.162","69.164","70.168","71.19","72.14","72.210","72.221","72.83","73.15","74.82","77.141","77.247","77.55","77.73","77.81","78.109","78.142","78.46","79.117","79.134","79.141","79.172","80.127","80.241","80.67","80.68","80.79","81.17","82.118","82.151","82.221","82.223","82.228","82.94","84.19","84.200","84.209","85.214","85.235","85.248","86.123","86.124","86.127","86.148","87.101","87.118","87.120","87.123","87.247","88.130","88.76","89.234","89.236","89.247","89.31","91.132","91.146","91.203","91.207","91.213","91.219","91.231","92.116","92.222","92.63","93.174","93.55","94.100","94.102","94.140","94.168","94.230","94.242","94.32","95.128","95.130","95.142","95.143","95.168","95.179","95.211","95.216","96.66","96.70","97.74","98.174"]},hola:{label:"홀라",color:"red",list:["103.18","104.131","106.185","106.186","106.187","107.161","107.170","107.181","107.190","107.191","107.22","108.61","109.74","14.136","149.154","149.62","151.236","158.255","162.217","162.218","162.221","162.243","167.88","168.235","176.58","176.9","177.67","178.209","178.79","192.110","192.121","192.184","192.211","192.241","192.30","192.40","192.73","192.81","192.99","198.147","198.58","199.241","208.68","209.222","213.229","217.78","23.227","23.249","23.29","31.193","37.235","41.223","46.17","46.19","46.4","5.9","50.116","54.225","54.243","66.85","77.237","81.4","85.234","88.150","91.186","92.48","94.76","95.215","96.126"]}};var d=r(74848);function p(){const e=(0,s.f)(i.uy),t=(0,n.useRef)([]),[r,p]=(0,n.useState)([]);return(0,n.useEffect)((()=>{const r=()=>{const e=[...document.querySelectorAll(i.nc)].map(((e,r)=>{if(new c.p(e).type!==c.p.TYPE_IP)return null;const n=(0,c.L)(e,r),o=new c.p(e).id,{label:a,color:i}=Object.values(u).find((({list:e})=>e.includes(o)))||{label:"고정",color:"green"},l=t.current[r]||document.createElement("span");return l.classList.contains("ip-info")||(l.classList.add("ip-info"),t.current.push(l)),e.append(l),{key:n,label:a,color:i,container:l}})).filter((e=>e));p(e)};e&&r(),window.addEventListener(l.U,r),window.addEventListener(l.z,r)}),[e]),(0,d.jsx)(d.Fragment,{children:r.map((({key:e,label:t,color:r,container:n})=>(0,d.jsx)(o.Z,{container:n,children:(0,d.jsx)(a.s4,{color:r,children:t})},e)))})}},83873:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"IPInfo",name:"아이피 정보",description:"유동 이용자의 IP 정보 조회"}},64788:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(28204),o=r(96540),a=r(71468),i=r(50936),l=r(14073),s=r(61224),c=r(60538),u=r(49799),d=r(73896),p=r(82241),f=r(71451),h=r.n(f),m=r(8120),g=r(98818),v=r(41695),b=r(28027),y=r(33864),x=r(41296),w=r(74848);const A=[{field:"id",headerName:"이용자",flex:2,renderCell:function(e){let t=e.row.id,r=!1;return t.includes("#")&&(t=`${e.row.nick}${e.row.id}`),t.includes(".")&&(t=`${e.row.nick}(${e.row.id})`,r=!0),(0,w.jsxs)(i.A,{sx:{width:"100%"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,w.jsx)(l.A,{sx:{overflow:"hidden",textOverflow:"ellipsis"},variant:"body2",children:t}),!r&&(0,w.jsx)(s.A,{sx:{minWidth:40,px:"3px"},size:"small",onClick:()=>(0,b.ho)(`https://arca.live/u/@${t.replace("#","/")}`,b.u6),children:(0,w.jsx)(g.A,{})})]})}},{field:"msg",headerName:"메모 메세지",flex:2,editable:!0},{field:"color",headerName:"메모 색상",flex:1,editable:!0},{field:"nick",hide:!0}],C=(0,m.Mz)((e=>e[y.default.id].storage.memo),(e=>Object.entries(e).map((([e,{msg:t="",color:r="",nick:n=""}])=>({id:e,msg:t,color:r,nick:n}))))),S=(0,o.forwardRef)(((e,t)=>{const r=(0,a.wA)(),{variant:n,contextRange:f}=(0,a.d4)((e=>e[y.default.id].storage)),m=(0,a.d4)((e=>e[y.default.id].storage.memo)),g=(0,a.d4)(C),b=(0,o.useRef)(),S=(0,o.useCallback)((e=>{(async()=>{try{const t=e.target.files[0],n=await new Promise((e=>{const r=new FileReader;r.onload=()=>{const t=JSON.parse(r.result);e(t.data)},r.readAsText(t)})),o={...m};n.forEach((({userType:e,memoKey:t,memoText:r})=>{switch(e){case 1:(o[`#${t}`]??={}).msg=r;break;case 0:case 2:(o[t]??={}).msg=r}})),r((0,x.$setMemoList)(o))}catch(e){console.error(e)}})()}),[r,m]),k=(0,o.useCallback)((()=>{const e=/^[0-9]{1,3}\.[0-9]{1,3}$/,t={version:1,data:g.map((({id:t,msg:r})=>{const n={userType:0,memoKey:t.replace("#",""),memoText:r};return e.test(t)&&(n.userType=2),t.startsWith("#")&&(n.userType=1),n}))},r=new Blob([JSON.stringify(t)],{type:"text/plain"}).stream(),n=h().createWriteStream("ArcaRefresher-memo.json");return r.pipeTo(n)}),[g]),_=(0,o.useCallback)((e=>{const t=e.map((({id:e,msg:t,color:r,nick:n})=>[e,{msg:t,color:r,nick:n}]));r((0,x.$setMemoList)(Object.fromEntries(t)))}),[r]);return(0,w.jsxs)(o.Fragment,{ref:t,children:[(0,w.jsx)(l.A,{variant:"subtitle1",children:y.default.name}),(0,w.jsx)(c.A,{children:(0,w.jsxs)(u.A,{disablePadding:!0,children:[(0,w.jsxs)(v.FF,{divider:!0,primary:"우클릭 메뉴 호출 범위",value:f,action:x.$setContextRange,children:[(0,w.jsx)(d.A,{value:"articleItem",children:"게시글"}),(0,w.jsx)(d.A,{value:"nickname",children:"닉네임"})]}),(0,w.jsxs)(v.FF,{divider:!0,primary:"메모 모양",value:n,action:x.$setVariant,children:[(0,w.jsx)(d.A,{value:"badge",children:"둥근 뱃지"}),(0,w.jsx)(d.A,{value:"text",children:"텍스트"}),(0,w.jsx)(d.A,{value:"none",children:"없음"})]}),(0,w.jsxs)(v.Qh,{divider:!0,column:"lg",header:(0,w.jsx)(p.A,{primary:"공앱 메모 데이터",secondary:"공앱 포맷에 맞는 파일로 내보내거나 가져옵니다."}),children:[(0,w.jsxs)(i.A,{sx:{minWidth:180,width:"100%"},direction:"row",gap:1,children:[(0,w.jsx)(s.A,{sx:{width:"100%"},onClick:()=>b.current.click(),children:"가져오기"}),(0,w.jsx)(s.A,{sx:{width:"100%"},disabled:0===g.length,onClick:k,children:"내보내기"})]}),(0,w.jsx)("input",{ref:b,type:"file",accept:".json, .txt",onChange:S,style:{display:"none"}})]}),(0,w.jsx)(v.r6,{primary:"저장된 메모",columns:A,rows:g,textEditable:!0,noRowsText:"저장된 메모가 없습니다.",onChange:_})]})})]})}));S.displayName=`ConfigMenuView(${y.default.id})`;const k=S,_={key:y.default.id,Icon:n.A,label:y.default.name,View:k}},31569:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(49799),s=r(73896),c=r(57873),u=r(14073),d=r(28204),p=r(21601),f=r(89930),h=r(49802),m=r(41296),g=r(33864),v=r(58031),b=r(46831),y=r(11641),x=r(22477),w=r(42471),A=r(58763),C=r(61224),S=r(17809),k=r(75003),_=r(74848);const E=(0,k.A)((0,_.jsx)("path",{d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27z"}),"FormatColorReset");var j=r(65189);function R({open:e,defaultValue:t,onClose:r,onSubmit:o}){const[a,i]=(0,n.useState)(""),[l,s]=(0,n.useState)("");(0,n.useEffect)((()=>{e&&(i(t.msg),s(t.color))}),[t,e]);const c=(0,n.useCallback)((e=>{i(e.target.value)}),[]),d=(0,n.useCallback)((e=>{s(e.hex)}),[]),p=(0,n.useCallback)(((e,t)=>{"backdropClick"!==t&&r()}),[r]),f=(0,n.useCallback)((e=>{e.key&&"Enter"!==e.key||(o({msg:a,color:l}),r())}),[a,l,r,o]);return(0,_.jsxs)(v.A,{sx:{maxWidth:"xs"},open:e,onClose:p,children:[(0,_.jsx)(b.A,{children:"메모 작성"}),(0,_.jsx)(y.A,{size:"large",sx:{position:"absolute",top:8,right:8},onClick:p,children:(0,_.jsx)(S.A,{})}),(0,_.jsxs)(x.A,{dividers:!0,children:[(0,_.jsx)(u.A,{gutterBottom:!0,children:"저장할 메모를 작성해주세요"}),(0,_.jsx)(w.A,{autoFocus:!0,fullWidth:!0,size:"small",margin:"normal",label:"메세지",value:a,inputProps:{style:{color:l}},onChange:c,onKeyDown:f}),(0,_.jsx)(j.W$,{triangle:"hide",color:l,onChangeComplete:d})]}),(0,_.jsxs)(A.A,{children:[(0,_.jsx)(C.A,{onClick:()=>s(""),children:(0,_.jsx)(E,{})}),(0,_.jsx)(C.A,{variant:"contained",color:"primary",onClick:f,children:"저장"})]})]})}R.defaultProps={defaultValue:{msg:"",color:""}},R.propTypes={open:i().bool,defaultValue:i().object,onClose:i().func,onSubmit:i().func};const M=R;function P({target:e,closeMenu:t}){const r=(0,o.wA)(),{memo:a,contextRange:i}=(0,o.d4)((e=>e[g.default.id].storage)),[v,b]=(0,n.useState)(!1);let y;switch(i){case"articleItem":y=`${p.Kh}, ${p.nc}, ${p.jM}`;break;case"nickname":y=`${p.nc}, ${p.jM}`;break;default:console.warn("[Memo] contextRange 값이 올바르지 않음"),y=`${p.nc}, ${p.jM}`}const x=(0,f.E)({key:g.default.id,selector:y,dataExtractor:()=>{if(!e)return;let t=e;return e.matches(".vrow")&&(t=e.querySelector("span.user-info")),t?new h.p(t):void 0}},[e]),w=(0,n.useCallback)((()=>{b(!0),t()}),[t]),A=(0,n.useCallback)((()=>{b(void 0)}),[]),C=(0,n.useCallback)((({msg:e,color:t})=>{r((0,m.$setMemo)({user:x.toUID(),memo:{msg:e,color:t,nick:x.nick}}))}),[x,r]);if(!x)return null;const S=x.toUID(),k="메모 "+(a[S]?.msg?`(${a[S].msg})`:"");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l.A,{children:(0,_.jsxs)(s.A,{onClick:w,children:[(0,_.jsx)(c.A,{children:(0,_.jsx)(d.A,{})}),(0,_.jsx)(u.A,{children:k})]})}),(0,_.jsx)(M,{open:v,defaultValue:a[S],onClose:A,onSubmit:C})]})}P.propTypes={target:i().object,closeMenu:i().func};const O=P,I={key:g.default.id,View:O,order:201}},77700:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(96540),o=r(63493),a=r(71468),i=r(21601),l=r(73185),s=r(92020),c=r(36742),u=r(49802),d=r(78383),p=r(33864),f=r(41296),h=r(74848);const m=function(){const e=(0,a.wA)(),t=(0,c.f)(i.uy),{variant:r,memo:m}=(0,a.d4)((e=>e[p.default.id].storage)),g=(0,n.useRef)([]),[v,b]=(0,n.useState)([]);return(0,n.useLayoutEffect)((()=>{if(!t)return;const e=()=>{const e=[...document.querySelectorAll(i.nc)].map(((e,t)=>{const r=(0,u.L)(e,t),n=new u.p(e).toUID(),o=g.current[t]||document.createElement("span");return o.classList.contains("memo")||(o.classList.add("memo"),g.current.push(o)),e.append(o),{key:r,id:n,container:o}}));b(e)};return e(),window.addEventListener(s.U,e),window.addEventListener(s.z,e),()=>{window.removeEventListener(s.U,e),window.removeEventListener(s.z,e)}}),[t]),(0,n.useLayoutEffect)((()=>{if(!t)return;const r=(0,d.$Z)(),n=Object.keys(r),o=["after","before","near"],a=parseInt(r.p,10),l=n.some((e=>o.includes(e)));a>1||l||[...document.querySelectorAll(i.n1)].forEach((t=>{const r=new u.p(t),{nick:n}=r,o=r.toUID();m[o]&&m[o].nick!==n&&e((0,f.$updateMemoNick)({user:o,nick:n}))}))}),[t,m,e]),(0,n.useLayoutEffect)((()=>{const e=()=>{[...document.querySelectorAll(i.nc)].forEach((e=>{const t=new u.p(e).toUID();m[t]?.color?(e.style.setProperty("color",m[t].color,"important"),e.style.setProperty("font-weight","bold"),e.querySelector("a")?.style.setProperty("color",m[t].color,"important")):(e.style.removeProperty("color"),e.style.removeProperty("font-weight"),e.querySelector("a")?.style.removeProperty("color"))}))};return t&&e(),window.addEventListener(s.U,e),window.addEventListener(s.z,e),()=>{window.removeEventListener(s.U,e),window.removeEventListener(s.z,e)}}),[m,t]),"none"===r?null:(0,h.jsx)(h.Fragment,{children:v.map((({key:e,id:t,container:n})=>(0,h.jsx)(o.Z,{container:n,children:(0,h.jsx)(l.s4,{variant:r,children:m[t]?.msg})},e)))})}},33864:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"Memo",name:"메모",description:"이용자 메모 기능을 제공합니다."}},41296:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setContextRange:()=>s,$setMemo:()=>u,$setMemoList:()=>p,$setVariant:()=>c,$updateMemoNick:()=>d,default:()=>f,slice:()=>l});var n=r(43816),o=r(8070),a=r(33864);const i={storage:(0,o._W)(a.default.id,{version:1,contextRange:"nickname",variant:"badge",memo:{}},(function(e,t){if(!e)return t;if(0===(e?.version||0)){const t=Object.fromEntries(Object.entries(e.memo).map((([e,t])=>[e,{msg:t}]))),r=(0,o._W)("UserColor");r&&(Object.entries(r.color).forEach((([e,r])=>{(t[e]??={}).color=r})),(0,o.Tc)("UserColor"));const n={...e};return n.memo=t,n.version=1,n}return console.warn("지원하지 않는 버전 데이터입니다.",e),t}))},l=(0,n.Z0)({name:a.default.id,initialState:i,reducers:{$setContextRange(e,t){e.storage.contextRange=t.payload},$setVariant(e,t){e.storage.variant=t.payload},$setMemo(e,t){const{user:r,memo:n}=t.payload;n.msg||n.color?e.storage.memo[r]=n:delete e.storage.memo[r]},$updateMemoNick(e,t){const{user:r,nick:n}=t.payload;e.storage.memo[r].nick=n},$setMemoList(e,t){e.storage.memo=t.payload}}}),{$setContextRange:s,$setVariant:c,$setMemo:u,$updateMemoNick:d,$setMemoList:p}=l.actions,f=l.reducer},12673:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(75003),o=r(74848);const a=(0,n.A)((0,o.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 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-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1z"}),"AssignmentInd");var i=r(96540),l=r(71468),s=r(14073),c=r(60538),u=r(49799),d=r(73896),p=r(28027),f=r(41695),h=r(85398),m=r(22578);const g=(0,i.forwardRef)(((e,t)=>{const{avatar:r,showId:n,indicateMyComment:a,contextRange:g,openType:v,checkSpamAccount:b}=(0,l.d4)((e=>e[m.default.id].storage));return(0,o.jsxs)(i.Fragment,{ref:t,children:[(0,o.jsx)(s.A,{variant:"subtitle1",children:m.default.name}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"모양 설정"}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsx)(f.p9,{divider:!0,primary:"이용자 아바타 표시",value:r,action:h.$toggleAvatar}),(0,o.jsx)(f.p9,{divider:!0,primary:"반고닉 이용자 고유아이디 표시",secondary:"로그인 상태에서 정상동작합니다",value:n,action:h.$toggleIdVisible}),(0,o.jsx)(f.p9,{primary:"작성한 댓글 표시",secondary:"로그인 상태에서만 동작합니다",value:a,action:h.$toggleIndicateMyComment})]})}),(0,o.jsx)(s.A,{variant:"subtitle2",children:"우클릭 메뉴"}),(0,o.jsx)(c.A,{children:(0,o.jsxs)(u.A,{disablePadding:!0,children:[(0,o.jsxs)(f.FF,{divider:!0,primary:"호출 범위",value:g,action:h.$setContextRange,children:[(0,o.jsx)(d.A,{value:"articleItem",children:"게시글"}),(0,o.jsx)(d.A,{value:"nickname",children:"닉네임"})]}),(0,o.jsxs)(f.FF,{divider:!0,primary:"프로필 및 검색 창을 여는 방식",value:v,action:h.$setOpenType,children:[(0,o.jsx)(d.A,{value:p.eN,children:"열려있는 창에서"}),(0,o.jsx)(d.A,{value:p.u6,children:"새 창으로"}),(0,o.jsx)(d.A,{value:p.h4,children:"백그라운드 창으로"})]}),(0,o.jsx)(f.p9,{primary:"글, 댓글 갯수 표시",value:b,action:h.$toggleCheckSpamAccount})]})})]})}));g.displayName=`ConfigMenuView(${m.default.id})`;const v=g,b={key:m.default.id,order:-1,Icon:a,label:m.default.name,View:v}},59121:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(96540),o=r(71468),a=r(5556),i=r.n(a),l=r(73896),s=r(14073),c=r(49799),u=r(57873),d=r(75003),p=r(74848);const f=(0,d.A)((0,p.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person");var h=r(17332),m=r(68125),g=r(21601),v=r(89930),b=r(46117),y=r(50060),x=r(49802),w=r(28027),A=r(78383),C=r(22578);const S="https://arca.live/u/@";function k({target:e,closeMenu:t}){const r=(0,b.X)(),{contextRange:a,openType:i,checkSpamAccount:d}=(0,o.d4)((e=>e[C.default.id].storage)),{channel:k}=(0,y.HZ)();let _;switch(a){case"articleItem":_=`${g.Kh}, ${g.nc}, ${g.jM}`;break;case"nickname":_=`${g.nc}, ${g.jM}`;break;default:console.warn("[UserProfile] contextRange 값이 올바르지 않음"),_=`${g.nc}, ${g.jM}`}const[E,j]=(0,n.useState)(void 0),R=(0,v.E)({key:C.default.id,selector:_,dataExtractor:()=>{if(!e)return;let t=e;if(e.matches(".vrow")&&(t=e.querySelector("span.user-info")),!t)return;const r=new x.p(t);if(r.type===x.p.TYPE_IP)return;const n=r.toString(),o=n.replace("#","/");return d&&(j(void 0),fetch(`${S}${o}`).then((e=>(e.ok||j({article:-1,comment:-1}),e.text()))).then((e=>{const t=(0,A.YE)(e);if(t.querySelector(".error-page"))return void j({article:-1,comment:-1});const r=[...t.querySelectorAll(".card-block .user-recent, .card-block .clearfix")],n=r.findIndex((e=>e.matches(".clearfix")));j({article:n,comment:r.length-n-1})}))),{id:n,url:o}}},[e,d]),M=(0,n.useCallback)((()=>{(0,w.ho)(`${S}${R.url}`,i),t()}),[t,R,i]),P=(0,n.useCallback)((async()=>{try{t(),await navigator.clipboard.writeText(`@${R.id}`)}catch(e){r({msg:"클립보드 액세스 권한이 없습니다.",time:3e3}),console.error(e)}}),[t,R,r]),O=(0,n.useCallback)((async()=>{(0,w.ho)(`https://arca.live/b/breaking?target=nickname&keyword=${R.id.split("#")[0]}`,i),t()}),[t,R,i]),I=(0,n.useCallback)((async()=>{(0,w.ho)(`https://arca.live/b/${k.id}?target=nickname&keyword=${R.id.split("#")[0]}`,i),t()}),[k,t,R,i]);let T=d&&(0,p.jsx)(l.A,{disabled:!0,children:(0,p.jsx)(s.A,{children:"글, 댓글 수 조회 중..."})});if(E)if(E.article<0||E.comment<0)T=(0,p.jsx)(l.A,{disabled:!0,children:(0,p.jsx)(s.A,{children:"조회 실패"})});else{const e=`글: ${15===E.article?"15 ↑":E.article}`,t=`댓글: ${15===E.comment?"15 ↑":E.comment}`;T=(0,p.jsx)(l.A,{disabled:!0,children:(0,p.jsx)(s.A,{children:`${e} / ${t}`})})}return R?(0,p.jsxs)(c.A,{children:[T,(0,p.jsxs)(l.A,{onClick:M,children:[(0,p.jsx)(u.A,{children:(0,p.jsx)(f,{})}),(0,p.jsx)(s.A,{children:"사용자 정보"})]}),(0,p.jsxs)(l.A,{onClick:P,children:[(0,p.jsx)(u.A,{children:(0,p.jsx)(h.A,{})}),(0,p.jsx)(s.A,{children:"멘션 아이디 복사"})]}),(0,p.jsxs)(l.A,{onClick:I,children:[(0,p.jsx)(u.A,{children:(0,p.jsx)(m.A,{})}),(0,p.jsx)(s.A,{children:"채널 내 검색"})]}),(0,p.jsxs)(l.A,{onClick:O,children:[(0,p.jsx)(u.A,{children:(0,p.jsx)(m.A,{})}),(0,p.jsx)(s.A,{children:"종합속보 검색"})]})]}):null}k.propTypes={target:i().object,closeMenu:i().func};const _=k,E={key:C.default.id,View:_,order:200}},38426:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(96540),o=r(71468),a=r(59839),i=r(21601),l=r(92020),s=r(50060),c=r(36742),u=r(49802),d=r(83502),p=r(22578),f=r(74848);function h({value:e}){return e?null:(0,f.jsx)(a.A,{styles:{".avatar":{display:"none !important"},".input-wrapper > .input":{width:"calc(100% - 5rem) !important"}}})}const m=(0,f.jsx)(a.A,{styles:{".mynick":{fontWeight:"bold"}}}),g=function(){const[e,t]=(0,d._)(),r=(0,c.f)(i.uy),{user:a}=(0,s.HZ)(),{showId:g,avatar:v,indicateMyComment:b}=(0,o.d4)((e=>e[p.default.id].storage));return(0,n.useLayoutEffect)((()=>{if(!r)return;if(!g)return;const e=()=>{[...document.querySelectorAll(i.nc)].forEach((e=>{const t=new u.p(e);t.type===u.p.TYPE_HALF&&(e.firstElementChild.textContent=`${e.firstElementChild.textContent.includes("@")?"@":""}${t.toString()}`)}))};return e(),window.addEventListener(l.U,e),window.addEventListener(l.z,e),()=>{[...document.querySelectorAll(i.nc)].forEach((e=>{const[t]=e.firstElementChild.textContent.split("#");e.firstElementChild.textContent=t})),window.removeEventListener(l.U,e),window.removeEventListener(l.z,e)}}),[r,g]),(0,n.useEffect)((()=>{if(!g)return;const r={callback:e=>{const t=e.data.split("|");if("n"!==t[0])return;const r=JSON.parse(t[1]),[n,o]=r.username.split("#");o&&(r.mediaUrl&&(r.title=r.title.replace(n,r.username)),r.message=r.message.replace(n,r.username)),e.data=`${t[0]}|${JSON.stringify(r)}`},type:"before"};return e(r),()=>t(r)}),[g,e,t]),(0,n.useEffect)((()=>{if(!g)return;const r={callback:e=>{const t=e.data.split("|");if("nc"!==t[0]||!t[1])return;const r=JSON.parse(t[1]),n=r.nickname.split('data-filter="')[1].split('"')[0];-1!==n.indexOf("#")&&(r.nickname=r.nickname.replace(/">[^>]+<\/a>/,`">${n}`),e.data=`${t[0]}|${JSON.stringify(r)}`)},type:"before"};return e(r),()=>t(r)}),[g,e,t]),(0,n.useEffect)((()=>{if(!b)return;if(!a)return;const e=()=>{[...document.querySelectorAll(i.Z_)].forEach((e=>{new u.p(e).id===a.id&&e.classList.add("mynick")}))};return e(),window.addEventListener(l.z,e),()=>{[...document.querySelectorAll(i.Z_)].forEach((e=>{e.classList.remove("mynick")})),window.removeEventListener(l.z,e)}}),[a,b]),(0,f.jsxs)(f.Fragment,{children:[m,(0,f.jsx)(h,{value:v})]})}},22578:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={id:"UserProfile",name:"유저 프로필",description:"유저 프로필 관련 추가 메뉴 지원"}},85398:(e,t,r)=>{"use strict";r.r(t),r.d(t,{$setContextRange:()=>f,$setOpenType:()=>h,$toggleAvatar:()=>u,$toggleCheckSpamAccount:()=>m,$toggleIdVisible:()=>d,$toggleIndicateMyComment:()=>p,default:()=>g,slice:()=>c});var n=r(43816),o=r(8070),a=r(28027),i=r(22578);const l={version:1,avatar:!0,showId:!1,indicateMyComment:!1,contextRange:"nickname",openType:a.u6,checkSpamAccount:!1},s={storage:(0,o._W)(i.default.id,l)},c=(0,n.Z0)({name:i.default.id,initialState:s,reducers:{$toggleAvatar(e){e.storage.avatar=!e.storage.avatar},$toggleIdVisible(e){e.storage.showId=!e.storage.showId},$toggleIndicateMyComment(e){e.storage.indicateMyComment=!e.storage.indicateMyComment},$setContextRange(e,t){e.storage.contextRange=t.payload},$setOpenType(e,t){e.storage.openType=t.payload},$toggleCheckSpamAccount(e){e.storage.checkSpamAccount=!e.storage.checkSpamAccount}}}),{$toggleAvatar:u,$toggleIdVisible:d,$toggleIndicateMyComment:p,$setContextRange:f,$setOpenType:h,$toggleCheckSpamAccount:m}=c.actions,g=c.reducer},56764:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={Icon:r(9547).A,label:"글작성",order:3}},75771:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>q});var n=r(42828),o=r(96540),a=r(71468),i=r(14073),l=r(60538),s=r(49799),c=r(82241),u=r(41695),d=r(47891),p=r(15415),f=r(5556),h=r.n(f),m=r(50936),g=r(2071),v=r(73896),b=r(72730),y=r(61224),x=r(42471),w=r(58031),A=r(46831),C=r(22477),S=r(58763),k=r(9899),_=r(22529),E=r(99682),j=r(67110),R=r(12933),M=r(75003),P=r(74848);const O=(0,M.A)((0,P.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel"),I=(0,M.A)((0,P.jsx)("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm2 4v-2H3c0 1.1.89 2 2 2M3 9h2V7H3zm12 12h2v-2h-2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 12H9V5h10zm-8 6h2v-2h-2zm-4 0h2v-2H7z"}),"FlipToFront"),T=(0,M.A)((0,P.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}),"FileCopy");var $=r(50060);function L({folderList:e,currentFolder:t,onSelect:r,onCreate:n,onRemove:o}){return(0,P.jsxs)(m.A,{sx:{width:"100%"},direction:"row",gap:1,children:[(0,P.jsx)(g.A,{sx:{flexGrow:1,width:0},value:t,onChange:r,children:e.map((e=>(0,P.jsx)(v.A,{value:e,children:"_shared_"===e?"공용 폴더":e},e)))}),(0,P.jsxs)(b.A,{children:[(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(E.A,{}),onClick:n,children:"추가"}),(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(j.A,{}),disabled:"_shared_"===t,onClick:o,children:"삭제"})]})]})}const z=/^[0-9a-zA-Zㄱ-힣]*$/;function F({initialValue:e,validate:t,onDone:r,onCancel:n}){const[a,i]=(0,o.useState)(e),[l,s]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{s(t(a))}),[t,a]),(0,P.jsxs)(m.A,{sx:{width:"100%"},direction:"row",gap:1,children:[(0,P.jsx)(x.A,{sx:{flexGrow:1,width:0},autoFocus:!0,size:"small",value:a,error:l,onChange:e=>{z.test(a)&&i(e.target.value)},onFocus:e=>e.target.select(),onKeyUp:e=>{"Enter"===e.key&&r(a),"Escape"===e.key&&n()}}),(0,P.jsxs)(b.A,{children:[(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(R.A,{}),disabled:l,onClick:()=>r(a),children:"확인"}),(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(O,{}),onClick:n,children:"취소"})]})]})}function D({moving:e,disabled:t,onMove:r,onCopy:n,onCancel:o,onMoving:a,onRemove:i}){return e?(0,P.jsxs)(m.A,{direction:"row",justifyContent:"end",children:[(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(I,{}),disabled:t,name:"move",onClick:r,children:"이동"}),(0,P.jsx)(y.A,{startIcon:(0,P.jsx)(T,{}),disabled:t,name:"copy",onClick:n,children:"복사"}),(0,P.jsx)(y.A,{variant:"text",startIcon:(0,P.jsx)(O,{}),onClick:o,children:"취소"})]}):(0,P.jsxs)(m.A,{direction:"row",justifyContent:"end",children:[(0,P.jsx)(y.A,{variant:"text",startIcon:(0,P.jsx)(I,{}),disabled:t,onClick:a,children:"이동/복사"}),(0,P.jsx)(y.A,{variant:"text",startIcon:(0,P.jsx)(j.A,{}),disabled:t,onClick:i,children:"선택 삭제"})]})}function N(){return(0,P.jsx)(k.$,{children:"저장된 자짤이 없습니다."})}const B=[{field:"url",headerName:"이미지 주소",flex:1},{field:"memo",headerName:"메모",flex:1,editable:!0}];function H({gallery:e}){const t=(0,a.wA)(),{channel:r}=(0,$.HZ)(),[n,i]=(0,o.useState)("_shared_"),[s,c]=(0,o.useState)("_shared_"),[u,d]=(0,o.useState)(!1),[f,h]=(0,o.useState)(null),[g,v]=(0,o.useState)([]),[b,x]=(0,o.useState)(!1),k=(0,o.useRef)(null),E=(0,o.useMemo)((()=>Object.keys(e)),[e]),j=(0,o.useMemo)((()=>e[f?s:n]),[e,f,s,n]);(0,o.useEffect)((()=>{v([])}),[n]);const R=(0,o.useCallback)((e=>{f?c(e.target.value):i(e.target.value)}),[f]),M=(0,o.useCallback)((e=>{t((0,p.$addFolder)(e)),i(e),d(!1)}),[t]),O=(0,o.useCallback)((async()=>{x(!0),await new Promise((e=>{k.current=e}))?(i("_shared_"),t((0,p.$removeFolder)(n)),x(!1)):x(!1)}),[t,n]),I=(0,o.useCallback)((()=>{if(f)return void h(null);const e=j.filter((e=>g.includes(e.url)));h(e)}),[j,g,f]),T=(0,o.useCallback)((()=>{const r=e[s],o=e[n],a=[...r,...f].reverse().filter(((e,t,r)=>t===r.findIndex((t=>t.url===e.url)))).reverse(),l=o.filter((e=>!f.some((t=>t.url===e.url))));t((0,p.$setFolderData)({folder:s,list:a})),t((0,p.$setFolderData)({folder:n,list:l})),v([]),i(s),h(null)}),[e,s,n,f,t]),z=(0,o.useCallback)((()=>{const r=[...e[s],...f].reverse().filter(((e,t,r)=>t===r.findIndex((t=>t.url===e.url)))).reverse();t((0,p.$setFolderData)({folder:s,list:r})),v([]),i(s),h(null)}),[e,s,f,t]),H=(0,o.useCallback)((()=>{const r=e[n].filter((e=>!g.some((t=>t===e.url))));t((0,p.$setFolderData)({folder:n,list:r})),v([])}),[e,n,g,t]),V=(0,o.useCallback)((({id:e,field:r,value:o})=>{const a=j.map((t=>t.url===e?{...t,[r]:o}:t));t((0,p.$setFolderData)({folder:n,list:a}))}),[n,j,t]),W=(0,o.useCallback)((()=>{k.current(!0)}),[]),U=(0,o.useCallback)((()=>{k.current(!1)}),[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(m.A,{sx:{width:"100%"},children:[(0,P.jsx)(l.A,{elevation:0,sx:{marginBottom:1},children:u?(0,P.jsx)(F,{initialValue:r.id,validate:e=>""===e||E.includes(e),onDone:M,onCancel:()=>d(!1)}):(0,P.jsx)(L,{folderList:E,currentFolder:f?s:n,onSelect:R,onCreate:()=>d(!0),onRemove:O})}),(0,P.jsx)(_.z,{rows:j,getRowId:e=>e.url,columns:B,autoHeight:!0,rowHeight:40,pagination:!0,disableColumnMenu:!0,disableSelectionOnClick:!0,checkboxSelection:!f,components:{Toolbar:D,NoRowsOverlay:N},componentsProps:{toolbar:{moving:!!f,disabled:f?n===s:!(g.length>0),onMove:T,onCopy:z,onCancel:I,onMoving:I,onRemove:H}},initialState:{pagination:{pageSize:10}},selectionModel:g,rowsPerPageOptions:[10,25,50,100],onCellEditCommit:V,onSelectionModelChange:e=>v(e)})]}),(0,P.jsxs)(w.A,{open:b,onClose:U,children:[(0,P.jsx)(A.A,{children:"폴더 삭제"}),(0,P.jsx)(C.A,{children:`'${n}' 폴더를 삭제합니까?`}),(0,P.jsxs)(S.A,{children:[(0,P.jsx)(y.A,{onClick:W,children:"예"}),(0,P.jsx)(y.A,{variant:"contained",onClick:U,children:"아니오"})]})]})]})}H.propTypes={gallery:h().object};const V=H,W=(0,o.forwardRef)(((e,t)=>{const{enabled:r,imgList:n,forceLoad:f}=(0,a.d4)((e=>e[d.default.id].storage));return(0,P.jsxs)(o.Fragment,{ref:t,children:[(0,P.jsx)(i.A,{variant:"subtitle1",children:d.default.name}),(0,P.jsx)(l.A,{children:(0,P.jsxs)(s.A,{disablePadding:!0,children:[(0,P.jsx)(u.p9,{divider:!0,primary:"사용",secondary:"이미지에서 우클릭 메뉴가 활성화됩니다.",value:r,action:p.$toggleEnabled}),(0,P.jsx)(u.p9,{divider:!0,primary:"자짤 강제로 덮어쓰기",secondary:"작성하던 글이 있으면 강제로 덮어씁니다.",value:f,action:p.$toggleForceLoad}),(0,P.jsx)(u.Qh,{column:"always",header:(0,P.jsx)(c.A,{primary:"자짤 목록",secondary:"채널 slug와 같은 이름을 가진 폴더는 글 작성 시 이미지가 자동으로 첨부됩니다."}),children:(0,P.jsx)(V,{gallery:n})})]})})]})}));W.displayName=`ConfigMenuView(${d.default.id})`;const U=W,q={key:d.default.id,Icon:n.A,label:d.default.name,View:U}},53251:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>G});var n=r(96540),o=r(5556),a=r.n(o),i=r(49799),l=r(73896),s=r(57873),c=r(82241),u=r(72550),d=r(21601),p=r(89930),f=r(71468),h=r(47891),m=r(58031),g=r(46831),v=r(22477),b=r(98587),y=r(58168),x=r(34164),w=r(64111),A=r(11848),C=r(3541),S=r(27553),k=r(17245);function _(e){return(0,k.Ay)("MuiFormGroup",e)}(0,S.A)("MuiFormGroup",["root","row","error"]);var E=r(79716),j=r(38086),R=r(74848);const M=["className","row"],P=(0,A.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.row&&t.row]}})((({ownerState:e})=>(0,y.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"}))),O=n.forwardRef((function(e,t){const r=(0,C.A)({props:e,name:"MuiFormGroup"}),{className:n,row:o=!1}=r,a=(0,b.A)(r,M),i=(0,E.A)(),l=(0,j.A)({props:r,muiFormControl:i,states:["error"]}),s=(0,y.A)({},r,{row:o,error:l.error}),c=(e=>{const{classes:t,row:r,error:n}=e,o={root:["root",r&&"row",n&&"error"]};return(0,w.A)(o,_,t)})(s);return(0,R.jsx)(P,(0,y.A)({className:(0,x.A)(c.root,n),ownerState:s,ref:t},a))}));var I=r(68864),T=r(27558),$=r(58763),L=r(8239),z=r(42471),F=r(61224),D=r(99682),N=r(11692),B=r(50060),H=r(15415);function V({open:e,url:t,onClose:r}){const o=(0,f.wA)(),{channel:a,article:i}=(0,B.HZ)(),{imgList:l}=(0,f.d4)((e=>e[h.default.id].storage)),[s,c]=(0,n.useState)(!1),[u,d]=(0,n.useState)(""),p=(0,n.useCallback)((e=>{const r=e.target.checked?H.$addImage:H.$removeImage;o(r({folder:e.target.name,image:{url:t,memo:i.url}}))}),[i,o,t]),b=(0,n.useCallback)((e=>{/^[0-9a-zA-Zㄱ-힣]*$/.test(e.target.value)&&d(e.target.value)}),[]),y=(0,n.useCallback)((()=>{o((0,H.$addFolder)(u)),c(!1)}),[o,u]),x=(0,n.useCallback)((e=>{e.target.select()}),[]),w=(0,n.useCallback)((e=>{"Enter"===e?.key&&""!==u&&(Object.keys(l).includes(u)||y())}),[y,u,l]),A=Object.entries(l);return(0,R.jsxs)(m.A,{fullWidth:!0,maxWidth:"xs",open:e,onClose:r,children:[(0,R.jsx)(g.A,{children:"자짤 추가/제거"}),(0,R.jsx)(v.A,{children:(0,R.jsx)(O,{children:A.map((([e,r])=>(0,R.jsx)(I.A,{control:(0,R.jsx)(T.A,{size:"small",name:e,checked:r.some((e=>e.url===t)),onChange:p}),label:"_shared_"===e?"공용 폴더":e},e)))})}),(0,R.jsx)($.A,{children:(0,R.jsxs)(L.Ay,{container:!0,children:[s&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(L.Ay,{item:!0,xs:12,children:(0,R.jsx)(z.A,{fullWidth:!0,size:"small",autoFocus:!0,value:u,error:A.includes(u)||""===u,onChange:b,onFocus:x,onKeyUp:w})}),(0,R.jsx)(L.Ay,{item:!0,xs:12,children:(0,R.jsx)(F.A,{fullWidth:!0,startIcon:(0,R.jsx)(D.A,{}),disabled:A.includes(u)||""===u,onClick:y,children:"폴더 추가"})})]}),!s&&(0,R.jsx)(L.Ay,{item:!0,xs:12,children:(0,R.jsx)(F.A,{fullWidth:!0,startIcon:(0,R.jsx)(N.A,{}),onClick:()=>{d(a.id),c(!0)},children:"새 폴더 만들기"})})]})})]})}V.propTypes={open:a().bool,url:a().string,onClose:a().func};const W=V;function U({target:e,closeMenu:t}){const{enabled:r}=(0,f.d4)((e=>e[h.default.id].storage)),o=(0,p.E)({key:h.default.id,selector:r?`${d.Ce}, ${d.lY}`:"NULL",dataExtractor:()=>{if(e)return{url:e.src.split("?")[0]}}},[e]),[a,m]=(0,n.useState)(!1),[g,v]=(0,n.useState)(""),b=(0,n.useCallback)((()=>{v(o.url),m(!0),t()}),[t,o]);return(0,R.jsxs)(R.Fragment,{children:[o&&(0,R.jsx)(i.A,{children:(0,R.jsxs)(l.A,{onClick:b,children:[(0,R.jsx)(s.A,{children:(0,R.jsx)(u.A,{})}),(0,R.jsx)(c.A,{primary:"자짤 관리"})]})}),(0,R.jsx)(W,{open:a,url:g,onClose:()=>m(!1)})]})}U.propTypes={target:a().object,closeMenu:a().func};const q=U,G={key:h.default.id,View:q,order:903}},88827:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(96540),o=r(71468),a=r(58031),i=r(46831),l=r(22477),s=r(58763),c=r(61224),u=r(50060),d=r(36742),p=r(21601),f=r(47891),h=r(74848);const m="_shared_";function g(){const e=(0,o.wA)(),t=(0,d.f)(p.aw),{channel:r}=(0,u.HZ)(),{enabled:g,imgList:v,forceLoad:b}=(0,o.d4)((e=>e[f.default.id].storage)),[y,x]=(0,n.useState)(!1),[w,A]=(0,n.useState)(null),[C,S]=(0,n.useState)(!1),k=(0,n.useMemo)((()=>[...v[m]||[],...v[r.id]||[]]),[r,v]);(0,n.useEffect)((()=>{g&&t&&(/edit$/.test(window.location.pathname)||A(unsafeWindow.editorInstance))}),[e,t,g]);const _=(0,n.useCallback)((()=>{const e=k[Math.floor(Math.random()*k.length)].url;if(!e)return;const t=e.indexOf(".mp4")>-1?`