/*! For license information please see main.js.LICENSE.txt */ (()=>{var e,t,n,r,o,i,a,s,l={15755:function(e,t,n){"use strict";e.exports=n.p+"322bdf1437ef9758.woff"},51955:function(e,t,n){"use strict";e.exports=n.p+"63513b0074fe09d2.woff"},36904:function(e,t,n){"use strict";e.exports=n.p+"bb27db943256c8d6.woff"},75934:function(e,t,n){"use strict";e.exports=n.p+"a27049a3084ffda2.woff"},29649:function(e,t,n){"use strict";e.exports=n.p+"c5195215cb712e9c.woff2"},67284:function(e,t,n){"use strict";e.exports=n.p+"b7ffde2383bb16ba.woff2"},62868:function(e,t,n){"use strict";e.exports=n.p+"d5eb20bcdcf5616a.woff2"},89245:function(e,t,n){"use strict";e.exports=n.p+"d884a71c28eadd37.woff2"},83144:function(e,t,n){"use strict";e.exports=n.p+"abcc64a92baff63f.woff2"},2792:function(e,t,n){"use strict";e.exports=n.p+"6ebed106d6de17e2.woff2"},13532:function(e,t,n){"use strict";e.exports=n.p+"8697d1d596a20b96.woff2"},37244:function(e,t,n){"use strict";e.exports=n.p+"20a2b4158df846df.woff2"},15743:function(e,t,n){"use strict";n.d(t,{M:()=>u});var r=n(77928),o=n(95359),i=n(46724),a=n(81650),s=n(32335),l=n(10839);function u(e){let{children:t,action:n,scope:u,project:c,variant:d,color:h,disabled:p,onClick:f,...m}=e;const g=(0,a.a2)(),v=(0,l.N)(),y=(0,s.Tg)(n??"*",c??s.NN,u??"*");if(g)return(0,r.jsx)(o.Z,{title:"Resource managed via code only",placement:"top",children:(0,r.jsx)("span",{children:(0,r.jsx)(i.Z,{variant:d,color:h,size:"small",sx:{textTransform:"uppercase",paddingX:v?1:void 0},onClick:f,disabled:!0,...m,children:t})})});if(!y&&n&&u&&c){const e=c===s.NN?`Missing '${n}' global permission for '${u}' kind`:`Missing '${n}' permission in '${c}' project for '${u}' kind`;return(0,r.jsx)(o.Z,{title:e,placement:"top",children:(0,r.jsx)("span",{children:(0,r.jsx)(i.Z,{variant:d,color:h,size:"small",sx:{textTransform:"uppercase",paddingX:v?1:void 0},onClick:f,disabled:!0,...m,children:t})})})}return(0,r.jsx)(i.Z,{variant:d,color:h,size:"small",sx:{textTransform:"uppercase",paddingX:v?1:void 0},onClick:f,disabled:p,...m,children:t})}},17772:function(e,t,n){"use strict";n.d(t,{j:()=>v});var r=n(77928),o=n(95359),i=n(40182),a=n(73079),s=n(32123),l=n(34905),u=n(67301),c=n(53831),d=n(21221);const h=["label","icon","showInMenu","onClick"],p=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],f=(0,c.G)(((e,t)=>{const n=(0,d.B)();if(!e.showInMenu){var o;const{label:l,icon:u,onClick:c}=e,d=(0,a.Z)(e,h),p=e=>{null==c||c(e)};return(0,r.jsx)(n.slots.baseIconButton,(0,i.Z)({size:"small",role:"menuitem","aria-label":l},d,{onClick:p},null===(o=n.slotProps)||void 0===o?void 0:o.baseIconButton,{ref:t,children:s.cloneElement(u,{fontSize:"small"})}))}const{label:c,icon:f,onClick:m,closeMenuOnClick:g=!0,closeMenu:v}=e,y=(0,a.Z)(e,p);return(0,r.jsxs)(l.Z,(0,i.Z)({ref:t},y,{onClick:e=>{null==m||m(e),g&&(null==v||v())},children:[f&&(0,r.jsx)(u.Z,{children:f}),c]}))}));var m=n(81650),g=n(32335);function v(e){let{icon:t,label:n,action:i,scope:a,project:s,onClick:l}=e;const u=(0,m.a2)(),c=(0,g.Tg)(i??"*",s??g.NN,a??"*");if(u)return(0,r.jsx)(o.Z,{title:"Resource managed via code only",placement:"top",children:(0,r.jsx)("span",{children:(0,r.jsx)(f,{icon:t,label:n,disabled:!0})})});if(!c&&i&&a&&s){const e=s===g.NN?`Missing '${i}' global permission for '${a}' kind`:`Missing '${i}' permission in '${s}' project for '${a}' kind`;return(0,r.jsx)(o.Z,{title:e,placement:"top",children:(0,r.jsx)("span",{children:(0,r.jsx)(f,{icon:t,label:n,disabled:!0})})})}return(0,r.jsx)(o.Z,{title:n,placement:"top",children:(0,r.jsx)("span",{children:(0,r.jsx)(f,{icon:t,label:n,onClick:l})})})}},99143:function(e,t,n){"use strict";n.d(t,{Y:()=>f});var r=n(77928),o=n(39422),i=n(52779),a=n(26387),s=n(32123),l=n(43887),u=n(52080),c=n(29427);const d=(0,s.memo)(o.J),h=(0,s.memo)(i.n);function p(){return(0,r.jsx)(u.NoDataOverlay,{resource:"dashboards"})}function f(e){const{columns:t,rows:n,initialState:o,hideToolbar:i,isLoading:u}=e,f=(0,l.s0)(),m=(0,s.useMemo)((()=>({...c.r2,...o||{}})),[o]);return(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:(0,r.jsx)(a._,{onRowClick:e=>f(`/projects/${e.row.project}/dashboards/${e.row.name}`),rows:n,columns:t,getRowId:e=>`${e.project}/${e.name}-${e.index}`,loading:u,slots:i?{noRowsOverlay:p}:{toolbar:c.np,row:d,columnHeaders:h,noRowsOverlay:p},pageSizeOptions:c.TJ,initialState:m,sx:c.pe})})}},38370:function(e,t,n){"use strict";n.d(t,{U:()=>v});var r=n(77928),o=n(77640),i=n(40331),a=n(21319),s=n(64547),l=n(32123),u=n(43887),c=n(75175),d=n(52080),h=n(82669),p=n(17772),f=n(84697),m=n(89492),g=n(99143);function v(e){const t=(0,u.s0)(),{dashboardList:n,hideToolbar:v,isLoading:y,initialState:b,isEphemeralDashboardEnabled:x}=e,{successSnackbar:w,exceptionSnackbar:S}=(0,d.useSnackbar)(),C=(0,m.Gm)(),k=(0,l.useCallback)(((e,t)=>n.find((n=>n.metadata.project===e&&n.metadata.name===t))),[n]),M=(0,l.useMemo)((()=>n.map(((e,t)=>({index:t,project:e.metadata.project,name:e.metadata.name,displayName:(0,o.y)(e),version:e.metadata.version??0,createdAt:e.metadata.createdAt??"",updatedAt:e.metadata.updatedAt??""})))),[n]),[_,T]=(0,l.useState)(),[P,I]=(0,l.useState)(!1),[R,D]=(0,l.useState)(!1),[O,A]=(0,l.useState)(!1),E=(0,l.useCallback)(((e,t)=>()=>{T(k(e,t)),D(!0)}),[k]),Z=(0,l.useCallback)((e=>{_&&("ttl"in e?t(`/projects/${_.metadata.project}/ephemeraldashboard/new`,{state:{name:e.dashboard,spec:{..._.spec,ttl:e.ttl,display:{name:e.dashboard}}}}):t(`/projects/${_.metadata.project}/dashboard/new`,{state:{name:e.dashboard,spec:{..._.spec,display:{name:e.dashboard}}}}))}),[t,_]),L=(0,l.useCallback)(((e,t)=>()=>{T(k(e,t)),I(!0)}),[k]),F=(0,l.useCallback)((e=>new Promise(((t,n)=>{C.mutate(e,{onSuccess:e=>{w(`Dashboard ${(0,o.t)(e)} was successfully deleted`),t()},onError:e=>{throw S(e),n(),e}})}))),[S,w,C]),j=(0,l.useCallback)(((e,t)=>()=>{T(k(e,t)),A(!0)}),[k]),N=(0,l.useMemo)((()=>[f.kx,f.wc,f.dt,f.ZK,f.wm,{field:"actions",headerName:"Actions",type:"actions",flex:.5,minWidth:100,getActions:e=>[(0,r.jsx)(p.j,{icon:(0,r.jsx)(s.default,{}),label:"Rename",action:"update",scope:"Dashboard",project:e.row.project,onClick:E(e.row.project,e.row.name)},e.id+"-edit"),(0,r.jsx)(p.j,{icon:(0,r.jsx)(c.default,{}),label:"Duplicate",action:"create",scope:"Dashboard",project:e.row.project,onClick:L(e.row.project,e.row.name)},e.id+"-duplicate"),(0,r.jsx)(p.j,{icon:(0,r.jsx)(a.default,{}),label:"Delete",action:"delete",scope:"Dashboard",project:e.row.project,onClick:j(e.row.project,e.row.name)},e.id+"-delete")]}]),[E,L,j]);return(0,r.jsxs)(i.Z,{width:"100%",children:[(0,r.jsx)(g.Y,{rows:M,columns:N,initialState:b,hideToolbar:v,isLoading:y}),_&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.v$,{open:R,dashboard:_,onClose:()=>D(!1)}),(0,r.jsx)(h.Ch,{open:P,projects:[{kind:"Project",metadata:{name:_.metadata.project},spec:{}}],hideProjectSelect:!0,mode:"duplicate",name:(0,o.y)(_),onSuccess:Z,onClose:()=>I(!1),isEphemeralDashboardEnabled:x}),(0,r.jsx)(h.xI,{open:O,resource:_,onSubmit:e=>F(e).then((()=>A(!1))),onClose:()=>A(!1)})]})]})}},49461:function(e,t,n){"use strict";n.d(t,{N:()=>v});var r=n(77928),o=n(77640),i=n(95359),a=n(40331),s=n(61045),l=n(21319),u=n(64547),c=n(32123),d=n(71232),h=n(52080),p=n(82669),f=n(89492),m=n(17772),g=n(99143);function v(e){const{dashboardList:t,hideProject:n,hideToolbar:v,isLoading:y}=e,{successSnackbar:b,exceptionSnackbar:x}=(0,h.useSnackbar)(),w=(0,f.Gm)(),S=(0,c.useCallback)(((e,n)=>{var r;return null===(r=t.find((t=>t.dashboard.metadata.project===e&&t.dashboard.metadata.name===n)))||void 0===r?void 0:r.dashboard}),[t]),C=(0,c.useMemo)((()=>t.map(((e,t)=>({index:t,project:e.dashboard.metadata.project,name:e.dashboard.metadata.name,displayName:(0,o.y)(e.dashboard),version:e.dashboard.metadata.version??0,createdAt:e.dashboard.metadata.createdAt??"",updatedAt:e.dashboard.metadata.updatedAt??"",viewedAt:e.date})))),[t]),[k,M]=(0,c.useState)(),[_,T]=(0,c.useState)(!1),[P,I]=(0,c.useState)(!1),R=(0,c.useCallback)(((e,t)=>()=>{M(S(e,t)),T(!0)}),[S]),D=(0,c.useCallback)((e=>new Promise(((t,n)=>{w.mutate(e,{onSuccess:e=>{b(`Dashboard ${(0,o.t)(e)} was successfully deleted`),t()},onError:e=>{throw x(e),n(),e}})}))),[x,b,w]),O=(0,c.useCallback)(((e,t)=>()=>{M(S(e,t)),I(!0)}),[S]),A=(0,c.useMemo)((()=>[{field:"project",headerName:"Project",type:"string",flex:2,minWidth:150},{field:"displayName",headerName:"Display Name",type:"string",flex:3,minWidth:150},{field:"version",headerName:"Version",type:"number",align:"right",headerAlign:"right",flex:1,minWidth:80},{field:"createdAt",headerName:"Creation Date",type:"dateTime",flex:1,minWidth:125,valueGetter:(e,t)=>new Date(t.createdAt),renderCell:e=>(0,r.jsx)(i.Z,{title:e.value.toUTCString(),placement:"top",children:(0,r.jsx)("span",{children:(0,d.U)(e.value,new Date)})})},{field:"updatedAt",headerName:"Last Update",type:"dateTime",flex:1,minWidth:125,valueGetter:(e,t)=>new Date(t.updatedAt),renderCell:e=>(0,r.jsx)(i.Z,{title:e.value.toUTCString(),placement:"top",children:(0,r.jsx)("span",{children:(0,d.U)(e.value,new Date)})})},{field:"viewedAt",headerName:"Last Seen",type:"dateTime",flex:1,minWidth:150,valueGetter:(e,t)=>t.viewedAt?new Date(t.viewedAt):void 0,renderCell:e=>(0,r.jsx)(i.Z,{title:e.value.toUTCString(),placement:"top",children:(0,r.jsx)("span",{children:(0,d.U)(e.value,new Date)})})},{field:"actions",headerName:"Actions",type:"actions",flex:.5,minWidth:100,getActions:e=>[(0,r.jsx)(m.j,{icon:(0,r.jsx)(u.default,{}),label:"Rename",action:"update",scope:"Dashboard",project:e.row.project,onClick:R(e.row.project,e.row.name)},e.id+"-edit"),(0,r.jsx)(m.j,{icon:(0,r.jsx)(l.default,{}),label:"Delete",action:"delete",scope:"Dashboard",project:e.row.project,onClick:O(e.row.project,e.row.name)},e.id+"-delete")]}]),[R,O]);return(0,r.jsxs)(a.Z,{width:"100%",children:[(0,r.jsx)(g.Y,{rows:C,columns:A,initialState:{columns:{columnVisibilityModel:{project:!n,id:!1,version:!1,createdAt:!1,updatedAt:!1,actions:!1}},sorting:{sortModel:[{field:"viewedAt",sort:"desc"}]}},hideToolbar:v,isLoading:y}),k&&(0,r.jsxs)(s.Z,{children:[(0,r.jsx)(p.v$,{open:_,onClose:()=>T(!1),dashboard:k}),(0,r.jsx)(p.xI,{open:P,resource:k,onSubmit:()=>D(k),onClose:()=>I(!1)})]})]})}},91412:function(e,t,n){"use strict";n.d(t,{B:()=>i});var r=n(77928),o=n(61045);function i(){return(0,r.jsx)(o.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",backgroundColor:e=>{let{palette:t}=e;return t.background.default}},children:(0,r.jsxs)("svg",{width:"15%",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M71.625 23H29.375C25.8542 23 23 25.8542 23 29.375C23 32.8958 25.8542 35.75 29.375 35.75H71.625C75.1458 35.75 78 32.8958 78 29.375C78 25.8542 75.1458 23 71.625 23Z",fill:"#DE005D",children:(0,r.jsx)("animate",{attributeName:"fill",values:"#DE005D;#f5b3ce;#DE005D",dur:"1s",begin:"0s",repeatCount:"indefinite"})}),(0,r.jsx)("path",{d:"M91.625 43.75H49.375C45.8542 43.75 43 46.6042 43 50.125C43 53.6458 45.8542 56.5 49.375 56.5H91.625C95.1458 56.5 98 53.6458 98 50.125C98 46.6042 95.1458 43.75 91.625 43.75Z",fill:"#DE005D",children:(0,r.jsx)("animate",{attributeName:"fill",values:"#DE005D;#f5b3ce;#DE005D",dur:"1s",begin:"0.25s",repeatCount:"indefinite"})}),(0,r.jsx)("path",{d:"M71.625 64.5H29.375C25.8542 64.5 23 67.3542 23 70.875C23 74.3958 25.8542 77.25 29.375 77.25H71.625C75.1458 77.25 78 74.3958 78 70.875C78 67.3542 75.1458 64.5 71.625 64.5Z",fill:"#DE005D",children:(0,r.jsx)("animate",{attributeName:"fill",values:"#DE005D;#f5b3ce;#DE005D",dur:"1s",begin:"0.5s",repeatCount:"indefinite"})}),(0,r.jsx)("path",{d:"M36.625 85.25H29.375C25.8542 85.25 23 88.1042 23 91.625C23 95.1458 25.8542 98 29.375 98H36.625C40.1458 98 43 95.1458 43 91.625C43 88.1042 40.1458 85.25 36.625 85.25Z",fill:"#DE005D",children:(0,r.jsx)("animate",{attributeName:"fill",values:"#DE005D;#f5b3ce;#DE005D",dur:"1s",begin:"0.75s",repeatCount:"indefinite"})})]})})}},1349:function(e,t,n){"use strict";n.d(t,{U$:()=>Z,Oo:()=>D,y:()=>O,s:()=>E,D:()=>A});var r=n(77928),o=n(99289),i=n(32123),a=n(90496),s=n(42152),l=n(62045),u=n(71959),c=n(6773),d=n(79717),h=n(97136);const p=(0,n(57698).Z)((0,r.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");var f=n(89865);const m=(0,o.ZP)(f.Z)((0,h.Z)((e=>{let{theme:t}=e;return{display:"flex",marginLeft:`calc(${t.spacing(1)} * 0.5)`,marginRight:`calc(${t.spacing(1)} * 0.5)`,..."light"===t.palette.mode?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{..."light"===t.palette.mode?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}},"&:active":{boxShadow:t.shadows[0],..."light"===t.palette.mode?{backgroundColor:(0,d._4)(t.palette.grey[200],.12)}:{backgroundColor:(0,d._4)(t.palette.grey[600],.12)}}}}))),g=(0,o.ZP)(p)({width:24,height:16});const v=function(e){const{slots:t={},slotProps:n={},...o}=e,i=e;return(0,r.jsx)("li",{children:(0,r.jsx)(m,{focusRipple:!0,...o,ownerState:i,children:(0,r.jsx)(g,{as:t.CollapsedIcon,ownerState:i,...n.collapsedIcon})})})};var y=n(32792),b=n(19577);function x(e){return(0,b.ZP)("MuiBreadcrumbs",e)}const w=(0,y.Z)("MuiBreadcrumbs",["root","ol","li","separator"]),S=(0,o.ZP)(c.Z,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${w.li}`]:t.li},t.root]})({}),C=(0,o.ZP)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),k=(0,o.ZP)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function M(e,t,n,o){return e.reduce(((i,a,s)=>(s{const{classes:t}=e;return(0,s.Z)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},x,t)})(T),I=(0,l.Z)({elementType:h.CollapsedIcon,externalSlotProps:p.collapsedIcon,ownerState:T}),R=i.useRef(null),D=i.Children.toArray(o).filter((e=>i.isValidElement(e))).map(((e,t)=>(0,r.jsx)("li",{className:P.li,children:e},`child-${t}`)));return(0,r.jsx)(S,{ref:t,component:d,color:"textSecondary",className:(0,a.Z)(P.root,c),ownerState:T,...w,children:(0,r.jsx)(C,{className:P.ol,ref:R,ownerState:T,children:M(k||y&&D.length<=y?D:(e=>g+m>=e.length?e:[...e.slice(0,g),(0,r.jsx)(v,{"aria-label":f,slots:{CollapsedIcon:h.CollapsedIcon},slotProps:{collapsedIcon:I},onClick:()=>{_(!0);const e=R.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-m,e.length)])(D),P.separator,b,T)})})}));var T=n(40331),P=n(47395),I=n(99675);const R="35px",D=(0,o.ZP)(_)({fontSize:"large",paddingLeft:.5,height:R,lineHeight:R});function O(){return(0,r.jsx)(E,{to:"/",children:"Home"})}function A(e){const{children:t}=e;return(0,r.jsx)(T.Z,{direction:"row",alignItems:"center",gap:.5,children:t})}function E(e){const{children:t,to:n}=e;return(0,r.jsx)(P.Z,{underline:"hover",variant:"h3",component:I.Link,to:n,children:t})}function Z(e){const{children:t}=e;return(0,r.jsx)(c.Z,{variant:"h1",children:t})}},29427:function(e,t,n){"use strict";n.d(t,{Ql:()=>N,pe:()=>B,TJ:()=>V,r2:()=>z,np:()=>H});var r=n(77928),o=n(40331),i=n(40182),a=n(73079),s=n(32123),l=n(90496),u=n(20140),c=n(42152),d=n(53831),h=n(55856),p=n(21221);const f=["className","children"],m=(0,u.Z)("div",{name:"MuiDataGrid",slot:"ToolbarContainer",overridesResolver:(e,t)=>t.toolbarContainer})((e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",flexWrap:"wrap",gap:t.spacing(1),padding:t.spacing(.5,.5,0)}})),g=(0,d.G)((function(e,t){const{className:n,children:o}=e,s=(0,a.Z)(e,f),u=(0,p.B)(),d=(e=>{const{classes:t}=e;return(0,c.Z)({root:["toolbarContainer"]},h.d,t)})(u);return o?(0,r.jsx)(m,(0,i.Z)({className:(0,l.Z)(d.root,n),ownerState:u},s,{ref:t,children:o})):null}));var v=n(6931),y=n(99289),b=n(63070),x=n(98841),w=n(2105),S=n(88153),C=n(87394);const k=["quickFilterParser","quickFilterFormatter","debounceMs","className"],M=e=>{const{classes:t}=e;return(0,c.Z)({root:["toolbarQuickFilter"]},h.d,t)},_=(0,y.ZP)(v.Z,{name:"MuiDataGrid",slot:"ToolbarQuickFilter",overridesResolver:(e,t)=>t.toolbarQuickFilter})((e=>{let{theme:t}=e;return{width:"auto",paddingBottom:t.spacing(.5),"& input":{marginLeft:t.spacing(.5)},"& .MuiInput-underline:before":{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},'& input[type="search"]::-webkit-search-decoration,\n & input[type="search"]::-webkit-search-cancel-button,\n & input[type="search"]::-webkit-search-results-button,\n & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}})),T=e=>e.split(" ").filter((e=>""!==e)),P=e=>e.join(" ");function I(e){var t,n;const o=(0,x.l)(),u=(0,p.B)(),c=M(u),d=(0,w.Pp)(o,S.Az),{quickFilterParser:h=T,quickFilterFormatter:f=P,debounceMs:m=u.filterDebounceMs,className:g}=e,v=(0,a.Z)(e,k),[y,I]=s.useState((()=>f(d??[]))),R=s.useRef(d);s.useEffect((()=>{(0,C.xb)(R.current,d)||(R.current=d,I((e=>(0,C.xb)(h(e),d)?e:f(d??[]))))}),[d,f,h]);const D=s.useCallback((e=>{const t=h(e);R.current=t,o.current.setQuickFilterValues(t)}),[o,h]),O=s.useMemo((()=>(0,b.Z)(D,m)),[D,m]);s.useEffect((()=>O.clear),[O]);const A=s.useCallback((e=>{const t=e.target.value;I(t),O(t)}),[O]),E=s.useCallback((()=>{I(""),D("")}),[D]);return(0,r.jsx)(_,(0,i.Z)({as:u.slots.baseTextField,ownerState:u,variant:"standard",value:y,onChange:A,className:(0,l.Z)(c.root,g),placeholder:o.current.getLocaleText("toolbarQuickFilterPlaceholder"),"aria-label":o.current.getLocaleText("toolbarQuickFilterLabel"),type:"search"},v,{InputProps:(0,i.Z)({startAdornment:(0,r.jsx)(u.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,r.jsx)(u.slots.baseIconButton,(0,i.Z)({"aria-label":o.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),size:"small",sx:[y?{visibility:"visible"}:{visibility:"hidden"}],onClick:E},null===(t=u.slotProps)||void 0===t?void 0:t.baseIconButton,{children:(0,r.jsx)(u.slots.quickFilterClearIcon,{fontSize:"small"})}))},v.InputProps)},null===(n=u.slotProps)||void 0===n?void 0:n.baseTextField))}var R=n(50917),D=n(76105),O=n(44e3);const A=(0,d.G)((function(e,t){var n,o;const{slotProps:a={}}=e,s=a.button||{},l=a.tooltip||{},u=(0,R.Z)(),c=(0,R.Z)(),d=(0,x.l)(),h=(0,p.B)(),f=(0,w.Pp)(d,D.e);if(h.disableColumnSelector)return null;const m=f.open&&f.panelId===c;return(0,r.jsx)(h.slots.baseTooltip,(0,i.Z)({title:d.current.getLocaleText("toolbarColumnsLabel"),enterDelay:1e3},null===(n=h.slotProps)||void 0===n?void 0:n.baseTooltip,l,{children:(0,r.jsx)(h.slots.baseButton,(0,i.Z)({id:u,size:"small","aria-label":d.current.getLocaleText("toolbarColumnsLabel"),"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?c:void 0,startIcon:(0,r.jsx)(h.slots.columnSelectorIcon,{})},null===(o=h.slotProps)||void 0===o?void 0:o.baseButton,s,{onPointerUp:e=>{var t;f.open&&e.stopPropagation(),null===(t=s.onPointerUp)||void 0===t||t.call(s,e)},onClick:e=>{var t;f.open&&f.openedPanelValue===O.y.columns?d.current.hidePreferences():d.current.showPreferences(O.y.columns,c,u),null===(t=s.onClick)||void 0===t||t.call(s,e)},ref:t,children:d.current.getLocaleText("toolbarColumns")}))}))}));var E=n(30341),Z=n(98251),L=n(64564);const F=(0,y.ZP)("ul",{name:"MuiDataGrid",slot:"ToolbarFilterList",overridesResolver:(e,t)=>t.toolbarFilterList})((e=>{let{theme:t}=e;return{margin:t.spacing(1,1,.5),padding:t.spacing(0,1)}})),j=(0,d.G)((function(e,t){var n,o,a;const{slotProps:l={}}=e,u=l.button||{},d=l.tooltip||{},f=l.badge||{},m=(0,x.l)(),g=(0,p.B)(),v=(0,w.Pp)(m,S.DY),y=(0,w.Pp)(m,L.WH),b=(0,w.Pp)(m,D.e),C=(e=>{const{classes:t}=e;return(0,c.Z)({root:["toolbarFilterList"]},h.d,t)})(g),k=(0,E.Z)(),M=(0,E.Z)(),_=s.useMemo((()=>{if(b.open)return m.current.getLocaleText("toolbarFiltersTooltipHide");if(0===v.length)return m.current.getLocaleText("toolbarFiltersTooltipShow");const e=e=>y[e.field].filterOperators.find((t=>t.value===e.operator)).label||m.current.getLocaleText(`filterOperator${(0,Z.Z)(e.operator)}`).toString(),t=e=>{const{getValueAsString:t}=y[e.field].filterOperators.find((t=>t.value===e.operator));return t?t(e.value):e.value};return(0,r.jsxs)("div",{children:[m.current.getLocaleText("toolbarFiltersTooltipActive")(v.length),(0,r.jsx)(F,{className:C.root,ownerState:g,children:v.map(((n,o)=>(0,i.Z)({},y[n.field]&&(0,r.jsx)("li",{children:`${y[n.field].headerName||n.field}\n ${e(n)}\n ${null!=n.value?t(n):""}`},o))))})]})}),[m,g,b.open,v,y,C]);if(g.disableColumnFilter)return null;const T=b.open&&b.panelId===M;return(0,r.jsx)(g.slots.baseTooltip,(0,i.Z)({title:_,enterDelay:1e3},null===(n=g.slotProps)||void 0===n?void 0:n.baseTooltip,d,{children:(0,r.jsx)(g.slots.baseButton,(0,i.Z)({id:k,size:"small","aria-label":m.current.getLocaleText("toolbarFiltersLabel"),"aria-controls":T?M:void 0,"aria-expanded":T,"aria-haspopup":!0,startIcon:(0,r.jsx)(g.slots.baseBadge,(0,i.Z)({badgeContent:v.length,color:"primary"},null===(o=g.slotProps)||void 0===o?void 0:o.baseBadge,f,{children:(0,r.jsx)(g.slots.openFilterButtonIcon,{})}))},null===(a=g.slotProps)||void 0===a?void 0:a.baseButton,u,{onClick:e=>{var t;const{open:n,openedPanelValue:r}=b;n&&r===O.y.filters?m.current.hidePreferences():m.current.showPreferences(O.y.filters,M,k),null===(t=u.onClick)||void 0===t||t.call(u,e)},onPointerUp:e=>{var t;b.open&&e.stopPropagation(),null===(t=u.onPointerUp)||void 0===t||t.call(u,e)},ref:t,children:m.current.getLocaleText("toolbarFilters")}))}))})),N={columns:{columnVisibilityModel:{}},sorting:{sortModel:[{field:"name",sort:"asc"}]},pagination:{paginationModel:{pageSize:10,page:0}}},z={columns:{columnVisibilityModel:{}},sorting:{sortModel:[{field:"displayName",sort:"asc"}]},pagination:{paginationModel:{pageSize:10,page:0}}},B={".MuiDataGrid-columnHeader:focus":{outline:"none"},".MuiDataGrid-cell:focus":{outline:"none"},"& .MuiDataGrid-row:hover":{cursor:"pointer"}},V=[10,25,50,100];function H(){return(0,r.jsx)(g,{children:(0,r.jsxs)(o.Z,{direction:"row",width:"100%",gap:4,m:2,children:[(0,r.jsx)(o.Z,{sx:{flexShrink:1},width:"100%",children:(0,r.jsx)(I,{sx:{width:"100%"}})}),(0,r.jsxs)(o.Z,{direction:"row",sx:{flexShrink:3},width:"100%",children:[(0,r.jsx)(A,{slotProps:{button:{sx:{width:"100%"}}}}),(0,r.jsx)(j,{slotProps:{button:{sx:{width:"100%"}}}})]})]})})}},82669:function(e,t,n){"use strict";n.d(t,{t2:()=>F,ai:()=>L,v$:()=>E,pl:()=>O,xI:()=>A,Ch:()=>I});var r=n(77928),o=n(32123),i=n(75918),a=n(31052),s=n(40331),l=n(6931),u=n(34905),c=n(46724),d=n(52080),h=n(36679),p=n(32139),f=n(77640),m=n(77891),g=n(59707),v=n(89492),y=n(7087);const b=m.z.string().min(1,"Required").max(75,"Must be 75 or fewer characters long"),x=m.z.object({projectName:g.Nq,dashboardName:b}),w=m.z.object({dashboardName:b});var S=n(65694),C=n(13323);const k=m.z.object({projectName:g.Nq,dashboardName:b,ttl:S.a}),M=m.z.object({dashboardName:b,ttl:S.a});var _=n(23445);const T=m.z.string().min(1,"Required").max(75,"Must be 75 or fewer characters long"),P=m.z.object({projectName:T});const I=e=>{const{open:t,projects:n,hideProjectSelect:s,mode:l,name:u,onClose:c,onSuccess:h,isEphemeralDashboardEnabled:p}=e,[f,m]=(0,o.useState)(!1),g="duplicate"===l?"Duplicate":"Create";return(0,r.jsxs)(d.Dialog,{open:t,onClose:()=>{},"aria-labelledby":"confirm-dialog",fullWidth:!0,children:[(0,r.jsxs)(d.Dialog.Header,{children:[g," Dashboard",u&&": "+u]}),p&&"duplicate"===l&&(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsx)(i.Z,{control:(0,r.jsx)(a.Z,{checked:f,onChange:e=>{m(e.target.checked)}}),label:"Create as a temporary copy"})}),f?(0,r.jsx)(D,{projects:n,hideProjectSelect:s,onClose:c,onSuccess:h}):(0,r.jsx)(R,{projects:n,hideProjectSelect:s,onClose:c,onSuccess:h})]})},R=e=>{var t;const{projects:n,hideProjectSelect:i,onClose:a,onSuccess:m}=e,g=function(e){const t=(0,v.wm)({project:e});return(0,o.useMemo)((()=>x.refine((e=>!(t.data??[]).some((t=>t.metadata.project===e.projectName&&t.metadata.name===(0,y.p)(e.dashboardName)))),(e=>({message:`Dashboard name '${e.dashboardName}' already exists in '${e.projectName}' project!`,path:["dashboardName"]})))),[t.data])}(),b=(0,h.useForm)({resolver:(0,p.F)(g),mode:"onBlur",defaultValues:{dashboardName:"",projectName:(null===(t=n[0])||void 0===t?void 0:t.metadata.name)??""}});return(0,r.jsx)(h.FormProvider,{...b,children:(0,r.jsxs)("form",{onSubmit:b.handleSubmit((e=>{a(),m&&m({project:e.projectName,dashboard:e.dashboardName})})),children:[(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsxs)(s.Z,{gap:1,children:[!i&&(0,r.jsx)(h.Controller,{control:b.control,name:"projectName",render:e=>{let{field:t,fieldState:o}=e;var i;return(0,r.jsx)(l.Z,{select:!0,...t,required:!0,id:"project",label:"Project name",type:"text",fullWidth:!0,error:!!o.error,helperText:null===(i=o.error)||void 0===i?void 0:i.message,children:n.map((e=>(0,r.jsx)(u.Z,{value:e.metadata.name,children:(0,f.y)(e)},e.metadata.name)))})}}),(0,r.jsx)(h.Controller,{control:b.control,name:"dashboardName",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Dashboard Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}})]})}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",disabled:!b.formState.isValid,type:"submit",children:"Add"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:()=>{a(),b.reset()},children:"Cancel"})]})]})})},D=e=>{var t;const{projects:n,hideProjectSelect:i,onClose:a,onSuccess:m}=e,g=function(e){const t=(0,C._E)(e);return(0,o.useMemo)((()=>k.refine((e=>0===(t.data??[]).filter((t=>t.metadata.project===e.projectName&&t.metadata.name===(0,y.p)(e.dashboardName)&&t.spec.ttl===e.ttl)).length),(e=>({message:`Ephemeral Dashboard name '${e.dashboardName}' already exists in '${e.projectName}' project!`,path:["dashboardName"]})))),[t.data])}(),v=(0,h.useForm)({resolver:(0,p.F)(g),mode:"onBlur",defaultValues:{dashboardName:"",projectName:(null===(t=n[0])||void 0===t?void 0:t.metadata.name)??"",ttl:""}});return(0,r.jsx)(h.FormProvider,{...v,children:(0,r.jsxs)("form",{onSubmit:v.handleSubmit((e=>{a(),m&&m({project:e.projectName,dashboard:e.dashboardName,ttl:e.ttl})})),children:[(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsxs)(s.Z,{gap:1,children:[!i&&(0,r.jsx)(h.Controller,{control:v.control,name:"projectName",render:e=>{let{field:t,fieldState:o}=e;var i;return(0,r.jsx)(l.Z,{select:!0,...t,required:!0,id:"project",label:"Project name",type:"text",fullWidth:!0,error:!!o.error,helperText:null===(i=o.error)||void 0===i?void 0:i.message,children:n.map((e=>(0,r.jsx)(u.Z,{value:e.metadata.name,children:(0,f.y)(e)},e.metadata.name)))})}}),(0,r.jsx)(h.Controller,{control:v.control,name:"dashboardName",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Dashboard Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}}),(0,r.jsx)(h.Controller,{control:v.control,name:"ttl",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"ttl",label:"Time to live (TTL)",type:"text",fullWidth:!0,error:!!n.error,helperText:(null===(o=n.error)||void 0===o?void 0:o.message)?n.error.message:"Duration string like 1w, 3d12h.."})}})]})}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",disabled:!v.formState.isValid,type:"submit",children:"Add"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:()=>{a(),v.reset()},children:"Cancel"})]})]})})};function O(e){const{open:t,onClose:n,onSuccess:i}=e,a=function(){const e=(0,_.LZ)();return(0,o.useMemo)((()=>P.refine((t=>!(e.data??[]).some((e=>e.metadata.name===(0,y.p)(t.projectName)))),(e=>({message:`Project name '${e.projectName}' already exists!`,path:["projectName"]})))),[e.data])}(),s=(0,h.useForm)({resolver:(0,p.F)(a),mode:"onBlur"}),{successSnackbar:u,exceptionSnackbar:m}=(0,d.useSnackbar)(),g=(0,_.BD)(),v=()=>{n(),s.reset()};return(0,r.jsxs)(d.Dialog,{open:t,onClose:v,fullWidth:!0,children:[(0,r.jsx)(d.Dialog.Header,{children:"Add Project"}),(0,r.jsx)(h.FormProvider,{...s,children:(0,r.jsxs)("form",{onSubmit:s.handleSubmit((e=>{const t=(0,y.p)(e.projectName);g.mutate({kind:"Project",metadata:{name:t},spec:{display:{name:e.projectName}}},{onSuccess:e=>{u(`Project ${(0,f.y)(e)} was successfully created`),n(),i&&i(e)},onError:e=>{m(e)}})})),children:[(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsx)(h.Controller,{control:s.control,name:"projectName",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}})}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",type:"submit",disabled:!s.formState.isValid,children:"Add"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:v,children:"Cancel"})]})]})})]})}function A(e){const{resource:t,open:n,onSubmit:o,onClose:i}=e;return(0,r.jsxs)(d.Dialog,{open:n,onClose:i,children:[(0,r.jsxs)(d.Dialog.Header,{children:["Delete ",t.kind,": ",t.metadata.name]}),(0,r.jsxs)(d.Dialog.Content,{children:["Are you sure you want to delete the ",t.kind,": ",(0,r.jsx)("strong",{children:(0,f.t)(t)}),"? This action cannot be undone."]}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",type:"submit",onClick:()=>o(t),children:"Delete"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:i,children:"Cancel"})]})]})}const E=e=>{const{dashboard:t,open:n,onClose:o,onSuccess:i}=e,a=(0,h.useForm)({resolver:(0,p.F)(w),mode:"onBlur",defaultValues:{dashboardName:(0,f.y)(t)}}),{successSnackbar:s,exceptionSnackbar:u}=(0,d.useSnackbar)(),m=(0,v.yZ)(),g=()=>{o(),a.reset()};return(0,r.jsxs)(d.Dialog,{open:n,onClose:g,"aria-labelledby":"confirm-dialog",fullWidth:!0,children:[(0,r.jsx)(d.Dialog.Header,{children:"Rename Dashboard"}),(0,r.jsx)(h.FormProvider,{...a,children:(0,r.jsxs)("form",{onSubmit:a.handleSubmit((e=>{t.spec.display?t.spec.display.name=e.dashboardName:t.spec.display={name:e.dashboardName},m.mutate(t,{onSuccess:t=>{s(`Dashboard ${(0,f.t)(t)} has been successfully updated`),o(),i&&i(e.dashboardName)},onError:e=>{throw u(e),e}})})),children:[(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsx)(h.Controller,{control:a.control,name:"dashboardName",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}})}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",disabled:!a.formState.isValid,type:"submit",children:"Rename"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:g,children:"Cancel"})]})]})})]})},Z=m.z.object({name:m.z.string().min(1,"Name is required")});function L(e){const{resource:t,open:n,onSubmit:o,onClose:i}=e,a=(0,h.useForm)({resolver:(0,p.F)(Z),mode:"onBlur"});return(0,r.jsxs)(d.Dialog,{open:n,onClose:i,fullWidth:!0,children:[(0,r.jsxs)(d.Dialog.Header,{children:["Rename ",t.kind,": ",t.metadata.name]}),(0,r.jsx)(h.FormProvider,{...a,children:(0,r.jsxs)("form",{onSubmit:a.handleSubmit((function(e){o(e.name)})),children:[(0,r.jsx)(d.Dialog.Content,{sx:{width:"100%"},children:(0,r.jsx)(h.Controller,{control:a.control,name:"name",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}})}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",type:"submit",disabled:!a.formState.isValid,children:"Rename"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:i,children:"Cancel"})]})]})})]})}const F=e=>{const{ephemeralDashboard:t,open:n,onClose:o,onSuccess:i}=e,a=(0,h.useForm)({resolver:(0,p.F)(M),mode:"onBlur",defaultValues:{dashboardName:(0,f.y)(t),ttl:t.spec.ttl}}),{successSnackbar:s,exceptionSnackbar:u}=(0,d.useSnackbar)(),m=(0,C.IF)(),g=()=>{o(),a.reset()};return(0,r.jsxs)(d.Dialog,{open:n,onClose:g,"aria-labelledby":"confirm-dialog",fullWidth:!0,children:[(0,r.jsx)(d.Dialog.Header,{children:"Update Ephemeral Dashboard"}),(0,r.jsx)(h.FormProvider,{...a,children:(0,r.jsxs)("form",{onSubmit:a.handleSubmit((e=>{t.spec.display?t.spec.display.name=e.dashboardName:t.spec.display={name:e.dashboardName},t.spec.ttl=e.ttl,m.mutate(t,{onSuccess:t=>{s(`Ephemeral Dashboard ${(0,f.t)(t)} has been successfully updated`),o(),i&&i(e.dashboardName)},onError:e=>{throw u(e),e}})})),children:[(0,r.jsxs)(d.Dialog.Content,{sx:{width:"100%"},children:[(0,r.jsx)(h.Controller,{control:a.control,name:"dashboardName",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})}}),(0,r.jsx)(h.Controller,{control:a.control,name:"ttl",render:e=>{let{field:t,fieldState:n}=e;var o;return(0,r.jsx)(l.Z,{...t,required:!0,margin:"dense",id:"name",label:"Time to live (TTL)",type:"text",fullWidth:!0,error:!!n.error,helperText:(null===(o=n.error)||void 0===o?void 0:o.message)?n.error.message:"Duration string like 1w, 3d12h.."})}})]}),(0,r.jsxs)(d.Dialog.Actions,{children:[(0,r.jsx)(c.Z,{variant:"contained",disabled:!a.formState.isValid,type:"submit",children:"Save"}),(0,r.jsx)(c.Z,{variant:"outlined",color:"secondary",onClick:g,children:"Cancel"})]})]})})]})}},84697:function(e,t,n){"use strict";n.d(t,{ZK:()=>d,dt:()=>u,iw:()=>s,kB:()=>c,kx:()=>a,wc:()=>l,wm:()=>h});var r=n(77928),o=n(95359),i=n(71232);const a={field:"project",headerName:"Project",type:"string",flex:2,minWidth:150},s={field:"name",headerName:"Name",type:"string",flex:3,minWidth:150},l={field:"displayName",headerName:"Display Name",type:"string",flex:3,minWidth:150},u={field:"version",headerName:"Version",type:"number",align:"right",headerAlign:"right",flex:1,minWidth:80},c={field:"description",headerName:"Description",type:"string",flex:3,minWidth:300},d={field:"createdAt",headerName:"Creation Date",type:"dateTime",flex:1,minWidth:125,valueGetter:(e,t)=>new Date(t.createdAt),renderCell:e=>(0,r.jsx)(o.Z,{title:e.value.toUTCString(),placement:"top",children:(0,r.jsx)("span",{children:(0,i.U)(e.value,new Date)})})},h={field:"updatedAt",headerName:"Last Update",type:"dateTime",flex:1,minWidth:125,valueGetter:(e,t)=>new Date(t.updatedAt),renderCell:e=>(0,r.jsx)(o.Z,{title:e.value.toUTCString(),placement:"top",children:(0,r.jsx)("span",{children:(0,i.U)(e.value,new Date)})})}},32335:function(e,t,n){"use strict";n.d(t,{D6:()=>g,F4:()=>d,NN:()=>u,Tg:()=>f,pw:()=>p});var r=n(77928),o=n(32123),i=n(70318),a=n(56594),s=n(23445),l=n(81650);const u="*",c=(0,o.createContext)(void 0);function d(e){const t=(0,l.ov)(),{data:n}=(0,i.pk)(),s=(null==n?void 0:n.sub)||"",{data:u}=(0,a.Qe)(s),d=(0,o.useMemo)((()=>u||{}),[u]);return(0,r.jsx)(c.Provider,{value:{enabled:t,username:s,userPermissions:d},children:e.children})}function h(){const e=(0,o.useContext)(c);if(void 0===e)throw new Error("No AuthorizationContext found. Did you forget a Provider?");return e}function p(){const{enabled:e,userPermissions:t}=h(),{data:n}=(0,s.LZ)();return e?(n??[]).filter((e=>m(t[u]??[],"create","Dashboard")||m(t[e.metadata.name]??[],"create","Dashboard"))):n??[]}function f(e,t,n){const{enabled:r,username:o,userPermissions:i}=h();return!r||!!o&&(!(t===u||!m(i[u]??[],e,n))||m(i[t]??[],e,n))}function m(e,t,n){return e.some((e=>e.actions.some((e=>e===t||"*"===e))&&e.scopes.some((e=>e===n||"*"===e))))}function g(e,t,n){const{enabled:r,username:o,userPermissions:i}=h();if(!r)return!0;if(!o)return!1;for(const r of e)for(const e of n){if(t!==u&&m(i[u]??[],r,e))return!0;if(m(i[t]??[],r,e))return!0}return!1}},81650:function(e,t,n){"use strict";n.d(t,{gs:()=>It,Cc:()=>zt,aP:()=>Ot,JU:()=>Zt,xL:()=>Lt,a2:()=>Ft,bZ:()=>Tt,Dn:()=>Nt,Vw:()=>Et,qt:()=>Pt,h_:()=>Rt,Ui:()=>Ht,aN:()=>Dt,ov:()=>jt,T7:()=>At,$Y:()=>Vt,uo:()=>Bt});var r=n(77928),o=n(32123);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let s={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function l(e){s=e}const u={exec:()=>null};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(d.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}const d={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},h=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/(?:[*+-]|\d{1,9}[.)])/,f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,m=c(f).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),g=c(f).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),v=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y=/(?!\s*\])(?:\\.|[^\[\]\\])+/,b=c(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x=c(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),w="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S=/|$))/,C=c("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",S).replace("tag",w).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k=c(v).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),M={blockquote:c(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:b,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:C,lheading:m,list:x,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:k,table:u,text:/^[^\n]+/},_=c("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex(),T={...M,lheading:g,table:_,paragraph:c(v).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",w).getRegex()},P={...M,html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",S).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:u,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:c(v).replace("hr",h).replace("heading"," *#{1,6} *[^\n]").replace("lheading",m).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},I=/^( {2,}|\\)\n(?!\s*$)/,R=/[\p{P}\p{S}]/u,D=/[\s\p{P}\p{S}]/u,O=/[^\s\p{P}\p{S}]/u,A=c(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,D).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,Z=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,L=c(Z,"u").replace(/punct/g,R).getRegex(),F=c(Z,"u").replace(/punct/g,E).getRegex(),j="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N=c(j,"gu").replace(/notPunctSpace/g,O).replace(/punctSpace/g,D).replace(/punct/g,R).getRegex(),z=c(j,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),B=c("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,O).replace(/punctSpace/g,D).replace(/punct/g,R).getRegex(),V=c(/\\(punct)/,"gu").replace(/punct/g,R).getRegex(),H=c(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),$=c(S).replace("(?:--\x3e|$)","--\x3e").getRegex(),W=c("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),G=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,U=c(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",G).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),q=c(/^!?\[(label)\]\[(ref)\]/).replace("label",G).replace("ref",y).getRegex(),K=c(/^!?\[(ref)\](?:\[\])?/).replace("ref",y).getRegex(),Y={_backpedal:u,anyPunctuation:V,autolink:H,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:I,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:u,emStrongLDelim:L,emStrongRDelimAst:N,emStrongRDelimUnd:B,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:U,nolink:K,punctuation:A,reflink:q,reflinkSearch:c("reflink|nolink(?!\\()","g").replace("reflink",q).replace("nolink",K).getRegex(),tag:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},re=e=>ne[e];function oe(e,t){if(t){if(d.escapeTest.test(e))return e.replace(d.escapeReplace,re)}else if(d.escapeTestNoEncode.test(e))return e.replace(d.escapeReplaceNoEncode,re);return e}function ie(e){try{e=encodeURI(e).replace(d.percentDecode,"%")}catch{return null}return e}function ae(e,t){var n;const r=e.replace(d.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(d.splitPipe);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!(null===(n=r.at(-1))||void 0===n?void 0:n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:se(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const o=r[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=se(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:se(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=se(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const i=[];let a;for(a=0;a1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let a=!1;for(;e;){let n=!1,r="",s="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(r+=u+"\n",e=e.substring(u.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let p;if(u=h,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),p=u):p=u.replace(this.rules.other.tabCharGlobal," "),o.test(u))break;if(i.test(u))break;if(a.test(u))break;if(t.test(u))break;if(n.test(u))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+p.slice(d);else{if(c)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(i.test(l))break;if(n.test(l))break;s+="\n"+u}c||u.trim()||(c=!0),r+=h+"\n",e=e.substring(h.length+1),l=p.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let h,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(h="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=r}const s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=se(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),le(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return le(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,i,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])e=t[0],r="mailto:"+e;else{let o;do{var n;o=t[0],t[0]=(null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])??""}while(o!==t[0]);e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}constructor(e){i(this,"options",void 0),i(this,"rules",void 0),i(this,"lexer",void 0),this.options=e||s}}class ce{static get rules(){return{block:ee,inline:te}}static lex(e,t){return new ce(t).lex(e)}static lexInline(e,t){return new ce(t).inlineTokens(e)}lex(e){e=e.replace(d.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(d.tabCharGlobal," ").replace(d.spaceLine,""));e;){var r,o,i;let a;if(null===(o=this.options.extensions)||void 0===o||null===(r=o.block)||void 0===r?void 0:r.some((n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0))))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);const n=t.at(-1);1===a.raw.length&&void 0!==n?n.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null===(i=this.options.extensions)||void 0===i?void 0:i.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){const r=t.at(-1);n&&"paragraph"===(null==r?void 0:r.type)?(r.raw+="\n"+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a),n=s.length!==e.length,e=e.substring(a.raw.length)}else if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e,r=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o=!1,i="";for(;e;){var a,s,l;let r;if(o||(i=""),o=!1,null===(s=this.options.extensions)||void 0===s||null===(a=s.inline)||void 0===a?void 0:a.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===r.type&&"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,i)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let u=e;if(null===(l=this.options.extensions)||void 0===l?void 0:l.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(u=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(u)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(i=r.raw.slice(-1)),o=!0;const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}constructor(e){i(this,"tokens",void 0),i(this,"options",void 0),i(this,"state",void 0),i(this,"tokenizer",void 0),i(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new ue,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:d,block:ee.normal,inline:te.normal};this.options.pedantic?(t.block=ee.pedantic,t.inline=te.pedantic):this.options.gfm&&(t.block=ee.gfm,this.options.breaks?t.inline=te.breaks:t.inline=te.gfm),this.tokenizer.rules=t}}class de{space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;var o;const i=null===(o=(n||"").match(d.notSpaceStart))||void 0===o?void 0:o[0],a=t.replace(d.endingNewline,"")+"\n";return i?'
'+(r?a:oe(a,!0))+"
\n":"
"+(r?a:oe(a,!0))+"
\n"}blockquote(e){let{tokens:t}=e;return`
\n${this.parser.parse(t)}
\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});var n;if(e.loose)"paragraph"===(null===(n=e.tokens[0])||void 0===n?void 0:n.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+oe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0});else t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${oe(t,!0)}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),i=ie(t);if(null===i)return o;t=i;let a='
    ",a}image(e){let{href:t,title:n,text:r}=e;const o=ie(t);if(null===o)return oe(r);t=o;let i=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="";for(let i=0;i{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){for(var e=arguments.length,t=new Array(e),n=0;n{const t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const t=r.renderers[e.name];r.renderers[e.name]=t?function(){for(var n=arguments.length,r=new Array(n),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(n,e)).then((e=>i.call(n,e)));const t=o.call(n,e);return i.call(n,t)}:n[r]=function(){for(var e=arguments.length,t=new Array(e),r=0;r{const r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const a=o.hooks?o.hooks.provideLexer():e?ce.lex:ce.lexInline,s=o.hooks?o.hooks.provideParser():e?pe.parse:pe.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>a(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>s(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let e=a(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=s(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+oe(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}constructor(...e){i(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),i(this,"options",this.setOptions),i(this,"parse",this.parseMarkdown(!0)),i(this,"parseInline",this.parseMarkdown(!1)),i(this,"Parser",pe),i(this,"Renderer",de),i(this,"TextRenderer",he),i(this,"Lexer",ce),i(this,"Tokenizer",ue),i(this,"Hooks",fe),this.use(...e)}};function ge(e,t){return me.parse(e,t)}ge.options=ge.setOptions=function(e){return me.setOptions(e),ge.defaults=me.defaults,l(ge.defaults),ge},ge.getDefaults=a,ge.defaults=s,ge.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:Oe;ye&&ye(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(be(t)||(t[r]=e),o=e)}e[o]=!0}return e}function $e(e){for(let t=0;t/gm),at=Ce(/\$\{[\w\W]*/gm),st=Ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),lt=Ce(/^aria-[\-\w]+$/),ut=Ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ct=Ce(/^(?:\w+script|data):/i),dt=Ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=Ce(/^html$/i),pt=Ce(/^[a-z][.\w]*(-[.\w]+)+$/i);var ft=Object.freeze({__proto__:null,ARIA_ATTR:lt,ATTR_WHITESPACE:dt,CUSTOM_ELEMENT:pt,DATA_ATTR:st,DOCTYPE_NAME:ht,ERB_EXPR:it,IS_ALLOWED_URI:ut,IS_SCRIPT_OR_DATA:ct,MUSTACHE_EXPR:ot,TMPLIT_EXPR:at});const mt=1,gt=3,vt=7,yt=8,bt=9,xt=function(){return"undefined"==typeof window?null:window};var wt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt();const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!t||!t.document||t.document.nodeType!==bt||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,m=u.prototype,g=Ge(m,"cloneNode"),v=Ge(m,"remove"),y=Ge(m,"nextSibling"),b=Ge(m,"childNodes"),x=Ge(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,S="";const{implementation:C,createNodeIterator:k,createDocumentFragment:M,getElementsByTagName:_}=r,{importNode:T}=o;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ve&&"function"==typeof x&&C&&void 0!==C.createHTMLDocument;const{MUSTACHE_EXPR:I,ERB_EXPR:R,TMPLIT_EXPR:D,DATA_ATTR:O,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:E,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:L}=ft;let{IS_ALLOWED_URI:F}=ft,j=null;const N=He({},[...Ue,...qe,...Ke,...Xe,...Je]);let z=null;const B=He({},[...et,...tt,...nt,...rt]);let V=Object.seal(ke(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,$=null,W=!0,G=!0,U=!1,q=!0,K=!1,Y=!0,X=!1,Q=!1,J=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,se={},le=null;const ue=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ce=null;const de=He({},["audio","video","img","source","image","track"]);let he=null;const pe=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ye=ge,be=!1,xe=null;const we=He({},[fe,me,ge],Ae);let Ce=He({},["mi","mo","mn","ms","mtext"]),Me=He({},["annotation-xml"]);const _e=He({},["title","style","font","a","script"]);let Be=null;const Ve=["application/xhtml+xml","text/html"];let $e=null,ot=null;const it=r.createElement("form"),at=function(e){return e instanceof RegExp||e instanceof Function},st=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ot||ot!==e){if(e&&"object"==typeof e||(e={}),e=We(e),Be=-1===Ve.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,$e="application/xhtml+xml"===Be?Ae:Oe,j=je(e,"ALLOWED_TAGS")?He({},e.ALLOWED_TAGS,$e):N,z=je(e,"ALLOWED_ATTR")?He({},e.ALLOWED_ATTR,$e):B,xe=je(e,"ALLOWED_NAMESPACES")?He({},e.ALLOWED_NAMESPACES,Ae):we,he=je(e,"ADD_URI_SAFE_ATTR")?He(We(pe),e.ADD_URI_SAFE_ATTR,$e):pe,ce=je(e,"ADD_DATA_URI_TAGS")?He(We(de),e.ADD_DATA_URI_TAGS,$e):de,le=je(e,"FORBID_CONTENTS")?He({},e.FORBID_CONTENTS,$e):ue,H=je(e,"FORBID_TAGS")?He({},e.FORBID_TAGS,$e):{},$=je(e,"FORBID_ATTR")?He({},e.FORBID_ATTR,$e):{},se=!!je(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,U=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||ut,ye=e.NAMESPACE||ge,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,Me=e.HTML_INTEGRATION_POINTS||Me,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&at(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&at(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(G=!1),te&&(ee=!0),se&&(j=He({},Je),z=[],!0===se.html&&(He(j,Ue),He(z,et)),!0===se.svg&&(He(j,qe),He(z,tt),He(z,rt)),!0===se.svgFilters&&(He(j,Ke),He(z,tt),He(z,rt)),!0===se.mathMl&&(He(j,Xe),He(z,nt),He(z,rt))),e.ADD_TAGS&&(j===N&&(j=We(j)),He(j,e.ADD_TAGS,$e)),e.ADD_ATTR&&(z===B&&(z=We(z)),He(z,e.ADD_ATTR,$e)),e.ADD_URI_SAFE_ATTR&&He(he,e.ADD_URI_SAFE_ATTR,$e),e.FORBID_CONTENTS&&(le===ue&&(le=We(le)),He(le,e.FORBID_CONTENTS,$e)),ie&&(j["#text"]=!0),X&&He(j,["html","head","body"]),j.table&&(He(j,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ze('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i)),null!==w&&"string"==typeof S&&(S=w.createHTML(""));Se&&Se(e),ot=e}},lt=He({},[...qe,...Ke,...Ye]),ct=He({},[...Xe,...Qe]),dt=function(e){Re(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){v(e)}},pt=function(e,t){try{Re(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Re(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},wt=function(e){let t=null,n=null;if(J)e=""+e;else{const t=Ee(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Be&&ye===ge&&(e=''+e+"");const o=w?w.createHTML(e):e;if(ye===ge)try{t=(new p).parseFromString(o,Be)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?S:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ye===ge?_.call(t,X?"html":"body")[0]:X?t.documentElement:i},St=function(e){return k.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ct=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},kt=function(e){return"function"==typeof l&&e instanceof l};function Mt(e,t,r){Te(e,(e=>{e.call(n,t,r,ot)}))}const _t=function(e){let t=null;if(Mt(P.beforeSanitizeElements,e,null),Ct(e))return dt(e),!0;const r=$e(e.nodeName);if(Mt(P.uponSanitizeElement,e,{tagName:r,allowedTags:j}),e.hasChildNodes()&&!kt(e.firstElementChild)&&Ne(/<[/\w]/g,e.innerHTML)&&Ne(/<[/\w]/g,e.textContent))return dt(e),!0;if(e.nodeType===vt)return dt(e),!0;if(Y&&e.nodeType===yt&&Ne(/<[/\w]/g,e.data))return dt(e),!0;if(!j[r]||H[r]){if(!H[r]&&Pt(r)){if(V.tagNameCheck instanceof RegExp&&Ne(V.tagNameCheck,r))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(r))return!1}if(ie&&!le[r]){const t=x(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,y(e))}}}return dt(e),!0}return e instanceof u&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=Oe(e.tagName),r=Oe(t.tagName);return!!xe[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||Ce[r]):Boolean(lt[n]):e.namespaceURI===fe?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&Me[r]:Boolean(ct[n]):e.namespaceURI===ge?!(t.namespaceURI===me&&!Me[r])&&!(t.namespaceURI===fe&&!Ce[r])&&!ct[n]&&(_e[n]||!lt[n]):!("application/xhtml+xml"!==Be||!xe[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Ne(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&e.nodeType===gt&&(t=e.textContent,Te([I,R,D],(e=>{t=Ze(t,e," ")})),e.textContent!==t&&(Re(n.removed,{element:e.cloneNode()}),e.textContent=t)),Mt(P.afterSanitizeElements,e,null),!1):(dt(e),!0)},Tt=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in it))return!1;if(G&&!$[t]&&Ne(O,t));else if(W&&Ne(A,t));else if(!z[t]||$[t]){if(!(Pt(e)&&(V.tagNameCheck instanceof RegExp&&Ne(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&Ne(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Ne(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(he[t]);else if(Ne(F,Ze(n,Z,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Le(n,"data:")||!ce[e]){if(U&&!Ne(E,Ze(n,Z,"")));else if(n)return!1}else;return!0},Pt=function(e){return"annotation-xml"!==e&&Ee(e,L)},It=function(e){Mt(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ct(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,u=$e(a);let c="value"===a?l:Fe(l);if(r.attrName=u,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,Mt(P.uponSanitizeAttribute,e,r),c=r.attrValue,!oe||"id"!==u&&"name"!==u||(pt(a,e),c="user-content-"+c),Y&&Ne(/((--!?|])>)|<\/(style|title)/i,c)){pt(a,e);continue}if(r.forceKeepAttr)continue;if(pt(a,e),!r.keepAttr)continue;if(!q&&Ne(/\/>/i,c)){pt(a,e);continue}K&&Te([I,R,D],(e=>{c=Ze(c,e," ")}));const d=$e(e.nodeName);if(Tt(d,u,c)){if(w&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(d,u)){case"TrustedHTML":c=w.createHTML(c);break;case"TrustedScriptURL":c=w.createScriptURL(c)}try{s?e.setAttributeNS(s,a,c):e.setAttribute(a,c),Ct(e)?dt(e):Ie(n.removed)}catch(e){}}}Mt(P.afterSanitizeAttributes,e,null)},Rt=function e(t){let n=null;const r=St(t);for(Mt(P.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Mt(P.uponSanitizeShadowNode,n,null),_t(n),It(n),n.content instanceof a&&e(n.content);Mt(P.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,u=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!kt(e)){if("function"!=typeof e.toString)throw ze("toString is not a function");if("string"!=typeof(e=e.toString()))throw ze("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||st(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=$e(e.nodeName);if(!j[t]||H[t])throw ze("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=wt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===mt&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!K&&!X&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=wt(e),!r)return ee?null:ne?S:""}r&&J&&dt(r.firstChild);const c=St(ae?e:r);for(;s=c.nextNode();)_t(s),It(s),s.content instanceof a&&Rt(s.content);if(ae)return e;if(ee){if(te)for(u=M.call(r.ownerDocument);r.firstChild;)u.appendChild(r.firstChild);else u=r;return(z.shadowroot||z.shadowrootmode)&&(u=T.call(o,u,!0)),u}let d=X?r.outerHTML:r.innerHTML;return X&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Ne(ht,r.ownerDocument.doctype.name)&&(d="\n"+d),K&&Te([I,R,D],(e=>{d=Ze(d,e," ")})),w&&ne?w.createHTML(d):d},n.setConfig=function(){st(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){ot=null,Q=!1},n.isValidAttribute=function(e,t,n){ot||st({});const r=$e(e),o=$e(t);return Tt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Re(P[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Pe(P[e],t);return-1===n?void 0:De(P[e],n,1)[0]}return Ie(P[e])},n.removeHooks=function(e){P[e]=[]},n.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),St=n(69244),Ct=n(52080),kt=n(1090),Mt=n(91412);const _t=(0,o.createContext)(void 0);function Tt(e){var t;const{data:n,isLoading:o}=(0,kt.Z)();return o||void 0===n?(0,r.jsx)(Mt.B,{}):(0,r.jsx)(_t.Provider,{value:{config:n},children:(0,r.jsx)(St.h$,{showCustom:!n.frontend.time_range.disable_custom,showZoomButtons:!n.frontend.time_range.disable_zoom,options:null===(t=n.frontend.time_range.options)||void 0===t?void 0:t.map((e=>(0,Ct.buildRelativeTimeOption)(e))),children:e.children})})}function Pt(){const e=(0,o.useContext)(_t);if(void 0===e)throw new Error("No ConfigContext found. Did you forget a Provider?");return e}function It(){const{config:e}=Pt();return!e.datasource.global.disable}function Rt(){const{config:e}=Pt();return!e.datasource.project.disable}function Dt(){const{config:e}=Pt();return!e.datasource.disable_local}function Ot(){const{config:e}=Pt();return!e.variable.global.disable}function At(){const{config:e}=Pt();return!e.variable.project.disable}function Et(){const{config:e}=Pt();return!e.variable.disable_local}function Zt(){const{config:e}=Pt();return e.frontend.explorer.enable}function Lt(){const{config:e}=Pt();return e.ephemeral_dashboard.enable}function Ft(){const{config:e}=Pt();return e.security.readonly}function jt(){const{config:e}=Pt();return e.security.enable_auth}function Nt(){const{config:e}=Pt();return e.security.authentication.disable_sign_up}function zt(){var e,t;const{config:n}=Pt();return(0,o.useMemo)((()=>{var e,t;return(null===(e=n.database.file)||void 0===e?void 0:e.case_sensitive)&&(null===(t=n.database.sql)||void 0===t?void 0:t.case_sensitive)?n.frontend.important_dashboards??[]:(n.frontend.important_dashboards??[]).map((e=>({project:e.project.toLowerCase(),dashboard:e.dashboard.toLowerCase()})))}),[null===(e=n.database.file)||void 0===e?void 0:e.case_sensitive,null===(t=n.database.sql)||void 0===t?void 0:t.case_sensitive,n.frontend.important_dashboards])}function Bt(){const{config:e}=Pt(),t=(0,o.useMemo)((()=>ge.parse(e.frontend.information??"",{gfm:!0,async:!1})),[e.frontend.information]);return(0,o.useMemo)((()=>wt.sanitize(t)),[t])}function Vt(){const{config:e}=Pt();return e.security.authentication.providers.enable_native}function Ht(){var e,t;const{config:n}=Pt();return!!(null===(e=n.security.authentication.providers.oidc)||void 0===e?void 0:e.length)||!!(null===(t=n.security.authentication.providers.oauth)||void 0===t?void 0:t.length)}},5395:function(e,t,n){"use strict";n.d(t,{RA:()=>d,VT:()=>c,n2:()=>l});var r=n(77928),o=n(32123);const i="PERSES_DASHBOARD_NAV_HISTORY",a=(0,o.createContext)(void 0),s=(0,o.createContext)((()=>{}));function l(e){const t=(0,o.useMemo)((()=>{try{return JSON.parse(window.localStorage.getItem(i)||"[]")}catch{return[]}}),[]),[n,l]=(0,o.useReducer)(u,t);return(0,r.jsx)(a.Provider,{value:n,children:(0,r.jsx)(s.Provider,{value:l,children:e.children})})}function u(e,t){const n=e.findIndex((e=>e.project===t.project&&e.name===t.name));return n>-1&&e.splice(n,1),e.unshift({project:t.project,name:t.name,date:(new Date).toISOString()}),e=e.slice(0,100),window.localStorage.setItem(i,JSON.stringify(e)),e}function c(){const e=(0,o.useContext)(a);if(void 0===e)throw new Error("No NavHistoryContext found. Did you forget a Provider?");return e}function d(){const e=(0,o.useContext)(s);if(void 0===e)throw new Error("No NavHistoryDispatchContext found. Did you forget a Provider?");return e}},53944:function(e,t,n){"use strict";n.d(t,{NV:()=>d,oi:()=>c,sV:()=>h,su:()=>p});var r=n(39517),o=n(51574),i=n(9432),a=n(84485),s=n(19548),l=n(36252);const u="globaldatasources";function c(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,a.Z)({resource:u});return(0,l.r)(t,{method:s.mY,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:[u]})})}function d(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,a.Z)({resource:u,name:e.metadata.name});return(0,l.r)(t,{method:s.yh,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:[u]})})}function h(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,a.Z)({resource:u,name:e.metadata.name});return(0,l.h)(t,{method:s.Ms,headers:s.VO})}(e).then((()=>e)),onSuccess:t=>(e.removeQueries({queryKey:[u,t.metadata.name]}),e.invalidateQueries({queryKey:[u]}))})}function p(e){return(0,i.a)({queryKey:[u],queryFn:()=>function(){const e=(0,a.Z)({resource:u});return(0,l.r)(e,{method:s.tc,headers:s.VO})}(),...e})}},70318:function(e,t,n){"use strict";n.d(t,{g$:()=>_,pk:()=>k,w4:()=>S,To:()=>w,pd:()=>C,QS:()=>M});for(var r=n(9432),o=n(39517),i=n(51574),a=n(21953),s=n(40697),l=n(32123),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Map,d=0;d<64;d++){var h=d.toString(2);h="0".repeat(6-h.length)+h,c.set(u.charCodeAt(d),h)}function p(e){try{if("string"!=typeof e||3!==e.split(".").length)return null;var t=function(e){for(var t,n="",r=e.length,o=0;o251&&t<254&&o+5247&&t<252&&o+4239&&t<248&&o+3223&&t<240&&o+2191&&t<224&&o+1{const e=setTimeout((()=>{r(t)}),x);return()=>clearTimeout(e)}),[t]),void 0!==n[y]}function S(){const[e]=(0,f.useQueryParam)(b);return e??"/"}function C(e){return`${b}=${encodeURIComponent(e)}`}function k(){const[e]=(0,s.fP)(),t=e[y];return(0,r.a)({queryKey:["jwt"],queryFn:()=>p(`${t}.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`),enabled:!!t})}function M(){const e=(0,o.NL)();return(0,i.D)({mutationKey:[v],mutationFn:e=>function(e){const t=(0,m.Z)({resource:`${v}/providers/native/login`,apiPrefix:"/api"});return(0,a.rd)(t,{method:g.mY,headers:g.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:[v]})})}function _(){const e=(0,m.Z)({resource:`${v}/refresh`,apiPrefix:"/api"});return(0,a.he)(e,{method:g.mY,headers:g.VO})}},1090:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(9432),o=n(21953),i=n(84485);const a="config";function s(e){return(0,r.a)({queryKey:[a],queryFn:()=>function(){const e=(0,i.Z)({resource:a,apiPrefix:"/api"});return(0,o.rd)(e)}(),...e})}},89492:function(e,t,n){"use strict";n.d(t,{Gm:()=>b,QU:()=>f,UQ:()=>g,iQ:()=>p,kO:()=>v,vg:()=>h,wm:()=>m,yZ:()=>y});var r=n(39517),o=n(51574),i=n(9432),a=n(32123),s=n(5395),l=n(81650),u=n(19548),c=n(84485),d=n(36252);const h="dashboards";function p(e){const t=(0,r.NL)();return(0,o.D)({mutationKey:[h],mutationFn:e=>function(e){const t=(0,c.Z)({resource:h,project:e.metadata.project});return(0,d.r)(t,{method:u.mY,headers:u.VO,body:JSON.stringify(e)})}(e),onSuccess:e,onSettled:()=>t.invalidateQueries({queryKey:[h]})})}function f(e,t){return(0,i.a)({queryKey:[h,e,t],queryFn:()=>function(e,t){const n=(0,c.Z)({resource:h,project:e,name:t});return(0,d.r)(n,{method:u.tc,headers:u.VO})}(e,t)})}function m(e){return(0,i.a)({queryKey:[h,e.project,e.metadataOnly],queryFn:()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new URLSearchParams;t&&n.set("metadata_only","true");const r=(0,c.Z)({resource:h,project:e,queryParams:n});return(0,d.r)(r,{method:u.tc,headers:u.VO})}(e.project,e.metadataOnly),...e})}function g(e,t){const{data:n,isLoading:r}=m({project:e,metadataOnly:!0}),o=(0,s.VT)();return{data:(0,a.useMemo)((()=>{const e=[];return(o??[]).forEach((t=>{const r=(n??[]).find((e=>t.project===e.metadata.project&&t.name===e.metadata.name));r&&e.push({dashboard:r,date:t.date})})),t?e.slice(0,t):e}),[n,o,t]),isLoading:r}}function v(e){const{data:t,isLoading:n}=m({project:e,metadataOnly:!0}),r=(0,l.Cc)();return{data:(0,a.useMemo)((()=>{const e=[];return r.forEach((n=>{const r=(t??[]).find((e=>n.project===e.metadata.project&&n.dashboard===e.metadata.name));r&&e.push(r)})),e}),[t,r]),isLoading:n}}function y(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[h],mutationFn:e=>function(e){const t=(0,c.Z)({resource:h,project:e.metadata.project,name:e.metadata.name});return(0,d.r)(t,{method:u.yh,headers:u.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:[h]})})}function b(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[h],mutationFn:e=>function(e){const t=(0,c.Z)({resource:h,project:e.metadata.project,name:e.metadata.name});return(0,d.h)(t,{method:u.Ms,headers:u.VO})}(e).then((()=>e)),onSuccess:t=>(e.removeQueries({queryKey:[h,t.metadata.project,t.metadata.name]}),e.invalidateQueries({queryKey:[h]}))})}},5952:function(e,t,n){"use strict";n.d(t,{JT:()=>d,Jg:()=>p,fS:()=>m,fq:()=>g,kq:()=>f,oY:()=>h,vg:()=>c});var r=n(39517),o=n(51574),i=n(9432),a=n(19548),s=n(85632),l=n(84485),u=n(36252);const c="datasources";function d(e,t,n){const r=new URLSearchParams;return void 0!==e&&r.append("kind",e),void 0!==t&&r.append("default",String(t)),void 0!==n&&r.append("name",n),r}function h(e,t,n,r){const o=(0,l.Z)({resource:c,project:e,queryParams:d(t,n,r)});return(0,u.r)(o)}function p(e){const t=(0,r.NL)(),n=(0,s.Z)({resource:c,parent:e});return(0,o.D)({mutationKey:n,mutationFn:e=>function(e){const t=(0,l.Z)({resource:c,project:e.metadata.project});return(0,u.r)(t,{method:a.mY,headers:a.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>t.invalidateQueries({queryKey:n})})}function f(e){const t=(0,r.NL)(),n=(0,s.Z)({resource:c,parent:e});return(0,o.D)({mutationKey:n,mutationFn:e=>function(e){const t=(0,l.Z)({resource:c,project:e.metadata.project,name:e.metadata.name});return(0,u.r)(t,{method:a.yh,headers:a.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>t.invalidateQueries({queryKey:n})})}function m(e){const t=(0,r.NL)(),n=(0,s.Z)({resource:c,parent:e});return(0,o.D)({mutationKey:n,mutationFn:e=>function(e){const t=(0,l.Z)({resource:c,project:e.metadata.project,name:e.metadata.name});return(0,u.h)(t,{method:a.Ms,headers:a.VO})}(e).then((()=>e)),onSuccess:e=>(t.removeQueries({queryKey:[...n,e.metadata.name]}),t.invalidateQueries({queryKey:n}))})}function g(e){return(0,i.a)({queryKey:(0,s.Z)({resource:c,parent:e.project}),queryFn:()=>function(e){const t=(0,l.Z)({resource:c,project:e});return(0,u.r)(t,{method:a.tc,headers:a.VO})}(e.project),...e})}},13323:function(e,t,n){"use strict";n.d(t,{Fp:()=>h,IF:()=>d,KP:()=>c,_E:()=>f,yl:()=>p});var r=n(39517),o=n(51574),i=n(9432),a=n(19548),s=n(84485),l=n(36252);const u="ephemeraldashboards";function c(e){const t=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,s.Z)({resource:u,project:e.metadata.project});return(0,l.r)(t,{method:a.mY,headers:a.VO,body:JSON.stringify(e)})}(e),onSuccess:e,onSettled:()=>t.invalidateQueries({queryKey:[u]})})}function d(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,s.Z)({resource:u,project:e.metadata.project,name:e.metadata.name});return(0,l.r)(t,{method:a.yh,headers:a.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:[u]})})}function h(){const e=(0,r.NL)();return(0,o.D)({mutationKey:[u],mutationFn:e=>function(e){const t=(0,s.Z)({resource:u,project:e.metadata.project,name:e.metadata.name});return fetch(t,{method:a.Ms,headers:a.VO})}(e).then((()=>e)),onSuccess:t=>(e.removeQueries({queryKey:[u,t.metadata.project,t.metadata.name]}),e.invalidateQueries({queryKey:[u]}))})}function p(e,t){return(0,i.a)({queryKey:[u,e,t],queryFn:()=>function(e,t){const n=(0,s.Z)({resource:u,project:e,name:t});return(0,l.r)(n,{method:a.tc,headers:a.VO})}(e,t)})}function f(e){return(0,i.a)({queryKey:[u,e],queryFn:()=>function(e){const t=(0,s.Z)({resource:u,project:e});return(0,l.r)(t,{method:a.tc,headers:a.VO})}(e)})}},36252:function(e,t,n){"use strict";n.d(t,{h:()=>i,r:()=>a});var r=n(21953),o=n(70318);async function i(){for(var e=arguments.length,t=new Array(e),n=0;n{if(401!==e.status)throw e;return(0,o.g$)().catch((t=>{throw e})).then((()=>(0,r.he)(...t)))}))}async function a(){for(var e=arguments.length,t=new Array(e),n=0;na,VO:()=>s,mY:()=>o,tc:()=>r,yh:()=>i});const r="GET",o="POST",i="PUT",a="DELETE",s={"Content-Type":"application/json",Accept:"application/json"}},23445:function(e,t,n){"use strict";n.d(t,{BD:()=>x,GW:()=>w,LZ:()=>b,PY:()=>y,e5:()=>v,ec:()=>S,hY:()=>k});var r=n(9432),o=n(39517),i=n(51574),a=n(32123),s=n(84485),l=n(19548),u=n(89492),c=n(24734),d=n(5952),h=n(85632),p=n(36252),f=n(56594);const m="projects",g=[u.vg,c.vg,d.vg];function v(e){const t=(0,s.Z)({resource:m,name:e});return(0,p.r)(t,{method:l.tc,headers:l.VO})}function y(e){return(0,r.a)({queryKey:[m,e],queryFn:()=>v(e)})}function b(e){const t=(0,h.Z)({resource:m});return(0,r.a)({queryKey:t,queryFn:()=>function(){const e=(0,s.Z)({resource:m});return(0,p.r)(e,{method:l.tc,headers:l.VO})}(),...e})}function x(){const e=(0,o.NL)(),t=(0,h.Z)({resource:m});return(0,i.D)({mutationKey:t,mutationFn:e=>function(e){const t=(0,s.Z)({resource:m});return(0,p.r)(t,{method:l.mY,headers:l.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:[...t]}),e.invalidateQueries({queryKey:[f.qz]})])})}function w(){const e=(0,o.NL)(),t=(0,h.Z)({resource:m});return(0,i.D)({mutationKey:t,mutationFn:e=>function(e){const t=e.metadata.name,n=(0,s.Z)({resource:m,name:t});return(0,p.r)(n,{method:l.yh,headers:l.VO,body:JSON.stringify(e)})}(e),onSuccess:n=>Promise.all([e.invalidateQueries({queryKey:[...t,n.metadata.name]}),e.invalidateQueries({queryKey:t})])})}function S(){const e=(0,o.NL)(),t=(0,h.Z)({resource:m});return(0,i.D)({mutationKey:t,mutationFn:async e=>(await function(e){const t=e.metadata.name,n=(0,s.Z)({resource:m,name:t});return(0,p.h)(n,{method:l.Ms,headers:l.VO})}(e),e),onSuccess:n=>{e.removeQueries({queryKey:[...t,n.metadata.name]});const r=g.map((e=>(0,h.Z)({resource:e})));return r.forEach((t=>e.removeQueries({queryKey:[...t,n.metadata.name]}))),Promise.all([...r.map((t=>e.invalidateQueries({queryKey:t}))),e.invalidateQueries({queryKey:[f.qz]}),e.invalidateQueries({queryKey:t})])}})}function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const n=t.data??[],r=e.data??[],o={};for(const e of n){const t=o[e.metadata.project]??[];t.push(e),o[e.metadata.project]=t}const i=[];for(const e of r){const t=o[e.metadata.name]??[];i.push({project:e,dashboards:t})}return i}),[e.data,t.data])}}},85632:function(e,t,n){"use strict";function r(e){const t=[e.resource];return e.parent&&t.push(e.parent),e.name&&t.push(e.name),t}n.d(t,{I:()=>r,Z:()=>o});const o=r},75204:function(e,t,n){"use strict";n.d(t,{Ce:()=>s,Lr:()=>o,UV:()=>l,Xy:()=>r,fT:()=>u,hG:()=>i,jV:()=>h,t9:()=>a});const r="/admin",o="/sign-in",i="/sign-up",a="/config",s="/import",l="/projects",u="/explore",c=[r,o,i,a,s,l,u],d=[r,l];function h(){return function(e){let t=e;t.endsWith("/")&&(t=t.slice(0,-1));for(const e of c)if(e&&t.endsWith(e)){t=t.slice(0,t.length-e.length);break}return function(e){for(const t of d){const n=e.split(t)[0];if(void 0!==n&&n!==e)return n}return e}(t)}(window.location.pathname)}},84485:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(75204);const o="/api/v1";function i(e){const t=(0,r.jV)();let n=void 0===e.apiPrefix?o:e.apiPrefix;return void 0!==e.project&&e.project.length>0&&(n=`${n}/projects/${encodeURIComponent(e.project)}`),n=`${n}/${e.resource}`,void 0!==e.name&&e.name.length>0&&(n=`${n}/${encodeURIComponent(e.name)}`),e.pathSuffix&&e.pathSuffix.length>0&&(n=`${n}/${e.pathSuffix.join("/")}`),void 0!==e.queryParams&&(n=`${n}?${e.queryParams.toString()}`),t+n}},56594:function(e,t,n){"use strict";n.d(t,{I1:()=>m,Qe:()=>g,WG:()=>h,kD:()=>f,ny:()=>p,qz:()=>d});var r=n(9432),o=n(39517),i=n(51574),a=n(84485),s=n(19548),l=n(85632),u=n(36252);const c="users",d="user";function h(){return(0,r.a)({queryKey:(0,l.Z)({resource:c}),queryFn:()=>function(){const e=(0,a.Z)({resource:c});return(0,u.r)(e,{method:s.tc,headers:s.VO})}()})}function p(){const e=(0,o.NL)(),t=(0,l.Z)({resource:c});return(0,i.D)({mutationKey:t,mutationFn:e=>function(e){const t=(0,a.Z)({resource:c});return(0,u.r)(t,{method:s.mY,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>e.invalidateQueries({queryKey:t})})}function f(){const e=(0,o.NL)(),t=(0,l.Z)({resource:c});return(0,i.D)({mutationKey:t,mutationFn:e=>function(e){const t=e.metadata.name,n=(0,a.Z)({resource:c,name:t});return(0,u.r)(n,{method:s.yh,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:n=>Promise.all([e.invalidateQueries({queryKey:[...t,n.metadata.name]}),e.invalidateQueries({queryKey:t})])})}function m(){const e=(0,o.NL)(),t=(0,l.Z)({resource:c});return(0,i.D)({mutationKey:t,mutationFn:async e=>(await function(e){const t=e.metadata.name,n=(0,a.Z)({resource:c,name:t});return(0,u.h)(n,{method:s.Ms,headers:s.VO})}(e),e),onSuccess:n=>(e.removeQueries({queryKey:[...t,n.metadata.name]}),e.invalidateQueries({queryKey:t}))})}function g(e){return(0,r.a)({queryKey:[d,e,"permissions"],queryFn:()=>function(e){const t=(0,a.Z)({resource:c,name:e,pathSuffix:["permissions"]});return e?(0,u.r)(t,{method:s.tc,headers:s.VO}):Promise.resolve({})}(e)})}},24734:function(e,t,n){"use strict";n.d(t,{H9:()=>f,ed:()=>h,nk:()=>p,vg:()=>c,zc:()=>d});var r=n(9432),o=n(39517),i=n(51574),a=n(84485),s=n(19548),l=n(85632),u=n(36252);const c="variables";function d(e){return(0,r.a)({queryKey:(0,l.I)({resource:c,parent:e}),queryFn:()=>function(e){const t=(0,a.Z)({resource:c,project:e});return(0,u.r)(t,{method:s.tc,headers:s.VO})}(e)})}function h(e){const t=(0,o.NL)(),n=(0,l.I)({resource:c,parent:e});return(0,i.D)({mutationKey:n,mutationFn:e=>function(e){const t=e.metadata.project,n=(0,a.Z)({resource:c,project:t});return(0,u.r)(n,{method:s.mY,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:()=>t.invalidateQueries({queryKey:n})})}function p(e){const t=(0,o.NL)(),n=(0,l.I)({resource:c,parent:e});return(0,i.D)({mutationKey:n,mutationFn:e=>function(e){const t=e.metadata.name,n=e.metadata.project,r=(0,a.Z)({resource:c,project:n,name:t});return(0,u.r)(r,{method:s.yh,headers:s.VO,body:JSON.stringify(e)})}(e),onSuccess:e=>Promise.all([t.invalidateQueries({queryKey:[...n,e.metadata.name]}),t.invalidateQueries({queryKey:n})])})}function f(e){const t=(0,o.NL)(),n=(0,l.I)({resource:c,parent:e});return(0,i.D)({mutationKey:n,mutationFn:async e=>(await function(e){const t=e.metadata.name,n=e.metadata.project,r=(0,a.Z)({resource:c,project:n,name:t});return(0,u.h)(r,{method:s.Ms,headers:s.VO})}(e),e),onSuccess:e=>(t.removeQueries({queryKey:[...n,e.metadata.name]}),t.invalidateQueries({queryKey:n}))})}},10839:function(e,t,n){"use strict";n.d(t,{N:()=>a,O:()=>i});var r=n(62248),o=n(35224);function i(){return(0,r.Z)((0,o.Z)().breakpoints.up("md"))}function a(){return(0,r.Z)((0,o.Z)().breakpoints.down("md"))}},7087:function(e,t,n){"use strict";function r(e){return e.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/[^a-zA-Z0-9_.-]/g,"_")}n.d(t,{p:()=>r})},52080:function(e,t,n){"use strict";n.r(t),n.d(t,{ErrorAlert:()=>a$,JSONEditor:()=>o6,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>Hie,OptionsEditorGroup:()=>$c,DensitySelector:()=>Kc,assembleTransform:()=>Bie,clearHighlightedSeries:()=>cn,testChartsTheme:()=>pae,ErrorBoundary:()=>s$.ErrorBoundary,SeriesMarker:()=>bie,TimeRangeSelector:()=>yie,ChartsThemeContext:()=>Q,TextOverlay:()=>f6,DEFAULT_COLUMN_HEIGHT:()=>ju,useMousePosition:()=>Eie,NoDataOverlay:()=>m6,generateChartsTheme:()=>qr,OptionsEditorGrid:()=>Hc,OPTIMIZED_MODE_SERIES_LIMIT:()=>Ht,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>Mie,DiscardChangesConfirmationDialog:()=>Dc,useChartsTheme:()=>ee,EMPHASIZED_SERIES_DESCRIPTION:()=>Iie,persesColumnsToTanstackColumns:()=>zu,mockChartsContext:()=>fae,Legend:()=>fc,TOOLTIP_DATE_FORMAT:()=>Die,TOOLTIP_MAX_WIDTH:()=>Sie,dateFormatOptionsWithTimeZone:()=>Hr,legacyCheckforNearbySeries:()=>Uie,ToolbarIconButton:()=>aae,PIN_TOOLTIP_HELP_TEXT:()=>Lie,checkforNearbyTimeSeries:()=>Gie,getTheme:()=>Nae,TooltipHeader:()=>tae,TOOLTIP_BG_COLOR_FALLBACK:()=>Rie,UNPIN_TOOLTIP_HELP_TEXT:()=>Fie,DateTimeRangePicker:()=>vie,handleMoveUp:()=>lh,getClosestTimestamp:()=>fn,getFormattedAxis:()=>Vt,formatWithTimeZone:()=>$r,batchDispatchNearbySeriesActions:()=>hn,useTimeZone:()=>Xr,ChartsProvider:()=>X,isWithinPercentageRange:()=>Yie,TOOLTIP_MIN_WIDTH:()=>wie,TOOLTIP_LABELS_MAX_WIDTH:()=>kie,getYBuffer:()=>Xie,DEFAULT_PINNED_CROSSHAIR:()=>Wt,FormatControls:()=>cae,TooltipContent:()=>nae,SHOW_FEWER_SERIES_LIMIT:()=>Wie,TimeChartTooltip:()=>rae,getClosestTimestampInFullDataset:()=>mn,getTableCellLayout:()=>Nu,EChart:()=>o$,PINNED_CROSSHAIR_SERIES_NAME:()=>$t,SortSelector:()=>y6,SnackbarProvider:()=>Zt,Drawer:()=>Rh,AlignSelector:()=>s,LinksEditor:()=>u6,TimeZoneContext:()=>Kr,ValueMappingsEditor:()=>rse,ColorPicker:()=>U,SeriesLabelsStack:()=>xie,useSnackbar:()=>Ft,checkCrosshairPinnedStatus:()=>pn,SeriesInfo:()=>jie,Table:()=>lc,InfoTooltip:()=>Nc,TimeZoneProvider:()=>Yr,LoadingOverlay:()=>g6,typography:()=>Fae,Dialog:()=>Rc,DropIndicator:()=>Yc,TransformsEditor:()=>Qae,OptionsEditorControl:()=>Vc,TOOLTIP_PADDING:()=>_ie,getFormattedAxisLabel:()=>Wr,SortSelectorButtons:()=>b6,getTooltipStyles:()=>Vie,useChartsContext:()=>J,RefreshIntervalPicker:()=>Jae,enableDataZoom:()=>ln,useDragAndDropMonitor:()=>rh,combineSx:()=>gn,OptionsEditorColumn:()=>Ac,getDateAndTime:()=>Gr,ThresholdsEditor:()=>j6,DEFAULT_TOOLTIP_CONFIG:()=>Zie,handleMoveDown:()=>uh,DragButton:()=>ch,useId:()=>vn,ContentWithLegend:()=>bc,NEARBY_SERIES_DESCRIPTION:()=>Pie,isLegendItemVisuallySelected:()=>gl,getPointInGrid:()=>dn,EMPTY_TOOLTIP_DATA:()=>Aie,legacyGetNearbySeriesData:()=>Kie,buildRelativeTimeOption:()=>sn,SettingsAutocomplete:()=>Uc,FontSizeSelector:()=>u$,defaultCursorData:()=>Oie,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>$ie,getNearbySeriesData:()=>qie,TOOLTIP_MAX_HEIGHT:()=>Cie,YAxisLabel:()=>dae,FALLBACK_CHART_WIDTH:()=>Tie,DragAndDropElement:()=>oh,restoreChart:()=>un,ModeSelector:()=>h6,TextField:()=>Sc,DEFAULT_COLUMN_WIDTH:()=>Fu,FormActions:()=>d$,OptionsColorPicker:()=>Qr});var r={};n.r(r),n.d(r,{Arc:()=>DT,BezierCurve:()=>PT,BoundingRect:()=>Qf,Circle:()=>$_,CompoundPath:()=>AT,Ellipse:()=>U_,Group:()=>jv,Image:()=>kx,IncrementalDisplayable:()=>$T,Line:()=>CT,LinearGradient:()=>ZT,OrientedBoundingRect:()=>BT,Path:()=>gx,Point:()=>Vf,Polygon:()=>gT,Polyline:()=>bT,RadialGradient:()=>LT,Rect:()=>Ox,Ring:()=>hT,Sector:()=>uT,Text:()=>Ux,applyTransform:()=>lP,clipPointsByRect:()=>hP,clipRectByRect:()=>pP,createIcon:()=>fP,extendPath:()=>YT,extendShape:()=>qT,getShapeClass:()=>QT,getTransform:()=>sP,groupTransition:()=>dP,initProps:()=>qw,isElementRemoved:()=>Kw,lineLineIntersect:()=>gP,linePolygonIntersect:()=>mP,makeImage:()=>eP,makePath:()=>JT,mergePath:()=>nP,registerShape:()=>XT,removeElement:()=>Yw,removeElementWithFadeOut:()=>Qw,resizePath:()=>rP,setTooltipConfig:()=>yP,subPixelOptimize:()=>aP,subPixelOptimizeLine:()=>oP,subPixelOptimizeRect:()=>iP,transformDirection:()=>uP,traverseElements:()=>xP,updateProps:()=>Uw});var o=n(77928),i=n(14937),a=n(46724);function s(e){let{onChange:t,value:n="left",...r}=e;const s=e=>{t(e)};return(0,o.jsxs)(i.Z,{"aria-label":"Alignement",...r,children:[(0,o.jsx)(a.Z,{onClick:()=>s("left"),variant:"left"===n?"contained":"outlined",children:"Left"},"left"),(0,o.jsx)(a.Z,{onClick:()=>s("center"),variant:"center"===n?"contained":"outlined",children:"Center"},"center"),(0,o.jsx)(a.Z,{onClick:()=>s("right"),variant:"right"===n?"contained":"outlined",children:"Right"},"right")]})}var l=n(40331),u=n(16639),c=n(6931),d=n(32123);function h(){return(h=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function f(e){var t=(0,d.useRef)(e),n=(0,d.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var m=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(y(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=v(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(b(t),!function(e,t){return t&&!g(e)}(t,l.current)&&r)){if(g(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(y(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],m=u[1],x=u[2];return(0,d.useEffect)((function(){return x}),[x]),d.createElement("div",h({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:m,tabIndex:0,role:"slider"}))})),w=function(e){return e.filter(Boolean).join(" ")},S=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=w(["react-colorful__pointer",e.className]);return d.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},d.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},C=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},k=(Math.PI,function(e){return O(M(e))}),M=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?C(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?C(parseInt(e.substring(6,8),16)/255,2):1}},_=function(e){return D(I(e))},T=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:C(e.h),s:C(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:C(o/2),a:C(r,2)}},P=function(e){var t=T(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},I=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:C(255*[r,s,a,a,l,r][u]),g:C(255*[l,r,r,s,a,a][u]),b:C(255*[a,a,l,r,r,s][u]),a:C(o,2)}},R=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},D=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o<1?R(C(255*o)):"";return"#"+R(t)+R(n)+R(r)+i},O=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:C(60*(s<0?s+6:s)),s:C(i?a/i*100:0),v:C(i/255*100),a:o}},A=d.memo((function(e){var t=e.hue,n=e.onChange,r=w(["react-colorful__hue",e.className]);return d.createElement("div",{className:r},d.createElement(x,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:m(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":C(t),"aria-valuemax":"360","aria-valuemin":"0"},d.createElement(S,{className:"react-colorful__hue-pointer",left:t/360,color:P({h:t,s:100,v:100,a:1})})))})),E=d.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:P({h:t.h,s:100,v:100,a:1})};return d.createElement("div",{className:"react-colorful__saturation",style:r},d.createElement(x,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:m(t.s+100*e.left,0,100),v:m(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+C(t.s)+"%, Brightness "+C(t.v)+"%"},d.createElement(S,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:P(t)})))})),Z=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},L=function(e,t){return e.toLowerCase()===t.toLowerCase()||Z(M(e),M(t))};function F(e,t,n){var r=f(n),o=(0,d.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,d.useRef)({color:t,hsva:i});(0,d.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,d.useEffect)((function(){var t;Z(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,d.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var j,N="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,z=new Map,B=function(e){N((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!z.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',z.set(t,r);var o=j||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},V=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=p(e,["className","colorModel","color","onChange"]),s=(0,d.useRef)(null);B(s);var l=F(n,o,i),u=l[0],c=l[1],f=w(["react-colorful",t]);return d.createElement("div",h({},a,{ref:s,className:f}),d.createElement(E,{hsva:u,onChange:c}),d.createElement(A,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},H={defaultColor:"000",toHsva:k,fromHsva:function(e){return _({h:e.h,s:e.s,v:e.v,a:1})},equal:L},$=function(e){return d.createElement(V,h({},e,{colorModel:H}))},W=n(69999),G=n(50913);const U=e=>{let{color:t,onChange:n,onClear:r,palette:i}=e;const[a,s]=(0,d.useState)(t),h=e=>{s(e),null==n||n(e)};return(0,o.jsxs)(l.Z,{spacing:1,children:[(0,o.jsx)($,{color:t,onChange:h,style:{width:"100%"}}),(0,o.jsx)(l.Z,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:i&&i.map(((e,t)=>(0,o.jsx)(u.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>h(e),children:(0,o.jsx)(W.default,{})},t)))}),(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(c.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:a,onChange:e=>{const t=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);s(`#${t}`),q(e.target.value)&&(null==n||n(e.target.value))}}),r&&(0,o.jsx)(u.Z,{onClick:r,children:(0,o.jsx)(G.default,{})})]})]})},q=(e,t)=>{const n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var K=n(37991),Y=n(99289);function X(e){const{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:i=!0}=e,[a,s]=(0,d.useState)(null),l=(0,d.useMemo)((()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:a,enableSyncGrouping:i,setLastTooltipPinnedCoords:s})),[n,r,i,a,s]);return(0,o.jsx)(Q.Provider,{value:l,children:t})}const Q=(0,d.createContext)(void 0);function J(){const e=(0,d.useContext)(Q);if(void 0===e)throw new Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function ee(){return J().chartsTheme}var te=n(76418);function ne(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||oe,ae=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,se=/\/\*[^]*?\*\/| +/g,le=/\n+/g,ue=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?ue(a,i):i+"{"+ue(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=ue(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ue.p?ue.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ce={},de=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+de(e[n]);return t}return e};function he(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=de(e),a=ce[i]||(ce[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!ce[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=ae.exec(e.replace(se,""));)t[4]?r.shift():t[3]?(n=t[3].replace(le," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(le," ").trim();return r[0]})(e);ce[a]=ue(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&ce.g?ce.g:null;return n&&(ce.g=ce[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(ce[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ue(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,ie(t.target),t.g,t.o,t.k)}he.bind({g:1}),he.bind({k:1});function pe(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var be=function(){return""},xe=d.createContext({enqueueSnackbar:be,closeSnackbar:be}),we="@media (max-width:599.95px)",Se="@media (min-width:600px)",Ce=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ke=function(e){return""+Ce(e.vertical)+Ce(e.horizontal)},Me=function(e){return!!e||0===e},_e="unmounted",Te="exited",Pe="entering",Ie="entered",Re="exiting",De=function(e){function t(t){var n;n=e.call(this,t)||this;var r,o=t.appear;return n.appearStatus=null,t.in?o?(r=Te,n.appearStatus=Pe):r=Ie:r=t.unmountOnExit||t.mountOnEnter?_e:Te,n.state={status:r},n.nextCallback=null,n}ge(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_e?{status:Te}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Pe&&n!==Ie&&(t=Pe):n!==Pe&&n!==Ie||(t=Re)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===Pe?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===Te&&this.setState({status:_e})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,o=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:Pe},(function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(o.enter,(function(){t.safeSetState({status:Ie},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))}))}))):this.safeSetState({status:Ie},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:Re},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Te},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:Te},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_e)return null;var t=this.props;return(0,t.children)(e,ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},fe(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(d.Component);function Oe(){}function Ae(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Ee(e,t){return(0,d.useMemo)((function(){return null==e&&null==t?null:function(n){Ae(e,n),Ae(t,n)}}),[e,t])}function Ze(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,o=e.mode;return{duration:"object"==typeof t?t[o]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}De.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Oe,onEntering:Oe,onEntered:Oe,onExit:Oe,onExiting:Oe,onExited:Oe};var Le="cubic-bezier(0.4, 0, 0.2, 1)",Fe="cubic-bezier(0.0, 0, 0.2, 1)",je="cubic-bezier(0.4, 0, 0.6, 1)",Ne=function(e){e.scrollTop=e.scrollTop},ze=function(e){return Math.round(e)+"ms"};function Be(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?Le:i,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"==typeof o?o:ze(o),n="string"==typeof l?l:ze(l);return e+" "+t+" "+a+" "+n})).join(",")}function Ve(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function He(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),o=Ve(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=o.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var $e=(0,d.forwardRef)((function(e,t){var n=e.children,r=e.direction,o=void 0===r?"down":r,i=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,h=e.onExit,p=e.onExited,f=ve(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,d.useRef)(null),g=Ee(n.ref,m),v=Ee(g,t),y=(0,d.useCallback)((function(){m.current&&He(o,m.current)}),[o]);return(0,d.useEffect)((function(){if(!i&&"down"!==o&&"right"!==o){var e=function(e,t){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(me({},e,{queue:[].concat(e.queue,[d])}))})),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?me({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?me({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),me({},e,{open:!1})):me({},e,{requestClose:!0}))}));return me({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!Me(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===r?me({},e,{entered:!0}):me({},e)}))}}))},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.id===r?e.entered?me({},e,{open:!1}):me({},e,{requestClose:!0}):me({},e)})),queue:n.filter((function(e){return e.id!==r}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));Me(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!Me(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var r=n.processQueue(me({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===r.queue.length?r:n.handleDismissOldest(r)}))},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(ye(n)),closeSnackbar:n.closeSnackbar.bind(ye(n))}},n}return ge(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,o=n.children,i=n.dense,a=void 0!==i&&i,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce((function(e,t){var n,r=ke(t.anchorOrigin),o=e[r]||[];return me({},e,((n={})[r]=[].concat(o,[t]),n))}),{}),h=Object.keys(c).map((function(t){var n=c[t],r=n[0];return d.createElement(At,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map((function(t){return d.createElement(Tt,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:ct([e.handleExitedSnack,e.props.onExited],t.id),onEntered:ct([e.handleEnteredSnack,e.props.onEntered],t.id)})})))}));return d.createElement(xe.Provider,{value:t},o,r?(0,te.createPortal)(h,r):h)},fe(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Ye.maxSnack}}]),t}(d.Component),Lt=function(){return(0,d.useContext)(xe)};function Ft(){const{enqueueSnackbar:e,closeSnackbar:t}=Lt(),n=jt(e,"error"),r=jt(e,"info"),o=jt(e,"warning"),i=jt(e,"success"),a=(0,d.useCallback)(((e,t)=>{const r=e instanceof Error?e.message:`An unexpected error occurred: ${e}`;return n(r,t)}),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:o,successSnackbar:i,exceptionSnackbar:a}}function jt(e,t){return(0,d.useCallback)(((n,r)=>{const o={...r,variant:t};return e(n,o)}),[e,t])}var Nt=n(64501),zt=n.n(Nt),Bt=n(30092);function Vt(e,t){const n={type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>(0,Bt.Bw)(e,t)}};return[zt()(n,e)]}const Ht=1e3,$t="Pinned Crosshair",Wt={name:$t,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var Gt=n(46310);const Ut={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function qt(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Kt={date:qt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:qt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:qt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Xt(e){return(t,n)=>{let r;if("formatting"===((null==n?void 0:n.context)?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=(null==n?void 0:n.width)?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=(null==n?void 0:n.width)?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Qt={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Xt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Xt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Xt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Xt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Jt(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;ne.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(a)));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(a.length)}}}const en={ordinalNumber:(tn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.match(tn.matchPattern);if(!n)return null;const r=n[0],o=e.match(tn.parsePattern);if(!o)return null;let i=tn.valueCallback?tn.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Jt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Jt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Jt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Jt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var tn;const nn={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Ut[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),(null==n?void 0:n.addSuffix)?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Kt,formatRelative:(e,t,n,r)=>Yt[e],localize:Qt,match:en,options:{weekStartsOn:0,firstWeekContainsDate:1}};var rn=n(33124);const on=["years","months","weeks","days","hours","minutes","seconds"];function an(e,t){const n=(0,rn.j)(),r=(null==t?void 0:t.locale)??n.locale??nn,o=(null==t?void 0:t.format)??on,i=(null==t?void 0:t.zero)??!1,a=(null==t?void 0:t.delimiter)??" ";if(!r.formatDistance)return"";return o.reduce(((t,n)=>{const o=`x${n.replace(/(^.)/,(e=>e.toUpperCase()))}`,a=e[n];return void 0!==a&&(i||e[n])?t.concat(r.formatDistance(o,a)):t}),[]).join(a)}function sn(e){return{value:{pastDuration:e},display:`Last ${an((0,Gt.Ib)(e),{delimiter:", "})}`}}function ln(e){const t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function un(e){e.dispatchAction({type:"restore"})}function cn(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function dn(e,t,n){if(void 0===n)return null;const r=[e,t];if(!n.containPixel("grid",r))return null;return n.convertFromPixel("grid",r)}function hn(e,t,n,r,o,i){const a=i.length>0?i[i.length-1]:o[o.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function pn(e){var t;return(null===(t=e[e.length-1])||void 0===t?void 0:t.name)===$t}function fn(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(const[o]of e){const e=Math.abs(o-t);e0?e[o]:null;if(!i)break;r=fn(i.values,t)}return r}function gn(){for(var e=arguments.length,t=new Array(e),n=0;nvoid 0===e?[]:Array.isArray(e)?e:[e]))}function vn(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);const t=(0,d.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var yn=n(69771),bn=n(10820);function xn(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function wn(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in);return(0,yn.w)(n,xn(n))+1}var Sn=n(80623),Cn=n(58903);function kn(e,t){return(0,Cn.z)(e,{...t,weekStartsOn:1})}var Mn=n(77145);function _n(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in),r=n.getFullYear(),o=(0,Mn.L)(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=kn(o),a=(0,Mn.L)(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=kn(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Tn(e,t){const n=_n(e,t),r=(0,Mn.L)((null==t?void 0:t.in)||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kn(r)}function Pn(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in),r=+kn(n)-+Tn(n);return Math.round(r/Sn.jE)+1}function In(e,t){var n,r,o,i;const a=(0,bn.Q)(e,null==t?void 0:t.in),s=a.getFullYear(),l=(0,rn.j)(),u=(null==t?void 0:t.firstWeekContainsDate)??(null==t||null===(r=t.locale)||void 0===r||null===(n=r.options)||void 0===n?void 0:n.firstWeekContainsDate)??l.firstWeekContainsDate??(null===(i=l.locale)||void 0===i||null===(o=i.options)||void 0===o?void 0:o.firstWeekContainsDate)??1,c=(0,Mn.L)((null==t?void 0:t.in)||e,0);c.setFullYear(s+1,0,u),c.setHours(0,0,0,0);const d=(0,Cn.z)(c,t),h=(0,Mn.L)((null==t?void 0:t.in)||e,0);h.setFullYear(s,0,u),h.setHours(0,0,0,0);const p=(0,Cn.z)(h,t);return+a>=+d?s+1:+a>=+p?s:s-1}function Rn(e,t){var n,r,o,i;const a=(0,rn.j)(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==t||null===(r=t.locale)||void 0===r||null===(n=r.options)||void 0===n?void 0:n.firstWeekContainsDate)??a.firstWeekContainsDate??(null===(i=a.locale)||void 0===i||null===(o=i.options)||void 0===o?void 0:o.firstWeekContainsDate)??1,l=In(e,t),u=(0,Mn.L)((null==t?void 0:t.in)||e,0);u.setFullYear(l,0,s),u.setHours(0,0,0,0);return(0,Cn.z)(u,t)}function Dn(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in),r=+(0,Cn.z)(n,t)-+Rn(n,t);return Math.round(r/Sn.jE)+1}function On(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const An={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return On("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):On(n+1,2)},d:(e,t)=>On(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>On(e.getHours()%12||12,t.length),H:(e,t)=>On(e.getHours(),t.length),m:(e,t)=>On(e.getMinutes(),t.length),s:(e,t)=>On(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return On(Math.trunc(r*Math.pow(10,n-3)),t.length)}},En="midnight",Zn="noon",Ln="morning",Fn="afternoon",jn="evening",Nn="night",zn={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return An.y(e,t)},Y:function(e,t,n,r){const o=In(e,r),i=o>0?o:1-o;if("YY"===t){return On(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):On(i,t.length)},R:function(e,t){return On(_n(e),t.length)},u:function(e,t){return On(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return On(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return On(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return An.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return On(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Dn(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):On(o,t.length)},I:function(e,t,n){const r=Pn(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):On(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):An.d(e,t)},D:function(e,t,n){const r=wn(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):On(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return On(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return On(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return On(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Zn:0===r?En:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?jn:r>=12?Fn:r>=4?Ln:Nn,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return An.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):An.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):On(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):On(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):An.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):An.s(e,t)},S:function(e,t){return An.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Vn(r);case"XXXX":case"XX":return Hn(r);default:return Hn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vn(r);case"xxxx":case"xx":return Hn(r);default:return Hn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bn(r,":");default:return"GMT"+Hn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bn(r,":");default:return"GMT"+Hn(r,":")}},t:function(e,t,n){return On(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return On(+e,t.length)}};function Bn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+On(i,2)}function Vn(e,t){if(e%60==0){return(e>0?"-":"+")+On(Math.abs(e)/60,2)}return Hn(e,t)}function Hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e);return n+On(Math.trunc(r/60),2)+t+On(r%60,2)}const $n=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Wn=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Gn={p:Wn,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $n(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",$n(r,t)).replace("{{time}}",Wn(o,t))}},Un=/^D+$/,qn=/^Y+$/,Kn=["D","DD","YY","YYYY"];function Yn(e){return Un.test(e)}function Xn(e){return qn.test(e)}function Qn(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Kn.includes(e))throw new RangeError(r)}var Jn=n(37980);function er(e){return!(!(0,Jn.J)(e)&&"number"!=typeof e||isNaN(+(0,bn.Q)(e)))}const tr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rr=/^'([^]*?)'?$/,or=/''/g,ir=/[a-zA-Z]/;function ar(e,t,n){var r,o,i,a,s,l,u,c;const d=(0,rn.j)(),h=(null==n?void 0:n.locale)??d.locale??nn,p=(null==n?void 0:n.firstWeekContainsDate)??(null==n||null===(o=n.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)??d.firstWeekContainsDate??(null===(a=d.locale)||void 0===a||null===(i=a.options)||void 0===i?void 0:i.firstWeekContainsDate)??1,f=(null==n?void 0:n.weekStartsOn)??(null==n||null===(l=n.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.weekStartsOn)??d.weekStartsOn??(null===(c=d.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)??0,m=(0,bn.Q)(e,null==n?void 0:n.in);if(!er(m))throw new RangeError("Invalid time value");let g=t.match(nr).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Gn[t])(e,h.formatLong)}return e})).join("").match(tr).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:sr(e)};if(zn[t])return{isToken:!0,value:e};if(t.match(ir))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));h.localize.preprocessor&&(g=h.localize.preprocessor(m,g));const v={firstWeekContainsDate:p,weekStartsOn:f,locale:h};return g.map((r=>{if(!r.isToken)return r.value;const o=r.value;(!(null==n?void 0:n.useAdditionalWeekYearTokens)&&Xn(o)||!(null==n?void 0:n.useAdditionalDayOfYearTokens)&&Yn(o))&&Qn(o,t,String(e));return(0,zn[o[0]])(m,o,h.localize,v)})).join("")}function sr(e){const t=e.match(rr);return t?t[1].replace(or,"'"):e}function lr(){return Object.assign({},(0,rn.j)())}function ur(e,t,n){const r=lr(),o=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value;return}(o,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(o,t)}function cr(e,t){const n=function(e){hr[e]||(hr[e]=fr?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));return hr[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e=0?i:1e3+i,r-o}function wr(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const Sr={};const Cr={X:function(e,t,n){const r=kr(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Tr(r);case"XXXX":case"XX":return _r(r);default:return _r(r,":")}},x:function(e,t,n){const r=kr(n.timeZone,e);switch(t){case"x":return Tr(r);case"xxxx":case"xx":return _r(r);default:return _r(r,":")}},O:function(e,t,n){const r=kr(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);return n+String(o)+t+Mr(i,2)}(r,":");default:return"GMT"+_r(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return ur("short",e,n);default:return ur("long",e,n)}}};function kr(e,t){const n=e?br(e,t,!0)/6e4:(null==t?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Mr(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e);return n+Mr(Math.floor(r/60),2)+t+Mr(Math.floor(r%60),2)}function Tr(e,t){if(e%60==0){return(e>0?"-":"+")+Mr(Math.abs(e)/60,2)}return _r(e,t)}function Pr(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const Ir=36e5,Rr=6e4,Dr=2,Or={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Ar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?Dr:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=Or.dateTimePattern.exec(e);r?(t.date=r[1],n=r[3]):(r=Or.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e));if(n){const e=Or.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:o,restDateString:i}=function(e,t){if(e){const n=Or.YYY[t],r=Or.YYYYY[t];let o=Or.YYYY.exec(e)||r.exec(e);if(o){const t=o[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(o=Or.YY.exec(e)||n.exec(e),o){const t=o[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),a=function(e,t){if(null===t)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let i=Or.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,jr(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=Or.DDD.exec(e),i){n=new Date(0);const e=parseInt(i[1],10);return function(e,t){if(t<1)return!1;const n=Fr(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(i=Or.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const e=parseInt(i[2],10);return jr(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(i=Or.Www.exec(e),i)return o=parseInt(i[1],10)-1,Nr(o)?Er(t,o):new Date(NaN);if(i=Or.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const e=parseInt(i[2],10)-1;return Nr(o,e)?Er(t,o,e):new Date(NaN)}return null}(i,o);if(null===a||isNaN(a.getTime()))return new Date(NaN);if(a){const e=a.getTime();let n,o=0;if(r.time&&(o=function(e){let t,n,r=Or.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),zr(t)?t%24*Ir:NaN;if(r=Or.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),zr(t,n)?t%24*Ir+n*Rr:NaN;if(r=Or.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return zr(t,n,e)?t%24*Ir+n*Rr+1e3*e:NaN}return null}(r.time),null===o||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=br(r.timeZone||t.timeZone,new Date(e+o)),isNaN(n))return new Date(NaN)}else n=Pr(new Date(e+o)),n=Pr(new Date(e+o+n));return new Date(e+o+n)}return new Date(NaN)}function Er(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}const Zr=[31,28,31,30,31,30,31,31,30,31,30,31],Lr=[31,29,31,30,31,30,31,31,30,31,30,31];function Fr(e){return e%400==0||e%4==0&&e%100!=0}function jr(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=Fr(e);if(r&&n>Lr[t])return!1;if(!r&&n>Zr[t])return!1}return!0}function Nr(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function zr(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}const Br=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Vr(e,t,n,r){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(t=String(t)).match(Br);if(r){const o=Ar(n.originalDate||e,n);t=r.reduce((function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),i="'"===e[r-1],a=e.replace(t,"'"+Cr[t[0]](o,t,n)+"'");return i?a.substring(0,r-1)+a.substring(r+1):a}),t)}return ar(e,t,n)}(function(e,t,n){const r=br(t,e=Ar(e,n),!0),o=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}function Hr(e,t){if(t){const n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function $r(e,t,n){const r=null==n?void 0:n.toLowerCase();return n&&"local"!==r&&"browser"!==r?Vr(e,"utc"===r?"UTC":n,t):ar(e,t)}function Wr(e){const t=864e5,n=31536e6;return e>5*n?"{yyyy}":e>2*n?"{MMM} {yyyy}":e>5*t&&e<1577664e4?"{MM}/{dd}":e>2*t&&e<=5*t?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}const Gr=e=>{if(!e)return{formattedDate:"",formattedTime:""};const t=new Date(e);return{formattedDate:ar(t,"MMM dd, yyyy - "),formattedTime:ar(t,"HH:mm:ss")}},Ur="#222";function qr(e,t){var n,r,o,i,a,s,l;const u=(null===(n=e.palette.text)||void 0===n?void 0:n.primary)??Ur,c={title:{show:!1},textStyle:{color:u,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:u,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:u,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:u,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:u},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:null==e||null===(o=e.palette)||void 0===o||null===(r=o.action)||void 0===r?void 0:r.active,pageIconInactiveColor:null==e||null===(a=e.palette)||void 0===a||null===(i=a.action)||void 0===i?void 0:i.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:u}},tooltip:{backgroundColor:null===(s=e.palette.designSystem)||void 0===s?void 0:s.grey[800],borderColor:null===(l=e.palette.designSystem)||void 0===l?void 0:l.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:u}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}};return zt()({echartsTheme:c,noDataOption:{title:{show:!0,textStyle:{color:u,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}const Kr=(0,d.createContext)(void 0);function Yr(e){const{children:t,timeZone:n}=e;return(0,o.jsx)(Kr.Provider,{value:n,children:t})}function Xr(){const e=(0,d.useContext)(Kr);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>$r(t,n,e),dateFormatOptionsWithUserTimeZone:t=>Hr(t,e)}}function Qr(e){let{label:t,color:n,onColorChange:r,onClear:i}=e;const[a,s]=(0,d.useState)(null),l=Boolean(a),{thresholds:{defaultColor:u,palette:c}}=ee();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Jr,{size:"small","aria-label":`change ${t} color`,isSelected:l,iconColor:n,onClick:e=>{s(e.currentTarget)},children:(0,o.jsx)(W.default,{})}),(0,o.jsx)(K.ZP,{"data-testid":"options color picker",open:l,anchorEl:a,onClose:()=>{s(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,o.jsx)(U,{color:n,palette:[u,...c],onChange:r,onClear:i})})]})}const Jr=(0,Y.ZP)(u.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})((e=>{let{iconColor:t,isSelected:n}=e;return{backgroundColor:n&&t?`${t}3F`:"undefined",color:t}}));var eo=n(35224),to=n(61045),no=n(83773),ro=n(75586);function oo(e){return()=>e}function io(e){e()}function ao(e,t){return n=>e(t(n))}function so(e,t){return()=>e(t)}function lo(e,t){return n=>e(t,n)}function uo(e){return void 0!==e}function co(){}function ho(e,t){return t(e),e}function po(e,t){return t(e)}function fo(...e){return e}function mo(e,t){return e(1,t)}function go(e,t){e(0,t)}function vo(e){e(2)}function yo(e){return e(4)}function bo(e,t){return mo(e,lo(t,0))}function xo(e,t){const n=e(1,(e=>{n(),t(e)}));return n}function wo(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout((()=>{r(t)}),e)}}function So(e,t){return e===t}function Co(e=So){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ko(e){return t=>n=>{e(n)&&t(n)}}function Mo(e){return t=>ao(t,e)}function _o(e){return t=>()=>{t(e)}}function To(e,...t){const n=function(...e){return t=>e.reduceRight(po,t)}(...t);return(t,r)=>{switch(t){case 2:return void vo(e);case 1:return mo(e,n(r))}}}function Po(e,t){return n=>r=>{n(t=e(t,r))}}function Io(e){return t=>n=>{e>0?e--:t(n)}}function Ro(e){let t,n=null;return r=>o=>{n=o,!t&&(t=setTimeout((()=>{t=void 0,r(n)}),e))}}function Do(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);mo(e,(e=>{const s=n;n|=a,t[i]=e,s!==o&&n===o&&r&&(r(),r=null)}))})),e=>i=>{const a=()=>{e([i].concat(t))};n===o?a():r=a}}function Oo(e){let t=e;const n=Eo();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function Ao(e,t){return ho(Oo(t),(t=>bo(e,t)))}function Eo(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach((e=>{e(n)}));case 2:return void e.splice(0,e.length);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function Zo(e){return ho(Eo(),(t=>bo(e,t)))}function Lo(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Fo(),singleton:n}}const Fo=()=>Symbol();function jo(...e){const t=Eo(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);mo(e,(e=>{n[i]=e,r|=a,r===o&&go(t,n)}))})),function(e,i){switch(e){case 2:return void vo(t);case 1:return r===o&&i(n),mo(t,i)}}}function No(e,t=So){return To(e,Co(t))}function zo(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(io)}}(...e.map((e=>mo(e,n))))}}}var Bo=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Bo||{});const Vo={0:"debug",3:"error",1:"log",2:"warn"},Ho=Lo((()=>{const e=Oo(3);return{log:Oo(((t,n,r=1)=>{var o;r>=(null!=(o=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?o:yo(e))&&console[Vo[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)})),logLevel:e}}),[],{singleton:!0});function $o(e,t,n){return Wo(e,t,n).callbackRef}function Wo(e,t,n){const r=d.useRef(null);let o=e=>{};if(typeof ResizeObserver<"u"){const i=d.useMemo((()=>new ResizeObserver((t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}))),[e]);o=e=>{e&&t?(i.observe(e),r.current=e):(r.current&&i.unobserve(r.current),r.current=null)}}return{callbackRef:o,ref:r}}function Go(e,t,n,r,o,i,a,s,l){const u=d.useCallback((n=>{const l=function(e,t,n,r){const o=e.length;if(0===o)return null;const i=[];for(let a=0;a{if(null==n||!n.offsetParent)return;const o=n.getBoundingClientRect(),i=o.width;let a,s;if(t){const e=t.getBoundingClientRect(),n=o.top-e.top;s=e.height-Math.max(0,n),a=n+t.scrollTop}else s=window.innerHeight-Math.max(0,o.top),a=o.top+window.pageYOffset;r.current={offsetTop:a,visibleHeight:s,visibleWidth:i},e(r.current)}),[e,t]),{callbackRef:i,ref:a}=Wo(o,!0,n),s=d.useCallback((()=>{o(a.current)}),[o,a]);return d.useEffect((()=>{if(t){t.addEventListener("scroll",s);const e=new ResizeObserver((()=>{requestAnimationFrame(s)}));return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}}),[s,t]),i}const Ko=Lo((()=>{const e=Eo(),t=Eo(),n=Oo(0),r=Eo(),o=Oo(0),i=Eo(),a=Eo(),s=Oo(0),l=Oo(0),u=Oo(0),c=Oo(0),d=Eo(),h=Eo(),p=Oo(!1),f=Oo(!1),m=Oo(!1);return bo(To(e,Mo((({scrollTop:e})=>e))),t),bo(To(e,Mo((({scrollHeight:e})=>e))),a),bo(t,o),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}}),[],{singleton:!0}),Yo={lvl:0};function Xo(e,t){const n=e.length;if(0===n)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a({index:e,value:t})))}(ai(e,ei(e,t)[0],n))}function oi(e,t){if(Qo(e))return Yo;const{k:n,l:r,r:o}=e;if(t===n){if(Qo(r))return o;if(Qo(o))return r;{const[t,n]=di(r);return si(li(e,{k:t,l:ui(r),v:n}))}}return si(li(e,tt&&(s=s.concat(ai(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(ai(i,t,n))),s}function si(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(ci(t))return fi(li(e,{lvl:n-1}));if(!Qo(t)&&!Qo(t.r))return li(t.r,{l:li(t,{r:t.r.l}),lvl:n,r:li(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(ci(e))return mi(li(e,{lvl:n-1}));if(Qo(r)||Qo(r.l))throw new Error("Unexpected empty nodes");{const t=r.l,o=ci(t)?r.lvl-1:r.lvl;return li(t,{l:li(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:mi(li(r,{l:t.r,lvl:o}))})}}function li(e,t){return hi(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function ui(e){return Qo(e.r)?e.l:si(li(e,{r:ui(e.r)}))}function ci(e){return Qo(e)||e.lvl>e.r.lvl}function di(e){return Qo(e.r)?[e.k,e.v]:di(e.r)}function hi(e,t,n,r=Yo,o=Yo){return{k:e,l:r,lvl:n,r:o,v:t}}function pi(e){return mi(fi(e))}function fi(e){const{l:t}=e;return Qo(t)||t.lvl!==e.lvl?e:li(t,{r:li(e,{l:t.r})})}function mi(e){const{lvl:t,r:n}=e;return Qo(n)||Qo(n.r)||n.lvl!==t||n.r.lvl!==t?e:li(n,{l:li(e,{r:n.l}),lvl:t+1})}function gi(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function vi(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const yi=Lo((()=>({recalcInProgress:Oo(!1)})),[],{singleton:!0});function bi(e,t,n){return e[xi(e,t,n)]}function xi(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function wi(e,t){return Math.round(e.getBoundingClientRect()[t])}function Si(e){return!Qo(e.groupOffsetTree)}function Ci({index:e},t){return t===e?0:t0?s+n:s}function _i(e,t){if(!Si(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ti(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let r=_i("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function Pi(e,t,n,r=0){return r>0&&(t=Math.max(t,bi(e,r,Ci).offset)),Xo(function(e,t,n,r){const o=xi(e,t,r),i=xi(e,n,r,o);return e.slice(o,i+1)}(e,t,n,ki),Oi)}function Ii(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Bo.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&Qo(i)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce(((t,n)=>ti(ti(t,n,e),n+1,r)),a)}else[a,s]=function(e,t){let n=Qo(e)?0:1/0;for(const r of t){const{endIndex:t,size:o,startIndex:i}=r;if(n=Math.min(n,i),Qo(e)){e=ti(e,0,o);continue}const a=ri(e,i-1,t+1);if(a.some(Ai(r)))continue;let s=!1,l=!1;for(const{end:n,start:r,value:i}of a)s?(t>=r||o===i)&&(e=oi(e,r)):(l=i!==o,s=!0),n>t&&t>=r&&i!==o&&(e=ti(e,t+1,i));l&&(e=ti(e,i,o))}return[e,n]}(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=Di(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce(((e,t)=>ti(e,t,Mi(t,d,o))),ni()),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function Ri(e,t){let n=0,r=0;for(;ne.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Ei={offsetHeight:"height",offsetWidth:"width"},Zi=Lo((([{log:e},{recalcInProgress:t}])=>{const n=Eo(),r=Eo(),o=Ao(r,0),i=Eo(),a=Eo(),s=Oo(0),l=Oo([]),u=Oo(void 0),c=Oo(void 0),d=Oo(((e,t)=>wi(e,Ei[t]))),h=Oo(void 0),p=Oo(0),f={groupIndices:[],groupOffsetTree:ni(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ni()},m=Ao(To(n,Do(l,e,p),Po(Ii,f),Co()),f),g=Ao(To(l,Co(),Po(((e,t)=>({current:t,prev:e.current})),{current:[],prev:[]}),Mo((({prev:e})=>e))),[]);bo(To(l,ko((e=>e.length>0)),Do(m,p),Mo((([e,t,n])=>{const r=e.reduce(((e,r,o)=>ti(e,r,Mi(r,t.offsetTree,n)||o)),ni());return{...t,groupIndices:e,groupOffsetTree:r}}))),m),bo(To(r,Do(m),ko((([e,{lastIndex:t}])=>e[{endIndex:t,size:n,startIndex:e}]))),n),bo(u,c);const v=Ao(To(u,Mo((e=>void 0===e))),!0);bo(To(c,ko((e=>void 0!==e&&Qo(yo(m).sizeTree))),Mo((e=>[{endIndex:0,size:e,startIndex:0}]))),n);const y=Zo(To(n,Do(m),Po((({sizes:e},[t,n])=>({changed:n!==e,sizes:n})),{changed:!1,sizes:f}),Mo((e=>e.changed))));mo(To(s,Po(((e,t)=>({diff:e.prev-t,prev:t})),{diff:0,prev:0}),Mo((e=>e.diff))),(e=>{const{groupIndices:n}=yo(m);if(e>0)go(t,!0),go(i,e+Ri(e,n));else if(e<0){const t=yo(g);t.length>0&&(e-=Ri(-e,t)),go(a,e)}})),mo(To(s,Do(e)),(([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},Bo.ERROR)}));const b=Zo(i);bo(To(i,Do(m),Mo((([e,t])=>{const n=t.groupIndices.length>0,r=[],o=t.lastSize;if(n){const n=Jo(t.sizeTree,0);let i=0,a=0;for(;i{let o=t.ranges;return 0!==t.prevSize&&(o=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:o}}),{prevIndex:e,prevSize:0,ranges:r}).ranges}return ii(t.sizeTree).reduce(((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]})),{prevIndex:0,prevSize:o,ranges:[]}).ranges}))),n);const x=Zo(To(a,Do(m,p),Mo((([e,{offsetTree:t},n])=>Mi(-e,t,n)))));return bo(To(a,Do(m,p),Mo((([e,t,n])=>{if(t.groupIndices.length>0){if(Qo(t.sizeTree))return t;let r=ni();const o=yo(g);let i=0,a=0,s=0;for(;i<-e;){s=o[a];const e=o[a+1]-s-1;a++,i+=e+1}if(r=ii(t.sizeTree).reduce(((t,{k:n,v:r})=>ti(t,Math.max(0,n+e),r)),r),i!==-e){r=ti(r,0,Jo(t.sizeTree,s));r=ti(r,1,ei(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...Di(t.offsetTree,0,r,n)}}{const r=ii(t.sizeTree).reduce(((t,{k:n,v:r})=>ti(t,Math.max(0,n+e),r)),ni());return{...t,sizeTree:r,...Di(t.offsetTree,0,r,n)}}}))),m),{beforeUnshiftWith:b,data:h,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,gap:p,groupIndices:l,itemSize:d,listRefresh:y,shiftWith:a,shiftWithOffset:x,sizeRanges:n,sizes:m,statefulTotalCount:o,totalCount:r,trackItemSizes:v,unshiftWith:i}}),fo(Ho,yi),{singleton:!0});function Li(e){return e.reduce(((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e)),{groupIndices:[],totalCount:0})}const Fi=Lo((([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Eo(),a=Eo(),s=Zo(To(i,Mo(Li)));return bo(To(s,Mo((e=>e.totalCount))),n),bo(To(s,Mo((e=>e.groupIndices))),e),bo(To(jo(o,t,r),ko((([e,t])=>Si(t))),Mo((([e,t,n])=>ei(t.groupOffsetTree,Math.max(e-n,0),"v")[0])),Co(),Mo((e=>[e]))),a),{groupCounts:i,topItemsIndexes:a}}),fo(Zi,Ko)),ji=Lo((([{log:e}])=>{const t=Oo(!1),n=Zo(To(t,ko((e=>e)),Co()));return mo(t,(t=>{t&&yo(e)("props updated",{},Bo.DEBUG)})),{didMount:n,propsReady:t}}),fo(Ho),{singleton:!0}),Ni=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function zi(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Ni)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Bi=Lo((([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{const p=Eo(),f=Eo(),m=Oo(0);let g=null,v=null,y=null;function b(){g&&(g(),g=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),go(l,!1)}return bo(To(p,Do(n,d,r,m,s,a,h),Do(e,i,o),Mo((([[e,n,r,o,i,a,s,u],d,h,m])=>{const x=zi(e),{align:w,behavior:S,offset:C}=x,k=o-1,M=Ti(x,n,k);let _=Mi(M,n.offsetTree,d)+a;"end"===w?(_+=h+ei(n.sizeTree,M)[1]-r+m,M===k&&(_+=s)):"center"===w?_+=(h+ei(n.sizeTree,M)[1]-r+m)/2:_-=i,C&&(_+=C);const T=t=>{b(),t?(u("retrying to scroll to",{location:e},Bo.DEBUG),go(p,e)):(go(f,!0),u("list did not change, scroll successful",{},Bo.DEBUG))};if(b(),"smooth"===S){let e=!1;y=mo(t,(t=>{e=e||t})),g=xo(c,(()=>{T(e)}))}else g=xo(To(t,function(e){return t=>{const n=setTimeout((()=>{t(!1)}),e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),T);return v=setTimeout((()=>{b()}),1200),go(l,!0),u("scrolling from index to",{behavior:S,index:M,top:_},Bo.DEBUG),{behavior:S,top:_}}))),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:m}}),fo(Zi,Ko,Ho),{singleton:!0});function Vi(e,t){0==e?t():requestAnimationFrame((()=>{Vi(e-1,t)}))}function Hi(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const $i=Lo((([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=Oo(!0),l=Oo(0),u=Oo(!0);return bo(To(a,Do(l),ko((([e,t])=>!!t)),_o(!1)),s),bo(To(a,Do(l),ko((([e,t])=>!!t)),_o(!1)),u),mo(To(jo(t,a),Do(s,n,e,u),ko((([[,e],t,{sizeTree:n},r,o])=>e&&(!Qo(n)||uo(r))&&!t&&!o)),Do(l)),(([,e])=>{xo(o,(()=>{go(u,!0)})),Vi(4,(()=>{xo(r,(()=>{go(s,!0)})),go(i,e)}))})),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}}),fo(Zi,Ko,Bi,ji),{singleton:!0});function Wi(e,t){return Math.abs(e-t)<1.01}const Gi="up",Ui="down",qi={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Ki=Lo((([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=Oo(!1),s=Oo(!0),l=Eo(),u=Eo(),c=Oo(4),d=Oo(0),h=Ao(To(zo(To(No(o),Io(1),_o(!0)),To(No(o),Io(1),_o(!1),wo(100))),Co()),!1),p=Ao(To(zo(To(n,_o(!0)),To(n,_o(!1),wo(200))),Co()),!1);bo(To(jo(No(o),No(d)),Mo((([e,t])=>e<=t)),Co()),s),bo(To(s,Ro(50)),u);const f=Zo(To(jo(r,No(i),No(t),No(e),No(c)),Po(((e,[{scrollHeight:t,scrollTop:n},r,o,i,a])=>{const s={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:s}}let l;return l=s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":re&&e.atBottom===t.atBottom)))),m=Ao(To(r,Po(((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(Wi(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{const o=t-(n+r)<1;return e.scrollTop!==n&&o?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}}),{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),ko((e=>e.changed)),Mo((e=>e.jump))),0);bo(To(f,Mo((e=>e.atBottom))),a),bo(To(a,Ro(50)),l);const g=Oo(Ui);bo(To(r,Mo((({scrollTop:e})=>e)),Co(),Po(((e,t)=>yo(p)?{direction:e.direction,prevScrollTop:t}:{direction:te.direction))),g),bo(To(r,Ro(50),_o("none")),g);const v=Oo(0);return bo(To(h,ko((e=>!e)),_o(0)),v),bo(To(o,Ro(100),Do(h),ko((([e,t])=>!!t)),Po((([e,t],[n])=>[t,n]),[0,0]),Mo((([e,t])=>t-e))),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:m,scrollDirection:g,scrollVelocity:v}}),fo(Ko)),Yi="top",Xi="bottom",Qi="none";function Ji(e,t,n){return"number"==typeof e?n===Gi&&t===Yi||n===Ui&&t===Xi?e:0:n===Gi?t===Yi?e.main:e.reverse:t===Xi?e.main:e.reverse}function ea(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}const ta=Lo((([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Eo(),a=Oo(0),s=Oo(0),l=Oo(0);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:Ao(To(jo(No(r),No(o),No(n),No(i,vi),No(l),No(a),No(t),No(e),No(s)),Mo((([e,t,n,[r,o],i,a,s,l,u])=>{const c=e-l,d=a+s,h=Math.max(n-c,0);let p=Qi;const f=ea(u,Yi),m=ea(u,Xi);return r-=l,o+=n+s,(r+=n+s)>e+d-f&&(p=Gi),(o-=l)null!=e)),Co(vi)),[0,0])}}),fo(Ko),{singleton:!0});const na={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ra(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let u=0,c=0;if(e.length>0){u=e[0].offset;const t=e[e.length-1];c=t.offset+t.size}const d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:i,items:ia(e,o,i),offsetBottom:p,offsetTop:u,top:h,topItems:ia(t,o,i),topListHeight:t.reduce(((e,t)=>t.size+e),0),totalCount:n}}function oa(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-a>=e)break;a++}const s=e+a,l=Hi(t,s);return ra(Array.from({length:s}).map(((e,t)=>({data:i[t+l],index:t+l,offset:0,size:0}))),[],s,o,n,r)}function ia(e,t,n){if(0===e.length)return[];if(!Si(t))return e.map((e=>({...e,index:e.index+n,originalIndex:e.index})));const r=e[0].index,o=e[e.length-1].index,i=[],a=ri(t.groupOffsetTree,r,o);let s,l=0;for(const r of e){let e;(!s||s.end{const m=Oo([]),g=Oo(0),v=Eo();bo(i.topItemsIndexes,m);const y=Ao(To(jo(p,f,No(l,vi),No(o),No(r),No(u),c,No(m),No(t),No(n),e),ko((([e,t,,n,,,,,,,r])=>{const o=r&&r.length!==n;return e&&!t&&!o})),Mo((([,,[e,t],n,r,o,i,a,s,l,u])=>{const c=r,{offsetTree:d,sizeTree:h}=c,p=yo(g);if(0===n)return{...na,totalCount:n};if(0===e&&0===t)return 0===p?{...na,totalCount:n}:oa(p,o,r,s,l,u||[]);if(Qo(h))return p>0?null:ra(function(e,t,n){if(Si(t)){const r=_i(e,t);return[{index:ei(t.groupOffsetTree,r)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:r,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(Hi(o,n),c,u),[],n,l,c,s);const f=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of ri(h,e,t)){const o=r.value,i=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=i;e<=a;e++)f.push({data:null==u?void 0:u[e],index:e,offset:n,size:o}),n+=o}}if(!i)return ra([],f,n,l,c,s);const m=a.length>0?a[a.length-1]+1:0,v=Pi(d,e,t,m);if(0===v.length)return null;const y=n-1;return ra(ho([],(n=>{for(const r of v){const o=r.value;let i=o.offset,a=r.start;const s=o.size;if(o.offset=t);e++)n.push({data:null==u?void 0:u[e],index:e,offset:i,size:s}),i+=s+l}})),f,n,l,c,s)})),ko((e=>null!==e)),Co()),na);bo(To(e,ko(uo),Mo((e=>null==e?void 0:e.length))),o),bo(To(y,Mo((e=>e.topListHeight))),d),bo(d,s),bo(To(y,Mo((e=>[e.top,e.bottom]))),a),bo(To(y,Mo((e=>e.items))),v);const b=Zo(To(y,ko((({items:e})=>e.length>0)),Do(o,e),ko((([{items:e},t])=>e[e.length-1].originalIndex===t-1)),Mo((([,e,t])=>[e-1,t])),Co(vi),Mo((([e])=>e)))),x=Zo(To(y,Ro(200),ko((({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length)),Mo((({items:e})=>e[0].index)),Co())),w=Zo(To(y,ko((({items:e})=>e.length>0)),Mo((({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&tt;)n--;return{endIndex:e[n].index,startIndex:e[t].index}})),Co(gi)));return{endReached:b,initialItemCount:g,itemsRendered:v,listState:y,rangeChanged:w,startReached:x,topItemsIndexes:m,...h}}),fo(Zi,Fi,ta,$i,Bi,Ki,ji,yi),{singleton:!0}),sa=Lo((([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Eo(),a=Ao(To(jo(n,e,r,t,o),Mo((([e,t,n,r,o])=>e+t+n+r+o.offsetBottom+o.bottom))),0);return bo(No(a),i),{totalListHeight:a,totalListHeightChanged:i}}),fo(Ko,aa),{singleton:!0}),la=Lo((([{viewportHeight:e},{totalListHeight:t}])=>{const n=Oo(!1);return{alignToBottom:n,paddingTopAddition:Ao(To(jo(n,e,t),ko((([e])=>e)),Mo((([,e,t])=>Math.max(0,e-t))),Ro(0),Co()),0)}}),fo(Ko,sa),{singleton:!0});function ua(e){return!!e&&("smooth"===e?"smooth":"auto")}const ca=Lo((([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:u}])=>{const c=Oo(!1),d=Eo();let h=null;function p(e){go(o,{align:"end",behavior:e,index:"LAST"})}function f(e){const t=xo(n,(t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!h&&(yo(l)("scrolling to bottom due to increased size",{},Bo.DEBUG),p("auto"))}));setTimeout(t,100)}return mo(To(jo(To(No(t),Io(1)),a),Do(No(c),r,i,u),Mo((([[e,t],n,r,o,i])=>{let a=t&&o,s="auto";return a&&(s=((e,t)=>"function"==typeof e?ua(e(t)):t&&ua(e))(n,r||i),a=a&&!!s),{followOutputBehavior:s,shouldFollow:a,totalCount:e}})),ko((({shouldFollow:e})=>e))),(({followOutputBehavior:t,totalCount:n})=>{h&&(h(),h=null),h=xo(e,(()=>{yo(l)("following output to ",{totalCount:n},Bo.DEBUG),p(t),h=null}))})),mo(To(jo(No(c),t,s),ko((([e,,t])=>e&&t)),Po((({value:e},[,t])=>({refreshed:e===t,value:t})),{refreshed:!1,value:0}),ko((({refreshed:e})=>e)),Do(c,t)),(([,e])=>{yo(i)&&f(!1!==e)})),mo(d,(()=>{f(!1!==yo(c))})),mo(jo(No(c),n),(([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&p("auto")})),{autoscrollToBottom:d,followOutput:c}}),fo(Zi,Ki,Bi,$i,ji,Ho,Ko)),da=Lo((([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(bo(To(s,Do(i),ko((([,e])=>0!==e)),Do(o,r,t,n,e),Mo((([[,e],t,n,r,o,i=[]])=>oa(e,t,n,r,o,i)))),a),{})),fo(Zi,$i,aa,ji),{singleton:!0}),ha=Lo((([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Oo(0);return mo(To(e,Do(r),ko((([,e])=>0!==e)),Mo((([,e])=>({top:e})))),(e=>{xo(To(n,Io(1),ko((e=>e.items.length>1))),(()=>{requestAnimationFrame((()=>{go(t,e)}))}))})),{initialScrollTop:r}}),fo(ji,Ko,aa),{singleton:!0}),pa=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>ti?{...o,align:null!=n?n:"end",behavior:r}:null,fa=Lo((([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{const c=Eo();return bo(To(c,Do(t,l,n,i,o,r,s),Do(e),Mo((([[e,t,n,r,o,i,s,l],u])=>{const{align:c,behavior:d,calculateViewLocation:h=pa,done:p,...f}=e,m=Ti(e,t,r-1),g=Mi(m,t.offsetTree,u)+o+i,v=h({itemBottom:g+ei(t.sizeTree,m)[1],itemTop:g,locationParams:{align:c,behavior:d,...f},viewportBottom:l+n-s,viewportTop:l+i});return v?p&&xo(To(a,ko((e=>!e)),Io(yo(a)?1:2)),p):p&&p(),v})),ko((e=>null!==e))),u),{scrollIntoView:c}}),fo(Zi,Ko,Bi,aa,Ho),{singleton:!0}),ma=Lo((([{scrollVelocity:e}])=>{const t=Oo(!1),n=Eo(),r=Oo(!1);return bo(To(e,Do(r,t,n),ko((([e,t])=>!!t)),Mo((([e,t,n,r])=>{const{enter:o,exit:i}=t;if(n){if(i(e,r))return!1}else if(o(e,r))return!0;return n})),Co()),t),mo(To(jo(t,e,n),Do(r)),(([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)})),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}}),fo(Ki),{singleton:!0}),ga=Lo((([{scrollContainerState:e,scrollTo:t}])=>{const n=Eo(),r=Eo(),o=Eo(),i=Oo(!1),a=Oo(void 0);return bo(To(jo(n,r),Mo((([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n})))),e),bo(To(t,Do(r),Mo((([e,{offsetTop:t}])=>({...e,top:e.top+t})))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}}),fo(Ko)),va=Lo((([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const u=Eo(),c=Oo(void 0),d=Oo(null),h=Oo(null);return bo(s,d),bo(l,h),mo(To(u,Do(t,r,a,d,h,n)),(([e,t,n,r,o,i,a])=>{const s=function(e){return ii(e).map((({k:e,v:t},n,r)=>{const o=r[n+1];return{endIndex:o?o.k-1:1/0,size:t,startIndex:e}}))}(t.sizeTree);r&&null!==o&&null!==i&&(n=o.scrollTop-i.offsetTop),e({ranges:s,scrollTop:n-=a})})),bo(To(c,ko(uo),Mo(ya)),o),bo(To(i,Do(c),ko((([,e])=>void 0!==e)),Co(),Mo((([,e])=>e.ranges))),e),{getState:u,restoreStateFrom:c}}),fo(Zi,Ko,$i,ji,ga));function ya(e){return{align:"start",index:0,offset:e.scrollTop}}const ba=Lo((([{topItemsIndexes:e}])=>{const t=Oo(0);return bo(To(t,ko((e=>e>=0)),Mo((e=>Array.from({length:e}).map(((e,t)=>t))))),e),{topItemCount:t}}),fo(aa));function xa(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const wa=xa((()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent))),Sa=Lo((([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{const m=Zo(To(l,Do(a),Po((([,e,t,n],[{bottom:r,items:o,offsetBottom:i,totalCount:a},s])=>{const l=r+i;let u=0;return t===a&&e.length>0&&o.length>0&&(0===o[0].originalIndex&&0===e[0].originalIndex||(u=l-n,0!==u&&(u+=s))),[u,o,a,l]}),[0,[],0,0]),ko((([e])=>0!==e)),Do(r,s,n,o,p,f),ko((([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===Gi)),Mo((([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Bo.DEBUG),e)))));function g(n){n>0?(go(t,{behavior:"auto",top:-n}),go(e,0)):(go(e,0),go(t,{behavior:"auto",top:-n}))}return mo(To(m,Do(e,i)),(([t,n,r])=>{r&&wa()?go(e,n-t):g(-t)})),mo(To(jo(Ao(i,!1),e,f),ko((([e,t,n])=>!e&&!n&&0!==t)),Mo((([e,t])=>t)),Ro(1)),g),bo(To(d,Mo((e=>({top:-e})))),t),mo(To(u,Do(h,c),Mo((([e,{groupIndices:t,lastSize:n,sizeTree:r},o])=>{function i(e){return e*(n+o)}if(0===t.length)return i(e);{let n=0;const o=Jo(r,0);let a=0,s=0;for(;ae&&(n-=o,r=e-a+1),a+=r,n+=i(r),s++}return n}}))),(n=>{go(e,n),requestAnimationFrame((()=>{go(t,{top:n}),requestAnimationFrame((()=>{go(e,0),go(f,!1)}))}))})),{deviation:e}}),fo(Ko,Ki,aa,Zi,Ho,yi)),Ca=Lo((([e,t,n,r,o,i,a,s,l,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...u})),fo(ta,da,ji,ma,sa,ha,la,ga,fa,Ho)),ka=Lo((([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:o,groupIndices:i,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:u,totalCount:c,trackItemSizes:d},{initialItemFinalLocationReached:h,initialTopMostItemIndex:p,scrolledToInitialItem:f},m,g,v,{listState:y,topItemsIndexes:b,...x},{scrollToIndex:w},S,{topItemCount:C},{groupCounts:k},M])=>(bo(x.rangeChanged,M.scrollSeekRangeChanged),bo(To(M.windowViewportRect,Mo((e=>e.visibleHeight))),m.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:o,groupCounts:k,initialItemFinalLocationReached:h,initialTopMostItemIndex:p,scrolledToInitialItem:f,sizeRanges:s,topItemCount:C,topItemsIndexes:b,totalCount:c,...v,groupIndices:i,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:u,trackItemSizes:d,...x,...M,...m,sizes:l,...g})),fo(Zi,$i,Ko,va,ca,aa,Bi,Sa,ba,Fi,Ca));function Ma(e,t){const n={},r={};let o=0;const i=e.length;for(;o(n[r]=function(e){let t,n;const r=()=>null==t?void 0:t();return function(o,i){switch(o){case 1:return i?n===i?void 0:(r(),n=i,t=mo(e,i),t):(r(),co);case 2:return r(),void(n=null)}}}(e[t.events[r]]),n)),{})}const h=d.forwardRef(((h,p)=>{const{children:f,...m}=h,[g]=d.useState((()=>ho(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:o,singleton:i})=>{if(i&&t.has(o))return t.get(o);const a=e(r.map((e=>n(e))));return i&&t.set(o,a),a};return n(e)}(e),(e=>{u(e,m)})))),[v]=d.useState(so(c,g));_a((()=>{for(const e of s)e in m&&mo(v[e],m[e]);return()=>{Object.values(v).map(vo)}}),[m,v,g]),_a((()=>{u(g,m)})),d.useImperativeHandle(p,oo(function(e){return a.reduce(((n,r)=>(n[r]=n=>{go(e[t.methods[r]],n)},n)),{})}(g)));const y=n;return(0,o.jsx)(l.Provider,{value:g,children:n?(0,o.jsx)(y,{...Ma([...r,...i,...s],m),children:f}):f})}));return{Component:h,useEmitter:(e,t)=>{const n=d.useContext(l)[e];_a((()=>mo(n,t)),[t,n])},useEmitterValue:d.version.startsWith("18")?e=>{const t=d.useContext(l)[e],n=d.useCallback((e=>mo(t,e)),[t]);return d.useSyncExternalStore(n,(()=>yo(t)),(()=>yo(t)))}:e=>{const t=d.useContext(l)[e],[n,r]=d.useState(so(yo,t));return _a((()=>mo(t,(e=>{e!==n&&r(oo(e))}))),[t,n]),n},usePublisher:e=>d.useCallback(lo(go,d.useContext(l)[e]),[e])}}const Pa=d.createContext(void 0),Ia=d.createContext(void 0),Ra=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Da(e,t,n,r=co,o,i){const a=d.useRef(null),s=d.useRef(null),l=d.useRef(null),u=d.useCallback((n=>{const r=n.target,o=r===window||r===document,a=i?o?window.pageXOffset||document.documentElement.scrollLeft:r.scrollLeft:o?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,u=i?o?document.documentElement.scrollWidth:r.scrollWidth:o?document.documentElement.scrollHeight:r.scrollHeight,c=i?o?window.innerWidth:r.offsetWidth:o?window.innerHeight:r.offsetHeight,d=()=>{e({scrollHeight:u,scrollTop:Math.max(a,0),viewportHeight:c})};n.suppressFlushSync?d():te.flushSync(d),null!==s.current&&(a===s.current||a<=0||a===u-c)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))}),[e,t]);return d.useEffect((()=>{const e=o||a.current;return r(o||a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",u)}}),[a,u,n,r,o]),{scrollByCallback:function(e){i&&(e={behavior:e.behavior,left:e.top}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){const r=a.current;if(!r||(i?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const o="smooth"===n.behavior;let u,c,d;r===window?(c=Math.max(wi(document.documentElement,i?"width":"height"),i?document.documentElement.scrollWidth:document.documentElement.scrollHeight),u=i?window.innerWidth:window.innerHeight,d=i?document.documentElement.scrollLeft:document.documentElement.scrollTop):(c=r[i?"scrollWidth":"scrollHeight"],u=wi(r,i?"width":"height"),d=r[i?"scrollLeft":"scrollTop"]);const h=c-u;if(n.top=Math.ceil(Math.max(Math.min(h,n.top),0)),Wi(u,c)||n.top===d)return e({scrollHeight:c,scrollTop:d,viewportHeight:u}),void(o&&t(!0));o?(s.current=n.top,l.current&&clearTimeout(l.current),l.current=setTimeout((()=>{l.current=null,s.current=null,t(!0)}),1e3)):s.current=null,i&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}}}const Oa="-webkit-sticky",Aa="sticky",Ea=xa((()=>{if(typeof document>"u")return Aa;const e=document.createElement("div");return e.style.position=Oa,e.style.position===Oa?Oa:Aa}));function Za(e){return e}const La=Lo((([e,t])=>({...e,...t})),fo(ka,Lo((()=>{const e=Oo((e=>`Item ${e}`)),t=Oo(null),n=Oo((e=>`Group ${e}`)),r=Oo({}),o=Oo(Za),i=Oo("div"),a=Oo(co),s=(e,t=null)=>Ao(To(r,Mo((t=>t[e])),Co()),t);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}})))),Fa=({height:e})=>(0,o.jsx)("div",{style:{height:e}}),ja={overflowAnchor:"none",position:Ea(),zIndex:1},Na={overflowAnchor:"none"},za={...Na,display:"inline-block",height:"100%"},Ba=d.memo((function({showTopList:e=!1}){const t=os("listState"),n=is("sizeRanges"),r=os("useWindowScroll"),i=os("customScrollParent"),a=is("windowScrollContainerState"),s=is("scrollContainerState"),l=i||r?a:s,u=os("itemContent"),c=os("context"),h=os("groupContent"),p=os("trackItemSizes"),f=os("itemSize"),m=os("log"),g=is("gap"),v=os("horizontalDirection"),{callbackRef:y}=Go(n,f,p,e?co:l,m,g,i,v,os("skipAnimationFrameInResizeObserver")),[b,x]=d.useState(0);rs("deviation",(e=>{b!==e&&x(e)}));const w=os("EmptyPlaceholder"),S=os("ScrollSeekPlaceholder")||Fa,C=os("ListComponent"),k=os("ItemComponent"),M=os("GroupComponent"),_=os("computeItemKey"),T=os("isSeeking"),P=os("groupIndices").length>0,I=os("alignToBottom"),R=os("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==b?b:I?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==b?b:I?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...R?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&w?(0,o.jsx)(w,{...Ga(w,c)}):(0,o.jsx)(C,{...Ga(C,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:D,children:(e?t.topItems:t.items).map((e=>{const n=e.originalIndex,r=_(n+t.firstItemIndex,e.data,c);return T?(0,d.createElement)(S,{...Ga(S,c),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,d.createElement)(M,{...Ga(M,c),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:ja},h(e.index,c)):(0,d.createElement)(k,{...Ga(k,c),...Ua(k,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:v?za:Na},P?u(e.index,e.groupIndex,e.data,c):u(e.index,e.data,c))}))})})),Va={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ha={outline:"none",overflowX:"auto",position:"relative"},$a=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Wa={position:Ea(),top:0,width:"100%",zIndex:1};function Ga(e,t){if("string"!=typeof e)return{context:t}}function Ua(e,t){return{item:"string"==typeof e?void 0:t}}const qa=d.memo((function(){const e=os("HeaderComponent"),t=is("headerHeight"),n=os("HeaderFooterTag"),r=$o(d.useMemo((()=>e=>{t(wi(e,"height"))}),[t]),!0,os("skipAnimationFrameInResizeObserver")),i=os("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ga(e,i)})}):null})),Ka=d.memo((function(){const e=os("FooterComponent"),t=is("footerHeight"),n=os("HeaderFooterTag"),r=$o(d.useMemo((()=>e=>{t(wi(e,"height"))}),[t]),!0,os("skipAnimationFrameInResizeObserver")),i=os("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ga(e,i)})}):null}));function Ya({useEmitter:e,useEmitterValue:t,usePublisher:n}){return d.memo((function({children:r,style:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("scrollerRef"),d=t("context"),h=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=Da(s,u,l,c,void 0,h);return e("scrollTo",m),e("scrollBy",p),(0,o.jsx)(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?Ha:Va,...i},tabIndex:0,...a,...Ga(l,d),children:r})}))}function Xa({useEmitter:e,useEmitterValue:t,usePublisher:n}){return d.memo((function({children:r,style:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("totalListHeight"),d=t("deviation"),h=t("customScrollParent"),p=t("context"),{scrollByCallback:f,scrollerRef:m,scrollToCallback:g}=Da(s,u,l,co,h);return Ra((()=>(m.current=h||window,()=>{m.current=null})),[m,h]),e("windowScrollTo",g),e("scrollBy",f),(0,o.jsx)(l,{"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0!==c?{height:c+d}:{}},...a,...Ga(l,p),children:r})}))}const Qa=({children:e})=>{const t=d.useContext(Pa),n=is("viewportHeight"),r=is("fixedItemHeight"),i=os("alignToBottom"),a=os("horizontalDirection"),s=$o(d.useMemo((()=>ao(n,(e=>wi(e,a?"width":"height")))),[n,a]),!0,os("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:s,style:$a(i),children:e})},Ja=({children:e})=>{const t=d.useContext(Pa),n=is("windowViewportRect"),r=is("fixedItemHeight"),i=os("customScrollParent"),a=qo(n,i,os("skipAnimationFrameInResizeObserver")),s=os("alignToBottom");return d.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:a,style:$a(s),children:e})},es=({children:e})=>{const t=os("TopItemListComponent")||"div",n=os("headerHeight"),r={...Wa,marginTop:`${n}px`},i=os("context");return(0,o.jsx)(t,{style:r,...Ga(t,i),children:e})},ts=d.memo((function(e){const t=os("useWindowScroll"),n=os("topItemsIndexes").length>0,r=os("customScrollParent"),i=os("context"),a=r||t?ss:as,s=r||t?Ja:Qa;return(0,o.jsxs)(a,{...e,...Ga(a,i),children:[n&&(0,o.jsx)(es,{children:(0,o.jsx)(Ba,{showTopList:!0})}),(0,o.jsxs)(s,{children:[(0,o.jsx)(qa,{}),(0,o.jsx)(Ba,{}),(0,o.jsx)(Ka,{})]})]})})),{Component:ns,useEmitter:rs,useEmitterValue:os,usePublisher:is}=Ta(La,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},ts),as=Ya({useEmitter:rs,useEmitterValue:os,usePublisher:is}),ss=Xa({useEmitter:rs,useEmitterValue:os,usePublisher:is}),ls=ns,us=Lo((([e,t])=>({...e,...t})),fo(ka,Lo((()=>{const e=Oo((e=>(0,o.jsxs)("td",{children:["Item $",e]}))),t=Oo(null),n=Oo(null),r=Oo(null),i=Oo({}),a=Oo(Za),s=Oo(co),l=(e,t=null)=>Ao(To(i,Mo((t=>t[e])),Co()),t);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr")}})))),cs=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{height:e}})}),ds=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{border:0,height:e,padding:0}})}),hs={overflowAnchor:"none"},ps=d.memo((function({showTopList:e=!1}){const t=xs("listState"),n=xs("computeItemKey"),r=xs("firstItemIndex"),i=xs("isSeeking"),a=xs("ScrollSeekPlaceholder")||cs,s=xs("context"),l=xs("TableRowComponent"),u=xs("fixedHeaderHeight"),c=xs("itemContent"),h=(e?t.topItems:[]).reduce(((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e)),[]),p=(e?t.topItems:t.items).map((t=>{const o=t.originalIndex,p=n(o+r,t.data,s),f=e?0===o?0:h[o-1]:0;return i?(0,d.createElement)(a,{...Ga(a,s),height:t.size,index:t.index,key:p,type:t.type||"item"}):(0,d.createElement)(l,{...Ga(l,s),...Ua(l,t.data),"data-index":o,"data-item-index":t.index,"data-known-size":t.size,key:p,style:e?{overflowAnchor:"none",position:"sticky",top:u+f,zIndex:2}:hs},c(t.index,t.data,s))}));return(0,o.jsx)(o.Fragment,{children:p})})),fs=d.memo((function(){const e=xs("listState"),t=xs("topItemsIndexes").length>0,n=ws("sizeRanges"),r=xs("useWindowScroll"),i=xs("customScrollParent"),a=ws("windowScrollContainerState"),s=ws("scrollContainerState"),l=i||r?a:s,u=xs("trackItemSizes"),c=xs("itemSize"),h=xs("log"),{callbackRef:p,ref:f}=Go(n,c,u,l,h,void 0,i,!1,xs("skipAnimationFrameInResizeObserver")),[m,g]=d.useState(0);bs("deviation",(e=>{m!==e&&(f.current.style.marginTop=`${e}px`,g(e))}));const v=xs("EmptyPlaceholder"),y=xs("FillerRow")||ds,b=xs("TableBodyComponent"),x=xs("paddingTopAddition"),w=xs("statefulTotalCount"),S=xs("context");if(0===w&&v)return(0,o.jsx)(v,{...Ga(v,S)});const C=(t?e.topItems:[]).reduce(((e,t)=>e+t.size),0),k=e.offsetTop+x+m-C,M=e.offsetBottom,_=k>0?(0,o.jsx)(y,{context:S,height:k},"padding-top"):null,T=M>0?(0,o.jsx)(y,{context:S,height:M},"padding-bottom"):null;return(0,o.jsxs)(b,{"data-testid":"virtuoso-item-list",ref:p,...Ga(b,S),children:[_,t&&(0,o.jsx)(ps,{showTopList:!0}),(0,o.jsx)(ps,{}),T]})})),ms=({children:e})=>{const t=d.useContext(Pa),n=ws("viewportHeight"),r=ws("fixedItemHeight"),i=$o(d.useMemo((()=>ao(n,(e=>wi(e,"height")))),[n]),!0,xs("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:i,style:$a(!1),children:e})},gs=({children:e})=>{const t=d.useContext(Pa),n=ws("windowViewportRect"),r=ws("fixedItemHeight"),i=xs("customScrollParent"),a=qo(n,i,xs("skipAnimationFrameInResizeObserver"));return d.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:a,style:$a(!1),children:e})},vs=d.memo((function(e){const t=xs("useWindowScroll"),n=xs("customScrollParent"),r=ws("fixedHeaderHeight"),i=ws("fixedFooterHeight"),a=xs("fixedHeaderContent"),s=xs("fixedFooterContent"),l=xs("context"),u=$o(d.useMemo((()=>ao(r,(e=>wi(e,"height")))),[r]),!0,xs("skipAnimationFrameInResizeObserver")),c=$o(d.useMemo((()=>ao(i,(e=>wi(e,"height")))),[i]),!0,xs("skipAnimationFrameInResizeObserver")),h=n||t?Cs:Ss,p=n||t?gs:ms,f=xs("TableComponent"),m=xs("TableHeadComponent"),g=xs("TableFooterComponent"),v=a?(0,o.jsx)(m,{ref:u,style:{position:"sticky",top:0,zIndex:2},...Ga(m,l),children:a()},"TableHead"):null,y=s?(0,o.jsx)(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...Ga(g,l),children:s()},"TableFoot"):null;return(0,o.jsx)(h,{...e,...Ga(h,l),children:(0,o.jsx)(p,{children:(0,o.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:"none"},...Ga(f,l),children:[v,(0,o.jsx)(fs,{},"TableBody"),y]})})})})),{Component:ys,useEmitter:bs,useEmitterValue:xs,usePublisher:ws}=Ta(us,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},vs),Ss=Ya({useEmitter:bs,useEmitterValue:xs,usePublisher:ws}),Cs=Xa({useEmitter:bs,useEmitterValue:xs,usePublisher:ws}),ks=ys,Ms={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},_s={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Ts,floor:Ps,max:Is,min:Rs,round:Ds}=Math;function Os(e,t,n){return Array.from({length:t-e+1}).map(((t,r)=>({data:null===n?null:n[r+e],index:r+e})))}function As(e,t){return e&&e.width===t.width&&e.height===t.height}function Es(e,t){return e&&e.column===t.column&&e.row===t.row}const Zs=Lo((([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:m},{customScrollParent:g,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x},w])=>{const S=Oo(0),C=Oo(0),k=Oo(Ms),M=Oo({height:0,width:0}),_=Oo({height:0,width:0}),T=Eo(),P=Eo(),I=Oo(0),R=Oo(null),D=Oo({column:0,row:0}),O=Eo(),A=Eo(),E=Oo(!1),Z=Oo(0),L=Oo(!0),F=Oo(!1),j=Oo(!1);mo(To(f,Do(Z),ko((([e,t])=>!!t))),(()=>{go(L,!1)})),mo(To(jo(f,L,_,M,Z,F),ko((([e,t,n,r,,o])=>e&&!t&&0!==n.height&&0!==r.height&&!o))),(([,,,,e])=>{go(F,!0),Vi(1,(()=>{go(T,e)})),xo(To(u),(()=>{go(t,[0,0]),go(L,!0)}))})),bo(To(A,ko((e=>null!=e&&e.scrollTop>0)),_o(0)),C),mo(To(f,Do(A),ko((([,e])=>null!=e))),(([,e])=>{e&&(go(M,e.viewport),go(_,e.item),go(D,e.gap),e.scrollTop>0&&(go(E,!0),xo(To(u,Io(1)),(e=>{go(E,!1)})),go(l,{top:e.scrollTop})))})),bo(To(M,Mo((({height:e})=>e))),d),bo(To(jo(No(M,As),No(_,As),No(D,((e,t)=>e&&e.column===t.column&&e.row===t.row)),No(u)),Mo((([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e})))),O),bo(To(jo(No(S),r,No(D,Es),No(_,As),No(M,As),No(R),No(C),No(E),No(L),No(Z)),ko((([,,,,,,,e])=>!e)),Mo((([e,[t,n],r,o,i,a,s,,l,u])=>{const{column:c,row:d}=r,{height:h,width:p}=o,{width:f}=i;if(0===s&&(0===e||0===f))return Ms;if(0===p){const t=Hi(u,e);return function(e){return{..._s,items:e}}(Os(t,t+Math.max(s-1,0),a))}const m=Ls(f,p,c);let g,v;l?0===t&&0===n&&s>0?(g=0,v=s-1):(g=m*Ps((t+d)/(h+d)),v=m*Ts((n+d)/(h+d))-1,v=Rs(e-1,Is(v,m-1)),g=Rs(v,Is(0,g))):(g=0,v=-1);const y=Os(g,v,a),{bottom:b,top:x}=Fs(i,r,o,y),w=Ts(e/m);return{bottom:b,itemHeight:h,items:y,itemWidth:p,offsetBottom:w*h+(w-1)*d-b,offsetTop:x,top:x}}))),k),bo(To(R,ko((e=>null!==e)),Mo((e=>e.length))),S),bo(To(jo(M,_,k,D),ko((([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height)),Mo((([e,t,{items:n},r])=>{const{bottom:o,top:i}=Fs(e,r,t,n);return[i,o]})),Co(vi)),t);const N=Oo(!1);bo(To(u,Do(N),Mo((([e,t])=>t||0!==e))),N);const z=Zo(To(jo(k,S),ko((([{items:e}])=>e.length>0)),Do(N),ko((([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r})),Mo((([[,e]])=>e-1)),Co())),B=Zo(To(No(k),ko((({items:e})=>e.length>0&&0===e[0].index)),_o(0),Co())),V=Zo(To(No(k),Do(E),ko((([{items:e},t])=>e.length>0&&!t)),Mo((([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index}))),Co(gi),Ro(0)));bo(V,p.scrollSeekRangeChanged),bo(To(T,Do(M,_,S,D),Mo((([e,t,n,r,o])=>{const i=zi(e),{align:a,behavior:s,offset:l}=i;let u=i.index;"LAST"===u&&(u=r-1),u=Is(0,u,Rs(r-1,u));let c=js(t,o,n,u);return"end"===a?c=Ds(c-t.height+n.height):"center"===a&&(c=Ds(c-t.height/2+n.height/2)),l&&(c+=l),{behavior:s,top:c}}))),l);const H=Ao(To(k,Mo((e=>e.offsetBottom+e.bottom))),0);return bo(To(x,Mo((e=>({height:e.visibleHeight,width:e.visibleWidth})))),M),{customScrollParent:g,data:R,deviation:I,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:C,itemDimensions:_,overscan:n,restoreStateFrom:A,scrollBy:a,scrollContainerState:s,scrollHeight:P,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x,...p,gridState:k,horizontalDirection:j,initialTopMostItemIndex:Z,totalListHeight:H,...h,endReached:z,propsReady:m,rangeChanged:V,startReached:B,stateChanged:O,stateRestoreInProgress:E,...w}}),fo(ta,Ko,Ki,ma,ji,ga,Ho));function Ls(e,t,n){return Is(1,Ps((e+n)/(Ps(t)+n)))}function Fs(e,t,n,r){const{height:o}=n;if(void 0===o||0===r.length)return{bottom:0,top:0};const i=js(e,t,n,r[0].index);return{bottom:js(e,t,n,r[r.length-1].index)+o,top:i}}function js(e,t,n,r){const o=Ls(e.width,n.width,t.column),i=Ps(r/o),a=i*n.height+Is(0,i-1)*t.row;return a>0?a+t.row:a}const Ns=Lo((([e,t])=>({...e,...t})),fo(Zs,Lo((()=>{const e=Oo((e=>`Item ${e}`)),t=Oo({}),n=Oo(null),r=Oo("virtuoso-grid-item"),o=Oo("virtuoso-grid-list"),i=Oo(Za),a=Oo("div"),s=Oo(co),l=(e,n=null)=>Ao(To(t,Mo((t=>t[e])),Co()),n),u=Oo(!1),c=Oo(!1);return bo(No(c),u),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}})))),zs=d.memo((function(){const e=qs("gridState"),t=qs("listClassName"),n=qs("itemClassName"),r=qs("itemContent"),i=qs("computeItemKey"),a=qs("isSeeking"),s=Ks("scrollHeight"),l=qs("ItemComponent"),u=qs("ListComponent"),c=qs("ScrollSeekPlaceholder"),h=qs("context"),p=Ks("itemDimensions"),f=Ks("gap"),m=qs("log"),g=qs("stateRestoreInProgress"),v=Ks("reportReadyState"),y=$o(d.useMemo((()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(n){const{height:e,width:t}=n.getBoundingClientRect();p({height:e,width:t})}f({column:Qs("column-gap",getComputedStyle(e).columnGap,m),row:Qs("row-gap",getComputedStyle(e).rowGap,m)})}),[s,p,f,m]),!0,!1);return Ra((()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)}),[e]),g?null:(0,o.jsx)(u,{className:t,ref:y,...Ga(u,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map((t=>{const s=i(t.index,t.data,h);return a?(0,o.jsx)(c,{...Ga(c,h),height:e.itemHeight,index:t.index,width:e.itemWidth},s):(0,d.createElement)(l,{...Ga(l,h),className:n,"data-index":t.index,key:s},r(t.index,t.data,h))}))})})),Bs=d.memo((function(){const e=qs("HeaderComponent"),t=Ks("headerHeight"),n=qs("headerFooterTag"),r=$o(d.useMemo((()=>e=>{t(wi(e,"height"))}),[t]),!0,!1),i=qs("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ga(e,i)})}):null})),Vs=d.memo((function(){const e=qs("FooterComponent"),t=Ks("footerHeight"),n=qs("headerFooterTag"),r=$o(d.useMemo((()=>e=>{t(wi(e,"height"))}),[t]),!0,!1),i=qs("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ga(e,i)})}):null})),Hs=({children:e})=>{const t=d.useContext(Ia),n=Ks("itemDimensions"),r=Ks("viewportDimensions"),i=$o(d.useMemo((()=>e=>{r(e.getBoundingClientRect())}),[r]),!0,!1);return d.useEffect((()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))}),[t,r,n]),(0,o.jsx)("div",{ref:i,style:$a(!1),children:e})},$s=({children:e})=>{const t=d.useContext(Ia),n=Ks("windowViewportRect"),r=Ks("itemDimensions"),i=qs("customScrollParent"),a=qo(n,i,!1);return d.useEffect((()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))}),[t,n,r]),(0,o.jsx)("div",{ref:a,style:$a(!1),children:e})},Ws=d.memo((function({...e}){const t=qs("useWindowScroll"),n=qs("customScrollParent"),r=n||t?Xs:Ys,i=n||t?$s:Hs,a=qs("context");return(0,o.jsx)(r,{...e,...Ga(r,a),children:(0,o.jsxs)(i,{children:[(0,o.jsx)(Bs,{}),(0,o.jsx)(zs,{}),(0,o.jsx)(Vs,{})]})})})),{Component:Gs,useEmitter:Us,useEmitterValue:qs,usePublisher:Ks}=Ta(Ns,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},Ws),Ys=Ya({useEmitter:Us,useEmitterValue:qs,usePublisher:Ks}),Xs=Xa({useEmitter:Us,useEmitterValue:qs,usePublisher:Ks});function Qs(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bo.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var Js=n(90496),el=n(42152),tl=n(79717),nl=n(97136),rl=n(71959),ol=n(51977),il=n(89865),al=n(12995),sl=n(70021),ll=n(76353),ul=n(41871);const cl=(0,Y.ZP)(il.Z,{shouldForwardProp:e=>(0,ol.Z)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,nl.Z)((e=>{let{theme:t}=e;return{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:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ul.Z.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${ul.Z.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${ul.Z.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${ul.Z.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${ul.Z.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:e=>{let{ownerState:t}=e;return t.divider},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:e=>{let{ownerState:t}=e;return!t.disableGutters},style:{paddingLeft:16,paddingRight:16}},{props:e=>{let{ownerState:t}=e;return t.dense},style:{paddingTop:4,paddingBottom:4}}]}}))),dl=d.forwardRef((function(e,t){const n=(0,rl.i)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:u=!1,divider:c=!1,focusVisibleClassName:h,selected:p=!1,className:f,...m}=n,g=d.useContext(ll.Z),v=d.useMemo((()=>({dense:l||g.dense||!1,alignItems:r,disableGutters:u})),[r,g.dense,l,u]),y=d.useRef(null);(0,al.Z)((()=>{i&&y.current&&y.current.focus()}),[i]);const b={...n,alignItems:r,dense:v.dense,disableGutters:u,divider:c,selected:p},x=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,l={root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},u=(0,el.Z)(l,ul.t,n);return{...n,...u}})(b),w=(0,sl.Z)(y,t);return(0,o.jsx)(ll.Z.Provider,{value:v,children:(0,o.jsx)(cl,{ref:w,href:m.href||m.to,component:(m.href||m.to)&&"div"===a?"button":a,focusVisibleClassName:(0,Js.Z)(x.focusVisible,h),ownerState:b,className:(0,Js.Z)(x.root,f),...m,classes:x,children:s})})}));var hl=n(9580);const pl=(0,d.memo)((function(e){let{color:t,sx:n,...r}=e;return(0,o.jsx)(to.Z,{...r,sx:gn({height:4,width:16,margin:e=>e.spacing(.5)},n),style:{backgroundColor:t}})})),fl=(0,d.forwardRef)((function(e,t){let{item:n,sx:r,truncateLabel:i,onClick:a,isVisuallySelected:s,onMouseOver:l,onMouseOut:u,index:c,...h}=e;const[p,f]=(0,d.useState)(i);return(0,o.jsxs)(dl,{...h,role:"listitem",sx:gn({padding:0,cursor:"pointer"},r),dense:!0,onClick:e=>{var t;a(e,n.id),null===(t=n.onClick)||void 0===t||t.call(n,e)},onMouseOver:e=>null==l?void 0:l(e,{id:n.id,index:c}),onMouseOut:e=>null==u?void 0:u(e,{id:n.id,index:c}),selected:s,ref:t,children:[(0,o.jsx)(to.Z,{sx:{display:"flex",alignItems:"center"},children:(0,o.jsx)(pl,{color:n.color})}),(0,o.jsx)(hl.Z,{primary:n.label,primaryTypographyProps:{noWrap:p},onMouseOver:function(){i&&f(!1)},onMouseOut:function(){i&&f(!0)}})]})})),ml=(0,d.memo)(fl);function gl(e,t){return"ALL"!==t&&!!t[e.id]}function vl(e){let{items:t,height:n,width:r,selectedItems:i,onLegendItemClick:a,onItemMouseOver:s,onItemMouseOut:l}=e;const u=t.length>5;return(0,o.jsx)(ls,{style:{height:n,width:r},data:t,itemContent:(e,t)=>(0,o.jsx)(ml,{item:t,index:e,truncateLabel:u,isVisuallySelected:gl(t,i),onClick:a,onMouseOver:s,onMouseOut:l,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function yl(e){let{height:t,items:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:a,onItemMouseOut:s}=e;return(0,o.jsx)(to.Z,{component:"ul",sx:{width:"100%",height:t,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:n.map(((e,t)=>(0,o.jsx)(ml,{item:e,index:t,isVisuallySelected:gl(e,r),onMouseOver:a,onMouseOut:s,onClick:i,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id)))})}function bl(e,t){return"function"==typeof e?e(t):e}function xl(e,t){return n=>{t.setState((t=>({...t,[e]:bl(n,t[e])})))}}function wl(e){return e instanceof Function}function Sl(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}function Cl(e,t,n){let r,o=[];return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==o.length||s.some(((e,t)=>o[t]!==e))))return r;let l;if(o=s,n.key&&n.debug&&(l=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const Ml="debugHeaders";function _l(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const Tl={createTable:e=>{e.getHeaderGroups=Cl((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,a;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],l=null!=(a=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[];return Pl(t,[...s,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...l],e)}),kl(e.options,Ml)),e.getCenterHeaderGroups=Cl((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>Pl(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),kl(e.options,Ml)),e.getLeftHeaderGroups=Cl((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return Pl(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),kl(e.options,Ml)),e.getRightHeaderGroups=Cl((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return Pl(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),kl(e.options,Ml)),e.getFooterGroups=Cl((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),kl(e.options,Ml)),e.getLeftFooterGroups=Cl((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),kl(e.options,Ml)),e.getCenterFooterGroups=Cl((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),kl(e.options,Ml)),e.getRightFooterGroups=Cl((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),kl(e.options,Ml)),e.getFlatHeaders=Cl((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),kl(e.options,Ml)),e.getLeftFlatHeaders=Cl((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),kl(e.options,Ml)),e.getCenterFlatHeaders=Cl((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),kl(e.options,Ml)),e.getRightFlatHeaders=Cl((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),kl(e.options,Ml)),e.getCenterLeafHeaders=Cl((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),kl(e.options,Ml)),e.getLeftLeafHeaders=Cl((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),kl(e.options,Ml)),e.getRightLeafHeaders=Cl((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),kl(e.options,Ml)),e.getLeafHeaders=Cl((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,a,s,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),kl(e.options,Ml))}};function Pl(e,t,n,r){var o,i;let a=0;const s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)}),0)};s(e);let l=[];const u=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let s,l=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,l=!0),a&&(null==a?void 0:a.column)===s)a.subHeaders.push(e);else{const o=_l(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&u(i,t-1)},c=t.map(((e,t)=>_l(n,e,{depth:a,index:t})));u(c,a-1),l.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}const Il=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:()=>Sl(s.subRows,(e=>e.subRows)),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Cl((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:Cl((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),kl(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),kl(e.options,"debugRows")),_getAllCellsByColumnId:Cl((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),kl(e.options,"debugRows"))};for(let t=0;t{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Dl=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(i))};Dl.autoRemove=e=>Bl(e);const Ol=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};Ol.autoRemove=e=>Bl(e);const Al=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};Al.autoRemove=e=>Bl(e);const El=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};El.autoRemove=e=>Bl(e);const Zl=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));Zl.autoRemove=e=>Bl(e)||!(null!=e&&e.length);const Ll=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));Ll.autoRemove=e=>Bl(e)||!(null!=e&&e.length);const Fl=(e,t,n)=>e.getValue(t)===n;Fl.autoRemove=e=>Bl(e);const jl=(e,t,n)=>e.getValue(t)==n;jl.autoRemove=e=>Bl(e);const Nl=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Nl.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},Nl.autoRemove=e=>Bl(e)||Bl(e[0])&&Bl(e[1]);const zl={includesString:Dl,includesStringSensitive:Ol,equalsString:Al,arrIncludes:El,arrIncludesAll:Zl,arrIncludesSome:Ll,equals:Fl,weakEquals:jl,inNumberRange:Nl};function Bl(e){return null==e||""===e}const Vl={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xl("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?zl.includesString:"number"==typeof r?zl.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?zl.equals:Array.isArray(r)?zl.arrIncludes:zl.weakEquals},e.getFilterFn=()=>{var n,r;return wl(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:zl[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=bl(n,o?o.value:void 0);var a;if(Hl(r,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const s={id:e.id,value:i};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?l:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=bl(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(Hl(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Hl(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const $l={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),i=n.sort(((e,t)=>e-t));return n.length%2!=0?i[o]:(i[o-1]+i[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},Wl={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xl("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?$l.sum:"[object Date]"===Object.prototype.toString.call(r)?$l.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:$l[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const Gl={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xl("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Cl((e=>[Ql(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),kl(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Ql(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Ql(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Cl((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),kl(e.options,"debugTable"))}},Ul={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:xl("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,a,s,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Cl((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),kl(t.options,"debugRows")),e.getLeftVisibleCells=Cl((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),kl(t.options,"debugRows")),e.getRightVisibleCells=Cl((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),kl(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(i=r.right)?void 0:i.length))},e.getLeftLeafColumns=Cl((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),kl(e.options,"debugColumns")),e.getRightLeafColumns=Cl((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),kl(e.options,"debugColumns")),e.getCenterLeafColumns=Cl((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),kl(e.options,"debugColumns"))}},ql={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Kl={getDefaultColumnDef:()=>ql,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xl("columnSizing",e),onColumnSizingInfoChange:xl("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:ql.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:ql.size),null!=(o=e.columnDef.maxSize)?o:ql.maxSize)},e.getStart=Cl((e=>[e,Ql(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),kl(t.options,"debugColumns")),e.getAfter=Cl((e=>[e,Ql(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),kl(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o)return;if(null==i.persist||i.persist(),Xl(i)&&i.touches&&i.touches.length>1)return;const a=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=Xl(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100})),{...e,deltaOffset:a,deltaPercentage:s}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...u}))))},d=e=>c("move",e),h=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||"undefined"!=typeof document?document:null,f={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),h(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof Yl)return Yl;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return Yl=e,Yl}()&&{passive:!1};Xl(i)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",f.moveHandler,g),null==p||p.addEventListener("mouseup",f.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Yl=null;function Xl(e){return"touchstart"===e.type}function Ql(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Jl={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xl("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{eu(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Cl((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?tu(e,n):{rows:[],flatRows:[],rowsById:{}}),kl(e.options,"debugTable")),e.getFilteredSelectedRowModel=Cl((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?tu(e,n):{rows:[],flatRows:[],rowsById:{}}),kl(e.options,"debugTable")),e.getGroupedSelectedRowModel=Cl((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?tu(e,n):{rows:[],flatRows:[],rowsById:{}}),kl(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var a;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return eu(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return nu(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===ru(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===ru(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},eu=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach((t=>eu(e,t.id,n,r,o)))};function tu(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const a=nu(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function nu(e,t){var n;return null!=(n=t[e.id])&&n}function ru(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(nu(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=ru(e,t);"all"===n?i=!0:"some"===n?(i=!0,o=!1):o=!1}})),o?"all":!!i&&"some"}const ou=/([0-9]+)/gm;function iu(e,t){return e===t?0:e>t?1:-1}function au(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function su(e,t){const n=e.split(ou).filter(Boolean),r=t.split(ou).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const lu={alphanumeric:(e,t,n)=>su(au(e.getValue(n)).toLowerCase(),au(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>su(au(e.getValue(n)),au(t.getValue(n))),text:(e,t,n)=>iu(au(e.getValue(n)).toLowerCase(),au(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>iu(au(e.getValue(n)),au(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:riu(e.getValue(n),t.getValue(n))},uu=[Tl,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xl("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Cl((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),kl(t.options,"debugRows")),e.getVisibleCells=Cl((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),kl(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>Cl((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),kl(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},Gl,Ul,Rl,Vl,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xl("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>zl.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return wl(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:zl[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xl("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return lu.datetime;if("string"==typeof n&&(r=!0,n.split(ou).length>1))return lu.alphanumeric}return r?lu.text:lu.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return wl(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:lu[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=null!=n;t.setSorting((a=>{const s=null==a?void 0:a.find((t=>t.id===e.id)),l=null==a?void 0:a.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===o;var h;(u=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&l!==a.length-1?"replace":s?"toggle":"replace","toggle"===u&&(i||o||(u="remove")),"add"===u)?(c=[...a,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(h=t.options.maxMultiSortColCount)?h:Number.MAX_SAFE_INTEGER))):c="toggle"===u?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Wl,{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xl("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const i=!0===r||!(null==r||!r[e.id]);let a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xl("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>bl(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=bl(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,bl(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=bl(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=Cl((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),kl(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&te.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:xl("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,a,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(i=r.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=Cl((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),kl(e.options,"debugRows")),e.getBottomRows=Cl((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),kl(e.options,"debugRows")),e.getCenterRows=Cl((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),kl(e.options,"debugRows"))}},Jl,Kl];function cu(e){var t,n;const r=[...uu,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let a={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a}));const s=[];let l=!1;const u={_features:r,options:{...i,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=bl(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:Cl((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),kl(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Cl((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},s=a.accessorKey;let l,u=null!=(o=null!=(i=a.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?l=a.accessorFn:s&&(l=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[a.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:l,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Cl((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),kl(e.options,"debugColumns")),getLeafColumns:Cl((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=c.columns)&&t.length){let t=c.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[c]}),kl(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(o,e,r,n),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),kl(e,"debugColumns")),getAllFlatColumns:Cl((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),kl(e,"debugColumns")),_getAllFlatColumnsById:Cl((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),kl(e,"debugColumns")),getAllLeafColumns:Cl((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),kl(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,u);for(let e=0;e{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function hu(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?d.createElement(e,t):e:null;var n}var pu=n(2902),fu=n(76534);const mu=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(pu.Z,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,tl.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})}));var gu=n(13295);const vu=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(gu.Z,{...e,ref:t})}));var yu=n(36901);const bu=(0,Y.ZP)(yu.Z)((e=>{let{theme:t}=e;return{tableLayout:"fixed",borderCollapse:"separate",backgroundColor:t.palette.background.default}})),xu={compact:"small",standard:"medium",comfortable:"medium"},wu=(0,d.forwardRef)((function(e,t){let{density:n,...r}=e;return(0,o.jsx)(bu,{...r,tabIndex:-1,size:xu[n],ref:t,sx:{width:"100%"}})}));var Su=n(39298);const Cu=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(Su.Z,{...e,ref:t})}));var ku=n(6773),Mu=n(57698);const _u=(0,Mu.Z)((0,o.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var Tu=n(80706),Pu=n(32792),Iu=n(19577);function Ru(e){return(0,Iu.ZP)("MuiTableSortLabel",e)}const Du=(0,Pu.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);var Ou=n(81543);const Au=(0,Y.ZP)(il.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,nl.Z)((e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,[`& .${Du.icon}`]:{opacity:.5}},[`&.${Du.active}`]:{color:(t.vars||t).palette.text.primary,[`& .${Du.icon}`]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}}))),Eu=(0,Y.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,Tu.Z)(n.direction)}`]]}})((0,nl.Z)((e=>{let{theme:t}=e;return{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]}}))),Zu=d.forwardRef((function(e,t){const n=(0,rl.i)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:a,direction:s="asc",hideSortIcon:l=!1,IconComponent:u=_u,slots:c={},slotProps:d={},...h}=n,p={...n,active:r,direction:s,hideSortIcon:l,IconComponent:u},f=(e=>{const{classes:t,direction:n,active:r}=e,o={root:["root",r&&"active",`direction${(0,Tu.Z)(n)}`],icon:["icon",`iconDirection${(0,Tu.Z)(n)}`]};return(0,el.Z)(o,Ru,t)})(p),m={slots:c,slotProps:d},[g,v]=(0,Ou.Z)("root",{elementType:Au,externalForwardedProps:m,ownerState:p,className:(0,Js.Z)(f.root,a),ref:t}),[y,b]=(0,Ou.Z)("icon",{elementType:Eu,externalForwardedProps:m,ownerState:p,className:f.icon});return(0,o.jsxs)(g,{disableRipple:!0,component:"span",...v,...h,children:[i,l&&!r?null:(0,o.jsx)(y,{as:u,...b})]})}));var Lu=n(15058);const Fu=150,ju=40;function Nu(e,t){let{isHeader:n,isLastColumn:r,isFirstColumn:o,defaultColumnHeight:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=e.spacing(1),s=e.spacing(1.25),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize;"compact"===t&&(a=e.spacing(.5),s=e.spacing(.5),l=e.spacing(1),u=o?l:s,c=r?l:s,d=e.typography.body2.lineHeight,h=e.typography.body2.fontSize),"comfortable"===t&&(a=e.spacing(2),s=e.spacing(1.5),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize);const p=n||!i||"auto"===i?function(e,t){return("string"==typeof e?parseInt(e,10):e??0)+2*("string"==typeof t?parseInt(t,10):t)}(d,a):i;return{padding:`${a} ${c} ${a} ${u}`,height:p,fontSize:h,lineHeight:d}}function zu(e){return e.map((e=>{let{width:t,align:n,headerDescription:r,cellDescription:o,enableSorting:i,...a}=e;return{...a,..."auto"===t||void 0===t?{size:0,minSize:0,maxSize:0}:{size:t},enableSorting:!!i,meta:{align:n,headerDescription:r,cellDescription:o}}}))}const Bu=(0,Y.ZP)(Lu.Z)((e=>{let{theme:t}=e;return{padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:t.palette.background.default},"&:focus-visible":{outline:`solid 1px ${t.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}}}));function Vu(e){let{children:t,density:n,variant:r,width:i,defaultColumnHeight:a,focusState:s="none",onFocusTrigger:l,isFirstColumn:u,isLastColumn:c,description:h,align:p,color:f,backgroundColor:m,...g}=e;const v=(0,eo.Z)(),y=(0,d.useRef)(),b="head"===r;(0,d.useEffect)((()=>{"trigger-focus"===s&&y.current&&y.current.focus()}),[s]);const x=e=>{null==l||l(e)};return(0,o.jsx)(Bu,{...g,tabIndex:"none"!==s?0:-1,onFocus:e=>{var t;const n=null===(t=e.currentTarget)||void 0===t?void 0:t.querySelector('a[href], button, input, textarea, select, details,[role="button"]');n&&n.focus()},onClick:x,onKeyUp:x,style:{width:i},sx:{position:"relative",borderBottom:b?`solid 1px ${v.palette.grey[100]}`:`solid 1px ${v.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${m??v.palette.background.default} !important`,outline:`solid 1px ${v.palette.info.main}`,outlineOffset:"-1px"}},ref:y,children:(0,o.jsx)(to.Z,{id:"original-cell",sx:{...Nu(v,n,{isHeader:b,isLastColumn:c,isFirstColumn:u,defaultColumnHeight:a}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:m??"inherit",color:f??"inherit"},title:h,"aria-label":h,textAlign:p,children:t})})}function Hu(e){let{onSort:t,sortDirection:n,nextSortDirection:r,children:i,...a}=e;const s=!!t,l=(0,o.jsx)(ku.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:i}),u=!!n,c=u?n:r;return(0,o.jsx)(Vu,{...a,children:s?(0,o.jsx)(Zu,{onClick:t,direction:c,active:u,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${Du.icon}`]:{opacity:u?1:.5}}},children:l}):l})}var $u=n(60753);const Wu=(0,d.forwardRef)((function(e,t){return(0,o.jsx)($u.Z,{...e,tabIndex:-1,ref:t})})),Gu={row:0,column:0},Uu=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];function qu(e){let{maxRows:t,maxColumns:n,onActiveCellChange:r}=e;const[o,i]=(0,d.useState)(Gu),[a,s]=(0,d.useState)(!1),l=(0,d.useCallback)((e=>{const o=e.key;(function(e){return Uu.includes(e)}(o)||"Home"===o||"End"===o||"PageDown"===o||"PageUp"===o)&&i((i=>{let a=i.row,s=i.column;"ArrowRight"===o&&s0?(e.preventDefault(),s-=1):"ArrowDown"===o&&a0?(e.preventDefault(),a-=1):"Home"===o?(e.preventDefault(),a=0,s=0):"End"===o&&(e.preventDefault(),a=t-1,s=n-1);const l={column:s,row:a},u=(null==r?void 0:r(e,i,l))||l;return u.row===i.row&&u.column===i.column?i:u}))}),[n,t,r]);return{activeCell:o,isActive:a,onTableKeyDown:l,onCellFocus:e=>{e.column===o.column&&e.row===o.row&&a||(s(!0),i(e))}}}var Ku=n(21787);function Yu(e){return(0,Iu.ZP)("MuiTableFooter",e)}(0,Pu.Z)("MuiTableFooter",["root"]);const Xu=(0,Y.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),Qu={variant:"footer"},Ju="tfoot",ec=d.forwardRef((function(e,t){const n=(0,rl.i)({props:e,name:"MuiTableFooter"}),{className:r,component:i=Ju,...a}=n,s={...n,component:i},l=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},Yu,t)})(s);return(0,o.jsx)(Ku.Z.Provider,{value:Qu,children:(0,o.jsx)(Xu,{as:i,className:(0,Js.Z)(l.root,r),ref:t,role:i===Ju?null:"rowgroup",ownerState:s,...a})})})),tc=(0,d.forwardRef)((function(e,t){return(0,o.jsx)(ec,{...e,ref:t})}));function nc(e){let{width:t,height:n,density:r,defaultColumnWidth:i,defaultColumnHeight:a,onRowClick:s,onRowMouseOver:l,onRowMouseOut:u,rows:c,columns:h,headers:p,cellConfigs:f,pagination:m,onPaginationChange:g,rowCount:v}=e;const y=(0,d.useRef)(null),b=(0,d.useRef)({startIndex:0,endIndex:0}),x=function(e){let{visibleRange:t,virtualTable:n,maxRows:r,maxColumns:o}=e;return qu({maxRows:r,maxColumns:o,onActiveCellChange:(e,o,i)=>{const a=e.key,s=i&&(o.column!==i.column||o.row!==i.row),l=(null==i?void 0:i.row)??o.row;var u;if("ArrowDown"===a&&s)(l-1t.current.endIndex)&&(null===(u=n.current)||void 0===u||u.scrollToIndex({index:l-1,align:"end"}));else if("ArrowUp"===a&&s){var c;(l-1t.current.endIndex)&&(null===(c=n.current)||void 0===c||c.scrollToIndex({index:l-1,align:"start"}))}else if(!s||"Home"!==a&&"End"!==a){if("PageDown"===a){var d;e.preventDefault();let i=o.row;return i=Math.min(r-1,t.current.endIndex+1),null===(d=n.current)||void 0===d||d.scrollToIndex({index:i-1,align:"start"}),{row:i,column:o.column}}if("PageUp"===a){var h;let e=o.row;return e=Math.max(0,t.current.startIndex-1),null===(h=n.current)||void 0===h||h.scrollToIndex({index:e-1,align:"end"}),{row:e,column:o.column}}}else{var p;null===(p=n.current)||void 0===p||p.scrollToIndex({index:Math.max(l-1,0),align:"start"})}return i}})}({visibleRange:b,virtualTable:y,maxRows:c.length+1,maxColumns:h.length}),w=e=>e.row===x.activeCell.row&&e.column===x.activeCell.column?x.isActive?"trigger-focus":"focus-next":"none",S=(0,d.useMemo)((()=>({Scroller:Wu,Table:e=>(0,o.jsx)(wu,{...e,width:t,density:r,onKeyDown:x.onTableKeyDown}),TableHead:Cu,TableFoot:tc,TableRow:e=>{let{item:t,...n}=e;const i=n["data-index"],a=c[i];if(!a)return null;const d={id:a.id,index:a.index};return(0,o.jsx)(mu,{...n,onClick:e=>s(e,a.id),density:r,onMouseOver:e=>{null==l||l(e,d)},onMouseOut:e=>{null==u||u(e,d)}})},TableBody:vu})),[r,x.onTableKeyDown,s,u,l,c,t]),C=(e,t)=>{m&&g&&g({...m,pageIndex:t})},k=e=>{m&&g&&g({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,o.jsx)(to.Z,{style:{width:t,height:n},children:(0,o.jsx)(ks,{ref:y,totalCount:c.length,components:S,rangeChanged:e=>{b.current=e},fixedHeaderContent:()=>(0,o.jsx)(o.Fragment,{children:p.map((e=>(0,o.jsx)(mu,{density:r,children:e.headers.map(((e,t,n)=>{var s,l;const u=e.column,c={row:0,column:t},d=u.getIsSorted(),h=u.getNextSortingOrder();return(0,o.jsx)(Hu,{onSort:u.getCanSort()?u.getToggleSortingHandler():void 0,sortDirection:"string"==typeof d?d:void 0,nextSortDirection:"string"==typeof h?h:void 0,width:u.getSize()||i,defaultColumnHeight:a,align:null===(s=u.columnDef.meta)||void 0===s?void 0:s.align,variant:"head",density:r,description:null===(l=u.columnDef.meta)||void 0===l?void 0:l.headerDescription,focusState:w(c),onFocusTrigger:()=>x.onCellFocus(c),isFirstColumn:0===t,isLastColumn:t===n.length-1,children:hu(u.columnDef.header,e.getContext())},e.id)}))},e.id)))}),fixedFooterContent:m?()=>(0,o.jsx)(pu.Z,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,o.jsx)(fu.Z,{colSpan:h.length,count:v,page:m.pageIndex,rowsPerPage:m.pageSize,onPageChange:C,onRowsPerPageChange:k})}):void 0,itemContent:e=>{const t=c[e];return t?(0,o.jsx)(o.Fragment,{children:t.getVisibleCells().map(((t,n,s)=>{var l,u;const c={row:e+1,column:n},d=t.getContext(),h=null==f?void 0:f[d.cell.id],p=t.column.columnDef.cell,m="function"==typeof p?p(d):null,g=null===(l=t.column.columnDef.meta)||void 0===l?void 0:l.cellDescription;let v;return"function"==typeof g?v=g(d):g&&"string"==typeof m&&(v=m),(0,o.jsx)(Vu,{"data-testid":t.id,title:v||(null==h?void 0:h.text)||m,width:t.column.getSize()||i,defaultColumnHeight:a,align:null===(u=t.column.columnDef.meta)||void 0===u?void 0:u.align,density:r,focusState:w(c),onFocusTrigger:()=>x.onCellFocus(c),isFirstColumn:0===n,isLastColumn:n===s.length-1,description:v,color:(null==h?void 0:h.textColor)??void 0,backgroundColor:(null==h?void 0:h.backgroundColor)??void 0,children:(null==h?void 0:h.text)||m},t.id)}))}):null}})})}var rc=n(12242);function oc(e){let{color:t,density:n,...r}=e;const i="compact"===n;return(0,o.jsx)(rc.Z,{size:i?"small":"medium",...r,focusRipple:!1,tabIndex:-1,sx:{color:t,padding:e=>e.spacing(i?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:t},"&.Mui-focusVisible":{background:t?(0,tl.Fq)(t,.5):void 0},"& .MuiSvgIcon-root":{fontSize:i?16:18}}})}const ic=(e,t)=>`${t}`,ac={},sc=[];function lc(e){let{data:t,columns:n,cellConfigs:r,density:i="standard",defaultColumnWidth:a=Fu,defaultColumnHeight:s="auto",checkboxSelection:l,onRowSelectionChange:u,onSortingChange:c,getCheckboxColor:h,getRowId:p=ic,rowSelection:f=ac,sorting:m=sc,pagination:g,onPaginationChange:v,rowSelectionVariant:y="standard",...b}=e;const x=(0,eo.Z)(),w=(0,d.useCallback)(((e,t,n)=>{"standard"===y||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():null==u||u({[t.id]:!0})}),[u,y]),S=(0,d.useCallback)(((e,t,n)=>{const r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0,o=!!(null==r?void 0:r.metaKey)||!!(null==r?void 0:r.shiftKey);w(t,n,o)}),[w]),C=(0,d.useMemo)((()=>({id:"checkboxRowSelect",size:28,header:e=>{let{table:t}=e;return(0,o.jsx)(oc,{checked:t.getIsAllRowsSelected(),indeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),color:x.palette.text.primary,density:i})},cell:e=>{let{row:t,table:n}=e;return(0,o.jsx)(oc,{checked:t.getIsSelected(),indeterminate:t.getIsSomeSelected(),onChange:e=>{S(e,n,t)},color:null==h?void 0:h(t.original),density:i})},enableSorting:!1})),[x.palette.text.primary,i,h,S]),k=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=d.useState((()=>({current:cu(t)}))),[r,o]=d.useState((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:t,columns:(0,d.useMemo)((()=>{const e=zu(n);return l&&e.unshift(C),e}),[C,l,n]),getRowId:p,getCoreRowModel:e=>Cl((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;le._autoResetPageIndex()))),getSortedRowModel:e=>Cl((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),kl(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:g?e=>Cl((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:i,flatRows:a,rowsById:s}=n;const l=r*o,u=l+r;let c;i=i.slice(l,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:s}:du({rows:i,flatRows:a,rowsById:s}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),kl(e.options,"debugTable")):void 0,manualPagination:!g,enableRowSelection:!!l,onRowSelectionChange:e=>{const t="function"==typeof e?e(f):e;null==u||u(t)},onSortingChange:e=>{const t="function"==typeof e?e(m):e;null==c||c(t)},sortDescFirst:!0,state:{rowSelection:f,sorting:m,...g?{pagination:g}:{}}}),M=(0,d.useCallback)(((e,t)=>{const n=k.getRow(t),r=e.metaKey||e.shiftKey;w(k,n,r)}),[w,k]);return(0,o.jsx)(nc,{...b,density:i,defaultColumnWidth:a,defaultColumnHeight:s,onRowClick:M,rows:k.getRowModel().rows,columns:k.getAllFlatColumns(),headers:k.getHeaderGroups(),cellConfigs:r,pagination:g,onPaginationChange:v,rowCount:k.getRowCount()})}const uc=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:e=>{let{getValue:t}=e;return(0,o.jsx)("span",{title:t(),children:t()})}}],cc=e=>e.id,dc=e=>e.color;function hc(e){let{items:t,selectedItems:n,onSelectedItemsChange:r,onItemMouseOver:i,onItemMouseOut:a,height:s,width:l,columns:u=[],sorting:c,onSortingChange:h}=e;const p=(0,d.useMemo)((()=>"string"!=typeof n?n:t.reduce(((e,t,n)=>(e[cc(t,n)]=!0,e)),{})),[n,t]),f=(0,d.useMemo)((()=>[...uc,...u]),[u]);return(0,o.jsx)(lc,{height:s,width:l,rowSelection:p,onRowSelectionChange:r,onRowMouseOver:i,onRowMouseOut:a,sorting:c,onSortingChange:h,data:t,columns:f,density:"compact",defaultColumnWidth:"auto",getRowId:cc,getCheckboxColor:dc,checkboxSelection:!0,rowSelectionVariant:"legend"})}const pc=500;function fc(e){let{width:t,height:n,options:r,data:i,selectedItems:a,onSelectedItemsChange:s,onItemMouseOver:l,onItemMouseOut:u,tableProps:c}=e;const d=(e,t)=>{const n=e.metaKey||e.shiftKey,r=(0,ro.Uy)(a,(e=>{if("ALL"===e)return{[t]:!0};const r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}));s(r)},h=(0,no.bk)(r.mode),p=i.length>=pc,f={height:n,items:i,selectedItems:a,onLegendItemClick:d,onItemMouseOver:l,onItemMouseOut:u};let m;return m="table"===h?(0,o.jsx)(hc,{...f,onSelectedItemsChange:s,width:t,...c}):"right"===r.position||p?(0,o.jsx)(vl,{...f,width:t,onLegendItemClick:d}):(0,o.jsx)(yl,{...f,onLegendItemClick:d}),"right"===r.position?(0,o.jsx)(to.Z,{style:{width:t,height:n},sx:{position:"absolute",top:0,right:0},children:m}):(0,o.jsx)(to.Z,{style:{width:t,height:n},sx:{position:"absolute",bottom:0},children:m})}const mc={medium:{bottom:6,right:250},small:{bottom:4,right:150}},gc=300,vc=40,yc=100;function bc(e){let{children:t,legendProps:n,width:r,height:i,spacing:a=0,legendSize:s,minChildrenWidth:l=100,minChildrenHeight:u=100}=e;const c=(0,eo.Z)(),{content:d,legend:h,margin:p}=function(e){let{width:t,height:n,legendProps:r,legendSize:o,minChildrenHeight:i,minChildrenWidth:a,spacing:s,theme:l}=e;const u=null==r?void 0:r.options,c={legend:{show:!1,width:0,height:0},content:{width:t,height:n},margin:{right:0,bottom:0}};if(!u)return c;const{position:d}=u;let h,p;if("list"===(0,no.bk)(u.mode))h="right"===d?200:t,p=vc,"right"===d?p=n:n>=gc&&(p=yc);else{var f;const e=Nu(l,"compact"),i=((null==r||null===(f=r.tableProps)||void 0===f?void 0:f.columns)||[]).reduce(((e,t)=>("number"==typeof t.width&&(e+=t.width),e)),0);h="right"===d?mc[o].right+i:t;const a=Math.min(mc[o].bottom,r.data.length+1);p="bottom"===d?a*e.height:n}const m="right"===d?t-h-s:t,g="bottom"===d?n-p-s:n;return"right"===d&&m{null==i||i(e)}),[i]),h=(0,d.useMemo)((()=>wc()(u,n)),[n,u]);return(0,o.jsx)(c.Z,{ref:t,value:s,onChange:function(e){l(e.target.value),h(e.target.value)},...a})}));Sc.displayName="TextField";var Cc=n(76981),kc=n(13475),Mc=n(58731),_c=n(86845),Tc=n(81223);const Pc=(0,Y.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),Ic=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),Rc=e=>{let{children:t,...n}=e;return(0,o.jsx)(Mc.Z,{...n,children:t})};Rc.Header=e=>{let{children:t,onClose:n,...r}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Cc.Z,{style:{textOverflow:"ellipsis",overflow:"hidden"},...r,children:t}),n&&(0,o.jsx)(u.Z,{"aria-label":"Close",onClick:n,sx:Ic,children:(0,o.jsx)(Tc.default,{})})]})},Rc.Form=Pc,Rc.Content=e=>{let{children:t,sx:n,...r}=e;return(0,o.jsx)(kc.Z,{dividers:!0,...r,sx:gn({minWidth:"500px",textWrap:"balance"},n),children:t})},Rc.PrimaryButton=e=>{let{children:t,...n}=e;return(0,o.jsx)(a.Z,{variant:"contained",type:"submit",...n,children:t})},Rc.SecondaryButton=e=>{let{children:t,...n}=e;return(0,o.jsx)(a.Z,{variant:"outlined",color:"secondary",...n,children:t})},Rc.Actions=_c.Z;const Dc=e=>{const{description:t,isOpen:n,onCancel:r,onDiscardChanges:i}=e;return(0,o.jsxs)(Rc,{open:n,"aria-labelledby":"discard-dialog",children:[(0,o.jsx)(Rc.Header,{children:"Discard Changes"}),(0,o.jsx)(Rc.Content,{children:t}),(0,o.jsxs)(Rc.Actions,{children:[(0,o.jsx)(a.Z,{variant:"contained",onClick:i,children:"Discard Changes"}),(0,o.jsx)(a.Z,{variant:"outlined",color:"secondary",onClick:r,children:"Cancel"})]})]})};var Oc=n(10604);const Ac=e=>{let{children:t}=e;return(0,o.jsx)(Oc.ZP,{item:!0,xs:4,children:(0,o.jsx)(l.Z,{spacing:3,children:t})})};var Ec=n(44206),Zc=n(3890),Lc=n(56418),Fc=n(95359),jc=n(77887);const Nc=e=>{let{id:t,title:n,description:r,placement:i,children:a,enterDelay:s,enterNextDelay:l}=e;const u=(0,o.jsx)("span",{children:a});return(0,o.jsx)(Bc,{arrow:!0,id:t,placement:i??"top",title:(0,o.jsx)(zc,{title:n,description:r}),enterDelay:s??500,enterNextDelay:l??500,children:u})},zc=e=>{let{title:t,description:n}=e;return(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)(ku.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:t}),(0,o.jsx)(ku.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:n})]})},Bc=(0,Y.ZP)((e=>{let{className:t,...n}=e;return(0,o.jsx)(Fc.Z,{...n,classes:{popper:t}})}))((e=>{let{theme:t}=e;return{[`& .${jc.Z.tooltip}`]:{backgroundColor:t.palette.background.tooltip,color:t.palette.text.primary,maxWidth:"300px",padding:t.spacing(1),boxShadow:t.shadows[1]},[`& .${jc.Z.arrow}`]:{color:t.palette.background.tooltip}}})),Vc=e=>{let{label:t,control:n,description:r}=e;const i=`${vn("EditorSectionControl")}-control`,a={id:i};return(0,o.jsx)(Ec.Z,{children:(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,o.jsx)(Zc.Z,{htmlFor:i,children:t}),r&&(0,o.jsx)(Nc,{description:r,enterDelay:100,children:(0,o.jsx)(u.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,o.jsx)(Lc.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,o.jsxs)(to.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",d.cloneElement(n,a)]})]})})},Hc=e=>{let{children:t}=e;return(0,o.jsx)(Oc.ZP,{container:!0,spacing:8,children:t})},$c=e=>{let{title:t,children:n,icon:r}=e;return(0,o.jsxs)(to.Z,{children:[(0,o.jsxs)(to.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,o.jsx)(ku.Z,{variant:"overline",component:"h4",children:t}),r&&(0,o.jsx)(to.Z,{sx:{marginLeft:"auto"},children:r})]}),(0,o.jsx)(l.Z,{spacing:1,children:n})]})};var Wc=n(47782),Gc=n(11278);function Uc(e){let{options:t,renderInput:n=e=>(0,o.jsx)(c.Z,{...e}),...r}=e;const i=e=>e.label??e.id;return(0,o.jsx)(Wc.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:i,options:t,renderInput:n,renderOption:(e,t)=>{let{key:n,...r}=e;return(0,o.jsx)("li",{...r,children:(0,o.jsxs)("div",{children:[(0,o.jsx)(ku.Z,{variant:"body1",component:"div",children:i(t)}),t.description&&(0,o.jsx)(ku.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:t.description})]})},n)},filterOptions:(0,Gc.D)({stringify:e=>`${i(e)} ${e.description||""}`}),...r})}const qc=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function Kc(e){let{onChange:t,value:n="standard"}=e;return(0,o.jsx)(Vc,{label:"Density",control:(0,o.jsx)(Uc,{value:qc.find((e=>e.id===n)),options:qc,getOptionLabel:e=>e.label,onChange:(e,n)=>{let{id:r}=n;t(r)},disableClearable:!0})})}function Yc(){return(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)(to.Z,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:e=>e.palette.background.default,border:e=>`2px solid ${e.palette.info.main}`,borderRadius:"50%"}}),(0,o.jsx)(to.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function Xc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0||(t.unmount(),Pd.delete(e.typeKey))}}function Rd(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Zd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=i.length)return s;for(var l=Ld(i),u=Ld(s),c=[],d=0;d=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}({client:t,clientRect:r}))n.remove();else var i=(0,nd.bindAll)(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0});function a(){i(),n.remove()}}}({initial:a})}if("onDrop"===n){var s,l=r.location.current.input;null===(s=e)||void 0===s||s({current:{x:l.clientX,y:l.clientY}}),e=null,Wd=null}}}}),Ud=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,o=e.onPostDispatch,i=e.defaultDropEffect,a=Bd(),s=Fd({typeKey:t,defaultDropEffect:i});function l(e){null==r||r(e),s.dispatchEvent(e),a.dispatchEvent(e),null==o||o(e)}function u(e){var t=e.event,n=e.dragType;Td.start({event:t,dragType:n,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){return Id({typeKey:t,mount:function(){var e={canStart:Td.canStart,start:u};return n(e)}})},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return Rd(Gd.bindEvents(),(0,nd.bind)(document,{type:"dragstart",listener:function(t){var n,r,o,i,a,s;if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var l=t.target;if(!(l instanceof HTMLElement))return null;var u=$d.get(l);if(!u)return null;var c=yd(t),d={element:u.element,dragHandle:null!==(n=u.dragHandle)&&void 0!==n?n:null,input:c};if(u.canDrag&&!u.canDrag(d))return t.preventDefault(),null;if(u.dragHandle){var h=id({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(h))return t.preventDefault(),null}var p=null!==(r=null===(o=u.getInitialDataForExternal)||void 0===o?void 0:o.call(u,d))&&void 0!==r?r:null;if(p)for(var f=0,m=Object.entries(p);fKd({onDrop(e){let{location:i,source:a}=e;const s=i.current.dropTargets[0];if(!s)return;const l=a.data,u=s.data,c=t.findIndex((e=>e[n]===l[n])),d=t.findIndex((e=>e[n]===u[n]));if(d<0||c<0)return;const h=th(u);o(td({list:t,startIndex:c,indexOfTarget:d,closestEdgeOfTarget:h,axis:r}))}})),[n,r,t,o])}function oh(e){let{children:t,data:n}=e;const r=(0,d.useRef)(null),[i,a]=(0,d.useState)(nh);return(0,d.useEffect)((()=>{const e=r.current;if(e)return Rd(Yd({element:e,getInitialData:()=>n,onDragStart(){a({type:"is-dragging"})},onDrop(){a(nh)}}),qd({element:e,canDrop(t){let{source:n}=t;return n.element!==e},getData(t){let{input:r}=t;return function(e,t){var n,r,o=t.element,i=t.input,a=t.allowedEdges,s={x:i.clientX,y:i.clientY},l=o.getBoundingClientRect(),u=null!==(n=null===(r=a.map((function(e){return{edge:e,value:Jd[e](l,s)}})).sort((function(e,t){return e.value-t.value}))[0])||void 0===r?void 0:r.edge)&&void 0!==n?n:null;return Qd(Qd({},e),{},sd({},eh,u))}(n,{element:e,input:r,allowedEdges:["top","bottom"]})},getIsSticky:()=>!0,onDragEnter(e){let{self:t}=e;const n=th(t.data);a({type:"is-dragging-over",closestEdge:n})},onDrag(e){let{self:t}=e;const n=th(t.data);a((e=>"is-dragging-over"===e.type&&e.closestEdge===n?e:{type:"is-dragging-over",closestEdge:n}))},onDragLeave(){a(nh)},onDrop(){a(nh)}}))}),[n]),(0,o.jsxs)(l.Z,{ref:r,spacing:1,style:{opacity:"is-dragging"===i.type?.5:"unset"},children:["is-dragging-over"===i.type&&"top"===i.closestEdge?(0,o.jsx)(Yc,{}):null,t,"is-dragging-over"===i.type&&"bottom"===i.closestEdge?(0,o.jsx)(Yc,{}):null]})}var ih=n(81353),ah=n(34905),sh=n(17596);function lh(e,t){const n=t.indexOf(e);if(0===n)return t;const r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function uh(e,t){const n=t.indexOf(e);if(n===t.length-1)return t;const r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}const ch=(0,d.forwardRef)((function(e,t){let{onMoveUp:n,onMoveDown:r,onMoveLeft:i,onMoveRight:a,menuSx:s,...l}=e;const[c,h]=(0,d.useState)(null),p=Boolean(c);function f(e){h(null),null==e||e()}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.Z,{...l,ref:t,"aria-label":"move","aria-haspopup":!0,"aria-expanded":p,size:"small",onClick:function(e){h(e.currentTarget)},children:(0,o.jsx)(sh.default,{})}),(n||r||i||a)&&(0,o.jsxs)(ih.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:c,open:p,onClose:()=>f(void 0),sx:s,children:[n&&(0,o.jsx)(ah.Z,{onClick:()=>f(n),children:"Move Up"}),r&&(0,o.jsx)(ah.Z,{onClick:()=>f(r),children:"Move Down"}),i&&(0,o.jsx)(ah.Z,{onClick:()=>f(i),children:"Move Left"}),a&&(0,o.jsx)(ah.Z,{onClick:()=>f(a),children:"Move Right"}),a&&(0,o.jsx)(ah.Z,{onClick:()=>f(a),children:"Move Right"})]})]})}));var dh=n(62248),hh=n(38952),ph=n(43029),fh=n(3682),mh=n(41636),gh=n(50330),vh=n(9919),yh=n(13304);function bh(e,t,n){var r;const o=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=(0,yh.Z)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"==typeof(r=n)?r():r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const xh=d.forwardRef((function(e,t){const n=(0,eo.Z)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:u,direction:c="down",easing:h=r,in:p,onEnter:f,onEntered:m,onEntering:g,onExit:v,onExited:y,onExiting:b,style:x,timeout:w=i,TransitionComponent:S=fh.ZP,...C}=e,k=d.useRef(null),M=(0,sl.Z)((0,mh.Z)(l),k,t),_=e=>t=>{e&&(void 0===t?e(k.current):e(k.current,t))},T=_(((e,t)=>{bh(c,e,u),(0,vh.n)(e),f&&f(e,t)})),P=_(((e,t)=>{const r=(0,vh.C)({timeout:w,style:x,easing:h},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)})),I=_(m),R=_(b),D=_((e=>{const t=(0,vh.C)({timeout:w,style:x,easing:h},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),bh(c,e,u),v&&v(e)})),O=_((e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)})),A=d.useCallback((()=>{k.current&&bh(c,k.current,u)}),[c,u]);return d.useEffect((()=>{if(p||"down"===c||"right"===c)return;const e=(0,gh.Z)((()=>{k.current&&bh(c,k.current,u)})),t=(0,yh.Z)(k.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[c,p,u]),d.useEffect((()=>{p||A()}),[p,A]),(0,o.jsx)(S,{nodeRef:k,onEnter:T,onEntered:I,onEntering:P,onExit:D,onExited:O,onExiting:R,addEndListener:e=>{a&&a(k.current,e)},appear:s,in:p,timeout:w,...C,children:(e,t)=>{let{ownerState:n,...r}=t;return d.cloneElement(l,{ref:M,style:{visibility:"exited"!==e||p?void 0:"hidden",...x,...l.props.style},...r})}})}));var wh=n(87861);function Sh(e){return(0,Iu.ZP)("MuiDrawer",e)}(0,Pu.Z)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var Ch=n(76152);const kh=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Mh=(0,Y.ZP)(ph.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:kh})((0,nl.Z)((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}))),_h=(0,Y.ZP)("div",{shouldForwardProp:ol.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:kh})({flex:"0 0 auto"}),Th=(0,Y.ZP)(wh.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,Tu.Z)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,Tu.Z)(n.anchor)}`]]}})((0,nl.Z)((e=>{let{theme:t}=e;return{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:e=>{let{ownerState:t}=e;return"left"===t.anchor&&"temporary"!==t.variant},style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchor&&"temporary"!==t.variant},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:e=>{let{ownerState:t}=e;return"right"===t.anchor&&"temporary"!==t.variant},style:{borderLeft:`1px solid ${(t.vars||t).palette.divider}`}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchor&&"temporary"!==t.variant},style:{borderTop:`1px solid ${(t.vars||t).palette.divider}`}}]}}))),Ph={left:"right",right:"left",top:"down",bottom:"up"};const Ih=d.forwardRef((function(e,t){const n=(0,rl.i)({props:e,name:"MuiDrawer"}),r=(0,eo.Z)(),i=(0,hh.V)(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:u,className:c,elevation:h=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:f,...m}={},onClose:g,open:v=!1,PaperProps:y={},SlideProps:b,TransitionComponent:x,transitionDuration:w=a,variant:S="temporary",slots:C={},slotProps:k={},...M}=n,_=d.useRef(!1);d.useEffect((()=>{_.current=!0}),[]);const T=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return["left","right"].includes(e)}(t)?Ph[t]:t}({direction:i?"rtl":"ltr"},s),P=s,I={...n,anchor:P,elevation:h,open:v,variant:S,...M},R=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${(0,Tu.Z)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,Tu.Z)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,Tu.Z)(n)}`]};return(0,el.Z)(o,Sh,t)})(I),D={slots:{transition:x,...C},slotProps:{paper:y,transition:b,...k,backdrop:(0,Ch.Z)(k.backdrop||{...l,...f},{transitionDuration:w})}},[O,A]=(0,Ou.Z)("root",{ref:t,elementType:Mh,className:(0,Js.Z)(R.root,R.modal,c),shouldForwardComponentProp:!0,ownerState:I,externalForwardedProps:{...D,...M,...m},additionalProps:{open:v,onClose:g,hideBackdrop:p,slots:{backdrop:D.slots.backdrop},slotProps:{backdrop:D.slotProps.backdrop}}}),[E,Z]=(0,Ou.Z)("paper",{elementType:Th,shouldForwardComponentProp:!0,className:(0,Js.Z)(R.paper,y.className),ownerState:I,externalForwardedProps:D,additionalProps:{elevation:"temporary"===S?h:0,square:!0}}),[L,F]=(0,Ou.Z)("docked",{elementType:_h,ref:t,className:(0,Js.Z)(R.root,R.docked,c),ownerState:I,externalForwardedProps:D,additionalProps:M}),[j,N]=(0,Ou.Z)("transition",{elementType:xh,ownerState:I,externalForwardedProps:D,additionalProps:{in:v,direction:Ph[T],timeout:w,appear:_.current}}),z=(0,o.jsx)(E,{...Z,children:u});if("permanent"===S)return(0,o.jsx)(L,{...F,children:z});const B=(0,o.jsx)(j,{...N,children:z});return"persistent"===S?(0,o.jsx)(L,{...F,children:B}):(0,o.jsx)(O,{...A,children:B})})),Rh=e=>{let{anchor:t="right",isOpen:n,onClose:r,PaperProps:i,children:a,...s}=e;const l=(0,dh.Z)("(max-width:1080px)");return(0,o.jsx)(Ih,{...s,open:n,onClose:r,anchor:t,PaperProps:{...i,sx:gn({width:l?"100%":"1080px",overflow:"hidden"},null==i?void 0:i.sx)},children:a})};var Dh=function(e,t){return Dh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Dh(e,t)};function Oh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Dh(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var Ah=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Eh=new function(){this.browser=new Ah,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Eh.wxa=!0,Eh.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Eh.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(Eh.node=!0,Eh.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Eh);const Zh=Eh;var Lh="12px sans-serif";var Fh,jh,Nh=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n=0)i=o*e.length;else for(var a=0;a>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&i&&h===i[d]&&p===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?mf(s,a):mf(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function bf(e){return"CANVAS"===e.nodeName.toUpperCase()}var xf=/([&<>"'])/g,wf={"&":"&","<":"<",">":">",'"':""","'":"'"};function Sf(e){return null==e?"":(e+"").replace(xf,(function(e,t){return wf[t]}))}var Cf=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kf=[],Mf=Zh.browser.firefox&&+Zh.browser.version.split(".")[0]<39;function _f(e,t,n,r){return n=n||{},r?Tf(e,t,n):Mf&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Tf(e,t,n),n}function Tf(e,t,n){if(Zh.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(bf(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(yf(kf,e,r,o))return n.zrX=kf[0],void(n.zrY=kf[1])}n.zrX=n.zrY=0}function Pf(e){return e||window.event}function If(e,t,n){if(null!=(t=Pf(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&_f(e,o,t,n)}else{_f(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Cf.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Rf(e,t,n,r){e.addEventListener(t,n,r)}var Df=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Of(e){return 2===e.which||3===e.which}var Af=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i1&&o&&o.length>1){var a=Ef(o)/Ef(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Lf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Ff(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function jf(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function Nf(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function zf(e,t,n,r){void 0===r&&(r=[0,0]);var o=t[0],i=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=o*d+s*c,e[1]=-o*c+s*d,e[2]=i*d+l*c,e[3]=-i*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function Bf(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}const Vf=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}();var Hf=Math.min,$f=Math.max,Wf=new Vf,Gf=new Vf,Uf=new Vf,qf=new Vf,Kf=new Vf,Yf=new Vf,Xf=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=Hf(e.x,this.x),n=Hf(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$f(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=$f(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return Nf(o,o,[-t.x,-t.y]),function(e,t,n){var r=n[0],o=n[1];e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o}(o,o,[n,r]),Nf(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(if&&(f=b,mf&&(f=x,v=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Wf.x=Uf.x=n.x,Wf.y=qf.y=n.y,Gf.x=qf.x=n.x+n.width,Gf.y=Uf.y=n.y+n.height,Wf.transform(r),qf.transform(r),Gf.transform(r),Uf.transform(r),t.x=Hf(Wf.x,Gf.x,Uf.x,qf.x),t.y=Hf(Wf.y,Gf.y,Uf.y,qf.y);var l=$f(Wf.x,Gf.x,Uf.x,qf.x),u=$f(Wf.y,Gf.y,Uf.y,qf.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}();const Qf=Xf;var Jf="silent";function em(){Df(this.event)}var tm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Gp(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(hf),nm=function(e,t){this.x=e,this.y=t},rm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],om=new Qf(0,0,0,0),im=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new nm(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new tm,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new cf(a),a}return Gp(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(lp(rm,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=lm(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new nm(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new nm(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:em}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new nm(e,t);if(sm(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new Qf(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(om.copy(c.getBoundingRect()),c.transform&&om.applyTransform(c.transform),om.intersect(l)&&i.push(c))}if(i.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=am(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Jf)){t.target=a;break}}}function lm(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}lp(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){im.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=lm(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||nf(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));const um=im;function cm(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o=0;)o++;return o-t}function dm(e,t,n,r,o){for(r===t&&r++;r>>1])<0?l=i:s=i+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function hm(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function pm(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function fm(e,t){var n,r,o=7,i=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var h=pm(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=hm(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l=7||p>=7);if(f)break;m<0&&(m=0),m+=2}if((o=m)<1&&(o=1),1===r){for(l=0;l=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=o;for(;;){var m=0,g=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,g=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],g++,m=0,1==--s){v=!0;break}}while((m|g)=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!==(g=s-hm(e[u],a,0,s,s-1,t))){for(s-=g,p=(d-=g)+1,h=(c-=g)+1,l=0;l=7||g>=7);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]=32;)t|=1&e,e>>=1;return e+t}(o);do{if((i=cm(e,n,r,t))s&&(l=s),dm(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var gm=!1;function vm(){gm||(gm=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ym(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}const bm=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ym}return e.prototype.traverse=function(e,t){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(vm(),u.z=0),isNaN(u.z2)&&(vm(),u.z2=0),isNaN(u.zlevel)&&(vm(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const xm=Zh.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var wm={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-wm.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*wm.bounceIn(2*e):.5*wm.bounceOut(2*e-1)+.5}};const Sm=wm;var Cm=Math.pow,km=Math.sqrt,Mm=1e-8,_m=1e-4,Tm=km(3),Pm=1/3,Im=Up(),Rm=Up(),Dm=Up();function Om(e){return e>-1e-8&&eMm||e<-1e-8}function Em(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function Zm(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function Lm(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(Om(c)&&Om(d)){if(Om(s))i[0]=0;else(k=-l/s)>=0&&k<=1&&(i[p++]=k)}else{var f=d*d-4*c*h;if(Om(f)){var m=d/c,g=-m/2;(k=-s/a+m)>=0&&k<=1&&(i[p++]=k),g>=0&&g<=1&&(i[p++]=g)}else if(f>0){var v=km(f),y=c*s+1.5*a*(-d+v),b=c*s+1.5*a*(-d-v);(k=(-s-((y=y<0?-Cm(-y,Pm):Cm(y,Pm))+(b=b<0?-Cm(-b,Pm):Cm(b,Pm))))/(3*a))>=0&&k<=1&&(i[p++]=k)}else{var x=(2*c*s-3*a*d)/(2*km(c*c*c)),w=Math.acos(x)/3,S=km(c),C=Math.cos(w),k=(-s-2*S*C)/(3*a),M=(g=(-s+S*(C+Tm*Math.sin(w)))/(3*a),(-s+S*(C-Tm*Math.sin(w)))/(3*a));k>=0&&k<=1&&(i[p++]=k),g>=0&&g<=1&&(i[p++]=g),M>=0&&M<=1&&(i[p++]=M)}}return p}function Fm(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Om(a)){if(Am(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(Om(u))o[0]=-i/(2*a);else if(u>0){var c,d=km(u),h=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}function jm(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function Nm(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,m=Em(e,n,o,a,f),g=Em(t,r,i,s,f),v=m-u,y=g-c;d+=Math.sqrt(v*v+y*y),u=m,c=g}return d}function zm(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function Bm(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Vm(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Hm(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function $m(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=zm(e,n,o,h),f=zm(t,r,i,h),m=p-s,g=f-l;u+=Math.sqrt(m*m+g*g),s=p,l=f}return u}var Wm=/cubic-bezier\(([0-9,\.e ]+)\)/;function Gm(e){var t=e&&Wm.exec(e);if(t){var n=t[1].split(","),r=+Op(n[0]),o=+Op(n[1]),i=+Op(n[2]),a=+Op(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Lm(0,r,i,1,e,s)&&Em(0,o,a,1,s[0])}}}const Um=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Hp,this.ondestroy=e.ondestroy||Hp,this.onrestart=e.onrestart||Hp,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=gp(e)?e:Sm[e]||Gm(e)},e}();var qm=function(e){this.value=e},Km=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new qm(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}();const Ym=function(){function e(e){this._list=new Km,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new qm(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();var Xm={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Qm(e){return(e=Math.round(e))<0?0:e>255?255:e}function Jm(e){return e<0?0:e>1?1:e}function eg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Qm(parseFloat(t)/100*255):Qm(parseInt(t,10))}function tg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Jm(parseFloat(t)/100):Jm(parseFloat(t))}function ng(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function rg(e,t,n){return e+(t-e)*n}function og(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function ig(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var ag=new Ym(20),sg=null;function lg(e,t){sg&&ig(sg,t),sg=ag.put(e,sg||t.slice())}function ug(e,t){if(e){t=t||[];var n=ag.get(e);if(n)return ig(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Xm)return ig(t,Xm[r]),lg(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(og(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),lg(e,t),t):void og(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(og(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),lg(e,t),t):void og(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?og(t,+u[0],+u[1],+u[2],1):og(t,0,0,0,1);c=tg(u.pop());case"rgb":return u.length>=3?(og(t,eg(u[0]),eg(u[1]),eg(u[2]),3===u.length?c:tg(u[3])),lg(e,t),t):void og(t,0,0,0,1);case"hsla":return 4!==u.length?void og(t,0,0,0,1):(u[3]=tg(u[3]),cg(u,t),lg(e,t),t);case"hsl":return 3!==u.length?void og(t,0,0,0,1):(cg(u,t),lg(e,t),t);default:return}}og(t,0,0,0,1)}}function cg(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=tg(e[1]),o=tg(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return og(t=t||[],Qm(255*ng(a,i,n+1/3)),Qm(255*ng(a,i,n)),Qm(255*ng(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function dg(e,t){var n=ug(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return gg(n,4===n.length?"rgba":"rgb")}}function hg(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=Qm(rg(a[0],s[0],l)),n[1]=Qm(rg(a[1],s[1],l)),n[2]=Qm(rg(a[2],s[2],l)),n[3]=Jm(rg(a[3],s[3],l)),n}}function pg(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=ug(t[o]),s=ug(t[i]),l=r-o,u=gg([Qm(rg(a[0],s[0],l)),Qm(rg(a[1],s[1],l)),Qm(rg(a[2],s[2],l)),Jm(rg(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:i,value:r}:u}}function fg(e,t,n,r){var o,i=ug(e);if(e)return i=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;r===s?t=h-d:o===s?t=1/3+c-h:i===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(i),null!=t&&(i[0]=(o=t,(o=Math.round(o))<0?0:o>360?360:o)),null!=n&&(i[1]=tg(n)),null!=r&&(i[2]=tg(r)),gg(cg(i),"rgba")}function mg(e,t){var n=ug(e);if(n&&null!=t)return n[3]=Jm(t),gg(n,"rgba")}function gg(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function vg(e,t){var n=ug(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var yg=new Ym(100);function bg(e){if(vp(e)){var t=yg.get(e);return t||(t=dg(e,-.1),yg.put(e,t)),t}if(kp(e)){var n=rp({},e);return n.colorStops=up(e.colorStops,(function(e){return{offset:e.offset,color:dg(e.color,-.1)}})),n}return e}Zh.hasGlobalWindow&&gp(window.btoa);var xg=Array.prototype.slice;function wg(e,t,n){return(t-e)*n+e}function Sg(e,t,n,r){for(var o=t.length,i=0;ir?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;sa)r.length=a;else for(var s=i;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,i=!1,a=6,s=t;if(sp(t)){var l=function(e){return sp(e&&e[0])?2:1}(t);a=l,(1===l&&!bp(t[0])||2===l&&!bp(t[0][0]))&&(i=!0)}else if(bp(t)&&!Mp(t))a=0;else if(vp(t))if(isNaN(+t)){var u=ug(t);u&&(s=u,a=3)}else a=0;else if(kp(t)){var c=rp({},s);c.colorStops=up(t.colorStops,(function(e){return{offset:e.offset,color:ug(e.color)}})),"linear"===t.type?a=4:function(e){return"radial"===e.type}(t)&&(a=5),s=c}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=gp(n)?n:Sm[n]||Gm(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=Rg(r),l=Ig(r),u=0;u=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;nt);n++);n=p(n-1,u-2)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,m=0===f?1:p((t-r.percent)/f,1);o.easingFunc&&(m=o.easingFunc(m));var g=i?this._additiveValue:d?Dg:e[c];if(!Rg(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:o.rawValue;else if(Rg(s))1===s?Sg(g,r[a],o[a],m):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a0&&s.addKeyframe(0,Tg(l),r),this._trackKeys.push(a)}s.addKeyframe(e,Tg(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();const Eg=Ag;function Zg(){return(new Date).getTime()}var Lg=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Gp(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Zg()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,xm((function t(){e._running&&(xm(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=Zg(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Zg(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Zg()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Eg(e,t.loop);return this.addAnimator(n),n},t}(hf);const Fg=Lg;var jg,Ng,zg=Zh.domSupported,Bg=(Ng={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:jg=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:up(jg,(function(e){var t=e.replace("mouse","pointer");return Ng.hasOwnProperty(t)?t:e}))}),Vg=["mousemove","mouseup"],Hg=["pointermove","pointerup"],$g=!1;function Wg(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Gg(e){e&&(e.zrByTouch=!0)}function Ug(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var qg=function(e,t){this.stopPropagation=Hp,this.stopImmediatePropagation=Hp,this.preventDefault=Hp,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Kg={mousedown:function(e){e=If(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=If(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=If(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Ug(this,(e=If(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){$g=!0,e=If(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){$g||(e=If(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Gg(e=If(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Kg.mousemove.call(this,e),Kg.mousedown.call(this,e)},touchmove:function(e){Gg(e=If(this.dom,e)),this.handler.processGesture(e,"change"),Kg.mousemove.call(this,e)},touchend:function(e){Gg(e=If(this.dom,e)),this.handler.processGesture(e,"end"),Kg.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Kg.click.call(this,e)},pointerdown:function(e){Kg.mousedown.call(this,e)},pointermove:function(e){Wg(e)||Kg.mousemove.call(this,e)},pointerup:function(e){Kg.mouseup.call(this,e)},pointerout:function(e){Wg(e)||Kg.mouseout.call(this,e)}};lp(["click","dblclick","contextmenu"],(function(e){Kg[e]=function(t){t=If(this.dom,t),this.trigger(e,t)}}));var Yg={pointermove:function(e){Wg(e)||Yg.mousemove.call(this,e)},pointerup:function(e){Yg.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Xg(e,t){var n=t.domHandlers;Zh.pointerEventsSupported?lp(Bg.pointer,(function(r){Jg(t,r,(function(t){n[r].call(e,t)}))})):(Zh.touchEventsSupported&&lp(Bg.touch,(function(r){Jg(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),lp(Bg.mouse,(function(r){Jg(t,r,(function(o){o=Pf(o),t.touching||n[r].call(e,o)}))})))}function Qg(e,t){function n(n){Jg(t,n,(function(r){r=Pf(r),Ug(e,r.target)||(r=function(e,t){return If(e.dom,new qg(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}Zh.pointerEventsSupported?lp(Hg,n):Zh.touchEventsSupported||lp(Vg,n)}function Jg(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Rf(e.domTarget,t,n,r)}function ev(e){var t,n,r,o,i=e.mounted;for(var a in i)i.hasOwnProperty(a)&&(t=e.domTarget,n=a,r=i[a],o=e.listenerOpts[a],t.removeEventListener(n,r,o));e.mounted={}}var tv=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};const nv=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new tv(t,Kg),zg&&(r._globalHandlerScope=new tv(document,Yg)),Xg(r,r._localHandlerScope),r}return Gp(t,e),t.prototype.dispose=function(){ev(this._localHandlerScope),zg&&ev(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,zg&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Qg(this,t):ev(t)}},t}(hf);var rv=1;Zh.hasGlobalWindow&&(rv=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ov=rv,iv="#333",av="#ccc",sv=Lf,lv=5e-5;function uv(e){return e>lv||e<-5e-5}var cv=[],dv=[],hv=[1,0,0,1,0,0],pv=Math.abs,fv=function(){function e(){}var t;return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return uv(this.rotation)||uv(this.x)||uv(this.y)||uv(this.scaleX-1)||uv(this.scaleY-1)||uv(this.skewX)||uv(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):sv(n),e&&(t?jf(n,e,n):Ff(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(sv(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(cv);var n=cv[0]<0?-1:1,r=cv[1]<0?-1:1,o=((cv[0]-n)*t+n)/cv[0]||0,i=((cv[1]-r)*t+r)/cv[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],Bf(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],jf(dv,e.invTransform,t),t=dv);var n=this.originX,r=this.originY;(n||r)&&(hv[4]=n,hv[5]=r,jf(dv,t,hv),dv[4]-=n,dv[5]-=r,t=dv),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&af(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&af(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&pv(e[0]-1)>1e-10&&pv(e[3]-1)>1e-10?Math.sqrt(pv(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){!function(e,t){for(var n=0;n=0?parseFloat(e)/100*t:parseFloat(e):e}function Mv(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=kv(r[0],n.width),u+=kv(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var _v="__zr_normal__",Tv=mv.concat(["ignore"]),Pv=cp(mv,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Iv={},Rv=new Qf(0,0,0,0),Dv=function(){function e(e){this.id=Jh(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=Rv;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Iv,n,u):Mv(Iv,n,u),o.x=Iv.x,o.y=Iv.y,i=Iv.align,a=Iv.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=kv(c[0],u.width),h=kv(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+h+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var p=n.offset;p&&(o.x+=p[0],o.y+=p[1],l||(o.originX=-p[0],o.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=n.insideFill,v=n.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=n.outsideFill,v=n.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),(g=g||"#000")===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&a===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=a,t.setDefaultTextStyle(m)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?av:iv},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&ug(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,gg(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},rp(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(xp(e))for(var n=hp(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(_v,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===_v;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(ip(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}ep("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s0,p);var f=this._textContent,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),o=ip(r,e),i=ip(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,o=[],i=0;i0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var h=0;h0||o.force&&!a.length){var S,C=void 0,k=void 0,M=void 0;if(s){k={},h&&(C={});for(x=0;x=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ip(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=ip(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=o)return a;if(e>=i)return s}else{if(e>=o)return a;if(e<=i)return s}else{if(e===o)return a;if(e===i)return s}return(e-o)/l*u+a}function Wv(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return vp(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Gv(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Uv(e){return e.sort((function(e,t){return e-t})),e}function qv(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,o=n>0?n:t.length,i=t.indexOf("."),a=i<0?0:o-1-i;return Math.max(0,a-r)}(e)}function Kv(e,t){var n=Math.log,r=Math.LN10,o=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-o+i,0),20);return isFinite(a)?a:20}function Yv(e,t){var n=cp(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];for(var r=Math.pow(10,t),o=up(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),i=100*r,a=up(o,(function(e){return Math.floor(e)})),s=cp(a,(function(e,t){return e+t}),0),l=up(o,(function(e,t){return e-a[t]}));su&&(u=l[d],c=d);++a[c],l[c]=0,++s}return up(a,(function(e){return e/r}))}function Xv(e,t){var n=Math.max(qv(e),qv(t)),r=e+t;return n>20?r:Gv(r,n)}function Qv(e){var t=2*Math.PI;return(e%t+t)%t}function Jv(e){return e>-1e-4&&e=10&&t++,t}function ry(e,t){var n=ny(e),r=Math.pow(10,n),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function oy(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,r=0;r=0||o&&ip(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(i[e[a][0]]=l)}}return i}}var Hy=Vy([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),$y=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Hy(this,e,t)},e}(),Wy=new Ym(50);function Gy(e){if("string"==typeof e){var t=Wy.get(e);return t&&t.image}return e}function Uy(e,t,n,r,o){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var i=Wy.get(e),a={hostEl:n,cb:r,cbPayload:o};return i?!Ky(t=i.image)&&i.pending.push(a):((t=zh.loadImage(e,qy,qy)).__zrImageSrc=e,Wy.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function qy(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=a;l++)s-=a;var u=yv(n,t);return u>s&&(n="",u=0),s=e-u,o.ellipsis=n,o.ellipsisWidth=u,o.contentWidth=s,o.containerWidth=e,o}function Jy(e,t){var n=t.containerWidth,r=t.font,o=t.contentWidth;if(!n)return"";var i=yv(e,r);if(i<=n)return e;for(var a=0;;a++){if(i<=o||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?eb(e,o,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*o/i):0;i=yv(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function eb(e,t,n,r){for(var o=0,i=0,a=e.length;i0&&f+r.accumWidth>r.width&&(i=t.split("\n"),d=!0),r.accumWidth=f}else{var m=sb(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+p,a=m.linesWidths,i=m.lines}}else i=t.split("\n");for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!ib[e]}function sb(e,t,n,r,o){for(var i=[],a=[],s="",l="",u=0,c=0,d=0;dn:o+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),i.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),i.push(s),a.push(c),s=h,c=p)):f?(i.push(l),a.push(u),l=h,u=p):(i.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}else l&&(s+=l,c+=u),i.push(s),a.push(c),s="",l="",u=0,c=0}return i.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),a.push(c)),1===i.length&&(c+=o),{accumWidth:c,lines:i,linesWidths:a}}var lb="__zr_style_"+Math.round(10*Math.random()),ub={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},cb={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ub[lb]=!0;var db=["z","z2","invisible"],hb=["invisible"],pb=function(e){function t(t){return e.call(this,t)||this}var n;return Gp(t,e),t.prototype._init=function(t){for(var n=hp(t),r=0;r1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(Sb[0]=xb(o)*n+e,Sb[1]=bb(o)*r+t,Cb[0]=xb(i)*n+e,Cb[1]=bb(i)*r+t,u(s,Sb,Cb),c(l,Sb,Cb),(o%=wb)<0&&(o+=wb),(i%=wb)<0&&(i+=wb),o>i&&!a?i+=wb:oo&&(kb[0]=xb(p)*n+e,kb[1]=bb(p)*r+t,u(s,kb,s),c(l,kb,l))}var Db={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ob=[],Ab=[],Eb=[],Zb=[],Lb=[],Fb=[],jb=Math.min,Nb=Math.max,zb=Math.cos,Bb=Math.sin,Vb=Math.abs,Hb=Math.PI,$b=2*Hb,Wb="undefined"!=typeof Float32Array,Gb=[];function Ub(e){return Math.round(e/Hb*1e8)/1e8%2*Hb}function qb(e,t){var n=Ub(e[0]);n<0&&(n+=$b);var r=n-e[0],o=e[1];o+=r,!t&&o-n>=$b?o=n+$b:t&&n-o>=$b?o=n-$b:!t&&n>o?o=n+($b-Ub(n-o)):t&&n0&&(this._ux=Vb(n/ov/e)||0,this._uy=Vb(n/ov/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Db.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Vb(e-this._xi),r=Vb(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Db.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){return this._drawPendingPt(),this.addData(Db.C,e,t,n,r,o,i),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,i),this._xi=o,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Db.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,o,i){this._drawPendingPt(),Gb[0]=r,Gb[1]=o,qb(Gb,i),r=Gb[0];var a=(o=Gb[1])-r;return this.addData(Db.A,e,t,n,n,r,a,0,i?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,i),this._xi=zb(o)*n+e,this._yi=Bb(o)*n+t,this},e.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Db.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Db.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!Wb||(this.data=new Float32Array(t));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Eb[0]=Eb[1]=Lb[0]=Lb[1]=Number.MAX_VALUE,Zb[0]=Zb[1]=Fb[0]=Fb[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,o=0,i=0;for(e=0;en||Vb(g)>r||d===t-1)&&(f=Math.sqrt(I*I+g*g),o=m,i=b);break;case Db.C:var v=e[d++],y=e[d++],b=(m=e[d++],e[d++]),x=e[d++],w=e[d++];f=Nm(o,i,v,y,m,b,x,w,10),o=x,i=w;break;case Db.Q:f=$m(o,i,v=e[d++],y=e[d++],m=e[d++],b=e[d++],10),o=m,i=b;break;case Db.A:var S=e[d++],C=e[d++],k=e[d++],M=e[d++],_=e[d++],T=e[d++],P=T+_;d+=1,p&&(a=zb(_)*k+S,s=Bb(_)*M+C),f=Nb(k,M)*jb($b,Math.abs(T)),o=zb(P)*k+S,i=Bb(P)*M+C;break;case Db.R:a=o=e[d++],s=i=e[d++],f=2*e[d++]+2*e[d++];break;case Db.Z:var I=a-o;g=s-i;f=Math.sqrt(I*I+g*g),o=a,i=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,o,i,a,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,m=this._len,g=t<1,v=0,y=0,b=0;if(!g||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var x=0;x0&&(e.lineTo(c,d),b=0),w){case Db.M:n=o=h[x++],r=i=h[x++],e.moveTo(o,i);break;case Db.L:a=h[x++],s=h[x++];var C=Vb(a-o),k=Vb(s-i);if(C>p||k>f){if(g){if(v+(q=l[y++])>u){var M=(u-v)/q;e.lineTo(o*(1-M)+a*M,i*(1-M)+s*M);break e}v+=q}e.lineTo(a,s),o=a,i=s,b=0}else{var _=C*C+k*k;_>b&&(c=a,d=s,b=_)}break;case Db.C:var T=h[x++],P=h[x++],I=h[x++],R=h[x++],D=h[x++],O=h[x++];if(g){if(v+(q=l[y++])>u){jm(o,T,I,D,M=(u-v)/q,Ob),jm(i,P,R,O,M,Ab),e.bezierCurveTo(Ob[1],Ab[1],Ob[2],Ab[2],Ob[3],Ab[3]);break e}v+=q}e.bezierCurveTo(T,P,I,R,D,O),o=D,i=O;break;case Db.Q:T=h[x++],P=h[x++],I=h[x++],R=h[x++];if(g){if(v+(q=l[y++])>u){Hm(o,T,I,M=(u-v)/q,Ob),Hm(i,P,R,M,Ab),e.quadraticCurveTo(Ob[1],Ab[1],Ob[2],Ab[2]);break e}v+=q}e.quadraticCurveTo(T,P,I,R),o=I,i=R;break;case Db.A:var A=h[x++],E=h[x++],Z=h[x++],L=h[x++],F=h[x++],j=h[x++],N=h[x++],z=!h[x++],B=Z>L?Z:L,V=Vb(Z-L)>.001,H=F+j,$=!1;if(g)v+(q=l[y++])>u&&(H=F+j*(u-v)/q,$=!0),v+=q;if(V&&e.ellipse?e.ellipse(A,E,Z,L,N,F,H,z):e.arc(A,E,B,F,H,z),$)break e;S&&(n=zb(F)*Z+A,r=Bb(F)*L+E),o=zb(H)*Z+A,i=Bb(H)*L+E;break;case Db.R:n=o=h[x],r=i=h[x+1],a=h[x++],s=h[x++];var W=h[x++],G=h[x++];if(g){if(v+(q=l[y++])>u){var U=u-v;e.moveTo(a,s),e.lineTo(a+jb(U,W),s),(U-=W)>0&&e.lineTo(a+W,s+jb(U,G)),(U-=G)>0&&e.lineTo(a+Nb(W-U,0),s+G),(U-=W)>0&&e.lineTo(a,s+Nb(G-U,0));break e}v+=q}e.rect(a,s,W,G);break;case Db.Z:if(g){var q;if(v+(q=l[y++])>u){M=(u-v)/q;e.lineTo(o*(1-M)+n*M,i*(1-M)+r*M);break e}v+=q}e.closePath(),o=n,i=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Db,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();const Yb=Kb;function Xb(e,t,n,r,o,i,a){if(0===o)return!1;var s=o,l=0;if(a>t+s&&a>r+s||ae+s&&i>n+s||it+d&&c>r+d&&c>i+d&&c>s+d||ce+d&&u>n+d&&u>o+d&&u>a+d||u=0&&ft+u&&l>r+u&&l>i+u||le+u&&s>n+u&&s>o+u||s=0&&gn||c+uo&&(o+=nx);var h=Math.atan2(l,s);return h<0&&(h+=nx),h>=r&&h<=o||h+nx>=r&&h+nx<=o}function ox(e,t,n,r,o,i){if(i>t&&i>r||io?s:0}var ix=Yb.CMD,ax=2*Math.PI;var sx=[-1,-1,-1],lx=[-1,-1];function ux(e,t,n,r,o,i,a,s,l,u){if(u>t&&u>r&&u>i&&u>s||u1&&(c=void 0,c=lx[0],lx[0]=lx[1],lx[1]=c),f=Em(t,r,i,s,lx[0]),p>1&&(m=Em(t,r,i,s,lx[1]))),2===p?vt&&s>r&&s>i||s=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*i*s;if(Om(u))(c=-a/(2*i))>=0&&c<=1&&(o[l++]=c);else if(u>0){var c,d=km(u),h=(-a-d)/(2*i);(c=(-a+d)/(2*i))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}(t,r,i,s,sx);if(0===l)return 0;var u=Vm(t,r,i);if(u>=0&&u<=1){for(var c=0,d=zm(t,r,i,u),h=0;hn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);sx[0]=-l,sx[1]=l;var u=Math.abs(r-o);if(u<1e-4)return 0;if(u>=ax-1e-4){r=0,o=ax;var c=i?1:-1;return a>=sx[0]+e&&a<=sx[1]+e?c:0}if(r>o){var d=r;r=o,o=d}r<0&&(r+=ax,o+=ax);for(var h=0,p=0;p<2;p++){var f=sx[p];if(f+e>a){var m=Math.atan2(s,f);c=i?1:-1;m<0&&(m=ax+m),(m>=r&&m<=o||m+ax>=r&&m+ax<=o)&&(m>Math.PI/2&&m<1.5*Math.PI&&(c=-c),h+=c)}}return h}function hx(e,t,n,r,o){for(var i,a,s=e.data,l=e.len(),u=0,c=0,d=0,h=0,p=0,f=0;f1&&(n||(u+=ox(c,d,h,p,r,o))),g&&(h=c=s[f],p=d=s[f+1]),m){case ix.M:c=h=s[f++],d=p=s[f++];break;case ix.L:if(n){if(Xb(c,d,s[f],s[f+1],t,r,o))return!0}else u+=ox(c,d,s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ix.C:if(n){if(Qb(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=ux(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ix.Q:if(n){if(Jb(c,d,s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=cx(c,d,s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ix.A:var v=s[f++],y=s[f++],b=s[f++],x=s[f++],w=s[f++],S=s[f++];f+=1;var C=!!(1-s[f++]);i=Math.cos(w)*b+v,a=Math.sin(w)*x+y,g?(h=i,p=a):u+=ox(c,d,i,a,r,o);var k=(r-v)*x/b+v;if(n){if(rx(v,y,x,w,w+S,C,t,k,o))return!0}else u+=dx(v,y,x,w,w+S,C,k,o);c=Math.cos(w+S)*b+v,d=Math.sin(w+S)*x+y;break;case ix.R:if(h=c=s[f++],p=d=s[f++],i=h+s[f++],a=p+s[f++],n){if(Xb(h,p,i,p,t,r,o)||Xb(i,p,i,a,t,r,o)||Xb(i,a,h,a,t,r,o)||Xb(h,a,h,p,t,r,o))return!0}else u+=ox(i,p,i,a,r,o),u+=ox(h,a,h,p,r,o);break;case ix.Z:if(n){if(Xb(c,d,h,p,t,r,o))return!0}else u+=ox(c,d,h,p,r,o);c=h,d=p}}return n||function(e,t){return Math.abs(e-t)<1e-4}(d,p)||(u+=ox(c,d,h,p,r,o)||0),0!==u}var px=op({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ub),fx={style:op({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},cb.style)},mx=mv.concat(["invisible","culling","z","z2","zlevel","parent"]);const gx=function(e){function t(t){return e.call(this,t)||this}var n;return Gp(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(e){n.buildPath(e,n.shape)}),o.silent=!0;var i=o.style;for(var a in r)i[a]!==r[a]&&(i[a]=r[a]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s.5?iv:t>.2?"#eee":av}if(e)return av}return iv},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(vp(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===vg(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Yb(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||4&this.__dirty)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){i.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(i.width+=s/a,i.height+=s/a,i.x-=s/a/2,i.y-=s/a/2)}return i}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var i=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return hx(e,t,!0,n,r)}(i,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return hx(e,0,!1,t,n)}(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:rp(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return zp(px,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=rp({},this.shape))},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.shape?i?o?s=n.shape:(s=rp({},r.shape),rp(s,n.shape)):(s=rp({},o?this.shape:r.shape),rp(s,n.shape)):l&&(s=r.shape),s)if(i){this.shape=rp({},this.shape);for(var u={},c=hp(s),d=0;d0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return zp(vx,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=xv(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(gb);yx.prototype.type="tspan";const bx=yx;var xx=op({x:0,y:0},ub),Sx={style:op({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},cb.style)};var Cx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gp(t,e),t.prototype.createStyle=function(e){return zp(xx,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,o=(r=t.image)&&"string"!=typeof r&&r.width&&r.height?t.image:this.__image;if(!o)return 0;var i="width"===e?"height":"width",a=t[i];return null==a?o[e]:o[e]/o[i]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Sx},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Qf(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(gb);Cx.prototype.type="image";const kx=Cx;var Mx=Math.round;function _x(e,t,n){if(t){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;e.x1=r,e.x2=o,e.y1=i,e.y2=a;var s=n&&n.lineWidth;return s?(Mx(2*r)===Mx(2*o)&&(e.x1=e.x2=Px(r,s,!0)),Mx(2*i)===Mx(2*a)&&(e.y1=e.y2=Px(i,s,!0)),e):e}}function Tx(e,t,n){if(t){var r=t.x,o=t.y,i=t.width,a=t.height;e.x=r,e.y=o,e.width=i,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Px(r,s,!0),e.y=Px(o,s,!0),e.width=Math.max(Px(r+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(Px(o+a,s,!1)-e.y,0===a?0:1),e):e}}function Px(e,t,n){if(!t)return e;var r=Mx(2*e);return(r+Mx(t))%2==0?r/2:(r+(n?1:-1))/2}var Ix=function(){this.x=0,this.y=0,this.width=0,this.height=0},Rx={},Dx=function(e){function t(t){return e.call(this,t)||this}return Gp(t,e),t.prototype.getDefaultShape=function(){return new Ix},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=Tx(Rx,t,this.style);n=a.x,r=a.y,o=a.width,i=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,o=t.width,i=t.height;t.r?function(e,t){var n,r,o,i,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=o=i=d:d instanceof Array?1===d.length?n=r=o=i=d[0]:2===d.length?(n=o=d[0],r=i=d[1]):3===d.length?(n=d[0],r=i=d[1],o=d[2]):(n=d[0],r=d[1],o=d[2],i=d[3]):n=r=o=i=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),o+i>u&&(o*=u/(a=o+i),i*=u/a),r+o>c&&(r*=c/(a=r+o),o*=c/a),n+i>c&&(n*=c/(a=n+i),i*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-o),0!==o&&e.arc(s+u-o,l+c-o,o,0,Math.PI/2),e.lineTo(s+i,l+c),0!==i&&e.arc(s+i,l+c-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,o,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(gx);Dx.prototype.type="rect";const Ox=Dx;var Ax={fill:"#000"},Ex={style:op({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},cb.style)},Zx=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ax,n.attr(t),n}return Gp(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;tp&&c){var f=Math.floor(p/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var m=Qy(d,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g0,M=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),_=r.calculatedLineHeight,T=0;Tl&&ob(n,e.substring(l,u),t,s),ob(n,r[2],t,s,r[1]),l=Yy.lastIndex}li){w>0?(y.tokens=y.tokens.slice(0,w),g(y,x,b),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var T=S.width,P=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))O.percentWidth=T,c.push(O),O.contentWidth=yv(O.text,M);else{if(P){var I=S.backgroundColor,R=I&&I.image;R&&Ky(R=Gy(R))&&(O.width=Math.max(O.width,R.width*_/R.height))}var D=f&&null!=o?o-x:null;null!=D&&D=0&&"right"===(T=b[_]).align;)this._placeToken(T,e,w,f,M,"right",g),S-=T.width,M-=T.width,_--;for(k+=(n-(k-p)-(m-M)-S)/2;C<=_;)T=b[C],this._placeToken(T,e,w,f,k+T.width/2,"center",g),k+=T.width,C++;f+=w}},t.prototype._placeToken=function(e,t,n,r,o,i,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&Gx(s)&&this._renderBackground(s,t,"right"===i?o-e.width:"center"===i?o-e.width/2:o,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(o=$x(o,i,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(bx),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,m=!1,g=0,v=Hx("fill"in s?s.fill:"fill"in t?t.fill:(m=!0,f.fill)),y=Vx("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!m?null:(g=2,f.stroke)),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=o,p.y=u,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=i,p.textBaseline="middle",p.font=e.font||Lh,p.opacity=Pp(s.opacity,t.opacity,1),zx(p,s),y&&(p.lineWidth=Pp(s.lineWidth,t.lineWidth,g),p.lineDash=Tp(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var x=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new Qf(wv(p.x,x,p.textAlign),Sv(p.y,w,p.textBaseline),x,w))},t.prototype._renderBackground=function(e,t,n,r,o,i){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,m=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(Ox)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=o,g.height=i,g.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Tp(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(kx)).onload=function(){m.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=o,v.height=i}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Tp(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Pp(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return function(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}(e)&&(t=[e.fontStyle,e.fontWeight,Nx(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Op(t)||e.textFont||e.font},t}(gb),Lx={left:!0,right:1,center:1},Fx={top:1,bottom:1,middle:1},jx=["fontStyle","fontWeight","fontSize","fontFamily"];function Nx(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function zx(e,t){for(var n=0;n=0,i=!1;if(e instanceof gx){var a=Qx(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(sw(s)||sw(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(i=!0,r=rp({},r),(u=rp({},u)).fill=s):!sw(u.fill)&&sw(s)?(i=!0,r=rp({},r),(u=rp({},u)).fill=bg(s)):!sw(u.stroke)&&sw(l)&&(i||(r=rp({},r),u=rp({},u)),u.stroke=bg(l)),r.style=u}}if(r&&null==r.z2){i||(r=rp({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=ip(e.currentStates,t)>=0,o=e.style.opacity,i=r?null:function(e,t,n,r){for(var o=e.style,i={},a=0;a0){var i={dataIndex:o,seriesIndex:e.seriesIndex};null!=r&&(i.dataType=r),t.push(i)}}))})),t}function Zw(e,t,n){zw(e,!0),gw(e,bw),function(e,t,n){var r=qx(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function Lw(e,t,n,r){r?function(e){zw(e,!1)}(e):Zw(e,t,n)}var Fw=["emphasis","blur","select"],jw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Nw(e,t,n,r){n=n||"itemStyle";for(var o=0;o0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:i,force:!!i||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),i&&i()}function Uw(e,t,n,r,o,i){Gw("update",e,t,n,r,o,i)}function qw(e,t,n,r,o,i){Gw("enter",e,t,n,r,o,i)}function Kw(e){if(!e.__zr)return!0;for(var t=0;t-1?RS:OS;function LS(e,t){e=e.toUpperCase(),ES[e]=new _S(t),AS[e]=t}LS(DS,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),LS(RS,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var FS=1e3,jS=6e4,NS=36e5,zS=864e5,BS=31536e6,VS={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},HS="{yyyy}-{MM}-{dd}",$S={year:"{yyyy}",month:"{yyyy}-{MM}",day:HS,hour:HS+" "+VS.hour,minute:HS+" "+VS.minute,second:HS+" "+VS.second,millisecond:VS.none},WS=["year","month","day","hour","minute","second","millisecond"],GS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function US(e,t){return"0000".substr(0,t-(e+="").length)+e}function qS(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function KS(e){return e===qS(e)}function YS(e,t,n,r){var o=ty(e),i=o[JS(n)](),a=o[eC(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[tC(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[nC(n)](),d=(c-1)%12+1,h=o[rC(n)](),p=o[oC(n)](),f=o[iC(n)](),m=r instanceof _S?r:function(e){return ES[e]}(r||ZS)||ES[OS],g=m.getModel("time"),v=g.get("month"),y=g.get("monthAbbr"),b=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,US(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,US(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,US(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,US(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,US(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,US(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,US(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,US(f,3)).replace(/{S}/g,f+"")}function XS(e,t){var n=ty(e),r=n[eC(t)]()+1,o=n[tC(t)](),i=n[nC(t)](),a=n[rC(t)](),s=n[oC(t)](),l=0===n[iC(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===i,h=d&&1===o;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function QS(e,t,n){var r=bp(e)?ty(e):e;switch(t=t||XS(e,n)){case"year":return r[JS(n)]();case"half-year":return r[eC(n)]()>=6?1:0;case"quarter":return Math.floor((r[eC(n)]()+1)/4);case"month":return r[eC(n)]();case"day":return r[tC(n)]();case"half-day":return r[nC(n)]()/24;case"hour":return r[nC(n)]();case"minute":return r[rC(n)]();case"second":return r[oC(n)]();case"millisecond":return r[iC(n)]()}}function JS(e){return e?"getUTCFullYear":"getFullYear"}function eC(e){return e?"getUTCMonth":"getMonth"}function tC(e){return e?"getUTCDate":"getDate"}function nC(e){return e?"getUTCHours":"getHours"}function rC(e){return e?"getUTCMinutes":"getMinutes"}function oC(e){return e?"getUTCSeconds":"getSeconds"}function iC(e){return e?"getUTCMilliseconds":"getMilliseconds"}function aC(e){return e?"setUTCFullYear":"setFullYear"}function sC(e){return e?"setUTCMonth":"setMonth"}function lC(e){return e?"setUTCDate":"setDate"}function uC(e){return e?"setUTCHours":"setHours"}function cC(e){return e?"setUTCMinutes":"setMinutes"}function dC(e){return e?"setUTCSeconds":"setSeconds"}function hC(e){return e?"setUTCMilliseconds":"setMilliseconds"}function pC(e){if(isNaN(iy(e)))return vp(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function fC(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var mC=Rp;function gC(e,t,n){function r(e){return e&&Op(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var i="time"===t,a=e instanceof Date;if(i||a){var s=i?ty(e):e;if(!isNaN(+s))return YS(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return yp(e)?r(e):bp(e)&&o(e)?e+"":"-";var l=iy(e);return o(l)?pC(l):yp(e)?r(e):"boolean"==typeof e?e+"":"-"}var vC=["a","b","c","d","e","f","g"],yC=function(e,t){return"{"+e+(null==t?"":t)+"}"};function bC(e,t,n){mp(t)||(t=[t]);var r=t.length;if(!r)return"";for(var o=t[0].$vars||[],i=0;ir||l.newline?(i=0,c=m,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);(d=a+g)>o||l.newline?(i+=s+n,a=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=i,l.y=a,l.markRedraw(),"horizontal"===e?i=c+n:a=d+n)}))}var _C=MC;fp(MC,"vertical"),fp(MC,"horizontal");function TC(e,t,n){n=mC(n||0);var r=t.width,o=t.height,i=Wv(e.left,r),a=Wv(e.top,o),s=Wv(e.right,r),l=Wv(e.bottom,o),u=Wv(e.width,r),c=Wv(e.height,o),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-i),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/o?u=.8*r:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(i)&&(i=r-s-u-h),isNaN(a)&&(a=o-l-c-d),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-h}switch(e.top||e.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}i=i||0,a=a||0,isNaN(u)&&(u=r-h-i-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new Qf(i+n[3],a+n[0],u,c);return f.margin=n,f}function PC(e,t,n,r,o,i){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((i=i||e).x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new Qf(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=TC(op({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(i.x=h,i.y=p):(i.x+=h,i.y+=p),i===e&&e.markRedraw(),!0}function IC(e){var t=e.layoutMode||e.constructor.layoutMode;return xp(t)?t:t?{type:t}:null}function RC(e,t,n){var r=n&&n.ignoreSize;!mp(r)&&(r=[r,r]);var o=a(kC[0],0),i=a(kC[1],1);function a(n,o){var i={},a=0,u={},c=0;if(SC(n,(function(t){u[t]=e[t]})),SC(n,(function(e){s(t,e)&&(i[e]=u[e]=t[e]),l(i,e)&&a++,l(u,e)&&c++})),r[o])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return i;for(var d=0;d=0;a--)i=np(i,n[a],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Ry(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(_S);Fy(AC,_S),By(AC),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Zy(e);t[r.main]=n},e.determineSubType=function(n,r){var o=r.type;if(!o){var i=Zy(n).main;e.hasSubTypes(n)&&t[i]&&(o=t[i](r))}return o}}(AC),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,o,i){if(e.length){var a=function(e){var r={},o=[];return lp(e,(function(i){var a=n(r,i),s=function(e,t){var n=[];return lp(e,(function(e){ip(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(i),e);a.entryCount=s.length,0===a.entryCount&&o.push(i),lp(s,(function(e){ip(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);ip(t.successor,e)<0&&t.successor.push(i)}))})),{graph:r,noEntryList:o}}(r),s=a.graph,l=a.noEntryList,u={};for(lp(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(o.call(i,c,d.originalDeps.slice()),delete u[c]),lp(d.successor,h?f:p)}lp(u,(function(){throw new Error("")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(AC,(function(e){var t=[];lp(AC.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=up(t,(function(e){return Zy(e).main})),"dataset"!==e&&ip(t,"dataset")<=0&&t.unshift("dataset");return t}));const EC=AC;var ZC="";"undefined"!=typeof navigator&&(ZC=navigator.platform||"");var LC="rgba(0, 0, 0, 0.2)";const FC={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:LC,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:LC,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:LC,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:LC,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:LC,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:LC,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ZC.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var jC=Np(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),NC="original",zC="arrayRows",BC="objectRows",VC="keyedColumns",HC="typedArray",$C="unknown",WC="column",GC="row",UC=1,qC=2,KC=3,YC=ky();function XC(e,t,n){var r={},o=JC(t);if(!o||!e)return r;var i,a,s=[],l=[],u=t.ecModel,c=YC(u).datasetMap,d=o.uid+"_"+n.seriesLayoutBy;lp(e=e.slice(),(function(t,n){var o=xp(t)?t:e[n]={name:t};"ordinal"===o.type&&null==i&&(i=n,a=f(o)),r[o.name]=[]}));var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var uk="\0_ec_inner";var ck=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.init=function(e,t,n,r,o,i){r=r||{},this.option=null,this._theme=new _S(r),this._locale=new _S(o),this._optionManager=i},t.prototype.setOption=function(e,t,n){var r=pk(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,pk(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var o=r.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):ik(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=r.getTimelineOption(this);i&&(n=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&lp(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,o=this._componentsCount,i=[],a=Np(),s=t&&t.replaceMergeMainTypeMap;YC(this).datasetMap=Np(),lp(e,(function(e,t){null!=e&&(EC.hasClass(t)?t&&(i.push(t),a.set(t,!0)):n[t]=null==n[t]?tp(e):np(n[t],e,!0))})),s&&s.each((function(e,t){EC.hasClass(t)&&!a.get(t)&&(i.push(t),a.set(t,!0))})),EC.topologicalTravel(i,EC.getAllClassMainTypes(),(function(t){var i=function(e,t,n){var r=nk.get(t);if(!r)return n;var o=r(e);return o?n.concat(o):n}(this,t,hy(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=vy(a,i,l);(function(e,t,n){lp(e,(function(e){var r=e.newOption;xp(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,EC),n[t]=null,r.set(t,null),o.set(t,0);var c,d=[],h=[],p=0;lp(u,(function(e,n){var r=e.existing,o=e.newOption;if(o){var i="series"===t,a=EC.getClass(t,e.keyInfo.subType,!i);if(!a)return;if("tooltip"===t){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var s=rp({componentIndex:n},e.keyInfo);rp(r=new a(o,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),h.push(r),p++):(d.push(void 0),h.push(void 0))}),this),n[t]=d,r.set(t,h),o.set(t,p),"series"===t&&rk(this)}),this),this._seriesIndices||rk(this)},t.prototype.getOption=function(){var e=tp(this.option);return lp(e,(function(t,n){if(EC.hasClass(n)){for(var r=hy(t),o=r.length,i=!1,a=o-1;a>=0;a--)r[a]&&!Sy(r[a])?i=!0:(r[a]=null,!i&&o--);r.length=o,e[n]=r}})),delete e[uk],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var o=0;o=t:"max"===n?e<=t:e===t})(r[a],e,i)||(o=!1)}})),o}const Sk=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(lp(hy(e.series),(function(e){e&&e.data&&Sp(e.data)&&Ep(e.data)})),lp(hy(e.dataset),(function(e){e&&e.source&&Sp(e.source)&&Ep(e.source)}))),e=tp(e);var r=this._optionBackup,o=function(e,t,n){var r,o,i=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((d||c)&&(e.options=e.media=null),o=e);c&&mp(u)&&lp(u,(function(e){e&&e.option&&(e.query?i.push(e):r||(r=e))}));function h(e){lp(t,(function(t){t(e,n)}))}return h(o),lp(l,(function(e){return h(e)})),lp(i,(function(e){return h(e.option)})),{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}(e,t,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],tp(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=tp(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),o=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!i.length&&!a)return l;for(var u=0,c=i.length;u=0;m--){var g=e[m];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,d)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=Xv(p,v),f=v;break}}}return r[0]=p,r[1]=f,r}))}))}var $k,Wk,Gk,Uk,qk,Kk=function(e){this.data=e.data||(e.sourceFormat===VC?{}:[]),this.sourceFormat=e.sourceFormat||$C,this.seriesLayoutBy=e.seriesLayoutBy||WC,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return fM(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function vM(e){var t,n;return xp(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function yM(e){return new bM(e)}var bM=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||h1&&r>0?s:a}};return i;function a(){return t=e?null:it},gte:function(e,t){return e>=t}},MM=(function(){function e(e,t){if(!bp(t)){0,SM("")}this._opFn=kM[e],this._rvalFloat=iy(t)}e.prototype.evaluate=function(e){return bp(e)?this._opFn(e,this._rvalFloat):this._opFn(iy(e),this._rvalFloat)}}(),function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=bp(e)?e:iy(e),r=bp(t)?t:iy(t),o=isNaN(n),i=isNaN(r);if(o&&(n=this._incomparable),i&&(r=this._incomparable),o&&i){var a=vp(e),s=vp(t);a&&(n=s?e:0),s&&(r=a?t:0)}return nr?-this._resultLT:0},e}());!function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=iy(t)}e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=iy(e)===this._rvalFloat)}return this._isEQ?t:!t}}();var _M=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return CM(e,t)},e}();function TM(e){if(!AM(e.sourceFormat)){0,SM("")}return e.data}function PM(e){var t=e.sourceFormat,n=e.data;if(!AM(t)){0,SM("")}if(t===zC){for(var r=[],o=0,i=n.length;o65535?LM:FM}function VM(e,t,n,r,o){var i=zM[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new i(r),u=0;um[1]&&(m[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,i=this._dimensions,a=i.length,s=this._rawExtent,l=up(i,(function(e){return e.property})),u=0;ug[1]&&(g[1]=m)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return i;o=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var i=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(i=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var o=0;o=u&&b<=c||isNaN(b))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[r[0]];var g=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(m=0;m=u&&b<=c||isNaN(b))&&(x>=v&&x<=y||isNaN(x))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(m=0;m=u&&b<=c||isNaN(b))&&(a[s++]=w)}else for(m=0;me[k][1])&&(S=!1)}S&&(a[s++]=t.getRawIndex(m))}return sg[1]&&(g[1]=m)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,o,i=this.clone([e],!0),a=i._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(BM(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;hn&&(n=r,o=M)}k>0&&ku-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=g),d[h++]=v}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,i=this.count();oa&&(a=l)}return r=[i,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,o=0;o=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return CM(e[r],this._dimensions[r])}EM={arrayRows:e,objectRows:function(e,t,n,r){return CM(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var o=e&&(null==e.value?e:e.value);return CM(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}();const $M=HM;var WM=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(UM(n)){var i=n,a=void 0,s=void 0,l=void 0;if(o){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Sp(a=i.get("data",!0))?HC:NC,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Tp(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Tp(c.sourceHeader,d.sourceHeader),f=Tp(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[Xk(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var m=n;if(o){var g=this._applyTransform(r);e=g.sourceList,t=g.upstreamSignList}else{e=[Xk(m.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&qM("")}var i,a=[],s=[];return lp(e,(function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||qM(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t){var n=hy(e),r=n.length;r||SM("");for(var o=0,i=r;o1||n>0&&!e.noHeader;return lp(e.blocks,(function(e){var n=n_(e);n>=t&&(t=n+ +(r&&(!n||e_(e)&&!e.noHeader)))})),t}return 0}function r_(e,t,n,r){var o,i=t.noHeader,a=(o=n_(t),{html:XM[o],richText:QM[o]}),s=[],l=t.blocks||[];Dp(!l||mp(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Vp(c,u)){var d=new MM(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}lp(l,(function(n,o){var i=t.valueFormatter,l=t_(n)(i?rp(rp({},e),{valueFormatter:i}):e,n,o>0?a.html:0,r);null!=l&&s.push(l)}));var h="richText"===e.renderMode?s.join(a.richText):a_(s.join(""),i?n:a.html);if(i)return h;var p=gC(t.header,"ordinal",e.useUTC),f=YM(r,e.renderMode).nameStyle;return"richText"===e.renderMode?s_(e,p,f)+a.richText+h:a_('
    '+Sf(p)+"
    "+h,n)}function o_(e,t,n,r){var o=e.renderMode,i=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return up(e=mp(e)?e:[e],(function(e,t){return gC(e,mp(p)?p[t]:p,u)}))};if(!i||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",o),h=i?"":gC(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),m=!s||!i,g=!s&&i,v=YM(r,o),y=v.nameStyle,b=v.valueStyle;return"richText"===o?(s?"":d)+(i?"":s_(e,h,y))+(a?"":function(e,t,n,r,o){var i=[o],a=r?10:20;return n&&i.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(mp(t)?t.join(" "):t,i)}(e,f,m,g,b)):a_((s?"":d)+(i?"":function(e,t,n){return''+Sf(e)+""}(h,!s,y))+(a?"":function(e,t,n,r){var o=n?"10px":"20px",i=t?"float:right;margin-left:"+o:"";return e=mp(e)?e:[e],''+up(e,(function(e){return Sf(e)})).join("  ")+""}(f,m,g,b)),n)}}function i_(e,t,n,r,o,i){if(e)return t_(e)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,i)}function a_(e,t){return'
    '+e+'
    '}function s_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function l_(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var u_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=ay()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,o=function(e,t){var n=vp(e)?{color:e,extraCssText:t}:e||{},r=n.color,o=n.type;t=n.extraCssText;var i=n.renderMode||"html";return r?"html"===i?"subItem"===o?'':'':{renderMode:i,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return vp(o)?o:(this.richTextStyles[r]=o.style,o.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};mp(t)?lp(t,(function(e){return rp(n,e)})):rp(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function c_(e){var t,n,r,o,i=e.series,a=e.dataIndex,s=e.multipleSeries,l=i.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=i.getRawValue(a),h=mp(d),p=function(e,t){return xC(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(i,a);if(c>1||h&&!c){var f=function(e,t,n,r,o){var i=t.getData(),a=cp(e,(function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(JM("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?lp(r,(function(e){c(fM(i,n,e),e)})):lp(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,i,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,o=f.inlineValues[0]}else if(c){var m=l.getDimensionInfo(u[0]);o=t=fM(l,a,u[0]),n=m.type}else o=t=h?d[0]:d;var g=wy(i),v=g&&i.name||"",y=l.getName(a),b=s?v:y;return JM("section",{header:v,noHeader:s||!g,sortParam:o,blocks:[JM("nameValue",{markerType:"item",markerColor:p,name:b,noName:!Op(b),value:t,valueType:n,dataIndex:a})].concat(r||[])})}var d_=ky();function h_(e,t){return e.getName(t)||e.getId(t)}var p_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Oh(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=yM({count:m_,reset:g_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(d_(this).sourceManager=new WM(this)).prepareSource();var r=this.getInitialData(e,n);y_(r,this),this.dataTask.context.data=r,d_(this).dataBeforeProcessed=r,f_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=IC(this),r=n?DC(e):{},o=this.subType;EC.hasClass(o)&&(o+="Series"),np(e,t.getTheme().get(this.subType)),np(e,this.getDefaultOption()),py(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&RC(e,r,n)},t.prototype.mergeOption=function(e,t){e=np(this.option,e,!0),this.fillDataTextStyle(e.data);var n=IC(this);n&&RC(this.option,e,n);var r=d_(this).sourceManager;r.dirty(),r.prepareSource();var o=this.getInitialData(e,t);y_(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,d_(this).dataBeforeProcessed=o,f_(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Sp(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,o=sk.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=r.getColorFromPalette(e,t,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,o=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i=0&&n.push(o)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[h_(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,o=this.option,i=o.selectedMode,a=t.length;if(i&&a)if("series"===i)o.selectedMap="all";else if("multiple"===i){xp(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l0&&this._innerSelect(e,t)}},t.registerClass=function(e){return EC.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(EC);function f_(e){var t=e.name;wy(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return lp(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function m_(e){return e.model.getRawData().count()}function g_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),v_}function v_(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function y_(e,t){lp(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r1&&(a*=I_(f),s*=I_(f));var m=(o===i?-1:1)*I_((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,g=m*a*p/s,v=m*-s*h/a,y=(e+n)/2+D_(d)*g-R_(d)*v,b=(t+r)/2+R_(d)*g+D_(d)*v,x=Z_([1,0],[(h-g)/a,(p-v)/s]),w=[(h-g)/a,(p-v)/s],S=[(-1*h-g)/a,(-1*p-v)/s],C=Z_(w,S);if(E_(w,S)<=-1&&(C=O_),E_(w,S)>=1&&(C=0),C<0){var k=Math.round(C/O_*1e6)/1e6;C=2*O_+k%2*O_}c.addData(u,y,b,a,s,x,C,d,i)}var F_=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,j_=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var N_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gp(t,e),t.prototype.applyTransform=function(e){},t}(gx);function z_(e){return null!=e.setData}function B_(e,t){var n=function(e){var t=new Yb;if(!e)return t;var n,r=0,o=0,i=r,a=o,s=Yb.CMD,l=e.match(F_);if(!l)return t;for(var u=0;uR*R+D*D&&(k=_,M=T),{cx:k,cy:M,x0:-c,y0:-d,x1:k*(o/w-1),y1:M*(o/w-1)}}function aT(e,t){var n,r=nT(t.r,0),o=nT(t.r0||0,0),i=r>0;if(i||o>0){if(i||(r=o,o=0),o>r){var a=r;r=o,o=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=eT(l-s),p=h>K_&&h%K_;if(p>oT&&(h=p),r>oT)if(h>K_-oT)e.moveTo(u+r*X_(s),c+r*Y_(s)),e.arc(u,c,r,s,l,!d),o>oT&&(e.moveTo(u+o*X_(l),c+o*Y_(l)),e.arc(u,c,o,l,s,d));else{var f=void 0,m=void 0,g=void 0,v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,S=void 0,C=void 0,k=void 0,M=void 0,_=void 0,T=void 0,P=void 0,I=void 0,R=r*X_(s),D=r*Y_(s),O=o*X_(l),A=o*Y_(l),E=h>oT;if(E){var Z=t.cornerRadius;Z&&(f=(n=function(e){var t;if(mp(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(Z))[0],m=n[1],g=n[2],v=n[3]);var L=eT(r-o)/2;if(y=rT(L,g),b=rT(L,v),x=rT(L,f),w=rT(L,m),k=S=nT(y,b),M=C=nT(x,w),(S>oT||C>oT)&&(_=r*X_(l),T=r*Y_(l),P=o*X_(s),I=o*Y_(s),hoT){var $=rT(g,k),W=rT(v,k),G=iT(P,I,R,D,r,$,d),U=iT(_,T,O,A,r,W,d);e.moveTo(u+G.cx+G.x0,c+G.cy+G.y0),k0&&e.arc(u+G.cx,c+G.cy,$,J_(G.y0,G.x0),J_(G.y1,G.x1),!d),e.arc(u,c,r,J_(G.cy+G.y1,G.cx+G.x1),J_(U.cy+U.y1,U.cx+U.x1),!d),W>0&&e.arc(u+U.cx,c+U.cy,W,J_(U.y1,U.x1),J_(U.y0,U.x0),!d))}else e.moveTo(u+R,c+D),e.arc(u,c,r,s,l,!d);else e.moveTo(u+R,c+D);if(o>oT&&E)if(M>oT){$=rT(f,M),G=iT(O,A,_,T,o,-(W=rT(m,M)),d),U=iT(R,D,P,I,o,-$,d);e.lineTo(u+G.cx+G.x0,c+G.cy+G.y0),M0&&e.arc(u+G.cx,c+G.cy,W,J_(G.y0,G.x0),J_(G.y1,G.x1),!d),e.arc(u,c,o,J_(G.cy+G.y1,G.cx+G.x1),J_(U.cy+U.y1,U.cx+U.x1),d),$>0&&e.arc(u+U.cx,c+U.cy,$,J_(U.y1,U.x1),J_(U.y0,U.x0),!d))}else e.lineTo(u+O,c+A),e.arc(u,c,o,l,s,d);else e.lineTo(u+O,c+A)}else e.moveTo(u,c);e.closePath()}}}var sT=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},lT=function(e){function t(t){return e.call(this,t)||this}return Gp(t,e),t.prototype.getDefaultShape=function(){return new sT},t.prototype.buildPath=function(e,t){aT(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(gx);lT.prototype.type="sector";const uT=lT;var cT=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},dT=function(e){function t(t){return e.call(this,t)||this}return Gp(t,e),t.prototype.getDefaultShape=function(){return new cT},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,o,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,o,!0)},t}(gx);dT.prototype.type="ring";const hT=dT;function pT(e,t,n){var r=t.smooth,o=t.points;if(o&&o.length>=2){if(r){var i=function(e,t,n,r){var o,i,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;hjT[1]){if(a=!1,o)return a;var u=Math.abs(jT[0]-FT[1]),c=Math.abs(FT[0]-jT[1]);Math.min(u,c)>r.len()&&(uMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function cP(e){return!e.isGroup}function dP(e,t,n){if(e&&t){var r,o=(r={},e.traverse((function(e){cP(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(cP(e)&&e.anid){var t=o[e.anid];if(t){var r=i(e);e.attr(i(t)),Uw(e,r,n,qx(e).dataIndex)}}}))}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=rp({},e.shape)),t}}function hP(e,t){return up(e,(function(e){var n=e[0];n=WT(n,t.x),n=GT(n,t.x+t.width);var r=e[1];return r=WT(r,t.y),[n,r=GT(r,t.y+t.height)]}))}function pP(e,t){var n=WT(e.x,t.x),r=GT(e.x+e.width,t.x+t.width),o=WT(e.y,t.y),i=GT(e.y+e.height,t.y+t.height);if(r>=n&&i>=o)return{x:n,y:o,width:r-n,height:i-o}}function fP(e,t,n){var r=rp({rectHover:!0},t),o=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),op(o,n),new kx(r)):JT(e.replace("path://",""),r,n,"center")}function mP(e,t,n,r,o){for(var i=0,a=o[o.length-1];i=-1e-6)return!1;var f=e-o,m=t-i,g=vP(f,m,u,c)/p;if(g<0||g>1)return!1;var v=vP(f,m,d,h)/p;return!(v<0||v>1)}function vP(e,t,n,r){return e*r-n*t}function yP(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,o=vp(t)?{formatter:t}:t,i=n.mainType,a=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=a;var l=e.formatterParamsExtra;l&&lp(hp(l),(function(e){Vp(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=qx(e.el);u.componentMainType=i,u.componentIndex=a,u.tooltipConfig={name:r,option:op({content:r,formatterParams:s},o)}}function bP(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function xP(e,t){if(e)if(mp(e))for(var n=0;n=0?d():c=setTimeout(d,-o),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function EP(e,t,n,r){var o=e[t];if(o){var i=o[RP]||o,a=o[OP];if(o[DP]!==n||a!==r){if(null==n||!r)return e[t]=i;(o=e[t]=AP(i,n,"debounce"===r))[RP]=i,o[OP]=r,o[DP]=n}return o}}function ZP(e,t){var n=e[t];n&&n[RP]&&(n.clear&&n.clear(),e[t]=n[RP])}var LP=ky(),FP={itemStyle:Vy(SS,!0),lineStyle:Vy(bS,!0)},jP={lineStyle:"stroke",itemStyle:"fill"};function NP(e,t){var n=e.visualStyleMapper||FP[t];return n||(console.warn("Unknown style type '"+t+"'."),FP.itemStyle)}function zP(e,t){var n=e.visualDrawType||jP[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var BP={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=e.getModel(r),i=NP(e,r)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=zP(e,r),l=i[s],u=gp(l)?l:null,c="auto"===i.fill||"auto"===i.stroke;if(!i[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());i[s]||(i[s]=d,n.setVisual("colorFromPalette",!0)),i.fill="auto"===i.fill||gp(i.fill)?d:i.fill,i.stroke="auto"===i.stroke||gp(i.stroke)?d:i.stroke}if(n.setVisual("style",i),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),o=rp({},i);o[s]=u(r),t.setItemVisual(n,"style",o)}}}},VP=new _S,HP={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=NP(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){VP.option=n[r];var a=o(VP);rp(e.ensureUniqueItemVisual(t,"style"),a),VP.option.decal&&(e.setItemVisual(t,"decal",VP.option.decal),VP.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},$P={performRawSeries:!0,overallReset:function(e){var t=Np();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,o=t.get(r);o||(o={},t.set(r,o)),LP(e).scope=o}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},o=t.getData(),i=LP(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=zP(t,a);o.each((function(e){var t=o.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,i,c)}}))}}))}},WP=Math.PI;var GP=function(){function e(e,t,n,r){this._stageTaskMap=Np(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,i=r&&r.modDataCount;return{step:o,modBy:null!=i?Math.ceil(i/o):null,modDataCount:i}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,i=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:i}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Np();e.eachSeries((function(e){var r=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;lp(this._allHandlers,(function(r){var o=e.get(r.uid)||e.set(r.uid,{});Dp(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,i=o.context;i.model=t,i.ecModel=n,i.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var o=!1,i=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}lp(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),i.updatePayload(c,n);var p=i.getPerformArgs(c,r.block);h.each((function(e){e.perform(p)})),c.perform(p)&&(o=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=i.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(u)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var o=this,i=t.seriesTaskMap,a=t.seriesTaskMap=Np(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,i&&i.get(s)||yM({plan:XP,reset:QP,count:tI}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var o=this,i=t.overallTask=t.overallTask||yM({reset:UP});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var a=i.agentStubMap,s=i.agentStubMap=Np(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,yM({reset:qP,onDirty:YP})));n.context={model:e,overallProgress:c},n.agent=i,n.__block=c,o._pipe(e,n)}Dp(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,lp(n.getSeries(),h)),d&&i.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return gp(e)&&(e={overallReset:e,seriesType:nI(e)}),e.uid=PS("stageHandler"),t&&(e.visualType=t),e},e}();function UP(e){e.overallReset(e.ecModel,e.api,e.payload)}function qP(e){return e.overallProgress&&KP}function KP(){this.agent.dirty(),this.getDownstream().dirty()}function YP(){this.agent&&this.agent.dirty()}function XP(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function QP(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=hy(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?up(t,(function(e,t){return eI(t)})):JP}var JP=eI(0);function eI(e){return function(t,n){var r=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var i=t.start;i0&&c===o.length-u.length){var d=o.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,i=n.model,a=n.view;if(!i||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,i,"mainType")&&u(s,i,"subType")&&u(s,i,"index","componentIndex")&&u(s,i,"name")&&u(s,i,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,o));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),vI=["symbol","symbolSize","symbolRotate","symbolOffset"],yI=vI.concat(["symbolKeepAspect"]),bI={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},o={},i=!1,a=0;a=0&&zI(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,o=null==t.x2?1:t.x2,i=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,o=o*n.width+n.x,i=i*n.height+n.y,a=a*n.height+n.y),r=zI(r)?r:0,o=zI(o)?o:1,i=zI(i)?i:0,a=zI(a)?a:0,e.createLinearGradient(r,i,o,a)}(e,t,n),o=t.colorStops,i=0;i0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:bp(t)?[t]:mp(t)?t:null:null),i=r.lineDashOffset;if(o){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=up(o,(function(e){return e/a})),i/=a)}return[o,i]}var WI=new Yb(!0);function GI(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function UI(e){return"string"==typeof e&&"none"!==e}function qI(e){var t=e.fill;return null!=t&&"none"!==t}function KI(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function YI(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function XI(e,t,n){var r=Uy(t.image,t.__image,n);if(Ky(r)){var o=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*$p),i.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(i)}return o}}var QI=["shadowBlur","shadowOffsetX","shadowOffsetY"],JI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function eR(e,t,n,r,o){var i=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){rR(e,o),i=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?ub.opacity:a}(r||t.blend!==n.blend)&&(i||(rR(e,o),i=!0),e.globalCompositeOperation=t.blend||ub.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[bR])if(this._disposed)YR(this.id);else{var r,o,i;if(xp(t)&&(n=t.lazyUpdate,r=t.silent,o=t.replaceMerge,i=t.transition,t=t.notMerge),this[bR]=!0,!this._model||t){var a=new Sk(this._api),s=this._theme,l=this._model=new fk;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},eD);var u={seriesTransition:i,optionChanged:!0};if(n)this[xR]={silent:r,updateParams:u},this[bR]=!1,this.getZr().wakeUp();else{try{TR(this),RR.update.call(this,null,u)}catch(e){throw this[xR]=null,this[bR]=!1,e}this._ssr||this._zr.flush(),this[xR]=null,this[bR]=!1,ER.call(this,r),ZR.call(this,r)}}},t.prototype.setTheme=function(){wM()},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Zh.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Zh.svgSupported){var e=this._zr;return lp(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],o=this;lp(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return lp(r,(function(e){e.group.ignore=!1})),i}YR(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,o=Math.max,i=1/0;if(iD[n]){var a=i,s=i,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();lp(oD,(function(i,d){if(i.group===n){var h=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(tp(e)),p=i.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=o(p.right,l),u=o(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}}));var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=zh.createCanvas(),m=Vv(f,{renderer:t?"svg":"canvas"});if(m.resize({width:h,height:p}),t){var g="";return lp(c,(function(e){var t=e.left-a,n=e.top-s;g+=''+e.dom+""})),m.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Ox({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),lp(c,(function(e){var t=new kx({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}YR(this.id)},t.prototype.convertToPixel=function(e,t){return DR(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return DR(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return lp(_y(this._model,e),(function(e,r){r.indexOf("Models")>=0&&lp(e,(function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}else 0}),this)}),this),!!n;YR(this.id)},t.prototype.getVisual=function(e,t){var n=_y(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?wI(r,o,t):SI(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;lp(KR,(function(e){var t=function(t){var n,o=r.getModel(),i=t.target;if("globalout"===e?n={}:i&&kI(i,(function(e){var t=qx(e);if(t&&null!=t.dataIndex){var r=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return n=rp({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];0,n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:i,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),lp(QR,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),lp(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(CI("map","selectchanged",t,r,e),CI("pie","selectchanged",t,r,e)):"select"===e.fromAction?(CI("map","selected",t,r,e),CI("pie","selected",t,r,e)):"unselect"===e.fromAction&&(CI("map","unselected",t,r,e),CI("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?YR(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)YR(this.id);else{this._disposed=!0,this.getDom()&&Dy(this.getDom(),lD,"");var e=this,t=e._api,n=e._model;lp(e._componentsViews,(function(e){e.dispose(n,t)})),lp(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete oD[e.id]}},t.prototype.resize=function(e){if(!this[bR])if(this._disposed)YR(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[xR]&&(null==r&&(r=this[xR].silent),n=!0,this[xR]=null),this[bR]=!0;try{n&&TR(this),RR.update.call(this,{type:"resize",animation:rp({duration:0},e&&e.animation)})}catch(e){throw this[bR]=!1,e}this[bR]=!1,ER.call(this,r),ZR.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)YR(this.id);else if(xp(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),rD[e]){var n=rD[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?YR(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=rp({},e);return t.type=QR[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)YR(this.id);else if(xp(t)||(t={silent:!!t}),XR[e.type]&&this._model)if(this[bR])this._pendingActions.push(e);else{var n=t.silent;AR.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Zh.browser.weChat&&this._throttledZrFlush(),ER.call(this,n),ZR.call(this,n)}},t.prototype.updateLabelLayout=function(){fR.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)YR(this.id);else{var t=e.seriesIndex;0,this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(Kw(e))return;if(e instanceof gx&&function(e){var t=Qx(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(o){e.stateTransition=a;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&t(e)}}))}TR=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),PR(e,!0),PR(e,!1),t.plan()},PR=function(e,t){for(var n=e._model,r=e._scheduler,o=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;lt.get("hoverLayerThreshold")&&!Zh.node&&!Zh.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),fR.trigger("series:afterupdate",t,r,s)},HR=function(e){e[wR]=!0,e.getZr().wakeUp()},$R=function(e){e[wR]&&(e.getZr().storage.traverse((function(e){Kw(e)||t(e)})),e[wR]=!1)},BR=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Oh(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Sw(t,n),HR(e)},n.prototype.leaveEmphasis=function(t,n){Cw(t,n),HR(e)},n.prototype.enterBlur=function(t){kw(t),HR(e)},n.prototype.leaveBlur=function(t){Mw(t),HR(e)},n.prototype.enterSelect=function(t){_w(t),HR(e)},n.prototype.leaveSelect=function(t){Tw(t),HR(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(gk))(e)},VR=function(e){function t(e,t){for(var n=0;n=0)){gD.push(n);var i=sI.wrapStageHandler(n,o);i.__prio=t,i.__raw=n,e.push(i)}}function yD(e,t){rD[e]=t}var bD=function(e){var t=(e=tp(e)).type;t||SM("");var n=t.split(":");2!==n.length&&SM("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,DM.set(t,e)};mD(gR,BP),mD(vR,HP),mD(vR,$P),mD(gR,bI),mD(vR,xI),mD(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=cR(n,t))}));var o=r.getVisual("decal");if(o)r.getVisual("style").decal=cR(o,t)}}))})),dD(Vk),hD(900,(function(e){var t=Np();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),o=e.getData(),i={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(i)}})),t.each(Hk)})),yD("default",(function(e,t){op(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new jv,r=new Ox({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var o,i=new Ux({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ox({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new DT({shape:{startAngle:-WP/2,endAngle:-WP/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*WP/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*WP/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),fD({type:nw,event:nw,update:nw},Hp),fD({type:rw,event:rw,update:rw},Hp),fD({type:ow,event:ow,update:ow},Hp),fD({type:iw,event:iw,update:iw},Hp),fD({type:aw,event:aw,update:aw},Hp),cD("light",uI),cD("dark",mI);var xD=[],wD={registerPreprocessor:dD,registerProcessor:hD,registerPostInit:function(e){pD("afterinit",e)},registerPostUpdate:function(e){pD("afterupdate",e)},registerUpdateLifecycle:pD,registerAction:fD,registerCoordinateSystem:function(e,t){bk.register(e,t)},registerLayout:function(e,t){vD(tD,e,t,1e3,"layout")},registerVisual:mD,registerTransform:bD,registerLoading:yD,registerMap:function(e,t,n){var r=mR["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){mR[e]=t},PRIORITY:yR,ComponentModel:EC,ComponentView:C_,SeriesModel:w_,ChartView:IP,registerComponentModel:function(e){EC.registerClass(e)},registerComponentView:function(e){C_.registerClass(e)},registerSeriesModel:function(e){w_.registerClass(e)},registerChartView:function(e){IP.registerClass(e)},registerSubTypeDefaulter:function(e,t){EC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Nv[e]=n}};function SD(e){mp(e)?lp(e,(function(e){SD(e)})):ip(xD,e)>=0||(xD.push(e),gp(e)&&(e={install:e}),e.install(wD))}var CD=n(53196),kD=n.n(CD);function MD(e){return null==e?0:e.length||1}function _D(e){return e}const TD=function(){function e(e,t,n,r,o,i){this._old=e,this._new=t,this._oldKeyGetter=n||_D,this._newKeyGetter=r||_D,this.context=o,this._diffModeMultiple="multiple"===i}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var i=0;i1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,i)}else 1===l?(n[a]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],i=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var h=0;h1)for(var a=0;a30}var jD,ND,zD,BD,VD,HD,$D,WD=xp,GD=up,UD="undefined"==typeof Int32Array?Array:Int32Array,qD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],KD=["_approximateExtent"],YD=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;ED(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var o={},i=[],a={},s=!1,l={},u=0;u=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===NC&&!n.pure)for(var i=[],a=e;a0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return null==o&&(mp(o=this.getVisual(t))?o=o.slice():WD(o)&&(o=rp({},o)),r[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,WD(t)?rp(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){WD(e)?rp(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?rp(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;Kx(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){lp(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:GD(this.dimensions,this._getDimInfo,this),this.hostModel)),VD(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];gp(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ip(arguments)))})},e.internalField=(jD=function(e){var t=e._invertedIndicesMap;lp(t,(function(n,r){var o=e._dimInfos[r],i=o.ordinalMeta,a=e._store;if(i){n=t[r]=new UD(i.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[t]=s}})),e}();const XD=YD;function QD(e,t){Yk(e)||(e=Qk(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],o=Np(),i=[],a=function(e,t,n,r){var o=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return lp(t,(function(e){var t;xp(e)&&(t=e.dimsDef)&&(o=Math.max(o,t.length))})),o}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&FD(a),l=r===e.dimensionsDefine,u=l?LD(e):ZD(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=Np(c),h=new jM(a),p=0;p0&&(r.name=o+(i-1)),i++,t.set(o,i)}}(i),new AD({source:e,dimensions:i,fullDimensionCount:a,dimensionOmitted:s})}function JD(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var eO=function(e){this.coordSysDims=[],this.axisMap=Np(),this.categoryAxisMap=Np(),this.coordSysName=e};var tO={cartesian2d:function(e,t,n,r){var o=e.getReferringComponents("xAxis",Py).models[0],i=e.getReferringComponents("yAxis",Py).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",i),nO(o)&&(r.set("x",o),t.firstCategoryDimIndex=0),nO(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var o=e.getReferringComponents("singleAxis",Py).models[0];t.coordSysDims=["single"],n.set("single",o),nO(o)&&(r.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var o=e.getReferringComponents("polar",Py).models[0],i=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",a),nO(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),nO(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var o=e.ecModel,i=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=i.dimensions.slice();lp(i.parallelAxisIndex,(function(e,i){var s=o.getComponent("parallelAxis",e),l=a[i];n.set(l,s),nO(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function nO(e){return"category"===e.get("type")}function rO(e,t,n){var r,o,i,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!ED(e.schema)}(t)?(o=t.schema,r=o.dimensions,i=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(lp(r,(function(e,t){vp(e)&&(r[t]=e={name:e}),h&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,m=0;lp(r,(function(e){e.coordDim===p&&m++}));var g={name:c,coordDim:p,coordDimIndex:m,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:m+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(i&&(g.storeDimIndex=i.ensureCalculationDimension(d,f),v.storeDimIndex=i.ensureCalculationDimension(c,f)),o.appendCalculationDimension(g),o.appendCalculationDimension(v)):(r.push(g),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function oO(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function iO(e,t){return oO(e,t)?e.getCalculationInfo("stackResultDimension"):t}const aO=function(e,t,n){n=n||{};var r,o=t.getSourceManager(),i=!1;e?(i=!0,r=Qk(e)):i=(r=o.getSource()).sourceFormat===NC;var a=function(e){var t=e.get("coordinateSystem"),n=new eO(t),r=tO[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),o=bk.get(r);return t&&t.coordSysDims&&(n=up(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var o=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(o)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=gp(l)?l:l?fp(XC,s,t):null,c=QD(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i}),d=function(e,t,n){var r,o;return n&&lp(e,(function(e,i){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)})),o||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),h=i?null:o.getSharedDataStore(c),p=rO(t,{schema:c,store:h}),f=new XD(c,t);f.setCalculationInfo(p);var m=null!=d&&function(e){if(e.sourceFormat===NC){return!mp(my(function(e){var t=0;for(;t-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(w_);const lO=sO;function uO(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=fM(e,t,n[0]);return null!=o?o+"":null}if(r){for(var i=[],a=0;a0?+h:1;_.scaleX=this._sizeX*T,_.scaleY=this._sizeY*T,this.setSymbolScale(1),Lw(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),o=qx(this).dataIndex,i=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&Yw(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:i,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Yw(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return jI(e.getItemVisual(t,"symbolSize"))},t}(jv);function dO(e,t){this.parent.drift(e,t)}const hO=cO;function pO(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function fO(e){return null==e||xp(e)||(e={isIgnore:e}),e||{}}function mO(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:oS(t),cursorStyle:t.get("cursor")}}var gO=function(){function e(e){this.group=new jv,this._SymbolCtor=e||hO}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=fO(t);var n=this.group,r=e.hostModel,o=this._data,i=this._SymbolCtor,a=t.disableAnimation,s=mO(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add((function(r){var o=u(r);if(pO(e,o,r,t)){var a=new i(e,r,s,l);a.setPosition(o),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(pO(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==f)n.remove(h),(h=new i(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var g={x:p[0],y:p[1]};a?h.attr(g):Uw(h,g,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=mO(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=fO(n);for(var o=e.start;o0?n=r[0]:r[1]<0&&(n=r[1]);return n}(o,n),a=r.dim,s=o.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=up(e.dimensions,(function(e){return t.mapDimension(e)})),h=!1,p=t.getCalculationInfo("stackResultDimension");return oO(t,d[0])&&(h=!0,d[0]=p),oO(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function bO(e,t,n,r){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(o)&&(o=e.valueStart);var i=e.baseDataOffset,a=[];return a[i]=n.get(e.baseDim,r),a[1-i]=o,t.dataToPoint(a)}var xO="undefined"!=typeof Float32Array,wO=xO?Float32Array:Array;function SO(e){return mp(e)?xO?new Float32Array(e):e:new wO(e)}var CO=Math.min,kO=Math.max;function MO(e,t){return isNaN(e)||isNaN(t)}function _O(e,t,n,r,o,i,a,s,l){for(var u,c,d,h,p,f,m=n,g=0;g=o||m<0)break;if(MO(v,y)){if(l){m+=i;continue}break}if(m===n)e[i>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var b=v-u,x=y-c;if(b*b+x*x<.5){m+=i;continue}if(a>0){for(var w=m+i,S=t[2*w],C=t[2*w+1];S===v&&C===y&&g=r||MO(S,C))p=v,f=y;else{_=S-u,T=C-c;var R=v-u,D=S-v,O=y-c,A=C-y,E=void 0,Z=void 0;if("x"===s){var L=_>0?1:-1;p=v-L*(E=Math.abs(R))*a,f=y,P=v+L*(Z=Math.abs(D))*a,I=y}else if("y"===s){var F=T>0?1:-1;p=v,f=y-F*(E=Math.abs(O))*a,P=v,I=y+F*(Z=Math.abs(A))*a}else E=Math.sqrt(R*R+O*O),p=v-_*a*(1-(M=(Z=Math.sqrt(D*D+A*A))/(Z+E))),f=y-T*a*(1-M),I=y+T*a*M,P=CO(P=v+_*a*M,kO(S,v)),I=CO(I,kO(C,y)),P=kO(P,CO(S,v)),f=y-(T=(I=kO(I,CO(C,y)))-y)*E/Z,p=CO(p=v-(_=P-v)*E/Z,kO(u,v)),f=CO(f,kO(c,y)),P=v+(_=v-(p=kO(p,CO(u,v))))*Z/E,I=y+(T=y-(f=kO(f,CO(c,y))))*Z/E}e.bezierCurveTo(d,h,p,f,v,y),d=P,h=I}else e.lineTo(v,y)}u=v,c=y,m+=i}return g}var TO=function(){this.smooth=0,this.smoothConstraint=!0},PO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Oh(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new TO},t.prototype.buildPath=function(e,t){var n=t.points,r=0,o=n.length/2;if(t.connectNulls){for(;o>0&&MO(n[2*o-2],n[2*o-1]);o--);for(;r=0){var g=a?(c-r)*m+r:(u-n)*m+n;return a?[e,g]:[g,e]}n=u,r=c;break;case i.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var v=a?Lm(n,u,d,p,e,s):Lm(r,c,h,f,e,s);if(v>0)for(var y=0;y=0){g=a?Em(r,c,h,f,b):Em(n,u,d,p,b);return a?[e,g]:[g,e]}}n=p,r=f}}},t}(gx),IO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t}(TO),RO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Oh(t,e),t.prototype.getDefaultShape=function(){return new IO},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,o=0,i=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;i>0&&MO(n[2*i-2],n[2*i-1]);i--);for(;o=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){i=r[a];break}}if(i){var l=t.getAxis(o),u=up(i.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=function(e,t){var n,r,o=[],i=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:pg((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;st){r?o.push(a(r,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),r=l}}return o}(u,"x"===o?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,m=h[p-1].coord+10,g=m-f;if(g<.001)return"transparent";lp(h,(function(e){e.offset=(e.coord-f)/g})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new ZT(0,0,0,0,h,!0);return v[o]=f,v[o+"2"]=m,v}}}function zO(e,t,n){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var i=n.getAxesByScale("ordinal")[0];if(i&&(!o||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var o=t.count(),i=Math.max(1,Math.round(o/5)),a=0;ar)return!1;return!0}(i,t))){var a=t.mapDimension(i.dim),s={};return lp(i.getViewLabels(),(function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function BO(e,t){return[e[2*t],e[2*t+1]]}function VO(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);qx(p).seriesIndex=e.seriesIndex,Lw(p,R,D,O);var A=FO(e.get("smooth")),E=e.get("smoothMonotone");if(p.setShape({smooth:A,smoothMonotone:E,connectNulls:S}),f){var Z=a.getCalculationInfo("stackedOnSeries"),L=0;f.useStyle(op(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),Z&&(L=FO(Z.get("smooth"))),f.setShape({smooth:A,stackedOnSmooth:L,smoothMonotone:E,connectNulls:S}),Nw(f,e,"areaStyle"),qx(f).seriesIndex=e.seriesIndex,Lw(f,R,D,O)}var F=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=F)})),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=o,this._stackedOnPoints=x,this._points=u,this._step=_,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){qx(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var o=e.getData(),i=Cy(o,r);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(i);if(!s){var l=a[2*i],u=a[2*i+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new hO(o,i)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else IP.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var o=e.getData(),i=Cy(o,r);if(this._changePolyState("normal"),null!=i&&i>=0){var a=o.getItemGraphicEl(i);a&&(a.__temp?(o.setItemGraphicEl(i,null),this.group.remove(a)):a.downplay())}else IP.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;vw(this._polyline,e),t&&vw(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new PO({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new RO({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,o,i=t.getBaseAxis(),a=i.inverse;"cartesian2d"===t.type?(r=i.isHorizontal(),o=!1):"polar"===t.type&&(r="angle"===i.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");gp(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=gp(u)?u(null):u;e.eachItemGraphicEl((function(e,i){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var m=n,g=t.pointToCoord(d);r?(h=m.startAngle,p=m.endAngle,f=-g[1]/180*Math.PI):(h=m.r0,p=m.r,f=g[0])}else{var v=n;r?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var b=gp(u)?u(i):l*y+c,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:b}),x.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(VO(e)){var o=e.getData(),i=this._polyline,a=o.getLayout("points");if(!a)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Ux({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(rS(i,oS(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?function(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!mp(t))return t+"";for(var r=[],o=0;o=0&&r.push(t[i])}return r.join(" ")}(o,n):uO(o,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,i=r?o?"right":"left":"center",a=r?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,o,i,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=i.get("precision"),p=i.get("distance")||0,f=a.getBaseAxis(),m=f.isHorizontal(),g=f.inverse,v=t.shape,y=g?m?v.x:v.y+v.height:m?v.x+v.width:v.y,b=(m?p:0)*(g?-1:1),x=(m?0:-p)*(g?-1:1),w=m?"x":"y",S=function(e,t,n){for(var r,o,i=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||r>=t&&o<=t){l=u;break}s=u,r=o}else r=o;return{range:[s,l],t:(t-r)/(o-r)}}(u,y,w),C=S.range,k=C[1]-C[0],M=void 0;if(k>=1){if(k>1&&!d){var _=BO(u,C[0]);s.attr({x:_[0]+b,y:_[1]+x}),o&&(M=c.getRawValue(C[0]))}else{(_=l.getPointOn(y,w))&&s.attr({x:_[0]+b,y:_[1]+x});var T=c.getRawValue(C[0]),P=c.getRawValue(C[1]);o&&(M=Oy(n,h,T,P,S.t))}r.lastFrameIndex=C[0]}else{var I=1===e||r.lastFrameIndex>0?C[0]:0;_=BO(u,I);o&&(M=c.getRawValue(I)),s.attr({x:_[0]+b,y:_[1]+x})}if(o){var R=hS(s);"function"==typeof R.setLabelText&&R.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,o,i,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,o,i,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],h=[],p=[],f=[],m=yO(o,t,a),g=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y3e3||l&&LO(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var m={shape:{points:p}};c.current!==d&&(m.shape.__points=c.next),s.stopAnimation(),Uw(s,m,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),Uw(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],v=c.status,y=0;yt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;nt&&(t=i,n=o)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},qO=function(e){return Math.round(e.length/2)};var KO=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0};const YO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return Oh(t,e),t.prototype.getDefaultShape=function(){return new KO},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,o=t.r,i=t.width,a=t.angle,s=t.x-n(a)*i*(i>=o/3?1:2),l=t.y-r(a)*i*(i>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*i,t.y+r(a)*i),e.lineTo(t.x+n(t.angle)*o,t.y+r(t.angle)*o),e.lineTo(t.x-n(a)*i,t.y-r(a)*i),e.lineTo(s,l)},t}(gx);var XO=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const QO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Oh(t,e),t.prototype.getDefaultShape=function(){return new XO},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r0||0,0),i=Math.max(t.r,0),a=.5*(i-o),s=o+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l=e&&(0===t?0:r[t-1][0])Math.PI/2&&(j+=Math.PI):"tangential"===F?j=-k-Math.PI/2:bp(F)&&(j=F*Math.PI/180),0===j?d.add(new Ux({style:iS(b,{text:A,x:Z,y:L,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):d.add(new Ux({style:iS(b,{text:A,x:Z,y:L,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:Z,originY:L,rotation:j}))}if(y.get("show")&&R!==x){O=(O=y.get("distance"))?O+l:l;for(var N=0;N<=w;N++){u=Math.cos(k),c=Math.sin(k);var z=new CT({shape:{x1:u*(f-O)+h,y1:c*(f-O)+p,x2:u*(f-C-O)+h,y2:c*(f-C-O)+p},silent:!0,style:P});"auto"===P.stroke&&z.setStyle({stroke:r((R+N/w)/x)}),d.add(z),k+=_}k-=_}else k+=M}},t.prototype._renderPointer=function(e,t,n,r,o,i,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),m=f.get("show"),g=e.getData(),v=g.mapDimension("value"),y=+e.get("min"),b=+e.get("max"),x=[y,b],w=[i,a];function S(t,n){var r,i=g.getItemModel(t).getModel("pointer"),a=Wv(i.get("width"),o.r),s=Wv(i.get("length"),o.r),l=e.get(["pointer","icon"]),u=i.get("offsetCenter"),c=Wv(u[0],o.r),d=Wv(u[1],o.r),h=i.get("keepAspect");return(r=l?FI(l,c-a/2,d-s,a,s,null,h):new YO({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function C(e,t){var n=f.get("roundCap")?QO:uT,r=f.get("overlap"),a=r?f.get("width"):l/g.count(),u=r?o.r-a:o.r-(e+1)*a,c=r?o.r:o.r-e*a,d=new n({shape:{startAngle:i,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=b-g.get(v,e)%b),d}(m||p)&&(g.diff(c).add((function(t){var n=g.get(v,t);if(p){var r=S(t,i);qw(r,{rotation:-((isNaN(+n)?w[0]:$v(n,x,w,!0))+Math.PI/2)},e),u.add(r),g.setItemGraphicEl(t,r)}if(m){var o=C(t,i),a=f.get("clip");qw(o,{shape:{endAngle:$v(n,x,w,a)}},e),u.add(o),Kx(e.seriesIndex,g.dataType,t,o),h[t]=o}})).update((function(t,n){var r=g.get(v,t);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:i,s=S(t,a);s.rotation=a,Uw(s,{rotation:-((isNaN(+r)?w[0]:$v(r,x,w,!0))+Math.PI/2)},e),u.add(s),g.setItemGraphicEl(t,s)}if(m){var l=d[n],y=C(t,l?l.shape.endAngle:i),b=f.get("clip");Uw(y,{shape:{endAngle:$v(r,x,w,b)}},e),u.add(y),Kx(e.seriesIndex,g.dataType,t,y),h[t]=y}})).execute(),g.each((function(e){var t=g.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),i=n.get("blurScope"),a=n.get("disabled");if(p){var s=g.getItemGraphicEl(e),l=g.getItemVisual(e,"style"),u=l.fill;if(s instanceof kx){var c=s.style;s.useStyle(rp({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r($v(g.get(v,e),x,[0,1],!0))),s.z2EmphasisLift=0,Nw(s,t),Lw(s,o,i,a)}if(m){var d=h[e];d.useStyle(g.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Nw(d,t),Lw(d,o,i,a)}})),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),i=n.get("offsetCenter"),a=n.get("keepAspect"),s=FI(o,t.cx-r/2+Wv(i[0],t.r),t.cy-r/2+Wv(i[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,o){var i=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new jv,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new Ux({silent:!0}),h[e]=new Ux({silent:!0})})).update((function(e,t){d[e]=i._titleEls[t],h[e]=i._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),i=a.get(s,t),m=new jv,g=r($v(i,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=o.cx+Wv(y[0],o.r),x=o.cy+Wv(y[1],o.r);(P=d[t]).attr({z2:f?0:2,style:iS(v,{x:b,y:x,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),m.add(P)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),C=o.cx+Wv(S[0],o.r),k=o.cy+Wv(S[1],o.r),M=Wv(w.get("width"),o.r),_=Wv(w.get("height"),o.r),T=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:g,P=h[t],I=w.get("formatter");P.attr({z2:f?0:2,style:iS(w,{x:C,y:k,text:JO(i,I),width:isNaN(M)?null:M,height:isNaN(_)?null:_,align:"center",verticalAlign:"middle"},{inheritColor:T})}),function(e,t,n,r){if(e){var o=hS(e);o.prevValue=o.value,o.value=n;var i=t.normal;o.valueAnimation=i.get("valueAnimation"),o.valueAnimation&&(o.precision=i.get("precision"),o.defaultInterpolatedText=r,o.statesModels=t)}}(P,{normal:w},i,(function(e){return JO(e,I)})),p&&function(e,t,n,r,o){var i=hS(e);if(i.valueAnimation&&i.prevValue!==i.value){var a=i.defaultInterpolatedText,s=Tp(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?qw:Uw)(e,{percent:1},r,t,null,(function(r){var u=Oy(n,i.precision,s,l,r);i.interpolatedValue=1===r?null:u;var c=nS({labelDataIndex:t,labelFetcher:o,defaultText:a?a(u):u+""},i.statesModels,u);tS(e,c)}))}}(P,t,a,e,{getFormattedLabel:function(e,t,n,r,o,a){return JO(a?a.interpolatedValue:i,I)}}),m.add(P)}c.add(m)})),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(IP);const tA=eA;function nA(e,t,n){t=mp(t)&&{coordDimensions:t}||rp({encodeDefine:e.getEncode()},t);var r=e.getSource(),o=QD(r,t).dimensions,i=new XD(o,e);return i.initData(r,n),i}var rA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Oh(t,e),t.prototype.getInitialData=function(e,t){return nA(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(w_);const oA=rA;var iA=2*Math.PI,aA=Math.PI/180;function sA(e,t){return TC(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function lA(e,t){var n=sA(e,t),r=e.get("center"),o=e.get("radius");mp(o)||(o=[0,o]);var i,a,s=Wv(n.width,t.getWidth()),l=Wv(n.height,t.getHeight()),u=Math.min(s,l),c=Wv(o[0],u/2),d=Wv(o[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(r);i=p[0]||0,a=p[1]||0}else mp(r)||(r=[r,r]),i=Wv(r[0],s)+n.x,a=Wv(r[1],l)+n.y;return{cx:i,cy:a,r0:c,r:d}}function uA(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),o=sA(e,n),i=lA(e,n),a=i.cx,s=i.cy,l=i.r,u=i.r0,c=-e.get("startAngle")*aA,d=e.get("endAngle"),h=e.get("padAngle")*aA;d="auto"===d?c-iA:-d*aA;var p=e.get("minAngle")*aA+h,f=0;t.each(r,(function(e){!isNaN(e)&&f++}));var m=t.getSum(r),g=Math.PI/(m||f)*2,v=e.get("clockwise"),y=e.get("roseType"),b=e.get("stillShowZeroSum"),x=t.getDataExtent(r);x[0]=0;var w=v?1:-1,S=[c,d],C=w*h/2;qb(S,!v),c=S[0],d=S[1];var k=Math.abs(d-c),M=k,_=0,T=c;if(t.setLayout({viewRect:o,r:l}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(r="area"!==y?0===m&&b?g:e*g:k/f)r?c=i=T+w*r/2:(i=T+C,c=o-C),t.setItemLayout(n,{angle:r,startAngle:i,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?$v(e,x,[u,l]):l}),T=o}})),M0){t=t/180*Math.PI,dA.fromArray(e[0]),hA.fromArray(e[1]),pA.fromArray(e[2]),Vf.sub(fA,dA,hA),Vf.sub(mA,pA,hA);var n=fA.len(),r=mA.len();if(!(n<.001||r<.001)){fA.scale(1/n),mA.scale(1/r);var o=fA.dot(mA);if(Math.cos(t)1&&Vf.copy(vA,pA),vA.toArray(e[1])}}}}function bA(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,dA.fromArray(e[0]),hA.fromArray(e[1]),pA.fromArray(e[2]),Vf.sub(fA,hA,dA),Vf.sub(mA,pA,hA);var r=fA.len(),o=mA.len();if(!(r<.001||o<.001))if(fA.scale(1/r),mA.scale(1/o),fA.dot(t)=a)Vf.copy(vA,pA);else{vA.scaleAndAdd(mA,i/Math.tan(Math.PI/2-s));var l=pA.x!==hA.x?(vA.x-hA.x)/(pA.x-hA.x):(vA.y-hA.y)/(pA.y-hA.y);if(isNaN(l))return;l<0?Vf.copy(vA,hA):l>1&&Vf.copy(vA,pA)}vA.toArray(e[1])}}}function xA(e,t,n,r){var o="normal"===n,i=o?e:e.ensureState(n);i.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();o?e.useStyle(s):i.style=s}function wA(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var o=nf(r[0],r[1]),i=nf(r[1],r[2]);if(!o||!i)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(o,i)*n,s=of([],r[1],r[0],a/o),l=of([],r[1],r[2],a/i),u=of([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c0&&i&&S(-d/a,0,a);var g,v,y=e[0],b=e[a-1];return x(),g<0&&C(-g,.8),v<0&&C(v,.8),x(),w(g,v,1),w(v,g,-1),x(),g<0&&k(-g),v<0&&k(v),u}function x(){g=y.rect[t]-r,v=o-b.rect[t]-b.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var o=r+e;o<0&&C(-o*n,1)}else C(-e*n,1)}}function S(n,r,o){0!==n&&(u=!0);for(var i=r;i0)for(l=0;l0;l--){S(-(i[l-1]*d),l,a)}}}function k(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),(e-=n)<=0)return}}var CA=Math.PI/180;function kA(e,t,n,r,o,i,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;dn?a:i,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*o,h=r+l.len,f=Math.abs(d)e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var m=r.getBoundingRect();i.width=m.width;var g=(r.style.margin||0)+2.1;i.height=m.height+g,i.y-=(i.height-d)/2}}}function _A(e){return"center"===e.position}function TA(e){var t,n,r=e.getData(),o=[],i=!1,a=(e.get("minShowLabelAngle")||0)*CA,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each((function(e){var s=r.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),m=r.getItemModel(e),g=m.getModel("label"),v=g.get("position")||m.get(["emphasis","label","position"]),y=g.get("distanceToLabelLine"),b=g.get("alignTo"),x=Wv(g.get("edgeDistance"),u),w=g.get("bleedMargin"),S=m.getModel("labelLine"),C=S.get("length");C=Wv(C,u);var k=S.get("length2");if(k=Wv(k,u),Math.abs(d.endAngle-d.startAngle)0?"right":"left":R>0?"left":"right"}var j=Math.PI,N=0,z=g.get("rotate");if(bp(z))N=z*(j/180);else if("center"===v)N=0;else if("radial"===z||!0===z){N=R<0?-I+j:-I}else if("tangential"===z&&"outside"!==v&&"outer"!==v){var B=Math.atan2(R,D);B<0&&(B=2*j+B),D>0&&(B=j+B),N=B-j}if(i=!!N,h.x=M,h.y=_,h.rotation=N,h.setStyle({verticalAlign:"middle"}),O){h.setStyle({align:P});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var H=h.getBoundingRect().clone();H.applyTransform(h.getComputedTransform());var $=(h.style.margin||0)+2.1;H.y-=$/2,H.height+=$,o.push({label:h,labelLine:f,position:v,len:C,len2:k,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Vf(R,D),linePoints:T,textAlign:P,labelDistance:y,labelAlignTo:b,edgeDistance:x,bleedMargin:w,rect:H,unconstrainedWidth:H.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:O})}})),!i&&e.get("avoidLabelOverlap")&&function(e,t,n,r,o,i,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h0){for(var l=i.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},t.type="pie",t}(IP);const DA=RA;const OA=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}();var AA=ky(),EA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new OA(pp(this.getData,this),pp(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nA(this,{coordDimensions:["value"],encodeDefaulter:fp(QC,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=AA(n),o=r.seats;if(!o){var i=[];n.each(n.mapDimension("value"),(function(e){i.push(e)})),o=r.seats=Yv(i,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=o[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){py(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(w_);const ZA=EA;var LA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Oh(t,e),t.prototype.getInitialData=function(e,t){return aO(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(w_);const FA=LA;var jA=function(){},NA=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Oh(t,e),t.prototype.getDefaultShape=function(){return new jA},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,o=t.size,i=this.symbolProxy,a=i.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=r[l]-i/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+i&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,o=r[0],i=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();var BA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var o=GO("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new zA:new vO,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(IP);const VA=BA;var HA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(EC);const $A=HA;var WA=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),GA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Py).models[0]},t.type="cartesian2dAxis",t}(EC);ap(GA,WA);var UA={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},qA=np({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},UA),KA=np({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},UA);const YA={category:qA,value:KA,time:np({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},KA),log:op({logBase:10},KA)};var XA=0;function QA(e){return xp(e)&&null!=e.value?e.value:e+""}const JA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++XA}return e.createByAxisModel=function(t){var n=t.option,r=n.data,o=r&&up(r,QA);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!vp(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Np(this.categories))},e}();var eE={value:1,category:1,time:1,log:1};function tE(e,t,n,r){lp(eE,(function(o,i){var a=np(np({},YA[i],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+i,n}return Oh(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=IC(this),r=n?DC(e):{};np(e,t.getTheme().get(i+"Axis")),np(e,this.getDefaultOption()),e.type=nE(e),n&&RC(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=JA.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+i,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",nE)}function nE(e){return e.type||(e.data?"category":"value")}var rE=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();By(rE);const oE=rE;function iE(e){return"interval"===e.type||"log"===e.type}function aE(e,t,n,r){var o={},i=e[1]-e[0],a=o.interval=ry(i/t,!0);null!=n&&ar&&(a=o.interval=r);var s=o.intervalPrecision=lE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),uE(e,0,t),uE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(o.niceTickExtent=[Gv(Math.ceil(e[0]/a)*a,s),Gv(Math.floor(e[1]/a)*a,s)],e),o}function sE(e){var t=Math.pow(10,ny(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Gv(n*t)}function lE(e){return qv(e)+2}function uE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function cE(e,t){return e>=t[0]&&e<=t[1]}function dE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function hE(e,t){return e*(t[1]-t[0])+t[0]}var pE=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new JA({})),mp(r)&&(r=new JA({categories:up(r,(function(e){return xp(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Oh(t,e),t.prototype.parse=function(e){return null==e?NaN:vp(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return cE(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return dE(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(hE(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,i=this._ordinalMeta.categories.length,a=Math.min(i,t.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(oE);oE.registerClass(pE);const fE=pE;var mE=Gv,gE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return Oh(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return cE(e,this._extent)},t.prototype.normalize=function(e){return dE(e,this._extent)},t.prototype.scale=function(e){return hE(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=lE(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,i=[];if(!t)return i;n[0]1e4)return[];var s=i.length?i[i.length-1].value:r[1];return n[1]>s&&(e?i.push({value:mE(s+t,o)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),o=1;or[0]&&c0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}(e),n=[];return lp(e,(function(e){var r,o=e.coordinateSystem.getBaseAxis(),i=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(i[1]-i[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(i[1]-i[0])/d.count()}var h=Wv(e.get("barWidth"),r),p=Wv(e.get("barMaxWidth"),r),f=Wv(e.get("barMinWidth")||(ME(e)?.5:1),r),m=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:m,barCategoryGap:g,axisKey:xE(o),stackId:bE(e)})})),CE(n)}function CE(e){var t={};lp(e,(function(e,n){var r=e.axisKey,o=e.bandWidth,i=t[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=i.stacks;t[r]=i;var s=e.stackId;a[s]||i.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(i.gap=d);var h=e.barCategoryGap;null!=h&&(i.categoryGap=h)}));var n={};return lp(t,(function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=e.categoryGap;if(null==i){var a=hp(r).length;i=Math.max(35-4*a,15)+"%"}var s=Wv(i,o),l=Wv(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),lp(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=d;t&&tr&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h,p=0;lp(r,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;lp(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}function kE(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function ME(e){return e.pipelineContext&&e.pipelineContext.large}var _E=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return Oh(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return YS(e.value,$S[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(qS(this._minLevelUnit))]||$S.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,o){var i=null;if(vp(n))i=n;else if(gp(n))i=n(e.value,t,{level:e.level});else{var a=rp({},VS);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||a.none}if(mp(i)){var c=null==e.level?0:e.level>=0?e.level:i.length+e.level;i=i[c=Math.min(c,i.length-1)]}}return YS(new Date(e.value),i,o,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),o=function(e,t,n,r){var o=1e4,i=GS,a=0;function s(e,t,n,o,i,a,s){for(var l=new Date(t),u=t,c=l[o]();u1&&0===u&&i.unshift({value:i[0].value-h})}}for(u=0;u=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(m),d>y||e===i[p])break}c=[]}}0;var b=dp(up(u,(function(e){return dp(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],w=b.length-1;for(p=0;pn&&(this._approxInterval=n);var i=TE.length,a=Math.min(function(e,t,n,r){for(;n>>1;e[o][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function IE(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function RE(e){return(e/=NS)>12?12:e>6?6:e>3.5?4:e>2?2:1}function DE(e,t){return(e/=t?jS:FS)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function OE(e){return ry(e,!0)}function AE(e,t,n){var r=new Date(e);switch(qS(t)){case"year":case"month":r[sC(n)](0);case"day":r[lC(n)](1);case"hour":r[uC(n)](0);case"minute":r[cC(n)](0);case"second":r[dC(n)](0),r[hC(n)](0)}return r.getTime()}oE.registerClass(_E);const EE=_E;var ZE=oE.prototype,LE=vE.prototype,FE=Gv,jE=Math.floor,NE=Math.ceil,zE=Math.pow,BE=Math.log,VE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new vE,t._interval=0,t}return Oh(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return up(LE.getTicks.call(this,e),(function(e){var t=e.value,o=Gv(zE(this.base,t));return o=t===n[0]&&this._fixMin?$E(o,r[0]):o,{value:o=t===n[1]&&this._fixMax?$E(o,r[1]):o}}),this)},t.prototype.setExtent=function(e,t){var n=BE(this.base);e=BE(Math.max(0,e))/n,t=BE(Math.max(0,t))/n,LE.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=ZE.getExtent.call(this);t[0]=zE(e,t[0]),t[1]=zE(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=$E(t[0],n[0])),this._fixMax&&(t[1]=$E(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=BE(e[0])/BE(t),e[1]=BE(e[1])/BE(t),ZE.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,o=(r=n,Math.pow(10,ny(r)));for(e/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var i=[Gv(NE(t[0]/o)*o),Gv(jE(t[1]/o)*o)];this._interval=o,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){LE.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return cE(e=BE(e)/BE(this.base),this._extent)},t.prototype.normalize=function(e){return dE(e=BE(e)/BE(this.base),this._extent)},t.prototype.scale=function(e){return e=hE(e,this._extent),zE(this.base,e)},t.type="log",t}(oE),HE=VE.prototype;function $E(e,t){return FE(e,qv(t))}HE.getMinorTicks=LE.getMinorTicks,HE.getLabel=LE.getLabel,oE.registerClass(VE);const WE=VE;var GE=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[qE[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[UE[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),UE={min:"_determinedMin",max:"_determinedMax"},qE={min:"_dataMin",max:"_dataMax"};function KE(e,t,n){var r=e.rawExtentInfo;return r||(r=new GE(e,t,n),e.rawExtentInfo=r,r)}function YE(e,t){return null==t?null:Mp(t)?NaN:e.parse(t)}function XE(e,t){var n=e.type,r=KE(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var o=r.min,i=r.max,a=t.ecModel;if(a&&"time"===n){var s=wE("bar",a),l=!1;if(lp(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=SE(s),c=function(e,t,n,r){var o=n.axis.getExtent(),i=o[1]-o[0],a=function(e,t,n){if(e&&t){var r=e[xE(t)];return null!=r&&null!=n?r[bE(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;lp(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;lp(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/i)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(o,i,t,u);o=c.min,i=c.max}}return{extent:[o,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function QE(e,t){var n=t,r=XE(e,n),o=r.extent,i=n.get("splitNumber");e instanceof WE&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function JE(e){var t,n,r=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):vp(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):gp(r)?(t=r,function(n,r){return null!=o&&(r=n.value-o),t(eZ(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function eZ(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function tZ(e){var t=e.get("interval");return null==t?"auto":t}function nZ(e){return"category"===e.type&&0===tZ(e.getLabelModel())}function rZ(e,t){var n={};return lp(e.mapDimensionsAll(t),(function(t){n[iO(e,t)]=!0})),hp(n)}var oZ=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return up(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),dp(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}();var iZ=["x","y"];function aZ(e){return"interval"===e.type||"time"===e.type}var sZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=iZ,t}return Oh(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(aZ(e)&&aZ(t)){var n=e.getExtent(),r=t.getExtent(),o=this.dataToPoint([n[0],r[0]]),i=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(i[0]-o[0])/a,u=(i[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-r[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Bf([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),o=this.getArea(),i=new Qf(n[0],n[1],r[0]-n[0],r[1]-n[1]);return o.intersect(i)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],o=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=o&&isFinite(o))return af(n,e,this._transform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.toGlobalCoord(i.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,o=n.getExtent(),i=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return af(n,e,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,i=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-o+e;return new Qf(r,o,i,a)},t}(oZ);const lZ=sZ;var uZ=ky();function cZ(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=hZ(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=JE(e);return{labels:up(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function dZ(e,t){return"category"===e.type?function(e,t){var n,r,o=pZ(e,"ticks"),i=tZ(t),a=fZ(o,i);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(gp(i))n=vZ(e,i,!0);else if("auto"===i){var s=hZ(e,e.getLabelModel());r=s.labelCategoryInterval,n=up(s.labels,(function(e){return e.tickValue}))}else n=gZ(e,r=i,!0);return mZ(o,i,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:up(e.scale.getTicks(),(function(e){return e.value}))}}function hZ(e,t){var n,r,o=pZ(e,"labels"),i=tZ(t),a=fZ(o,i);return a||(gp(i)?n=vZ(e,i):(r="auto"===i?function(e){var t=uZ(e).autoInterval;return null!=t?t:uZ(e).autoInterval=e.calculateCategoryInterval()}(e):i,n=gZ(e,r)),mZ(o,i,{labels:n,labelCategoryInterval:r}))}function pZ(e,t){return uZ(e)[t]||(uZ(e)[t]=[])}function fZ(e,t){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=nZ(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==i[0]&&m(i[0]);for(var f=u;f<=i[1];f+=l)m(f);function m(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:e})}return p&&f-l!==i[1]&&m(i[1]),s}function vZ(e,t,n){var r=e.scale,o=JE(e),i=[];return lp(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&i.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})})),i}var yZ=[0,1];function bZ(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}const xZ=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=o||"value",a.position=i||"bottom",a}return Oh(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return Kv(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&bZ(n=n.slice(),r.count()),$v(e,yZ,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&bZ(n=n.slice(),r.count());var o=$v(e,n,yZ,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=up(dZ(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var o=t.length;if(!e.onBand||n||!o)return;var i,a,s=e.getExtent();if(1===o)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[o-1].tickValue-t[0].tickValue,u=(t[o-1].coord-t[0].coord)/l;lp(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[o-1].tickValue,i={coord:t[o-1].coord+u*a},t.push(i)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],i.coord)&&(r?i.coord=s[1]:t.pop());r&&d(i.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Gv(e),t=Gv(t),c?e>t:e0&&e<100||(e=5),up(this.scale.getMinorTicks(e),(function(e){return up(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return cZ(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=JE(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,i=o.getExtent(),a=o.count();if(i[1]-i[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=i[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),h=0,p=0;l<=i[1];l+=s){var f,m,g=xv(n({value:l}),t.font,"center","top");f=1.3*g.width,m=1.3*g.height,h=Math.max(h,f,7),p=Math.max(p,m,7)}var v=h/c,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(v,y))),x=uZ(e.model),w=e.getExtent(),S=x.lastAutoInterval,C=x.lastTickCount;return null!=S&&null!=C&&Math.abs(S-b)<=1&&Math.abs(C-a)<=1&&S>b&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?b=S:(x.lastTickCount=a,x.lastAutoInterval=b,x.axisExtent0=w[0],x.axisExtent1=w[1]),b}(this)},e}());function wZ(e,t,n){n=n||{};var r=e.coordinateSystem,o=t.axis,i={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var m=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(m,f[1]),f[0])}i.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],i.rotation=Math.PI/2*("x"===u?0:1);i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],i.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),_p(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var g=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-g:g,i.z2=1,i}function SZ(e){return"cartesian2d"===e.get("coordinateSystem")}function CZ(e){var t={xAxisModel:null,yAxisModel:null};return lp(t,(function(n,r){var o=r.replace(/Model$/,""),i=e.getReferringComponents(o,Py).models[0];t[r]=i})),t}var kZ=Math.log;var MZ=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=iZ,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=hp(e),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var a=e[+n[i]],s=a.model,l=a.scale;iE(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(QE(l,s),iE(l)&&(t=a))}o.length&&(t||QE((t=o.pop()).scale,t.model),lp(o,(function(e){!function(e,t,n){var r=vE.prototype,o=r.getTicks.call(n),i=r.getTicks.call(n,!0),a=o.length-1,s=r.getInterval.call(n),l=XE(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=kZ(e.base);u=[kZ(u[0])/h,kZ(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=r.getInterval.call(e),m=u[0],g=u[1];if(c&&d)f=(g-m)/a;else if(c)for(g=u[0]+f*a;gu[0]&&isFinite(m)&&isFinite(u[0]);)f=sE(f),m=u[1]-f*a;else{e.getTicks().length-1>a&&(f=sE(f));var v=f*a;(m=Gv((g=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(m=0,g=Gv(v)):g>0&&u[1]<=0&&(g=0,m=-Gv(v))}var y=(o[0].value-i[0].value)/s,b=(o[a].value-i[a].value)/s;r.setExtent.call(e,m+f*y,g+f*b),r.setInterval.call(e,f),(y||b)&&r.setNiceExtent.call(e,m+f,g-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var o={};lp(n.x,(function(e){TZ(n,"y",e,o)})),lp(n.y,(function(e){TZ(n,"x",e,o)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),i=TC(r,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function s(){lp(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?i.x:i.y)}))}s(),o&&(lp(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,o,i=n.getExtent();o=n instanceof fE?n.count():(r=n.getTicks()).length;var a,s,l,u,c,d,h,p=e.getLabelModel(),f=JE(e),m=1;o>40&&(m=Math.ceil(o/40));for(var g=0;g0&&r>0||n<0&&r<0)}(e)}const IZ=MZ;var RZ=Math.PI,DZ=function(){function e(e,t){this.group=new jv,this.opt=t,this.axisModel=e,op(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new jv({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!OZ[e]},e.prototype.add=function(e){OZ[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,o,i=Qv(t-e);return Jv(i)?(o=n>0?"top":"bottom",r="center"):Jv(i-RZ)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=i>0&&i0?"right":"left":n>0?"left":"right"),{rotation:i,textAlign:r,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),OZ={axisLine:function(e,t,n,r){var o=t.get(["axisLine","show"]);if("auto"===o&&e.handleAutoShown&&(o=e.handleAutoShown("axisLine")),o){var i=t.axis.getExtent(),a=r.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];a&&(af(s,s,a),af(l,l,a));var c=rp({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new CT({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});oP(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);vp(h)&&(h=[h,h]),(vp(p)||bp(p))&&(p=[p,p]);var f=NI(t.get(["axisLine","symbolOffset"])||0,p),m=p[0],g=p[1];lp([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==h[r]&&null!=h[r]){var o=FI(h[r],-m/2,-g/2,m,g,c.stroke,!0),i=t.r+t.offset,a=u?l:s;o.attr({rotation:t.rotate,x:a[0]+i*Math.cos(e.rotation),y:a[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(e,t,n,r){var o=function(e,t,n,r){var o=n.axis,i=n.getModel("axisTick"),a=i.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=LZ(o.getTicksCoords(),t.transform,l,op(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cd[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,ZZ(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*RZ/180),ZZ(s)?i=DZ.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=function(e,t,n,r){var o,i,a=Qv(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;Jv(a-RZ/2)?(i=l?"bottom":"top",o="center"):Jv(a-1.5*RZ)?(i=l?"top":"bottom",o="center"):(i="middle",o=a<1.5*RZ&&a>RZ/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:i}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var m=u.getFont(),g=t.get("nameTruncate",!0)||{},v=g.ellipsis,y=_p(e.nameTruncateMaxWidth,g.maxWidth,a),b=new Ux({x:p[0],y:p[1],rotation:i.rotation,silent:DZ.isLabelSilent(t),style:iS(u,{text:o,font:m,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||i.textAlign,verticalAlign:u.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(yP({el:b,componentModel:t,itemName:o}),b.__fullText=o,b.anid="name",t.get("triggerEvent")){var x=DZ.makeAxisEventDataBase(t);x.targetType="axisName",x.name=o,qx(b).eventData=x}r.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function AZ(e){e&&(e.ignore=!0)}function EZ(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var o=Lf([]);return zf(o,o,-e.rotation),n.applyTransform(jf([],o,e.getLocalTransform())),r.applyTransform(jf([],o,t.getLocalTransform())),n.intersect(r)}}function ZZ(e){return"middle"===e||"center"===e}function LZ(e,t,n,r,o){for(var i=[],a=[],s=[],l=0;l=0||e===t}function zZ(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[VZ(e)]}function BZ(e){return!!e.get(["handle","show"])}function VZ(e){return e.type+"||"+e.id}var HZ={},$Z=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(t,n,r,o){this.axisPointerClass&&function(e){var t=zZ(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,o=n.option,i=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=BZ(n);null==i&&(o.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=0,i=e.fill||"#000";pL(r,t);var a=null==r.textFill;return o?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=i),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,lp(t.rich,(function(e){pL(e,e)})),r}function pL(e,t){t&&(Vp(t,"fill")&&(e.textFill=t.fill),Vp(t,"stroke")&&(e.textStroke=t.fill),Vp(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Vp(t,"font")&&(e.font=t.font),Vp(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Vp(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Vp(t,"fontSize")&&(e.fontSize=t.fontSize),Vp(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Vp(t,"align")&&(e.textAlign=t.align),Vp(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Vp(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Vp(t,"width")&&(e.textWidth=t.width),Vp(t,"height")&&(e.textHeight=t.height),Vp(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Vp(t,"padding")&&(e.textPadding=t.padding),Vp(t,"borderColor")&&(e.textBorderColor=t.borderColor),Vp(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Vp(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Vp(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Vp(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Vp(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Vp(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Vp(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Vp(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Vp(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Vp(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var fL={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},mL=hp(fL),gL=(cp(mv,(function(e,t){return e[t]=1,e}),{}),mv.join(", "),["","style","shape","extra"]),vL=ky();function yL(e,t,n,r,o){var i=e+"Animation",a=Ww(e,r,o)||{},s=vL(t).userDuring;return a.duration>0&&(a.during=s?pp(kL,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),rp(a,n[i]),a}function bL(e,t,n,r){var o=(r=r||{}).dataIndex,i=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=vL(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var r=0;r=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!o&&(o=r.style={});var p=hp(n);for(u=0;u0&&e.animateFrom(h,p)}else!function(e,t,n,r,o){if(o){var i=yL("update",e,t,r,n);i.duration>0&&e.animateFrom(o,i)}}(e,t,o||0,n,c);!function(e,t){for(var n=vL(e).leaveToProps,r=0;r=0){!i&&(i=r[e]={});var h=hp(a);for(c=0;cr[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var o=t.dataToRadius(r[0]),i=n.dataToAngle(r[1]),a=e.coordToPoint([o,i]);return a.push(o,i*Math.PI/180),a},size:pp(cL,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function BL(e){return e instanceof gx}function VL(e){return e instanceof gb}var HL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._data,i=e.getData(),a=this.group,s=KL(e,i,t,n);o||a.removeAll(),i.diff(o).add((function(t){XL(n,null,t,s(t,r),e,a,i)})).remove((function(t){var n=o.getItemGraphicEl(t);n&&xL(n,oL(n).option,e)})).update((function(t,l){var u=o.getItemGraphicEl(l);XL(n,u,t,s(t,r),e,a,i)})).execute();var l,u,c,d,h,p=e.get("clip",!0)?(l=e.coordinateSystem,u=!1,c=e,l?"polar"===l.type?OO(l,u,c):"cartesian2d"===l.type?DO(l,u,c,d,h):null:null):null;p?a.setClipPath(p):a.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,o){var i=t.getData(),a=KL(t,i,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u=0?t.getStore().get(o,n):void 0}var i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i},styleEmphasis:function(n,r){0;null==r&&(r=s);var o=y(r,DL).getItemStyle(),i=b(r,DL),a=iS(i,null,null,!0,!0);a.text=i.getShallow("show")?Pp(e.getFormattedLabel(r,DL),e.getFormattedLabel(r,OL),uO(t,r)):null;var l=aS(i,null,!0);return w(n,o),o=hL(o,a,l),n&&x(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=s),Vp(nL,e)){var r=t.getItemVisual(n,"style");return r?r[nL[e]]:null}if(Vp(rL,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===i.type){return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i=d;f--){var m=t.childAt(f);rF(t,m,o)}}(e,d,n,r,o),a>=0?i.replaceAt(d,a):i.add(d),d}function JL(e,t,n){var r,o=oL(e),i=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=i&&i!==o.customGraphicType||"path"===i&&((r=a)&&(Vp(r,"pathData")||Vp(r,"d")))&&sF(a)!==o.customPathData||"image"===i&&Vp(s,"image")&&s.image!==o.customImagePath}function eF(e,t,n){var r=t?tF(e,t):e,o=t?nF(e,r,DL):e.style,i=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?tF(s,t):s:null;if(o&&(n.isLegacy||function(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||Vp(e,"text")))}(o,i,!!a,!!l))){n.isLegacy=!0;var u=function(e,t,n){var r,o,i,a=e;if("text"===t)i=a;else{i={},Vp(a,"text")&&(i.text=a.text),Vp(a,"rich")&&(i.rich=a.rich),Vp(a,"textFill")&&(i.fill=a.textFill),Vp(a,"textStroke")&&(i.stroke=a.textStroke),Vp(a,"fontFamily")&&(i.fontFamily=a.fontFamily),Vp(a,"fontSize")&&(i.fontSize=a.fontSize),Vp(a,"fontStyle")&&(i.fontStyle=a.fontStyle),Vp(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={};var s=Vp(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),Vp(a,"textPosition")&&(r.position=a.textPosition),Vp(a,"textOffset")&&(r.offset=a.textOffset),Vp(a,"textRotation")&&(r.rotation=a.textRotation),Vp(a,"textDistance")&&(r.distance=a.textDistance)}return dL(i,e),lp(i.rich,(function(e){dL(e,e)})),{textConfig:r,textContent:o}}(o,i,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function tF(e,t){return t?e?e[t]:null:e}function nF(e,t,n){var r=t&&t.style;return null==r&&n===DL&&e&&(r=e.styleEmphasis),r}function rF(e,t,n){t&&xL(t,oL(e).option,n)}function oF(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function iF(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;QL(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function aF(e){var t=this.context,n=t.oldChildren[e];n&&xL(n,oL(n).option,t.seriesModel)}function sF(e){return e&&(e.pathData||e.d)}const lF=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=zh.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,o,i){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p0){var M=i(v)?s:l;v>0&&(v=v*C+S),b[x++]=M[k],b[x++]=M[k+1],b[x++]=M[k+2],b[x++]=M[k+3]*v*256}else x+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=zh.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),o=[0,0,0,0],i=0,a=0;a<256;a++)e[t](a/255,!0,o),r[i++]=o[0],r[i++]=o[1],r[i++]=o[2],r[i++]=o[3];return r},e}();function uF(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var cF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):uF(o)&&this._renderOnGeo(o,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var o=t.coordinateSystem;o&&(uF(o)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){xP(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,o){var i,a,s,l,u=e.coordinateSystem,c=AO(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");0,i=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),g=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),b=oS(e),x=e.getModel("emphasis"),w=x.get("focus"),S=x.get("blurScope"),C=x.get("disabled"),k=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;Ms[1]||Il[1])continue;var R=u.dataToPoint([P,I]);_=new Ox({shape:{x:R[0]-i/2,y:R[1]-a/2,width:i,height:a},style:T})}else{if(isNaN(f.get(k[1],M)))continue;_=new Ox({z2:1,shape:u.dataToRect([f.get(k[0],M)]).contentShape,style:T})}if(f.hasItemOption){var D=f.getItemModel(M),O=D.getModel("emphasis");m=O.getModel("itemStyle").getItemStyle(),g=D.getModel(["blur","itemStyle"]).getItemStyle(),v=D.getModel(["select","itemStyle"]).getItemStyle(),y=D.get(["itemStyle","borderRadius"]),w=O.get("focus"),S=O.get("blurScope"),C=O.get("disabled"),b=oS(D)}_.shape.r=y;var A=e.getRawValue(M),E="-";A&&null!=A[2]&&(E=A[2]+""),rS(_,b,{labelFetcher:e,labelDataIndex:M,defaultOpacity:T.opacity,defaultText:E}),_.ensureState("emphasis").style=m,_.ensureState("blur").style=g,_.ensureState("select").style=v,Lw(_,w,S,C),_.incremental=o,o&&(_.states.emphasis.hoverLayer=!0),p.add(_),f.setItemGraphicEl(M,_),this._progressiveEls&&this._progressiveEls.push(_)}},t.prototype._renderOnGeo=function(e,t,n,r){var o=n.targetVisuals.inRange,i=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new lF;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=h-c,m=p-d,g=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(g,(function(t,n,r){var o=e.dataToPoint([t,n]);return o[0]-=c,o[1]-=d,o.push(r),o})),y=n.getExtent(),b="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var r=e[1]-e[0],o=(t=up(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,i=0;return function(e){var r;for(r=i;r=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}return r>=0&&r0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");lp([["start","startValue"],["end","endValue"]],(function(r,o){var i=null!=e[r[0]],a=null!=e[r[1]];i&&!a?t[o]="percent":!i&&a?t[o]="value":n?t[o]=n[o]:i&&(t[o]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(yF(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){lp(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(yF(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;lp([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;lp(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;ri&&(t[1-r]=t[r]+u.sign*i),t}function RF(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function DF(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var OF="\0_ec_interaction_mutex";function AF(e,t){return!!EF(e)[t]}function EF(e){return e[OF]||(e[OF]={})}function ZF(e,t,n,r,o){e.pointerChecker&&e.pointerChecker(r,o.originX,o.originY)&&(Df(r.event),LF(e,t,n,r,o))}function LF(e,t,n,r,o){o.isAvailableBehavior=pp(FF,null,n,r),e.trigger(t,o)}function FF(e,t,n){var r=n[e];return!e||r&&(!vp(r)||t.event[r+"Key"])}fD({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Hp);const jF=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=pp(n._mousedownHandler,n),o=pp(n._mousemoveHandler,n),i=pp(n._mouseupHandler,n),a=pp(n._mousewheelHandler,n),s=pp(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=op(tp(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",o),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",o),t.off("mouseup",i),t.off("mousewheel",a),t.off("pinch",s)},n}return Oh(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Of(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&FF("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!AF(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,o=this._y,i=t-r,a=n-o;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Df(e.event),LF(this,"pan","moveOnMouseMove",e,{dx:i,dy:a,oldX:r,oldY:o,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Of(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=FF("zoomOnMouseWheel",e,this._opt),n=FF("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,o=Math.abs(r),i=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;ZF(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:i,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);ZF(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:i,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){AF(this._zr,"globalPan")||ZF(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(hf);var NF=ky();function zF(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function BF(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function VF(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function HF(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=NF(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Np());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){lp(xF(e).infoList,(function(n){var o=n.model.uid,i=r.get(o)||r.set(o,function(e,t){var n={model:t,containsPoint:fp(VF,t),dispatchAction:fp(BF,e),dataZoomInfoMap:null,controller:null},r=n.controller=new jF(e.getZr());return lp(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(o){if(t.isAvailableBehavior(o.model.option)){var i=(o.getRange||{})[e],a=i&&i(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&r.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(i.dataZoomInfoMap||(i.dataZoomInfoMap=Np())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var i=o.keys()[0];null!=i&&(t=o.get(i))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each((function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),EP(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else zF(r,e)}))}))}var $F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Oh(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){NF(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:pp(WF.pan,this),zoom:pp(WF.zoom,this),scrollMove:pp(WF.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=NF(e).coordSysRecordMap,r=n.keys(),o=0;o0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/r.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return IF(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1]?i:void 0}},pan:GF((function(e,t,n,r,o,i){var a=UF[r]([i.oldX,i.oldY],[i.newX,i.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:GF((function(e,t,n,r,o,i){return UF[r]([0,0],[i.scrollDelta,i.scrollDelta],t,o,n).signal*(e[1]-e[0])*i.scrollDelta}))};function GF(e){return function(t,n,r,o){var i=this.range,a=i.slice(),s=t.axisModels[0];if(s)return IF(e(a,s,t,n,r,o),a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}}var UF={grid:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=i.inverse?-1:1),a},polar:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=i.inverse?-1:1),a},singleAxis:function(e,t,n,r,o){var i=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=i.inverse?-1:1),s}};const qF=$F;var KF=lp,YF=Uv;const XF=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return ip(vF,t)>=0}(t)){var n=yF(this._dimName),r=t.getReferringComponents(n,Py).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return tp(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],s=[];KF(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===o[u]?(null==c&&(c=i[u]),d=r.parse($v(c,i,n))):(t=!0,c=$v(d=null==d?n[u]:r.parse(d),n,i)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?i[u]:c})),YF(s),YF(a);var l=this._minMaxSpan;function u(e,t,n,o,i){var a=i?"Span":"ValueSpan";IF(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=$v(e[s],n,o,!0),i&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,i,!1):u(a,s,i,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];KF(n,(function(e){!function(e,t,n){t&&lp(rZ(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var o=e.getAxisModel(),i=KE(o.axis.scale,o,r).calculate();return[i.min,i.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=e.get("filterMode"),i=this._valueWindow;"none"!==o&&KF(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var a=t.getStore(),s=up(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,o,l=0;li[1];if(c&&!d&&!h)return!0;c&&(o=!0),d&&(t=!0),h&&(n=!0)}return o&&t&&n}))}else KF(r,(function(n){if("empty"===o)e.setData(t=t.map(n,(function(e){return function(e){return e>=i[0]&&e<=i[1]}(e)?e:NaN})));else{var r={};r[n]=i,t.selectRange(r)}}));KF(r,(function(e){t.setApproximateExtent(i,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;KF(["min","max"],(function(r){var o=t.get(r+"Span"),i=t.get(r+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?o=$v(n[0]+i,n,[0,100],!0):null!=o&&(i=$v(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=i}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=Kv(n,[0,500]);r=Math.min(r,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},e}();const QF={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,o){var i=e.getComponent(yF(r),o);t(r,o,i,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,o,i){o.__dzAxisProxy||(o.__dzAxisProxy=new XF(t,r,i,e),n.push(o.__dzAxisProxy))}));var r=Np();return lp(n,(function(e){lp(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var JF=!1;function ej(e){JF||(JF=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,QF),function(e){e.registerAction("dataZoom",(function(e,t){lp(bF(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function tj(e){ej(e),e.registerComponentModel(_F),e.registerComponentView(qF),HF(e)}var nj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=IS(kF.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(kF);const rj=nj;var oj=Ox,ij="horizontal",aj="vertical",sj=["line","bar","candlestick","scatter"],lj={easing:"cubicOut",duration:100,delay:0},uj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Oh(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=pp(this._onBrush,this),this._onBrushEnd=pp(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,o){if(e.prototype.render.apply(this,arguments),EP(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){ZP(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new jv;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},i=this._orient===ij?{right:o.width-r.x-r.width,top:o.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=DC(e.option);lp(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=i[e])}));var s=TC(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===aj&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),i=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(n!==ij||o?n===ij&&o?{scaleY:a?1:-1,scaleX:-1}:n!==aj||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([i]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new oj({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new oj({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:pp(this._onClickPanel,this)}),i=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,o=r.getRawData(),i=r.getShadowDim&&r.getShadowDim(),a=i&&o.getDimensionInfo(i)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],m=[],g=p[1]/(o.count()-1),v=0,y=Math.round(o.count()/t[0]);o.each([a],(function(e,t){if(y>0&&t%y)v+=g;else{var n=null==e||isNaN(e)||""===e,r=n?0:$v(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),m.push([m[m.length-1][0],0])):!n&&d&&(f.push([v,0]),m.push([v,0])),f.push([v,r]),m.push([v,r]),v+=g,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var b=this.dataZoomModel,x=0;x<3;x++){var w=S(1===x);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function S(e){var t=b.getModel(e?"selectedDataBackground":"dataBackground"),n=new jv,r=new gT({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new bT({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(o),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(o,i){lp(e.getAxisProxy(o,i).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&ip(sj,e.get("type"))<0)){var a,s=r.getComponent(yF(o),i).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],o=this._displayables.sliderGroup,i=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new oj({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new oj({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),lp([0,1],(function(t){var i=a.get("handleIcon");!EI[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=FI(i,-1,0,2,2,null,!0);s.attr({cursor:cj(this._orient),draggable:!0,drift:pp(this._onDragMove,this,t),ondragend:pp(this._onDragEnd,this),onmouseover:pp(this._showDataInfo,this,!0),onmouseout:pp(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Wv(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Zw(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new Ux({silent:!0,invisible:!0,style:iS(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var h=Wv(a.get("moveHandleSize"),i[1]),p=t.moveHandle=new Ox({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:h}}),f=.8*h,m=t.moveHandleIcon=FI(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);m.silent=!0,m.y=i[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(i[1]/2,Math.max(h,10));(d=t.moveZone=new Ox({invisible:!0,shape:{y:i[1]-g,height:h+g}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),o.add(p),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:cj(this._orient),drift:pp(this._onDragMove,this,"all"),ondragstart:pp(this._showDataInfo,this,!0),ondragend:pp(this._onDragEnd,this),onmouseover:pp(this._showDataInfo,this,!0),onmouseout:pp(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[$v(e[0],[0,100],t,!0),$v(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),i=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];IF(t,r,o,n.get("zoomLock")?"all":e,null!=i.minSpan?$v(i.minSpan,a,o,!0):null,null!=i.maxSpan?$v(i.maxSpan,a,o,!0):null);var s=this._range,l=this._range=Uv([$v(r[0],o,a,!0),$v(r[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Uv(n.slice()),o=this._size;lp([0,1],(function(e){var r=t.handles[e],i=this._handleHeight;r.attr({scaleX:i/2,scaleY:i/2,x:n[e]+(e?-1:1),y:o[1]/2-i/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var i={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],o[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,i=this._updateInterval("all",n[0]-o);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new Vf(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=Uv([$v(n.x,r,o,!0),$v(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Df(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new oj({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var i=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(i.x,i.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?lj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=xF(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),o=this.api.getHeight();e={x:.2*r,y:.2*o,width:.6*r,height:.6*o}}return e},t.type="dataZoom.slider",t}(PF);function cj(e){return"vertical"===e?"ns-resize":"ew-resize"}const dj=uj;function hj(e){e.registerComponentModel(rj),e.registerComponentView(dj),ej(e)}var pj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Oh(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),mp(t)&&lp(t,(function(e,r){vp(e)&&(e={type:e}),t[r]=np(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(EC);const fj=pj;function mj(e,t){var n=mC(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Ox({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var gj=fp,vj=lp,yj=jv,bj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Oh(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new yj),this.group.add(this._selectorGroup=new yj),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var o=e.get("align"),i=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===i?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(o,e,t,n,a,i,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=TC(l,u,c),h=this.layoutInner(e,o,d,r,a,s),p=TC(op({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=mj(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,o,i,a){var s=this.getContentGroup(),l=Np(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),vj(t.getData(),(function(o,i){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new yj;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},m=p.getVisual("legendIcon"),g=p.getVisual("style"),v=this._createItem(h,a,i,o,t,e,f,g,m,u,r);v.on("click",gj(xj,a,null,r,c)).on("mouseover",gj(Sj,h.name,null,r,c)).on("mouseout",gj(Cj,h.name,null,r,c)),n.ssr&&v.eachChild((function(e){var t=qx(e);t.seriesIndex=h.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),m=ug(p.fill);m&&0===m[3]&&(m[3]=.2,p=rp(rp({},p),{fill:gg(m,"rgba")}));var g=this._createItem(s,a,i,o,t,e,{},p,f,u,r);g.on("click",gj(xj,null,a,r,c)).on("mouseover",gj(Sj,null,a,r,c)).on("mouseout",gj(Cj,null,a,r,c)),n.ssr&&g.eachChild((function(e){var t=qx(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),o&&this._createSelector(o,t,r,i,a)},t.prototype._createSelector=function(e,t,n,r,o){var i=this.getSelectorGroup();vj(e,(function(e){var r=e.type,o=new Ux({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});i.add(o),rS(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Zw(o)}))},t.prototype._createItem=function(e,t,n,r,o,i,a,s,l,u,c){var d=e.visualDrawType,h=o.get("itemWidth"),p=o.get("itemHeight"),f=o.isSelected(t),m=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,o,i,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),vj(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?cR(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[o]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?r:n).opacity);s(u,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!i){var f=t.get("inactiveBorderWidth"),m=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,c),b=new yj,x=r.getModel("textStyle");if(!gp(e.getLegendIcon)||v&&"inherit"!==v){var w="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(function(e){var t=e.icon||"roundRect",n=FI(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:w,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}))}else b.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));var S="left"===i?h+5:-5,C=i,k=o.get("formatter"),M=t;vp(k)&&k?M=k.replace("{name}",null!=t?t:""):gp(k)&&(M=k(t));var _=f?x.getTextColor():r.get("inactiveColor");b.add(new Ux({style:iS(x,{text:M,x:S,y:p/2,fill:_,align:C,verticalAlign:"middle"},{inheritColor:_})}));var T=new Ox({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=r.getModel("tooltip");return P.get("show")&&yP({el:T,componentModel:o,itemName:t,itemTooltipOption:P.option}),b.add(T),b.eachChild((function(e){e.silent=!0})),T.silent=!u,this.getContentGroup().add(b),Zw(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getContentGroup(),s=this.getSelectorGroup();_C(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){_C("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",m=0===p?"height":"width",g=0===p?"y":"x";"end"===i?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[m]/2-c[m]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+h+c[f],v[m]=Math.max(l[m],c[m]),v[g]=Math.min(0,c[g]+d[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(C_);function xj(e,t,n,r){Cj(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),Sj(e,t,n,r)}function wj(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,o=n.length;rn[o],f=[-d.x,-d.y];t||(f[r]=l[s]);var m=[0,0],g=[-h.x,-h.y],v=Tp(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?g[r]+=n[o]-h[o]:m[r]+=h[o]+v);g[1-r]+=d[i]/2-h[i]/2,l.setPosition(f),u.setPosition(m),c.setPosition(g);var y={x:0,y:0};if(y[o]=p?n[o]:d[o],y[i]=Math.max(d[i],h[i]),y[a]=Math.min(0,h[a]+g[1-r]),u.__rectSize=n[o],p){var b={x:0,y:0};b[o]=Math.max(n[o]-h[o]-v,0),b[i]=y[i],u.setClipPath(new Ox({shape:b})),u.__rectSize=b[o]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&Uw(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;lp(["pagePrev","pageNext"],(function(r){var o=null!=t[r+"DataIndex"],i=n.childOfName(r);i&&(i.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),i.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),o=e.get("pageFormatter"),i=t.pageIndex,a=null!=i?i+1:0,s=t.pageCount;r&&o&&r.setStyle("text",vp(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=e.getOrient().index,i=Oj[o],a=Aj[o],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[o]=-p.s;for(var f=s+1,m=p,g=p,v=null;f<=c;++f)(!(v=y(l[f]))&&g.e>m.s+r||v&&!b(v,m.s))&&(m=g.i>m.i?g:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=m.i),++h.pageCount),g=v;for(f=s-1,m=p,g=p,v=null;f>=-1;--f)(v=y(l[f]))&&b(g,v.s)||!(m.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,o){var i=r.__legendDataIndex;null==n&&null!=i&&(n=o),i===e&&(t=o)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(kj);const Zj=Ej;function Lj(e){SD(Tj),e.registerComponentModel(Rj),e.registerComponentView(Zj),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}var Fj=ky(),jj=tp,Nj=pp;function zj(e,t,n,r){Bj(Fj(n).lastProp,r)||(Fj(n).lastProp=r,t?Uw(n,r,e):(n.stopAnimation(),n.attr(r)))}function Bj(e,t){if(xp(e)&&xp(t)){var n=!0;return lp(t,(function(t,r){n=n&&Bj(e[r],t)})),!!n}return e===t}function Vj(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Hj(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function $j(e,t,n){var r=t.get("z"),o=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=o&&(e.zlevel=o),e.silent=n)}))}function Wj(e,t,n,r,o){var i=Gj(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=mC(a.get("padding")||0),l=a.getFont(),u=xv(i,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,r){var o=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,r);var m=a.get("backgroundColor");m&&"auto"!==m||(m=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:iS(a,{text:i,font:l,fill:a.getTextColor(),padding:s,backgroundColor:m}),z2:10}}function Gj(e,t,n,r,o){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:eZ(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};lp(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,o=t&&t.getDataParams(r);o&&s.seriesData.push(o)})),vp(a)?i=a.replace("{value}",i):gp(a)&&(i=a(s))}return i}function Uj(e,t,n){var r=[1,0,0,1,0,0];return zf(r,r,n.rotation),Nf(r,r,n.position),lP([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var qj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.grid,s=r.get("type"),l=Kj(a,i).getOtherAxis(i).getGlobalExtent(),u=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=Yj[s](i,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,o,i){var a=FZ.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),Wj(t,r,o,i,{position:Uj(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,wZ(a.model,n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=wZ(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=Uj(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.grid,a=o.getGlobalExtent(!0),s=Kj(i,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var o=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==o||this._lastStatus!==i){this._lastValue=o,this._lastStatus=i;var a=this._group,s=this._handle;if(!i||"hide"===i)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=fp(zj,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new jv,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);$j(a,t,!0),this._renderHandle(o)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,o="category"===r.type,i=t.get("snap");if(!i&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(i){var s=zZ(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,o){},e.prototype.createPointerEl=function(e,t,n,o){var i=t.pointer;if(i){var a=Fj(e).pointerEl=new r[i.type](jj(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var o=Fj(e).labelEl=new Ux(jj(t.label));e.add(o),Vj(o,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Fj(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var o=Fj(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),Vj(o,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,i=n.getModel("handle"),a=n.get("status");if(!i.get("show")||!a||"hide"===a)return o&&r.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=fP(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Df(e.event)},onmousedown:Nj(this._onHandleDragMove,this,0,0),drift:Nj(this._onHandleDragMove,this),ondragend:Nj(this._onHandleDragEnd,this)}),r.add(o)),$j(o,n,!1),o.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");mp(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,EP(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){zj(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Hj(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Hj(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Hj(r)),Fj(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),ZP(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}());function Kj(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Yj={line:function(e,t,n){var r,o,i;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],o=[t,n[1]],i=Xj(e),{x1:r[i=i||0],y1:r[1-i],x2:o[i],y2:o[1-i]})}},shadow:function(e,t,n){var r,o,i,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],o=[a,s],i=Xj(e),{x:r[i=i||0],y:r[1-i],width:o[i],height:o[1-i]})}}};function Xj(e){return"x"===e.dim?0:1}const Qj=qj;var Jj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(EC);const eN=Jj;var tN=ky(),nN=lp;function rN(e,t,n){if(!Zh.node){var r=t.getZr();tN(r).records||(tN(r).records={}),function(e,t){if(tN(e).initialized)return;function n(n,r){e.on(n,(function(n){var o=function(e){var t={showTip:[],hideTip:[]},n=function(r){var o=t[r.type];o?o.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);nN(tN(e).records,(function(e){e&&r(e,n,o.dispatchAction)})),function(e,t){var n,r=e.showTip.length,o=e.hideTip.length;r?n=e.showTip[r-1]:o&&(n=e.hideTip[o-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(o.pendings,t)}))}tN(e).initialized=!0,n("click",fp(iN,"click")),n("mousemove",fp(iN,"mousemove")),n("globalout",oN)}(r,t),(tN(r).records[e]||(tN(r).records[e]={})).handler=n}}function oN(e,t,n){e.handler("leave",null,n)}function iN(e,t,n,r){t.handler(e,n,r)}function aN(e,t){if(!Zh.node){var n=t.getZr();(tN(n).records||{})[e]&&(tN(n).records[e]=null)}}var sN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),o=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";rN("axisPointer",n,(function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){aN("axisPointer",t)},t.prototype.dispose=function(e,t){aN("axisPointer",t)},t.type="axisPointer",t}(C_);const lN=sN;function uN(e,t){var n,r=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var i=n.getData(),a=Cy(i,e);if(null==a||a<0||mp(a))return{point:[]};var s=i.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,h="x"===c||"radius"===c?1:0,p=i.mapDimension(d),f=[];f[h]=i.get(p,a),f[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(i.getValues(up(l.dimensions,(function(e){return i.mapDimension(e)})),a))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var cN=ky();function dN(e,t,n){var r=e.currTrigger,o=[e.x,e.y],i=e,a=e.dispatchAction||pp(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){gN(o)&&(o=uN({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=gN(o),u=i.axesInfo,c=s.axesInfo,d="leave"===r||gN(o),h={},p={},f={list:[],map:{}},m={showPointer:fp(pN,p),showTooltip:fp(fN,f)};lp(s.coordSysMap,(function(e,t){var n=l||e.containPoint(o);lp(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,i=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(u,e);if(!d&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=r.pointToData(o)),null!=a&&hN(e,a,m,!1,h)}}))}));var g={};return lp(c,(function(e,t){var n=e.linkGroup;n&&!p[t]&&lp(n.axesInfo,(function(t,r){var o=p[r];if(t!==e&&o){var i=o.value;n.mapper&&(i=e.axis.scale.parse(n.mapper(i,mN(t),mN(e)))),g[e.key]=i}}))})),lp(g,(function(e,t){hN(c[t],e,m,!0,h)})),function(e,t,n){var r=n.axesInfo=[];lp(t,(function(t,n){var o=t.axisPointerModel.option,i=e[n];i?(!t.useHandle&&(o.status="show"),o.value=i.value,o.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})}))}(p,c,h),function(e,t,n,r){if(gN(t)||!e.list.length)return void r({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(f,o,e,a),function(e,t,n){var r=n.getZr(),o="axisPointerLastHighlights",i=cN(r)[o]||{},a=cN(r)[o]={};lp(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&lp(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];lp(i,(function(e,t){!a[t]&&l.push(e)})),lp(a,(function(e,t){!i[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),h}}function hN(e,t,n,r,o){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,o=e,i=[],a=Number.MAX_VALUE,s=-1;return lp(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,o=u,i.length=0),lp(c,(function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:i,snapToValue:o}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&rp(o,s[0]),!r&&e.snap&&i.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function pN(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function fN(e,t,n,r){var o=n.payloadBatch,i=t.axis,a=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,u=VZ(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function mN(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function gN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function vN(e){WZ.registerAxisPointerClass("CartesianAxisPointer",Qj),e.registerComponentModel(eN),e.registerComponentView(lN),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!mp(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=jZ(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},dN)}var yN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Oh(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(EC),bN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,o=e.getModel("textStyle"),i=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Tp(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Ux({style:iS(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new Ux({style:iS(i,{text:c,fill:i.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){wC(h,"_"+e.get("target"))})),p&&d.on("click",(function(){wC(p,"_"+e.get("subtarget"))})),qx(l).eventData=qx(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var m=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=m.width,g.height=m.height;var v=TC(g,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),m=r.getBoundingRect();var b=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var w=new Ox({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(C_);var xN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.type="dataZoom.select",t}(kF);const wN=xN;var SN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.type="dataZoom.select",t}(PF);const CN=SN;function kN(e){e.registerComponentModel(wN),e.registerComponentView(CN),ej(e)}var MN=function(){},_N={};function TN(e,t){_N[e]=t}function PN(e){return _N[e]}var IN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;lp(this.option.feature,(function(e,n){var r=PN(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),np(e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(EC);const RN=IN;var DN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.render=function(e,t,n,r){var o=this.group;if(o.removeAll(),e.get("show")){var i=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];lp(s,(function(e,t){u.push(t)})),new TD(this._featureNames||[],u).add(c).update(c).remove(fp(c,null)).execute(),this._featureNames=u,function(e,t,n){var r=t.getBoxLayoutParams(),o=t.get("padding"),i={width:n.getWidth(),height:n.getHeight()},a=TC(r,i,o);_C(t.get("orient"),e,t.get("itemGap"),a.width,a.height),PC(e,r,i,o)}(o,e,n),o.add(mj(o.getBoundingRect(),e)),a||o.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!gp(l)&&t){var u=l.style||(l.style={}),c=xv(t,Ux.makeFont(u)),d=e.x+o.x,h=!1;e.y+o.y+i+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:i+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,d){var h,p=u[c],f=u[d],m=s[p],g=new _S(m,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(m.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:g.option.onclick,featureName:p};else{var v=PN(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=PS("toolbox-feature"),h.model=g,h.ecModel=t,h.api=n;var y=h instanceof MN;p||!f?!g.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof MN&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};vp(p)?(u={})[l]=p:u=p;vp(f)?(c={})[l]=f:c=f;var m=r.iconPaths={};lp(u,(function(l,u){var p=fP(l,{},{x:-i/2,y:-i/2,width:i,height:i});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new Ux({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:dS({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),yP({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",u])?Sw:Cw)(p),o.add(p),p.on("click",pp(s.onclick,s,t,n,u)),m[u]=p}))}(g,h,p),g.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?Sw:Cw)(r[e])},h instanceof MN&&h.render&&h.render(g,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){lp(this._features,(function(e){e instanceof MN&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){lp(this._features,(function(n){n instanceof MN&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){lp(this._features,(function(n){n instanceof MN&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(C_);const ON=DN;var AN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),i=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:i,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Zh.browser;if(gp(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+i,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=o?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=r+"."+i;if(window.navigator.msSaveOrOpenBlob){for(var f=h.length,m=new Uint8Array(f);f--;)m[f]=h.charCodeAt(f);var g=new Blob([m]);window.navigator.msSaveOrOpenBlob(g,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,b=y.document;b.open("image/svg+xml","replace"),b.write(h),b.close(),y.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var x=n.get("lang"),w='',S=window.open();S.document.write(w),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(MN);const EN=AN;var ZN="__ec_magicType_stack__",LN=[["line","bar"],["stack"]],FN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return lp(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,o=r.get(["seriesIndex",n]);if(jN[n]){var i,a={series:[]};lp(LN,(function(e){ip(e,n)>=0&&lp(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var t=e.subType,o=e.id,i=jN[n](t,o,e,r);i&&(op(i,e.option),a.series.push(i));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,Py).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(i=np({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(MN),jN={line:function(e,t,n,r){if("bar"===e)return np({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return np({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var o=n.get("stack")===ZN;if("line"===e||"bar"===e)return r.setIconStatus("stack",o?"normal":"emphasis"),np({id:t,stack:o?"":ZN},r.get(["option","stack"])||{},!0)}};fD({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));const NN=FN;var zN=new Array(60).join("-"),BN="\t";function VN(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var HN=new RegExp("[\t]+","g");function $N(e,t){var n=e.split(new RegExp("\n*"+zN+"\n*","g")),r={series:[]};return lp(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(BN)>=0)return!0}(e)){var o=function(e){for(var t=e.split(/\n+/g),n=[],r=up(VN(t.shift()).split(HN),(function(e){return{name:e,data:[]}})),o=0;o6}(e)||i){if(a&&!i){"single"===s.brushMode&&vz(e);var l=tp(s);l.brushType=Ez(l.brushType,a),l.panelId=a===JN?null:a.panelId,i=e._creatingCover=uz(e,l),e._covers.push(i)}if(i){var u=Fz[Ez(e._brushType,a)];i.__brushOption.range=u.getCreatingRange(Rz(e,i,e._track)),r&&(cz(e,i),u.updateCommon(e,i)),dz(e,i),o={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&mz(e,t,n)&&vz(e)&&(o={isEnd:r,removeOnClick:!0});return o}function Ez(e,t){return"auto"===e?t.defaultBrushType:e}var Zz={mousedown:function(e){if(this._dragging)Lz(this,e);else if(!e.target||!e.target.draggable){Dz(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=mz(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,o=e._covers,i=mz(e,t,n);if(!e._dragging)for(var a=0;a=0)&&e(o,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=Qz[e.brushType](0,n,t);e.__rangeOffset={offset:eB[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){lp(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&lp(r.coordSyses,(function(r){var o=Qz[e.brushType](1,r,e.range,!0);n(e,o.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){lp(e,(function(e){var n,r,o,i,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=Qz[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?eB[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,o=nB(n),i=nB(r),a=[o[0]/i[0],o[1]/i[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return up(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:Bz(r),isTargetByCursor:Hz(r,e,n.coordSysModel),getLinearBrushOtherExtent:Vz(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&ip(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=qz(t,e),o=0;oe[1]&&e.reverse(),e}function qz(e,t){return _y(e,t,{includeMainTypes:Wz})}var Kz={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,o=e.gridModels,i=Np(),a={},s={};(n||r||o)&&(lp(n,(function(e){var t=e.axis.grid.model;i.set(t.id,t),a[t.id]=!0})),lp(r,(function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0})),lp(o,(function(e){i.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),i.each((function(e){var o=e.coordinateSystem,i=[];lp(o.getCartesians(),(function(e,t){(ip(n,e.getAxis("x").model)>=0||ip(r,e.getAxis("y").model)>=0)&&i.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:Xz.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){lp(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Xz.geo})}))}},Yz=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],Xz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(sP(e)),t}},Qz={lineX:fp(Jz,0),lineY:fp(Jz,1),rect:function(e,t,n,r){var o=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),i=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[Uz([o[0],i[0]]),Uz([o[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:up(n,(function(n){var i=e?t.pointToData(n,r):t.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function Jz(e,t,n,r){var o=n.getAxis(["x","y"][e]),i=Uz(up([0,1],(function(e){return t?o.coordToData(o.toLocalCoord(r[e]),!0):o.toGlobalCoord(o.dataToCoord(r[e]))}))),a=[];return a[e]=i,a[1-e]=[NaN,NaN],{values:i,xyMinMax:a}}var eB={lineX:fp(tB,0),lineY:fp(tB,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return up(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function tB(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function nB(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const rB=Gz;var oB,iB,aB=lp,sB=dy+"toolbox-dataZoom_",lB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oh(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new Nz(n.getZr()),this._brushController.on("brush",pp(this._onBrush,this)).mount()),function(e,t,n,r,o){var i=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(i="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var a=new rB(cB(e),t,{include:["grid"]}),s=a.makePanelOpts(o,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!i||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return YN(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){uB[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new rB(cB(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=YN(e);qN(t,(function(t,r){for(var o=n.length-1;o>=0&&!n[o][r];o--);if(o<0){var i=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(i){var a=i.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function o(e,t,o){var i=t.getAxis(e),a=i.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=IF(0,o.slice(),i.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];aB(e,(function(e,n){t.push(tp(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(MN),uB={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=YN(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return qN(n,(function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){r[n]=e;break}})),r}(this.ecModel))}};function cB(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}oB="dataZoom",iB=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),o=[],i=_y(e,cB(r));return aB(i.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),aB(i.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),o}function a(e,t,n){var i=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:sB+t+i};a[n]=i,o.push(a)}},Dp(null==nk.get(oB)&&iB),nk.set(oB,iB);const dB=lB;var hB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(EC);const pB=hB;function fB(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function mB(e){if(Zh.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,h=l+o,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+o+"px;";return'
    '}(n,r,o)),vp(e))i.innerHTML=e+a;else if(e){i.innerHTML="",mp(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Zh.node&&n.getDom()){var o=OB(r,n);this._ticket="";var i=r.dataByCoordSys,a=function(e,t,n){var r=Ty(e).queryOptionMap,o=r.keys()[0];if(!o||"series"===o)return;var i=Ry(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=i.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=qx(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=IB;l.x=r.x,l.y=r.y,l.update(),qx(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},o)}else if(i)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:i,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=uN(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},o)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},o))}},t.prototype.manuallyHideTip=function(e,t,n,r){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(OB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var o=r.seriesIndex,i=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=i&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===DB([s.getData().getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:i,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,i;if("legend"===qx(n).ssrType)return;this._lastDataByCoordSys=null,kI(n,(function(e){return null!=qx(e).dataIndex?(o=e,!0):null!=qx(e).tooltipConfig?(i=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=pp(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,o=[t.offsetX,t.offsetY],i=DB([t.tooltipOption],r),a=this._renderMode,s=[],l=JM("section",{blocks:[],noHeader:!0}),u=[],c=new u_;lp(e,(function(e){lp(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var i=Gj(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=JM("section",{header:i,noHeader:!Op(i),sortBlocks:!0,blocks:[]});l.blocks.push(d),lp(e.seriesDataIndices,(function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=eZ(t.axis,{value:o}),f.axisValueLabel=i,f.marker=c.makeTooltipMarker("item",xC(f.color),a);var m=vM(h.formatTooltip(p,!0,null)),g=m.frag;if(g){var v=DB([h],r).get("valueFormatter");d.blocks.push(v?rp({valueFormatter:v},g):g)}m.text&&u.push(m.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,h=i.get("order"),p=i_(l,c,a,h,n.get("useUTC"),i.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
    ",m=u.join(f);this._showOrMove(i,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(i,m,s,Math.random()+"",o[0],o[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,o=qx(t),i=o.seriesIndex,a=r.getSeriesByIndex(i),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=DB([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var m=s.getDataParams(l,u),g=new u_;m.marker=g.makeTooltipMarker("item",xC(m.color),d);var v=vM(s.formatTooltip(l,!1,u)),y=p.get("order"),b=p.get("valueFormatter"),x=v.frag,w=x?i_(b?rp({valueFormatter:b},x):x,g,d,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,w,m,S,e.offsetX,e.offsetY,e.position,e.target,g)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=qx(t),o=r.tooltipConfig.option||{};if(vp(o)){o={content:o,formatter:o}}var i=[o],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&i.push(a),i.push({formatter:o.content});var s=e.positionDefault,l=DB(i,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new u_;this._showOrMove(l,(function(){var n=tp(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,o,i,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([o,i],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(vp(c)){var p=e.ecModel.get("useUTC"),f=mp(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=YS(f.axisValue,d,p)),d=bC(d,n,!0)}else if(gp(c)){var m=pp((function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,o,i,u,n,s))}),this);this._ticket=r,d=c(n,r,m)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,o,i,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||mp(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:mp(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,o,i,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=o.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),gp(t)&&(t=t([n,r],i,o.el,h,{viewSize:[s,l],contentSize:u.slice()})),mp(t))n=Wv(t[0],s),r=Wv(t[1],l);else if(xp(t)){var p=t;p.width=u[0],p.height=u[1];var f=TC(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(vp(t)&&a){var m=function(e,t,n,r){var o=n[0],i=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-o/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-o/2,l=t.y-i-a;break;case"bottom":s=t.x+u/2-o/2,l=t.y+c+a;break;case"left":s=t.x-o-a,l=t.y+c/2-i/2;break;case"right":s=t.x+u+a,l=t.y+c/2-i/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=m[0],r=m[1]}else{m=function(e,t,n,r,o,i,a){var s=n.getSize(),l=s[0],u=s[1];null!=i&&(e+l+i+2>r?e-=l+i:e+=i);null!=a&&(t+u+a>o?t-=u+a:t+=a);return[e,t]}(n,r,o,s,l,c?null:20,d?null:20);n=m[0],r=m[1]}if(c&&(n-=AB(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=AB(d)?u[1]/2:"bottom"===d?u[1]:0),fB(e)){m=function(e,t,n,r,o){var i=n.getSize(),a=i[0],s=i[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,o)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,o,s,l);n=m[0],r=m[1]}o.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===e.length;return o&&lp(n,(function(n,i){var a=n.dataByAxis||[],s=(e[i]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&lp(a,(function(e,n){var i=s[n]||{},a=e.seriesDataIndices||[],l=i.seriesDataIndices||[];(o=o&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===l.length)&&lp(a,(function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&lp(e.seriesDataIndices,(function(e){var n=e.seriesIndex,i=t[n],a=r[n];i&&a&&a.data!==i.data&&(o=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Zh.node&&t.getDom()&&(ZP(this,"_updatePosition"),this._tooltipContent.dispose(),aN("itemTooltip",t))},t.type="tooltip",t}(C_);function DB(e,t,n){var r,o=t.ecModel;n?(r=new _S(n,o,o),r=new _S(t.option,r,o)):r=t;for(var i=e.length-1;i>=0;i--){var a=e[i];a&&(a instanceof _S&&(a=a.get("tooltip",!0)),vp(a)&&(a={formatter:a}),a&&(r=new _S(a,r,o)))}return r}function OB(e,t){return e.dispatchAction||pp(t.dispatchAction,t)}function AB(e){return"center"===e||"middle"===e}const EB=RB;var ZB={get:function(e,t,n){var r=tp((LB[e]||{})[t]);return n&&mp(r)?r[r.length-1]:r}},LB={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const FB=ZB;var jB=lp,NB=xp,zB=-1,BB=function(){function e(t){var n=t.mappingMethod,r=t.type,o=this.option=tp(t);this.type=r,this.mappingMethod=n,this._normalizeData=XB[n];var i=e.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[n],"piecewise"===n?(VB(o),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,lp(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(o)):"category"===n?o.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(jB(t,(function(e,t){n[e]=t})),!mp(r)){var o=[];xp(r)?jB(r,(function(e,t){var r=n[t];o[null!=r?r:zB]=e})):o[-1]=r,r=YB(e,o)}for(var i=t.length-1;i>=0;i--)null==r[i]&&(delete n[t[i]],t.pop())}(o):VB(o,!0):(Dp("linear"!==n||o.dataExtent),VB(o))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return pp(this._normalizeData,this)},e.listVisualTypes=function(){return hp(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){xp(e)?lp(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var o,i=mp(t)?[]:xp(t)?{}:(o=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);o?i=a:i[t]=a})),i},e.retrieveVisuals=function(t){var n,r={};return t&&jB(e.visualHandlers,(function(e,o){t.hasOwnProperty(o)&&(r[o]=t[o],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(mp(e))e=e.slice();else{if(!NB(e))return[];var t=[];jB(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,o=1/0,i=0,a=t.length;i"],mp(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return vp(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):gp(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=sV([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var o=n[r],i=e.getDimensionInfo(o);if(!i.isCalculationCoord)return i.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),o=t.controller||(t.controller={});np(r,n),np(o,n);var i=this.isCategory();function a(n){iV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,o),function(e,t,n){var r=e[t],o=e[n];r&&!o&&(o=e[n]={},aV(r,(function(e,t){if(JB.isValidType(t)){var n=FB.get(t,"inactive",i);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";aV(this.stateList,(function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:i?r:[r]}),null==l.symbol&&(l.symbol=t&&tp(t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&tp(n)||(i?s[0]:[s[0],s[0]])),l.symbol=rV(l.symbol,(function(e){return"none"===e?o:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;oV(u,(function(e){e>c&&(c=e)})),l.symbolSize=rV(u,(function(e){return lV(e,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(EC);const cV=uV;var dV=[20,140],hV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=dV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=dV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):mp(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),lp(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Uv((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)}),this),t.push({seriesId:n.id,dataIndex:r})}),this),t},t.prototype.getVisualMeta=function(e){var t=pV(this,"outOfRange",this.getExtent()),n=pV(this,"inRange",this.option.range.slice()),r=[];function o(t,n){r.push({value:t,color:e(t,n)})}for(var i=0,a=0,s=n.length,l=t.length;ae[1])break;n.push({color:this.getControllerVisual(i,"color",t),offset:o/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new jv("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,o=n.handleThumbs,i=n.handleLabels,a=r.itemSize,s=r.getExtent();wV([0,1],(function(l){var u=o[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=xV(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=lP(n.handleLabelPoints[l],sP(u,this.group));i[l].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,r){var o=this.visualMapModel,i=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=xV(e,i,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var m=lP(l.indicatorLabelPoint,sP(u,this.group)),g=l.indicatorLabel;g.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;g.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var b={x:p,y:h,style:{fill:c}},x={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(b,w),g.animateTo(x,w)}else u.attr(b),g.attr(x);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Co[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||_V(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},r={};return o(e||[],n),o(t||[],r,n),[i(n),i(r)];function o(e,t,n){for(var r=0,o=e.length;r=0&&(o.dimension=i,r.push(o))}})),e.getData().setVisual("visualMeta",r)}}];function OV(e,t,n,r){for(var o=t.targetVisuals[r],i=JB.prepareVisualTypes(o),a={color:SI(e.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(IV,RV),lp(DV,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(EV))}function jV(e){e.registerComponentModel(fV),e.registerComponentView(PV),FV(e)}var NV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Oh(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],zV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var o=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=tp(o)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=up(this._pieceList,(function(e){return e=tp(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=JB.listVisualTypes(),o=this.isCategory();function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}lp(t.pieces,(function(e){lp(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),lp(n,(function(e,n){var r=!1;lp(this.stateList,(function(e){r=r||i(t,e,n)||i(t.target,e,n)}),this),!r&&lp(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=FB.get(n,"inRange"===e?"active":"inactive",o)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,lp(r,(function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var i=!1;lp(r,(function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(i?o[n]=!1:i=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=tp(e)},t.prototype.getValueState=function(e){var t=JB.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var o=[],i=r.getData();i.each(this.getDataDimensionIndex(i),(function(t,r){JB.findPieceIndex(t,n)===e&&o.push(r)}),this),t.push({seriesId:r.id,dataIndex:o})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,o=this._pieceList.slice();if(o.length){var i=o[0].interval[0];i!==-1/0&&o.unshift({interval:[-1/0,i]}),(i=o[o.length-1].interval[1])!==1/0&&o.push({interval:[i,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return lp(o,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(o,i){var a=r.getRepresentValue({interval:o});i||(i=r.getValueState(a));var s=e(a,i);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=IS(cV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(cV),zV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var i=(r[1]-r[0])/o;+i.toFixed(n)!==i&&n<5;)n++;t.precision=n,i=+i.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function BV(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const VV=NV;var HV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,o=r.getFont(),i=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=_p(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),lp(l.viewPieceList,(function(r){var l=r.piece,u=new jv;u.onclick=pp(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var h=this.visualMapModel.getValueState(d);u.add(new Ux({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:i,opacity:"outOfRange"===h?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,a),_C(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:bV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return yV(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,o){if(t){var i=new jv,a=this.visualMapModel.textStyleModel;i.add(new Ux({style:iS(a,{x:r?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?o:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=up(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(FI(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var o=tp(n.selected),i=t.getSelectedMapKey(e);"single"===r||!0===r?(o[i]=!0,lp(o,(function(e,t){o[t]=t===i}))):o[i]=!o[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(gV);const $V=HV;function WV(e){e.registerComponentModel(VV),e.registerComponentView($V),FV(e)}function GV(e,t){if(!e)return!1;for(var n=mp(e)?e:[e],r=0;r=0&&(a[i]=+a[i].toFixed(d)),[a,c]}var tH={min:fp(eH,"min"),max:fp(eH,"max"),average:fp(eH,"average"),median:fp(eH,"median")};function nH(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!mp(t.coord)&&mp(o)){var i=rH(t,n,r,e);if((t=tp(t)).type&&tH[t.type]&&i.baseAxis&&i.valueAxis){var a=ip(o,i.baseAxis.dim),s=ip(o,i.valueAxis.dim),l=tH[t.type](n,i.baseDataDim,i.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&mp(o))for(var u=t.coord,c=0;c<2;c++)tH[u[c]]&&(u[c]=aH(n,n.mapDimension(o[c]),u[c]));else t.coord=[];return t}}function rH(e,t,n,r){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(r,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=r.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function oH(e,t){return!(e&&e.containData&&t.coord&&!JV(t))||e.containData(t.coord)}function iH(e,t){return e?function(e,n,r,o){return CM(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,r,o){return CM(e.value,t[o])}}function aH(e,t,n){if("average"===n){var r=0,o=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,o++)})),r/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var sH=ky(),lH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.init=function(){this.markerGroupMap=Np()},t.prototype.render=function(e,t,n){var r=this,o=this.markerGroupMap;o.each((function(e){sH(e).keep=!1})),t.eachSeries((function(e){var o=YV.getMarkerModelFromSeries(e,r.type);o&&r.renderSeries(e,o,t,n)})),o.each((function(e){!sH(e).keep&&r.group.remove(e.group)}))},t.prototype.markKeep=function(e){sH(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;lp(e,(function(e){var r=YV.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl((function(e){e&&(t?kw(e):Mw(e))}))}))},t.type="marker",t}(C_);const uH=lH;var cH=ky(),dH=function(e,t,n,r){var o=r[0],i=r[1];if(o&&i){var a=nH(e,o),s=nH(e,i),l=a.coord,u=s.coord;l[0]=_p(l[0],-1/0),l[1]=_p(l[1],-1/0),u[0]=_p(u[0],1/0),u[1]=_p(u[1],1/0);var c=function(e,t){for(var n=e[0],r=1,o=e.length;rp[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],i=r.getMarkerPosition(f,n,!0)}else{var m=[y=e.get(n[0],t),b=e.get(n[1],t)];a.clampData&&a.clampData(m,m),i=a.dataToPoint(m,!0)}if(AO(a,"cartesian2d")){var g=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),b=e.get(n[1],t);hH(y)?i[0]=g.toGlobalCoord(g.getExtent()["x0"===n[0]?0:1]):hH(b)&&(i[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];return i}var gH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],vH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=YV.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var o=up(gH,(function(o){return mH(r,t,o,e,n)}));r.setItemLayout(t,o),r.getItemGraphicEl(t).setShape("points",o)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new jv});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){var r,o,i=["x0","y0","x1","y1"];if(e){var a=up(e&&e.dimensions,(function(e){var n=t.getData();return rp(rp({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}));o=up(i,(function(e,t){return{name:e,type:a[t%2].type}})),r=new XD(o,n)}else r=new XD(o=[{name:"value",type:"float"}],n);var s=up(n.get("data"),fp(dH,t,e,n));e&&(s=dp(s,fp(fH,e)));var l=e?function(e,t,n,r){return CM(e.coord[Math.floor(r/2)][r%2],o[r])}:function(e,t,n,r){return CM(e.value,o[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(o,e,t);t.setData(u),u.each((function(t){var n=up(gH,(function(n){return mH(u,t,n,e,r)})),i=o.getAxis("x").scale,s=o.getAxis("y").scale,l=i.getExtent(),c=s.getExtent(),d=[i.parse(u.get("x0",t)),i.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];Uv(d),Uv(h);var p=!!(l[0]>d[1]||l[1]h[1]||c[1]0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var w=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*m+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*x+l[0],r.y=l[1]+S,d=v[0]<0?"right":"left",r.originX=-f*x,r.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=b[0],r.y=b[1]+S,d="center",r.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*x+u[0],r.y=u[1]+S,d=v[0]>=0?"right":"left",r.originX=f*x,r.originY=-S}r.scaleX=r.scaleY=o,r.setStyle({verticalAlign:r.__verticalAlign||h,align:r.__align||d})}}}function C(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(jv);const OH=DH;function AH(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:oS(t)}}function EH(e){return isNaN(e[0])||isNaN(e[1])}function ZH(e){return e&&!EH(e[0])&&!EH(e[1])}const LH=function(){function e(e){this.group=new jv,this._LineCtor=e||OH}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=e,o||r.removeAll();var i=AH(e);e.diff(o).add((function(n){t._doAdd(e,n,i)})).update((function(n,r){t._doUpdate(o,e,r,n,i)})).remove((function(e){r.remove(o.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=AH(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r=0&&bp(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=l,o=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else o=[]}var m=[nH(e,o[0]),nH(e,o[1]),rp({},o[2])];return m[2].type=m[2].type||null,np(m[2],m[0]),np(m[2],m[1]),m};function NH(e){return!isNaN(e)&&!isFinite(e)}function zH(e,t,n,r){var o=1-e,i=r.dimensions[e];return NH(t[o])&&NH(n[o])&&t[e]===n[e]&&r.getAxis(i).containData(t[e])}function BH(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(zH(1,n,r,e)||zH(0,n,r,e)))return!0}return oH(e,t[0])&&oH(e,t[1])}function VH(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=Wv(s.get("x"),o.getWidth()),u=Wv(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)i=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);i=a.dataToPoint([d,h])}if(AO(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;NH(e.get(c[0],t))?i[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):NH(e.get(c[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];e.setItemLayout(t,i)}var HH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=YV.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),o=FH(t).from,i=FH(t).to;o.each((function(t){VH(o,t,!0,e,n),VH(i,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[o.getItemLayout(e),i.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new LH);this.group.add(l.group);var u=function(e,t,n){var r;r=e?up(e&&e.dimensions,(function(e){return rp(rp({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new XD(r,n),i=new XD(r,n),a=new XD([],n),s=up(n.get("data"),fp(jH,t,e,n));e&&(s=dp(s,fp(BH,e)));var l=iH(!!e,r);return o.initData(up(s,(function(e){return e[0]})),null,l),i.initData(up(s,(function(e){return e[1]})),null,l),a.initData(up(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:o,to:i,line:a}}(o,e,t),c=u.from,d=u.to,h=u.line;FH(t).from=c,FH(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),m=t.get("symbolRotate"),g=t.get("symbolOffset");function v(t,n,o){var i=t.getItemModel(n);VH(t,n,o,e,r);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=SI(a,"color")),t.setItemVisual(n,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:Tp(i.get("symbolOffset",!0),g[o?0:1]),symbolRotate:Tp(i.get("symbolRotate",!0),m[o?0:1]),symbolSize:Tp(i.get("symbolSize"),f[o?0:1]),symbol:Tp(i.get("symbol",!0),p[o?0:1]),style:s})}mp(p)||(p=[p,p]),mp(f)||(f=[f,f]),mp(m)||(m=[m,m]),mp(g)||(g=[g,g]),u.from.each((function(e){v(c,e,!0),v(d,e,!1)})),h.each((function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})})),l.updateData(h),u.line.eachItemGraphicEl((function(e){qx(e).dataModel=t,e.traverse((function(e){qx(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(uH);const $H=HH;var WH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(YV);const GH=WH;function UH(e,t,n){var r=t.coordinateSystem;e.each((function(o){var i,a=e.getItemModel(o),s=Wv(a.get("x"),n.getWidth()),l=Wv(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(r){var u=e.get(r.dimensions[0],o),c=e.get(r.dimensions[1],o);i=r.dataToPoint([u,c])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(o,i)}))}var qH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Oh(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=YV.getMarkerModelFromSeries(e,"markPoint");t&&(UH(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new vO),u=function(e,t,n){var r;r=e?up(e&&e.dimensions,(function(e){return rp(rp({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new XD(r,n),i=up(n.get("data"),fp(nH,t));e&&(i=dp(i,fp(oH,e)));var a=iH(!!e,r);return o.initData(i,null,a),o}(o,e,t);t.setData(u),UH(t.getData(),e,r),u.each((function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),o=n.getShallow("symbolSize"),i=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(gp(r)||gp(o)||gp(i)||gp(s)){var c=t.getRawValue(e),d=t.getDataParams(e);gp(r)&&(r=r(c,d)),gp(o)&&(o=o(c,d)),gp(i)&&(i=i(c,d)),gp(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=SI(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:r,symbolSize:o,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:h})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){qx(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(uH);const KH=qH;function YH(e,t,n){var r=zh.createCanvas(),o=t.getWidth(),i=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=o*n,r.height=i*n,r}const XH=function(e){function t(t,n,r){var o,i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,r=r||ov,"string"==typeof t?o=YH(t,n,r):xp(t)&&(t=(o=t).id),i.id=t,i.dom=o;var a=o.style;return a&&(Bp(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),i.painter=n,i.dpr=r,i}return Gp(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=YH("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,i=[],a=this.maxRepaintRectCount,s=!1,l=new Qf(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new Qf(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,o=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=h.dpr,w=0;w0&&e>r[0]){for(s=0;se);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r0?e$:0),this._needsManuallyCompositing),u.__builtin__||ep("ZLevel "+l+" has been used by unkown layer "+u.id),u!==i&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,t(o),i=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}t(o),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,lp(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?np(n[e],t,!0):n[e]=t;for(var r=0;r10&&"cartesian2d"===i.type&&o){var s=i.getBaseAxis(),l=i.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===o&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var p=void 0;vp(o)?p=UO[o]:gp(o)&&(p=o),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,qO))}}}})},function(e){e.registerChartView(tA),e.registerSeriesModel(oA)},function(e){e.registerChartView(DA),e.registerSeriesModel(ZA),function(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:"series",subType:e,query:n},(function(e){r.push(e.seriesIndex)})),r}lp([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],(function(e){t(e[0],(function(t,r,o){t=rp({},t),o.dispatchAction(rp(t,{type:e[1],seriesIndex:n(r,t)}))}))}))}("pie",e.registerAction),e.registerLayout(fp(uA,"pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf((function(e){for(var t=r.getName(e),o=0;o{if(null!==f.current&&null===m.current&&(m.current=function(e,t,n){var r=!(n&&n.ssr);if(r){var o=uD(e);if(o)return o}var i=new UR(e,t,n);return i.id="ec_"+aD++,oD[i.id]=i,r&&Dy(e,lD,i.id),VR(i),fR.trigger("afterinit",i),i}(f.current,n,{renderer:r??"canvas"}),void 0!==m.current))return m.current.setOption(h.current,!0),null==c||c(m.current),void 0!==l&&(l.current=m.current),()=>{null!==m.current&&(m.current.dispose(),m.current=null)}}),[l,c,n,r]),(0,d.useEffect)((()=>{m.current&&u&&(m.current.group=u,function(e){if(mp(e)){var t=e;e=null,lp(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+sD++,lp(t,(function(t){t.group=e}))}iD[e]=!0}([m.current]))}),[u,m]),(0,d.useEffect)((()=>{void 0===p.current||kD()(p.current,t)||m.current&&(m.current.setOption(t,!0),p.current=t)}),[t]),(0,d.useLayoutEffect)((()=>{const e=wc()((()=>{m.current&&m.current.resize()}),200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[]),(0,d.useEffect)((()=>{const e=m.current;if(e&&void 0!==s)return function(e,t){if(void 0===t)return;function n(t,n){"function"==typeof n&&(!function(e){return n$.includes(e)}(t)?!function(e){return r$.includes(e)}(t)?e.on(t,(()=>n(null,e))):e.on(t,(e=>n(e))):e.on(t,(t=>n(t,e))))}for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const r=t[e]??null;r&&n(e,r)}}(e,s),()=>{if(void 0!==e&&!0!==e.isDisposed())for(const t in s)e.off(t)}}),[s]),(0,d.useEffect)((()=>{wc()((()=>{m.current&&m.current.resize()}),200,{leading:!0})()}),[i,a]),(0,o.jsx)(to.Z,{ref:f,sx:i,style:a})}));var i$=n(58730);function a$(e){const{error:t}=e;return(0,o.jsx)(i$.Z,{severity:"error",children:t.message})}var s$=n(82231);const l$=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function u$(e){let{value:t,onChange:n}=e;return(0,o.jsx)(Vc,{label:"Font Size",control:(0,o.jsx)(Uc,{value:l$.find((e=>e.value===t)),options:l$,getOptionLabel:e=>e.label,onChange:(e,t)=>{let{value:r}=t;n(r)},disableClearable:!0})})}var c$=n(99481);function d$(e){let{action:t,submitText:n="Save",cancelText:r="Cancel",isReadonly:i,isValid:s,onActionChange:u,onSubmit:c,onDelete:d,onCancel:h,...p}=e;return(0,o.jsx)(l.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},...p,children:"read"===t?(0,o.jsxs)(o.Fragment,{children:[u&&(0,o.jsx)(a.Z,{disabled:i,variant:"contained",onClick:()=>u("update"),children:"Edit"}),d&&(0,o.jsx)(a.Z,{color:"error",disabled:i,variant:"outlined",onClick:d,children:"Delete"}),h&&(c||d)&&(0,o.jsx)(c$.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey[500],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),h&&(0,o.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:h,children:r})]}):(0,o.jsxs)(o.Fragment,{children:[c&&(0,o.jsx)(a.Z,{variant:"contained",disabled:!s,onClick:c,children:n}),h&&(0,o.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:h,children:r})]})})}var h$=n(40182),p$=n(73079);let f$=[],m$=[];function g$(e){if(e<768)return!1;for(let t=0,n=f$.length;;){let r=t+n>>1;if(e=m$[r]))return!0;t=r+1}if(t==n)return!1}}function v$(e){return e>=127462&&e<=127487}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let t=0,n=0;t2&&void 0!==arguments[2])||arguments[2]?b$:x$)(e,t,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function b$(e,t,n){if(t==e.length)return t;t&&S$(e.charCodeAt(t))&&C$(e.charCodeAt(t-1))&&t--;let r=w$(e,t);for(t+=k$(r);t=0&&v$(w$(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function x$(e,t,n){for(;t>0;){let r=b$(e,t-2,n);if(r=56320&&e<57344}function C$(e){return e>=55296&&e<56320}function k$(e){return e<65536?1:2}class M${lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=E$(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),T$.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;[e,t]=E$(this,e,t);let n=[];return this.decompose(e,t,n,0),T$.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new R$(this),o=new R$(e);for(let e=t,i=t;;){if(r.next(e),o.next(e),e=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(i+=r.value.length,r.done||i>=n)return!0}}iter(){return new R$(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}iterRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new D$(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new O$(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new _$(e):T$.from(_$.split(e,[])):M$.empty}constructor(){}}class _$ extends M${get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.text[o],a=r+i.length;if((t?n:a)>=e)return new A$(r,a,n,i);r=a+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new _$(I$(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=P$(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new _$(t,e.length+o.length));else{let e=t.length>>1;n.push(new _$(t.slice(0,e)),new _$(t.slice(e)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof _$))return super.replace(e,t,n);[e,t]=E$(this,e,t);let r=P$(this.text,P$(n.text,I$(this.text,0,e)),t),o=this.length+n.length-(t-e);return r.length<=32?new _$(r,o):T$.from(_$.split(r,[]),o)}sliceString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n";[e,t]=E$(this,e,t);let r="";for(let o=0,i=0;o<=t&&ie&&i&&(r+=n),eo&&(r+=a.slice(Math.max(0,e-o),t-o)),o=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let o of e)n.push(o),r+=o.length+1,32==n.length&&(t.push(new _$(n,r)),n=[],r=-1);return r>-1&&t.push(new _$(n,r)),t}constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}}class T$ extends M${lineInner(e,t,n,r){for(let o=0;;o++){let i=this.children[o],a=r+i.length,s=n+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,n,r);r=a+1,n=s+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o=i){let o=r&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?n.push(a):a.decompose(e-i,t-i,n,o)}i=s+1}}replace(e,t,n){if([e,t]=E$(this,e,t),n.lines=o&&t<=a){let s=i.replace(e-o,t-o,n),l=this.lines-i.lines+s.lines;if(s.lines>4&&s.lines>l>>6){let o=this.children.slice();return o[r]=s,new T$(o,this.length-(t-e)+n.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,n)}sliceString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n";[e,t]=E$(this,e,t);let r="";for(let o=0,i=0;oe&&o&&(r+=n),ei&&(r+=a.sliceString(e-i,t-i,n)),i=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof T$))return 0;let n=0,[r,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==i||o==a)return n;let s=this.children[r],l=e.children[o];if(s!=l)return n+s.scanIdentical(l,t);n+=s.length+1}}static from(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.reduce(((e,t)=>e+t.length+1),-1),n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new _$(n,t)}let r=Math.max(32,n>>5),o=r<<1,i=r>>1,a=[],s=0,l=-1,u=[];function c(e){let t;if(e.lines>o&&e instanceof T$)for(let t of e.children)c(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof _$&&s&&(t=u[u.length-1])instanceof _$&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,u[u.length-1]=new _$(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&d(),s+=e.lines,l+=e.length+1,u.push(e))}function d(){0!=s&&(a.push(1==u.length?u[0]:T$.from(u,l)),l=-1,s=u.length=0)}for(let t of e)c(t);return d(),1==a.length?a[0]:new T$(a,t)}constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}}function P$(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9;for(let o=0,i=0,a=!0;i=n&&(l>r&&(s=s.slice(0,r-o)),o>1,a=r instanceof _$?r.text.length:r.children.length;if(i==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof _$){let o=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof _$?o.text.length:o.children.length)<<1))}}}next(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof _$?e.text.length:e.children.length)<<1]}}class D${nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}constructor(e,t,n){this.value="",this.done=!1,this.cursor=new R$(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}}class O${next(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}}"undefined"!=typeof Symbol&&(M$.prototype[Symbol.iterator]=function(){return this.iter()},R$.prototype[Symbol.iterator]=D$.prototype[Symbol.iterator]=O$.prototype[Symbol.iterator]=function(){return this});class A${get length(){return this.to-this.from}constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}}function E$(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function Z$(e,t){return y$(e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2],!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function L$(e,t){let n=e.charCodeAt(t);if(!(r=n,r>=55296&&r<56320&&t+1!=e.length))return n;var r;let o=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(o)?o-56320+(n-55296<<10)+65536:n}function F$(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function j$(e){return e<65536?1:2}const N$=/\r\n?|\n/;var z$=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(z$||(z$={}));class B${get length(){let e=0;for(let t=0;t1&&void 0!==arguments[1]&&arguments[1])}get invertedDesc(){let e=[];for(let t=0;t1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:G$(this,e,t)}mapPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z$.Simple,r=0,o=0;for(let i=0;ie)return o+(e-r);o+=a}else{if(n!=z$.Simple&&l>=e&&(n==z$.TrackDel&&re||n==z$.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?o:o+s;o+=s}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;for(let n=0,r=0;n=0&&r<=t&&o>=e)return!(rt)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new B$(e)}static create(e){return new B$(e)}constructor(e){this.sections=e}}class V$ extends B${apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return W$(this,((t,n,r,o,i)=>e=e.replace(r,r+(n-t),i)),!1),e}mapDesc(e){return G$(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,o=0;r=0){t[r]=a,t[r+1]=i;let s=r>>1;for(;n.length1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:G$(this,e,t,!0)}iterChanges(e){W$(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}get desc(){return B$.create(this.sections)}filter(e){let t=[],n=[],r=[],o=new q$(this);e:for(let i=0,a=0;;){let s=i==e.length?1e9:e[i++];for(;a0&&$$(n,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a>1].toJSON()))}return e}static of(e,t,n){let r=[],o=[],i=0,a=null;function s(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&!r.length)return;ia||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let c=u?"string"==typeof u?M$.of(u.split(n||N$)):u:M$.empty,d=c.length;if(e==a&&0==d)return;ei&&H$(r,e-i,-1),H$(r,a-e,d),$$(o,r,c),i=a}}(e),s(!a),a}static empty(e){return new V$(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;n.length3&&void 0!==arguments[3]&&arguments[3];if(0==t&&n<=0)return;let o=e.length-2;o>=0&&n<=0&&n==e[o+1]?e[o]+=t:o>=0&&0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function $$(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,u,i,c,d),o=u,i=c}}}function G$(e,t,n){let r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,i=new q$(e),a=new q$(t);for(let e=-1;;){if(i.done&&a.len||a.done&&i.len)throw new Error("Mismatched change set lengths");if(-1==i.ins&&-1==a.ins){let e=Math.min(i.len,a.len);H$(r,e,-1),i.forward(e),a.forward(e)}else if(a.ins>=0&&(i.ins<0||e==i.i||0==i.off&&(a.len=0&&e=0)){if(i.done&&a.done)return o?V$.createSet(r,o):B$.create(r);throw new Error("Mismatched change set lengths")}{let t=0,n=i.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new q$(e),i=new q$(t);for(let e=!1;;){if(o.done&&i.done)return r?V$.createSet(n,r):B$.create(n);if(0==o.ins)H$(n,o.len,0,e),o.next();else if(0!=i.len||i.done){if(o.done||i.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,i.len),a=n.length;if(-1==o.ins){let o=-1==i.ins?-1:i.off?0:i.ins;H$(n,t,o,e),r&&o&&$$(r,n,i.text)}else-1==i.ins?(H$(n,o.off?0:o.len,t,e),r&&$$(r,n,o.textBit(t))):(H$(n,o.off?0:o.len,i.off?0:i.ins,e),r&&!i.off&&$$(r,n,i.text));e=(o.ins>t||i.ins>=0&&i.len>t)&&(e||n.length>a),o.forward2(t),i.forward(t)}}else H$(n,0,i.ins,e),r&&$$(r,n,i.text),i.next()}}class q${next(){let{sections:e}=this.set;this.i>1;return t>=e.length?M$.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?M$.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}constructor(e){this.set=e,this.i=0,this.next()}}class K${get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return this.empty?t=n=e.mapPos(this.from,r):(t=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),t==this.from&&n==this.to?this:new K$(t,n,this.flags)}extend(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e<=this.anchor&&t>=this.anchor)return Y$.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Y$.range(this.anchor,n)}eq(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Y$.range(e.anchor,e.head)}static create(e,t,n){return new K$(e,t,n)}constructor(e,t,n){this.from=e,this.to=t,this.flags=n}}class Y${map(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e.empty?this:Y$.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n1&&void 0!==arguments[1])||arguments[1];return Y$.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,n=this.ranges.slice();return n[t]=e,Y$.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Y$(e.ranges.map((e=>K$.fromJSON(e))),e.main)}static single(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new Y$([Y$.range(e,t)],0)}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return K$.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}static range(e,t,n,r){let o=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return te?8:0)|o)}static normalized(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;nr.head?Y$.range(a,i):Y$.range(i,a))}}return new Y$(e,t)}constructor(e,t){this.ranges=e,this.mainIndex=t}}function X$(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let Q$=0;class J${get reader(){return this}static define(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new J$(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:eW),!!e.static,e.enables)}of(e){return new tW([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new tW(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new tW(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}constructor(e,t,n,r,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Q$++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}}function eW(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class tW{dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,u=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||u.push(e[n.id]);return{create:e=>(e.values[i]=n(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||rW(e,u)){let t=n(e);if(a?!nW(t,e.values[i],r):!r(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=yW(t,l);if(this.dependencies.every((n=>n instanceof J$?t.facet(n)===e.facet(n):!(n instanceof aW)||t.field(n,!1)==e.field(n,!1)))||(a?nW(s=n(e),o,r):r(s=n(e),o)))return e.values[i]=o,0}else s=n(e);return e.values[i]=s,1}}}constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Q$++}}function nW(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id])),o=n.map((e=>e.type)),i=r.filter((e=>!(1&e))),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(iW).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],o=this.updateF(r,n);return this.compareF(r,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>{let r,o=e.facet(iW),i=n.facet(iW);return(r=o.find((e=>e.field==this)))&&r!=i.find((e=>e.field==this))?(e.values[t]=r.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,iW.of({field:this,create:e})]}get extension(){return this}constructor(e,t,n,r,o){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=o,this.provides=void 0}}const sW=4,lW=3,uW=2,cW=1;function dW(e){return t=>new pW(t,e)}const hW={highest:dW(0),high:dW(cW),default:dW(uW),low:dW(lW),lowest:dW(sW)};class pW{constructor(e,t){this.inner=e,this.prec=t}}class fW{of(e){return new mW(this,e)}reconfigure(e){return fW.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class mW{constructor(e,t){this.compartment=e,this.inner=t}}class gW{staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],o=Object.create(null),i=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],o=new Map;function i(e,a){let s=o.get(e);if(null!=s){if(s<=a)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof mW&&n.delete(e.compartment)}if(o.set(e,a),Array.isArray(e))for(let t of e)i(t,a);else if(e instanceof mW){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),i(r,a)}else if(e instanceof pW)i(e.inner,e.prec);else if(e instanceof aW)r[a].push(e),e.provides&&i(e.provides,a);else if(e instanceof tW)r[a].push(e),e.facet.extensions&&i(e.facet.extensions,uW);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(t,a)}}return i(e,uW),r.reduce(((e,t)=>e.concat(t)))}(e,t,i))n instanceof aW?r.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),s=[],l=[];for(let e of r)a[e.id]=l.length<<1,l.push((t=>e.slot(t)));let u=null==n?void 0:n.config.facets;for(let e in o){let t=o[e],r=t[0].facet,i=u&&u[e]||[];if(t.every((e=>0==e.type)))if(a[r.id]=s.length<<1|1,eW(i,t))s.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));s.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));a[r.id]=l.length<<1,l.push((e=>oW(e,r,t)))}}let c=l.map((e=>e(a)));return new gW(e,i,c,a,s,o)}constructor(e,t,n,r,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function yW(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const bW=J$.define(),xW=J$.define({combine:e=>e.some((e=>e)),static:!0}),wW=J$.define({combine:e=>e.length?e[0]:void 0,static:!0}),SW=J$.define(),CW=J$.define(),kW=J$.define(),MW=J$.define({combine:e=>!!e.length&&e[0]});class _W{static define(){return new TW}constructor(e,t){this.type=e,this.value=t}}class TW{of(e){return new _W(this,e)}}class PW{of(e){return new IW(this,e)}constructor(e){this.map=e}}class IW{map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new IW(this.type,t)}is(e){return this.type==e}static define(){return new PW((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}constructor(e,t){this.type=e,this.value=t}}IW.reconfigure=IW.define(),IW.appendConfig=IW.define();class RW{static create(e,t,n,r,o,i){return new RW(e,t,n,r,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(RW.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}constructor(e,t,n,r,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&X$(n,t.newLength),o.some((e=>e.type==RW.time))||(this.annotations=o.concat(RW.time.of(Date.now())))}}function DW(e,t){let n=[];for(let r=0,o=0;;){let i,a;if(r=e[r]))i=e[r++],a=e[r++];else{if(!(o=0;o--){let i=n[o](e);i&&Object.keys(i).length&&(r=OW(r,AW(t,i,e.changes.newLength),!0))}return r==e?e:RW.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(SW)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:DW(n,t))}if(!0!==n){let r,o;if(!1===n)o=e.changes.invertedDesc,r=V$.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=RW.create(t,r,e.selection&&e.selection.map(o),IW.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let r=t.facet(CW);for(let n=r.length-1;n>=0;n--){let o=r[n](e);e=o instanceof RW?o:Array.isArray(o)&&1==o.length&&o[0]instanceof RW?o[0]:EW(t,LW(o),!1)}return e}(o):o)}RW.time=_W.define(),RW.userEvent=_W.define(),RW.addToHistory=_W.define(),RW.remote=_W.define();const ZW=[];function LW(e){return null==e?ZW:Array.isArray(e)?e:[e]}var FW=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(FW||(FW={}));const jW=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let NW;try{NW=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function zW(e){return t=>{if(!/\S/.test(t))return FW.Space;if(function(e){if(NW)return NW.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||jW.test(n)))return!0}return!1}(t))return FW.Word;for(let n=0;n-1)return FW.Word;return FW.Other}}class BW{field(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.config.address[e.id];if(null!=n)return vW(this,n),yW(this,n);if(t)throw new RangeError("Field is not present in this state")}update(){for(var e=arguments.length,t=new Array(e),n=0;no.set(t,e))),n=null),o.set(t.value.compartment,t.value.extension)):t.is(IW.reconfigure)?(n=null,r=t.value):t.is(IW.appendConfig)&&(n=null,r=LW(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=gW.resolve(r,o,this),t=new BW(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let i=e.startState.facet(xW)?e.newSelection:e.newSelection.asSingle();new BW(n,e.newDoc,i,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:Y$.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),o=[n.range],i=LW(n.effects);for(let n=1;n0&&void 0!==arguments[0]?arguments[0]:[];return e instanceof V$?e:V$.of(e,this.doc.length,this.facet(BW.lineSeparator))}toText(e){return M$.of(e.split(this.facet(BW.lineSeparator)||N$))}sliceDoc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(vW(this,t),yW(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof aW&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let o=n[t],i=e[t];r.push(o.init((e=>o.spec.fromJSON(i,e))))}return BW.create({doc:e.doc,selection:Y$.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=gW.resolve(e.extensions||[],new Map),n=e.doc instanceof M$?e.doc:M$.of((e.doc||"").split(t.staticFacet(BW.lineSeparator)||N$)),r=e.selection?e.selection instanceof Y$?e.selection:Y$.single(e.selection.anchor,e.selection.head):Y$.single(0);return X$(r,n.length),t.staticFacet(xW)||(r=r.asSingle()),new BW(t,n,r,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(BW.tabSize)}get lineBreak(){return this.facet(BW.lineSeparator)||"\n"}get readOnly(){return this.facet(MW)}phrase(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{if("$"==t)return"$";let r=+(t||1);return!r||r>n.length?e:n[r-1]}))),e}languageDataAt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[];for(let o of this.facet(bW))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&r.push(i[e]);return r}charCategorizer(e){return zW(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-n,a=e-n;for(;i>0;){let e=Z$(t,i,!1);if(o(t.slice(e,i))!=FW.Word)break;i=e}for(;a2&&void 0!==arguments[2]?arguments[2]:{},r={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=r[e];if(void 0===i)r[e]=o;else if(i===o||void 0===o);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](i,o)}}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}BW.allowMultipleSelections=xW,BW.tabSize=J$.define({combine:e=>e.length?e[0]:4}),BW.lineSeparator=wW,BW.readOnly=MW,BW.phrases=J$.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((n=>e[n]==t[n]))}}),BW.languageData=bW,BW.changeFilter=SW,BW.transactionFilter=CW,BW.transactionExtender=kW,fW.reconfigure=IW.define();class HW{eq(e){return this==e}range(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return $W.create(e,t,this)}}HW.prototype.startSide=HW.prototype.endSide=0,HW.prototype.point=!1,HW.prototype.mapMode=z$.TrackDel;class $W{static create(e,t,n){return new $W(e,t,n)}constructor(e,t,n){this.from=e,this.to=t,this.value=n}}function WW(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class GW{get length(){return this.to[this.to.length-1]}findIndex(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=n?this.to:this.from;for(let i=r,a=o.length;;){if(i==a)return i;let r=i+a>>1,s=o[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==i)return s>=0?i:a;s>=0?a=r:i=r+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);ou||l==u&&c.startSide>0&&c.endSide<=0)continue;(u-l||c.endSide-c.startSide)<0||(i<0&&(i=l),c.point&&(a=Math.max(a,u-l)),n.push(c),r.push(l-i),o.push(u-i))}return{mapped:n.length?new GW(r,o,n,a):null,pos:i}}constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}}class UW{static create(e,t,n,r){return new UW(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(n&&(t=t.slice().sort(WW)),this.isEmpty)return t.length?UW.of(t):this;let a=new YW(this,null,-1).goto(0),s=0,l=[],u=new qW;for(;a.value||s=0){let e=t[s++];u.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||oa.to||o=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}iter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return XW.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return XW.from(e).goto(t)}static compare(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=KW(i,a,n),l=new JW(i,s,o),u=new JW(a,s,o);n.iterGaps(((e,t,n)=>eG(l,e,u,t,n,r))),n.empty&&0==n.length&&eG(l,0,u,0,0,r)}static eq(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let a=KW(o,i),s=new JW(o,a,0).goto(n),l=new JW(i,a,0).goto(n);for(;;){if(s.to!=l.to||!tG(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(e,t,n,r){let o=new JW(e,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(t),i=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),s=o.pointFromi&&(r.span(i,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);i=o.to,o.next()}}static of(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new qW;for(let r of e instanceof $W?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(WW);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return UW.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=UW.empty;r=r.nextLayer)t=new UW(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}}UW.empty=new UW([],[],null,-1),UW.empty.nextLayer=UW.empty;class qW{finishChunk(e){this.chunks.push(new GW(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new qW)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(UW.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=UW.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}}function KW(e,t,n){let r=new Map;for(let t of e)for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[];for(let o=0;o=n&&r.push(new YW(i,t,n,o));return 1==r.length?r[0]:new XW(r)}get startSide(){return this.value?this.value.startSide:0}goto(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)QW(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)QW(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),QW(this.heap,0)}}constructor(e){this.heap=e}}function QW(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let o=e[r];if(r+1=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class JW{goto(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){nG(this.active,e),nG(this.activeTo,e),nG(this.activeRank,e),this.minActive=oG(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:o}=this.cursor;for(;t0;)t++;rG(this.active,t,n),rG(this.activeTo,t,r),rG(this.activeRank,t,o),e&&rG(e,t,this.cursor.from),this.minActive=oG(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&nG(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=XW.from(e,t,n)}}function eG(e,t,n,r,o,i){e.goto(t),n.goto(r);let a=r+o,s=r,l=r-t;for(;;){let t=e.to+l-n.to,r=t||e.endSide-n.endSide,o=r<0?e.to+l:n.to,u=Math.min(o,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&tG(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(s,u,e.point,n.point):u>s&&!tG(e.active,n.active)&&i.compareRange(s,u,e.active,n.active),o>a)break;(t||e.openEnd!=n.openEnd)&&i.boundChange&&i.boundChange(o),s=o,r<=0&&e.next(),r>=0&&n.next()}}function tG(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function oG(e,t){let n=-1,r=1e9;for(let o=0;o2&&void 0!==arguments[2]?arguments[2]:e.length,r=0;for(let o=0;o=t)return r;if(r==e.length)break;o+=9==e.charCodeAt(r)?n-o%n:1,r=Z$(e,r)}return!0===r?-1:e.length}const sG="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),lG="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),uG="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class cG{getRules(){return this.rules.join("\n")}static newName(){let e=uG[sG]||1;return uG[sG]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[lG],o=n&&n.nonce;r?o&&r.setNonce(o):r=new hG(e,o),r.mount(Array.isArray(t)?t:[t],e)}constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),u=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let n in t){let a=t[n];if(/&/.test(n))o(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");o(r(n),a,s,u)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+a+";")}(s.length||u)&&i.push((!n||l||a?e:e.map(n)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(r(t),e[t],this.rules)}}let dG=new Map;class hG{mount(e,t){let n=this.sheet,r=0,o=0;for(let t=0;t-1&&(this.modules.splice(a,1),o--,a=-1),-1==a){if(this.modules.splice(o++,0,i),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mG="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),gG="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),vG=0;vG<10;vG++)pG[48+vG]=pG[96+vG]=String(vG);for(vG=1;vG<=24;vG++)pG[vG+111]="F"+vG;for(vG=65;vG<=90;vG++)pG[vG]=String.fromCharCode(vG+32),fG[vG]=String.fromCharCode(vG);for(var yG in pG)fG.hasOwnProperty(yG)||(fG[yG]=pG[yG]);function bG(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function xG(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function wG(e,t){if(!t.anchorNode)return!1;try{return xG(e,t.anchorNode)}catch(e){return!1}}function SG(e){return 3==e.nodeType?ZG(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function CG(e,t,n,r){return!!n&&(_G(e,t,n,r,-1)||_G(e,t,n,r,1))}function kG(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function MG(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function _G(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:TG(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=kG(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?TG(e):0}}}function TG(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function PG(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function IG(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function RG(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class DG{eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?TG(t):0),n,Math.min(e.focusOffset,n?TG(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}}let OG,AG=null;function EG(e){if(e.setActive)return e.setActive();if(AG)return e.focus(AG);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==AG?{get preventScroll(){return AG={preventScroll:!0},!0}}:void 0),!AG){AG=!1;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:t,r=OG||(OG=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function LG(e,t,n,r){let o={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:o.altKey,ctrlKey:o.ctrlKey,shiftKey:o.shiftKey,metaKey:o.metaKey}=r);let i=new KeyboardEvent("keydown",o);i.synthetic=!0,e.dispatchEvent(i);let a=new KeyboardEvent("keyup",o);return a.synthetic=!0,e.dispatchEvent(a),i.defaultPrevented||a.defaultPrevented}function FG(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function jG(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function NG(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=TG(n)}else{if(!n.parentNode||MG(n))return null;r=kG(n),n=n.parentNode}}}function zG(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,i=-1,a=-1;for(let s=0,l=n,u=n;st)return n.domBoundsAround(e,t,l);if(c>=e&&-1==r&&(r=s,o=l),l>t&&n.dom.parentNode==this.dom){i=s,a=u;break}u=c,l=c+n.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].dom:null}}markDirty(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:VG;this.markDirty();for(let r=e;r0&&void 0!==arguments[0]?arguments[0]:this.length;return new WG(this.children,e,this.children.length)}childPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,o,i){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}constructor(){this.parent=null,this.dom=null,this.flags=2}}function $G(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}HG.prototype.breakAfter=0;class WG{findPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}}function GG(e,t,n,r,o,i,a,s,l){let{children:u}=e,c=u.length?u[t]:null,d=i.length?i[i.length-1]:null,h=d?d.breakAfter:a;if(!(t==r&&c&&!a&&!h&&i.length<2&&c.merge(n,o,i.length?d:null,0==n,s,l))){if(r0&&(!a&&i.length&&c.merge(n,c.length,i[0],!1,s,0)?c.breakAfter=i.shift().breakAfter:(n2);var iU={mac:oU||/Mac/.test(qG.platform),windows:/Win/.test(qG.platform),linux:/Linux|X11/.test(qG.platform),ie:JG,ie_version:XG?KG.documentMode||6:QG?+QG[1]:YG?+YG[1]:0,gecko:eU,gecko_version:eU?+(/Firefox\/(\d+)/.exec(qG.userAgent)||[0,0])[1]:0,chrome:!!tU,chrome_version:tU?+tU[1]:0,ios:oU,android:/Android\b/.test(qG.userAgent),webkit:nU,safari:rU,webkit_version:nU?+(/\bAppleWebKit\/(\d+)/.exec(qG.userAgent)||[0,0])[1]:0,tabSize:null!=KG.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class aU extends HG{get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof aU)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new aU(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new BG(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let o=t,i=t,a=0;0==t&&n<0||t==r&&n>=0?iU.chrome||iU.gecko||(t?(o--,a=1):i=0)?0:s.length-1];iU.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(e=>e.width))||l);return a?PG(l,a<0):l||null}(this.dom,e,t)}constructor(e){super(),this.text=e}}class sU extends HG{setAttrs(e){if(FG(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,o,i){return(!n||!(!(n instanceof sU&&n.mark.eq(this.mark))||e&&o<=0||te&&t.push(n=e&&(r=o),n=a,o++}let i=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new sU(this.mark,t,i)}domAtPos(e){return cU(this,e)}coordsAt(e,t){return hU(this,e,t)}constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}}class lU extends HG{static create(e,t,n){return new lU(e,t,n)}split(e){let t=lU.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof lU&&this.widget.compare(n.widget))||e>0&&o<=0||t0)?BG.before(this.dom):BG.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?r.length-1:0;o=r[t],!(e>0?0==t:t==r.length-1||o.top0?BG.before(this.dom):BG.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return M$.empty}get isHidden(){return!0}constructor(e){super(),this.side=e}}function cU(e,t){let n=e.dom,{children:r}=e,o=0;for(let e=0;oe&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=o;e0&&t instanceof sU&&o.length&&(r=o[o.length-1])instanceof sU&&r.mark.eq(t.mark)?dU(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function hU(e,t,n){let r=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,u=0;l=s&&(c.children.length?e(c,s-u):(!i||i.isHidden&&n>0)&&(d>s||u==d&&c.getSide()>0)?(i=c,a=s-u):(u-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function gU(e,t,n){let r=!1;if(t)for(let o in t)n&&o in n||(r=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function vU(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new CU(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:o,end:i}=kU(e,r);t=(o?r?-3e8:-1:5e8)-1,n=1+(i?r?2e8:1:-6e8)}return new CU(e,t,n,r,e.widget||null,!0)}static line(e){return new SU(e)}static set(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return UW.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}}xU.none=UW.empty;class wU extends xU{eq(e){var t,n;return this==e||e instanceof wU&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&mU(this.attrs,e.attrs,"class")}range(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}constructor(e){let{start:t,end:n}=kU(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}}wU.prototype.point=!1;class SU extends xU{eq(e){return e instanceof SU&&this.spec.class==e.spec.class&&mU(this.spec.attributes,e.spec.attributes)}range(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}constructor(e){super(-2e8,-2e8,null,e)}}SU.prototype.mapMode=z$.TrackBefore,SU.prototype.point=!0;class CU extends xU{get type(){return this.startSide!=this.endSide?bU.WidgetRange:this.startSide<=0?bU.WidgetBefore:bU.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof CU&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}constructor(e,t,n,r,o,i){super(t,n,o,e),this.block=r,this.isReplace=i,this.mapMode=r?t<=0?z$.TrackBefore:z$.TrackAfter:z$.TrackDel}}function kU(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function MU(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}CU.prototype.point=!0;class _U extends HG{merge(e,t,n,r,o,i){if(n){if(!(n instanceof _U))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),UG(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let t=new _U;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){mU(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){dU(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=pU(t,this.attrs||{})),n&&(this.attrs=pU({class:n},this.attrs||{}))}domAtPos(e){return cU(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(FG(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(gU(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&HG.get(r)instanceof sU;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=HG.get(r))||void 0===n?void 0:n.isEditable)||iU.ios&&this.children.some((e=>e instanceof aU))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof aU)||/[^ -~]/.test(n.text))return null;let r=SG(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=hU(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(o instanceof _U)return o;if(i>t)break}r=i+o.breakAfter}return null}constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}}class TU extends HG{merge(e,t,n,r,o,i){return!(n&&(!(n instanceof TU&&this.widget.compare(n.widget))||e>0&&o<=0||t0)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}}class PU extends yU{toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}constructor(e){super(),this.height=e}}class IU{posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof TU&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new _U),this.atCursorPos=!0),this.curLine}flushBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(RU(new uU(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof TU||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(RU(new aU(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof CU){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof CU)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new TU(n.widget||DU.block,a,n));else{let i=lU.create(n.widget||DU.inline,a,a?0:n.startSide),s=this.atCursorPos&&!i.isEditable&&o<=r.length&&(e0),l=!i.isEditable&&(er.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(u.append(RU(new uU(1),r),o),o=r.length+Math.max(0,o-r.length)),u.append(RU(i,r),o),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,r,o){let i=new IU(e,t,n,o);return i.openEnd=UW.spans(r,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}}function RU(e,t){for(let n of t)e=new sU(n,[e],e.length);return e}class DU extends yU{eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}constructor(e){super(),this.tag=e}}DU.inline=new DU("span"),DU.block=new DU("div");var OU=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(OU||(OU={}));const AU=OU.LTR,EU=OU.RTL;function ZU(e){let t=[];for(let n=0;n=t){if(a.level==n)return i;(o<0||(0!=r?r<0?a.fromt:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}constructor(e,t,n){this.from=e,this.to=t,this.level=n}}function HU(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&a.push(new VU(l,f.from,h)),GU(e,f.direction==AU!=!(h%2)?r+1:r,o,f.inner,f.from,f.to,a),l=f.to}p=f.to}else{if(p==n||(t?$U[p]!=s:$U[p]==s))break;p++}d?WU(e,l,p,r+1,o,d,a):lt;){let n=!0,c=!1;if(!u||l>i[u-1].to){let e=$U[l-1];e!=s&&(n=!1,c=16==e)}let d=n||1!=s?null:[],h=n?r:r+1,p=l;e:for(;;)if(u&&p==i[u-1].to){if(c)break e;let f=i[--u];if(!n)for(let e=f.from,n=u;;){if(e==t)break e;if(!n||i[n-1].to!=e){if($U[e-1]==s)break e;break}e=i[--n].from}if(d)d.push(f);else{f.to=0;e-=3)if(NU[e+1]==-n){let t=NU[e+2],n=2&t?o:4&t?1&t?i:o:0;n&&($U[a]=$U[NU[e]]=n),s=e;break}}else{if(189==NU.length)break;NU[s++]=a,NU[s++]=t,NU[s++]=l}else if(2==(r=$U[a])||1==r){let e=r==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let n=NU[t+2];if(2&n)break;if(e)NU[t+2]|=2;else{if(4&n)break;NU[t+2]|=4}}}}}(e,o,i,r,s),function(e,t,n,r){for(let o=0,i=r;o<=n.length;o++){let a=o?n[o-1].to:e,s=ol;)t==i&&(t=n[--r].from,i=r?n[r-1].to:e),$U[--t]=c;l=a}else i=a,l++}}}(o,i,r,s),WU(e,o,i,t,n,r,a)}function UU(e,t,n){if(!e)return[new VU(0,0,t==EU?1:0)];if(t==AU&&!n.length&&!BU.test(e))return qU(e.length);if(n.length)for(;e.length>$U.length;)$U[$U.length]=256;let r=[],o=t==AU?0:1;return GU(e,o,o,n,0,e.length,r),r}function qU(e){return[new VU(0,e,0)]}let KU="";function YU(e,t,n,r,o){var i;let a=r.head-e.from,s=VU.find(t,a,null!==(i=r.bidiLevel)&&void 0!==i?i:-1,r.assoc),l=t[s],u=l.side(o,n);if(a==u){let e=s+=o?1:-1;if(e<0||e>=t.length)return null;l=t[s=e],a=l.side(!o,n),u=l.side(o,n)}let c=Z$(e.text,a,l.forward(o,n));(cl.to)&&(c=u),KU=e.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d&&c==u&&d.level+(o?0:1)e.some((e=>e))}),lq=J$.define({combine:e=>e.some((e=>e))}),uq=J$.define();class cq{map(e){return e.empty?this:new cq(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new cq(Y$.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}constructor(e,t="nearest",n="nearest",r=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o,this.isSnapshot=i}}const dq=IW.define({map:(e,t)=>e.map(t)}),hq=IW.define();function pq(e,t,n){let r=e.facet(tq);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const fq=J$.define({combine:e=>!e.length||e[0]});let mq=0;const gq=J$.define();class vq{static define(e,t){const{eventHandlers:n,eventObservers:r,provide:o,decorations:i}=t||{};return new vq(mq++,e,n,r,(e=>{let t=[gq.of(e)];return i&&t.push(wq.of((t=>{let n=t.plugin(e);return n?i(n):xU.none}))),o&&t.push(o(e)),t}))}static fromClass(e,t){return vq.define((t=>new e(t)),t)}constructor(e,t,n,r,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=o(this)}}class yq{update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(pq(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){pq(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){pq(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}}const bq=J$.define(),xq=J$.define(),wq=J$.define(),Sq=J$.define(),Cq=J$.define(),kq=J$.define();function Mq(e,t){let n=e.state.facet(kq);if(!n.length)return n;let r=n.map((t=>t instanceof Function?t(e):t)),o=[];return UW.spans(r,t.from,t.to,{point(){},span(e,n,r,i){let a=e-t.from,s=n-t.from,l=o;for(let e=r.length-1;e>=0;e--,i--){let n,o=r[e].spec.bidiIsolate;if(null==o&&(o=XU(t.text,a,s)),i>0&&l.length&&(n=l[l.length-1]).to==a&&n.direction==o)n.to=s,l=n.inner;else{let e={from:a,to:s,direction:o,inner:[]};l.push(e),l=e.inner}}}}),o}const _q=J$.define();function Tq(e){let t=0,n=0,r=0,o=0;for(let i of e.state.facet(_q)){let a=i(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(n=Math.max(n,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(o=Math.max(o,a.bottom)))}return{left:t,right:n,top:r,bottom:o}}const Pq=J$.define();class Iq{join(e){return new Iq(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAu)break;o+=2}if(!s)return n;new Iq(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),i=s.toA,a=s.toB}}constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}}class Rq{static create(e,t,n){return new Rq(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=V$.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges(((e,t,n,o)=>r.push(new Iq(e,t,n,o)))),this.changedRanges=r}}class Dq extends HG{get length(){return this.view.state.doc.length}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((e=>{let{fromA:t,toA:n}=e;return nthis.minWidthTo}))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,r)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let o=r>-1?function(e,t,n){let r=Oq(e,n);if(!r)return null;let{node:o,from:i,to:a}=r,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;let l=t.invertedDesc,u=new Iq(l.mapPos(i),l.mapPos(a),i,a),c=[];for(let t=o.parentNode;;t=t.parentNode){let n=HG.get(t);if(n instanceof sU)c.push({node:t,deco:n.mark});else{if(n instanceof _U||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:u,text:o,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new wU({inclusive:!0,attributes:vU(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new Iq(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(iU.ie||iU.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,n){let r=new Aq;return UW.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=Iq.extendWithRanges(n,i),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=iU.chrome||iU.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let i,a,s,l,{fromA:u,toA:c,fromB:d,toB:h}=t;if(n&&n.range.fromBd){let e=IU.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=IU.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),i=e.content.concat(r).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=IU.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=o.findPos(c,1),{i:m,off:g}=o.findPos(u,-1);GG(this,m,g,p,f,i,a,s,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(hq)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new aU(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new sU(n,[t],t.length);let n=new _U;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=HG.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)n=r.childPos(n.off,1),r=r.children[n.i],t(o>=0?e.marks[o].node:e.text,r)}updateSelection(){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let t=this.view.root.activeElement,n=t==this.dom,r=!n&&!(this.view.state.facet(fq)||this.dom.tabIndex>-1)&&wG(this.dom,this.view.observer.selectionRange)&&!(t&&this.dom.contains(t));if(!(n||e||r))return;let o=this.forceSelection;this.forceSelection=!1;let i=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(i.anchor)),s=i.empty?a:this.moveToLine(this.domAtPos(i.head));if(iU.gecko&&i.empty&&!this.hasComposition&&(1==(l=a).node.nodeType&&l.node.firstChild&&(0==l.offset||"false"==l.node.childNodes[l.offset-1].contentEditable)&&(l.offset==l.node.childNodes.length||"false"==l.node.childNodes[l.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=s=new BG(e,0),o=!0}var l;let u=this.view.observer.selectionRange;!o&&u.focusNode&&(CG(a.node,a.offset,u.anchorNode,u.anchorOffset)&&CG(s.node,s.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,i))||(this.view.observer.ignore((()=>{iU.android&&iU.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=bG(this.view.root);if(e)if(i.empty){if(iU.gecko){let e=(n=a.node,o=a.offset,1!=n.nodeType?0:(o&&"false"==n.childNodes[o-1].contentEditable?1:0)|(oi.head&&([a,s]=[s,a]),t.setEnd(s.node,s.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var n,o;r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),t&&t.focus())})),this.view.observer.setSelectionRange(a,s)),this.impreciseAnchor=a.precise?null:new BG(u.anchorNode,u.anchorOffset),this.impreciseHead=s.precise?null:new BG(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&CG(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=bG(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let i=_U.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&n.collapse(r,o)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=HG.get(n.childNodes[r]);e instanceof _U&&(t=e.domAtPos(e.length))}return t?new BG(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=HG.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(se||a.covers(1))&&(!n||a instanceof _U&&!(n instanceof _U&&t>=0)))n=a,r=l;else if(n&&l==e&&s==e&&a instanceof TU&&Math.abs(t)<2){if(a.deco.startSide<0)break;i&&(n=null)}o=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof _U))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof aU))return null;let o=Z$(r.text,n);if(o==n)return null;let i=ZG(r.dom,n,o).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==OU.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=u.dom.getBoundingClientRect();if(t.push(n.height),i){let t=u.dom.lastChild,r=t?SG(t):[];if(r.length){let t=r[r.length-1],i=s?t.right-n.left:n.right-t.left;i>a&&(a=i,this.minWidth=o,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?OU.RTL:OU.LTR}measureTextSize(){for(let e of this.children)if(e instanceof _U){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let o=SG(r.firstChild)[0];e=r.getBoundingClientRect().height,t=o?o.width/27:7,n=o?o.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,t=this.children.length;return t&&(e-=this.children[--t].length),new WG(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){let r=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(xU.replace({widget:new PU(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return xU.set(e)}updateDeco(){let e=1,t=this.view.state.facet(wq).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,r=this.view.state.facet(Sq).map(((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e}));for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(UW.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let o=Tq(this.view),i={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,r,o,i,a,s){let l=e.ownerDocument,u=l.defaultView||window;for(let c=e,d=!1;c&&!d;)if(1==c.nodeType){let e,h=c==l.body,p=1,f=1;if(h)e=IG(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:p,scaleY:f}=RG(c,t)),e={left:t.left,right:t.left+c.clientWidth*p,top:t.top,bottom:t.top+c.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+i)):t.right>e.right&&(m=t.right-e.right+i,n<0&&t.lefte.bottom||t.lefte.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,i,n.heade?t.left-e:Math.max(0,e-t.right)}function Zq(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Lq(e,t){return e.topt.top+1}function Fq(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Nq(e,t,n){let r,o,i,a,s,l,u,c,d=!1;for(let h=e.firstChild;h;h=h.nextSibling){let e=SG(h);for(let p=0;pg||a==g&&i>m){r=h,o=f,i=m,a=g;let s=g?n0?p0)}0==m?n>f.bottom&&(!u||u.bottomf.top)&&(l=h,c=f):u&&Lq(u,f)?u=jq(u,f.bottom):c&&Lq(c,f)&&(c=Fq(c,f.top))}}if(u&&u.bottom>=n?(r=s,o=u):c&&c.top<=n&&(r=l,o=c),!r)return{node:e,offset:0};let h=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?zq(r,h,n):d&&"false"!=r.contentEditable?Nq(r,h,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function zq(e,t,n){let r=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&c=(u.left+u.right)/2,r=n;if(iU.chrome||iU.gecko){ZG(e,s).getBoundingClientRect().left==u.right&&(r=!n)}if(c<=0)return{node:e,offset:s+(r?1:0)};o=s+(r?1:0),i=c}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function Bq(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:u}=e.viewState,{x:c,y:d}=t,h=d-l;if(h<0)return 0;if(h>u)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(h),a.type!=bU.Text;)for(;h=r>0?a.bottom+t:a.top-t,!(h>=0&&h<=u);){if(o)return n?null:0;o=!0,r=-r}d=l+h;let p=a.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Vq(e,s,a,c,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(c,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(c=Math.max(s.left+1,Math.min(s.right-1,c)),g=m.elementFromPoint(c,d),g&&!e.contentDOM.contains(g)&&(g=null));let v,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,d);e&&({offsetNode:v,offset:y}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(c,d);t&&(({startContainer:v,startOffset:y}=t),(!e.contentDOM.contains(v)||iU.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return ZG(e,r-1,r).getBoundingClientRect().left>n}(v,y,c)||iU.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():ZG(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(v,y,c))&&(v=void 0))}v&&(y=Math.min(TG(v),y))}if(!v||!e.docView.dom.contains(v)){let t=_U.find(e.docView,p);if(!t)return h>a.top+a.height/2?a.to:a.from;({node:v,offset:y}=Nq(t.dom,c,d))}let b=e.docView.nearest(v);if(!b)return null;if(b.isWidget&&1==(null===(i=b.dom)||void 0===i?void 0:i.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+aG(a,i,e.state.tabSize)}function Hq(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==bU.Text))return e;return n}function $q(e,t,n,r){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=YU(o,i,a,s,n),u=KU;if(!t){if(o.number==(n?e.state.doc.lines:1))return s;u="\n",o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),t=e.visualLineSide(o,!n)}if(l){if(!l(u))return s}else{if(!r)return t;l=r(u)}s=t}}function Wq(e,t,n){for(;;){let r=0;for(let o of e)o.between(t-1,t+1,((e,o,i)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return r==n.from?n:Y$.cursor(r,re)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){if(e.cmIgnore)return;let t=HG.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Kq(e,n.node,n.offset)?t:0))}constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(BW.lineSeparator)}}function Kq(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:o,impreciseAnchor:i}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;n&&(t.push(new Yq(n,r)),o==n&&i==r||t.push(new Yq(o,i)));return t}(e),n=new qq(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?Y$.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!xG(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!xG(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((iU.ios||iU.chrome)&&e.state.selection.main.empty&&n!=r&&(a.from>0||a.toDate.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:a}=t.bounds,s=o.from,l=null;(8===i||iU.android&&t.text.length0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,i-Math.min(a,s))-i}if(a=a?i-n:0,s=i+(s-a),a=i}else if(s=s?i-n:0,a=i+(a-s),s=i}return{from:i,toA:a,toB:s}}(e.state.doc.sliceString(r,a,Uq),t.text,s-r,l);u&&(iU.chrome&&13==i&&u.toB==u.from+2&&t.text.slice(u.from,u.toB)==Uq+Uq&&u.toB--,n={from:r+u.from,to:r+u.toA,insert:M$.of(t.text.slice(u.from,u.toB).split(Uq))})}else r&&(!e.hasFocus&&e.state.facet(fq)||r.main.eq(o))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!o.empty&&r&&r.main.empty?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:(iU.mac||iU.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=Y$.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:M$.of([n.insert.toString().replace("."," ")])}):n&&n.from>=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:iU.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=Y$.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:M$.of([" "])}),n)return Jq(e,n,r,i);if(r&&!r.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function Jq(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;if(iU.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(iU.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&" "==e.state.sliceDoc(t.from,o.from))&&1==t.insert.length&&2==t.insert.lines&&LG(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.lengtho.head)&&LG(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&LG(e.contentDOM,"Delete",46)))return!0;let i,a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>i||(i=function(e,t,n){let r,o=e.state,i=o.selection.main;if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=i.fromt.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=i.to&&t.to>=i.to-10){let l,u=e.state.sliceDoc(t.from,t.to),c=n&&Oq(e,n.main.head);if(c){let e=t.insert.length-(t.to-t.from);l={from:c.from,to:c.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to,h=i.to-i.from;r=o.changeByRange((n=>{if(n.from==i.from&&n.to==i.to)return{changes:a,range:s||n.map(a)};let r=n.to-d,c=r-u.length;if(n.to-n.from!=h||e.state.sliceDoc(c,r)!=u||n.to>=l.from&&n.from<=l.to)return{range:n};let p=o.changes({from:c,to:r,insert:t.insert}),f=n.to-i.to;return{changes:p,range:s?Y$.range(Math.max(0,s.anchor+f),Math.max(0,s.head+f)):n.map(p)}}))}else r={changes:a,selection:s&&o.selection.replaceRange(s)}}let a="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1));return o.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(rq).some((n=>n(e,t.from,t.to,a,s)))||e.dispatch(s()),!0}class eK{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=HG.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then((()=>this.runHandlers(e.type,e))):this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let o=e.domEventHandlers[r];o&&n(r).handlers.push(tK(t.value,o))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let o=e.domEventObservers[r];o&&n(r).observers.push(tK(t.value,o))}}for(let e in sK)n(e).handlers.push(sK[e]);for(let e in lK)n(e).observers.push(lK[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=n[e];i&&o!=!i.handlers.length&&(r.removeEventListener(e,this.handleEvent),i=null),i||r.addEventListener(e,this.handleEvent,{passive:o})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&oK.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),iU.android&&iU.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!iU.ios||e.synthetic||e.altKey||e.metaKey||!((t=nK.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||rK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(iU.safari&&!iU.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,iU.safari&&e.contentDOM.addEventListener("input",(()=>null)),iU.gecko&&(t=e.contentDOM.ownerDocument,_K.has(t)||(_K.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{}))))}}function tK(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){pq(n.state,e)}}}const nK=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],rK="dthko",oK=[16,17,18,20,91,92,224,225];function iK(e){return.7*Math.max(0,e)+8}class aK{start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,o=0,i=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:i}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=Tq(this.view);e.clientX-s.left<=r+6?t=-iK(r-e.clientX):e.clientX+s.right>=i-6&&(t=iK(e.clientX-i)),e.clientY-s.top<=o+6?n=-iK(o-e.clientY):e.clientY+s.bottom>=a-6&&(n=iK(e.clientY-a)),this.setScrollSpeed(t,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;ne.isUserEvent("input.type")))?this.destroy():this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t,n,r=e.ownerDocument;for(let o=e.parentNode;o&&!(o==r.body||t&&n);)if(1==o.nodeType)!n&&o.scrollHeight>o.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(Cq).map((t=>t(e)));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(BW.allowMultipleSelections)&&function(e,t){let n=e.state.facet(QU);return n.length?n[0](t):iU.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=bG(e.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=xK(t))&&null}}const sK=Object.create(null),lK=Object.create(null),uK=iU.ie&&iU.ie_version<15||iU.ios&&iU.webkit_version<604;function cK(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function dK(e,t){t=cK(e.state,iq,t);let n,{state:r}=e,o=1,i=r.toText(t),a=i.lines==r.selection.ranges.length;if(null!=SK&&r.selection.ranges.every((e=>e.empty))&&SK==i.toString()){let e=-1;n=r.changeByRange((n=>{let s=r.doc.lineAt(n.from);if(s.from==e)return{range:n};e=s.from;let l=r.toText((a?i.line(o++).text:t)+r.lineBreak);return{changes:{from:s.from,insert:l},range:Y$.cursor(n.from+l.length)}}))}else n=a?r.changeByRange((e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:Y$.cursor(e.from+t.length)}})):r.replaceSelection(i);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function hK(e,t,n,r){if(1==r)return Y$.cursor(t,n);if(2==r)return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return Y$.cursor(t);0==i?n=1:i==o.length&&(n=-1);let a=i,s=i;n<0?a=Z$(o.text,i,!1):s=Z$(o.text,i);let l=r(o.text.slice(a,s));for(;a>0;){let e=Z$(o.text,a,!1);if(r(o.text.slice(e,a))!=l)break;a=e}for(;s{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},sK.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),lK.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},lK.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},sK.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(eq))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=mK(e,t),r=xK(t),o=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get(t,i,a){let s,l=mK(e,t),u=hK(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!i){let t=hK(e,n.pos,n.bias,r),o=Math.min(t.from,u.from),i=Math.max(t.to,u.to);u=o1&&(s=function(e,t){for(let n=0;n=t)return Y$.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(o,l.pos))?s:a?o.addRange(u):Y$.create([u])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new aK(e,t,n,r)),r&&e.observer.ignore((()=>{EG(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()}));let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}return!1};let pK=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function fK(e,t,n,r){let o=_U.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&pK(n,r,a))return-1;let s=o.coordsAt(i,1);return s&&pK(n,r,s)?1:a&&a.bottom>=r?-1:1}function mK(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:fK(e,n,t.clientX,t.clientY)}}const gK=iU.ie&&iU.ie_version<=11;let vK=null,yK=0,bK=0;function xK(e){if(!gK)return e.detail;let t=vK,n=bK;return vK=e,bK=Date.now(),yK=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(yK+1)%3:1}function wK(e,t,n,r){if(!(n=cK(e.state,iq,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=r&&i&&function(e,t){let n=e.state.facet(JU);return n.length?n[0](t):iU.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:n},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}sK.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=Y$.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",cK(e.state,aq,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},sK.dragend=e=>(e.inputState.draggedContent=null,!1),sK.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{++o==n.length&&wK(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return wK(e,t,n,!0),!0}return!1},sK.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=uK?null:t.clipboardData;return n?(dK(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),dK(e,n.value)}),50)}(e),!1)};let SK=null;sK.copy=sK.cut=(e,t)=>{let{text:n,ranges:r,linewise:o}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let o=-1;for(let{from:r}of e.selection.ranges){let i=e.doc.lineAt(r);i.number>o&&(t.push(i.text),n.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}r=!0}return{text:cK(e,aq,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!o)return!1;SK=o?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=uK?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((()=>{r.remove(),e.focus()}),50)}(e,n),!1)};const CK=_W.define();function kK(e,t){let n=[];for(let r of e.facet(oq)){let o=r(e,t);o&&n.push(o)}return n?e.update({effects:n,annotations:CK.of(!0)}):null}function MK(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=kK(e.state,t);n?e.dispatch(n):e.update([])}}),10)}lK.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),MK(e)},lK.blur=e=>{e.observer.clearSelectionRange(),MK(e)},lK.compositionstart=lK.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},lK.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,iU.chrome&&iU.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50))},lK.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},sK.beforeinput=(e,t)=>{var n,r;if("insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),o=t.getTargetRanges();if(r&&o.length){let t=o[0],n=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return Jq(e,{from:n,to:i,insert:e.state.toText(r)},null),!0}}let o;if(iU.chrome&&iU.android&&(o=nK.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return iU.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),iU.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>lK.compositionend(e,t)),20),!1};const _K=new Set;const TK=["pre-wrap","normal","pre-line","break-spaces"];let PK=!1;function IK(){PK=!1}class RK{heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return TK.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=o,s){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>EK&&(PK=!0),this.height=e)}replace(e,t,n){return ZK.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let o=this,i=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:u,toB:c}=r[a],d=o.lineAt(s,AK.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:o.lineAt(l,AK.ByPosNoHeight,n,0,0);for(c+=h.to-l,l=h.to;a>0&&d.from<=r[a-1].toA;)s=r[a-1].fromA,u=r[a-1].fromB,a--,s2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,r-=o.size}else{if(!(o>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,o-=t.size}}else if(r=o&&i(this.blockAt(0,n,r,o))}updateHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=t&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}constructor(e,t,n){super(e,t),this.deco=n}}class jK extends FK{blockAt(e,t,n,r){return new OK(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof jK||r instanceof NK&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof NK?r=new jK(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ZK.of(n)}updateHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}}class NK extends ZK{heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-r+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);n=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:a}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let o=r+(e0){let e=n[n.length-1];e instanceof NK?n[n.length-1]=new NK(e.length+r):n.push(null,new NK(r-1))}if(e>0){let t=n[0];t instanceof NK?n[0]=new NK(e+t.length):n.unshift(new NK(e-1),null)}return ZK.of(n)}decomposeLeft(e,t){t.push(new NK(e-1),null)}decomposeRight(e,t){t.push(null,new NK(this.length-e-1))}updateHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],i=Math.max(t,r.from),a=-1;for(r.from>t&&n.push(new NK(r.from-t-1).updateHeight(e,t));i<=o&&r.more;){let t=e.doc.lineAt(i).length;n.length&&n.push(null);let o=r.heights[r.index++];-1==a?a=o:Math.abs(o-a)>=EK&&(a=-2);let s=new jK(t,o);s.outdated=!1,n.push(s),i+=t+1}i<=o&&n.push(null,new NK(o-i).updateHeight(e,i));let s=ZK.of(n);return(a<0||Math.abs(s.height-this.height)>=EK||Math.abs(a-this.heightMetrics(e,t).perLine)>=EK)&&(PK=!0),LK(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}constructor(e){super(e,0)}}class zK extends ZK{get break(){return 1&this.flags}blockAt(e,t,n,r){let o=n+this.left.height;return ea))return l;let u=t==AK.ByPosNoHeight?AK.ByPosNoHeight:AK.ByPos;return s?l.join(this.right.lineAt(a,u,n,i,a)):this.left.lineAt(a,u,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let a=r+this.left.height,s=o+this.left.length+this.break;if(this.break)e=s&&this.right.forEachLine(e,t,n,a,s,i);else{let l=this.lineAt(s,AK.ByPos,n,r,o);e=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,i)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of n)o.push(e);if(e>0&&BK(o,i-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?ZK.of(this.break?[e,null,t]:[e,t]):(this.left=LK(this.left,e),this.right=LK(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,{left:o,right:i}=this,a=t+o.length+this.break,s=null;return r&&r.from<=t+o.length&&r.more?s=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=a+i.length&&r.more?s=i=i.updateHeight(e,a,n,r):i.updateHeight(e,a,n),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}}function BK(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof NK&&(r=e[t+1])instanceof NK&&e.splice(t-1,3,new NK(n.length+1+r.length))}class VK{get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof jK?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new jK(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new jK(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new NK(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof jK)return e;let t=new jK(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof jK||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();i=Math.max(i,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(t==e.parentNode?o.innerHeight:l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}}function WK(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class GK{static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n{let{from:t,to:n}=e;return r>=t&&r<=n}))){let{from:t,to:n}=this.lineBlockAt(r);e.push(new KK(t,n))}}return this.viewports=e.sort(((e,t)=>e.from-t.from)),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?QK:new JK(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(eY(e,this.scaler))}))}update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(wq).filter((e=>"function"!=typeof e));let r=e.changedRanges,o=Iq.extendWithRanges(r,function(e,t,n){let r=new HK;return UW.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:V$.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);IK(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=i||PK)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(lq)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?OU.RTL:OU.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,u=0;if(a.width&&a.height){let{scaleX:e,scaleY:n}=RG(t,a);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,i=s=!0)}let c=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==d||(this.paddingTop=c,this.paddingBottom=d,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=jG(e.scrollDOM);let p=(this.printing?WK:$K)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}(e.dom))return 0;let v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(i=!0),i||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=n>0&&r.refresh(o,n,a,s,v/a,t),i&&(e.docView.minWidth=0,l|=16)}f>0&&m>0?u=Math.max(f,m):f<0&&m<0&&(u=Math.min(f,m)),IK();for(let n of this.viewports){let o=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(i?ZK.empty().applyChanges(this.stateDeco,M$.empty,this.heightOracle,[new Iq(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new DK(n.from,o))}PK&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),l|=this.updateForViewport()),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new KK(r.lineAt(i-1e3*n,AK.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-n),AK.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(es.to){let n,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,AK.ByPos,o,0,0);n="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;let{top:o}=this.heightMap.lineAt(t,AK.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(n,AK.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(0==t||o<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||i>=s+Math.max(10,Math.min(r,250)))&&o>a-2e3&&i>1,i=r<<1;if(this.defaultTextDirection!=OU.LTR&&!n)return[];let a=[],s=(r,i,l,u)=>{if(i-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt))));if(!h){if(ie.from<=i&&e.to>=i))){let e=t.moveToLineBoundary(Y$.cursor(i),!1,!0).head;e>r&&(i=e)}let e=this.gapSize(l,r,i,u);h=new GK(r,i,e,n||e<2e6?e:2e6)}a.push(h)},l=t=>{if(t.lengtho&&(r.push({from:o,to:e}),i+=e-o),o=t}},20),o2e6)for(let n of e)n.from>=t.from&&n.fromt.from&&s(t.from,a,t,o),le.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];UW.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||eY(this.heightMap.lineAt(e,AK.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((t=>t.top<=e&&t.bottom>=e))||eY(this.heightMap.lineAt(this.scaler.fromDOM(e),AK.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return eY(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=QK,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=OU.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(xq).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new RK(t),this.stateDeco=e.facet(wq).filter((e=>"function"!=typeof e)),this.heightMap=ZK.empty().applyChanges(this.stateDeco,M$.empty,this.heightOracle.setDoc(e.doc),[new Iq(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xU.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}}class KK{constructor(e,t){this.from=e,this.to=t}}function YK(e,t){let{total:n,ranges:r}=e;if(t<=0)return r[0].from;if(t>=1)return r[r.length-1].to;let o=Math.floor(n*t);for(let e=0;;e++){let{from:t,to:n}=r[e],i=n-t;if(o<=i)return t+o;o-=i}}function XK(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}const QK={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class JK{toDOM(e){for(let t=0,n=0,r=0;;t++){let o=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to)))}constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map((n=>{let{from:o,to:i}=n,a=t.lineAt(o,AK.ByPos,e,0,0).top,s=t.lineAt(i,AK.ByPos,e,0,0).bottom;return r+=s-a,{from:o,to:i,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}}function eY(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new OK(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((e=>eY(e,t))):e._content)}const tY=J$.define({combine:e=>e.join(" ")}),nY=J$.define({combine:e=>e.indexOf(!0)>-1}),rY=cG.newName(),oY=cG.newName(),iY=cG.newName(),aY={"&light":"."+oY,"&dark":"."+iY};function sY(e,t,n){return new cG(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const lY=sY("."+rY,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},aY),uY={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},cY=iU.ie&&iU.ie_version<=11;class dY{onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(fq)?n.root.activeElement!=this.dom:!wG(this.dom,r))return;let o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(iU.ie&&iU.ie_version<=11||iU.android&&iU.chrome)&&!n.state.selection.main.empty&&r.focusNode&&CG(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=bG(e.root);if(!t)return!1;let n=iU.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return pY(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?pY(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=wG(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&LG(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let o of e){let e=this.readMutation(o);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&wG(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new Xq(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Qq(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=hY(t,e.previousSibling||e.target.previousSibling,-1),r=hY(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(fq)!=e.state.facet(fq)&&(e.view.contentDOM.editContext=e.state.facet(fq)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new DG,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(iU.ie&&iU.ie_version<=11||iU.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===e.constructor.EDIT_CONTEXT||iU.chrome&&iU.chrome_version<126||(this.editContext=new fY(e),e.state.facet(fq)&&(e.contentDOM.editContext=this.editContext.editContext)),cY&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}}function hY(e,t,n){for(;t;){let r=HG.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function pY(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return CG(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}class fY{applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges(((o,i,a,s,l)=>{if(n)return;let u=l.length-(i-o);if(r&&i>=r.to){if(r.from==o&&r.to==i&&r.insert.eq(l))return r=this.pendingContextChange=null,t+=u,void(this.to+=u);r=null,this.revertPending(e.state)}if(o+=t,(i+=t)<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),l.toString()),this.to+=u}t+=u})),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some((e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==r||this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to3e4)}toEditorPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.to-this.from;e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=t=>{let n=e.state.selection.main,{anchor:r,head:o}=n,i=this.toEditorPos(t.updateRangeStart),a=this.toEditorPos(t.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:t.updateRangeStart,editorBase:i,drifted:!1});let s={from:i,to:a,insert:M$.of(t.text.split("\n"))};if(s.from==this.from&&rthis.to&&(s.to=r),s.from!=s.to||s.insert.length){if((iU.mac||iU.android)&&s.from==o-1&&/^\. ?$/.test(t.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(s={from:i,to:a,insert:M$.of([t.text.replace("."," ")])}),this.pendingContextChange=s,!e.state.readOnly){let n=this.to-this.from+(s.to-s.from+s.insert.length);Jq(e,s,Y$.single(this.toEditorPos(t.selectionStart,n),this.toEditorPos(t.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))}else{let r=Y$.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd));r.main.eq(n)||e.dispatch({selection:r,userEvent:"select"})}},this.handlers.characterboundsupdate=n=>{let r=[],o=null;for(let t=this.toEditorPos(n.rangeStart),i=this.toEditorPos(n.rangeEnd);t{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if("None"!=t&&"None"!=r){let o=this.toEditorPos(e.rangeStart),i=this.toEditorPos(e.rangeEnd);if(o{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=bG(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}}class mY{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(){for(var e=arguments.length,t=new Array(e),n=0;ne.annotation(CK)))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=kK(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(BW.phrases)!=this.state.facet(BW.phrases))return this.setState(o);t=Rq.create(this,o,e),t.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new cq(e.empty?e:Y$.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(dq)&&(c=e.value.clip(this.state))}this.viewState.update(t,c),this.bidiCache=yY.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(Pq)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(tY)!=t.state.facet(tY)&&(this.viewState.mustMeasureContent=!0),(n||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(nq))try{e(t)}catch(e){pq(this.state,e,"update listener")}(s||u)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),u&&!Qq(this,u)&&l.force&&LG(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new qK(e),this.plugins=e.facet(gq).map((e=>new yq(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Dq(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(gq),n=e.state.facet(gq);if(t!=n){let r=[];for(let o of n){let n=t.indexOf(o);if(n<0)r.push(new yq(o));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e0&&void 0!==arguments[0])||arguments[0];if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(jG(n))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);o=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((e=>{try{return e.read(this)}catch(e){return pq(this.state,e),vY}})),u=Rq.create(this,this.state,[]),c=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),c=this.docView.update(u),c&&this.docViewUpdate());for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(nq))e(t)}get themeClasses(){return rY+" "+(this.state.facet(nY)?iY:oY)+" "+this.state.facet(tY)}updateAttrs(){let e=bY(this,bq,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(fq)?"true":"false",class:"cm-content",style:`${iU.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),bY(this,xq,t);let n=this.observer.ignore((()=>{let n=gU(this.contentDOM,this.contentAttrs,t),r=gU(this.dom,this.editorAttrs,e);return n||r}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(mY.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(Pq);let e=this.state.facet(mY.cspNonce);cG.mount(this.root,this.styleModules.concat(lY).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Gq(this,e,$q(this,e,t,n))}moveByGroup(e,t){return Gq(this,e,$q(this,e,t,(t=>function(e,t,n){let r=e.state.charCategorizer(t),o=r(n);return e=>{let t=r(e);return o==FW.Space&&(o=t),o==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=n[t?n.length-1:0];return Y$.cursor(o.side(t,r)+e.from,o.forward(!t,r)?1:-1)}moveToLineBoundary(e,t){return function(e,t,n,r){let o=Hq(e,t.head),i=r&&o.type==bU.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(o.from),a=e.posAtCoords({x:n==(r==OU.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return Y$.cursor(a,n?-1:1)}return Y$.cursor(n?o.to:o.from,n?-1:1)}(this,e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}moveVertically(e,t,n){return Gq(this,e,function(e,t,n,r){let o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return Y$.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(o,t.assoc||-1),c=e.documentTop;if(u)null==s&&(s=u.left-l.left),a=i<0?u.top:u.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+c}let d=l.left+s,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=a+(h+t)*i,r=Bq(e,{x:d,y:n},!1,i);if(nl.bottom||(i<0?ro)){let t=e.docView.coordsForChar(r),o=!t||n1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(e,t)}posAtCoords(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Bq(this,e,t)}coordsAtPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r);return PG(n,o[VU.find(o,e-r.from,-1,t)].dir==OU.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(sq)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>gY)return qU(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||HU(r.isolates,t=Mq(this,e))))return r.order;t||(t=Mq(this,e));let r=UU(e.text,n,t);return this.bidiCache.push(new yY(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||iU.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{EG(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return dq.of(new cq("number"==typeof e?Y$.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return dq.of(new cq(Y$.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return vq.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return vq.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=cG.newName(),r=[tY.of(n),Pq.of(sY(`.${n}`,e))];return t&&t.dark&&r.push(nY.of(!0)),r}static baseTheme(e){return hW.lowest(Pq.of(sY("."+rY,e,aY)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&HG.get(n)||HG.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach((e=>n(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new qK(e.state||BW.create(e)),e.scrollTo&&e.scrollTo.is(dq)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(gq).map((e=>new yq(e)));for(let e of this.plugins)e.update(this);this.observer=new dY(this),this.inputState=new eK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Dq(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}}mY.styleModule=Pq,mY.inputHandler=rq,mY.clipboardInputFilter=iq,mY.clipboardOutputFilter=aq,mY.scrollHandler=uq,mY.focusChangeEffect=oq,mY.perLineTextDirection=sq,mY.exceptionSink=tq,mY.updateListener=nq,mY.editable=fq,mY.mouseSelectionStyle=eq,mY.dragMovesSelection=JU,mY.clickAddsSelectionRange=QU,mY.decorations=wq,mY.outerDecorations=Sq,mY.atomicRanges=Cq,mY.bidiIsolatedRanges=kq,mY.scrollMargins=_q,mY.darkTheme=nY,mY.cspNonce=J$.define({combine:e=>e.length?e[0]:""}),mY.contentAttributes=xq,mY.editorAttributes=bq,mY.lineWrapping=mY.contentAttributes.of({class:"cm-lineWrapping"}),mY.announce=IW.define();const gY=4096,vY={};class yY{static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],r=e.length?e[e.length-1].dir:OU.LTR;for(let o=Math.max(0,e.length-10);o=0;o--){let t=r[o],i="function"==typeof t?t(e):t;i&&pU(i,n)}return n}const xY=iU.mac?"mac":iU.windows?"win":iU.linux?"linux":"key";function wY(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const SY=hW.default(mY.domEventHandlers({keydown:(e,t)=>IY(MY(t.state),e,t,"editor")})),CY=J$.define({enables:SY}),kY=new WeakMap;function MY(e){let t=e.facet(CY),n=kY.get(t);return n||kY.set(t,n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xY,n=Object.create(null),r=Object.create(null),o=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,r,i,a,s)=>{var l,u;let c=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,o,i,a,s=n[n.length-1];"Space"==s&&(s=" ");for(let e=0;e{let r=_Y={view:t,prefix:n,scope:e};return setTimeout((()=>{_Y==r&&(_Y=null)}),TY),!0}]})}let h=d.join(" ");o(h,!1);let p=c[h]||(c[h]={preventDefault:!1,stopPropagation:!1,run:(null===(u=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===u?void 0:u.slice())||[]});i&&p.run.push(i),a&&(p.preventDefault=!0),s&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=r;for(let t in e)e[t].run.push((e=>o(e,PY)))}let o=r[t]||r.key;if(o)for(let t of e)i(t,o,r.run,r.preventDefault,r.stopPropagation),r.shift&&i(t,"Shift-"+o,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let _Y=null;const TY=4e3;let PY=null;function IY(e,t,n,r){PY=t;let o=function(e){var t=!(mG&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||gG&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?fG:pG)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=j$(L$(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,u=!1;_Y&&_Y.view==n&&_Y.scope==r&&(a=_Y.prefix+" ",oK.indexOf(t.keyCode)<0&&(l=!0,_Y=null));let c,d,h=new Set,p=e=>{if(e){for(let t of e.run)if(!h.has(t)&&(h.add(t),t(n)))return e.stopPropagation&&(u=!0),!0;e.preventDefault&&(e.stopPropagation&&(u=!0),l=!0)}return!1},f=e[r];return f&&(p(f[a+wY(o,t,!i)])?s=!0:i&&(t.altKey||t.metaKey||t.ctrlKey)&&!(iU.windows&&t.ctrlKey&&t.altKey)&&(c=pG[t.keyCode])&&c!=o?(p(f[a+wY(c,t,!0)])||t.shiftKey&&(d=fG[t.keyCode])!=o&&d!=c&&p(f[a+wY(d,t,!1)]))&&(s=!0):i&&t.shiftKey&&p(f[a+wY(o,t,!0)])&&(s=!0),!s&&p(f._any)&&(s=!0)),l&&(s=!0),s&&u&&t.stopPropagation(),PY=null,s}class RY{draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let o=DY(e);return[new RY(t,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),o=Math.min(n.to,e.viewport.to),i=e.textDirection==OU.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=DY(e),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),p=Hq(e,r),f=Hq(e,o),m=p.type==bU.Text?p:null,g=f.type==bU.Text?f:null;m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=OY(e,r,1,m));g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=OY(e,o,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return y(b(n.from,n.to,m));{let t=m?b(n.from,null,m):x(p,!1),r=g?b(null,n.to,g):x(f,!0),o=[];return(m||p).to<(g||f).from-(m&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2u&&r.from=i)break;s>o&&l(Math.max(e,o),null==t&&e<=u,Math.min(s,i),null==n&&s>=c,a.dir)}if(o=r.to+1,o>=i)break}return 0==s.length&&l(u,null==t,c,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function x(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}constructor(e,t,n,r,o){this.className=e,this.left=t,this.top=n,this.width=r,this.height=o}}function DY(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==OU.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function OY(e,t,n,r){let o=e.coordsAtPos(t,2*n);if(!o)return r;let i=e.dom.getBoundingClientRect(),a=(o.top+o.bottom)/2,s=e.posAtCoords({x:i.left+1,y:a}),l=e.posAtCoords({x:i.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class AY{update(e){e.startState.facet(EY)!=e.state.facet(EY)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(EY);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}}const EY=J$.define();function ZY(e){return[vq.define((t=>new AY(t,e))),EY.of(e)]}const LY=!(iU.ios&&iU.webkit&&iU.webkit_version<534),FY=J$.define({combine:e=>VW(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function jY(e){return e.startState.facet(FY)!=e.state.facet(FY)}const NY=ZY({above:!0,markers(e){let{state:t}=e,n=t.facet(FY),r=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty?!i||LY:n.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:Y$.cursor(o.head,o.head>o.anchor?-1:1);for(let o of RY.forRange(e,t,n))r.push(o)}}return r},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=jY(e);return n&&zY(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){zY(t.state,e)},class:"cm-cursorLayer"});function zY(e,t){t.style.animationDuration=e.facet(FY).cursorBlinkRate+"ms"}const BY=ZY({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:RY.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||jY(e),class:"cm-selectionLayer"}),VY={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};LY&&(VY[".cm-line"].caretColor=VY[".cm-content"].caretColor="transparent !important");const HY=hW.highest(mY.theme(VY)),$Y=IW.define({map:(e,t)=>null==e?null:t.mapPos(e)}),WY=aW.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is($Y)?t.value:e),e))}),GY=vq.fromClass(class{update(e){var t;let n=e.state.field(WY);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(WY)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(WY),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(WY)!=e&&this.view.dispatch({effects:$Y.of(e)})}constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function UY(e,t,n,r,o){t.lastIndex=0;for(let i,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class qY{createDeco(e){let t=new qW,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:o,to:i}of n)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}(e,this.maxLength))UY(e.state.doc,this.regexp,t,r,((t,r)=>this.addMatch(r,e,t,n)));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges(((t,o,i,a)=>{a>=e.view.viewport.from&&i<=e.view.viewport.to&&(n=Math.min(i,n),r=Math.max(a,r))})),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let o of e.visibleRanges){let i=Math.max(o.from,n),a=Math.min(o.to,r);if(a>i){let n=e.state.doc.lineAt(i),r=n.ton.from;i--)if(this.boundary.test(n.text[i-1-n.from])){s=i;break}for(;ac.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.indexthis.addMatch(n,e,t,d)));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>el,add:c})}}return t}constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,o)=>r(o,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,o)=>{let i=n(e,t,r);i&&o(r,r+e[0].length,i)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,o)=>o(r,r+e[0].length,n)}this.boundary=o,this.maxLength=i}}const KY=null!=/x/.unicode?"gu":"g",YY=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",KY),XY={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let QY=null;const JY=J$.define({combine(e){let t=VW(e,{render:null,specialChars:YY,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==QY&&"undefined"!=typeof document&&document.body){let t=document.body.style;QY=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return QY||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,KY)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,KY)),t}});let eX=null;class tX extends yU{eq(e){return e.code==this.code}toDOM(e){let t=(n=this.code)>=32?"•":10==n?"␤":String.fromCharCode(9216+n);var n;let r=e.state.phrase("Control character")+" "+(XY[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,r,t);if(o)return o;let i=document.createElement("span");return i.textContent=t,i.title=r,i.setAttribute("aria-label",r),i.className="cm-specialChar",i}ignoreEvent(){return!1}constructor(e,t){super(),this.options=e,this.code=t}}class nX extends yU{eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}constructor(e){super(),this.width=e}}const rX=xU.line({class:"cm-activeLine"}),oX=vq.fromClass(class{update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let o=e.lineBlockAt(r.head);o.from>t&&(n.push(rX.range(o.from)),t=o.from)}return xU.set(n)}constructor(e){this.decorations=this.getDeco(e)}},{decorations:e=>e.decorations});class iX extends yU{toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?SG(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=PG(t[0],"rtl"!=n.direction),o=parseInt(n.lineHeight);return r.bottom-r.top>1.5*o?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}constructor(e){super(),this.content=e}}const aX=2e3;function sX(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),o=n-r.from,i=o>aX?-1:o==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):iG(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function lX(e,t){let n=sX(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),o=e.state.doc.lineAt(t);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(e.changes)}},get(t,o,i){let a=sX(e,t);if(!a)return r;let s=function(e,t,n){let r=Math.min(t.line,n.line),o=Math.max(t.line,n.line),i=[];if(t.off>aX||n.off>aX||t.col<0||n.col<0){let a=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=r;t<=o;t++){let n=e.doc.line(t);n.length<=s&&i.push(Y$.range(n.from+a,n.to+s))}}else{let a=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=r;t<=o;t++){let n=e.doc.line(t),r=aG(n.text,a,e.tabSize,!0);if(r<0)i.push(Y$.cursor(n.to));else{let t=aG(n.text,s,e.tabSize);i.push(Y$.range(n.from+r,n.from+t))}}}return i}(e.state,n,a);return s.length?i?Y$.create(s.concat(r.ranges)):Y$.create(s):r}}:null}const uX={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},cX={style:"cursor: crosshair"};const dX="-10000px";class hX{update(e,t){var n;let r=e.state.facet(this.facet),o=r.filter((e=>e));if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let n=0;nt[n]=e)),t.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=i,!0}constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e));let o=null;this.tooltipViews=this.tooltips.map((e=>o=n(e,o)))}}function pX(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const fX=J$.define({combine:e=>{var t,n,r;return{position:iU.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((e=>e.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||pX}}}),mX=new WeakMap,gX=vq.fromClass(class{createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(fX);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=dX,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(iU.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==dX&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),o=Tq(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((e=>{let{dom:t}=e;return t.getBoundingClientRect()})),space:this.view.state.facet(fX).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){c.style.top=dX;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=h.right-h.left,g=null!==(t=mX.get(u))&&void 0!==t?t:h.bottom-h.top,v=u.offset||bX,y=this.view.textDirection==OU.LTR,b=h.width>r.right-r.left?y?r.left:r.right-h.width:y?Math.max(r.left,Math.min(d.left-(p?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(p?14:0)-v.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-g-f-v.yr.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let w=(x?d.top-r.top:r.bottom-d.bottom)-f;if(wb&&e.topS&&(S=x?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(c.style.top=(S-e.parent.top)/i+"px",vX(c,(b-e.parent.left)/o)):(c.style.top=S/i+"px",vX(c,b/o)),p){let e=d.left+(y?v.x:-v.x)-(b+14-7);p.style.left=e/o+"px"}!0!==u.overlap&&a.push({left:b,top:S,right:C,bottom:S+g}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=dX}constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(fX);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new hX(e,xX,((e,t)=>this.createTooltip(e,t)),(e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()})),this.above=this.manager.tooltips.map((e=>!!e.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}},{eventObservers:{scroll(){this.maybeMeasure()}}});function vX(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const yX=mY.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),bX={x:0,y:0},xX=J$.define({enables:[gX,yX]}),wX=J$.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class SX{static create(e){return new SX(e)}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new hX(e,wX,((e,t)=>this.createHostedView(e,t)),(e=>e.dom.remove()))}}const CX=xX.compute([wX],(e=>{let t=e.facet(wX);return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:SX.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class kX{update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(r)).find((e=>e.from<=r&&e.to>=r)),a=i&&i.dir==OU.RTL?-1:1;o=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>pq(e.state,t,"hover tooltip")))}else!i||Array.isArray(i)&&!i.length||e.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])})}get tooltip(){let e=this.view.plugin(gX),t=e?e.manager.tooltips.findIndex((e=>e.create==SX.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!function(e,t){let n,{left:r,right:o,top:i,bottom:a}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=r-MX&&t.clientX<=o+MX&&t.clientY>=i-MX&&t.clientY<=a+MX}(o.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,i=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:o;(o==i?this.view.posAtCoords(this.lastMove)==o:function(e,t,n,r,o){let i=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(i.left>r||i.righto||Math.min(i.bottom,a)=t&&s<=n}(this.view,o,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}constructor(e,t,n,r,o){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}}const MX=4;function _X(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=IW.define(),r=aW.define({create:()=>[],update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter((e=>!t.hideOn(r,e)))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,z$.TrackDel);if(null!=e){let o=Object.assign(Object.create(null),n);o.pos=e,null!=o.end&&(o.end=r.changes.mapPos(o.end)),t.push(o)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(PX)&&(e=[]);return e},provide:e=>wX.from(e)});return{active:r,extension:[r,vq.define((o=>new kX(o,e,r,n,t.hoverTime||300))),CX]}}function TX(e,t){let n=e.plugin(gX);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const PX=IW.define();const IX=J$.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function RX(e,t){let n=e.plugin(DX),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const DX=vq.fromClass(class{update(e){let t=e.state.facet(IX);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new OX(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new OX(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(EX);if(n!=this.input){let t=n.filter((e=>e)),r=[],o=[],i=[],a=[];for(let n of t){let t,s=this.specs.indexOf(n);s<0?(t=n(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),r.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=r,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}constructor(e){this.input=e.state.facet(EX),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(IX);this.top=new OX(e,!0,t.topContainer),this.bottom=new OX(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}},{provide:e=>mY.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class OX{sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=AX(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=AX(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}}function AX(e){let t=e.nextSibling;return e.remove(),t}const EX=J$.define({enables:DX});class ZX extends HW{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ZX.prototype.elementClass="",ZX.prototype.toDOM=void 0,ZX.prototype.mapMode=z$.TrackBefore,ZX.prototype.startSide=ZX.prototype.endSide=-1,ZX.prototype.point=!0;const LX=J$.define(),FX=J$.define(),jX={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>UW.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},NX=J$.define();function zX(e){return[VX(),NX.of(Object.assign(Object.assign({},jX),e))]}const BX=J$.define({combine:e=>e.some((e=>e))});function VX(e){let t=[HX];return e&&!1===e.fixed&&t.push(BX.of(!0)),t}const HX=vq.fromClass(class{update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(BX)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=UW.iter(this.view.state.facet(LX),this.view.viewport.from),r=[],o=this.gutters.map((e=>new GX(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let i of e.type)if(i.type==bU.Text&&t){WX(n,r,i.from);for(let e of o)e.line(this.view,i,r);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==bU.Text){WX(n,r,e.from);for(let t of o)t.line(this.view,e,r)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(NX),n=e.state.facet(NX),r=e.docChanged||e.heightChanged||e.viewportChanged||!UW.eq(e.startState.facet(LX),e.state.facet(LX),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let o=[];for(let r of n){let n=t.indexOf(r);n<0?o.push(new UX(this.view,r)):(this.gutters[n].update(e),o.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)this.dom.appendChild(e.dom);this.gutters=o}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(NX).map((t=>new UX(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(BX),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}},{provide:e=>mY.scrollMargins.of((t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==OU.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null}))});function $X(e){return Array.isArray(e)?e:[e]}function WX(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class GX{addElement(e,t,n){let{gutter:r}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==r.elements.length){let t=new qX(e,i,o,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];WX(this.cursor,r,t.from),n.length&&(r=r.concat(n));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let i=this.gutter;(0!=r.length||i.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(FX)){let o=n(e,t.widget,t);o&&(r||(r=[])).push(o)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=UW.iter(e.markers,t.from)}}class UX{update(e){let t=this.markers;if(this.markers=$X(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!UW.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let o,i=r.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,r)&&r.preventDefault()}));this.markers=$X(t.markers(e)),t.initialSpacer&&(this.spacer=new qX(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}}class qX{update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nVW(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],o=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||o(e,t,n):o}return n}})});class QX extends ZX{eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}constructor(e){super(),this.number=e}}function JX(e,t){return e.state.facet(XX).formatNumber(t,e.state)}const eQ=NX.compute([XX],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(KX),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new QX(JX(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(YX)){let o=r(e,t,n);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(XX)!=e.state.facet(XX),initialSpacer:e=>new QX(JX(e,tQ(e.state.doc.lines))),updateSpacer(e,t){let n=JX(t.view,tQ(t.view.state.doc.lines));return n==e.number?e:new QX(n)},domEventHandlers:e.facet(XX).domEventHandlers})));function tQ(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.head).from;o>n&&(n=o,t.push(nQ.range(o)))}return UW.of(t)}));const oQ=1024;let iQ=0;class aQ{constructor(e,t){this.from=e,this.to=t}}class sQ{add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=cQ.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}constructor(e={}){this.id=iQ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}}sQ.closedBy=new sQ({deserialize:e=>e.split(" ")}),sQ.openedBy=new sQ({deserialize:e=>e.split(" ")}),sQ.group=new sQ({deserialize:e=>e.split(" ")}),sQ.isolate=new sQ({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),sQ.contextHash=new sQ({perNode:!0}),sQ.lookAhead=new sQ({perNode:!0}),sQ.mounted=new sQ({perNode:!0});class lQ{static get(e){return e&&e.props&&e.props[sQ.mounted.id]}constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}}const uQ=Object.create(null);class cQ{static define(e){let t=e.props&&e.props.length?Object.create(null):uQ,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new cQ(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(sQ.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(sQ.group),r=-1;r<(n?n.length:0);r++){let o=t[r<0?e.name:n[r]];if(o)return o}}}constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}}cQ.none=new cQ("",Object.create(null),0,8);class dQ{extend(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return new IQ(this.topNode,e)}cursorAt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=hQ.get(this)||this.topNode,r=new IQ(n);return r.moveTo(e,t),hQ.set(this,r._tree),r}get topNode(){return new SQ(this,0,0,null)}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=xQ(hQ.get(this)||this.topNode,e,t,!1);return hQ.set(this,n),n}resolveInner(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=xQ(pQ.get(this)||this.topNode,e,t,!0);return pQ.set(this,n),n}resolveStack(e){return function(e,t,n){let r=e.resolveInner(t,n),o=null;for(let e=r instanceof SQ?r:r.context.parent;e;e=e.parent)if(e.index<0){let i=e.parent;(o||(o=[r])).push(i.resolve(t,n)),e=i}else{let i=lQ.get(e.tree);if(i&&i.overlay&&i.overlay[0].from<=t&&i.overlay[i.overlay.length-1].to>=t){let a=new SQ(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[r])).push(xQ(a,t,n,!1))}}return o?TQ(o):r}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}iterate(e){let{enter:t,leave:n,from:r=0,to:o=this.length}=e,i=e.mode||0,a=(i&fQ.IncludeAnonymous)>0;for(let e=this.cursor(i|fQ.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=r&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:AQ(cQ.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new gQ(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new gQ(cQ.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=oQ,reused:i=[],minRepeatType:a=r.types.length}=e,s=Array.isArray(n)?new vQ(n,n.length):n,l=r.types,u=0,c=0;function d(e,t,n,y,b,x){let{id:w,start:S,end:C,size:k}=s,M=c,_=u;for(;k<0;){if(s.next(),-1==k){let t=i[w];return n.push(t),void y.push(S-e)}if(-3==k)return void(u=w);if(-4==k)return void(c=w);throw new RangeError(`Unrecognized record size: ${k}`)}let T,P,I=l[w],R=S-e;if(C-S<=o&&(P=g(s.pos-t,b))){let t=new Uint16Array(P.size-P.skip),n=s.pos-P.size,o=t.length;for(;s.pos>n;)o=v(P.start,t,o);T=new yQ(t,C-P.start,r),R=P.start-e}else{let e=s.pos-k;s.next();let t=[],n=[],r=w>=a?w:-1,i=0,l=C;for(;s.pos>e;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-o&&(f(t,n,S,i,s.end,l,r,M,_),i=t.length,l=s.end),s.next()):x>2500?h(S,e,t,n):d(S,e,t,n,r,x+1);if(r>=0&&i>0&&i-1&&i>0){let e=p(I,_);T=AQ(I,t,n,0,t.length,0,C-S,e,e)}else T=m(I,t,n,C-S,M-C,_)}n.push(T),y.push(R)}function h(e,t,n,i){let a=[],l=0,u=-1;for(;s.pos>t;){let{id:e,start:t,end:n,size:r}=s;if(r>4)s.next();else{if(u>-1&&t=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-o,t[n++]=a[e+2]-o,t[n++]=n;n.push(new yQ(t,a[2]-o,r)),i.push(o-e)}}function p(e,t){return(n,r,o)=>{let i,a,s=0,l=n.length-1;if(l>=0&&(i=n[l])instanceof gQ){if(!l&&i.type==e&&i.length==o)return i;(a=i.prop(sQ.lookAhead))&&(s=r[l]+i.length+a)}return m(e,n,r,o,s,t)}}function f(e,t,n,o,i,a,s,l,u){let c=[],d=[];for(;e.length>o;)c.push(e.pop()),d.push(t.pop()+n-i);e.push(m(r.types[s],c,d,a-i,l-a,u)),t.push(i-n)}function m(e,t,n,r,o,i,a){if(i){let e=[sQ.contextHash,i];a=a?[e].concat(a):[e]}if(o>25){let e=[sQ.lookAhead,o];a=a?[e].concat(a):[e]}return new gQ(e,t,n,r,a)}function g(e,t){let n=s.fork(),r=0,i=0,l=0,u=n.end-o,c={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=i,c.skip=l,l+=4,r+=4,n.next();continue}let s=n.pos-e;if(e<0||s=a?4:0,h=n.start;for(n.next();n.pos>s;){if(n.size<0){if(-3!=n.size)break e;d+=4}else n.id>=a&&(d+=4);n.next()}i=h,r+=e,l+=d}return(t<0||r==e)&&(c.size=r,c.start=i,c.skip=l),c.size>4?c:void 0}function v(e,t,n){let{id:r,start:o,end:i,size:l}=s;if(s.next(),l>=0&&r4){let r=s.pos-(l-4);for(;s.pos>r;)n=v(e,t,n)}t[--n]=a,t[--n]=i-e,t[--n]=o-e,t[--n]=r}else-3==l?u=r:-4==l&&(c=r);return n}let y=[],b=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,y,b,-1,0);let x=null!==(t=e.length)&&void 0!==t?t:y.length?b[0]+y[0].length:0;return new gQ(l[e.topID],y.reverse(),b.reverse(),x)}(e)}constructor(e,t,n,r,o){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)this.props["number"==typeof e?e:e.id]=t}}}gQ.empty=new gQ(cQ.none,[],[],0);class vQ{get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vQ(this.buffer,this.index)}constructor(e,t){this.buffer=e,this.index=t}}class yQ{get type(){return cQ.none}toString(){let e=[];for(let t=0;t0));s=i[s+3]);return a}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function xQ(e,t,n,r){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0&&void 0!==arguments[0]?arguments[0]:0)}getChild(e){let t=CQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return t.length?t[0]:null}getChildren(e){return CQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}resolve(e){return xQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}resolveInner(e){return xQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}matchContext(e){return kQ(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class SQ extends wQ{get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;for(let i=this;;){for(let{children:a,positions:s}=i._tree,l=t>0?a.length:-1;e!=l;e+=t){let l=a[e],u=s[e]+i.from;if(bQ(r,n,u,u+l.length))if(l instanceof yQ){if(o&fQ.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-u,r);if(a>-1)return new _Q(new MQ(i,l,e,u),null,a)}else if(o&fQ.IncludeAnonymous||!l.type.isAnonymous||RQ(l)){let a;if(!(o&fQ.IgnoreMounts)&&(a=lQ.get(l))&&!a.overlay)return new SQ(a.tree,u,e,i);let s=new SQ(l,u,e,i);return o&fQ.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(o&fQ.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&fQ.IgnoreOverlays)&&(n=lQ.get(this._tree))&&n.overlay){let r=e-this.from;for(let{from:e,to:o}of n.overlay)if((t>0?e<=r:e=r:o>r))return new SQ(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}}function CQ(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function kQ(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length-1;for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class MQ{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class _Q extends wQ{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}child(e,t,n){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new _Q(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&fQ.ExcludeBuffers)return null;let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new _Q(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new _Q(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new _Q(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new gQ(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}}function TQ(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||o.to2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(n&fQ.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fQ.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&fQ.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let e=n._tree.children[r];if(this.mode&fQ.IncludeAnonymous||e instanceof yQ||!e.type.isAnonymous||RQ(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,e)}prev(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,e)}moveTo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(let e=n;e=0;o--){if(o<0)return kQ(this._tree,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof SQ)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}}function RQ(e){return e.children.some((e=>e instanceof yQ||!e.type.isAnonymous||RQ(e)))}const DQ=new WeakMap;function OQ(e,t){if(!e.isAnonymous||t instanceof yQ||t.type!=e)return 1;let n=DQ.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof gQ)){n=1;break}n+=OQ(e,r)}DQ.set(t,n)}return n}function AQ(e,t,n,r,o,i,a,s,l){let u=0;for(let n=r;n=c)break;f+=t}if(u==o+1){if(f>c){let e=n[o];t(e.children,e.positions,0,e.children.length,r[o]+s);continue}d.push(n[o])}else{let t=r[u-1]+n[u-1].length-p;d.push(AQ(e,n,r,o,u,p,t,null,l))}h.push(p+s-i)}}(t,n,r,o,0),(s||l)(d,h,a)}class EQ{get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[new EQ(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!t.length)return e;let r=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let u=a=n)for(;i&&i.from=t.from||c<=t.to||l){let e=Math.max(t.from,s)-l,n=Math.min(t.to,c)-l;t=e>=n?null:new EQ(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&r.push(t),i.to>c)break;i=onew aQ(e.from,e.to))):[new aQ(0,0)]:[new aQ(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class LQ{get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}constructor(e){this.string=e}}new sQ({perNode:!0});let FQ=0;class jQ{toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof jQ&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let r=new jQ(n,[],null,[]);if(r.set.push(r),t)for(let e of t.set)r.set.push(e);return r}static defineModifier(e){let t=new zQ(e);return e=>e.modified.indexOf(t)>-1?e:zQ.get(e.base||e,e.modified.concat(t).sort(((e,t)=>e.id-t.id)))}constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=FQ++}}let NQ=0;class zQ{static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let r=[],o=new jQ(e.name,r,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)r.push(zQ.get(t,e));return o}constructor(e){this.name=e,this.instances=[],this.id=NQ++}}function BQ(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new HQ(r,o,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return VQ.add(t)}const VQ=new sQ;class HQ{get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=o;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function WQ(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length,i=new GQ(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}HQ.empty=new HQ([],2,null);class GQ{startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,o){let{type:i,from:a,to:s}=e;if(a>=n||s<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));let l=r,u=function(e){let t=e.type.prop(VQ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||HQ.empty,c=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(o,u.tags);if(c&&(l&&(l+=" "),l+=c,1==u.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(t,a),l),u.opaque)return;let d=e.tree&&e.tree.prop(sQ.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),u=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),c=e.firstChild();for(let h=0,p=a;;h++){let f=h=m)&&e.nextSibling()););if(!f||m>n)break;p=f.to+a,p>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(n,p),"",u),this.startSpan(Math.min(n,p),l))}c&&e.parent()}else if(e.firstChild()){d&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}}const UQ=jQ.define,qQ=UQ(),KQ=UQ(),YQ=UQ(KQ),XQ=UQ(KQ),QQ=UQ(),JQ=UQ(QQ),eJ=UQ(QQ),tJ=UQ(),nJ=UQ(tJ),rJ=UQ(),oJ=UQ(),iJ=UQ(),aJ=UQ(iJ),sJ=UQ(),lJ={comment:qQ,lineComment:UQ(qQ),blockComment:UQ(qQ),docComment:UQ(qQ),name:KQ,variableName:UQ(KQ),typeName:YQ,tagName:UQ(YQ),propertyName:XQ,attributeName:UQ(XQ),className:UQ(KQ),labelName:UQ(KQ),namespace:UQ(KQ),macroName:UQ(KQ),literal:QQ,string:JQ,docString:UQ(JQ),character:UQ(JQ),attributeValue:UQ(JQ),number:eJ,integer:UQ(eJ),float:UQ(eJ),bool:UQ(QQ),regexp:UQ(QQ),escape:UQ(QQ),color:UQ(QQ),url:UQ(QQ),keyword:rJ,self:UQ(rJ),null:UQ(rJ),atom:UQ(rJ),unit:UQ(rJ),modifier:UQ(rJ),operatorKeyword:UQ(rJ),controlKeyword:UQ(rJ),definitionKeyword:UQ(rJ),moduleKeyword:UQ(rJ),operator:oJ,derefOperator:UQ(oJ),arithmeticOperator:UQ(oJ),logicOperator:UQ(oJ),bitwiseOperator:UQ(oJ),compareOperator:UQ(oJ),updateOperator:UQ(oJ),definitionOperator:UQ(oJ),typeOperator:UQ(oJ),controlOperator:UQ(oJ),punctuation:iJ,separator:UQ(iJ),bracket:aJ,angleBracket:UQ(aJ),squareBracket:UQ(aJ),paren:UQ(aJ),brace:UQ(aJ),content:tJ,heading:nJ,heading1:UQ(nJ),heading2:UQ(nJ),heading3:UQ(nJ),heading4:UQ(nJ),heading5:UQ(nJ),heading6:UQ(nJ),contentSeparator:UQ(tJ),list:UQ(tJ),quote:UQ(tJ),emphasis:UQ(tJ),strong:UQ(tJ),link:UQ(tJ),monospace:UQ(tJ),strikethrough:UQ(tJ),inserted:UQ(),deleted:UQ(),changed:UQ(),invalid:UQ(),meta:sJ,documentMeta:UQ(sJ),annotation:UQ(sJ),processingInstruction:UQ(sJ),definition:jQ.defineModifier("definition"),constant:jQ.defineModifier("constant"),function:jQ.defineModifier("function"),standard:jQ.defineModifier("standard"),local:jQ.defineModifier("local"),special:jQ.defineModifier("special")};for(let e in lJ){let t=lJ[e];t instanceof jQ&&(t.name=e)}$Q([{tag:lJ.link,class:"tok-link"},{tag:lJ.heading,class:"tok-heading"},{tag:lJ.emphasis,class:"tok-emphasis"},{tag:lJ.strong,class:"tok-strong"},{tag:lJ.keyword,class:"tok-keyword"},{tag:lJ.atom,class:"tok-atom"},{tag:lJ.bool,class:"tok-bool"},{tag:lJ.url,class:"tok-url"},{tag:lJ.labelName,class:"tok-labelName"},{tag:lJ.inserted,class:"tok-inserted"},{tag:lJ.deleted,class:"tok-deleted"},{tag:lJ.literal,class:"tok-literal"},{tag:lJ.string,class:"tok-string"},{tag:lJ.number,class:"tok-number"},{tag:[lJ.regexp,lJ.escape,lJ.special(lJ.string)],class:"tok-string2"},{tag:lJ.variableName,class:"tok-variableName"},{tag:lJ.local(lJ.variableName),class:"tok-variableName tok-local"},{tag:lJ.definition(lJ.variableName),class:"tok-variableName tok-definition"},{tag:lJ.special(lJ.variableName),class:"tok-variableName2"},{tag:lJ.definition(lJ.propertyName),class:"tok-propertyName tok-definition"},{tag:lJ.typeName,class:"tok-typeName"},{tag:lJ.namespace,class:"tok-namespace"},{tag:lJ.className,class:"tok-className"},{tag:lJ.macroName,class:"tok-macroName"},{tag:lJ.propertyName,class:"tok-propertyName"},{tag:lJ.operator,class:"tok-operator"},{tag:lJ.comment,class:"tok-comment"},{tag:lJ.meta,class:"tok-meta"},{tag:lJ.invalid,class:"tok-invalid"},{tag:lJ.punctuation,class:"tok-punctuation"}]);var uJ;const cJ=new sQ;function dJ(e){return J$.define({combine:e?t=>t.concat(e):void 0})}const hJ=new sQ;class pJ{isActiveAt(e,t){return fJ(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(cJ)==this.data}findRegions(e){let t=e.facet(MJ);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(cJ)==this.data)return void n.push({from:t,to:t+e.length});let o=e.prop(sQ.mounted);if(o){if(o.tree.prop(cJ)==this.data){if(o.overlay)for(let e of o.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(o.overlay){let e=n.length;if(r(o.tree,o.overlay[0].from+t),n.length>e)return}}for(let n=0;n{let r=fJ(e,t,n),o=r.type.prop(cJ);if(!o)return[];let i=e.facet(o),a=r.type.prop(hJ);if(a){let o=r.resolve(t-r.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}}function fJ(e,t,n){let r=e.facet(MJ),o=gJ(e).topNode;if(!r||r.allowsNesting)for(let e=o;e;e=e.enter(t,n,fQ.ExcludeBuffers))e.type.isTop&&(o=e);return o}pJ.setState=IW.define();class mJ extends pJ{static define(e){let t=dJ(e.languageData);return new mJ(t,e.parser.configure({props:[cJ.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new mJ(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}constructor(e,t,n){super(e,t,[],n),this.parser=t}}function gJ(e){let t=e.field(pJ.state,!1);return t?t.tree:gQ.empty}class vJ{get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}}let yJ=null;class bJ{static create(e,t,n){return new bJ(e,t,[],gQ.empty,0,n,[],null)}startParse(){return this.parser.startParse(new vJ(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=gQ.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(EQ.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=yJ;yJ=this;try{return e()}finally{yJ=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=xJ(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,o)=>t.push({fromA:e,toA:n,fromB:r,toB:o}))),n=EQ.applyChanges(n,t),r=gQ.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=xJ(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ZQ{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance(){let t=yJ;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new gQ(cQ.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return yJ}constructor(e,t,n=[],r,o,i,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}}function xJ(e,t,n){return EQ.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class wJ{apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new wJ(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=bJ.create(e.facet(MJ).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new wJ(n)}constructor(e){this.context=e,this.tree=e.tree}}pJ.state=aW.define({create:wJ.init,update(e,t){for(let e of t.effects)if(e.is(pJ.setState))return e.value;return t.startState.facet(MJ)!=t.state.facet(MJ)?wJ.init(t.state):e.apply(t)}});let SJ=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(SJ=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const CJ="undefined"!=typeof navigator&&(null===(uJ=navigator.scheduling)||void 0===uJ?void 0:uJ.isInputPending)?()=>navigator.scheduling.isInputPending():null,kJ=vq.fromClass(class{update(e){let t=this.view.state.field(pJ.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(pJ.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=SJ(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,s=o.context.work((()=>CJ&&CJ()||Date.now()>i),r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:pJ.setState.of(new wJ(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>pq(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}},{eventHandlers:{focus(){this.scheduleWork()}}}),MJ=J$.define({combine:e=>e.length?e[0]:null,enables:e=>[pJ.state,kJ,mY.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class _J{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const TJ=J$.define(),PJ=J$.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function IJ(e){let t=e.facet(PJ);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function RJ(e,t){let n="",r=e.tabSize,o=e.facet(PJ)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(let e=0;e=t?function(e,t,n){let r=t.resolveStack(n),o=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(o!=r.node){let e=[];for(let t=o;t&&(t.from!=r.node.from||t.type!=r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return EJ(r,e,n)}(e,n,t):null}class OJ{lineAt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=n.from&&r<=n.to?o&&r==e?{text:"",from:e}:(t<0?r1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{text:n,from:r}=this.lineAt(e,t),o=this.countColumn(n,e-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return i>-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return iG(e,this.state.tabSize,t)}lineIndent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{text:n,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}constructor(e,t={}){this.state=e,this.options=t,this.unit=IJ(e)}}const AJ=new sQ;function EJ(e,t,n){for(let r=e;r;r=r.next){let e=ZJ(r.node);if(e)return e(FJ.create(t,n,r))}return 0}function ZJ(e){let t=e.type.prop(AJ);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(sQ.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>NJ(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?LJ:null}function LJ(){return 0}class FJ extends OJ{get node(){return this.context.node}static create(e,t,n){return new FJ(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(jJ(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return EJ(this.context.next,this.base,this.pos)}constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}}function jJ(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function NJ(e,t,n,r,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=n.to;;){let o=t.childAfter(e);if(!o||o==r)return null;if(!o.type.isSkipped){if(o.from>=a)return null;let e=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+e}}e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*n)}function zJ(){let{except:e,units:t=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const BJ=J$.define(),VJ=new sQ;function HJ(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function $J(e,t,n){for(let r of e.facet(BJ)){let o=r(e,t,n);if(o)return o}return function(e,t,n){let r=gJ(e);if(r.lengthn)continue;if(o&&a.from=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function WJ(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const GJ=IW.define({map:WJ}),UJ=IW.define({map:WJ});function qJ(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const KJ=aW.define({create:()=>xU.none,update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(GJ)&&!XJ(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(n0),o=r?xU.replace({widget:new a0(r(t.state,n.value))}):i0;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(UJ)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:r}=t.selection.main;e.between(r,r,((e,t)=>{er&&(n=!0)})),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>mY.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{(!o||o.from>e)&&(o={from:e,to:t})})),o}function XJ(e,t,n){let r=!1;return e.between(t,t,((e,o)=>{e==t&&o==n&&(r=!0)})),r}function QJ(e,t){return e.field(KJ,!1)?t:t.concat(IW.appendConfig.of(r0()))}function JJ(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return mY.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${o}.`)}const e0=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of qJ(e)){let n=$J(e.state,t.from,t.to);if(n)return e.dispatch({effects:QJ(e.state,[GJ.of(n),JJ(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(KJ,!1))return!1;let t=[];for(let n of qJ(e)){let r=YJ(e.state,n.from,n.to);r&&t.push(UJ.of(r),JJ(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(KJ,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(UJ.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],t0={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},n0=J$.define({combine:e=>VW(e,t0)});function r0(e){let t=[KJ,u0];return e&&t.push(n0.of(e)),t}function o0(e,t){let{state:n}=e,r=n.facet(n0),o=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=YJ(e.state,n.from,n.to);r&&e.dispatch({effects:UJ.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const i0=xU.replace({widget:new class extends yU{toDOM(e){return o0(e,null)}}});class a0 extends yU{eq(e){return this.value==e.value}toDOM(e){return o0(e,this.value)}constructor(e){super(),this.value=e}}const s0={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class l0 extends ZX{eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}constructor(e,t){super(),this.config=e,this.open=t}}const u0=mY.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class c0{static define(e,t){return new c0(e,t||{})}constructor(e,t){let n;function r(e){let t=cG.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof pJ?e=>e.prop(cJ)==i.data:i?e=>e==i:void 0,this.style=$Q(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=n?new cG(n):null,this.themeType=t.themeType}}const d0=J$.define(),h0=J$.define({combine:e=>e.length?[e[0]]:null});function p0(e){let t=e.facet(d0);return t.length?t:e.facet(h0)}function f0(e,t){let n,r=[g0];return e instanceof c0&&(e.module&&r.push(mY.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(h0.of(e)):n?r.push(d0.computeN([mY.darkTheme],(t=>t.facet(mY.darkTheme)==("dark"==n)?[e]:[]))):r.push(d0.of(e)),r}class m0{update(e){let t=gJ(e.state),n=p0(e.state),r=n!=p0(e.startState),{viewport:o}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return xU.none;let n=new qW;for(let{from:r,to:o}of e.visibleRanges)WQ(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=xU.mark({class:r})))}),r,o);return n.finish()}constructor(e){this.markCache=Object.create(null),this.tree=gJ(e.state),this.decorations=this.buildDeco(e,p0(e.state)),this.decoratedTo=e.viewport.to}}const g0=hW.high(vq.fromClass(m0,{decorations:e=>e.decorations})),v0=c0.define([{tag:lJ.meta,color:"#404740"},{tag:lJ.link,textDecoration:"underline"},{tag:lJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:lJ.emphasis,fontStyle:"italic"},{tag:lJ.strong,fontWeight:"bold"},{tag:lJ.strikethrough,textDecoration:"line-through"},{tag:lJ.keyword,color:"#708"},{tag:[lJ.atom,lJ.bool,lJ.url,lJ.contentSeparator,lJ.labelName],color:"#219"},{tag:[lJ.literal,lJ.inserted],color:"#164"},{tag:[lJ.string,lJ.deleted],color:"#a11"},{tag:[lJ.regexp,lJ.escape,lJ.special(lJ.string)],color:"#e40"},{tag:lJ.definition(lJ.variableName),color:"#00f"},{tag:lJ.local(lJ.variableName),color:"#30a"},{tag:[lJ.typeName,lJ.namespace],color:"#085"},{tag:lJ.className,color:"#167"},{tag:[lJ.special(lJ.variableName),lJ.macroName],color:"#256"},{tag:lJ.definition(lJ.propertyName),color:"#00c"},{tag:lJ.comment,color:"#940"},{tag:lJ.invalid,color:"#f00"}]),y0=mY.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),b0="()[]{}",x0=J$.define({combine:e=>VW(e,{afterCursor:!0,brackets:b0,maxScanDistance:1e4,renderMatch:C0})}),w0=xU.mark({class:"cm-matchingBracket"}),S0=xU.mark({class:"cm-nonmatchingBracket"});function C0(e){let t=[],n=e.matched?w0:S0;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const k0=[aW.define({create:()=>xU.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(x0);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=P0(t.state,e.head,-1,r)||e.head>0&&P0(t.state,e.head-1,1,r)||r.afterCursor&&(P0(t.state,e.head,1,r)||e.headmY.decorations.from(e)}),y0];const M0=new sQ;function _0(e,t,n){let r=e.prop(t<0?sQ.openedBy:sQ.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function T0(e){let t=e.type.prop(M0);return t?t(e.node):e}function P0(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.maxScanDistance||1e4,i=r.brackets||b0,a=gJ(e),s=a.resolveInner(t,n);for(let r=s;r;r=r.parent){let o=_0(r.type,n,i);if(o&&r.from0?t>=a.from&&ta.from&&t<=a.to))return I0(e,t,n,r,a,o,i)}}return function(e,t,n,r,o,i,a){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!c.next().done&&e<=i;){let i=c.value;n<0&&(e+=i.length);let s=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=a.indexOf(i[e]);if(!(t<0||r.resolveInner(s+e,1).type!=o))if(t%2==0==n>0)d++;else{if(1==d)return{start:u,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=i.length)}return c.done?{start:u,matched:!1}:null}(e,t,n,a,s.type,o,i)}function I0(e,t,n,r,o,i,a){let s=r.parent,l={from:o.from,to:o.to},u=0,c=null==s?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(n<0?c.to<=r.from:c.from>=r.to){if(0==u&&i.indexOf(c.type.name)>-1&&c.from-1||(O0.push(e),console.warn(t))}function L0(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||lJ[n];r?"function"==typeof r?t.length?t=t.map(r):Z0(n,`Modifier ${n} used at start of tag`):t.length?Z0(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:Z0(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map((e=>e.id)),i=A0[o];if(i)return i.id;let a=A0[o]=cQ.define({id:D0.length,name:r,props:[BQ({[r]:n})]});return D0.push(a),a.id}OU.RTL,OU.LTR;function F0(e,t){return n=>{let{state:r,dispatch:o}=n;if(r.readOnly)return!1;let i=e(t,r);return!!i&&(o(r.update(i)),!0)}}const j0=F0($0,0),N0=F0(H0,0),z0=F0(((e,t)=>H0(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t))),0);function B0(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const V0=50;function H0(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=n.map((e=>B0(t,e.from).block));if(!r.every((e=>e)))return null;let o=n.map(((e,n)=>function(e,t,n,r){let o,i,{open:a,close:s}=t,l=e.sliceDoc(n-V0,n),u=e.sliceDoc(r,r+V0),c=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(u)[0].length,h=l.length-c;if(l.slice(h-a.length,h)==a&&u.slice(d,d+s.length)==s)return{open:{pos:n-c,margin:c&&1},close:{pos:r+d,margin:d&&1}};r-n<=2*V0?o=i=e.sliceDoc(n,r):(o=e.sliceDoc(n,n+V0),i=e.sliceDoc(r-V0,r));let p=/^\s*/.exec(o)[0].length,f=/\s*$/.exec(i)[0].length,m=i.length-f-s.length;return o.slice(p,p+a.length)==a&&i.slice(m,m+s.length)==s?{open:{pos:n+p+a.length,margin:/\s/.test(o.charAt(p+a.length))?1:0},close:{pos:r-f-s.length,margin:/\s/.test(i.charAt(m-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;n2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=[],o=-1;for(let{from:e,to:i}of n){let n=r.length,a=1e9,s=B0(t,e).line;if(s){for(let n=e;n<=i;){let l=t.doc.lineAt(n);if(l.from>o&&(e==i||i>l.from)){o=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+s.length)==s?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of r)!a&&i||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const W0=_W.define(),G0=_W.define(),U0=J$.define(),q0=J$.define({combine:e=>VW(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),K0=aW.define({create:()=>d1.empty,update(e,t){let n=t.state.facet(q0),r=t.annotation(W0);if(r){let o=t1.fromTransaction(t,r.selection),i=r.side,a=0==i?e.undone:e.done;return a=o?n1(a,a.length,n.minDepth,o):a1(a,t.startState.selection),new d1(0==i?r.rest:a,0==i?a:r.rest)}let o=t.annotation(G0);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(RW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=t1.fromTransaction(t),a=t.annotation(RW.time),s=t.annotation(RW.userEvent);return i?e=e.addChanges(i,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new d1(e.done.map(t1.fromJSON),e.undone.map(t1.fromJSON))});function Y0(e,t){return function(n){let{state:r,dispatch:o}=n;if(!t&&r.readOnly)return!1;let i=r.field(K0,!1);if(!i)return!1;let a=i.pop(e,r,t);return!!a&&(o(a),!0)}}const X0=Y0(0,!1),Q0=Y0(1,!1),J0=Y0(0,!0),e1=Y0(1,!0);class t1{setSelAfter(e){return new t1(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new t1(e.changes&&V$.fromJSON(e.changes),[],e.mapped&&B$.fromJSON(e.mapped),e.startSelection&&Y$.fromJSON(e.startSelection),e.selectionsAfter.map(Y$.fromJSON))}static fromTransaction(e,t){let n=o1;for(let t of e.startState.facet(U0)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new t1(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,o1)}static selection(e){return new t1(void 0,o1,void 0,void 0,e)}constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}}function n1(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function r1(e,t){return e.length?t.length?e.concat(t):e:t}const o1=[],i1=200;function a1(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-i1));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),n1(e,e.length-1,1e9,n.setSelAfter(r)))}return[t1.selection([t])]}function s1(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function l1(e,t){if(!e.length)return e;let n=e.length,r=o1;for(;n;){let o=u1(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[t1.selection(r)]:o1}function u1(e,t,n){let r=r1(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):o1,n);if(!e.changes)return t1.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new t1(o,IW.mapEffects(e.effects,t),a,e.startSelection.map(i),r)}const c1=/^(input\.type|delete)($|\.)/;class d1{isolate(){return this.prevTime?new d1(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!n||c1.test(n))&&(!a.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e=t&&o<=a&&(r=!0)}})),r}(a.changes,e.changes))||"input.type.compose"==n)?n1(i,i.length-1,r.minDepth,new t1(e.changes.compose(a.changes),r1(IW.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,o1)):n1(i,i.length,r.minDepth,e),new d1(i,o1,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:o1;return o.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(o[o.length-1],e)?this:new d1(a1(this.done,e),this.undone,t,n)}addMapping(e){return new d1(l1(this.done,e),l1(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:W0.of({side:e,rest:s1(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?o1:r.slice(0,r.length-1);return o.mapped&&(n=l1(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:W0.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}}d1.empty=new d1(o1,o1);const h1=[{key:"Mod-z",run:X0,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Q0,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Q0,preventDefault:!0},{key:"Mod-u",run:J0,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:e1,preventDefault:!0}];function p1(e,t){return Y$.create(e.ranges.map(t),e.mainIndex)}function f1(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function m1(e,t){let{state:n,dispatch:r}=e,o=p1(n.selection,t);return!o.eq(n.selection,!0)&&(r(f1(n,o)),!0)}function g1(e,t){return Y$.cursor(t?e.to:e.from)}function v1(e,t){return m1(e,(n=>n.empty?e.moveByChar(n,t):g1(n,t)))}function y1(e){return e.textDirectionAt(e.state.selection.main.head)==OU.LTR}const b1=e=>v1(e,!y1(e)),x1=e=>v1(e,y1(e));function w1(e,t){return m1(e,(n=>n.empty?e.moveByGroup(n,t):g1(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function S1(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function C1(e,t,n){let r,o,i=gJ(e).resolveInner(t.head),a=n?sQ.closedBy:sQ.openedBy;for(let r=t.head;;){let t=n?i.childAfter(r):i.childBefore(r);if(!t)break;S1(e,t,a)?i=t:r=n?t.to:t.from}return o=i.type.prop(a)&&(r=n?P0(e,i.from,1):P0(e,i.to,-1))&&r.matched?n?r.end.to:r.end.from:n?i.to:i.from,Y$.cursor(o,n?-1:1)}function k1(e,t){return m1(e,(n=>{if(!n.empty)return g1(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const M1=e=>k1(e,!1),_1=e=>k1(e,!0);function T1(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):g1(n,t)));if(i.eq(o.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;t&&t.top>s&&t.bottomP1(e,!1),R1=e=>P1(e,!0);function D1(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(o=Y$.cursor(r.from+n))}return o}function O1(e,t,n){let r=!1,o=p1(e.selection,(t=>{let o=P0(e,t.head,-1)||P0(e,t.head,1)||t.head>0&&P0(e,t.head-1,1)||t.head{let n=t(e);return Y$.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(f1(e.state,n)),!0)}function E1(e,t){return A1(e,(n=>e.moveByChar(n,t)))}const Z1=e=>E1(e,!y1(e)),L1=e=>E1(e,y1(e));function F1(e,t){return A1(e,(n=>e.moveByGroup(n,t)))}function j1(e,t){return A1(e,(n=>e.moveVertically(n,t)))}const N1=e=>j1(e,!1),z1=e=>j1(e,!0);function B1(e,t){return A1(e,(n=>e.moveVertically(n,t,T1(e).height)))}const V1=e=>B1(e,!1),H1=e=>B1(e,!0),$1=e=>{let{state:t,dispatch:n}=e;return n(f1(t,{anchor:0})),!0},W1=e=>{let{state:t,dispatch:n}=e;return n(f1(t,{anchor:t.doc.length})),!0},G1=e=>{let{state:t,dispatch:n}=e;return n(f1(t,{anchor:t.selection.main.anchor,head:0})),!0},U1=e=>{let{state:t,dispatch:n}=e;return n(f1(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function q1(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange((r=>{let{from:o,to:i}=r;if(o==i){let a=t(r);ao&&(n="delete.forward",a=K1(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=K1(e,o,!1),i=K1(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:Y$.cursor(o,ot(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const Y1=(e,t,n)=>q1(e,(r=>{let o,i,a=r.from,{state:s}=e,l=s.doc.lineAt(a);if(n&&!t&&a>l.from&&aY1(e,!1,!0),Q1=e=>Y1(e,!0,!1),J1=(e,t)=>q1(e,(n=>{let r=n.head,{state:o}=e,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let e=null;;){if(r==(t?i.to:i.from)){r==n.head&&i.number!=(t?o.doc.lines:1)&&(r+=t?1:-1);break}let s=Z$(i.text,r-i.from,t)+i.from,l=i.text.slice(Math.min(r,s)-i.from,Math.max(r,s)-i.from),u=a(l);if(null!=e&&u!=e)break;" "==l&&r==n.head||(e=u),r=s}return r})),e2=e=>J1(e,!1);function t2(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function n2(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let t of t2(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),a=i.length+1;if(n){r.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)o.push(Y$.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(Y$.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:Y$.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function r2(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of t2(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const o2=a2(!1),i2=a2(!0);function a2(e){return t=>{let{state:n,dispatch:r}=t;if(n.readOnly)return!1;let o=n.changeByRange((t=>{let{from:r,to:o}=t,i=n.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=gJ(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop(sQ.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(n,r);e&&(r=o=(o<=i.to?i:n.doc.lineAt(o)).to);let s=new OJ(n,{simulateBreak:r,simulateDoubleBreak:!!a}),l=DJ(s,r);for(null==l&&(l=iG(/^\s*/.exec(n.doc.lineAt(r).text)[0],n.tabSize));oi.from&&r{let o=[];for(let i=r.from;i<=r.to;){let a=e.doc.lineAt(i);a.number>n&&(r.empty||r.to>a.from)&&(t(a,o,r),n=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:Y$.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}}))}const l2=e=>{let{state:t,dispatch:n}=e;return!t.readOnly&&(n(t.update(s2(t,((e,n)=>{n.push({from:e.from,insert:t.facet(PJ)})})),{userEvent:"input.indent"})),!0)},u2=e=>{let{state:t,dispatch:n}=e;return!t.readOnly&&(n(t.update(s2(t,((e,n)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let o=iG(r,t.tabSize),i=0,a=RJ(t,Math.max(0,o-IJ(t)));for(;iw1(e,!y1(e)),shift:e=>F1(e,!y1(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>m1(e,(t=>D1(e,t,!y1(e)))),shift:e=>A1(e,(t=>D1(e,t,!y1(e)))),preventDefault:!0},{key:"ArrowRight",run:x1,shift:L1,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>w1(e,y1(e)),shift:e=>F1(e,y1(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>m1(e,(t=>D1(e,t,y1(e)))),shift:e=>A1(e,(t=>D1(e,t,y1(e)))),preventDefault:!0},{key:"ArrowUp",run:M1,shift:N1,preventDefault:!0},{mac:"Cmd-ArrowUp",run:$1,shift:G1},{mac:"Ctrl-ArrowUp",run:I1,shift:V1},{key:"ArrowDown",run:_1,shift:z1,preventDefault:!0},{mac:"Cmd-ArrowDown",run:W1,shift:U1},{mac:"Ctrl-ArrowDown",run:R1,shift:H1},{key:"PageUp",run:I1,shift:V1},{key:"PageDown",run:R1,shift:H1},{key:"Home",run:e=>m1(e,(t=>D1(e,t,!1))),shift:e=>A1(e,(t=>D1(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:$1,shift:G1},{key:"End",run:e=>m1(e,(t=>D1(e,t,!0))),shift:e=>A1(e,(t=>D1(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:W1,shift:U1},{key:"Enter",run:o2,shift:o2},{key:"Mod-a",run:e=>{let{state:t,dispatch:n}=e;return n(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0}},{key:"Backspace",run:X1,shift:X1},{key:"Delete",run:Q1},{key:"Mod-Backspace",mac:"Alt-Backspace",run:e2},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>J1(e,!0)},{mac:"Mod-Backspace",run:e=>q1(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>q1(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.headm1(e,(t=>Y$.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>A1(e,(t=>Y$.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>m1(e,(t=>Y$.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>A1(e,(t=>Y$.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:Q1},{key:"Ctrl-h",run:X1},{key:"Ctrl-k",run:e=>q1(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=t.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:M$.of(["",""])},range:Y$.cursor(e.from)})));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:e=>{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,r=t.doc.lineAt(n),o=n==r.from?n-1:Z$(r.text,n-r.from,!1)+r.from,i=n==r.to?n+1:Z$(r.text,n-r.from,!0)+r.from;return{changes:{from:o,to:i,insert:t.doc.slice(n,i).append(t.doc.slice(o,n))},range:Y$.cursor(i)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:R1}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))),d2=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>m1(e,(t=>C1(e.state,t,!y1(e)))),shift:e=>A1(e,(t=>C1(e.state,t,!y1(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>m1(e,(t=>C1(e.state,t,y1(e)))),shift:e=>A1(e,(t=>C1(e.state,t,y1(e))))},{key:"Alt-ArrowUp",run:e=>{let{state:t,dispatch:n}=e;return n2(t,n,!1)}},{key:"Shift-Alt-ArrowUp",run:e=>{let{state:t,dispatch:n}=e;return r2(t,n,!1)}},{key:"Alt-ArrowDown",run:e=>{let{state:t,dispatch:n}=e;return n2(t,n,!0)}},{key:"Shift-Alt-ArrowDown",run:e=>{let{state:t,dispatch:n}=e;return r2(t,n,!0)}},{key:"Escape",run:e=>{let{state:t,dispatch:n}=e,r=t.selection,o=null;return r.ranges.length>1?o=Y$.create([r.main]):r.main.empty||(o=Y$.create([Y$.cursor(r.main.head)])),!!o&&(n(f1(t,o)),!0)}},{key:"Mod-Enter",run:i2},{key:"Alt-l",mac:"Ctrl-l",run:e=>{let{state:t,dispatch:n}=e,r=t2(t).map((e=>{let{from:n,to:r}=e;return Y$.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:Y$.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:e=>{let{state:t,dispatch:n}=e,r=p1(t.selection,(e=>{let n=gJ(t),r=n.resolveStack(e.from,1);if(e.empty){let t=n.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:n}=t;if((n.from=e.to||n.to>e.to&&n.from<=e.from)&&t.next)return Y$.range(n.to,n.from)}return e}));return!r.eq(t.selection)&&(n(f1(t,r)),!0)},preventDefault:!0},{key:"Mod-[",run:u2},{key:"Mod-]",run:l2},{key:"Mod-Alt-\\",run:e=>{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=Object.create(null),o=new OJ(t,{overrideIndentation:e=>{let t=r[e];return null==t?-1:t}}),i=s2(t,((e,n,i)=>{let a=DJ(o,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let s=/^\s*/.exec(e.text)[0],l=RJ(t,a);(s!=l||i.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(t2(t).map((e=>{let{from:n,to:r}=e;return n>0?n--:r{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:e=>{let{state:t,dispatch:n}=e;return O1(t,n,!1)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=B0(e.state,n.from);return r.line?j0(e):!!r.block&&z0(e)}},{key:"Alt-A",run:N0},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(c2),h2={key:"Tab",run:l2,shift:u2};function p2(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}t++}for(;te.normalize("NFKD"):e=>e;class g2{peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return L$(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=F$(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=j$(e);let r=this.normalize(t);if(r.length)for(let e=0,o=n;;e++){let i=r.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}o==n&&eo(m2(e)):m2,this.query=this.normalize(t)}}"undefined"!=typeof Symbol&&(g2.prototype[Symbol.iterator]=function(){return this});const v2={from:-1,to:-1,match:/.*/.exec("")},y2="gm"+(null==/x/.unicode?"":"u");class b2{getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=C2(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new w2(t,e.sliceString(t,n));return x2.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:i}=r;return i>t&&(o=e.sliceString(t,i)+o,i=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=C2(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=w2.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}constructor(e,t,n,r,o){this.text=e,this.to=o,this.done=!1,this.value=v2,this.matchPos=C2(e,r),this.re=new RegExp(t,y2+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=w2.get(e,r,this.chunkEnd(r+5e3))}}function C2(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function k2(e){let t=p2("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,o=r.doc.lineAt(r.selection.main.head),[,i,a,s,l]=n,u=s?+s.slice(1):0,c=a?+a:o.number;if(a&&l){let e=c/100;i&&(e=e*("-"==i?-1:1)+o.number/r.doc.lines),c=Math.round(r.doc.lines*e)}else a&&i&&(c=c*("-"==i?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),h=Y$.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[M2.of(!1),mY.scrollIntoView(h.from,{y:"center"})],selection:h}),e.focus()}return{dom:p2("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:M2.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},p2("label",e.state.phrase("Go to line"),": ",t)," ",p2("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),p2("button",{name:"close",onclick:()=>{e.dispatch({effects:M2.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(b2.prototype[Symbol.iterator]=S2.prototype[Symbol.iterator]=function(){return this});const M2=IW.define(),_2=aW.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(M2)&&(e=n.value);return e},provide:e=>EX.from(e,(e=>e?k2:null))}),T2=mY.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),P2={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},I2=J$.define({combine:e=>VW(e,P2,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});const R2=xU.mark({class:"cm-selectionMatch"}),D2=xU.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function O2(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==FW.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==FW.Word)}const A2=vq.fromClass(class{update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(I2),{state:n}=e,r=n.selection;if(r.ranges.length>1)return xU.none;let o,i=r.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return xU.none;let e=n.wordAt(i.head);if(!e)return xU.none;a=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e200)return xU.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!O2(a,n,i.from,i.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==FW.Word&&e(t.sliceDoc(r-1,r))==FW.Word}(a,n,i.from,i.to))return xU.none}else if(o=n.sliceDoc(i.from,i.to),!o)return xU.none}let s=[];for(let r of e.visibleRanges){let e=new g2(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!a||O2(a,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?s.push(D2.range(r,o)):(r>=i.to||o<=i.from)&&s.push(R2.range(r,o)),s.length>t.maxMatches))return xU.none}}return xU.set(s)}constructor(e){this.decorations=this.getDeco(e)}},{decorations:e=>e.decorations}),E2=mY.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const Z2=J$.define({combine:e=>VW(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new c5(e),scrollToMatch:e=>mY.scrollIntoView(e)})});class L2{unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new H2(this):new N2(this)}getCursor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=e.doc?e:BW.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?z2(this,r,t,n):j2(this,r,t,n)}constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,y2),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}}class F2{constructor(e){this.spec=e}}function j2(e,t,n,r){return new g2(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,i=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=j2(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}constructor(e){super(e)}}function z2(e,t,n,r){return new b2(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(o(B2(n.input,n.index))!=FW.Word||o(V2(n.input,n.index))!=FW.Word)&&(o(V2(n.input,n.index+n[0].length))!=FW.Word||o(B2(n.input,n.index+n[0].length))!=FW.Word)):void 0},n,r);var o}function B2(e,t){return e.slice(Z$(e,t,!1),t)}function V2(e,t){return e.slice(t,Z$(e,t))}class H2 extends F2{nextMatch(e,t,n){let r=z2(this.spec,e,n,e.doc.length).next();return r.done&&(r=z2(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),i=z2(this.spec,e,o,n),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,((t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=z2(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const $2=IW.define(),W2=IW.define(),G2=aW.define({create:e=>new U2(o5(e).create(),null),update(e,t){for(let n of t.effects)n.is($2)?e=new U2(n.value.create(),e.panel):n.is(W2)&&(e=new U2(e.query,n.value?r5:null));return e},provide:e=>EX.from(e,(e=>e.panel))});class U2{constructor(e,t){this.query=e,this.panel=t}}const q2=xU.mark({class:"cm-searchMatch"}),K2=xU.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Y2=vq.fromClass(class{update(e){let t=e.state.field(G2);(t!=e.startState.field(G2)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight(e){let{query:t,panel:n}=e;if(!n||!t.spec.valid)return xU.none;let{view:r}=this,o=new qW;for(let e=0,n=r.visibleRanges,i=n.length;en[e+1].from-500;)s=n[++e].to;t.highlight(r.state,a,s,((e,t)=>{let n=r.state.selection.ranges.some((n=>n.from==e&&n.to==t));o.add(e,t,n?K2:q2)}))}return o.finish()}constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(G2))}},{decorations:e=>e.decorations});function X2(e){return t=>{let n=t.state.field(G2,!1);return n&&n.query.spec.valid?e(t,n):s5(t)}}const Q2=X2(((e,t)=>{let{query:n}=t,{to:r}=e.state.selection.main,o=n.nextMatch(e.state,r,r);if(!o)return!1;let i=Y$.single(o.from,o.to),a=e.state.facet(Z2);return e.dispatch({selection:i,effects:[f5(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),a5(e),!0})),J2=X2(((e,t)=>{let{query:n}=t,{state:r}=e,{from:o}=r.selection.main,i=n.prevMatch(r,o,o);if(!i)return!1;let a=Y$.single(i.from,i.to),s=e.state.facet(Z2);return e.dispatch({selection:a,effects:[f5(e,i),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),a5(e),!0})),e5=X2(((e,t)=>{let{query:n}=t,r=n.matchAll(e.state,1e3);return!(!r||!r.length)&&(e.dispatch({selection:Y$.create(r.map((e=>Y$.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),t5=X2(((e,t)=>{let{query:n}=t,{state:r}=e,{from:o,to:i}=r.selection.main;if(r.readOnly)return!1;let a=n.nextMatch(r,o,o);if(!a)return!1;let s,l,u=a,c=[],d=[];if(u.from==o&&u.to==i&&(l=r.toText(n.getReplacement(u)),c.push({from:u.from,to:u.to,insert:l}),u=n.nextMatch(r,u.from,u.to),d.push(mY.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),u){let t=0==c.length||c[0].from>=a.to?0:a.to-a.from-l.length;s=Y$.single(u.from-t,u.to-t),d.push(f5(e,u)),d.push(r.facet(Z2).scrollToMatch(s.main,e))}return e.dispatch({changes:c,selection:s,effects:d,userEvent:"input.replace"}),!0})),n5=X2(((e,t)=>{let{query:n}=t;if(e.state.readOnly)return!1;let r=n.matchAll(e.state,1e9).map((e=>{let{from:t,to:r}=e;return{from:t,to:r,insert:n.getReplacement(e)}}));if(!r.length)return!1;let o=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:mY.announce.of(o),userEvent:"input.replace.all"}),!0}));function r5(e){return e.state.facet(Z2).createPanel(e)}function o5(e,t){var n,r,o,i,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let u=e.facet(Z2);return new L2({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:u.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:u.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:u.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function i5(e){let t=RX(e,r5);return t&&t.dom.querySelector("[main-field]")}function a5(e){let t=i5(e);t&&t==e.root.activeElement&&t.select()}const s5=e=>{let t=e.state.field(G2,!1);if(t&&t.panel){let n=i5(e);if(n&&n!=e.root.activeElement){let r=o5(e.state,t.query.spec);r.valid&&e.dispatch({effects:$2.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[W2.of(!0),t?$2.of(o5(e.state,t.query.spec)):IW.appendConfig.of(g5)]});return!0},l5=e=>{let t=e.state.field(G2,!1);if(!t||!t.panel)return!1;let n=RX(e,r5);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:W2.of(!1)}),!0},u5=[{key:"Mod-f",run:s5,scope:"editor search-panel"},{key:"F3",run:Q2,shift:J2,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Q2,shift:J2,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:l5,scope:"editor search-panel"},{key:"Mod-Shift-l",run:e=>{let{state:t,dispatch:n}=e,r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:o,to:i}=r.main,a=[],s=0;for(let e=new g2(t.doc,t.sliceDoc(o,i));!e.next().done;){if(a.length>1e3)return!1;e.value.from==o&&(s=a.length),a.push(Y$.range(e.value.from,e.value.to))}return n(t.update({selection:Y$.create(a,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=RX(e,k2);if(!t){let n=[M2.of(!0)];null==e.state.field(_2,!1)&&n.push(IW.appendConfig.of([_2,T2])),e.dispatch({effects:n}),t=RX(e,k2)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:e=>{let{state:t,dispatch:n}=e,{ranges:r}=t.selection;if(r.some((e=>e.from===e.to)))return(e=>{let{state:t,dispatch:n}=e,{selection:r}=t,o=Y$.create(r.ranges.map((e=>t.wordAt(e.head)||Y$.cursor(e.head))),r.mainIndex);return!o.eq(r)&&(n(t.update({selection:o})),!0)})({state:t,dispatch:n});let o=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=o)))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,o=e.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let n=!1,o=new g2(e.doc,t,r[r.length-1].to);;){if(o.next(),!o.done){if(n&&r.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(n)return null;o=new g2(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(t,o);return!!i&&(n(t.update({selection:t.selection.addRange(Y$.range(i.from,i.to),!1),effects:mY.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class c5{commit(){let e=new L2({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:$2.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",IY(MY(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?J2:Q2)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),t5(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is($2)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Z2).top}constructor(e){this.view=e;let t=this.query=e.state.field(G2).query.spec;function n(e,t,n){return p2("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=p2("input",{value:t.search,placeholder:d5(e,"Find"),"aria-label":d5(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=p2("input",{value:t.replace,placeholder:d5(e,"Replace"),"aria-label":d5(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=p2("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=p2("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=p2("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=p2("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>Q2(e)),[d5(e,"next")]),n("prev",(()=>J2(e)),[d5(e,"previous")]),n("select",(()=>e5(e)),[d5(e,"all")]),p2("label",null,[this.caseField,d5(e,"match case")]),p2("label",null,[this.reField,d5(e,"regexp")]),p2("label",null,[this.wordField,d5(e,"by word")]),...e.state.readOnly?[]:[p2("br"),this.replaceField,n("replace",(()=>t5(e)),[d5(e,"replace")]),n("replaceAll",(()=>n5(e)),[d5(e,"replace all")])],p2("button",{name:"close",onclick:()=>l5(e),"aria-label":d5(e,"close"),type:"button"},["×"])])}}function d5(e,t){return e.state.phrase(t)}const h5=30,p5=/[\s\.,:;?!]/;function f5(e,t){let{from:n,to:r}=t,o=e.state.doc.lineAt(n),i=e.state.doc.lineAt(r).to,a=Math.max(o.from,n-h5),s=Math.min(i,r+h5),l=e.state.sliceDoc(a,s);if(a!=o.from)for(let e=0;el.length-h5;e--)if(!p5.test(l[e-1])&&p5.test(l[e])){l=l.slice(0,e);break}return mY.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${o.number}.`)}const m5=mY.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),g5=[G2,hW.low(Y2),m5];class v5{tokenBefore(e){let t=gJ(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),o=r.search(S5(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}}function y5(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function b5(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,r]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let o=e.matchBefore(r);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}class x5{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function w5(e){return e.selection.main.from}function S5(e,t){var n;let{source:r}=e,o=t&&"^"!=r[0],i="$"!=r[r.length-1];return o||i?new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const C5=_W.define();const k5=new WeakMap;function M5(e){if(!Array.isArray(e))return e;let t=k5.get(e);return t||k5.set(e,t=b5(e)),t}const _5=IW.define(),T5=IW.define();class P5{ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=F$(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!r||1==b&&m||0==v&&0!=b)&&(t[c]==l||n[c]==l&&(d=!0)?i[c++]=r:i.length&&(g=!1)),v=b,r+=j$(l)}return c==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):h==s&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==s?this.ret(-900-e.length,[p,f]):c==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],o=0;for(let e of t){let t=e+(this.astral?j$(L$(n,e)):1);o&&r[o-1]==e?r[o-1]=t:(r[o++]=e,r[o++]=t)}return this.ret(e-n.length,r)}constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;tVW(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:O5,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>D5(e(n),t(n)),optionClass:(e,t)=>n=>D5(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function D5(e,t){return e?t?e+" "+t:e:t}function O5(e,t,n,r,o,i){let a,s,l=e.textDirection==OU.RTL,u=l,c=!1,d="top",h=t.left-o.left,p=o.right-t.right,f=r.right-r.left,m=r.bottom-r.top;if(u&&h=m||e>t.top?a=n.bottom-t.top:(d="bottom",a=t.bottom-n.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":u?"left":"right")}}function A5(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class E5{mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:o,selected:i,disabled:a}=n.open;r.open&&r.open.options==o||(this.range=A5(o.length,i,e.state.facet(R5).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=A5(t.options.length,t.selected,this.view.state.facet(R5).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let o="string"==typeof r?document.createTextNode(r):r(n);if(!o)return;"then"in o?o.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)})).catch((e=>pq(this.view.state,e,"completion info"))):this.addInfoPane(o,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/o)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let e=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottom{e.target==r&&e.preventDefault()}));let o=null;for(let i=n.from;in.from||0==n.from))if(o=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const u=r.appendChild(document.createElement("li"));u.id=t+"-"+i,u.setAttribute("role","option");let c=this.optionClass(a);c&&(u.className=c);for(let e of this.optionContent){let t=e(a,this.view.state,this.view,s);t&&u.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tothis.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:i}=r.open,a=e.state.facet(R5);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;ea&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,n))),s.className="cm-completionMatchedText",a=n}return ae.position-t.position)).map((e=>e.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=A5(o.length,i,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(n=>{let{options:r}=e.state.field(t).open;for(let t,o=n.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(R5).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:T5.of(null)})})),this.showOptions(o,r.id)}}function Z5(e,t){return n=>new E5(n,e,t)}function L5(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class F5{setSelected(e,t){return e==this.selected||e>=this.options.length?this:new F5(this.options,B5(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o,i){if(r&&!i&&e.some((e=>e.isPending)))return r.setDisabled();let a=function(e,t){let n=[],r=null,o=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some((t=>t.name==e))||r.push("string"==typeof t?{name:e}:t)}},i=t.facet(R5);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)o(new x5(t,r.source,e?e(t):[],1e9-n.length));else{let n,a=t.sliceDoc(r.from,r.to),s=i.filterStrict?new I5(a):new P5(a);for(let t of r.result.options)if(n=s.match(t.label)){let i=t.displayLabel?e?e(t,n.matched):[]:n.matched;o(new x5(t,r.source,i,n.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0,o=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.namet.score-e.score||l(e.completion,t.completion)))){let t=e.completion;!s||s.label!=t.label||s.detail!=t.detail||null!=s.type&&null!=t.type&&s.type!=t.type||s.apply!=t.apply||s.boost!=t.boost?a.push(e):L5(e.completion)>L5(s)&&(a[a.length-1]=e),s=e.completion}return a}(e,t);if(!a.length)return r&&e.some((e=>e.isPending))?r.setDisabled():null;let s=t.facet(R5).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:Y5,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new F5(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new F5(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}}class j5{static start(){return new j5(V5,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(R5),r=(n.override||t.languageDataAt("autocomplete",w5(t)).map(M5)).map((t=>(this.active.find((e=>e.source==t))||new $5(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let o=this.open,i=e.effects.some((e=>e.is(G5)));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;ne.isPending))&&(o=null),!o&&r.every((e=>!e.isPending))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new $5(e.source,0):e)));for(let t of e.effects)t.is(U5)&&(o=o&&o.setSelected(t.value,this.id));return r==this.active&&o==this.open?this:new j5(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?N5:z5}constructor(e,t,n){this.active=e,this.id=t,this.open=n}}const N5={"aria-autocomplete":"list"},z5={};function B5(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const V5=[];function H5(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(C5);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class $5{hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=H5(e,t),r=this;(8&n||16&n&&this.touches(e))&&(r=new $5(r.source,0)),4&n&&0==r.state&&(r=new $5(this.source,1)),r=r.updateFor(e,n);for(let t of e.effects)if(t.is(_5))r=new $5(r.source,1,t.value);else if(t.is(T5))r=new $5(r.source,0);else if(t.is(G5))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(w5(e.state))}constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}}class W5 extends $5{hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=w5(e.state);if(a>i||!r||2&t&&(w5(e.startState)==this.from||ae.map((e=>e.map(t)))}),U5=IW.define(),q5=aW.define({create:()=>j5.start(),update:(e,t)=>e.update(t),provide:e=>[xX.from(e,(e=>e.tooltip)),mY.contentAttributes.from(e,(e=>e.attrs))]});function K5(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(q5).active.find((e=>e.source==t.source));return r instanceof W5&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:o}=e.selection,i=n-o.from,a=r-o.from;return Object.assign(Object.assign({},e.changeByRange((s=>{if(s!=o&&n!=r&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:l},range:Y$.cursor(s.from+i+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:C5.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const Y5=Z5(q5,K5);function X5(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return n=>{let r=n.state.field(q5,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:U5.of(s)}),!0}}const Q5=e=>!!e.state.field(q5,!1)&&(e.dispatch({effects:_5.of(!0)}),!0);class J5{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const e3=vq.fromClass(class{update(e){let t=e.state.field(q5),n=e.state.facet(R5);if(!e.selectionSet&&!e.docChanged&&e.startState.field(q5)==t)return;let r=e.transactions.some((e=>{let t=H5(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)}));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){pq(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((e=>e.effects.some((e=>e.is(_5)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((e=>e.isPending&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(q5);for(let e of t.active)e.isPending&&!this.running.some((t=>t.active.source==e.source))&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(R5).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=w5(t),r=new v5(t,n,e.explicit,this.view),o=new J5(e,r);this.running.push(o),Promise.resolve(e.source(r)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:T5.of(null)}),pq(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(R5).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(R5),r=this.view.state.field(q5);for(let o=0;oe.source==i.active.source));if(a&&a.isPending)if(null==i.done){let e=new $5(i.active.source,0);for(let t of i.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(a)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:G5.of(t)})}constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(q5).active)t.isPending&&this.startQuery(t)}},{eventHandlers:{blur(e){let t=this.view.state.field(q5,!1);if(t&&t.tooltip&&this.view.state.facet(R5).closeOnBlur){let n=t.open&&TX(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:T5.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:_5.of(!1)})),20),this.composing=0}}}),t3="object"==typeof navigator&&/Win/.test(navigator.platform),n3=hW.highest(mY.domEventHandlers({keydown(e,t){let n=t.state.field(q5,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!t3||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find((e=>e.source==r.source)),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&K5(t,r),!1}})),r3=mY.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const o3={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},i3=IW.define({map(e,t){let n=t.mapPos(e,-1,z$.TrackAfter);return null==n?void 0:n}}),a3=new class extends HW{};a3.startSide=1,a3.endSide=-1;const s3=aW.define({create:()=>UW.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(i3)&&(e=e.update({add:[a3.range(n.value,n.value+1)]}));return e}});const l3="()[]{}<>«»»«[]{}";function u3(e){for(let t=0;t<16;t+=2)if(l3.charCodeAt(t)==e)return l3.charAt(t+1);return F$(e<128?e:e+1)}function c3(e,t){return e.languageDataAt("closeBrackets",t)[0]||o3}const d3="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),h3=mY.inputHandler.of(((e,t,n,r)=>{if((d3?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(r.length>2||2==r.length&&1==j$(L$(r,0))||t!=o.from||n!=o.to)return!1;let i=function(e,t){let n=c3(e,e.selection.main.head),r=n.brackets||o3.brackets;for(let o of r){let i=u3(L$(o,0));if(t==o)return i==o?y3(e,o,r.indexOf(o+o+o)>-1,n):g3(e,o,i,n.before||o3.before);if(t==i&&f3(e,e.selection.main.from))return v3(e,o,i)}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)})),p3=[{key:"Backspace",run:e=>{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=c3(t,t.selection.main.head).brackets||o3.brackets,o=null,i=t.changeByRange((e=>{if(e.empty){let n=function(e,t){let n=e.sliceString(t-2,t);return j$(L$(n,0))==n.length?n:n.slice(1)}(t.doc,e.head);for(let o of r)if(o==n&&m3(t.doc,e.head)==u3(L$(o,0)))return{changes:{from:e.head-o.length,to:e.head+o.length},range:Y$.cursor(e.head-o.length)}}return{range:o=e}}));return o||n(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!o}}];function f3(e,t){let n=!1;return e.field(s3).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function m3(e,t){let n=e.sliceString(t,t+2);return n.slice(0,j$(L$(n,0)))}function g3(e,t,n,r){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:i3.of(i.to+t.length),range:Y$.range(i.anchor+t.length,i.head+t.length)};let a=m3(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:i3.of(i.head+t.length),range:Y$.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function v3(e,t,n){let r=null,o=e.changeByRange((t=>t.empty&&m3(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:Y$.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function y3(e,t,n,r){let o=r.stringPrefixes||o3.stringPrefixes,i=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:i3.of(r.to+t.length),range:Y$.range(r.anchor+t.length,r.head+t.length)};let a,s=r.head,l=m3(e.doc,s);if(l==t){if(b3(e,s))return{changes:{insert:t+t,from:s},effects:i3.of(s+t.length),range:Y$.cursor(s+t.length)};if(f3(e,s)){let r=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:Y$.cursor(s+r.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=x3(e,s-2*t.length,o))>-1&&b3(e,a))return{changes:{insert:t+t+t+t,from:s},effects:i3.of(s+t.length),range:Y$.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=FW.Word&&x3(e,s,o)>-1&&!function(e,t,n,r){let o=gJ(e).resolveInner(t,-1),i=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:i3.of(s+t.length),range:Y$.cursor(s+t.length)}}return{range:i=r}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function b3(e,t){let n=gJ(e).resolveInner(t+1);return n.parent&&n.from==t}function x3(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=FW.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&r(e.sliceDoc(n-1,n))!=FW.Word)return n}return-1}const w3=[{key:"Ctrl-Space",run:Q5},{mac:"Alt-`",run:Q5},{key:"Escape",run:e=>{let t=e.state.field(q5,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:T5.of(null)}),!0)}},{key:"ArrowDown",run:X5(!0)},{key:"ArrowUp",run:X5(!1)},{key:"PageDown",run:X5(!0,"page")},{key:"PageUp",run:X5(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(q5,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(R5).defaultKeymap?[w3]:[])));class C3{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class k3{static init(e,t,n){let r=e,o=n.facet(j3).markerFilter;o&&(r=o(r,n));let i=e.slice().sort(((e,t)=>e.from-t.from||e.to-t.to)),a=new qW,s=[],l=0;for(let e=0;;){let t,r,o=e==i.length?null:i[e];if(!o&&!s.length)break;for(s.length?(t=l,r=s.reduce(((e,t)=>Math.min(e,t.to)),o&&o.from>t?o.from:1e8)):(t=o.from,r=o.to,s.push(o),e++);en.from||n.to==t)){r=Math.min(n.from,r);break}s.push(n),e++,r=Math.min(n.to,r)}let u=K3(s);if(s.some((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from)))a.add(t,t,xU.widget({widget:new V3(u),diagnostics:s.slice()}));else{let e=s.reduce(((e,t)=>t.markClass?e+" "+t.markClass:e),"");a.add(t,r,xU.mark({class:"cm-lintRange cm-lintRange-"+u+e,diagnostics:s.slice(),inclusiveEnd:s.some((e=>e.to>r))}))}l=r;for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,((e,n,o)=>{let{spec:i}=o;if(!(t&&i.diagnostics.indexOf(t)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new C3(r.from,n,r.diagnostic)}else r=new C3(e,n,t||i.diagnostics[0])})),r}function _3(e,t){let n=t.pos,r=t.end||n,o=e.state.facet(j3).hideOn(e,n,r);if(null!=o)return o;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(P3)))&&!e.changes.touchesRange(i.from,Math.max(i.to,r)))}function T3(e,t){return e.field(D3,!1)?t:t.concat(IW.appendConfig.of(r4))}const P3=IW.define(),I3=IW.define(),R3=IW.define(),D3=aW.define({create:()=>new k3(xU.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,o=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=M3(n,e.selected.diagnostic,o)||M3(n,null,o)}!n.size&&o&&t.state.facet(j3).autoPanel&&(o=null),e=new k3(n,o,r)}for(let n of t.effects)if(n.is(P3)){let r=t.state.facet(j3).autoPanel?n.value.length?$3.open:null:e.panel;e=k3.init(n.value,r,t.state)}else n.is(I3)?e=new k3(e.diagnostics,n.value?$3.open:null,e.selected):n.is(R3)&&(e=new k3(e.diagnostics,e.panel,n.value));return e},provide:e=>[EX.from(e,(e=>e.panel)),mY.decorations.from(e,(e=>e.diagnostics))]});const O3=xU.mark({class:"cm-lintRange cm-lintRange-active"});function A3(e,t,n){let r,{diagnostics:o}=e.state.field(D3),i=-1,a=-1;o.between(t-(n<0?1:0),t+(n>0?1:0),((e,o,s)=>{let{spec:l}=s;if(t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t({dom:E3(e,r)})}:null}function E3(e,t){return p2("ul",{class:"cm-tooltip-lint"},t.map((t=>B3(e,t,!1))))}const Z3=e=>{let t=e.state.field(D3,!1);return!(!t||!t.panel)&&(e.dispatch({effects:I3.of(!1)}),!0)},L3=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(D3,!1);t&&t.panel||e.dispatch({effects:T3(e.state,[I3.of(!0)])});let n=RX(e,$3.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(D3,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],F3=vq.fromClass(class{run(){clearTimeout(this.timeout);let e=Date.now();if(e{r.push(n),clearTimeout(o),r.length==e.length?t(r):o=setTimeout((()=>t(r)),200)}),n)}(t.map((e=>Promise.resolve(e(this.view)))),(t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:T3(e,[P3.of(t)])}}(this.view.state,t.reduce(((e,t)=>e.concat(t)))))}),(e=>{pq(this.view.state,e)}))}}update(e){let t=e.state.facet(j3);(e.docChanged||t!=e.startState.facet(j3)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(j3);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}});const j3=J$.define({combine:e=>Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},VW(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function N3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[j3.of({source:e,config:t}),F3,r4]}function z3(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function B3(e,t,n){var r;let o=n?z3(t.actions):[];return p2("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},p2("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let i=!1,a=r=>{if(r.preventDefault(),i)return;i=!0;let o=M3(e.state.field(D3).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:s}=n,l=o[r]?s.indexOf(o[r]):-1,u=l<0?s:[s.slice(0,l),p2("u",s.slice(l,l+1)),s.slice(l+1)];return p2("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[r]})"`}.`},u)})),t.source&&p2("div",{class:"cm-diagnosticSource"},t.source))}class V3 extends yU{eq(e){return e.sev==this.sev}toDOM(){return p2("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}constructor(e){super(),this.sev=e}}class H3{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=B3(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class $3{get selectedIndex(){let e=this.view.state.field(D3).selected;if(!e)return-1;for(let t=0;t{let{spec:l}=s;for(let e of l.diagnostics){if(i.has(e))continue;i.add(e);let a,s=-1;for(let t=n;tn&&(this.items.splice(n,s-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),o=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}}));n({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:e=>{let{sel:t,panel:n}=e,r=n.height/this.list.offsetHeight;t.topn.bottom&&(this.list.scrollTop+=(t.bottom-n.bottom)/r)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=M3(this.view.state.field(D3).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:R3.of(t)})}static open(e){return new $3(e)}constructor(e){this.view=e,this.items=[];this.list=p2("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)Z3(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=z3(n.actions);for(let o=0;o{for(let t=0;tZ3(this.view)},"×")),this.update()}}function W3(e){return`url('data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"'}>${encodeURIComponent(e)}')`}function G3(e){return W3(``,'width="6" height="3"')}const U3=mY.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:G3("#d11")},".cm-lintRange-warning":{backgroundImage:G3("orange")},".cm-lintRange-info":{backgroundImage:G3("#999")},".cm-lintRange-hint":{backgroundImage:G3("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function q3(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function K3(e){let t="hint",n=1;for(let r of e){let e=q3(r.severity);e>n&&(n=e,t=r.severity)}return t}class Y3 extends ZX{toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(o4).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:e4.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:E3(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientXo.top-10&&r.clientY{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),i=setTimeout(r,o)}}(e,t,n)),t}constructor(e){super(),this.diagnostics=e,this.severity=K3(e)}}function X3(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new Y3(n[e]).range(+e));return UW.of(r,!0)}const Q3=zX({class:"cm-gutter-lint",markers:e=>e.state.field(J3),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(J3).between(n.from,n.to,((e,t,o)=>{e>n.from&&eUW.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(o4).markerFilter;for(let r of t.effects)if(r.is(P3)){let o=r.value;n&&(o=n(o||[],t.state)),e=X3(t.state.doc,o.slice(0))}return e}}),e4=IW.define(),t4=aW.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=_3(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce(((e,t)=>t.is(e4)?t.value:e),e)),provide:e=>xX.from(e)}),n4=mY.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:W3('')},".cm-lint-marker-warning":{content:W3('')},".cm-lint-marker-error":{content:W3('')}}),r4=[D3,mY.decorations.compute([D3],(e=>{let{selected:t,panel:n}=e.field(D3);return t&&n&&t.from!=t.to?xU.set([O3.range(t.from,t.to)]):xU.none})),_X(A3,{hideOn:_3}),U3],o4=J$.define({combine:e=>VW(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function i4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[o4.of(e),J3,Q3,n4,t4]}var a4=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(p3)),!1!==e.defaultKeymap&&(n=n.concat(d2)),!1!==e.searchKeymap&&(n=n.concat(u5)),!1!==e.historyKeymap&&(n=n.concat(h1)),!1!==e.foldKeymap&&(n=n.concat(e0)),!1!==e.completionKeymap&&(n=n.concat(w3)),!1!==e.lintKeymap&&(n=n.concat(L3));var r=[];return!1!==e.lineNumbers&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[XX.of(e),VX(),eQ]}()),!1!==e.highlightActiveLineGutter&&r.push(rQ),!1!==e.highlightSpecialChars&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[JY.of(e),eX||(eX=vq.fromClass(class{makeDecorator(e){return new qY({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:o}=n.state,i=L$(t[0],0);if(9==i){let e=o.lineAt(r),t=n.state.tabSize,i=iG(e.text,t,r-e.from);return xU.replace({widget:new nX((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=xU.replace({widget:new tX(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(JY);e.startState.facet(JY)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}constructor(e){this.view=e,this.decorations=xU.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(JY)),this.decorations=this.decorator.createDeco(e)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[K0,q0.of(e),mY.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?X0:"historyRedo"==e.inputType?Q0:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},s0),e),n=new l0(t,!0),r=new l0(t,!1),o=vq.fromClass(class{update(e){(e.docChanged||e.viewportChanged||e.startState.facet(MJ)!=e.state.facet(MJ)||e.startState.field(KJ,!1)!=e.state.field(KJ,!1)||gJ(e.startState)!=gJ(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new qW;for(let o of e.viewportLineBlocks){let i=YJ(e.state,o.from,o.to)?r:$J(e.state,o.from,o.to)?n:null;i&&t.add(o.from,o.from,i)}return t.finish()}constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}}),{domEventHandlers:i}=t;return[o,zX({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||UW.empty},initialSpacer:()=>new l0(t,!1),domEventHandlers:Object.assign(Object.assign({},i),{click:(e,t,n)=>{if(i.click&&i.click(e,t,n))return!0;let r=YJ(e.state,t.from,t.to);if(r)return e.dispatch({effects:UJ.of(r)}),!0;let o=$J(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:GJ.of(o)}),!0)}})}),r0()]}()),!1!==e.drawSelection&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[FY.of(e),NY,BY,HY,lq.of(!0)]}()),!1!==e.dropCursor&&r.push([WY,GY]),!1!==e.allowMultipleSelections&&r.push(BW.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(BW.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,o=n.lineAt(r);if(r>o.from+200)return e;let i=n.sliceString(o.from,r);if(!t.some((e=>e.test(i))))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=DJ(a,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],o=RJ(a,n);r!=o&&l.push({from:t.from,to:t.from+r.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&r.push(f0(v0,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[x0.of(e),k0]}()),!1!==e.closeBrackets&&r.push([h3,s3]),!1!==e.autocompletion&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[n3,q5,R5.of(e),e3,S3,r3]}()),!1!==e.rectangularSelection&&r.push(function(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return mY.mouseSelectionStyle.of(((e,n)=>t(n)?lX(e,n):null))}()),!1!==t&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=uX[e.key||"Alt"],r=vq.fromClass(class{set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}constructor(e){this.view=e,this.isDown=!1}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,mY.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?cX:null}))]}()),!1!==e.highlightActiveLine&&r.push(oX),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[E2,A2];return e&&t.push(I2.of(e)),t}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(PJ.of(" ".repeat(e.tabSize))),r.concat([CY.of(n.flat())]).filter(Boolean)};const s4="#e5c07b",l4="#e06c75",u4="#56b6c2",c4="#ffffff",d4="#abb2bf",h4="#7d8799",p4="#61afef",f4="#98c379",m4="#d19a66",g4="#c678dd",v4="#21252b",y4="#2c313a",b4="#282c34",x4="#353a42",w4="#3E4451",S4="#528bff",C4=[mY.theme({"&":{color:d4,backgroundColor:b4},".cm-content":{caretColor:S4},".cm-cursor, .cm-dropCursor":{borderLeftColor:S4},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:w4},".cm-panels":{backgroundColor:v4,color:d4},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:b4,color:h4,border:"none"},".cm-activeLineGutter":{backgroundColor:y4},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:x4},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:x4,borderBottomColor:x4},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:y4,color:d4}}},{dark:!0}),f0(c0.define([{tag:lJ.keyword,color:g4},{tag:[lJ.name,lJ.deleted,lJ.character,lJ.propertyName,lJ.macroName],color:l4},{tag:[lJ.function(lJ.variableName),lJ.labelName],color:p4},{tag:[lJ.color,lJ.constant(lJ.name),lJ.standard(lJ.name)],color:m4},{tag:[lJ.definition(lJ.name),lJ.separator],color:d4},{tag:[lJ.typeName,lJ.className,lJ.number,lJ.changed,lJ.annotation,lJ.modifier,lJ.self,lJ.namespace],color:s4},{tag:[lJ.operator,lJ.operatorKeyword,lJ.url,lJ.escape,lJ.regexp,lJ.link,lJ.special(lJ.string)],color:u4},{tag:[lJ.meta,lJ.comment],color:h4},{tag:lJ.strong,fontWeight:"bold"},{tag:lJ.emphasis,fontStyle:"italic"},{tag:lJ.strikethrough,textDecoration:"line-through"},{tag:lJ.link,color:h4,textDecoration:"underline"},{tag:lJ.heading,fontWeight:"bold",color:l4},{tag:[lJ.atom,lJ.bool,lJ.special(lJ.variableName)],color:m4},{tag:[lJ.processingInstruction,lJ.string,lJ.inserted],color:f4},{tag:lJ.invalid,color:c4}]))];var k4=mY.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),M4=function(e){void 0===e&&(e={});var t,{indentWithTab:n=!0,editable:r=!0,readOnly:o=!1,theme:i="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(CY.of([h2])),s&&("boolean"==typeof s?l.unshift(a4()):l.unshift(a4(s))),a&&l.unshift((t=a,vq.fromClass(class{get decorations(){return this.view.state.doc.length?xU.none:this.placeholder}constructor(e){this.view=e,this.placeholder=t?xU.set([xU.widget({widget:new iX(t),side:1}).range(0)]):xU.none}},{decorations:e=>e.decorations}))),i){case"light":l.push(k4);break;case"dark":l.push(C4);break;case"none":break;default:l.push(i)}return!1===r&&l.push(mY.editable.of(!1)),o&&l.push(BW.readOnly.of(!0)),[...l]},_4=_W.define(),T4=[];var P4=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],I4=(0,d.forwardRef)(((e,t)=>{var{className:n,value:r="",selection:i,extensions:a=[],onChange:s,onStatistics:l,onCreateEditor:u,onUpdate:c,autoFocus:h,theme:p="light",height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:C,readOnly:k,root:M,initialState:_}=e,T=(0,p$.Z)(e,P4),P=(0,d.useRef)(null),{state:I,view:R,container:D,setContainer:O}=function(e){var{value:t,selection:n,onChange:r,onStatistics:o,onCreateEditor:i,onUpdate:a,extensions:s=T4,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:p=null,width:f=null,minWidth:m=null,maxWidth:g=null,placeholder:v="",editable:y=!0,readOnly:b=!1,indentWithTab:x=!0,basicSetup:w=!0,root:S,initialState:C}=e,[k,M]=(0,d.useState)(),[_,T]=(0,d.useState)(),[P,I]=(0,d.useState)(),R=mY.theme({"&":{height:c,minHeight:h,maxHeight:p,width:f,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),D=mY.updateListener.of((e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some((e=>e.annotation(_4)))){var t=e.state.doc.toString();r(t,e)}o&&o((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),O=[D,R,...M4({theme:u,editable:y,readOnly:b,placeholder:v,indentWithTab:x,basicSetup:w})];return a&&"function"==typeof a&&O.push(mY.updateListener.of(a)),O=O.concat(s),(0,d.useLayoutEffect)((()=>{if(k&&!P){var e={doc:t,selection:n,extensions:O},r=C?BW.fromJSON(C.json,e,C.fields):BW.create(e);if(I(r),!_){var o=new mY({state:r,parent:k,root:S});T(o),i&&i(o,r)}}return()=>{_&&(I(void 0),T(void 0))}}),[k,P]),(0,d.useEffect)((()=>{e.container&&M(e.container)}),[e.container]),(0,d.useEffect)((()=>()=>{_&&(_.destroy(),T(void 0))}),[_]),(0,d.useEffect)((()=>{l&&_&&_.focus()}),[l,_]),(0,d.useEffect)((()=>{_&&_.dispatch({effects:IW.reconfigure.of(O)})}),[u,s,c,h,p,f,m,g,v,y,b,x,w,r,a]),(0,d.useEffect)((()=>{if(void 0!==t){var e=_?_.state.doc.toString():"";_&&t!==e&&_.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[_4.of(!0)]})}}),[t,_]),{state:P,setState:I,view:_,setView:T,container:k,setContainer:M}}({root:M,value:r,autoFocus:h,theme:p,height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:C,readOnly:k,selection:i,onChange:s,onStatistics:l,onCreateEditor:u,onUpdate:c,extensions:a,initialState:_});(0,d.useImperativeHandle)(t,(()=>({editor:P.current,state:I,view:R})),[P,D,I,R]);var A=(0,d.useCallback)((e=>{P.current=e,O(e)}),[O]);if("string"!=typeof r)throw new Error("value must be typeof string but got "+typeof r);var E="string"==typeof p?"cm-theme-"+p:"cm-theme";return(0,o.jsx)("div",(0,h$.Z)({ref:A,className:E+(n?" "+n:"")},T))}));I4.displayName="CodeMirror";const R4=I4;class D4{toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.parser.context;return new D4(e,[],t,n,n,0,[],0,r?new O4(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:o}=this.p,i=this.reducePos=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(o&&this.pos!=n){let o=this.buffer.length;if(o>0&&0!=this.buffer[o-4]){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let o=e,{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new D4(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new A4(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,o=0;o1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,o=this.stack.length-3*n;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,o)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-o;if(n>1){let r=65535&t,o=this.stack.length-3*n;if(o>=0&&e.getGoto(this.stack[o],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,o+1);if(null!=e)return e}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}constructor(e,t,n,r,o,i,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=u,this.parent=c}}class O4{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class A4{reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}}class E4{static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.bufferBase+e.buffer.length;return new E4(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new E4(this.stack,this.pos,this.index)}constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}}function Z4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof e)return e;let n=null;for(let r=0,o=0;r=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,n=!0),i+=o,n)break;i*=46}n?n[o++]=i:n=new t(i)}return n}class L4{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const F4=new L4;class j4{resolveOffset(e,t){let n=this.range,r=this.rangeIndex,o=this.pos+e;for(;on.to:o>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];o+=e.from-n.to,n=e}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=F4,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=F4,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}}class N4{token(e,t){let{parser:n}=t.p;z4(this.data,e,t,this.id,n.data,n.tokenPrecTable)}constructor(e,t){this.data=e,this.id=t}}N4.prototype.contextual=N4.prototype.fallback=N4.prototype.extend=!1;N4.prototype.fallback=N4.prototype.extend=!1;function z4(e,t,n,r,o,i){let a=0,s=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||V4(n,t.token.value,o,i))){t.acceptToken(n);break}}let r=t.next,u=0,c=e[a+2];if(!(t.next<0&&c>u&&65535==e[n+3*c-3])){for(;u>1,i=n+o+(o<<1),s=e[i],l=e[i+1]||65536;if(r=l)){a=e[i+2],t.advance();continue e}u=o+1}}break}a=e[n+3*c-1]}}function B4(e,t,n){for(let r,o=t;65535!=(r=e[o]);o++)if(r==n)return o-t;return-1}function V4(e,t,n,r){let o=B4(n,r,t);return o<0||B4(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class G4{nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?W4(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?W4(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=i,null;if(o instanceof gQ){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}}class U4{getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:o}=r,i=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;ru.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){let r=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||(n=new L4,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new L4,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(o>>1)){1&o?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;tnew L4))}}class q4{get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ir)o.push(a);else{if(this.advanceStack(a,o,n))continue;{e||(e=[],t=[]),e.push(a);let n=this.tokens.getMainToken(a);t.push(n.value,n.end)}}break}}if(!o.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,o);if(n)return H4&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort(((e,t)=>t.score-e.score));o.length>e;)o.pop();o.some((e=>e.reducePos>r))&&this.recovering--}else if(o.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(n--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(sQ.contextHash)||0)==n))return e.useNode(a,r),H4&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof gQ)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof gQ&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),H4&&console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;ar?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return K4(e,t),!0}}runRecovery(e,t,n){let r=null,o=!1;for(let i=0;i ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),H4&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}let c=a.split(),d=u;for(let e=0;c.forceReduce()&&e<10;e++){if(H4&&console.log(d+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,n))break;H4&&(d=this.stackID(c)+" -> ")}for(let e of a.recoverByInsert(s))H4&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),H4&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),K4(a,n)):(!r||r.score4*e.bufferLength?new G4(n,e.nodeSet):null}}function K4(e,t){for(let n=0;n2&&void 0!==arguments[2]&&arguments[2],r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let t=r[o++],i=1&t,a=r[o++];if(i&&n)return a;for(let n=o+(t>>1);o0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Q4(this.data,n+2)}r=t(Q4(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=Q4(this.data,n+2)}if(!(1&this.data[n+2])){let e=this.data[n+1];t.some(((t,n)=>1&n&&t==e))||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(X4.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let n=e.tokenizers.find((e=>e.from==t));return n?n.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((n,r)=>{let o=e.specializers.find((e=>e.from==n.external));if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[r]=J4(i),i}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map((()=>!1));if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.topRules[t][1])),r=[];for(let e=0;e=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let a=-r;a>0;a--)o(t[n++],e,i);n++}}}this.nodeSet=new dQ(t.map(((t,o)=>cQ.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=oQ;let i=Z4(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new N4(i,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}}function Q4(e,t){return e[t]|e[t+1]<<16}function J4(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}const e6=BQ({String:lJ.string,Number:lJ.number,"True False":lJ.bool,PropertyName:lJ.propertyName,Null:lJ.null,", :":lJ.separator,"[ ]":lJ.squareBracket,"{ }":lJ.brace}),t6=X4.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[e6],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),n6=()=>e=>{try{JSON.parse(e.state.doc.toString())}catch(t){if(!(t instanceof SyntaxError))throw t;const n=function(e,t){let n;return(n=e.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=e.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0}(t,e.state.doc);return[{from:n,message:t.message,severity:"error",to:n}]}return[]};const r6=mJ.define({name:"json",parser:t6.configure({props:[AJ.add({Object:zJ({except:/^\s*\}/}),Array:zJ({except:/^\s*\]/})}),VJ.add({"Object Array":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.toJSON.stringify(e.value,null,2))),[a,s]=(0,d.useState)(r);return(0,o.jsx)(R4,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new _J(r6),N3(n6()),i4()],value:r,onChange:t=>{i(t),e.onChange&&e.onChange(t)},onBlur:()=>{a!==r&&void 0!==e.onChange&&(e.onChange(r),s(r))},placeholder:e.placeholder})}var i6=n(75918),a6=n(36679),s6=n(36025),l6=n(42140);function u6(e){let{control:t,...n}=e;const{fields:r,append:i,remove:a}=(0,a6.useFieldArray)({control:t,name:"panelDefinition.spec.links"});return(0,o.jsxs)(l.Z,{...n,gap:3,children:[r&&r.length>0?r.map(((e,n)=>(0,o.jsxs)(d.Fragment,{children:[(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(c6,{control:t,index:n}),(0,o.jsx)(u.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>a(n),children:(0,o.jsx)(l6.default,{})})]}),(0,o.jsx)(c$.Z,{})]},e.id))):(0,o.jsx)(ku.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,o.jsx)(u.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>i({url:""}),children:(0,o.jsx)(s6.default,{})})]})}function c6(e){let{control:t,index:n}=e;return(0,o.jsxs)(l.Z,{gap:2,flexGrow:1,children:[(0,o.jsxs)(l.Z,{direction:"row",gap:2,children:[(0,o.jsx)(a6.Controller,{control:t,name:`panelDefinition.spec.links.${n}.url`,render:e=>{let{field:t,fieldState:n}=e;var r;return(0,o.jsx)(c.Z,{...t,required:!0,fullWidth:!0,label:"URL",error:!!n.error,helperText:null===(r=n.error)||void 0===r?void 0:r.message,onChange:e=>{t.onChange(e)}})}}),(0,o.jsx)(a6.Controller,{control:t,name:`panelDefinition.spec.links.${n}.name`,render:e=>{let{field:t,fieldState:n}=e;var r;return(0,o.jsx)(c.Z,{...t,fullWidth:!0,label:"Name",defaultValue:"",error:!!n.error,helperText:null===(r=n.error)||void 0===r?void 0:r.message,onChange:e=>{t.onChange(e)}})}}),(0,o.jsx)(a6.Controller,{control:t,name:`panelDefinition.spec.links.${n}.tooltip`,render:e=>{let{field:t,fieldState:n}=e;var r;return(0,o.jsx)(c.Z,{...t,fullWidth:!0,label:"Tooltip",defaultValue:"",error:!!n.error,helperText:null===(r=n.error)||void 0===r?void 0:r.message,onChange:e=>{t.onChange(e)}})}})]}),(0,o.jsxs)(l.Z,{gap:2,direction:"row",alignItems:"center",children:[(0,o.jsx)(a6.Controller,{control:t,name:`panelDefinition.spec.links.${n}.renderVariables`,render:e=>{let{field:t}=e;return(0,o.jsx)(i6.Z,{label:"Render Variables",control:(0,o.jsx)(rc.Z,{...t,checked:t.value,onChange:e=>t.onChange(e.target.checked)})})}}),(0,o.jsx)(a6.Controller,{control:t,name:`panelDefinition.spec.links.${n}.targetBlank`,render:e=>{let{field:t}=e;return(0,o.jsx)(i6.Z,{label:"Open in new tab",control:(0,o.jsx)(rc.Z,{...t,checked:t.value,onChange:e=>t.onChange(e.target.checked)})})}})]})]})}const d6=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function h6(e){let{disablePercentageMode:t,onChange:n,value:r="value"}=e;return(0,o.jsx)(Vc,{label:"Mode",control:(0,o.jsx)(Uc,{value:d6.find((e=>e.id===r)),options:d6,getOptionLabel:e=>e.label,getOptionDisabled:e=>"percentage"===e.id&&t,onChange:(e,t)=>{let{id:r}=t;n(r)},disableClearable:!0})})}var p6=n(35691);function f6(e){const{message:t}=e;return(0,o.jsx)(l.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,o.jsx)(ku.Z,{children:t})})}function m6(e){const{resource:t}=e;return(0,o.jsx)(f6,{message:`No ${t}`})}function g6(e){const{variant:t="rounded"}=e;return(0,o.jsx)(l.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,o.jsx)(p6.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}const v6=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function y6(e){let{onChange:t,value:n="desc"}=e;return(0,o.jsx)(Vc,{label:"Sort",control:(0,o.jsx)(Uc,{value:v6.find((e=>e.id===n)),options:v6,getOptionLabel:e=>e.label,onChange:(e,n)=>{let{id:r}=n;t(r)},disableClearable:!0})})}function b6(e){let{onChange:t,value:n,...r}=e;const s=e=>{t(e)};return(0,o.jsxs)(i.Z,{"aria-label":"Sort",...r,children:[(0,o.jsx)(a.Z,{onClick:()=>s(void 0),variant:void 0===n?"contained":"outlined",children:"None"}),(0,o.jsx)(a.Z,{onClick:()=>s("asc"),variant:"asc"===n?"contained":"outlined",children:"Asc"}),(0,o.jsx)(a.Z,{onClick:()=>s("desc"),variant:"desc"===n?"contained":"outlined",children:"Desc"})]})}var x6=n(54936);function w6(e){return(0,Iu.ZP)("MuiToggleButtonGroup",e)}const S6=(0,Pu.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);const C6=d.createContext({});const k6=d.createContext(void 0);function M6(e){return(0,Iu.ZP)("MuiToggleButton",e)}const _6=(0,Pu.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),T6=(0,Y.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${S6.grouped}`]:t.grouped},{[`& .${S6.grouped}`]:t[`grouped${(0,Tu.Z)(n.orientation)}`]},{[`& .${S6.firstButton}`]:t.firstButton},{[`& .${S6.lastButton}`]:t.lastButton},{[`& .${S6.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,nl.Z)((e=>{let{theme:t}=e;return{display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${S6.grouped}`]:{[`&.${S6.selected} + .${S6.grouped}.${S6.selected}`]:{borderTop:0,marginTop:0}},[`& .${S6.firstButton},& .${S6.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${S6.lastButton},& .${S6.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${S6.lastButton}.${_6.disabled},& .${S6.middleButton}.${_6.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${S6.grouped}`]:{[`&.${S6.selected} + .${S6.grouped}.${S6.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${S6.firstButton},& .${S6.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${S6.lastButton},& .${S6.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${S6.lastButton}.${_6.disabled},& .${S6.middleButton}.${_6.disabled}`]:{borderLeft:"1px solid transparent"}}}]}}))),P6=d.forwardRef((function(e,t){const n=(0,rl.i)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:u=!1,onChange:c,orientation:h="horizontal",size:p="medium",value:f,...m}=n,g={...n,disabled:s,fullWidth:u,orientation:h,size:p},v=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,Tu.Z)(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,el.Z)(i,w6,t)})(g),y=d.useCallback(((e,t)=>{if(!c)return;const n=f&&f.indexOf(t);let r;f&&n>=0?(r=f.slice(),r.splice(n,1)):r=f?f.concat(t):[t],c(e,r)}),[c,f]),b=d.useCallback(((e,t)=>{c&&c(e,f===t?null:t)}),[c,f]),x=d.useMemo((()=>({className:v.grouped,onChange:l?b:y,value:f,size:p,fullWidth:u,color:a,disabled:s})),[v.grouped,l,b,y,f,p,u,a,s]),w=(0,x6.Z)(r),S=w.length,C=e=>{const t=0===e,n=e===S-1;return t&&n?"":t?v.firstButton:n?v.lastButton:v.middleButton};return(0,o.jsx)(T6,{role:"group",className:(0,Js.Z)(v.root,i),ref:t,ownerState:g,...m,children:(0,o.jsx)(C6.Provider,{value:x,children:w.map(((e,t)=>(0,o.jsx)(k6.Provider,{value:C(t),children:e},t)))})})}));var I6=n(75214),R6=n(38358);function D6(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.includes(e):e===t)}const O6=(0,Y.ZP)(il.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${(0,Tu.Z)(n.size)}`]]}})((0,nl.Z)((e=>{let{theme:t}=e;return{...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${_6.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,tl.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${_6.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,tl.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette.text.primary,t.palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter((0,R6.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${_6.selected}`]:{color:(t.vars||t).palette[n].main,backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette[n].main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,tl.Fq)(t.palette[n].main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,tl.Fq)(t.palette[n].main,t.palette.action.selectedOpacity)}}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}}))),A6=d.forwardRef((function(e,t){const{value:n,...r}=d.useContext(C6),i=d.useContext(k6),a=(0,I6.Z)({...r,selected:D6(e.value,n)},e),s=(0,rl.i)({props:a,name:"MuiToggleButton"}),{children:l,className:u,color:c="standard",disabled:h=!1,disableFocusRipple:p=!1,fullWidth:f=!1,onChange:m,onClick:g,selected:v,size:y="medium",value:b,...x}=s,w={...s,color:c,disabled:h,disableFocusRipple:p,fullWidth:f,size:y},S=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${(0,Tu.Z)(i)}`,a]};return(0,el.Z)(s,M6,t)})(w),C=i||"";return(0,o.jsx)(O6,{className:(0,Js.Z)(r.className,S.root,u,C),disabled:h,focusRipple:!p,ref:t,onClick:e=>{g&&(g(e,b),e.defaultPrevented)||m&&m(e,b)},onChange:m,value:b,ownerState:w,"aria-pressed":v,...x,children:l})}));const E6=(0,n(17180).Z)();var Z6=n(21319);function L6(e){let{inputRef:t,label:n,color:r,value:i,mode:a,onChange:s,onColorChange:h,onBlur:p,onDelete:f}=e;const[m,g]=(0,d.useState)(0);return(0,o.jsxs)(l.Z,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,o.jsx)(Qr,{label:n,color:r,onColorChange:h}),(0,o.jsx)(Zc.Z,{htmlFor:n,children:n}),(0,o.jsx)(c.Z,{id:n,inputRef:t,type:"number",value:0===i?"":i,placeholder:"0",onChange:s,onBlur:p,onKeyDown:e=>{"Enter"===e.key&&(p(),g(m+1))},InputProps:{endAdornment:"percent"===a?(0,o.jsx)(to.Z,{paddingX:1,children:"%"}):void 0}},m),(0,o.jsx)(u.Z,{"aria-label":`delete threshold ${n}`,size:"small",onClick:f,children:(0,o.jsx)(Z6.default,{})})]})}const F6=10;function j6(e){let{thresholds:t,onChange:n,hideDefault:r,disablePercentMode:i}=e;const a=ee(),{thresholds:{defaultColor:s,palette:l}}=a,c=(null==t?void 0:t.defaultColor)??s,[h,p]=(0,d.useState)(null==t?void 0:t.steps);(0,d.useEffect)((()=>{p(null==t?void 0:t.steps)}),[null==t?void 0:t.steps]);const f=(0,d.useRef)(null),m=(0,d.useRef)(!1);(0,d.useEffect)((()=>{var e;f.current&&m.current&&(null===(e=f.current)||void 0===e||e.focus(),m.current=!1)}),[null==h?void 0:h.length]);const g=()=>{if(void 0!==h){const e=[...h];e.sort(((e,t)=>e.value-t.value)),void 0!==t&&n((0,ro.Uy)(t,(t=>{t.steps=e})))}};return(0,o.jsxs)($c,{title:"Thresholds",icon:(0,o.jsx)(Nc,{description:"Add threshold",children:(0,o.jsx)(u.Z,{size:"small","aria-label":"add threshold",onClick:()=>{m.current=!0,void 0===t?n({steps:[{value:F6}]}):t&&void 0===t.steps?n((0,ro.Uy)(t,(e=>{e.steps=[{value:F6}]}))):n((0,ro.Uy)(t,(e=>{const t=e.steps;if(null==t?void 0:t.length){const e=t[t.length-1],n=l[t.length]??N6();t.push({color:n,value:((null==e?void 0:e.value)??0)+F6})}else t&&t.push({value:F6})})))},children:(0,o.jsx)(s6.default,{})})}),children:[(0,o.jsx)(Vc,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,o.jsxs)(P6,{exclusive:!0,disabled:i,value:(null==t?void 0:t.mode)??"absolute",onChange:(e,r)=>{const o="percent"===r?"percent":void 0;n(void 0!==t?(0,ro.Uy)(t,(e=>{e.mode=o})):{mode:o})},sx:{height:"36px",marginLeft:"auto"},children:[(0,o.jsx)(A6,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,o.jsx)(A6,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),h&&h.map(((e,r)=>(0,o.jsx)(L6,{inputRef:r===h.length-1?f:void 0,label:`T${r+1}`,color:e.color??l[r]??c,value:e.value,mode:null==t?void 0:t.mode,onColorChange:e=>((e,r)=>{void 0!==t&&n((0,ro.Uy)(t,(t=>{if(void 0!==t.steps){const n=t.steps[r];n&&(n.color=e)}})))})(e,r),onChange:e=>{((e,t)=>{p((0,ro.Uy)(h,(n=>{const r=null==n?void 0:n[t];r&&(r.value=Number(e.target.value))})))})(e,r)},onDelete:()=>{(e=>{if(void 0!==t){const r=(0,ro.Uy)(t,(t=>{t.steps&&t.steps.splice(e,1)}));n(r)}})(r)},onBlur:g},r))).reverse(),!r&&(0,o.jsxs)(E6,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,o.jsx)(Qr,{label:"default",color:c,onColorChange:e=>{n(void 0!==t?(0,ro.Uy)(t,(t=>{t.defaultColor=e})):{defaultColor:e})}}),(0,o.jsx)(ku.Z,{children:"Default"})]})]})}const N6=()=>"#"+Math.floor(16777216*Math.random()).toString(16).padStart(6,"0");var z6=n(99551),B6=n(37411),V6=n(19703);const H6=["localeText"],$6=d.createContext(null);const W6=function(e){const{localeText:t}=e,n=(0,p$.Z)(e,H6),{utils:r,localeText:i}=d.useContext($6)??{utils:void 0,localeText:void 0},a=(0,V6.Z)({props:n,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:c,adapterLocale:h,localeText:p}=a,f=d.useMemo((()=>(0,h$.Z)({},p,i,t)),[p,i,t]),m=d.useMemo((()=>{if(!l)return r||null;const e=new l({locale:h,formats:u,instance:c});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[l,h,u,c,r]),g=d.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),v=d.useMemo((()=>({utils:m,defaultDates:g,localeText:f})),[g,m,f]);return(0,o.jsx)($6.Provider,{value:v,children:s})};var G6=n(34662),U6=n.n(G6);const q6={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${r||null!==t&&n.isValid(t)?`Selected time is ${r??n.format(t,"fullTime")}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},K6=q6;Y6=q6,(0,h$.Z)({},Y6);var Y6;const X6=()=>{const e=d.useContext($6);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=d.useMemo((()=>(0,h$.Z)({},K6,e.localeText)),[e.localeText]);return d.useMemo((()=>(0,h$.Z)({},e,{localeText:t})),[e,t])},Q6=()=>X6().utils,J6=()=>X6().defaultDates,e9=e=>{const t=Q6(),n=d.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},t9=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},n9=e=>{let{date:t,disableFuture:n,disablePast:r,maxDate:o,minDate:i,isDateDisabled:a,utils:s,timezone:l}=e;const u=t9(s,s.date(void 0,l),t);r&&s.isBefore(i,u)&&(i=u),n&&s.isAfter(o,u)&&(o=u);let c=t,d=t;for(s.isBefore(t,i)&&(c=i,d=null),s.isAfter(t,o)&&(d&&(d=o),c=null);c||d;){if(c&&s.isAfter(c,o)&&(c=null),d&&s.isBefore(d,i)&&(d=null),c){if(!a(c))return c;c=s.addDays(c,1)}if(d){if(!a(d))return d;d=s.addDays(d,-1)}}return null},r9=(e,t,n)=>null!=t&&e.isValid(t)?t:n,o9=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},i9=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),a9=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},s9=["year","month","day"],l9=e=>s9.includes(e),u9=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))};var c9=n(54918),d9=n(18911),h9=n(28705);const p9=(0,Mu.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),f9=(0,Mu.Z)((0,o.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),m9=(0,Mu.Z)((0,o.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),g9=((0,Mu.Z)((0,o.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,Mu.Z)((0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,Mu.Z)((0,o.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange")),v9=(0,Mu.Z)((0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),y9=(0,Mu.Z)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),b9=()=>X6().localeText;function x9(e){return(0,Iu.ZP)("MuiDateTimePickerTabs",e)}(0,Pu.Z)("MuiDateTimePickerTabs",["root"]);const w9=e=>l9(e)?"date":"time",S9=(0,Y.ZP)(d9.Z,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{boxShadow:`0 -1px 0 0 inset ${(t.vars||t).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(t.vars||t).palette.divider}`,[`& .${h9.Z.indicator}`]:{bottom:"auto",top:0}}}})),C9=function(e){const t=(0,V6.Z)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,o.jsx)(g9,{}),onViewChange:r,timeIcon:i=(0,o.jsx)(v9,{}),view:a,hidden:s="undefined"==typeof window||window.innerHeight<667,className:l,sx:u}=t,c=b9(),h=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},x9,t)})(t);return s?null:(0,o.jsxs)(S9,{ownerState:t,variant:"fullWidth",value:w9(a),onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,Js.Z)(l,h.root),sx:u,children:[(0,o.jsx)(c9.Z,{value:"date","aria-label":c.dateTableLabel,icon:(0,o.jsx)(d.Fragment,{children:n})}),(0,o.jsx)(c9.Z,{value:"time","aria-label":c.timeTableLabel,icon:(0,o.jsx)(d.Fragment,{children:i})})]})};function k9(e){return(0,Iu.ZP)("MuiPickersToolbarText",e)}const M9=(0,Pu.Z)("MuiPickersToolbarText",["root","selected"]),_9=["className","selected","value"],T9=(0,Y.ZP)(ku.Z,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${M9.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return{transition:t.transitions.create("color"),color:(t.vars||t).palette.text.secondary,[`&.${M9.selected}`]:{color:(t.vars||t).palette.text.primary}}})),P9=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,a=(0,p$.Z)(n,_9),s=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,el.Z)(r,k9,t)})(n);return(0,o.jsx)(T9,(0,h$.Z)({ref:t,className:(0,Js.Z)(s.root,r),component:"span"},a,{children:i}))}));function I9(e){return(0,Iu.ZP)("MuiPickersToolbar",e)}const R9=(0,Pu.Z)("MuiPickersToolbar",["root","content"]),D9=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],O9=(0,Y.ZP)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]}})),A9=(0,Y.ZP)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),E9=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:a,hidden:s,titleId:l}=n,u=(0,p$.Z)(n,D9),c=n,d=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],content:["content"]},I9,t)})(c);return s?null:(0,o.jsxs)(O9,(0,h$.Z)({ref:t,className:(0,Js.Z)(d.root,i),ownerState:c},u,{children:[(0,o.jsx)(ku.Z,{color:"text.secondary",variant:"overline",id:l,children:a}),(0,o.jsx)(A9,{className:d.content,ownerState:c,children:r})]}))})),Z9=["align","className","selected","typographyClassName","value","variant","width"],L9=(0,Y.ZP)(a.Z,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),F9=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:a,typographyClassName:s,value:l,variant:u,width:c}=n,d=(0,p$.Z)(n,Z9),h=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},I9,t)})(n);return(0,o.jsx)(L9,(0,h$.Z)({variant:"text",ref:t,className:(0,Js.Z)(h.root,i)},c?{sx:{width:c}}:{},d,{children:(0,o.jsx)(P9,{align:r,className:s,variant:u,value:l,selected:a})}))}));function j9(e){return(0,Iu.ZP)("MuiDateTimePickerToolbar",e)}const N9=(0,Pu.Z)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),z9=["hours","minutes","seconds"],B9=e=>z9.includes(e),V9=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},H9=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),$9=(e,t)=>(n,r)=>e?t.isAfter(n,r):H9(n,t)>H9(r,t);function W9(e,t,n,r){const o=Q6(),i=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,o),a=d.useCallback((i=>{const a=null==e?null:((e,t,n,r)=>{const o=V9(r.getHours(e),t,n);return r.setHours(e,o)})(e,i,Boolean(t),o);n(a,r??"partial")}),[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const G9=320,U9=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],q9=(0,Y.ZP)(E9,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,[`& .${R9.content} .${M9.selected}`]:{color:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]}})),K9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Y9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:e=>{let{isLandscape:t,toolbarVariant:n}=e;return t&&"desktop"!==n},style:{flexDirection:"column"}},{props:e=>{let{isLandscape:t,toolbarVariant:n,isRtl:r}=e;return t&&"desktop"!==n&&r},style:{flexDirection:"column-reverse"}}]}),X9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),Q9=(0,Y.ZP)(P9,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),J9=(0,Y.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${N9.ampmLabel}`]:t.ampmLabel},{[`&.${N9.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${N9.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function e7(e){const t=(0,V6.Z)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:a,view:s,isLandscape:l,onViewChange:u,toolbarFormat:c,toolbarPlaceholder:h="––",views:p,disabled:f,readOnly:m,toolbarVariant:g="mobile",toolbarTitle:v,className:y}=t,b=(0,p$.Z)(t,U9),x=(0,hh.V)(),w=(0,h$.Z)({},t,{isRtl:x}),S=Q6(),{meridiemMode:C,handleMeridiemChange:k}=W9(i,n,a),M=Boolean(n&&!r),_="desktop"===g,T=b9(),P=(e=>{const{classes:t,isLandscape:n,isRtl:r}=e,o={root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return(0,el.Z)(o,j9,t)})(w),I=v??T.dateTimePickerToolbarTitle,R=d.useMemo((()=>i?c?S.formatByString(i,c):S.format(i,"shortDate"):h),[i,c,h,S]);return(0,o.jsxs)(q9,(0,h$.Z)({isLandscape:l,className:(0,Js.Z)(P.root,y),toolbarTitle:I},b,{ownerState:w,children:[(0,o.jsxs)(K9,{className:P.dateContainer,ownerState:w,children:[p.includes("year")&&(0,o.jsx)(F9,{tabIndex:-1,variant:"subtitle1",onClick:()=>u("year"),selected:"year"===s,value:i?S.format(i,"year"):"–"}),p.includes("day")&&(0,o.jsx)(F9,{tabIndex:-1,variant:_?"h5":"h4",onClick:()=>u("day"),selected:"day"===s,value:R})]}),(0,o.jsxs)(Y9,{className:P.timeContainer,ownerState:w,children:[(0,o.jsxs)(X9,{className:P.timeDigitsContainer,ownerState:w,children:[p.includes("hours")&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(F9,{variant:_?"h5":"h3",width:_&&!l?48:void 0,onClick:()=>u("hours"),selected:"hours"===s,value:i?(D=i,n?S.format(D,"hours12h"):S.format(D,"hours24h")):"--"}),(0,o.jsx)(Q9,{variant:_?"h5":"h3",value:":",className:P.separator,ownerState:w}),(0,o.jsx)(F9,{variant:_?"h5":"h3",width:_&&!l?48:void 0,onClick:()=>u("minutes"),selected:"minutes"===s||!p.includes("minutes")&&"hours"===s,value:i?S.format(i,"minutes"):"--",disabled:!p.includes("minutes")})]}),p.includes("seconds")&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(Q9,{variant:_?"h5":"h3",value:":",className:P.separator,ownerState:w}),(0,o.jsx)(F9,{variant:_?"h5":"h3",width:_&&!l?48:void 0,onClick:()=>u("seconds"),selected:"seconds"===s,value:i?S.format(i,"seconds"):"--"})]})]}),M&&!_&&(0,o.jsxs)(J9,{className:P.ampmSelection,ownerState:w,children:[(0,o.jsx)(F9,{variant:"subtitle2",selected:"am"===C,typographyClassName:P.ampmLabel,value:a9(S,"am"),onClick:m?void 0:()=>k("am"),disabled:f}),(0,o.jsx)(F9,{variant:"subtitle2",selected:"pm"===C,typographyClassName:P.ampmLabel,value:a9(S,"pm"),onClick:m?void 0:()=>k("pm"),disabled:f})]}),n&&_&&(0,o.jsx)(F9,{variant:"h5",onClick:()=>u("meridiem"),selected:"meridiem"===s,value:i&&C?a9(S,C):"--",width:48})]})]}));var D}function t7(e,t){var n;const r=Q6(),o=J6(),i=(0,V6.Z)({props:e,name:t}),a=i.ampm??r.is12HourCycleInCurrentLocale(),s=d.useMemo((()=>{var e;return null==(null===(e=i.localeText)||void 0===e?void 0:e.toolbarTitle)?i.localeText:(0,h$.Z)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})}),[i.localeText]);return(0,h$.Z)({},i,(e=>{let{openTo:t,defaultOpenTo:n,views:r,defaultViews:o}=e;const i=r??o;let a;if(null!=t)a=t;else if(i.includes(n))a=n;else{if(!(i.length>0))throw new Error("MUI X: The `views` prop must contain at least one view.");a=i[0]}return{views:i,openTo:a}})({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:a,localeText:s,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??Boolean(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:r9(r,i.minDateTime??i.minDate,o.minDate),maxDate:r9(r,i.maxDateTime??i.maxDate,o.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,h$.Z)({toolbar:e7,tabs:C9},i.slots),slotProps:(0,h$.Z)({},i.slotProps,{toolbar:(0,h$.Z)({ampm:a},null===(n=i.slotProps)||void 0===n?void 0:n.toolbar)})})}var n7=n(30341),r7=n(62045);function o7(e){return(0,Iu.ZP)("MuiPickersArrowSwitcher",e)}(0,Pu.Z)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const i7=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],a7=["ownerState"],s7=["ownerState"],l7=(0,Y.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),u7=(0,Y.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((e=>{let{theme:t}=e;return{width:t.spacing(3)}})),c7=(0,Y.ZP)(u.Z,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),d7=d.forwardRef((function(e,t){const n=(0,hh.V)(),r=(0,V6.Z)({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:c,onGoToNext:d,nextLabel:h,isPreviousDisabled:p,isPreviousHidden:f,onGoToPrevious:m,previousLabel:g,labelId:v}=r,y=(0,p$.Z)(r,i7),b=r,x=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},o7,t)})(b),w={isDisabled:u,isHidden:c,goTo:d,label:h},S={isDisabled:p,isHidden:f,goTo:m,label:g},C=(null==s?void 0:s.previousIconButton)??c7,k=(0,r7.Z)({elementType:C,externalSlotProps:null==l?void 0:l.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:(0,h$.Z)({},b,{hidden:S.isHidden}),className:(0,Js.Z)(x.button,x.previousIconButton)}),M=(null==s?void 0:s.nextIconButton)??c7,_=(0,r7.Z)({elementType:M,externalSlotProps:null==l?void 0:l.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:(0,h$.Z)({},b,{hidden:w.isHidden}),className:(0,Js.Z)(x.button,x.nextIconButton)}),T=(null==s?void 0:s.leftArrowIcon)??f9,P=(0,r7.Z)({elementType:T,externalSlotProps:null==l?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:x.leftArrowIcon}),I=(0,p$.Z)(P,a7),R=(null==s?void 0:s.rightArrowIcon)??m9,D=(0,r7.Z)({elementType:R,externalSlotProps:null==l?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:x.rightArrowIcon}),O=(0,p$.Z)(D,s7);return(0,o.jsxs)(l7,(0,h$.Z)({ref:t,className:(0,Js.Z)(x.root,a),ownerState:b},y,{children:[(0,o.jsx)(C,(0,h$.Z)({},k,{children:n?(0,o.jsx)(R,(0,h$.Z)({},O)):(0,o.jsx)(T,(0,h$.Z)({},I))})),i?(0,o.jsx)(ku.Z,{variant:"subtitle1",component:"span",id:v,children:i}):(0,o.jsx)(u7,{className:x.spacer,ownerState:b}),(0,o.jsx)(M,(0,h$.Z)({},_,{children:n?(0,o.jsx)(T,(0,h$.Z)({},I)):(0,o.jsx)(R,(0,h$.Z)({},O))}))]}))}));var h7=n(49098),p7=n(89210);function f7(e){let{onChange:t,onViewChange:n,openTo:r,view:o,views:i,autoFocus:a,focusedView:s,onFocusedViewChange:l}=e;const u=d.useRef(r),c=d.useRef(i),h=d.useRef(i.includes(r)?r:i[0]),[p,f]=(0,p7.Z)({name:"useViews",state:"view",controlled:o,default:h.current}),m=d.useRef(a?p:null),[g,v]=(0,p7.Z)({name:"useViews",state:"focusedView",controlled:s,default:m.current});d.useEffect((()=>{(u.current&&u.current!==r||c.current&&c.current.some((e=>!i.includes(e))))&&(f(i.includes(r)?r:i[0]),c.current=i,u.current=r)}),[r,f,p,i]);const y=i.indexOf(p),b=i[y-1]??null,x=i[y+1]??null,w=(0,h7.Z)(((e,t)=>{v(t?e:t=>e===t?null:t),null==l||l(e,t)})),S=(0,h7.Z)((e=>{w(e,!0),e!==p&&(f(e),n&&n(e))})),C=(0,h7.Z)((()=>{x&&S(x)})),k=(0,h7.Z)(((e,n,r)=>{const o="finish"===n,a=r?i.indexOf(r){const r=t-x7.x,o=n-x7.y,i=Math.atan2(w7,S7)-Math.atan2(r,o);let a=i*(180/Math.PI);a=Math.round(a/e)*e,a%=360;const s=r**2+o**2;return{value:Math.floor(a/e)||0,distance:Math.sqrt(s)}};function k7(e){return(0,Iu.ZP)("MuiClockPointer",e)}(0,Pu.Z)("MuiClockPointer",["root","thumb"]);const M7=["className","hasSelected","isInner","type","viewValue"],_7=(0,Y.ZP)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{width:2,backgroundColor:(t.vars||t).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:t.transitions.create(["transform","height"])}}]}})),T7=(0,Y.ZP)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{width:4,height:4,backgroundColor:(t.vars||t).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(t.vars||t).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(t.vars||t).palette.primary.main}}]}}));function P7(e){const t=(0,V6.Z)({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:i,viewValue:a}=t,s=(0,p$.Z)(t,M7),l=d.useRef(i);d.useEffect((()=>{l.current=i}),[i]);const u=(0,h$.Z)({},t,{shouldAnimate:l.current!==i}),c=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],thumb:["thumb"]},k7,t)})(u);return(0,o.jsx)(_7,(0,h$.Z)({style:(()=>{let e=360/("hours"===i?12:60)*a;return"hours"===i&&a>12&&(e-=360),{height:Math.round((r?.26:.4)*y7),transform:`rotateZ(${e}deg)`}})(),className:(0,Js.Z)(c.root,n),ownerState:u},s,{children:(0,o.jsx)(T7,{ownerState:u,className:c.thumb})}))}function I7(e){return(0,Iu.ZP)("MuiClock",e)}(0,Pu.Z)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const R7=(0,Y.ZP)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",margin:t.spacing(2)}})),D7=(0,Y.ZP)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),O7=(0,Y.ZP)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),A7=(0,Y.ZP)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),E7=(0,Y.ZP)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((e=>{let{theme:t}=e;return{width:6,height:6,borderRadius:"50%",backgroundColor:(t.vars||t).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})),Z7=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:b7,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),L7=(0,Y.ZP)(u.Z,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((e=>{let{theme:t}=e;return(0,h$.Z)({},Z7(t,"am"),{position:"absolute",left:8})})),F7=(0,Y.ZP)(u.Z,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((e=>{let{theme:t}=e;return(0,h$.Z)({},Z7(t,"pm"),{position:"absolute",right:8})})),j7=(0,Y.ZP)(ku.Z,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function N7(e){const t=(0,V6.Z)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:a,value:s,handleMeridiemChange:l,isTimeDisabled:u,meridiemMode:c,minutesStep:h=1,onChange:p,selectedId:f,type:m,viewValue:g,viewRange:[v,y],disabled:b=!1,readOnly:x,className:w}=t,S=t,C=Q6(),k=b9(),M=d.useRef(!1),_=(e=>{const{classes:t,meridiemMode:n}=e,r={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]};return(0,el.Z)(r,I7,t)})(S),T=u(g,m),P=!n&&"hours"===m&&(g<1||g>12),I=(e,t)=>{b||x||u(e,m)||p(e,t)},R=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===m||"minutes"===m?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=6*n;let{value:o}=C7(r,e,t);return o=o*n%60,o}(r,o,h):((e,t,n)=>{const{value:r,distance:o}=C7(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,Boolean(n));I(i,t)},D=e=>{M.current=!0,R(e,"shallow")},O=d.useMemo((()=>"hours"===m||g%5==0),[m,g]),A="minutes"===m?h:1,E=d.useRef(null);(0,v7.Z)((()=>{i&&E.current.focus()}),[i]);const Z=e=>Math.max(v,Math.min(y,e)),L=e=>(e+(y+1))%(y+1);return(0,o.jsxs)(R7,{className:(0,Js.Z)(_.root,w),children:[(0,o.jsxs)(D7,{className:_.clock,children:[(0,o.jsx)(A7,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{M.current&&(R(e,"finish"),M.current=!1),e.preventDefault()},onMouseUp:e=>{M.current&&(M.current=!1),R(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&R(e.nativeEvent,"shallow")},ownerState:{disabled:b},className:_.squareMask}),!T&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(E7,{className:_.pin}),null!=s&&(0,o.jsx)(P7,{type:m,viewValue:g,isInner:P,hasSelected:O})]}),(0,o.jsx)(O7,{"aria-activedescendant":f,"aria-label":k.clockLabelText(m,s,C,null==s?null:C.format(s,"fullTime")),ref:E,role:"listbox",onKeyDown:e=>{if(!M.current)switch(e.key){case"Home":I(v,"partial"),e.preventDefault();break;case"End":I(y,"partial"),e.preventDefault();break;case"ArrowUp":I(L(g+A),"partial"),e.preventDefault();break;case"ArrowDown":I(L(g-A),"partial"),e.preventDefault();break;case"PageUp":I(Z(g+5),"partial"),e.preventDefault();break;case"PageDown":I(Z(g-5),"partial"),e.preventDefault();break;case"Enter":case" ":I(g,"finish"),e.preventDefault()}},tabIndex:0,className:_.wrapper,children:a})]}),n&&r&&(0,o.jsxs)(d.Fragment,{children:[(0,o.jsx)(L7,{onClick:x?void 0:()=>l("am"),disabled:b||null===c,ownerState:S,className:_.amButton,title:a9(C,"am"),children:(0,o.jsx)(j7,{variant:"caption",className:_.meridiemText,children:a9(C,"am")})}),(0,o.jsx)(F7,{disabled:b||null===c,onClick:x?void 0:()=>l("pm"),ownerState:S,className:_.pmButton,title:a9(C,"pm"),children:(0,o.jsx)(j7,{variant:"caption",className:_.meridiemText,children:a9(C,"pm")})})]})]})}function z7(e){return(0,Iu.ZP)("MuiClockNumber",e)}const B7=(0,Pu.Z)("MuiClockNumber",["root","selected","disabled"]),V7=["className","disabled","index","inner","label","selected"],H7=(0,Y.ZP)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${B7.disabled}`]:t.disabled},{[`&.${B7.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return{height:b7,width:b7,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(t.vars||t).palette.text.primary,fontFamily:t.typography.fontFamily,"&:focused":{backgroundColor:(t.vars||t).palette.background.paper},[`&.${B7.selected}`]:{color:(t.vars||t).palette.primary.contrastText},[`&.${B7.disabled}`]:{pointerEvents:"none",color:(t.vars||t).palette.text.disabled},variants:[{props:{inner:!0},style:(0,h$.Z)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary})}]}}));function $7(e){const t=(0,V6.Z)({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:a,label:s,selected:l}=t,u=(0,p$.Z)(t,V7),c=t,d=(e=>{const{classes:t,selected:n,disabled:r}=e,o={root:["root",n&&"selected",r&&"disabled"]};return(0,el.Z)(o,z7,t)})(c),h=i%12/12*Math.PI*2-Math.PI/2,p=91*(a?.65:1),f=Math.round(Math.cos(h)*p),m=Math.round(Math.sin(h)*p);return(0,o.jsx)(H7,(0,h$.Z)({className:(0,Js.Z)(d.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:`translate(${f}px, ${m+92}px`},ownerState:c},u,{children:s}))}const W7=e=>{let{ampm:t,value:n,getClockNumberText:r,isDisabled:i,selectedId:a,utils:s}=e;const l=n?s.getHours(n):null,u=[],c=t?12:23,d=e=>null!==l&&(t?12===e?12===l||0===l:l===e||l-12===e:l===e);for(let e=t?1:0;e<=c;e+=1){let n=e.toString();0===e&&(n="00");const l=!t&&(0===e||e>12);n=s.formatNumber(n);const c=d(e);u.push((0,o.jsx)($7,{id:c?a:void 0,index:e,inner:l,selected:c,disabled:i(e),label:n,"aria-label":r(n)},e))}return u},G7=e=>{let{utils:t,value:n,isDisabled:r,getClockNumberText:i,selectedId:a}=e;const s=t.formatNumber;return[[5,s("05")],[10,s("10")],[15,s("15")],[20,s("20")],[25,s("25")],[30,s("30")],[35,s("35")],[40,s("40")],[45,s("45")],[50,s("50")],[55,s("55")],[0,s("00")]].map(((e,t)=>{let[s,l]=e;const u=s===n;return(0,o.jsx)($7,{label:l,id:u?a:void 0,index:t+1,inner:!1,disabled:r(s),selected:u,"aria-label":i(l)},s)}))},U7=e=>{let{timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a}=e;const s=Q6(),l=d.useRef(r),u=n??l.current??a.emptyValue,c=d.useMemo((()=>a.getTimezone(s,u)),[s,a,u]),h=(0,h7.Z)((e=>null==c?e:a.setTimezone(s,c,e)));let p;p=t||(c||(o?s.getTimezone(o):"default"));const f=d.useMemo((()=>a.setTimezone(s,p,u)),[a,s,p,u]),m=(0,h7.Z)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let{name:t,timezone:n,value:r,defaultValue:o,referenceDate:i,onChange:a,valueManager:s}=e;const[l,u]=(0,p7.Z)({name:t,state:"value",controlled:r,default:o??s.emptyValue}),c=(0,h7.Z)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{if(t===K7.year)return e.startOfYear(n);if(t===K7.month)return e.startOfMonth(n);if(t===K7.day)return e.startOfDay(n);let r=n;return t{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Q7=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map((n=>e.formatByString(n,t)))},J7=(e,t,n,r)=>{switch(n){case"month":return o9(e,e.date(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return Q7(e,r);case"meridiem":{const n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},e8=["0","1","2","3","4","5","6","7","8","9"],t8=(e,t)=>{if("0"===t[0])return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},n8=(e,t)=>"0"===t[0]?e:e.split("").map((e=>t[Number(e)])).join(""),r8=(e,t)=>{const n=t8(e,t);return" "!==n&&!Number.isNaN(Number(n))},o8=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const r=e.setDate(n.longestMonth,t);return e.formatByString(r,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=o8(i,o.maxLength)),n8(i,r)},a8=(e,t,n,r,o,i,a,s)=>{const l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),h=t=>i8(e,t,r,i,n),p="minutes"===n.type&&(null==s?void 0:s.minutesStep)?s.minutesStep:1;let f=parseInt(t8(n.value,i),10)+l*p;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);f=l>0||u?r.minimum:r.maximum}return f%p!=0&&((l<0||u)&&(f+=p-(p+f)%p),(l>0||c)&&(f-=f%p)),f>r.maximum?h(r.minimum+(f-r.maximum-1)%(r.maximum-r.minimum+1)):f{const r=J7(e,t,n.type,n.format);if(0===r.length)return n.value;if(d)return l>0||u?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[((o+l)%r.length+r.length)%r.length]})()},s8=(e,t,n)=>{let r=e.value||e.placeholder;const o="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(t8(r,n)).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!o&&1===r.length&&(r=`${r}‎`),"input-rtl"===t&&(r=`⁨${r}⁩`),r},l8=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),u8=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,c8=(e,t,n,r)=>{if("digit"!==t)return!1;const o=e.date(void 0,"default");switch(n){case"year":if(u8(e,r)){return"0001"===e.formatByString(e.setYear(o,1),r)}return"01"===e.formatByString(e.setYear(o,2001),r);case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}};const d8=(e,t)=>{0},h8={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},p8=(e,t,n,r,o)=>[...n].sort(((e,t)=>h8[e.type]-h8[t.type])).reduce(((n,r)=>!o||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const r=Q7(e,t.format),o=e.formatByString(n,t.format),i=r.indexOf(o),a=r.indexOf(t.value)-i;return e.addDays(n,a)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,o=e.getHours(r);return t&&o>=12?e.addHours(r,-12):!t&&o<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n),r),f8=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){const n=t.findIndex((t=>t.type===e));return-1===n?null:n}return e},m8=(e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}},g8=(e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}},v8=["value","referenceDate"],y8={emptyValue:null,getTodayValue:i9,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,p$.Z)(e,v8);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(e=>{let{props:t,utils:n,granularity:r,timezone:o,getTodayDate:i}=e,a=i?i():Y7(n,r,i9(n,o));null!=t.minDate&&n.isAfterDay(t.minDate,a)&&(a=Y7(n,r,t.minDate)),null!=t.maxDate&&n.isBeforeDay(t.maxDate,a)&&(a=Y7(n,r,t.maxDate));const s=$9(t.disableIgnoringDatePartForTimeValidation??!1,n);return null!=t.minTime&&s(t.minTime,a)&&(a=Y7(n,r,t.disableIgnoringDatePartForTimeValidation?t.minTime:t9(n,a,t.minTime))),null!=t.maxTime&&s(a,t.maxTime)&&(a=Y7(n,r,t.disableIgnoringDatePartForTimeValidation?t.maxTime:t9(n,a,t.maxTime))),a})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},b8={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map((e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`)).join(""),getV6InputValueFromSections:(e,t,n)=>{const r=e.map((e=>{const r=s8(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`})).join("");return n?`⁦${r}⁩`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},x8=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],w8=(0,Y.ZP)(m7,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),S8=(0,Y.ZP)(d7,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),C8=["hours","minutes"],k8=d.forwardRef((function(e,t){const n=Q6(),r=(0,V6.Z)({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:u,value:c,defaultValue:h,referenceDate:p,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:m,minTime:g,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:x,showViewSwitcher:w,onChange:S,view:C,views:k=C8,openTo:M,onViewChange:_,focusedView:T,onFocusedViewChange:P,className:I,disabled:R,readOnly:D,timezone:O}=r,A=(0,p$.Z)(r,x8),{value:E,handleValueChange:Z,timezone:L}=q7({name:"TimeClock",timezone:O,value:c,defaultValue:h,referenceDate:p,onChange:S,valueManager:y8}),F=(e=>{let{value:t,referenceDate:n,utils:r,props:o,timezone:i}=e;const a=d.useMemo((()=>y8.getInitialReferenceValue({value:t,utils:r,props:o,referenceDate:n,granularity:K7.day,timezone:i,getTodayDate:()=>i9(r,i,"date")})),[]);return t??a})({value:E,referenceDate:p,utils:n,props:r,timezone:L}),j=b9(),N=e9(L),{view:z,setView:B,previousView:V,nextView:H,setValueAndGoToNextView:$}=f7({view:C,views:k,openTo:M,onViewChange:_,onChange:Z,focusedView:T,onFocusedViewChange:P}),{meridiemMode:W,handleMeridiemChange:G}=W9(F,i,$),U=d.useCallback(((e,t)=>{const r=$9(f,n),o="hours"===t||"minutes"===t&&k.includes("seconds"),a=e=>{let{start:t,end:n}=e;return(!g||!r(g,n))&&((!m||!r(t,m))&&((!v||!r(t,N))&&(!y||!r(N,o?n:t))))},s=function(e){if(e%(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)!=0)return!1;if(x)switch(t){case"hours":return!x(n.setHours(F,e),"hours");case"minutes":return!x(n.setMinutes(F,e),"minutes");case"seconds":return!x(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=V9(e,W,i),r=n.setHours(F,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(F,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=n.setSeconds(F,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[i,F,f,m,W,g,b,x,n,v,y,N,k]),q=(0,n7.Z)(),K=d.useMemo((()=>{switch(z){case"hours":{const e=(e,t)=>{const r=V9(e,W,i);$(n.setHours(F,r),t,"hours")},t=n.getHours(F);let r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:W7({value:E,utils:n,ampm:i,onChange:e,getClockNumberText:j.hoursClockNumberText,isDisabled:e=>R||U(e,"hours"),selectedId:q}),viewRange:r}}case"minutes":{const e=n.getMinutes(F),t=(e,t)=>{$(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:G7({utils:n,value:e,onChange:t,getClockNumberText:j.minutesClockNumberText,isDisabled:e=>R||U(e,"minutes"),selectedId:q}),viewRange:[0,59]}}case"seconds":{const e=n.getSeconds(F),t=(e,t)=>{$(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:G7({utils:n,value:e,onChange:t,getClockNumberText:j.secondsClockNumberText,isDisabled:e=>R||U(e,"seconds"),selectedId:q}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}}),[z,n,E,i,j.hoursClockNumberText,j.minutesClockNumberText,j.secondsClockNumberText,W,$,F,U,q,R]),Y=r,X=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],arrowSwitcher:["arrowSwitcher"]},g7,t)})(Y);return(0,o.jsxs)(w8,(0,h$.Z)({ref:t,className:(0,Js.Z)(X.root,I),ownerState:Y},A,{children:[(0,o.jsx)(N7,(0,h$.Z)({autoFocus:s??!!T,ampmInClock:a&&k.includes("hours"),value:E,type:z,ampm:i,minutesStep:b,isTimeDisabled:U,meridiemMode:W,handleMeridiemChange:G,selectedId:q,disabled:R,readOnly:D},K)),w&&(0,o.jsx)(S8,{className:X.arrowSwitcher,slots:l,slotProps:u,onGoToPrevious:()=>B(V),isPreviousDisabled:!V,previousLabel:j.openPreviousView,onGoToNext:()=>B(H),isNextDisabled:!H,nextLabel:j.openNextView,ownerState:Y})]}))})),M8=e=>{let{view:t,onViewChange:n,focusedView:r,onFocusedViewChange:i,views:a,value:s,defaultValue:l,referenceDate:u,onChange:c,className:d,classes:h,disableFuture:p,disablePast:f,minTime:m,maxTime:g,shouldDisableTime:v,minutesStep:y,ampm:b,ampmInClock:x,slots:w,slotProps:S,readOnly:C,disabled:k,sx:M,autoFocus:_,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:P,timezone:I}=e;return(0,o.jsx)(k8,{view:t,onViewChange:n,focusedView:r&&B9(r)?r:null,onFocusedViewChange:i,views:a.filter(B9),value:s,defaultValue:l,referenceDate:u,onChange:c,className:d,classes:h,disableFuture:p,disablePast:f,minTime:m,maxTime:g,shouldDisableTime:v,minutesStep:y,ampm:b,ampmInClock:x,slots:w,slotProps:S,readOnly:C,disabled:k,sx:M,autoFocus:_,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:P,timezone:I})},_8=e=>{let{props:t,value:n,timezone:r,adapter:o}=e;if(null===n)return null;const{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:s,disablePast:l,disableFuture:u}=t,c=o.utils.date(void 0,r),d=r9(o.utils,t.minDate,o.defaultDates.minDate),h=r9(o.utils,t.maxDate,o.defaultDates.maxDate);switch(!0){case!o.utils.isValid(n):return"invalidDate";case Boolean(i&&i(n)):return"shouldDisableDate";case Boolean(a&&a(n)):return"shouldDisableMonth";case Boolean(s&&s(n)):return"shouldDisableYear";case Boolean(u&&o.utils.isAfterDay(n,c)):return"disableFuture";case Boolean(l&&o.utils.isBeforeDay(n,c)):return"disablePast";case Boolean(d&&o.utils.isBeforeDay(n,d)):return"minDate";case Boolean(h&&o.utils.isAfterDay(n,h)):return"maxDate";default:return null}};_8.valueManager=y8;const T8=e=>{let{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:r,minDate:o,maxDate:i,disableFuture:a,disablePast:s,timezone:l}=e;const u=X6();return d.useCallback((e=>null!==_8({adapter:u,value:e,timezone:l,props:{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:r,minDate:o,maxDate:i,disableFuture:a,disablePast:s}})),[u,t,n,r,o,i,a,s,l])},P8=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:h}=e,p=Q6(),f=d.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return(0,h$.Z)({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const e=o.newTimezone;if(n.getTimezone(r.currentMonth)===e)return r;let t=n.setTimezone(r.currentMonth,e);return n.getMonth(t)!==n.getMonth(r.currentMonth)&&(t=n.setMonth(t,n.getMonth(r.currentMonth))),(0,h$.Z)({},r,{currentMonth:t})}case"finishMonthSwitchingAnimation":return(0,h$.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return(0,h$.Z)({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(u),i,p)).current,m=d.useMemo((()=>y8.getInitialReferenceValue({value:t,utils:p,timezone:h,props:e,referenceDate:n,granularity:K7.day})),[n,h]),[g,v]=d.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:p.startOfMonth(m),slideDirection:"left"});d.useEffect((()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(m)})}),[m,p]);const y=d.useCallback((e=>{v((0,h$.Z)({type:"changeMonth"},e)),l&&l(e.newMonth)}),[l]),b=d.useCallback((e=>{const t=e;p.isSameMonth(t,g.currentMonth)||y({newMonth:p.startOfMonth(t),direction:p.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,y,p]),x=T8({shouldDisableDate:c,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:h}),w=d.useCallback((()=>{v({type:"finishMonthSwitchingAnimation"})}),[]),S=(0,h7.Z)(((e,t)=>{x(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:m,calendarState:g,changeMonth:b,changeFocusedDay:S,isDateDisabled:x,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}};var I8=n(47742),R8=n(75303);const D8=e=>(0,Iu.ZP)("MuiPickersFadeTransitionGroup",e),O8=((0,Pu.Z)("MuiPickersFadeTransitionGroup",["root"]),(0,Y.ZP)(I8.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function A8(e){const t=(0,V6.Z)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:a}=t,s=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},D8,t)})(t),l=(0,eo.Z)();return i?n:(0,o.jsx)(O8,{className:(0,Js.Z)(s.root,r),children:(0,o.jsx)(R8.Z,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:n},a)})}var E8=n(84075);function Z8(e){return(0,Iu.ZP)("MuiPickersDay",e)}const L8=(0,Pu.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),F8=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],j8=e=>{let{theme:t}=e;return(0,h$.Z)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,tl.Fq)(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${L8.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${L8.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${L8.disabled}:not(.${L8.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${L8.disabled}&.${L8.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${L8.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]})},N8=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},z8=(0,Y.ZP)(il.Z,{name:"MuiPickersDay",slot:"Root",overridesResolver:N8})(j8),B8=(0,Y.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:N8})((e=>{let{theme:t}=e;return(0,h$.Z)({},j8({theme:t}),{opacity:0,pointerEvents:"none"})})),V8=()=>{},H8=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:c,onClick:h,onDaySelect:p,onFocus:f=V8,onBlur:m=V8,onKeyDown:g=V8,onMouseDown:v=V8,onMouseEnter:y=V8,outsideCurrentMonth:b,selected:x=!1,showDaysOutsideCurrentMonth:w=!1,children:S,today:C=!1}=n,k=(0,p$.Z)(n,F8),M=(0,h$.Z)({},n,{autoFocus:r,disabled:s,disableHighlightToday:l,disableMargin:u,selected:x,showDaysOutsideCurrentMonth:w,today:C}),_=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s,c={root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,el.Z)(c,Z8,l)})(M),T=Q6(),P=d.useRef(null),I=(0,E8.Z)(P,t);(0,v7.Z)((()=>{!r||s||c||b||P.current.focus()}),[r,s,c,b]);return b&&!w?(0,o.jsx)(B8,{className:(0,Js.Z)(_.root,_.hiddenDaySpacingFiller,i),ownerState:M,role:k.role}):(0,o.jsx)(z8,(0,h$.Z)({className:(0,Js.Z)(_.root,i),ref:I,centerRipple:!0,disabled:s,tabIndex:x?0:-1,onKeyDown:e=>g(e,a),onFocus:e=>f(e,a),onBlur:e=>m(e,a),onMouseEnter:e=>y(e,a),onClick:e=>{s||p(a),b&&e.currentTarget.focus(),h&&h(e)},onMouseDown:e=>{v(e),b&&e.preventDefault()}},k,{ownerState:M,children:S||T.format(a,"dayOfMonth")}))})),$8=d.memo(H8);var W8=n(70948);function G8(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var U8=n(62509),q8=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=G8(n.className,r):n.setAttribute("class",G8(n.className&&n.className.baseVal||"",r)));var n,r}))},K8=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o(0,Iu.ZP)("MuiPickersSlideTransition",e),Q8=(0,Pu.Z)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),J8=["children","className","reduceAnimations","slideDirection","transKey","classes"],eee=(0,Y.ZP)(I8.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Q8["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Q8["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Q8.slideEnterActive}`]:t.slideEnterActive},{[`.${Q8.slideExit}`]:t.slideExit},{[`.${Q8["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Q8["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Q8["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Q8["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Q8.slideEnterActive}`]:{transform:"translate(0%)",transition:n},[`& .${Q8.slideExit}`]:{transform:"translate(0%)"},[`& .${Q8["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},[`& .${Q8["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}));const tee=e=>(0,Iu.ZP)("MuiDayCalendar",e),nee=((0,Pu.Z)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),ree=["ownerState"],oee=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),iee=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),aee=(0,Y.ZP)(ku.Z,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary}})),see=(0,Y.ZP)(ku.Z,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled}})),lee=(0,Y.ZP)(ku.Z,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((e=>{let{theme:t}=e;return(0,h$.Z)({},t.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})})),uee=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),cee=(0,Y.ZP)((function(e){const t=(0,V6.Z)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:a}=t,s=(0,p$.Z)(t,J8),l=(e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,el.Z)(r,X8,t)})(t),u=(0,eo.Z)();if(i)return(0,o.jsx)("div",{className:(0,Js.Z)(l.root,r),children:n});const c={exit:l.exit,enterActive:l.enterActive,enter:l.enter,exitActive:l.exitActive};return(0,o.jsx)(eee,{className:(0,Js.Z)(l.root,r),childFactory:e=>d.cloneElement(e,{classNames:c}),role:"presentation",children:(0,o.jsx)(Y8,(0,h$.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:u.transitions.duration.complex,classNames:c},s,{children:n}),a)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),dee=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),hee=(0,Y.ZP)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function pee(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:s,isViewFocused:l}=e,u=(0,p$.Z)(e,nee);const{disabled:c,disableHighlightToday:h,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:f,slots:m,slotProps:g,timezone:v}=t,y=Q6(),b=e9(v),x=null!==r&&y.isSameDay(n,r),w=i.some((e=>y.isSameDay(e,n))),S=y.isSameDay(n,b),C=(null==m?void 0:m.day)??$8,k=(0,r7.Z)({elementType:C,externalSlotProps:null==g?void 0:g.day,additionalProps:(0,h$.Z)({disableHighlightToday:h,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:p,"data-timestamp":y.toJsDate(n).valueOf()},u),ownerState:(0,h$.Z)({},t,{day:n,selected:w})}),M=(0,p$.Z)(k,ree),_=d.useMemo((()=>c||a(n)),[c,a,n]),T=d.useMemo((()=>y.getMonth(n)!==s),[y,n,s]),P=d.useMemo((()=>{const e=y.startOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.startOfWeek(e)):y.isSameDay(n,e)}),[s,n,f,y]),I=d.useMemo((()=>{const e=y.endOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.endOfWeek(e)):y.isSameDay(n,e)}),[s,n,f,y]);return(0,o.jsx)(C,(0,h$.Z)({},M,{day:n,disabled:_,autoFocus:l&&x,today:S,outsideCurrentMonth:T,isFirstVisibleCell:P,isLastVisibleCell:I,selected:w,tabIndex:x?0:-1,"aria-selected":w,"aria-current":S?"date":void 0}))}function fee(e){const t=(0,V6.Z)({props:e,name:"MuiDayCalendar"}),n=Q6(),{onFocusedDayChange:r,className:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:u,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:h,readOnly:p,reduceAnimations:f,renderLoading:m=()=>(0,o.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:v,disablePast:y,disableFuture:b,minDate:x,maxDate:w,shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:k,dayOfWeekFormatter:M=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:_,onFocusedViewChange:T,gridLabelId:P,displayWeekNumber:I,fixedWeekNumber:R,autoFocus:D,timezone:O}=t,A=e9(O),E=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},tee,t)})(t),Z=(0,hh.V)(),L=T8({shouldDisableDate:S,shouldDisableMonth:C,shouldDisableYear:k,minDate:x,maxDate:w,disablePast:y,disableFuture:b,timezone:O}),F=b9(),[j,N]=(0,p7.Z)({name:"DayCalendar",state:"hasFocus",controlled:_,default:D??!1}),[z,B]=d.useState((()=>l||A)),V=(0,h7.Z)((e=>{p||c(e)})),H=e=>{L(e)||(r(e),B(e),null==T||T(!0),N(!0))},$=(0,h7.Z)(((e,t)=>{switch(e.key){case"ArrowUp":H(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":H(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,Z?1:-1),o=n.addMonths(t,Z?1:-1),i=n9({utils:n,date:r,minDate:Z?r:n.startOfMonth(o),maxDate:Z?n.endOfMonth(o):r,isDateDisabled:L,timezone:O});H(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,Z?-1:1),o=n.addMonths(t,Z?-1:1),i=n9({utils:n,date:r,minDate:Z?n.startOfMonth(o):r,maxDate:Z?r:n.endOfMonth(o),isDateDisabled:L,timezone:O});H(i||r),e.preventDefault();break}case"Home":H(n.startOfWeek(t)),e.preventDefault();break;case"End":H(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":H(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":H(n.addMonths(t,-1)),e.preventDefault()}})),W=(0,h7.Z)(((e,t)=>H(t))),G=(0,h7.Z)(((e,t)=>{j&&n.isSameDay(z,t)&&(null==T||T(!1))})),U=n.getMonth(a),q=n.getYear(a),K=d.useMemo((()=>s.filter((e=>!!e)).map((e=>n.startOfDay(e)))),[n,s]),Y=`${q}-${U}`,X=d.useMemo((()=>d.createRef()),[Y]),Q=d.useMemo((()=>{const e=n.startOfMonth(a),t=n.endOfMonth(a);return L(z)||n.isAfterDay(z,t)||n.isBeforeDay(z,e)?n9({utils:n,date:z,minDate:e,maxDate:t,disablePast:y,disableFuture:b,isDateDisabled:L,timezone:O}):z}),[a,b,y,z,L,n,O]),J=d.useMemo((()=>{const e=n.getWeekArray(a);let t=n.addMonths(a,1);for(;R&&e.length{e.length(0,o.jsx)(aee,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:E.weekDayLabel,children:M(e)},t.toString())))]}),u?(0,o.jsx)(uee,{className:E.loadingContainer,children:m()}):(0,o.jsx)(cee,(0,h$.Z)({transKey:Y,onExited:h,reduceAnimations:f,slideDirection:g,className:(0,Js.Z)(i,E.slideTransition)},v,{nodeRef:X,children:(0,o.jsx)(dee,{ref:X,role:"rowgroup",className:E.monthContainer,children:J.map(((e,r)=>(0,o.jsxs)(hee,{role:"row",className:E.weekContainer,"aria-rowindex":r+1,children:[I&&(0,o.jsx)(lee,{className:E.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:F.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,o.jsx)(pee,{parentProps:t,day:e,selectedDays:K,focusableDay:Q,onKeyDown:$,onFocus:W,onBlur:G,onDaySelect:V,isDateDisabled:L,currentMonthNumber:U,isViewFocused:j,"aria-colindex":n+1},e.toString())))]},`week-${e[0]}`)))})}))]})}function mee(e){return(0,Iu.ZP)("MuiPickersMonth",e)}const gee=(0,Pu.Z)("MuiPickersMonth",["root","monthButton","disabled","selected"]),vee=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],yee=(0,Y.ZP)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),bee=(0,Y.ZP)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${gee.disabled}`]:t.disabled},{[`&.${gee.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return(0,h$.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,tl.Fq)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,tl.Fq)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${gee.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${gee.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),xee=d.memo((function(e){const t=(0,V6.Z)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":m,"aria-label":g,slots:v,slotProps:y}=t,b=(0,p$.Z)(t,vee),x=d.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]};return(0,el.Z)(o,mee,r)})(t);(0,v7.Z)((()=>{var e;n&&(null===(e=x.current)||void 0===e||e.focus())}),[n]);const S=(null==v?void 0:v.monthButton)??bee,C=(0,r7.Z)({elementType:S,externalSlotProps:null==y?void 0:y.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:e=>c(e,l),onKeyDown:e=>h(e,l),onFocus:e=>p(e,l),onBlur:e=>f(e,l)},ownerState:t,className:w.monthButton});return(0,o.jsx)(yee,(0,h$.Z)({className:(0,Js.Z)(w.root,r),ownerState:t},b,{children:(0,o.jsx)(S,(0,h$.Z)({},C))}))}));function wee(e){return(0,Iu.ZP)("MuiMonthCalendar",e)}(0,Pu.Z)("MuiMonthCalendar",["root"]);const See=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"];const Cee=(0,Y.ZP)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:G9,boxSizing:"border-box"}),kee=d.forwardRef((function(e,t){const n=function(e,t){const n=Q6(),r=J6(),o=(0,V6.Z)({props:e,name:t});return(0,h$.Z)({disableFuture:!1,disablePast:!1},o,{minDate:r9(n,o.minDate,r.minDate),maxDate:r9(n,o.maxDate,r.maxDate)})}(e,"MuiMonthCalendar"),{className:r,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:p,onChange:f,shouldDisableMonth:m,readOnly:g,autoFocus:v=!1,onMonthFocus:y,hasFocus:b,onFocusedViewChange:x,monthsPerRow:w=3,timezone:S,gridLabelId:C,slots:k,slotProps:M}=n,_=(0,p$.Z)(n,See),{value:T,handleValueChange:P,timezone:I}=q7({name:"MonthCalendar",timezone:S,value:i,defaultValue:a,referenceDate:s,onChange:f,valueManager:y8}),R=e9(I),D=(0,hh.V)(),O=Q6(),A=d.useMemo((()=>y8.getInitialReferenceValue({value:T,utils:O,props:n,timezone:I,referenceDate:s,granularity:K7.month})),[]),E=n,Z=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},wee,t)})(E),L=d.useMemo((()=>O.getMonth(R)),[O,R]),F=d.useMemo((()=>null!=T?O.getMonth(T):null),[T,O]),[j,N]=d.useState((()=>F||O.getMonth(A))),[z,B]=(0,p7.Z)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:v??!1}),V=(0,h7.Z)((e=>{B(e),x&&x(e)})),H=d.useCallback((e=>{const t=O.startOfMonth(c&&O.isAfter(R,p)?R:p),n=O.startOfMonth(u&&O.isBefore(R,h)?R:h),r=O.startOfMonth(e);return!!O.isBefore(r,t)||(!!O.isAfter(r,n)||!!m&&m(r))}),[u,c,h,p,R,m,O]),$=(0,h7.Z)(((e,t)=>{if(g)return;const n=O.setMonth(T??A,t);P(n)})),W=(0,h7.Z)((e=>{H(O.setMonth(T??A,e))||(N(e),V(!0),y&&y(e))}));d.useEffect((()=>{N((e=>null!==F&&e!==F?F:e))}),[F]);const G=(0,h7.Z)(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":W((n+t-3)%n),e.preventDefault();break;case"ArrowDown":W((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":W((n+t+(D?1:-1))%n),e.preventDefault();break;case"ArrowRight":W((n+t+(D?-1:1))%n),e.preventDefault()}})),U=(0,h7.Z)(((e,t)=>{W(t)})),q=(0,h7.Z)(((e,t)=>{j===t&&V(!1)}));return(0,o.jsx)(Cee,(0,h$.Z)({ref:t,className:(0,Js.Z)(Z.root,r),ownerState:E,role:"radiogroup","aria-labelledby":C},_,{children:o9(O,T??A).map((e=>{const t=O.getMonth(e),n=O.format(e,"monthShort"),r=O.format(e,"month"),i=t===F,a=l||H(e);return(0,o.jsx)(xee,{selected:i,value:t,onClick:$,onKeyDown:G,autoFocus:z&&t===j,disabled:a,tabIndex:t!==j||a?-1:0,onFocus:U,onBlur:q,"aria-current":L===t?"date":void 0,"aria-label":r,monthsPerRow:w,slots:k,slotProps:M,children:n},n)}))}))}));function Mee(e){return(0,Iu.ZP)("MuiPickersYear",e)}const _ee=(0,Pu.Z)("MuiPickersYear",["root","yearButton","selected","disabled"]),Tee=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Pee=(0,Y.ZP)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Iee=(0,Y.ZP)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${_ee.disabled}`]:t.disabled},{[`&.${_ee.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return(0,h$.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:(0,tl.Fq)(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,tl.Fq)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${_ee.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${_ee.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})})),Ree=d.memo((function(e){const t=(0,V6.Z)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:h,onFocus:p,onBlur:f,"aria-current":m,slots:g,slotProps:v}=t,y=(0,p$.Z)(t,Tee),b=d.useRef(null),x=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]};return(0,el.Z)(o,Mee,r)})(t);(0,v7.Z)((()=>{var e;n&&(null===(e=b.current)||void 0===e||e.focus())}),[n]);const w=(null==g?void 0:g.yearButton)??Iee,S=(0,r7.Z)({elementType:w,externalSlotProps:null==v?void 0:v.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:b,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:e=>c(e,l),onKeyDown:e=>h(e,l),onFocus:e=>p(e,l),onBlur:e=>f(e,l)},ownerState:t,className:x.yearButton});return(0,o.jsx)(Pee,(0,h$.Z)({className:(0,Js.Z)(x.root,r),ownerState:t},y,{children:(0,o.jsx)(w,(0,h$.Z)({},S))}))}));function Dee(e){return(0,Iu.ZP)("MuiYearCalendar",e)}(0,Pu.Z)("MuiYearCalendar",["root"]);const Oee=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"];const Aee=(0,Y.ZP)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:G9,maxHeight:280,boxSizing:"border-box",position:"relative"}),Eee=d.forwardRef((function(e,t){const n=function(e,t){const n=Q6(),r=J6(),o=(0,V6.Z)({props:e,name:t});return(0,h$.Z)({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:r9(n,o.minDate,r.minDate),maxDate:r9(n,o.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:r,className:i,value:a,defaultValue:s,referenceDate:l,disabled:u,disableFuture:c,disablePast:h,maxDate:p,minDate:f,onChange:m,readOnly:g,shouldDisableYear:v,onYearFocus:y,hasFocus:b,onFocusedViewChange:x,yearsOrder:w="asc",yearsPerRow:S,timezone:C,gridLabelId:k,slots:M,slotProps:_}=n,T=(0,p$.Z)(n,Oee),{value:P,handleValueChange:I,timezone:R}=q7({name:"YearCalendar",timezone:C,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:y8}),D=e9(R),O=(0,hh.V)(),A=Q6(),E=d.useMemo((()=>y8.getInitialReferenceValue({value:P,utils:A,props:n,timezone:R,referenceDate:l,granularity:K7.year})),[]),Z=n,L=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"]},Dee,t)})(Z),F=d.useMemo((()=>A.getYear(D)),[A,D]),j=d.useMemo((()=>null!=P?A.getYear(P):null),[P,A]),[N,z]=d.useState((()=>j||A.getYear(E))),[B,V]=(0,p7.Z)({name:"YearCalendar",state:"hasFocus",controlled:b,default:r??!1}),H=(0,h7.Z)((e=>{V(e),x&&x(e)})),$=d.useCallback((e=>{if(h&&A.isBeforeYear(e,D))return!0;if(c&&A.isAfterYear(e,D))return!0;if(f&&A.isBeforeYear(e,f))return!0;if(p&&A.isAfterYear(e,p))return!0;if(!v)return!1;const t=A.startOfYear(e);return v(t)}),[c,h,p,f,D,v,A]),W=(0,h7.Z)(((e,t)=>{if(g)return;const n=A.setYear(P??E,t);I(n)})),G=(0,h7.Z)((e=>{$(A.setYear(P??E,e))||(z(e),H(!0),null==y||y(e))}));d.useEffect((()=>{z((e=>null!==j&&e!==j?j:e))}),[j]);const U="desc"!==w?1*S:-1*S,q=O&&"asc"===w||!O&&"desc"===w?-1:1,K=(0,h7.Z)(((e,t)=>{switch(e.key){case"ArrowUp":G(t-U),e.preventDefault();break;case"ArrowDown":G(t+U),e.preventDefault();break;case"ArrowLeft":G(t-q),e.preventDefault();break;case"ArrowRight":G(t+q),e.preventDefault()}})),Y=(0,h7.Z)(((e,t)=>{G(t)})),X=(0,h7.Z)(((e,t)=>{N===t&&H(!1)})),Q=d.useRef(null),J=(0,E8.Z)(t,Q);d.useEffect((()=>{if(r||null===Q.current)return;const e=Q.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=Q.current.clientHeight,i=Q.current.scrollTop,a=n+t;t>o||n{const t=A.getYear(e),n=t===j,r=u||$(e);return(0,o.jsx)(Ree,{selected:n,value:t,onClick:W,onKeyDown:K,autoFocus:B&&t===N,disabled:r,tabIndex:t!==N||r?-1:0,onFocus:Y,onBlur:X,"aria-current":F===t?"date":void 0,yearsPerRow:S,slots:M,slotProps:_,children:A.format(e,"year")},A.format(e,"year"))}))}))})),Zee=e=>(0,Iu.ZP)("MuiPickersCalendarHeader",e),Lee=(0,Pu.Z)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Fee=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],jee=["ownerState"],Nee=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),zee=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return(0,h$.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),Bee=(0,Y.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Vee=(0,Y.ZP)(u.Z,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Lee.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Hee=(0,Y.ZP)(p9,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((e=>{let{theme:t}=e;return{willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"}})),$ee=d.forwardRef((function(e,t){const n=b9(),r=Q6(),i=(0,V6.Z)({props:e,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:u,disableFuture:c,disablePast:h,maxDate:p,minDate:f,onMonthChange:m,onViewChange:g,view:v,reduceAnimations:y,views:b,labelId:x,className:w,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,k=(0,p$.Z)(i,Fee),M=i,_=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Zee,t)})(i),T=(null==a?void 0:a.switchViewButton)??Vee,P=(0,r7.Z)({elementType:T,externalSlotProps:null==s?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(v)},ownerState:M,className:_.switchViewButton}),I=(null==a?void 0:a.switchViewIcon)??Hee,R=(0,r7.Z)({elementType:I,externalSlotProps:null==s?void 0:s.switchViewIcon,ownerState:M,className:_.switchViewIcon}),D=(0,p$.Z)(R,jee),O=function(e,t){let{disableFuture:n,maxDate:r,timezone:o}=t;const i=Q6();return d.useMemo((()=>{const t=i.date(void 0,o),a=i.startOfMonth(n&&i.isBefore(t,r)?t:r);return!i.isAfter(a,e)}),[n,r,e,i,o])}(l,{disableFuture:c,maxDate:p,timezone:S}),A=function(e,t){let{disablePast:n,minDate:r,timezone:o}=t;const i=Q6();return d.useMemo((()=>{const t=i.date(void 0,o),a=i.startOfMonth(n&&i.isAfter(t,r)?t:r);return!i.isBefore(a,e)}),[n,r,e,i,o])}(l,{disablePast:h,minDate:f,timezone:S});if(1===b.length&&"year"===b[0])return null;const E=r.formatByString(l,C);return(0,o.jsxs)(Nee,(0,h$.Z)({},k,{ownerState:M,className:(0,Js.Z)(_.root,w),ref:t,children:[(0,o.jsxs)(zee,{role:"presentation",onClick:()=>{if(1!==b.length&&g&&!u)if(2===b.length)g(b.find((e=>e!==v))||b[0]);else{const e=0!==b.indexOf(v)?0:1;g(b[e])}},ownerState:M,"aria-live":"polite",className:_.labelContainer,children:[(0,o.jsx)(A8,{reduceAnimations:y,transKey:E,children:(0,o.jsx)(Bee,{id:x,ownerState:M,className:_.label,children:E})}),b.length>1&&!u&&(0,o.jsx)(T,(0,h$.Z)({},P,{children:(0,o.jsx)(I,(0,h$.Z)({},D))}))]}),(0,o.jsx)(R8.Z,{in:"day"===v,appear:!y,enter:!y,children:(0,o.jsx)(d7,{slots:a,slotProps:s,onGoToPrevious:()=>m(r.addMonths(l,-1),"right"),isPreviousDisabled:A,previousLabel:n.previousMonth,onGoToNext:()=>m(r.addMonths(l,1),"left"),isNextDisabled:O,nextLabel:n.nextMonth})})]}))})),Wee="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Gee=Wee&&Wee[1]?parseInt(Wee[1],10):null,Uee=Wee&&Wee[2]?parseInt(Wee[2],10):null,qee=Gee&&Gee<10||Uee&&Uee<13||!1,Kee=e=>(0,Iu.ZP)("MuiDateCalendar",e),Yee=((0,Pu.Z)("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"]);function Xee(e,t){const n=Q6(),r=J6(),i=(0,dh.Z)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||qee,a=(0,V6.Z)({props:e,name:t});return(0,h$.Z)({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??i,renderLoading:a.renderLoading??(()=>(0,o.jsx)("span",{children:"..."})),minDate:r9(n,a.minDate,r.minDate),maxDate:r9(n,a.maxDate,r.maxDate)})}const Qee=(0,Y.ZP)(m7,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Jee=(0,Y.ZP)(A8,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),ete=d.forwardRef((function(e,t){const n=Q6(),r=(0,n7.Z)(),i=Xee(e,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:u,referenceDate:c,disableFuture:h,disablePast:p,onChange:f,onYearChange:m,onMonthChange:g,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:x,view:w,views:S,openTo:C,className:k,disabled:M,readOnly:_,minDate:T,maxDate:P,disableHighlightToday:I,focusedView:R,onFocusedViewChange:D,showDaysOutsideCurrentMonth:O,fixedWeekNumber:A,dayOfWeekFormatter:E,slots:Z,slotProps:L,loading:F,renderLoading:j,displayWeekNumber:N,yearsOrder:z,yearsPerRow:B,monthsPerRow:V,timezone:H}=i,$=(0,p$.Z)(i,Yee),{value:W,handleValueChange:G,timezone:U}=q7({name:"DateCalendar",timezone:H,value:l,defaultValue:u,referenceDate:c,onChange:f,valueManager:y8}),{view:q,setView:K,focusedView:Y,setFocusedView:X,goToNextView:Q,setValueAndGoToNextView:J}=f7({view:w,views:S,openTo:C,onChange:G,onViewChange:s,autoFocus:a,focusedView:R,onFocusedViewChange:D}),{referenceDate:ee,calendarState:te,changeFocusedDay:ne,changeMonth:re,handleChangeMonth:oe,isDateDisabled:ie,onMonthSwitchingAnimationEnd:ae}=P8({value:W,referenceDate:c,reduceAnimations:v,onMonthChange:g,minDate:T,maxDate:P,shouldDisableDate:y,disablePast:p,disableFuture:h,timezone:U}),se=M&&W||T,le=M&&W||P,ue=`${r}-grid-label`,ce=null!==Y,de=(null==Z?void 0:Z.calendarHeader)??$ee,he=(0,r7.Z)({elementType:de,externalSlotProps:null==L?void 0:L.calendarHeader,additionalProps:{views:S,view:q,currentMonth:te.currentMonth,onViewChange:K,onMonthChange:(e,t)=>oe({newMonth:e,direction:t}),minDate:se,maxDate:le,disabled:M,disablePast:p,disableFuture:h,reduceAnimations:v,timezone:U,labelId:ue},ownerState:i}),pe=(0,h7.Z)((e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=ie(e)?n9({utils:n,date:e,minDate:n.isBefore(T,t)?t:T,maxDate:n.isAfter(P,r)?r:P,disablePast:p,disableFuture:h,isDateDisabled:ie,timezone:U}):e;o?(J(o,"finish"),null==g||g(t)):(Q(),re(t)),ne(o,!0)})),fe=(0,h7.Z)((e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=ie(e)?n9({utils:n,date:e,minDate:n.isBefore(T,t)?t:T,maxDate:n.isAfter(P,r)?r:P,disablePast:p,disableFuture:h,isDateDisabled:ie,timezone:U}):e;o?(J(o,"finish"),null==m||m(o)):(Q(),re(t)),ne(o,!0)})),me=(0,h7.Z)((e=>G(e?t9(n,e,W??ee):e,"finish",q)));d.useEffect((()=>{null!=W&&n.isValid(W)&&re(W)}),[W]);const ge=i,ve=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Kee,t)})(ge),ye={disablePast:p,disableFuture:h,maxDate:P,minDate:T},be={disableHighlightToday:I,readOnly:_,disabled:M,timezone:U,gridLabelId:ue,slots:Z,slotProps:L},xe=d.useRef(q);d.useEffect((()=>{xe.current!==q&&(Y===xe.current&&X(q,!0),xe.current=q)}),[Y,X,q]);const we=d.useMemo((()=>[W]),[W]);return(0,o.jsxs)(Qee,(0,h$.Z)({ref:t,className:(0,Js.Z)(ve.root,k),ownerState:ge},$,{children:[(0,o.jsx)(de,(0,h$.Z)({},he,{slots:Z,slotProps:L})),(0,o.jsx)(Jee,{reduceAnimations:v,className:ve.viewTransitionContainer,transKey:q,ownerState:ge,children:(0,o.jsxs)("div",{children:["year"===q&&(0,o.jsx)(Eee,(0,h$.Z)({},ye,be,{value:W,onChange:fe,shouldDisableYear:x,hasFocus:ce,onFocusedViewChange:e=>X("year",e),yearsOrder:z,yearsPerRow:B,referenceDate:ee})),"month"===q&&(0,o.jsx)(kee,(0,h$.Z)({},ye,be,{hasFocus:ce,className:k,value:W,onChange:pe,shouldDisableMonth:b,onFocusedViewChange:e=>X("month",e),monthsPerRow:V,referenceDate:ee})),"day"===q&&(0,o.jsx)(fee,(0,h$.Z)({},te,ye,be,{onMonthSwitchingAnimationEnd:ae,onFocusedDayChange:ne,reduceAnimations:v,selectedDays:we,onSelectedDaysChange:me,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:x,hasFocus:ce,onFocusedViewChange:e=>X("day",e),showDaysOutsideCurrentMonth:O,fixedWeekNumber:A,dayOfWeekFormatter:E,displayWeekNumber:N,loading:F,renderLoading:j}))]})})]}))})),tte=e=>{let{view:t,onViewChange:n,views:r,focusedView:i,onFocusedViewChange:a,value:s,defaultValue:l,referenceDate:u,onChange:c,className:d,classes:h,disableFuture:p,disablePast:f,minDate:m,maxDate:g,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,reduceAnimations:x,onMonthChange:w,monthsPerRow:S,onYearChange:C,yearsOrder:k,yearsPerRow:M,slots:_,slotProps:T,loading:P,renderLoading:I,disableHighlightToday:R,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:E,sx:Z,autoFocus:L,fixedWeekNumber:F,displayWeekNumber:j,timezone:N}=e;return(0,o.jsx)(ete,{view:t,onViewChange:n,views:r.filter(l9),focusedView:i&&l9(i)?i:null,onFocusedViewChange:a,value:s,defaultValue:l,referenceDate:u,onChange:c,className:d,classes:h,disableFuture:p,disablePast:f,minDate:m,maxDate:g,shouldDisableDate:v,shouldDisableMonth:y,shouldDisableYear:b,reduceAnimations:x,onMonthChange:w,monthsPerRow:S,onYearChange:C,yearsOrder:k,yearsPerRow:M,slots:_,slotProps:T,loading:P,renderLoading:I,disableHighlightToday:R,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:E,sx:Z,autoFocus:L,fixedWeekNumber:F,displayWeekNumber:j,timezone:N})};function nte(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=X6(),s=d.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);d.useEffect((()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l}),[n,i,l,r]);const c=(0,h7.Z)((e=>n({adapter:a,value:e,timezone:o,props:t})));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:c}}const rte=e=>{let{props:t,valueManager:n,valueType:r,wrapperVariant:o,validator:i}=e;const{onAccept:a,onChange:s,value:l,defaultValue:u,closeOnSelect:c="desktop"===o,timezone:h,referenceDate:p}=t,{current:f}=d.useRef(u),{current:m}=d.useRef(void 0!==l),[g,v]=d.useState(h);const y=Q6(),b=X6(),{isOpen:x,setIsOpen:w}=(e=>{let{open:t,onOpen:n,onClose:r}=e;const o=d.useRef("boolean"==typeof t).current,[i,a]=d.useState(!1);return d.useEffect((()=>{if(o){if("boolean"!=typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(t)}}),[o,t]),{isOpen:i,setIsOpen:d.useCallback((e=>{o||a(e),e&&n&&n(),!e&&r&&r()}),[o,n,r])}})(t),{timezone:S,value:C,handleValueChange:k}=U7({timezone:h,value:l,defaultValue:f,referenceDate:p,onChange:s,valueManager:n}),[M,_]=d.useState((()=>{let e;return e=void 0!==C?C:void 0!==f?f:n.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:l,hasBeenModifiedSinceMount:!1}})),T=n.getTimezone(y,M.draft);g!==h&&(v(h),h&&T&&h!==T&&_((e=>(0,h$.Z)({},e,{draft:n.setTimezone(y,h,e.draft)}))));const{getValidationErrorForNewValue:P}=nte({props:t,validator:i,timezone:S,value:M.draft,onError:t.onError}),I=(0,h7.Z)((e=>{const t={action:e,dateState:M,hasChanged:t=>!n.areValuesEqual(y,e.value,t),isControlled:m,closeOnSelect:c},r=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!i||n(r.lastPublishedValue)))})(t),o=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&i?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(t),i=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(t);_((t=>(0,h$.Z)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:o?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0})));let s=null;const l=()=>{if(!s){const t="setValueFromField"===e.name?e.context.validationError:P(e.value);s={validationError:t},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)}return s};r&&k(e.value,l()),o&&a&&a(e.value,l()),i&&w(!1)}));if(M.lastControlledValue!==l){const e=n.areValuesEqual(y,M.draft,C);_((t=>(0,h$.Z)({},t,{lastControlledValue:l},e?{}:{lastCommittedValue:C,lastPublishedValue:C,draft:C,hasBeenModifiedSinceMount:!0})))}const R=(0,h7.Z)((()=>{I({value:n.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),D=(0,h7.Z)((()=>{I({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),O=(0,h7.Z)((()=>{I({value:M.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),A=(0,h7.Z)((()=>{I({value:M.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),E=(0,h7.Z)((()=>{I({value:n.getTodayValue(y,S,r),name:"setValueFromAction",pickerAction:"today"})})),Z=(0,h7.Z)((e=>{e.preventDefault(),w(!0)})),L=(0,h7.Z)((e=>{null==e||e.preventDefault(),w(!1)})),F=(0,h7.Z)((function(e){return I({name:"setValueFromView",value:e,selectionState:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"partial"})})),j=(0,h7.Z)(((e,t,n)=>I({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n}))),N=(0,h7.Z)(((e,t)=>I({name:"setValueFromField",value:e,context:t}))),z={onClear:R,onAccept:D,onDismiss:O,onCancel:A,onSetToday:E,onOpen:Z,onClose:L},B={value:M.draft,onChange:N},V=d.useMemo((()=>n.cleanValue(y,M.draft)),[y,n,M.draft]),H={value:V,onChange:F,onClose:L,open:x},$=(0,h$.Z)({},z,{value:V,onChange:F,onSelectShortcut:j,isValid:e=>{const r=i({adapter:b,value:e,timezone:S,props:t});return!n.hasError(r)}}),W=d.useMemo((()=>({onOpen:Z,onClose:L,open:x})),[x,L,Z]);return{open:x,fieldProps:B,viewProps:H,layoutProps:$,actions:z,contextValue:W}},ote=["className","sx"];const ite=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?ite(e.shadowRoot):e:null};function ate(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const ste=(e,t)=>{const[n,r]=d.useState(ate);if((0,v7.Z)((()=>{const e=()=>{r(ate())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,i=["hours","minutes","seconds"],Array.isArray(i)?i.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(i))return!1;var o,i;return"landscape"===(t||n)};const lte=e=>{let{props:t,valueManager:n,valueType:r,wrapperVariant:o,additionalViewProps:i,validator:a,autoFocusView:s,rendererInterceptor:l,fieldRef:u}=e;const c=rte({props:t,valueManager:n,valueType:r,wrapperVariant:o,validator:a}),h=(e=>{let{props:t,propsFromPickerValue:n,additionalViewProps:r,autoFocusView:o,rendererInterceptor:i,fieldRef:a}=e;const{onChange:s,open:l,onClose:u}=n,{view:c,views:h,openTo:p,onViewChange:f,viewRenderers:m,timezone:g}=t,v=(0,p$.Z)(t,ote),{view:y,setView:b,defaultView:x,focusedView:w,setFocusedView:S,setValueAndGoToNextView:C}=f7({view:c,views:h,openTo:p,onChange:s,onViewChange:f,autoFocus:o}),{hasUIView:k,viewModeLookup:M}=d.useMemo((()=>h.reduce(((e,t)=>{let n;return n=null!=m[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[m,h]),_=d.useMemo((()=>h.reduce(((e,t)=>null!=m[t]&&B9(t)?e+1:e),0)),[m,h]),T=M[y],P=(0,h7.Z)((()=>"UI"===T)),[I,R]=d.useState("UI"===T?y:null);return I!==y&&"UI"===M[y]&&R(y),(0,v7.Z)((()=>{"field"===T&&l&&(u(),setTimeout((()=>{var e,t;null==a||null===(e=a.current)||void 0===e||e.setSelectedSections(y),null==a||null===(t=a.current)||void 0===t||t.focusField(y)})))}),[y]),(0,v7.Z)((()=>{if(!l)return;let e=y;"field"===T&&null!=I&&(e=I),e!==x&&"UI"===M[e]&&"UI"===M[x]&&(e=x),e!==y&&b(e),S(e,!0)}),[l]),{hasUIView:k,shouldRestoreFocus:P,layoutProps:{views:h,view:I,onViewChange:b},renderCurrentView:()=>{if(null==I)return null;const e=m[I];if(null==e)return null;const t=(0,h$.Z)({},v,r,n,{views:h,timezone:g,onChange:C,view:I,onViewChange:b,focusedView:w,onFocusedViewChange:S,showViewSwitcher:_>1,timeViewsCount:_});return i?i(m,I,t):e(t)}}})({props:t,additionalViewProps:i,autoFocusView:s,fieldRef:u,propsFromPickerValue:c.viewProps,rendererInterceptor:l}),p=(e=>{let{props:t,propsFromPickerValue:n,propsFromPickerViews:r,wrapperVariant:o}=e;const{orientation:i}=t,a=ste(r.views,i),s=(0,hh.V)();return{layoutProps:(0,h$.Z)({},r,n,{isLandscape:a,isRtl:s,wrapperVariant:o,disabled:t.disabled,readOnly:t.readOnly})}})({props:t,wrapperVariant:o,propsFromPickerValue:c.layoutProps,propsFromPickerViews:h.layoutProps}),f=function(e){const{props:t,pickerValueResponse:n}=e;return d.useMemo((()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1})),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:t,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:h.renderCurrentView,hasUIView:h.hasUIView,shouldRestoreFocus:h.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:c.contextValue,ownerState:f}};function ute(e){return(0,Iu.ZP)("MuiPickersLayout",e)}const cte=(0,Pu.Z)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),dte=["onAccept","onClear","onCancel","onSetToday","actions"];function hte(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:s}=e,l=(0,p$.Z)(e,dte),u=b9();if(null==s||0===s.length)return null;const c=null==s?void 0:s.map((e=>{switch(e){case"clear":return(0,o.jsx)(a.Z,{onClick:n,children:u.clearButtonLabel},e);case"cancel":return(0,o.jsx)(a.Z,{onClick:r,children:u.cancelButtonLabel},e);case"accept":return(0,o.jsx)(a.Z,{onClick:t,children:u.okButtonLabel},e);case"today":return(0,o.jsx)(a.Z,{onClick:i,children:u.todayButtonLabel},e);default:return null}}));return(0,o.jsx)(_c.Z,(0,h$.Z)({},l,{children:c}))}var pte=n(56326),fte=n(6094),mte=n(48356);const gte=["items","changeImportance","isLandscape","onChange","isValid"],vte=["getValue"];function yte(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,a=(0,p$.Z)(e,gte);if(null==t||0===t.length)return null;const s=t.map((e=>{let{getValue:t}=e,o=(0,p$.Z)(e,vte);const a=t({isValid:i});return(0,h$.Z)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})}));return(0,o.jsx)(pte.Z,(0,h$.Z)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:s.map((e=>(0,o.jsx)(fte.ZP,{children:(0,o.jsx)(mte.Z,(0,h$.Z)({},e))},e.id??e.label)))}))}const bte=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:a,view:s,views:l,onViewChange:u,value:c,onChange:d,onSelectShortcut:h,isValid:p,isLandscape:f,disabled:m,readOnly:g,children:v,slots:y,slotProps:b}=e,x=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]};return(0,el.Z)(r,ute,t)})(e),w=(null==y?void 0:y.actionBar)??hte,S=(0,r7.Z)({elementType:w,externalSlotProps:null==b?void 0:b.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:a,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,h$.Z)({},e,{wrapperVariant:t})}),C=(0,o.jsx)(w,(0,h$.Z)({},S)),k=null==y?void 0:y.toolbar,M=(0,r7.Z)({elementType:k,externalSlotProps:null==b?void 0:b.toolbar,additionalProps:{isLandscape:f,onChange:d,value:c,view:s,onViewChange:u,views:l,disabled:m,readOnly:g},className:x.toolbar,ownerState:(0,h$.Z)({},e,{wrapperVariant:t})}),_=function(e){return null!==e.view}(M)&&k?(0,o.jsx)(k,(0,h$.Z)({},M)):null,T=v,P=null==y?void 0:y.tabs,I=s&&P?(0,o.jsx)(P,(0,h$.Z)({view:s,onViewChange:u,className:x.tabs},null==b?void 0:b.tabs)):null,R=(null==y?void 0:y.shortcuts)??yte,D=(0,r7.Z)({elementType:R,externalSlotProps:null==b?void 0:b.shortcuts,additionalProps:{isValid:p,isLandscape:f,onChange:h},className:x.shortcuts,ownerState:{isValid:p,isLandscape:f,onChange:h,wrapperVariant:t}});return{toolbar:_,content:T,tabs:I,actionBar:C,shortcuts:s&&R?(0,o.jsx)(R,(0,h$.Z)({},D)):null}},xte=(0,Y.ZP)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${cte.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${cte.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${cte.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${cte.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${cte.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${cte.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${cte.shortcuts}`]:{gridColumn:3}}}]}),wte=(0,Y.ZP)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Ste=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:a,actionBar:s,shortcuts:l}=bte(n),{sx:u,className:c,isLandscape:h,wrapperVariant:p}=n,f=(e=>{const{isLandscape:t,classes:n}=e,r={root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]};return(0,el.Z)(r,ute,n)})(n);return(0,o.jsxs)(xte,{ref:t,sx:u,className:(0,Js.Z)(f.root,c),ownerState:n,children:[h?l:r,h?r:l,(0,o.jsx)(wte,{className:f.contentWrapper,children:"desktop"===p?(0,o.jsxs)(d.Fragment,{children:[i,a]}):(0,o.jsxs)(d.Fragment,{children:[a,i]})}),s]})})),Cte=["props","ref"],kte=(0,Y.ZP)(Ste)((e=>{let{theme:t}=e;return{overflow:"hidden",minWidth:G9,backgroundColor:(t.vars||t).palette.background.paper}})),Mte=e=>{let{adapter:t,value:n,timezone:r,props:o}=e;if(null===n)return null;const{minTime:i,maxTime:a,minutesStep:s,shouldDisableTime:l,disableIgnoringDatePartForTimeValidation:u=!1,disablePast:c,disableFuture:d}=o,h=t.utils.date(void 0,r),p=$9(u,t.utils);switch(!0){case!t.utils.isValid(n):return"invalidDate";case Boolean(i&&p(i,n)):return"minTime";case Boolean(a&&p(n,a)):return"maxTime";case Boolean(d&&t.utils.isAfter(n,h)):return"disableFuture";case Boolean(c&&t.utils.isBefore(n,h)):return"disablePast";case Boolean(l&&l(n,"hours")):return"shouldDisableTime-hours";case Boolean(l&&l(n,"minutes")):return"shouldDisableTime-minutes";case Boolean(l&&l(n,"seconds")):return"shouldDisableTime-seconds";case Boolean(s&&t.utils.getMinutes(n)%s!=0):return"minutesStep";default:return null}};Mte.valueManager=y8;const _te=e=>{let{adapter:t,value:n,timezone:r,props:o}=e;const i=_8({adapter:t,value:n,timezone:r,props:o});return null!==i?i:Mte({adapter:t,value:n,timezone:r,props:o})};_te.valueManager=y8;const Tte=d.forwardRef((function(e,t){var n,r;const i=t7(e,"MuiStaticDateTimePicker"),a=i.displayStaticWrapperAs??"mobile",s=i.ampmInClock??"desktop"===a,l=(0,h$.Z)({day:tte,month:tte,year:tte,hours:M8,minutes:M8,seconds:M8},i.viewRenderers),u=(0,h$.Z)({},i,{viewRenderers:l,displayStaticWrapperAs:a,ampmInClock:s,yearsPerRow:i.yearsPerRow??("mobile"===a?3:4),slotProps:(0,h$.Z)({},i.slotProps,{tabs:(0,h$.Z)({hidden:"desktop"===a},null===(n=i.slotProps)||void 0===n?void 0:n.tabs),toolbar:(0,h$.Z)({hidden:"desktop"===a,ampmInClock:s},null===(r=i.slotProps)||void 0===r?void 0:r.toolbar)})}),{renderPicker:c}=(e=>{let{props:t,ref:n}=e,r=(0,p$.Z)(e,Cte);const{localeText:i,slots:a,slotProps:s,className:l,sx:u,displayStaticWrapperAs:c,autoFocus:d}=t,{layoutProps:h,renderCurrentView:p}=lte((0,h$.Z)({},r,{props:t,autoFocusView:d??!1,additionalViewProps:{},wrapperVariant:c})),f=(null==a?void 0:a.layout)??kte;return{renderPicker:()=>{var e,t,r;return(0,o.jsx)(W6,{localeText:i,children:(0,o.jsx)(f,(0,h$.Z)({},h,null==s?void 0:s.layout,{slots:a,slotProps:s,sx:[...Array.isArray(u)?u:[u],...Array.isArray(null==s||null===(e=s.layout)||void 0===e?void 0:e.sx)?s.layout.sx:[null==s||null===(t=s.layout)||void 0===t?void 0:t.sx]],className:(0,Js.Z)(l,null==s||null===(r=s.layout)||void 0===r?void 0:r.className),ref:n,children:p()}))})}}})({props:u,valueManager:y8,valueType:"date-time",validator:_te,ref:t});return c()}));Tte.propTypes={ampm:U6().bool,ampmInClock:U6().bool,autoFocus:U6().bool,className:U6().string,dayOfWeekFormatter:U6().func,defaultValue:U6().object,disabled:U6().bool,disableFuture:U6().bool,disableHighlightToday:U6().bool,disableIgnoringDatePartForTimeValidation:U6().bool,disablePast:U6().bool,displayStaticWrapperAs:U6().oneOf(["desktop","mobile"]),displayWeekNumber:U6().bool,fixedWeekNumber:U6().number,loading:U6().bool,localeText:U6().object,maxDate:U6().object,maxDateTime:U6().object,maxTime:U6().object,minDate:U6().object,minDateTime:U6().object,minTime:U6().object,minutesStep:U6().number,monthsPerRow:U6().oneOf([3,4]),onAccept:U6().func,onChange:U6().func,onClose:U6().func,onError:U6().func,onMonthChange:U6().func,onViewChange:U6().func,onYearChange:U6().func,openTo:U6().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:U6().oneOf(["landscape","portrait"]),readOnly:U6().bool,reduceAnimations:U6().bool,referenceDate:U6().object,renderLoading:U6().func,shouldDisableDate:U6().func,shouldDisableMonth:U6().func,shouldDisableTime:U6().func,shouldDisableYear:U6().func,showDaysOutsideCurrentMonth:U6().bool,slotProps:U6().object,slots:U6().object,sx:U6().oneOfType([U6().arrayOf(U6().oneOfType([U6().func,U6().object,U6().bool])),U6().func,U6().object]),timezone:U6().string,value:U6().object,view:U6().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:U6().shape({day:U6().func,hours:U6().func,minutes:U6().func,month:U6().func,seconds:U6().func,year:U6().func}),views:U6().arrayOf(U6().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:U6().oneOf(["asc","desc"]),yearsPerRow:U6().oneOf([3,4])};const Pte=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},Ite=e=>{let{utils:t,date:n,shouldRespectLeadingZeros:r,localeText:o,localizedDigits:i,now:a,token:s,startSeparator:l}=e;if(""===s)throw new Error("MUI X: Should not call `commitToken` with an empty token");const u=X7(t,s),c=c8(t,u.contentType,u.type,s),d=r?c:"digit"===u.contentType,h=null!=n&&t.isValid(n);let p=h?t.formatByString(n,s):"",f=null;if(d)if(c)f=""===p?t.formatByString(a,s).length:p.length;else{if(null==u.maxLength)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);f=u.maxLength,h&&(p=n8(o8(t8(p,i),f),i))}return(0,h$.Z)({},u,{format:s,maxLength:f,value:p,placeholder:Pte(t,o,u,s),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:d,startSeparator:l,endSeparator:"",modified:!1})},Rte=e=>{let t=(e=>{let{utils:t,format:n}=e,r=10,o=n,i=t.expandFormat(n);for(;i!==o;)if(o=i,i=t.expandFormat(o),r-=1,r<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=(e=>{let{utils:t,expandedFormat:n}=e;const r=[],{start:o,end:i}=t.escapedCharacters,a=new RegExp(`(\\${o}[^\\${i}]*\\${i})+`,"g");let s=null;for(;s=a.exec(n);)r.push({start:s.index,end:a.lastIndex-1});return r})((0,h$.Z)({},e,{expandedFormat:t})),r=(e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort(((e,t)=>t.length-e.length)),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),c=new RegExp(`^(${s.join("|")})`),d=e=>r.find((t=>t.start<=e&&t.end>=e));let h=0;for(;h0;){const n=c.exec(t)[1];t=t.slice(n.length),i.push(Ite((0,h$.Z)({},e,{now:o,token:n,startSeparator:a}))),a=""}h+=s.length}else{const e=n[h];r&&(null==t?void 0:t.start)===h||(null==t?void 0:t.end)===h||(0===i.length?a+=e:i[i.length-1].endSeparator+=e),h+=1}}return 0===i.length&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i})((0,h$.Z)({},e,{expandedFormat:t,escapedParts:n}));return(e=>{let{isRtl:t,formatDensity:n,sections:r}=e;return r.map((e=>{const r=e=>{let r=e;return t&&null!==r&&r.includes(" ")&&(r=`⁩${r}⁦`),"spacious"===n&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return e.startSeparator=r(e.startSeparator),e.endSeparator=r(e.endSeparator),e}))})((0,h$.Z)({},e,{sections:r}))},Dte=e=>{const t=Q6(),n=b9(),r=X6(),o=(0,hh.V)(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:h,referenceDate:p,onChange:f,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:b=!1,timezone:x,enableAccessibleFieldDOMStructure:w=!1}}=e,{timezone:S,value:C,handleValueChange:k}=U7({timezone:x,value:c,defaultValue:h,referenceDate:p,onChange:f,valueManager:i}),M=d.useMemo((()=>(e=>{const t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?e8:Array.from({length:10}).map(((n,r)=>e.formatByString(e.setSeconds(t,r),"s")))})(t)),[t]),_=d.useMemo((()=>((e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=o9(e,r).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:t=>{let{format:n}=t;return{minimum:0,maximum:u8(e,n)?9999:99}},month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:t=>{let{currentDate:n}=t;return{minimum:1,maximum:null!=n&&e.isValid(n)?e.getDaysInMonth(n):a,longestMonth:s}},weekDay:t=>{let{format:n,contentType:r}=t;if("digit"===r){const t=Q7(e,n).map(Number);return{minimum:Math.min(...t),maximum:Math.max(...t)}}return{minimum:1,maximum:7}},hours:n=>{let{format:o}=n;const a=e.getHours(i);return t8(e.formatByString(e.endOfDay(r),o),t)!==a.toString()?{minimum:1,maximum:Number(t8(e.formatByString(e.startOfDay(r),o),t))}:{minimum:0,maximum:a}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,M,S)),[t,M,S]),T=d.useCallback((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a.getSectionsFromValue(t,e,r,(e=>Rte({utils:t,localeText:n,localizedDigits:M,format:m,date:e,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o})))}),[a,m,n,M,o,b,t,g,w]),[P,I]=d.useState((()=>{const e=T(C);d8();const n={sections:e,value:C,referenceValue:i.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>K7[e.type]??1))))(e),o=i.getInitialReferenceValue({referenceDate:p,value:C,utils:t,props:u,granularity:r,timezone:S});return(0,h$.Z)({},n,{referenceValue:o})})),[R,D]=(0,p7.Z)({controlled:v,default:null,name:"useField",state:"selectedSections"}),O=e=>{D(e),null==y||y(e)},A=d.useMemo((()=>f8(R,P.sections)),[R,P.sections]),E="all"===A?0:A,Z=e=>{let{value:n,referenceValue:o,sections:a}=e;if(I((e=>(0,h$.Z)({},e,{sections:a,value:n,referenceValue:o,tempValueStrAndroid:null}))),i.areValuesEqual(t,P.value,n))return;const s={validationError:l({adapter:r,value:n,timezone:S,props:u})};k(n,s)},L=(e,t)=>{const n=[...P.sections];return n[e]=(0,h$.Z)({},n[e],{value:t,modified:!0}),n};return d.useEffect((()=>{const e=T(P.value);d8(),I((t=>(0,h$.Z)({},t,{sections:e})))}),[m,t.locale,o]),d.useEffect((()=>{let e;e=!i.areValuesEqual(t,P.value,C)||i.getTimezone(t,P.value)!==i.getTimezone(t,C),e&&I((e=>(0,h$.Z)({},e,{value:C,referenceValue:a.updateReferenceValue(t,C,e.referenceValue),sections:T(C)})))}),[C]),{state:P,activeSectionIndex:E,parsedSelectedSections:A,setSelectedSections:O,clearValue:()=>{Z({value:i.emptyValue,referenceValue:P.referenceValue,sections:T(i.emptyValue)})},clearActiveSection:()=>{if(null==E)return;const e=P.sections[E],n=a.getActiveDateManager(t,P,e),r=n.getSections(P.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),o=L(E,""),i=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(i);Z((0,h$.Z)({},s,{sections:o}))},updateSectionValue:e=>{let{activeSection:n,newSectionValue:r,shouldGoToNextSection:o}=e;o&&E{const r=t.some((e=>"day"===e.type)),o=[],i=[];for(let e=0;e(0,h$.Z)({},e,c,{sections:s,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=a.parseValueStr(e,P.referenceValue,((e,r)=>{const i=t.parse(e,m);if(null==i||!t.isValid(i))return null;const a=Rte({utils:t,localeText:n,localizedDigits:M,format:m,date:i,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o});return p8(t,i,a,r,!1)})),i=a.updateReferenceValue(t,r,P.referenceValue);Z({value:r,referenceValue:i,sections:T(r,P.sections)})},setTempAndroidValueStr:e=>I((t=>(0,h$.Z)({},t,{tempValueStrAndroid:e}))),getSectionsFromValue:T,sectionsValueBoundaries:_,localizedDigits:M,timezone:S}},Ote=e=>null!=e.saveQuery,Ate=e=>{let{sections:t,updateSectionValue:n,sectionsValueBoundaries:r,localizedDigits:o,setTempAndroidValueStr:i,timezone:a}=e;const s=Q6(),[l,u]=d.useState(null),c=(0,h7.Z)((()=>u(null)));d.useEffect((()=>{var e;null!=l&&(null===(e=t[l.sectionIndex])||void 0===e?void 0:e.type)!==l.sectionType&&c()}),[t,l,c]),d.useEffect((()=>{if(null!=l){const e=setTimeout((()=>c()),5e3);return()=>{clearTimeout(e)}}return()=>{}}),[l,c]);const h=(e,n,r)=>{let{keyPressed:o,sectionIndex:i}=e;const a=o.toLowerCase(),s=t[i];if(null!=l&&(!r||r(l.value))&&l.sectionIndex===i){const e=`${l.value}${a}`,t=n(e,s);if(!Ote(t))return u({sectionIndex:i,value:e,sectionType:s.type}),t}const d=n(a,s);return Ote(d)&&!d.saveQuery?(c(),null):(u({sectionIndex:i,value:a,sectionType:s.type}),Ote(d)?null:d)};return{applyCharacterEditing:(0,h7.Z)((e=>{const l=t[e.sectionIndex],u=r8(e.keyPressed,o)?(e=>{const t=(e,t)=>{const n=t8(e,o),i=Number(n),a=r[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(i>a.maximum)return{saveQuery:!1};if(ia.maximum||n.length===a.maximum.toString().length;return{sectionValue:i8(s,i,a,o,t),shouldGoToNextSection:l}};return h(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=c8(s,"digit","month","MM"),o=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Ote(o))return o;const i=l8(s,o.sectionValue,"MM",n.format);return(0,h$.Z)({},o,{sectionValue:i})}if("weekDay"===n.type){const r=t(e,n);if(Ote(r))return r;const o=Q7(s,n.format)[Number(r.sectionValue)-1];return(0,h$.Z)({},r,{sectionValue:o})}return{saveQuery:!1}}),(e=>r8(e,o)))})((0,h$.Z)({},e,{keyPressed:n8(e.keyPressed,o)})):(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,o)=>{const i=e=>J7(s,a,n.type,e);if("letter"===n.contentType)return t(n.format,i(n.format),e);if(r&&null!=o&&"letter"===X7(s,r).contentType){const n=i(r),a=t(0,n,e);return Ote(a)?{saveQuery:!1}:(0,h$.Z)({},a,{sectionValue:o(a.sectionValue,n)})}return{saveQuery:!1}};return h(e,((e,t)=>{switch(t.type){case"month":{const r=e=>l8(s,e,s.formats.month,t.format);return n(e,t,s.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,s.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(e);null!=u?n({activeSection:l,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection}):i(null)})),resetCharacterQuery:c}},Ete=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:h,applyCharacterEditing:p,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:y,clearValue:b,updateSectionValue:x,updateValueFromValueStr:w,sectionOrder:S,areAllSectionsEmpty:C,sectionsValueBoundaries:k}=e,M=d.useRef(null),_=(0,E8.Z)(r,M),T=b9(),P=Q6(),I=(0,n7.Z)(),[R,D]=d.useState(!1),O=d.useMemo((()=>({syncSelectionToDOM:()=>{if(!M.current)return;const e=document.getSelection();if(!e)return;if(null==g)return e.rangeCount>0&&M.current.getRoot().contains(e.getRangeAt(0).startContainer)&&e.removeAllRanges(),void(R&&M.current.getRoot().blur());if(!M.current.getRoot().contains(ite(document)))return;const t=new window.Range;let n;if("all"===g)n=M.current.getRoot();else{n="empty"===v.sections[g].type?M.current.getSectionContainer(g):M.current.getSectionContent(g)}t.selectNodeContents(n),n.focus(),e.removeAllRanges(),e.addRange(t)},getActiveSectionIndexFromDOM:()=>{const e=ite(document);return e&&M.current&&M.current.getRoot().contains(e)?M.current.getSectionIndexFromDOMElement(e):null},focusField:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!M.current||null!=O.getActiveSectionIndexFromDOM())return;const t=f8(e,v.sections);D(!0),M.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!M.current)return;const t=f8(e,v.sections);D(null!==("all"===t?0:t)),m(e)},isFieldFocused:()=>{const e=ite(document);return!!M.current&&M.current.getRoot().contains(e)}})),[g,m,v.sections,R]),A=(0,h7.Z)((e=>{if(!M.current)return;const t=v.sections[e];M.current.getSectionContent(e).innerHTML=t.value||t.placeholder,O.syncSelectionToDOM()})),E=(0,h7.Z)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void m(S.startIndex);let t=0,n=0;for(;n{if(null==s||s(e),!M.current||"all"!==g)return;const t=e.target.textContent??"";M.current.getRoot().innerHTML=v.sections.map((e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`)).join(""),O.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(f(),b(),m("all")):t.length>1?w(t):("all"===g&&m(0),p({keyPressed:t,sectionIndex:0}))})),L=(0,h7.Z)((e=>{if(null==l||l(e),n||"all"!==g)return void e.preventDefault();const t=e.clipboardData.getData("text");e.preventDefault(),f(),w(t)})),F=(0,h7.Z)((function(){for(var e=arguments.length,t=new Array(e),n=0;n{if(!M.current)return;const e=ite(document);!M.current.getRoot().contains(e)&&(D(!1),m(null))}))})),N=(0,h7.Z)((e=>t=>{t.isDefaultPrevented()||m(e)})),z=(0,h7.Z)((e=>{e.preventDefault()})),B=(0,h7.Z)((e=>()=>{m(e)})),V=(0,h7.Z)((e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;const r=v.sections[g],o=e.clipboardData.getData("text"),i=/^[a-zA-Z]+$/.test(o),a=/^[0-9]+$/.test(o),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(o);"letter"===r.contentType&&i||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(f(),x({activeSection:r,newSectionValue:o,shouldGoToNextSection:!0})):i||a||(f(),w(o))})),H=(0,h7.Z)((e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"})),$=(0,h7.Z)((e=>{if(!M.current)return;const t=e.target,r=t.textContent??"",o=M.current.getSectionIndexFromDOMElement(t),i=v.sections[o];if(!n&&M.current){if(0===r.length){if(""===i.value)return void A(o);const t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void A(o):(f(),void y())}p({keyPressed:r,sectionIndex:o}),A(o)}else A(o)}));(0,v7.Z)((()=>{if(R&&M.current)if("all"===g)M.current.getRoot().focus();else if("number"==typeof g){const e=M.current.getSectionContent(g);e&&e.focus()}}),[g,R]);const W=d.useMemo((()=>v.sections.reduce(((e,t)=>(e[t.type]=k[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e)),{})),[k,v.sections]),G="all"===g,U=d.useMemo((()=>v.sections.map(((e,r)=>{const o=!G&&!t&&!n;return{container:{"data-sectionindex":r,onClick:N(r)},content:{tabIndex:G||r>0?-1:0,contentEditable:!G&&!t&&!n,role:"spinbutton",id:`${I}-${e.type}`,"aria-labelledby":`${I}-${e.type}`,"aria-readonly":n,"aria-valuenow":g8(e,P),"aria-valuemin":W[e.type].minimum,"aria-valuemax":W[e.type].maximum,"aria-valuetext":e.value?m8(e,P):T.empty,"aria-label":T[e.type],"aria-disabled":t,spellCheck:!o&&void 0,autoCapitalize:o?"off":void 0,autoCorrect:o?"off":void 0,[parseInt(d.version,10)>=17?"enterKeyHint":"enterkeyhint"]:o?"next":void 0,children:e.value||e.placeholder,onInput:$,onPaste:V,onFocus:B(r),onDragOver:H,onMouseUp:z,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}))),[v.sections,B,V,H,$,N,z,t,n,G,T,P,W,I]),q=(0,h7.Z)((e=>{w(e.target.value)})),K=d.useMemo((()=>C?"":h.getV7HiddenInputValueFromSections(v.sections)),[C,v.sections,h]);return d.useEffect((()=>{if(null==M.current)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join("\n"));c&&M.current&&M.current.getSectionContent(S.startIndex).focus()}),[]),{interactions:O,returnedValue:{autoFocus:c,readOnly:n,focused:u??R,sectionListRef:_,onBlur:j,onClick:E,onFocus:F,onInput:Z,onPaste:L,enableAccessibleFieldDOMStructure:!0,elements:U,tabIndex:0===g?-1:0,contentEditable:G,value:K,onChange:q,areAllSectionsEmpty:C}}},Zte=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Lte=e=>{const t=(0,hh.V)(),n=d.useRef(void 0),r=d.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:h=!1},parsedSelectedSections:p,activeSectionIndex:f,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:y,resetCharacterQuery:b,updateSectionValue:x,updateValueFromValueStr:w,clearActiveSection:S,clearValue:C,setTempAndroidValueStr:k,setSelectedSections:M,getSectionsFromValue:_,areAllSectionsEmpty:T,localizedDigits:P}=e,I=d.useRef(null),R=(0,E8.Z)(l,I),D=d.useMemo((()=>((e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a({syncSelectionToDOM:()=>{if(!I.current)return;if(null==p)return void(I.current.scrollLeft&&(I.current.scrollLeft=0));if(I.current!==ite(document))return;const e=I.current.scrollTop;if("all"===p)I.current.select();else{const e=D[p],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;t===I.current.selectionStart&&n===I.current.selectionEnd||I.current===ite(document)&&I.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout((()=>{!I.current||I.current!==ite(document)||I.current.selectionStart!==I.current.selectionEnd||I.current.selectionStart===t&&I.current.selectionEnd===n||O.syncSelectionToDOM()}))}I.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{const e=I.current.selectionStart??0,t=I.current.selectionEnd??0;if(0===e&&0===t)return null;const n=e<=D[0].startInInput?1:D.findIndex((t=>t.startInInput-t.startSeparator.length>e));return-1===n?D.length-1:n-1},focusField:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;var t;ite(document)!==I.current&&(null===(t=I.current)||void 0===t||t.focus(),M(e))},setSelectedSections:e=>M(e),isFieldFocused:()=>I.current===ite(document)})),[I,p,D,M]),A=()=>{const e=I.current.selectionStart??0;let t;t=e<=D[0].startInInput||e>=D[D.length-1].endInInput?1:D.findIndex((t=>t.startInInput-t.startSeparator.length>e));const n=-1===t?D.length-1:t-1;M(n)},E=(0,h7.Z)((function(){for(var e=arguments.length,t=new Array(e),r=0;r{i&&i===I.current&&null==f&&(i.value.length&&Number(i.selectionEnd)-Number(i.selectionStart)===i.value.length?M("all"):A())}))})),Z=(0,h7.Z)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{if(null==a||a(e),e.preventDefault(),c||h)return;const t=e.clipboardData.getData("text");if("number"==typeof p){const e=m.sections[p],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),o=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&o)return b(),void x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});if(n||r)return}b(),w(t)})),F=(0,h7.Z)((function(){for(var e=arguments.length,t=new Array(e),n=0;n{if(c)return;const n=e.target.value;if(""===n)return b(),void C();const r=e.nativeEvent.data,o=r&&r.length>1,i=o?r:n,a=Zte(i);if("all"===p&&M(f),null==f||o)return void w(o?r:a);let s;if("all"===p&&1===a.length)s=a;else{const e=Zte(g.getV6InputValueFromSections(D,P,t));let n=-1,r=-1;for(let t=0;to.end)return;const i=a.length-e.length+o.end-Zte(o.endSeparator||"").length;s=a.slice(o.start+Zte(o.startSeparator||"").length,i)}if(0===s.length)return navigator.userAgent.toLowerCase().includes("android")&&k(i),b(),void S();y({keyPressed:s,sectionIndex:f})})),N=d.useMemo((()=>void 0!==u?u:g.getV6InputValueFromSections(_(v.emptyValue),P,t)),[u,g,_,v.emptyValue,P,t]),z=d.useMemo((()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,P,t)),[m.sections,g,m.tempValueStrAndroid,P,t]);d.useEffect((()=>(I.current&&I.current===ite(document)&&M("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)})),[]);const B=d.useMemo((()=>null==f||"letter"===m.sections[f].contentType?"text":"numeric"),[f,m.sections]),V=I.current&&I.current===ite(document);return{interactions:O,returnedValue:{readOnly:c,onBlur:F,onClick:Z,onFocus:E,onPaste:L,inputRef:R,enableAccessibleFieldDOMStructure:!1,placeholder:N,inputMode:B,autoComplete:"off",value:!V&&T?"":z,onChange:j}}},Fte=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],jte=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Nte=["minDateTime","maxDateTime"],zte=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],Bte=e=>{const t=(e=>{const t=Q6(),n=J6(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return(0,h$.Z)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:Boolean(e.minDateTime||e.maxDateTime),minDate:r9(t,e.minDateTime??e.minDate,n.minDate),maxDate:r9(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})})(e),{forwardedProps:n,internalProps:r}=((e,t)=>d.useMemo((()=>{const n=(0,h$.Z)({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return zte.forEach(o),"date"===t?Fte.forEach(o):"time"===t?jte.forEach(o):"date-time"===t&&(Fte.forEach(o),jte.forEach(o),Nte.forEach(o)),{forwardedProps:n,internalProps:r}}),[e,t]))(t,"date-time");return(e=>{const t=Q6(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:h},fieldValueManager:p,valueManager:f,validator:m}=e,g=(0,hh.V)(),v=Dte(e),{state:y,activeSectionIndex:b,parsedSelectedSections:x,setSelectedSections:w,clearValue:S,clearActiveSection:C,updateSectionValue:k,setTempAndroidValueStr:M,sectionsValueBoundaries:_,localizedDigits:T,timezone:P}=v,I=Ate({sections:y.sections,updateSectionValue:k,sectionsValueBoundaries:_,localizedDigits:T,setTempAndroidValueStr:M,timezone:P}),{resetCharacterQuery:R}=I,D=f.areValuesEqual(t,y.value,f.emptyValue),O=i?Ete:Lte,A=d.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,i=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:i}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex(((e,t)=>{var n;return t>=i&&(null===(n=e.endSeparator)||void 0===n?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,r[s]=e,s-=1;i=a+1}return e.forEach(((t,i)=>{const a=o[i],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[i]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(y.sections,g&&!i)),[y.sections,g,i]),{returnedValue:E,interactions:Z}=O((0,h$.Z)({},e,v,I,{areAllSectionsEmpty:D,sectionOrder:A})),L=(0,h7.Z)((e=>{if(null==l||l(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),w("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)w(A.startIndex);else if("all"===x)w(A.endIndex);else{const e=A.neighbors[x].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)w(A.endIndex);else if("all"===x)w(A.startIndex);else{const e=A.neighbors[x].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?S():C(),R();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==b)break;"all"===x&&w(b);const n=y.sections[b],r=p.getActiveDateManager(t,y,n),i=a8(t,P,n,e.key,_,T,r.date,{minutesStep:o});k({activeSection:n,newSectionValue:i,shouldGoToNextSection:!1});break}}}));(0,v7.Z)((()=>{Z.syncSelectionToDOM()}));const{hasValidationError:F}=nte({props:n,validator:m,timezone:P,value:y.value,onError:n.onError}),j=d.useMemo((()=>void 0!==u?u:F),[F,u]);d.useEffect((()=>{j||null!=b||R()}),[y.referenceValue,b,j]),d.useEffect((()=>{null!=y.tempValueStrAndroid&&null!=b&&(R(),C())}),[y.sections]),d.useImperativeHandle(r,(()=>({getSections:()=>y.sections,getActiveSectionIndex:Z.getActiveSectionIndexFromDOM,setSelectedSections:Z.setSelectedSections,focusField:Z.focusField,isFieldFocused:Z.isFieldFocused})));const N=(0,h7.Z)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}})),tne=(0,Y.ZP)("span")((e=>{let{theme:t}=e;return{fontFamily:t.typography.fontFamily,fontSize:"inherit"}})),nne=(0,Y.ZP)("legend")((e=>{let{theme:t}=e;return{float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{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"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}}));function rne(e){const{className:t,label:n}=e,r=(0,p$.Z)(e,Jte),i=null!=n&&""!==n,a=(0,h$.Z)({},e,{withLabel:i});return(0,o.jsx)(ene,(0,h$.Z)({"aria-hidden":!0,className:t},r,{ownerState:a,children:(0,o.jsx)(nne,{ownerState:a,children:i?(0,o.jsx)(tne,{children:n}):(0,o.jsx)(tne,{className:"notranslate",children:"​"})})}))}var one=n(98251);const ine={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function ane(e){return(0,Iu.ZP)("MuiPickersSectionList",e)}const sne=(0,Pu.Z)("MuiPickersSectionList",["root","section","sectionContent"]),lne=["slots","slotProps","elements","sectionListRef"],une=(0,Y.ZP)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),cne=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),dne=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),hne=(0,Y.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function pne(e){const{slots:t,slotProps:n,element:r,classes:i}=e,a=(null==t?void 0:t.section)??cne,s=(0,r7.Z)({elementType:a,externalSlotProps:null==n?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),l=(null==t?void 0:t.sectionContent)??hne,u=(0,r7.Z)({elementType:l,externalSlotProps:null==n?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),c=(null==t?void 0:t.sectionSeparator)??dne,d=(0,r7.Z)({elementType:c,externalSlotProps:null==n?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=(0,r7.Z)({elementType:c,externalSlotProps:null==n?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,o.jsxs)(a,(0,h$.Z)({},s,{children:[(0,o.jsx)(c,(0,h$.Z)({},d)),(0,o.jsx)(l,(0,h$.Z)({},u)),(0,o.jsx)(c,(0,h$.Z)({},h))]}))}const fne=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:a,sectionListRef:s}=n,l=(0,p$.Z)(n,lne),u=(e=>{const{classes:t}=e;return(0,el.Z)({root:["root"],section:["section"],sectionContent:["sectionContent"]},ane,t)})(n),c=d.useRef(null),h=(0,E8.Z)(t,c),p=e=>{if(!c.current)throw new Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return c.current};d.useImperativeHandle(s,(()=>({getRoot:()=>p("getRoot"),getSectionContainer:e=>p("getSectionContainer").querySelector(`.${sne.section}[data-sectionindex="${e}"]`),getSectionContent:e=>p("getSectionContent").querySelector(`.${sne.section}[data-sectionindex="${e}"] .${sne.sectionContent}`),getSectionIndexFromDOMElement(e){const t=p("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return e.classList.contains(sne.section)?n=e:e.classList.contains(sne.sectionContent)&&(n=e.parentElement),null==n?null:Number(n.dataset.sectionindex)}})));const f=(null==r?void 0:r.root)??une,m=(0,r7.Z)({elementType:f,externalSlotProps:null==i?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return(0,o.jsx)(f,(0,h$.Z)({},m,{children:m.contentEditable?a.map((e=>{let{content:t,before:n,after:r}=e;return`${n.children}${t.children}${r.children}`})).join(""):(0,o.jsx)(d.Fragment,{children:a.map(((e,t)=>(0,o.jsx)(pne,{slots:r,slotProps:i,element:e,classes:u},t)))})}))})),mne=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],gne=(0,Y.ZP)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return(0,h$.Z)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:(n=.15/16,Math.round(1e5*n)/1e5)+"em",variants:[{props:{fullWidth:!0},style:{width:"100%"}}]});var n})),vne=(0,Y.ZP)(une,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})((e=>{let{theme:t}=e;return{padding:"4px 0 5px",fontFamily:t.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:e=>{let{adornedStart:t,focused:n,filled:r,label:o}=e;return!t&&!n&&!r&&null==o},style:t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:"light"===t.palette.mode?.42:.5}}]}})),yne=(0,Y.ZP)(cne,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})((e=>{let{theme:t}=e;return{fontFamily:t.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"}})),bne=(0,Y.ZP)(hne,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t}=e;return{fontFamily:t.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"}})),xne=(0,Y.ZP)(dne,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})((()=>({whiteSpace:"pre",letterSpacing:"inherit"}))),wne=(0,Y.ZP)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,h$.Z)({},ine)),Sne=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:u,startAdornment:c,renderSuffix:h,slots:p,slotProps:f,contentEditable:m,tabIndex:g,onInput:v,onPaste:y,onKeyDown:b,name:x,readOnly:w,inputProps:S,inputRef:C,sectionListRef:k}=n,M=(0,p$.Z)(n,mne),_=d.useRef(null),T=(0,E8.Z)(t,_),P=(0,E8.Z)(null==S?void 0:S.ref,C),I=(0,hh.V)(),R=(0,qte.Z)();if(!R)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");d.useEffect((()=>{R&&R.setAdornedStart(Boolean(c))}),[R,c]),d.useEffect((()=>{R&&(i?R.onEmpty():R.onFilled())}),[R,i]);const D=(0,h$.Z)({},n,R,{isRtl:I}),O=(e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${(0,one.Z)(s)}`,"small"===l&&"inputSizeSmall",Boolean(c)&&"adornedStart",Boolean(u)&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,el.Z)(d,Kte,o)})(D),A=(null==p?void 0:p.root)||gne,E=(0,r7.Z)({elementType:A,externalSlotProps:null==f?void 0:f.root,externalForwardedProps:M,additionalProps:{"aria-invalid":R.error,ref:T},className:O.root,ownerState:D}),Z=(null==p?void 0:p.input)||vne;return(0,o.jsxs)(A,(0,h$.Z)({},E,{children:[c,(0,o.jsx)(fne,{sectionListRef:k,elements:r,contentEditable:m,tabIndex:g,className:O.sectionsContainer,onFocus:e=>{var t;R.disabled?e.stopPropagation():null===(t=R.onFocus)||void 0===t||t.call(R,e)},onBlur:R.onBlur,onInput:v,onPaste:y,onKeyDown:b,slots:{root:Z,section:yne,sectionContent:bne,sectionSeparator:xne},slotProps:{root:{ownerState:D},sectionContent:{className:Yte.sectionContent},sectionSeparator:e=>{let{position:t}=e;return{className:"before"===t?Yte.sectionBefore:Yte.sectionAfter}}}}),u,h?h((0,h$.Z)({},R)):null,(0,o.jsx)(wne,(0,h$.Z)({name:x,className:O.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:R.required,disabled:R.disabled},S,{ref:P}))]}))})),Cne=["label","autoFocus","ownerState","notched"],kne=(0,Y.ZP)(gne,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Qte.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Qte.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Qte.focused} .${Qte.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Qte.disabled}`]:{[`& .${Qte.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${Qte.error} .${Qte.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},variants:Object.keys((t.vars??t).palette).filter((e=>{var n;return(null===(n=(t.vars??t).palette[e])||void 0===n?void 0:n.main)??!1})).map((e=>({props:{color:e},style:{[`&.${Qte.focused}:not(.${Qte.error}) .${Qte.notchedOutline}`]:{borderColor:(t.vars||t).palette[e].main}}})))}})),Mne=(0,Y.ZP)(vne,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),_ne=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:a}=n,s=(0,p$.Z)(n,Cne),l=(0,qte.Z)(),u=(0,h$.Z)({},n,i,l,{color:(null==l?void 0:l.color)||"primary"}),c=(e=>{const{classes:t}=e,n=(0,el.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Xte,t);return(0,h$.Z)({},t,n)})(u);return(0,o.jsx)(Sne,(0,h$.Z)({slots:{root:kne,input:Mne},renderSuffix:e=>(0,o.jsx)(rne,{shrink:Boolean(a||e.adornedStart||e.focused||e.filled),notched:Boolean(a||e.adornedStart||e.focused||e.filled),className:c.notchedOutline,label:null!=r&&""!==r&&(null==l?void 0:l.required)?(0,o.jsxs)(d.Fragment,{children:[r," ","*"]}):r,ownerState:u})},s,{label:r,classes:c,ref:t}))}));_ne.muiName="Input";var Tne=n(62774);function Pne(e){return(0,Iu.ZP)("MuiPickersFilledInput",e)}const Ine=(0,h$.Z)({},Yte,(0,Pu.Z)("MuiPickersFilledInput",["root","underline","input"])),Rne=["label","autoFocus","disableUnderline","ownerState"],Dne=(0,Y.ZP)(gne,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Tne.x9)(e)&&"disableUnderline"!==e})((e=>{let{theme:t}=e;const n="light"===t.palette.mode,r=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${Ine.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${Ine.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((t.vars??t).palette).filter((e=>(t.vars??t).palette[e].main)).map((e=>{var n;return{props:{color:e,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${null===(n=(t.vars||t).palette[e])||void 0===n?void 0:n.main}`}}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ine.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ine.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ine.disabled}, .${Ine.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Ine.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:e=>{let{startAdornment:t}=e;return!!t},style:{paddingLeft:12}},{props:e=>{let{endAdornment:t}=e;return!!t},style:{paddingRight:12}}]}})),One=(0,Y.ZP)(vne,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:e=>{let{startAdornment:t}=e;return!!t},style:{paddingLeft:0}},{props:e=>{let{endAdornment:t}=e;return!!t},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Ane=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,s=(0,p$.Z)(n,Rne),l=(0,qte.Z)(),u=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,el.Z)(r,Pne,t);return(0,h$.Z)({},t,o)})((0,h$.Z)({},n,a,l,{color:(null==l?void 0:l.color)||"primary"}));return(0,o.jsx)(Sne,(0,h$.Z)({slots:{root:Dne,input:One},slotProps:{root:{disableUnderline:i}}},s,{label:r,classes:u,ref:t}))}));function Ene(e){return(0,Iu.ZP)("MuiPickersFilledInput",e)}Ane.muiName="Input";const Zne=(0,h$.Z)({},Yte,(0,Pu.Z)("MuiPickersInput",["root","input"])),Lne=["label","autoFocus","disableUnderline","ownerState"],Fne=(0,Y.ZP)(gne,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;let n="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((t.vars??t).palette).filter((e=>(t.vars??t).palette[e].main)).map((e=>({props:{color:e},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e].main}`}}}))),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Zne.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Zne.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Zne.disabled}, .${Zne.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Zne.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}})),jne=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,s=(0,p$.Z)(n,Lne),l=(0,qte.Z)(),u=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,el.Z)(r,Ene,t);return(0,h$.Z)({},t,o)})((0,h$.Z)({},n,a,l,{disableUnderline:i,color:(null==l?void 0:l.color)||"primary"}));return(0,o.jsx)(Sne,(0,h$.Z)({slots:{root:Fne}},s,{label:r,classes:u,ref:t}))}));jne.muiName="Input";const Nne=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],zne={standard:jne,filled:Ane,outlined:_ne},Bne=(0,Y.ZP)(Ec.Z,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Vne=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:u=!1,variant:c="outlined",required:h=!1,InputProps:p,inputProps:f,inputRef:m,sectionListRef:g,elements:v,areAllSectionsEmpty:y,onClick:b,onKeyDown:x,onKeyUp:w,onPaste:S,onInput:C,endAdornment:k,startAdornment:M,tabIndex:_,contentEditable:T,focused:P,value:I,onChange:R,fullWidth:D,id:O,name:A,helperText:E,FormHelperTextProps:Z,label:L,InputLabelProps:F}=n,j=(0,p$.Z)(n,Nne),N=d.useRef(null),z=(0,E8.Z)(t,N),B=(0,n7.Z)(O),V=E&&B?`${B}-helper-text`:void 0,H=L&&B?`${B}-label`:void 0,$=(0,h$.Z)({},n,{color:s,disabled:l,error:u,focused:P,required:h,variant:c}),W=(e=>{const{focused:t,disabled:n,classes:r,required:o}=e,i={root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]};return(0,el.Z)(i,Ute,r)})($),G=zne[c];return(0,o.jsxs)(Bne,(0,h$.Z)({className:(0,Js.Z)(W.root,a),ref:z,focused:P,onFocus:r,onBlur:i,disabled:l,variant:c,error:u,color:s,fullWidth:D,required:h,ownerState:$},j,{children:[(0,o.jsx)(Wte.Z,(0,h$.Z)({htmlFor:B,id:H},F,{children:L})),(0,o.jsx)(G,(0,h$.Z)({elements:v,areAllSectionsEmpty:y,onClick:b,onKeyDown:x,onKeyUp:w,onInput:C,onPaste:S,endAdornment:k,startAdornment:M,tabIndex:_,contentEditable:T,value:I,onChange:R,id:B,fullWidth:D,inputProps:f,inputRef:m,sectionListRef:g,label:L,name:A,role:"group","aria-labelledby":H,"aria-describedby":V,"aria-live":V?"polite":void 0},p)),E&&(0,o.jsx)(Gte.Z,(0,h$.Z)({id:V},Z,{children:E}))]}))})),Hne=["enableAccessibleFieldDOMStructure"],$ne=["InputProps","readOnly"],Wne=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],Gne=["slots","slotProps","InputProps","inputProps"],Une=d.forwardRef((function(e,t){const n=(0,V6.Z)({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:a,inputProps:s}=n,l=(0,p$.Z)(n,Gne),h=n,p=(null==r?void 0:r.textField)??(e.enableAccessibleFieldDOMStructure?Vne:c.Z),f=(0,r7.Z)({elementType:p,externalSlotProps:null==i?void 0:i.textField,externalForwardedProps:l,ownerState:h,additionalProps:{ref:t}});f.inputProps=(0,h$.Z)({},s,f.inputProps),f.InputProps=(0,h$.Z)({},a,f.InputProps);const m=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,p$.Z)(e,Hne);if(t){const{InputProps:e,readOnly:t}=n,r=(0,p$.Z)(n,$ne);return(0,h$.Z)({},r,{InputProps:(0,h$.Z)({},e??{},{readOnly:t})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,p$.Z)(n,Wne);return(0,h$.Z)({},c,{InputProps:(0,h$.Z)({},s??{},{readOnly:a}),inputProps:(0,h$.Z)({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})})(Bte(f)),g=(e=>{const t=b9(),{clearable:n,onClear:r,InputProps:i,sx:a,slots:s,slotProps:l}=e,c=(0,p$.Z)(e,Hte),h=(null==s?void 0:s.clearButton)??u.Z,p=(0,r7.Z)({elementType:h,externalSlotProps:null==l?void 0:l.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),f=(0,p$.Z)(p,$te),m=(null==s?void 0:s.clearIcon)??y9,g=(0,r7.Z)({elementType:m,externalSlotProps:null==l?void 0:l.clearIcon,ownerState:{}});return(0,h$.Z)({},c,{InputProps:(0,h$.Z)({},i,{endAdornment:(0,o.jsxs)(d.Fragment,{children:[n&&(0,o.jsx)(Vte.Z,{position:"end",sx:{marginRight:(null==i?void 0:i.endAdornment)?-1:-1.5},children:(0,o.jsx)(h,(0,h$.Z)({},f,{onClick:r,children:(0,o.jsx)(m,(0,h$.Z)({fontSize:"small"},g))}))}),null==i?void 0:i.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})})((0,h$.Z)({},m,{slots:r,slotProps:i}));return(0,o.jsx)(p,(0,h$.Z)({},g))}));var qne=n(96987);function Kne(e,t,n){return(0,Mn.L)((null==n?void 0:n.in)||e,+(0,bn.Q)(e)+t)}function Yne(e,t,n){return Kne(e,1e3*t,n)}function Xne(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setTime(r.getTime()+t*Sn.yJ),r}function Qne(e,t,n){return Kne(e,t*Sn.vh,n)}function Jne(e,t,n){return(0,qne.E)(e,7*t,n)}var ere=n(95931);function tre(e,t,n){return(0,ere.z)(e,12*t,n)}function nre(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in);return n.setHours(23,59,59,999),n}function rre(e,t){var n,r,o,i;const a=(0,rn.j)(),s=(null==t?void 0:t.weekStartsOn)??(null==t||null===(r=t.locale)||void 0===r||null===(n=r.options)||void 0===n?void 0:n.weekStartsOn)??a.weekStartsOn??(null===(i=a.locale)||void 0===i||null===(o=i.options)||void 0===o?void 0:o.weekStartsOn)??0,l=(0,bn.Q)(e,null==t?void 0:t.in),u=l.getDay(),c=6+(u+(0,bn.Q)(t)}function fre(e,t){return+(0,bn.Q)(e)<+(0,bn.Q)(t)}function mre(e,t){return+(0,bn.Q)(e)==+(0,bn.Q)(t)}var gre=n(63974),vre=n(66497);function yre(e,t,n){const[r,o]=(0,gre.d)(null==n?void 0:n.in,e,t);return+(0,vre.b)(r)==+(0,vre.b)(o)}function bre(e,t,n){const[r,o]=(0,gre.d)(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function xre(e,t,n){const[r,o]=(0,gre.d)(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function wre(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in);return n.setMinutes(0,0,0),n}function Sre(e,t,n){const[r,o]=(0,gre.d)(null==n?void 0:n.in,e,t);return+wre(r)==+wre(o)}function Cre(e,t){const n=function(e){var t;return"function"==typeof e&&(null===(t=e.prototype)||void 0===t?void 0:t.constructor)===e}(t)?new t(0):(0,Mn.L)(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function kre(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Mre{validate(e,t){return!0}constructor(){kre(this,"subPriority",0)}}class _re extends Mre{validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}}class Tre extends Mre{set(e,t){return t.timestampIsSet?e:(0,Mn.L)(e,Cre(e,this.context))}constructor(e,t){super(),kre(this,"priority",10),kre(this,"subPriority",-1),this.context=e||(e=>(0,Mn.L)(t,e))}}class Pre{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new _re(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}function Ire(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Rre=/^(1[0-2]|0?\d)/,Dre=/^(3[0-1]|[0-2]?\d)/,Ore=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Are=/^(5[0-3]|[0-4]?\d)/,Ere=/^(2[0-3]|[0-1]?\d)/,Zre=/^(2[0-4]|[0-1]?\d)/,Lre=/^(1[0-1]|0?\d)/,Fre=/^(1[0-2]|0?\d)/,jre=/^[0-5]?\d/,Nre=/^[0-5]?\d/,zre=/^\d/,Bre=/^\d{1,2}/,Vre=/^\d{1,3}/,Hre=/^\d{1,4}/,$re=/^-?\d+/,Wre=/^-?\d/,Gre=/^-?\d{1,2}/,Ure=/^-?\d{1,3}/,qre=/^-?\d{1,4}/,Kre=/^([+-])(\d{2})(\d{2})?|Z/,Yre=/^([+-])(\d{2})(\d{2})|Z/,Xre=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Qre=/^([+-])(\d{2}):(\d{2})|Z/,Jre=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function eoe(e,t){return e?{value:t(e.value),rest:e.rest}:e}function toe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function noe(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Sn.vh+i*Sn.yJ+a*Sn.qk),rest:t.slice(n[0].length)}}function roe(e){return toe($re,e)}function ooe(e,t){switch(e){case 1:return toe(zre,t);case 2:return toe(Bre,t);case 3:return toe(Vre,t);case 4:return toe(Hre,t);default:return toe(new RegExp("^\\d{1,"+e+"}"),t)}}function ioe(e,t){switch(e){case 1:return toe(Wre,t);case 2:return toe(Gre,t);case 3:return toe(Ure,t);case 4:return toe(qre,t);default:return toe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function aoe(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function soe(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function loe(e){return e%400==0||e%4==0&&e%100!=0}function uoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function coe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function doe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function poe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function foe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function moe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function goe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function voe(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in),o=Dn(r,n)-t;return r.setDate(r.getDate()-7*o),(0,bn.Q)(r,null==n?void 0:n.in)}function yoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function boe(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in),o=Pn(r,n)-t;return r.setDate(r.getDate()-7*o),r}function xoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function woe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Soe=[31,28,31,30,31,30,31,31,30,31,30,31],Coe=[31,29,31,30,31,30,31,31,30,31,30,31];function koe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Moe(e,t,n){var r,o,i,a;const s=(0,rn.j)(),l=(null==n?void 0:n.weekStartsOn)??(null==n||null===(o=n.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.weekStartsOn)??s.weekStartsOn??(null===(a=s.locale)||void 0===a||null===(i=a.options)||void 0===i?void 0:i.weekStartsOn)??0,u=(0,bn.Q)(e,null==n?void 0:n.in),c=u.getDay(),d=7-l,h=t<0||t>6?t-(c+d)%7:((t%7+7)%7+d)%7-(c+d)%7;return(0,qne.E)(u,h,n)}function _oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Toe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Poe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ioe(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in).getDay();return 0===n?7:n}function Roe(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in),o=t-Ioe(r,n);return(0,qne.E)(r,o,n)}function Doe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ooe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Loe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Foe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function joe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Noe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Boe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Voe=n(9243);function Hoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Goe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Uoe={G:new class extends Pre{parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),Ire(this,"priority",140),Ire(this,"incompatibleTokens",["R","u","t","T"])}},y:new class extends Pre{parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return eoe(ooe(4,e),r);case"yo":return eoe(n.ordinalNumber(e,{unit:"year"}),r);default:return eoe(ooe(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=soe(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),uoe(this,"priority",130),uoe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}},Y:new class extends Pre{parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return eoe(ooe(4,e),r);case"Yo":return eoe(n.ordinalNumber(e,{unit:"year"}),r);default:return eoe(ooe(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=In(e,r);if(n.isTwoDigitYear){const t=soe(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,Cn.z)(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,Cn.z)(e,r)}constructor(...e){super(...e),coe(this,"priority",130),coe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}},R:new class extends Pre{parse(e,t){return ioe("R"===t?4:t.length,e)}set(e,t,n){const r=(0,Mn.L)(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kn(r)}constructor(...e){super(...e),doe(this,"priority",130),doe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}},u:new class extends Pre{parse(e,t){return ioe("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),hoe(this,"priority",130),hoe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}},Q:new class extends Pre{parse(e,t,n){switch(t){case"Q":case"QQ":return ooe(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),poe(this,"priority",120),poe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}},q:new class extends Pre{parse(e,t,n){switch(t){case"q":case"qq":return ooe(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),foe(this,"priority",120),foe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}},M:new class extends Pre{parse(e,t,n){const r=e=>e-1;switch(t){case"M":return eoe(toe(Rre,e),r);case"MM":return eoe(ooe(2,e),r);case"Mo":return eoe(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),moe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),moe(this,"priority",110)}},L:new class extends Pre{parse(e,t,n){const r=e=>e-1;switch(t){case"L":return eoe(toe(Rre,e),r);case"LL":return eoe(ooe(2,e),r);case"Lo":return eoe(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}constructor(...e){super(...e),goe(this,"priority",110),goe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}},w:new class extends Pre{parse(e,t,n){switch(t){case"w":return toe(Are,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return ooe(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return(0,Cn.z)(voe(e,n,r),r)}constructor(...e){super(...e),yoe(this,"priority",100),yoe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}},I:new class extends Pre{parse(e,t,n){switch(t){case"I":return toe(Are,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return ooe(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return kn(boe(e,n))}constructor(...e){super(...e),xoe(this,"priority",100),xoe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}},d:new class extends Pre{parse(e,t,n){switch(t){case"d":return toe(Dre,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return ooe(t.length,e)}}validate(e,t){const n=loe(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Coe[r]:t>=1&&t<=Soe[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}constructor(...e){super(...e),woe(this,"priority",90),woe(this,"subPriority",1),woe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}},D:new class extends Pre{parse(e,t,n){switch(t){case"D":case"DD":return toe(Ore,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return ooe(t.length,e)}}validate(e,t){return loe(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}constructor(...e){super(...e),koe(this,"priority",90),koe(this,"subpriority",1),koe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}},E:new class extends Pre{parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Moe(e,n,r)).setHours(0,0,0,0),e}constructor(...e){super(...e),_oe(this,"priority",90),_oe(this,"incompatibleTokens",["D","i","e","c","t","T"])}},e:new class extends Pre{parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return eoe(ooe(t.length,e),o);case"eo":return eoe(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Moe(e,n,r)).setHours(0,0,0,0),e}constructor(...e){super(...e),Toe(this,"priority",90),Toe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}},c:new class extends Pre{parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return eoe(ooe(t.length,e),o);case"co":return eoe(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Moe(e,n,r)).setHours(0,0,0,0),e}constructor(...e){super(...e),Poe(this,"priority",90),Poe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}},i:new class extends Pre{parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return ooe(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return eoe(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return eoe(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return eoe(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return eoe(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=Roe(e,n)).setHours(0,0,0,0),e}constructor(...e){super(...e),Doe(this,"priority",90),Doe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}},a:new class extends Pre{parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(aoe(n),0,0,0),e}constructor(...e){super(...e),Ooe(this,"priority",80),Ooe(this,"incompatibleTokens",["b","B","H","k","t","T"])}},b:new class extends Pre{parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(aoe(n),0,0,0),e}constructor(...e){super(...e),Aoe(this,"priority",80),Aoe(this,"incompatibleTokens",["a","B","H","k","t","T"])}},B:new class extends Pre{parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(aoe(n),0,0,0),e}constructor(...e){super(...e),Eoe(this,"priority",80),Eoe(this,"incompatibleTokens",["a","b","t","T"])}},h:new class extends Pre{parse(e,t,n){switch(t){case"h":return toe(Fre,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return ooe(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}constructor(...e){super(...e),Zoe(this,"priority",70),Zoe(this,"incompatibleTokens",["H","K","k","t","T"])}},H:new class extends Pre{parse(e,t,n){switch(t){case"H":return toe(Ere,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return ooe(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}constructor(...e){super(...e),Loe(this,"priority",70),Loe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}},K:new class extends Pre{parse(e,t,n){switch(t){case"K":return toe(Lre,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return ooe(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}constructor(...e){super(...e),Foe(this,"priority",70),Foe(this,"incompatibleTokens",["h","H","k","t","T"])}},k:new class extends Pre{parse(e,t,n){switch(t){case"k":return toe(Zre,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return ooe(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}constructor(...e){super(...e),joe(this,"priority",70),joe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}},m:new class extends Pre{parse(e,t,n){switch(t){case"m":return toe(jre,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return ooe(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}constructor(...e){super(...e),Noe(this,"priority",60),Noe(this,"incompatibleTokens",["t","T"])}},s:new class extends Pre{parse(e,t,n){switch(t){case"s":return toe(Nre,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return ooe(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}constructor(...e){super(...e),zoe(this,"priority",50),zoe(this,"incompatibleTokens",["t","T"])}},S:new class extends Pre{parse(e,t){return eoe(ooe(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}constructor(...e){super(...e),Boe(this,"priority",30),Boe(this,"incompatibleTokens",["t","T"])}},X:new class extends Pre{parse(e,t){switch(t){case"X":return noe(Kre,e);case"XX":return noe(Yre,e);case"XXXX":return noe(Xre,e);case"XXXXX":return noe(Jre,e);default:return noe(Qre,e)}}set(e,t,n){return t.timestampIsSet?e:(0,Mn.L)(e,e.getTime()-(0,Voe.D)(e)-n)}constructor(...e){super(...e),Hoe(this,"priority",10),Hoe(this,"incompatibleTokens",["t","T","x"])}},x:new class extends Pre{parse(e,t){switch(t){case"x":return noe(Kre,e);case"xx":return noe(Yre,e);case"xxxx":return noe(Xre,e);case"xxxxx":return noe(Jre,e);default:return noe(Qre,e)}}set(e,t,n){return t.timestampIsSet?e:(0,Mn.L)(e,e.getTime()-(0,Voe.D)(e)-n)}constructor(...e){super(...e),$oe(this,"priority",10),$oe(this,"incompatibleTokens",["t","T","X"])}},t:new class extends Pre{parse(e){return roe(e)}set(e,t,n){return[(0,Mn.L)(e,1e3*n),{timestampIsSet:!0}]}constructor(...e){super(...e),Woe(this,"priority",40),Woe(this,"incompatibleTokens","*")}},T:new class extends Pre{parse(e){return roe(e)}set(e,t,n){return[(0,Mn.L)(e,n),{timestampIsSet:!0}]}constructor(...e){super(...e),Goe(this,"priority",20),Goe(this,"incompatibleTokens","*")}}},qoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Koe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yoe=/^'([^]*?)'?$/,Xoe=/''/g,Qoe=/\S/,Joe=/[a-zA-Z]/;function eie(e,t,n,r){var o,i,a,s,l,u,c,d;const h=()=>(0,Mn.L)((null==r?void 0:r.in)||n,NaN),p=lr(),f=(null==r?void 0:r.locale)??p.locale??nn,m=(null==r?void 0:r.firstWeekContainsDate)??(null==r||null===(i=r.locale)||void 0===i||null===(o=i.options)||void 0===o?void 0:o.firstWeekContainsDate)??p.firstWeekContainsDate??(null===(s=p.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)??1,g=(null==r?void 0:r.weekStartsOn)??(null==r||null===(u=r.locale)||void 0===u||null===(l=u.options)||void 0===l?void 0:l.weekStartsOn)??p.weekStartsOn??(null===(d=p.locale)||void 0===d||null===(c=d.options)||void 0===c?void 0:c.weekStartsOn)??0;if(!t)return e?h():(0,bn.Q)(n,null==r?void 0:r.in);const v={firstWeekContainsDate:m,weekStartsOn:g,locale:f},y=[new Tre(null==r?void 0:r.in,n)],b=t.match(Koe).map((e=>{const t=e[0];if(t in Gn){return(0,Gn[t])(e,f.formatLong)}return e})).join("").match(qoe),x=[];for(let n of b){!(null==r?void 0:r.useAdditionalWeekYearTokens)&&Xn(n)&&Qn(n,t,e),!(null==r?void 0:r.useAdditionalDayOfYearTokens)&&Yn(n)&&Qn(n,t,e);const o=n[0],i=Uoe[o];if(i){const{incompatibleTokens:t}=i;if(Array.isArray(t)){const e=x.find((e=>t.includes(e.token)||e.token===o));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===i.incompatibleTokens&&x.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);x.push({token:o,fullToken:n});const r=i.run(e,n,f.match,v);if(!r)return h();y.push(r.setter),e=r.rest}else{if(o.match(Joe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");if("''"===n?n="'":"'"===o&&(n=n.match(Yoe)[1].replace(Xoe,"'")),0!==e.indexOf(n))return h();e=e.slice(n.length)}}if(e.length>0&&Qoe.test(e))return h();const w=y.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>y.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let S=(0,bn.Q)(n,null==r?void 0:r.in);if(isNaN(+S))return h();const C={};for(const e of w){if(!e.validate(S,v))return h();const t=e.set(S,C,v);Array.isArray(t)?(S=t[0],Object.assign(C,t[1])):S=t}return S}function tie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setDate(t),r}function nie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setHours(t),r}function rie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setMinutes(t),r}function oie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=(0,Mn.L)((null==n?void 0:n.in)||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=are(a);return r.setMonth(t,Math.min(i,s)),r}function iie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setSeconds(t),r}function aie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return r.setMilliseconds(t),r}function sie(e,t,n){const r=(0,bn.Q)(e,null==n?void 0:n.in);return isNaN(+r)?(0,Mn.L)((null==n?void 0:n.in)||e,NaN):(r.setFullYear(t),r)}function lie(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function uie(e,t){const n=(0,bn.Q)(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function cie(e,t,n){const r=+(0,bn.Q)(e,null==n?void 0:n.in),[o,i]=[+(0,bn.Q)(t.start,null==n?void 0:n.in),+(0,bn.Q)(t.end,null==n?void 0:n.in)].sort(((e,t)=>e-t));return r>=o&&r<=i}const die={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},hie={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class pie{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=die,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,this.longFormatters[t])(e,this.locale.formatLong)}return e})).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:o}=e;this.locale=t,this.formats=(0,h$.Z)({},hie,n),this.longFormatters=r,this.lib=o||"date-fns"}}class fie extends pie{constructor({locale:e,formats:t}={}){super({locale:e??nn,formats:t,longFormatters:Gn}),this.parse=(e,t)=>""===e?null:eie(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&er(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>ar(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&mre(e,t),this.isSameYear=(e,t)=>bre(e,t),this.isSameMonth=(e,t)=>xre(e,t),this.isSameDay=(e,t)=>yre(e,t),this.isSameHour=(e,t)=>Sre(e,t),this.isAfter=(e,t)=>pre(e,t),this.isAfterYear=(e,t)=>pre(e,ore(t)),this.isAfterDay=(e,t)=>pre(e,nre(t)),this.isBefore=(e,t)=>fre(e,t),this.isBeforeYear=(e,t)=>fre(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>fre(e,this.startOfDay(t)),this.isWithinRange=(e,t)=>{let[n,r]=t;return cie(e,{start:n,end:r})},this.startOfYear=e=>xn(e),this.startOfMonth=e=>lie(e),this.startOfWeek=e=>(0,Cn.z)(e,{locale:this.locale}),this.startOfDay=e=>(0,vre.b)(e),this.endOfYear=e=>ore(e),this.endOfMonth=e=>uie(e),this.endOfWeek=e=>rre(e,{locale:this.locale}),this.endOfDay=e=>nre(e),this.addYears=(e,t)=>tre(e,t),this.addMonths=(e,t)=>(0,ere.z)(e,t),this.addWeeks=(e,t)=>Jne(e,t),this.addDays=(e,t)=>(0,qne.E)(e,t),this.addHours=(e,t)=>Qne(e,t),this.addMinutes=(e,t)=>Xne(e,t),this.addSeconds=(e,t)=>Yne(e,t),this.getYear=e=>hre(e),this.getMonth=e=>ure(e),this.getDate=e=>ire(e),this.getHours=e=>sre(e),this.getMinutes=e=>lre(e),this.getSeconds=e=>cre(e),this.getMilliseconds=e=>dre(e),this.setYear=(e,t)=>sie(e,t),this.setMonth=(e,t)=>oie(e,t),this.setDate=(e,t)=>tie(e,t),this.setHours=(e,t)=>nie(e,t),this.setMinutes=(e,t)=>rie(e,t),this.setSeconds=(e,t)=>iie(e,t),this.setMilliseconds=(e,t)=>aie(e,t),this.getDaysInMonth=e=>are(e),this.getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const i=[];for(;this.isBefore(o,n);){const e=Math.floor(r/7);i[e]=i[e]||[],i[e].push(o),o=this.addDays(o,1),r+=1}return i},this.getWeekNumber=e=>Dn(e,{locale:this.locale}),this.getYearRange=e=>{let[t,n]=e;const r=this.startOfYear(t),o=this.endOfYear(n),i=[];let a=r;for(;this.isBefore(a,o);)i.push(a),a=this.addYears(a,1);return i}}}const mie="yyyy-MM-dd HH:mm:ss";function gie(e,t){return e?(0,Gt.s3)(e)?e.pastDuration:function(e,t,n){return`${$r(e.start,t,n)} - ${$r(e.end,t,n)}`}(e,mie,t):"Custom Time Range"}const vie=e=>{let{initialTimeRange:t,onChange:n,onCancel:r}=e;const{formatWithUserTimeZone:i}=Xr(),[s,u]=(0,d.useState)(t),[c,h]=(0,d.useState)({start:i(t.start,mie),end:i(t.end,mie)}),[p,f]=(0,d.useState)(!0),m=(e,t)=>{const n="string"==typeof e,r=n?e:i(e,mie);h((e=>({...e,[t]:r}))),n||u((n=>({...n,[t]:e})))},g=e=>{m(e,"start")},v=e=>{m(e,"end")},y=()=>{const e={start:new Date(c.start),end:new Date(c.end)};var t,n;if(n=e.end,er(t=e.start)&&er(n)?!!fre(t,n)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return u(e),e};return(0,o.jsx)(W6,{dateAdapter:fie,children:(0,o.jsxs)(l.Z,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[p&&(0,o.jsxs)(to.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(ku.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,o.jsx)(Tte,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:t.start,onChange:e=>{null!==e&&g(e)},onAccept:()=>{f(!1)}})]}),!p&&(0,o.jsxs)(to.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(ku.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,o.jsx)(Tte,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:t.end,minDateTime:s.start,onChange:e=>{null!==e&&v(e)},onAccept:e=>{null!==e&&(f(!0),v(e))}})]}),(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,o.jsx)(s$.ErrorBoundary,{FallbackComponent:a$,children:(0,o.jsx)(Une,{label:"Start Time",value:new Date(c.start),onChange:e=>{e&&g(e)},onBlur:()=>y(),format:mie})}),(0,o.jsx)(s$.ErrorBoundary,{FallbackComponent:a$,children:(0,o.jsx)(Une,{label:"End Time",value:new Date(c.end),onChange:e=>{e&&v(e)},onBlur:()=>y(),format:mie})})]}),(0,o.jsxs)(l.Z,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,o.jsx)(a.Z,{variant:"contained",onClick:()=>(()=>{const e=y();e&&n(e)})(),fullWidth:!0,children:"Apply"}),(0,o.jsx)(a.Z,{variant:"outlined",onClick:()=>r(),fullWidth:!0,children:"Cancel"})]})]})})};function yie(e){let{value:t,timeOptions:n,onChange:r,height:i,showCustomTimeRange:a=!0}=e;const{timeZone:s}=Xr(),l=(0,d.useRef)(),[u,c]=(0,d.useState)(!1),h=(0,d.useMemo)((()=>(0,Gt.s3)(t)?(0,Gt.sG)(t):t),[t]),p=(0,d.useMemo)((()=>function(e,t){return{value:e,display:gie(e,t)}}((0,Gt.s3)(t)?void 0:t,s)),[t,s]),[f,m]=(0,d.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K.ZP,{anchorEl:l.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:u,onClose:()=>c(!1),sx:e=>({padding:e.spacing(2)}),children:(0,o.jsx)(vie,{initialTimeRange:h,onChange:e=>{r(e),c(!1),m(!1)},onCancel:()=>c(!1)})}),(0,o.jsx)(to.Z,{ref:l,children:(0,o.jsxs)(z6.Z,{open:f,value:gie(t,s),onClick:()=>m(!f),IconComponent:B6.default,inputProps:{"aria-label":`Select time range. Currently set to ${t}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[n.map(((e,t)=>(0,o.jsx)(ah.Z,{value:gie(e.value,s),onClick:()=>{r(e.value)},children:e.display},t))),a&&(0,o.jsx)(ah.Z,{value:gie(p.value,s),onClick:()=>c(!0),children:p.display})]})})]})}function bie(e){const{markerColor:t,sx:n}=e;return(0,o.jsx)(to.Z,{sx:gn({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function xie(e){const{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,o.jsxs)(l.Z,{spacing:.5,children:[(0,o.jsxs)(to.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,o.jsx)(bie,{markerColor:n,sx:{marginTop:.25}}),(0,o.jsxs)(to.Z,{component:"span",children:[r,(0,o.jsx)(to.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,o.jsx)(c$.Z,{sx:e=>({borderColor:e.palette.grey[500]})}),(0,o.jsx)(to.Z,{sx:e=>({color:e.palette.common.white}),children:i.map((e=>{if(e){const[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,o.jsxs)(to.Z,{sx:{display:"flex",gap:"4px"},children:[(0,o.jsx)(ku.Z,{sx:{fontSize:"11px"},children:r}),(0,o.jsx)(ku.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}}))})]})}const wie=375,Sie=650,Cie=650,kie=Sie-150,Mie=.75,_ie=8,Tie=750,Pie="nearby series showing in tooltip",Iie="emphasized series showing as bold in tooltip",Rie="#2E313E",Die=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),Oie={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},Aie=[],Eie=()=>{const[e,t]=(0,d.useState)(null);return(0,d.useEffect)((()=>{const e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}}),[]),e},Zie={wrapLabels:!0,enablePinning:!0},Lie="Click chart to pin",Fie="Click chart to unpin";function jie(e){const{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:a=!1,wrapLabels:s=!0}=e,l=t.split("{"),u=(l[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&u.length>1){const e=l[0]?`${l[0]}:`:"value:";return(0,o.jsx)(xie,{formattedY:n,metricName:e,metricLabels:u,markerColor:r})}const c=t.replace(/[,]/g,", ");return(0,o.jsxs)(to.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,o.jsxs)(to.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,o.jsx)(bie,{markerColor:r,sx:{marginTop:.5}}),(0,o.jsx)(to.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:kie,overflow:"hidden",color:e.palette.common.white,fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:s?"normal":"nowrap"}),"aria-label":a?Iie:Pie,children:c})]}),(0,o.jsx)(to.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}var Nie=n(87391),zie=n(70339);function Bie(e,t,n,r,o){if(null===e)return;if(null!==t&&(e=t),void 0===e.plotCanvas.x)return;let i=e.page.x+32,a=e.page.y+16;if(o){const e=o.getBoundingClientRect();i=i-e.left+o.scrollLeft,a=a-e.top+o.scrollTop;const t=e.top+o.scrollHeight;a+n>t&&(a=Math.max(t-n-16,_ie/2))}else a+n>window.innerHeight+window.scrollY&&(a=Math.max(window.innerHeight+window.scrollY-n-16,_ie/2));return i+r>window.innerWidth&&(i=e.page.x-r-32),i<32&&(i=32),a<_ie/2&&(a=_ie/2),`translate3d(${i}px, ${a}px, 0)`}function Vie(e,t,n){var r;return{minWidth:wie,maxWidth:Sie,maxHeight:(n?n-_ie:void 0)??Cie,padding:0,position:"absolute",top:0,left:0,backgroundColor:(null===(r=e.palette.designSystem)||void 0===r?void 0:r.grey[800])??Rie,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}const Hie=5.5,$ie=30,Wie=5;function Gie(e,t,n,r,o,i){var a;const s=[],l=n[0]??null,u=n[1]??null;if(null===l||null===u)return s;if(void 0===o.dispatchAction)return s;if(!Array.isArray(e))return s;const c=[],d=[],h=[],p=[],f=[],m=e.length,g=new Map,v=fn(null===(a=e[0])||void 0===a?void 0:a.values,l);if(null===v)return Aie;for(let n=0;n0?e[n]:null;if(!l)break;const y=l.values;if(void 0===y||!Array.isArray(y))break;const b=a,x=b.name?b.name.toString():"",w=b.color??"#000";if(Array.isArray(e))for(let e=0;e=l-r){const t=m>Wie?2:5,r=Yie({valueToCheck:u,baseValue:l,percentage:Math.max(t,100/m)});if(r){d.push(n);const t=g.get(l)??0;g.set(l,t+1),t>0&&f.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:l}),p.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:l})}else h.push(n),o.dispatchAction({type:"downplay",seriesIndex:n});const y=(0,Bt.Bw)(l,i);s.push({seriesIdx:n,datumIdx:e,seriesName:x,date:v,x:a,y:l,formattedY:y,markerColor:w.toString(),isClosestToCursor:r}),c.push(n)}}}return hn(o,c,d,h,p,f),s}function Uie(e,t,n,r,o){const i=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return i;const l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t=Ht)break;const p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let m=0;m=v-n){const e=d>Wie?2:5,n=Yie({valueToCheck:s,baseValue:v,percentage:Math.max(e,100/d)});n?u.push(t):(c.push(t),void 0!==(null==r?void 0:r.dispatchAction)&&r.dispatchAction({type:"downplay",seriesIndex:t}));const a=g>99999999999?g:1e3*g,h=(0,Bt.Bw)(v,o);i.push({seriesIdx:t,datumIdx:m,seriesName:p,date:a,x:g,y:v,formattedY:h,markerColor:f.toString(),isClosestToCursor:n}),l.push(t)}}}return void 0!==(null==r?void 0:r.dispatchAction)&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),i}function qie(e){let{mousePos:t,pinnedPos:n,data:r,seriesMapping:o,chart:i,format:a,showAllSeries:s=!1}=e;if(void 0===i||null===t)return Aie;let l=!1;if(null!==t.target){const e=t.target.parentElement;if(null!==e){const t=e.parentElement;if(null!==t){i.getDom()===t&&(l=!0)}}}if(null!==n&&(t=n,l=!0),!1===l||null===r||void 0===i._model)return Aie;if(void 0===t.plotCanvas.x||void 0===t.plotCanvas.y)return Aie;const u=dn(t.plotCanvas.x,t.plotCanvas.y,i);if(null!==u){return Gie(r,o,u,Xie({yInterval:i._model.getComponent("yAxis").axis.scale._interval,totalSeries:r.length,showAllSeries:s}),i,a)}return Aie}function Kie(e){let{mousePos:t,pinnedPos:n,chartData:r,chart:o,format:i,showAllSeries:a=!1}=e;if(void 0===o||null===t)return[];let s=!1;if(null!==t.target){const e=t.target.parentElement;if(null!==e){const t=e.parentElement;if(null!==t){o.getDom()===t&&(s=!0)}}}if(null!==n&&(t=n,s=!0),!1===s)return[];if(void 0===o._model)return[];const l=Xie({yInterval:o._model.getComponent("yAxis").axis.scale._interval,totalSeries:r.timeSeries.length,showAllSeries:a}),u=[t.plotCanvas.x??0,t.plotCanvas.y??0];if(o.containPixel("grid",u)){const e=o.convertFromPixel("grid",u);if(void 0!==e[0]&&void 0!==e[1])return Uie(r,e,l,o,i)}return[]}function Yie(e){let{valueToCheck:t,baseValue:n,percentage:r}=e;const o=r/100*n;return t>=n-o&&t<=n+o}function Xie(e){let{yInterval:t,totalSeries:n,showAllSeries:r=!1}=e;if(r)return 10*t;const o=.3*t;if(n>Wie){const e=t*$ie/n;return Math.max(o,e)}return Math.max(o,t*Hie)}var Qie=n(31052),Jie=n(64255),eae=n(82609);const tae=(0,d.memo)((function(e){let{nearbySeries:t,totalSeries:n,isTooltipPinned:r,showAllSeries:i,enablePinning:a=!0,onShowAllClick:s,onUnpinClick:u}=e;var c;const d=(null===(c=t[0])||void 0===c?void 0:c.date)??null;if(null===d)return null;const h=a&&n>5,p=r?Fie:Lie;return(0,o.jsxs)(to.Z,{sx:e=>{var t;return{width:"100%",maxWidth:Sie,padding:e.spacing(1.5,2,.5,2),backgroundColor:(null===(t=e.palette.designSystem)||void 0===t?void 0:t.grey[800])??Rie,position:"sticky",top:0,left:0}},children:[(0,o.jsxs)(to.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{const{formattedTime:t,formattedDate:n}=Gr(e);return(0,o.jsxs)(to.Z,{children:[(0,o.jsx)(ku.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,o.jsx)(ku.Z,{variant:"caption",children:(0,o.jsx)("strong",{children:t})})]})})(d),(0,o.jsxs)(l.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[h&&(0,o.jsxs)(l.Z,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,o.jsx)(ku.Z,{sx:{fontSize:11},children:"Show All"}),(0,o.jsx)(Qie.Z,{checked:i,size:"small",onChange:(e,t)=>{if(void 0!==s)return s(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),a&&(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)(ku.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:p}),r?(0,o.jsx)(Jie.default,{onClick:()=>{void 0!==u&&u()},sx:{fontSize:16,cursor:"pointer"}}):(0,o.jsx)(eae.default,{sx:{fontSize:16}})]})]})]}),(0,o.jsx)(c$.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey[500]})})]})}));function nae(e){const{series:t,wrapLabels:n}=e,r=(0,d.useMemo)((()=>null===t?null:t.sort(((e,t)=>e.y>t.y?-1:1))),[t]);return null===t||null===r?null:(0,o.jsx)(to.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map((e=>{let{datumIdx:t,seriesIdx:i,seriesName:a,y:s,formattedY:l,markerColor:u,isClosestToCursor:c}=e;if(null===t||null===i)return null;const d=i.toString()+t.toString();return(0,o.jsx)(jie,{seriesName:a,y:s,formattedY:l,markerColor:u,totalSeries:r.length,wrapLabels:n,emphasizeText:c},d)}))})}const rae=(0,d.memo)((function(e){let{containerId:t,chartRef:n,data:r,seriesMapping:i,enablePinning:a=!0,wrapLabels:s,format:u,onUnpinClick:c,pinnedPos:h}=e;const[p,f]=(0,d.useState)(!1),m=(0,d.useRef)(),g=Eie(),{height:v,width:y,ref:b}=(0,zie.default)(),x=null!==h&&a;if(null===g||null===g.target||null===r)return null;if(null===h&&"CANVAS"!==g.target.tagName)return null;const w=n.current,S=t?document.querySelector(t):void 0,C=S?S.getBoundingClientRect().height:void 0;m.current=Bie(g,h,v??0,y??0,S);const k=qie({mousePos:g,data:r,seriesMapping:i,pinnedPos:h,chart:w,format:u,showAllSeries:p});if(0===k.length)return null;const M=r.length;return(0,o.jsx)(Nie.Z,{container:S,children:(0,o.jsx)(to.Z,{ref:b,sx:e=>Vie(e,h,C),style:{transform:m.current},children:(0,o.jsxs)(l.Z,{spacing:.5,children:[(0,o.jsx)(tae,{nearbySeries:k,totalSeries:M,enablePinning:a,isTooltipPinned:x,showAllSeries:p,onShowAllClick:e=>f(e),onUnpinClick:c}),(0,o.jsx)(nae,{series:k,wrapLabels:s})]})})})}));function oae(e,t){return(0,o.jsx)(iae,{ref:t,variant:"outlined",color:"secondary",...e})}const iae=(0,Y.ZP)(a.Z)((e=>{let{theme:t}=e;return{padding:t.spacing(.5),minWidth:"auto"}})),aae=(0,d.forwardRef)(oae);var sae=n(70609);const lae=Object.entries(Bt.Bl).map((e=>{let[t,n]=e;return{id:t,...n}})).filter((e=>!e.disableSelectorOption)),uae=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function cae(e){let{value:t,onChange:n,disabled:r=!1}=e;const i=(0,Bt.__)(t),a=(0,Bt.Fp)(t),s=e=>{let{decimalPlaces:r}=e;i&&n({...t,decimalPlaces:r})},l=Bt.Bl[t.unit];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Vc,{label:"Short values",control:(0,o.jsx)(Qie.Z,{checked:!!a&&(0,sae.lk)(t.shortValues),onChange:(e,r)=>{a&&n({...t,shortValues:r})},disabled:!a})}),(0,o.jsx)(Vc,{label:"Unit",control:(0,o.jsx)(Uc,{value:{id:t.unit,...l},options:lae,groupBy:e=>e.group,onChange:(e,t)=>{n({unit:t.id})},disableClearable:!0,disabled:r})}),(0,o.jsx)(Vc,{label:"Decimals",control:(0,o.jsx)(Uc,{value:(u=t.decimalPlaces,uae.find((e=>e.decimalPlaces===u))),options:uae,getOptionLabel:e=>e.label,onChange:(e,t)=>s(t),disabled:!i,disableClearable:!0})})]});var u}function dae(e){let{name:t,height:n}=e;return(0,o.jsx)(to.Z,{style:{maxWidth:n,top:`calc(${n}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,o.jsx)(ku.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t})})}var hae=n(3254);const pae=qr((0,hae.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),fae={chartsTheme:pae,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null};var mae=n(59685),gae=n(11769);const vae={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:e=>{let{theme:t}=e;return"dark"===t.palette.mode?{...t.typography.body1,backgroundColor:t.palette.error.dark,color:t.palette.error.light,[`&\t.${mae.Z.icon}`]:{color:t.palette.error.main}}:{...t.typography.body1,backgroundColor:t.palette.error.light,color:t.palette.error.dark,[`&\t.${mae.Z.icon}`]:{color:t.palette.error.main}}},standardInfo:e=>{let{theme:t}=e;return"dark"===t.palette.mode?{...t.typography.body1,backgroundColor:t.palette.info.dark,color:t.palette.info.light,[`&\t.${mae.Z.icon}`]:{color:t.palette.info.main}}:{...t.typography.body1,backgroundColor:t.palette.info.light,color:t.palette.info.dark,[`&\t.${mae.Z.icon}`]:{color:t.palette.info.main}}},standardSuccess:e=>{let{theme:t}=e;return"dark"===t.palette.mode?{...t.typography.body1,backgroundColor:t.palette.success.dark,color:t.palette.success.light,[`&\t.${mae.Z.icon}`]:{color:t.palette.success.main}}:{...t.typography.body1,backgroundColor:t.palette.success.light,color:t.palette.success.dark,[`&\t.${mae.Z.icon}`]:{color:t.palette.success.main}}},standardWarning:e=>{let{theme:t}=e;return"dark"===t.palette.mode?{...t.typography.body1,backgroundColor:t.palette.warning.dark,color:t.palette.warning.light,[`&\t.${mae.Z.icon}`]:{color:t.palette.warning.main}}:{...t.typography.body1,backgroundColor:t.palette.warning.light,color:t.palette.warning.dark,[`&\t.${mae.Z.icon}`]:{color:t.palette.warning.main}}},root:{["& ."+gae.Z.root]:{textDecoration:"underline"}}}},yae={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},bae={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},xae="#FFFFFF",wae="#000000",Sae=e=>{const t=yae[800],n=yae[300];return"light"===e?{navigation:t,accent:n,primary:yae[800],secondary:yae[700],disabled:yae[300],link:bae[500],linkHover:bae[600]}:{navigation:t,accent:n,primary:xae,secondary:yae[50],disabled:yae[600],link:bae[400],linkHover:bae[500]}},Cae=e=>{const t=bae[150],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:xae,paper:yae[50],code:yae[50],tooltip:yae[100],lighter:yae[50],border:yae[100]}:{navigation:t,overlay:n,default:yae[900],paper:yae[850],code:yae[800],tooltip:yae[600],lighter:yae[700],border:yae[600]}},kae=e=>"light"===e?{50:yae[50],100:yae[100],200:yae[200],300:yae[300],400:yae[400],500:yae[500],600:yae[600],700:yae[700],800:yae[800],900:yae[900],950:yae[950]}:{50:yae[950],100:yae[900],200:yae[800],300:yae[700],400:yae[600],500:yae[500],600:yae[400],700:yae[300],800:yae[200],900:yae[100],950:yae[50]},Mae=e=>"light"===e?{main:bae[500],dark:bae[600],light:bae[50]}:{main:bae[400],dark:bae[800],light:bae[200]},_ae=e=>"light"===e?{main:yae[600],dark:yae[900],light:yae[100]}:{main:xae,dark:xae,light:xae},Tae={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},Pae={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},Iae={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},Rae={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},Dae=e=>"light"===e?{main:Rae[500],dark:Rae[600],light:Rae[50]}:{main:Rae[400],dark:Rae[800],light:Rae[300]},Oae=e=>"light"===e?{main:Tae[500],dark:Tae[700],light:Tae[50]}:{main:Tae[400],dark:Tae[800],light:Tae[300]},Aae=e=>"light"===e?{main:Pae[500],dark:Pae[700],light:Pae[50]}:{main:Pae[400],dark:Pae[800],light:Pae[300]};function Eae(e){return{mode:e,primary:Mae(e),secondary:_ae(e),grey:kae(e),background:Cae(e),text:Sae(e),error:Dae(e),warning:Aae(e),info:Mae(e),success:Oae(e),common:{white:xae,black:wae},designSystem:{blue:bae,green:Tae,grey:yae,orange:Pae,purple:Iae,red:Rae}}}n(21998),n(82216),n(90143),n(73057);const Zae=400,Lae=700,Fae={fontFamily:'"Lato", sans-serif',fontWeightLight:300,fontWeightRegular:Zae,fontWeightMedium:Lae,fontWeightBold:900,h1:{fontSize:"1.5rem",fontWeight:Lae,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:Lae,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:Lae,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:Lae,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:Zae,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:Zae,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:Zae,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:Lae,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:Lae,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:Zae,lineHeight:"16px"}},jae=e=>{let{theme:t}=e;return{..."light"===t.palette.mode?{}:{backgroundImage:"unset",backgroundColor:t.palette.designSystem.grey[800]}}};function Nae(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,hae.Z)({palette:Eae(e),typography:Fae,mixins:{},components:zae,...t})}const zae={MuiAlert:vae,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:e=>{let{theme:t}=e;return{backgroundColor:t.palette.background.default}}}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:jae}},MuiDialog:{styleOverrides:{paper:jae}},MuiPopover:{styleOverrides:{paper:jae}}};var Bae=n(56124),Vae=n(46292),Hae=n(47903),$ae=n(18978),Wae=n(64248);function Gae(e){let{value:t,onChange:n}=e;return(0,o.jsxs)(l.Z,{direction:"row",children:[(0,o.jsx)(Wc.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:t.spec.columns??[],renderInput:e=>(0,o.jsx)(c.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(e,r)=>{n({...t,spec:{...t.spec,columns:r}})}}),(0,o.jsx)(i6.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Qie.Z,{value:!t.spec.disabled,checked:!t.spec.disabled,onChange:e=>n({...t,spec:{...t.spec,disabled:!e.target.checked}})})})]})}function Uae(e){let{value:t,onChange:n}=e;return(0,o.jsxs)(l.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(Wc.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:t.spec.columns??[],renderInput:e=>(0,o.jsx)(c.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(e,r)=>{n({...t,spec:{...t.spec,columns:r}})}}),(0,o.jsx)(Sc,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:t.spec.name??"",sx:{width:"100%"},onChange:e=>{n({...t,spec:{...t.spec,name:e}})},required:!0}),(0,o.jsx)(i6.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Qie.Z,{value:!t.spec.disabled,checked:!t.spec.disabled,onChange:e=>n({...t,spec:{...t.spec,disabled:!e.target.checked}})})})]})}function qae(e){let{value:t,onChange:n}=e;return(0,o.jsxs)(l.Z,{direction:"row",children:[(0,o.jsx)(Sc,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:t.spec.column??"",sx:{width:"100%"},onChange:e=>{n({...t,spec:{...t.spec,column:e}})},required:!0}),(0,o.jsx)(i6.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Qie.Z,{value:!t.spec.disabled,checked:!t.spec.disabled,onChange:e=>n({...t,spec:{...t.spec,disabled:!e.target.checked}})})})]})}function Kae(e){let{value:t,onChange:n}=e;return(0,o.jsx)(l.Z,{direction:"row",children:(0,o.jsx)(i6.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(Qie.Z,{value:!t.spec.disabled,checked:!t.spec.disabled,onChange:e=>n({...t,spec:{...t.spec,disabled:!e.target.checked}})})})})}function Yae(e){let{value:t,onChange:n,...r}=e;return(0,o.jsxs)(l.Z,{gap:2,sx:{width:"100%"},mt:1,...r,children:[(0,o.jsxs)(Sc,{select:!0,label:"Kind",value:t.kind,onChange:e=>n({...t,kind:e}),children:[(0,o.jsx)(ah.Z,{value:"JoinByColumnValue",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Join by column value"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,o.jsx)(ah.Z,{value:"MergeColumns",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Merge columns"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,o.jsx)(ah.Z,{value:"MergeIndexedColumns",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Merge indexed columns"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,o.jsx)(ah.Z,{value:"MergeSeries",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Merge series"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===t.kind&&(0,o.jsx)(Gae,{value:t,onChange:n}),"MergeColumns"===t.kind&&(0,o.jsx)(Uae,{value:t,onChange:n}),"MergeIndexedColumns"===t.kind&&(0,o.jsx)(qae,{value:t,onChange:n}),"MergeSeries"===t.kind&&(0,o.jsx)(Kae,{value:t,onChange:n})]})}function Xae(e){let{index:t,value:n,isCollapsed:r,onChange:i,onCollapse:a,onDelete:s,...c}=e;var d,h;return(0,o.jsxs)(l.Z,{...c,children:[(0,o.jsxs)(l.Z,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,o.jsxs)(l.Z,{direction:"row",gap:1,children:[(0,o.jsx)(u.Z,{"data-testid":`transform-toggle#${t}`,size:"small",onClick:()=>a(!r),children:r?(0,o.jsx)(Bae.default,{}):(0,o.jsx)(Vae.default,{})}),(0,o.jsx)(ku.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:n.kind?(0,o.jsx)("span",{children:(0,o.jsx)("strong",{children:Wae.R[n.kind]})}):(0,o.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,o.jsxs)(l.Z,{direction:"row",gap:1,children:[r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fc.Z,{title:(null===(d=n.spec)||void 0===d?void 0:d.disabled)?"Enable transformation":"Disable transformation",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){var e;i({...n,spec:{...n.spec,disabled:!(null===(e=n.spec)||void 0===e?void 0:e.disabled)}})},children:(null===(h=n.spec)||void 0===h?void 0:h.disabled)?(0,o.jsx)(Hae.default,{}):(0,o.jsx)($ae.default,{})})}),(0,o.jsx)(c$.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,o.jsx)(Fc.Z,{title:"Remove transformation",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:s,children:(0,o.jsx)(Z6.default,{})})})]})]}),!r&&(0,o.jsx)(Yae,{value:n,onChange:i})]})}function Qae(e){let{value:t,onChange:n,...r}=e;const[i,s]=(0,d.useState)(t.map((()=>!0)));return(0,o.jsxs)(l.Z,{gap:1,...r,children:[t.map(((e,r)=>(0,o.jsx)(Xae,{index:r,value:e,isCollapsed:i[r]??!0,onChange:e=>function(e,r){const o=[...t];o[e]=r,n(o)}(r,e),onDelete:()=>function(e){const r=[...t];r.splice(e,1),n(r),s((t=>(t.splice(e,1),[...t])))}(r),onCollapse:e=>function(e,t){s((n=>(n[e]=t,[...n])))}(r,e)},r))),(0,o.jsx)(a.Z,{variant:"contained",startIcon:(0,o.jsx)(s6.default,{}),sx:{marginTop:1},onClick:function(){const e=[...t];e.push({kind:"",spec:{}}),n(e),s((e=>(e.push(!1),[...e])))},children:"Add Transformation"})]})}function Jae(e){const{value:t,onChange:n,timeOptions:r,height:i}=e,a=t,s=(0,d.useMemo)((()=>{if(t&&!r.some((e=>e.value.pastDuration===t)))return(0,o.jsx)(ah.Z,{value:t,children:t})}),[r,t]);return(0,o.jsx)(Ec.Z,{children:(0,o.jsx)(to.Z,{children:(0,o.jsxs)(z6.Z,{id:"refreshInterval",value:a,onChange:e=>{const t=e.target.value;n(t)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${a}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map(((e,t)=>(0,o.jsx)(ah.Z,{value:e.value.pastDuration,children:e.display},t))),s]})})})}var ese=n(78374);const tse=e=>{let{mapping:t,onChange:n,...r}=e;switch(t.kind){case"Value":var i;return(0,o.jsx)(l.Z,{gap:1,direction:"row",...r,children:(0,o.jsx)(c.Z,{label:"Value",placeholder:"Exact value",value:(null===(i=t.spec)||void 0===i?void 0:i.value)??"",onChange:e=>n({...t,spec:{...t.spec,value:e.target.value}}),fullWidth:!0})});case"Range":var a,s;return(0,o.jsxs)(l.Z,{gap:1,direction:"row",...r,children:[(0,o.jsx)(c.Z,{label:"From",placeholder:"Start of range",value:(null===(a=t.spec)||void 0===a?void 0:a.from)??"",onChange:e=>n({...t,spec:{...t.spec,from:""===e.target.value?void 0:+e.target.value}}),fullWidth:!0}),(0,o.jsx)(c.Z,{label:"To",placeholder:"End of range (inclusive)",value:(null===(s=t.spec)||void 0===s?void 0:s.to)??"",onChange:e=>n({...t,spec:{...t.spec,to:""===e.target.value?void 0:+e.target.value}}),fullWidth:!0})]});case"Regex":var u;return(0,o.jsx)(l.Z,{gap:1,direction:"row",...r,children:(0,o.jsx)(c.Z,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:(null===(u=t.spec)||void 0===u?void 0:u.pattern)??"",onChange:e=>n({...t,spec:{...t.spec,pattern:e.target.value}}),fullWidth:!0})});case"Misc":var d;return(0,o.jsx)(l.Z,{gap:1,direction:"row",...r,children:(0,o.jsxs)(c.Z,{select:!0,label:"Value",value:(null===(d=t.spec)||void 0===d?void 0:d.value)??"",onChange:e=>n({...t,spec:{value:e.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,o.jsx)(ah.Z,{value:"empty",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Empty"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,o.jsx)(ah.Z,{value:"null",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Null"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,o.jsx)(ah.Z,{value:"NaN",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"NaN"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,o.jsx)(ah.Z,{value:"true",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"True"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,o.jsx)(ah.Z,{value:"false",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"False"}),(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},nse=e=>{let{mapping:t,onChange:n,onDelete:r,...i}=e;var a,s,d,h;const p=e=>{n({...t,spec:{...t.spec,result:{...t.spec.result,color:e}}})};return(0,o.jsxs)(ese.Z,{container:!0,spacing:2,...i,children:[(0,o.jsx)(ese.Z,{size:{xs:5},children:(0,o.jsxs)(l.Z,{direction:"row",gap:1,width:"100%",children:[(0,o.jsxs)(c.Z,{select:!0,label:"Type",value:t.kind,onChange:e=>n({...t,kind:e.target.value}),required:!0,sx:{width:"120px"},children:[(0,o.jsx)(ah.Z,{value:"Value",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Value"}),"Value"!==t.kind&&(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,o.jsx)(ah.Z,{value:"Range",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Range"}),"Range"!==t.kind&&(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,o.jsx)(ah.Z,{value:"Regex",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Regex"}),"Regex"!==t.kind&&(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,o.jsx)(ah.Z,{value:"Misc",children:(0,o.jsxs)(l.Z,{children:[(0,o.jsx)(ku.Z,{children:"Misc"}),"Misc"!==t.kind&&(0,o.jsx)(ku.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,o.jsx)(tse,{width:"100%",mapping:t,onChange:e=>n({...t,...e})})]})}),(0,o.jsx)(ese.Z,{size:{xs:4},children:(0,o.jsx)(c.Z,{label:"Display text",value:(null===(s=t.spec)||void 0===s||null===(a=s.result)||void 0===a?void 0:a.value)??"",onChange:e=>{var r;return n({...t,spec:{...t.spec,result:{...null===(r=t.spec)||void 0===r?void 0:r.result,value:e.target.value}}})},fullWidth:!0})}),(0,o.jsx)(ese.Z,{size:{xs:1},children:(0,o.jsx)(l.Z,{direction:"row",justifyContent:"center",gap:1,children:(null===(h=t.spec)||void 0===h||null===(d=h.result)||void 0===d?void 0:d.color)?(0,o.jsx)(Qr,{label:"Color",color:t.spec.result.color??"#000",onColorChange:p,onClear:()=>p(void 0)}):(0,o.jsx)(u.Z,{onClick:()=>p("#000"),children:(0,o.jsx)(s6.default,{})})})}),(0,o.jsx)(ese.Z,{size:{xs:1},textAlign:"end",children:(0,o.jsx)(Fc.Z,{title:"Remove mapping settings",placement:"top",children:(0,o.jsx)(u.Z,{size:"small",sx:{marginLeft:"auto"},onClick:r,children:(0,o.jsx)(Z6.default,{})})})})]})},rse=e=>{let{mappings:t,onChange:n}=e;const[r,i]=(0,d.useState)(t);return(0,o.jsxs)(l.Z,{spacing:1,children:[(0,o.jsxs)(ese.Z,{container:!0,spacing:2,children:[(0,o.jsx)(ese.Z,{size:{xs:5},children:(0,o.jsx)(ku.Z,{variant:"subtitle1",children:"Condition"})}),(0,o.jsx)(ese.Z,{size:{xs:4},children:(0,o.jsx)(ku.Z,{variant:"subtitle1",children:"Display Text"})}),(0,o.jsx)(ese.Z,{size:{xs:1},textAlign:"center",children:(0,o.jsx)(ku.Z,{variant:"subtitle1",children:"Color"})}),(0,o.jsx)(ese.Z,{size:{xs:1}})]}),(0,o.jsx)(l.Z,{gap:1.5,divider:(0,o.jsx)(c$.Z,{flexItem:!0,orientation:"horizontal"}),children:r.map(((e,t)=>(0,o.jsx)(nse,{mapping:e,onChange:e=>function(e,t){const o=[...r];o[e]=t,i(o),n(o)}(t,e),onDelete:()=>function(e){const t=[...r];t.splice(e,1),i(t),n(t)}(t)},t)))}),(0,o.jsx)(a.Z,{variant:"contained",startIcon:(0,o.jsx)(s6.default,{}),sx:{marginTop:1},onClick:function(){const e=[...r];e.push({kind:"Value",spec:{result:{value:""}}}),i(e),n(e)},children:"Add value mappings"})]})}},83773:function(e,t,n){"use strict";n.d(t,{BL:()=>l,Jj:()=>c,Kd:()=>r,Ys:()=>o,bk:()=>d,dT:()=>h,kx:()=>s,qF:()=>i,vo:()=>a,zx:()=>u});const r=["bottom","right"],o=["list","table"],i=["small","medium"];function a(e){return r.includes(e)}function s(e){return o.includes(e)}function l(e){return i.includes(e)}const u={position:"bottom",mode:"list",size:"medium"};function c(e){return void 0===e?u.position:a(e)?e:u.position}function d(e){return e&&s(e)?e:u.mode}function h(e){return e&&l(e)?e:u.size}},5450:function(e,t,n){"use strict";function r(e){return"project"in e}function o(e){return"project"in e?e.project:void 0}n.d(t,{Z:()=>o,y:()=>r})},46310:function(e,t,n){"use strict";n.d(t,{T9:()=>y,YF:()=>T,oK:()=>S,sG:()=>v,s3:()=>m,Ib:()=>b,AO:()=>_,LU:()=>C,Gt:()=>w,q0:()=>g,fs:()=>x});var r=n(77145),o=n(96987);function i(e,t,n){return(0,o.E)(e,-t,n)}var a=n(95931);function s(e,t,n){return(0,a.z)(e,-t,n)}function l(e,t,n){const{years:o=0,months:a=0,weeks:l=0,days:u=0,hours:c=0,minutes:d=0,seconds:h=0}=t,p=i(s(e,a+12*o,n),u+7*l,n),f=1e3*(h+60*(d+60*c));return(0,r.L)((null==n?void 0:n.in)||e,+p-f)}const u=1e3,c=6e4,d=36e5,h=864e5,p=6048e5,f=31536e6;function m(e){return void 0!==e.pastDuration}function g(e){return void 0!==e.start&&void 0!==e.end}function v(e){const t=e.end??new Date;return{start:l(t,b(e.pastDuration)),end:t}}const y=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function b(e){const t=y.exec(e);if(null===t)throw new Error(`Invalid duration string '${e}'`);return{years:parseInt(t[1]??"0"),months:0,weeks:parseInt(t[2]??"0"),days:parseInt(t[3]??"0"),hours:parseInt(t[4]??"0"),minutes:parseInt(t[5]??"0"),seconds:parseInt(t[6]??"0")+parseInt(t[7]??"0")/1e3}}function x(e){return""!==e&&y.test(e)}function w(e){return S(e.end.valueOf()-e.start.valueOf())}function S(e){const t=Math.trunc(e/f);t>0&&(e-=t*f);const n=Math.trunc(e/p);n>0&&(e-=n*p);const r=Math.trunc(e/h);r>0&&(e-=r*h);const o=Math.trunc(e/d);o>0&&(e-=o*d);const i=Math.trunc(e/c);return i>0&&(e-=i*c),{years:t,months:0,weeks:n,days:r,hours:o,minutes:i,seconds:e/1e3}}function C(e){const t=[];if(e.years&&t.push(`${e.years}y`),e.weeks&&t.push(`${e.weeks}w`),e.days&&t.push(`${e.days}d`),e.hours&&t.push(`${e.hours}h`),e.minutes&&t.push(`${e.minutes}m`),e.seconds){const n=Math.trunc(e.seconds);n&&t.push(`${n}s`);const r=Math.round(1e3*(e.seconds-n));r&&t.push(`${r}ms`)}return t.join("")}const k=15e3,M=[{maxMs:15,roundedStepMs:10,display:"0.01s"},{maxMs:35,roundedStepMs:20,display:"0.02s"},{maxMs:75,roundedStepMs:50,display:"0.05s"},{maxMs:150,roundedStepMs:100,display:"0.1s"},{maxMs:350,roundedStepMs:200,display:"0.2s"},{maxMs:750,roundedStepMs:500,display:"0.5s"},{maxMs:1500,roundedStepMs:u,display:"1s"},{maxMs:3500,roundedStepMs:2e3,display:"2s"},{maxMs:7500,roundedStepMs:5e3,display:"5s"},{maxMs:12500,roundedStepMs:1e4,display:"10s"},{maxMs:17500,roundedStepMs:15e3,display:"15s"},{maxMs:25e3,roundedStepMs:2e4,display:"20s"},{maxMs:45e3,roundedStepMs:3e4,display:"30s"},{maxMs:1.5*c,roundedStepMs:c,display:"1m"},{maxMs:3.5*c,roundedStepMs:2*c,display:"2m"},{maxMs:7.5*c,roundedStepMs:5*c,display:"5m"},{maxMs:12.5*c,roundedStepMs:10*c,display:"10m"},{maxMs:12.5*c,roundedStepMs:15*c,display:"15m"},{maxMs:25*c,roundedStepMs:20*c,display:"20m"},{maxMs:45*c,roundedStepMs:30*c,display:"30m"},{maxMs:1.5*d,roundedStepMs:d,display:"1h"},{maxMs:2.5*d,roundedStepMs:2*d,display:"2h"},{maxMs:4.5*d,roundedStepMs:3*d,display:"3h"},{maxMs:9*d,roundedStepMs:6*d,display:"6h"},{maxMs:h,roundedStepMs:12*d,display:"12h"},{maxMs:p,roundedStepMs:h,display:"1d"},{maxMs:3*p,roundedStepMs:p,display:"1w"},{maxMs:6*p,roundedStepMs:30*h,display:"30d"},{maxMs:2*f,roundedStepMs:f,display:"1y"}];function _(e){for(const{maxMs:t,roundedStepMs:n}of M)if(er});const r={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"}},50509:function(e,t,n){"use strict";n.d(t,{$:()=>r});const r=3},30092:function(e,t,n){"use strict";n.d(t,{Fc:()=>ye,PX:()=>ve,__:()=>xe,Ay:()=>Se,Yi:()=>me,hv:()=>pe,mb:()=>ge,Fp:()=>we,N9:()=>fe,Bl:()=>de,M$:()=>ce,Bw:()=>he,lO:()=>be});var r,o,i,a,s,l,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(){if(a)return i;a=1;const e=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function n(r,o,i,a,s,l,u){if(!isNaN(+r))return+r;let c="",d=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==r)return-1*n(d,o,i,a,s,l);for(let t=0;t{f[l[e]]=e}));let m=Object.keys(f).sort().reverse(),g=m.length;for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;if(""===e)return;if(e===a)return 0;let l=function(e,n,r){let o=e.replace(r,"");return o=o.replace(new RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2"),o=o.replace(n.decimal,"."),o}(e,r,o);return n(l,r,o,i,a,s)}return i={unformat:function(e,t){const n=g();let o,i=n.currentDelimiters(),a=n.currentCurrency().symbol,s=n.currentOrdinal(),l=n.getZeroFormat(),u=n.currentAbbreviations();if("string"==typeof e)o=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],o=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(o)&&!isNaN(i)}(e,i)?function(e){let t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(e):r(e,i,a,s,l,u);else{if("number"!=typeof e)return;o=e}if(void 0!==o)return o}}}function h(){if(l)return s;l=1;let e=d();const t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function o(t){return void 0!==e.unformat(t)}function i(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=Object.keys(e).map((o=>{if(!t[o])return console.error(`${r} Invalid key: ${o}`),!1;let a=e[o],s=t[o];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!i(a,n,`[Validate ${o}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${o} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n{let o=t[n];if("string"==typeof o&&(o={type:o}),o.mandatory){let t=o.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0}))),a.reduce(((e,t)=>e&&t),!0)}function a(e){return i(e,n,"[Validate format]")}return s={validate:function(e,t){let n=o(e),r=a(t);return n&&r},validateFormat:a,validateInput:o,validateLanguage:function(e){return i(e,r,"[Validate language]")}}}var p,f,m={parseFormat:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e=function(e,t){let n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e=function(e,t){let n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),t),t),function(e,t){let n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){let n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){let n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){let n=e.split(".")[1];if(n){let e=n.match(/0+/);e&&(t.mantissa=e[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){const n=e.split(".")[1];n&&(t.trimMantissa=-1!==n.indexOf("["))}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}};function g(){if(f)return p;f=1;const e=o?r:(o=1,r={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),t=h(),n=m;let i,a={},s={},l=null,u={};function c(e){i=e}function d(){return s[i]}return a.languages=()=>Object.assign({},s),a.currentLanguage=()=>i,a.currentBytes=()=>d().bytes||{},a.currentCurrency=()=>d().currency,a.currentAbbreviations=()=>d().abbreviations,a.currentDelimiters=()=>d().delimiters,a.currentOrdinal=()=>d().ordinal,a.currentDefaults=()=>Object.assign({},d().defaults,u),a.currentOrdinalDefaultFormat=()=>Object.assign({},a.currentDefaults(),d().ordinalFormat),a.currentByteDefaultFormat=()=>Object.assign({},a.currentDefaults(),d().byteFormat),a.currentPercentageDefaultFormat=()=>Object.assign({},a.currentDefaults(),d().percentageFormat),a.currentCurrencyDefaultFormat=()=>Object.assign({},a.currentDefaults(),d().currencyFormat),a.currentTimeDefaultFormat=()=>Object.assign({},a.currentDefaults(),d().timeFormat),a.setDefaults=e=>{e=n.parseFormat(e),t.validateFormat(e)&&(u=e)},a.getZeroFormat=()=>l,a.setZeroFormat=e=>l="string"==typeof e?e:null,a.hasZeroFormat=()=>null!==l,a.languageData=e=>{if(e){if(s[e])return s[e];throw new Error(`Unknown tag "${e}"`)}return d()},a.registerLanguage=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t.validateLanguage(e))throw new Error("Invalid language data");s[e.languageTag]=e,n&&c(e.languageTag)},a.setLanguage=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.languageTag;if(!s[t]){let e=t.split("-")[0],r=Object.keys(s).find((t=>t.split("-")[0]===e));return s[r]?void c(r):void c(n)}c(t)},a.registerLanguage(e),i=e.languageTag,p=a}function v(e,t){e.forEach((e=>{let n;try{n=function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}n&&t.registerLanguage(n)}))}var y,b={exports:{}};y=b,function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,o=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",s=1e14,l=14,u=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,h=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function f(e){for(var t,n,r=1,o=e.length,i=e[0]+"";ru^n?1:-1;for(s=(l=o.length)<(u=i.length)?l:u,a=0;ai[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function g(e,t,n,r){if(en||e!==o(e))throw Error(i+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return p(e.e/l)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else tF?m.c=m.e=null:e.e=10;d/=10,c++);return void(c>F?m.c=m.e=null:(m.e=c,m.c=[e]))}f=String(e)}else{if(!n.test(f=String(e)))return S(m,f,h);m.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(c=f.indexOf("."))>-1&&(f=f.replace(".","")),(d=f.search(/e/i))>0?(c<0&&(c=d),c+=+f.slice(d+1),f=f.substring(0,d)):c<0&&(c=f.length)}else{if(g(t,2,V.length,"Base"),10==t&&H)return q(m=new $(e),O+m.e+1,A);if(f=String(e),h="number"==typeof e){if(0*e!=0)return S(m,f,h,t);if(m.s=1/e<0?(f=f.slice(1),-1):1,$.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else m.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=V.slice(0,t),c=d=0,p=f.length;dc){c=p;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,d=-1,c=0;continue}return S(m,String(e),h,t)}h=!1,(c=(f=w(f,t,10,m.s)).indexOf("."))>-1?f=f.replace(".",""):c=f.length}for(d=0;48===f.charCodeAt(d);d++);for(p=f.length;48===f.charCodeAt(--p););if(f=f.slice(d,++p)){if(p-=d,h&&$.DEBUG&&p>15&&(e>u||e!==o(e)))throw Error(a+m.s*e);if((c=c-d-1)>F)m.c=m.e=null;else if(c=Z)?b(l,a):x(l,a,"0");else if(i=(e=q(new $(e),t,n)).e,s=(l=f(e.c)).length,1==r||2==r&&(t<=i||i<=E)){for(;ss){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=i-s)>0)for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&o?"-"+l:l}function G(e,t){for(var n,r,o=1,i=new $(e[0]);o=10;o/=10,r++);return(n=r+n*l-1)>F?e.c=e.e=null:n=10;h/=10,a++);if((u=t-a)<0)u+=l,d=t,p=g[f=0],m=o(p/v[a-d-1]%10);else if((f=r((u+1)/l))>=g.length){if(!i)break e;for(;g.length<=f;g.push(0));p=m=0,a=1,d=(u%=l)-l+1}else{for(p=h=g[f],a=1;h>=10;h/=10,a++);m=(d=(u%=l)-l+a)<0?0:o(p/v[a-d-1]%10)}if(i=i||t<0||null!=g[f+1]||(d<0?p:p%v[a-d-1]),i=n<4?(m||i)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||i||6==n&&(u>0?d>0?p/v[a-d]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,i?(t-=e.e+1,g[0]=v[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==u?(g.length=f,h=1,f--):(g.length=f+1,h=v[l-u],g[f]=d>0?o(p/v[a-d]%v[d])*h:0),i)for(;;){if(0==f){for(u=1,d=g[0];d>=10;d/=10,u++);for(d=g[0]+=h,h=1;d>=10;d/=10,h++);u!=h&&(e.e++,g[0]==s&&(g[0]=1));break}if(g[f]+=h,g[f]!=s)break;g[f--]=0,h=1}for(u=g.length;0===g[--u];g.pop());}e.e>F?e.c=e.e=null:e.e=Z?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(n=e[t],0,h,t),O=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(n=e[t],0,8,t),A=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(g(n[0],-h,0,t),g(n[1],0,h,t),E=n[0],Z=n[1]):(g(n,-h,h,t),E=-(Z=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)g(n[0],-h,-1,t),g(n[1],1,h,t),L=n[0],F=n[1];else{if(g(n,-h,h,t),!n)throw Error(i+t+" cannot be zero: "+n);L=-(F=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(i+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!n,Error(i+"crypto unavailable");j=n}else j=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(n=e[t],0,9,t),N=n),e.hasOwnProperty(t="POW_PRECISION")&&(g(n=e[t],0,h,t),z=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(i+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(i+t+" invalid: "+n);H="0123456789"==n.slice(0,10),V=n}}return{DECIMAL_PLACES:O,ROUNDING_MODE:A,EXPONENTIAL_AT:[E,Z],RANGE:[L,F],CRYPTO:j,MODULO_MODE:N,POW_PRECISION:z,FORMAT:B,ALPHABET:V}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,n,r=e.c,a=e.e,u=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===u||-1===u)&&a>=-h&&a<=h&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%l)<1&&(t+=l),String(r[0]).length==t){for(t=0;t=s||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===u||1===u||-1===u))return!0;throw Error(i+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,-1)},$.minimum=$.min=function(){return G(arguments,1)},$.random=(C=9007199254740992,k=Math.random()*C&2097151?function(){return o(Math.random()*C)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,a,s,u,d=0,p=[],f=new $(D);if(null==e?e=O:g(e,0,h),s=r(e/l),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));d>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[d]=n[0],t[d+1]=n[1]):(p.push(u%1e14),d+=2);d=s/2}else{if(!crypto.randomBytes)throw j=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(s*=7);d=9e15?crypto.randomBytes(7).copy(t,d):(p.push(u%1e14),d+=7);d=s/7}if(!j)for(;d=10;u/=10,d++);dn-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(n,r,o,i,a){var s,l,u,c,d,h,p,m,g=n.indexOf("."),v=O,b=A;for(g>=0&&(c=z,z=0,n=n.replace(".",""),h=(m=new $(r)).pow(n.length-g),z=c,m.c=t(x(f(h.c),h.e,"0"),10,o,e),m.e=m.c.length),u=c=(p=t(n,r,o,a?(s=V,e):(s=e,V))).length;0==p[--c];p.pop());if(!p[0])return s.charAt(0);if(g<0?--u:(h.c=p,h.e=u,h.s=i,p=(h=y(h,m,v,b,o)).c,d=h.r,u=h.e),g=p[l=u+v+1],c=o/2,d=d||l<0||null!=p[l+1],d=b<4?(null!=g||d)&&(0==b||b==(h.s<0?3:2)):g>c||g==c&&(4==b||d||6==b&&1&p[l-1]||b==(h.s<0?8:7)),l<1||!p[0])n=d?x(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(p.length=l,d)for(--o;++p[--l]>o;)p[l]=0,l||(++u,p=[1].concat(p));for(c=p.length;!p[--c];);for(g=0,n="";g<=c;n+=s.charAt(p[g++]));n=x(n,u,s.charAt(0))}return n}}(),y=function(){function e(e,t,n){var r,o,i,a,s=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)s=((o=u*(i=e[l]%d)+(r=c*i+(a=e[l]/d|0)*u)%d*d+s)/n|0)+(r/d|0)+c*a,e[l]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]1;e.splice(0,1));}return function(r,i,a,u,c){var d,h,f,m,g,v,y,b,x,w,S,C,k,M,_,T,P,I=r.s==i.s?1:-1,R=r.c,D=i.c;if(!(R&&R[0]&&D&&D[0]))return new $(r.s&&i.s&&(R?!D||R[0]!=D[0]:D)?R&&0==R[0]||!D?0*I:I/0:NaN);for(x=(b=new $(I)).c=[],I=a+(h=r.e-i.e)+1,c||(c=s,h=p(r.e/l)-p(i.e/l),I=I/l|0),f=0;D[f]==(R[f]||0);f++);if(D[f]>(R[f]||0)&&h--,I<0)x.push(1),m=!0;else{for(M=R.length,T=D.length,f=0,I+=2,(g=o(c/(D[0]+1)))>1&&(D=e(D,g,c),R=e(R,g,c),T=D.length,M=R.length),k=T,S=(w=R.slice(0,T)).length;S=c/2&&_++;do{if(g=0,(d=t(D,w,T,S))<0){if(C=w[0],T!=S&&(C=C*c+(w[1]||0)),(g=o(C/_))>1)for(g>=c&&(g=c-1),y=(v=e(D,g,c)).length,S=w.length;1==t(v,w,y,S);)g--,n(v,T=10;I/=10,f++);q(b,a+(b.e=f+h*l-1)+1,u,m)}else b.e=h,b.r=+m;return b}}(),M=/^(-?)0([xbo])(?=\w[\w.]*$)/i,_=/^([^.]+)\.$/,T=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var o,a=n?t:t.replace(I,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(M,(function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t})),r&&(o=r,a=a.replace(_,"$1").replace(T,"0.$1")),t!=a))return new $(a,o);if($.DEBUG)throw Error(i+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},R.absoluteValue=R.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},R.comparedTo=function(e,t){return m(this,new $(e,t))},R.decimalPlaces=R.dp=function(e,t){var n,r,o,i=this;if(null!=e)return g(e,0,h),null==t?t=A:g(t,0,8),q(new $(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-p(this.e/l))*l,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},R.dividedBy=R.div=function(e,t){return y(this,new $(e,t),O,A)},R.dividedToIntegerBy=R.idiv=function(e,t){return y(this,new $(e,t),0,1)},R.exponentiatedBy=R.pow=function(e,t){var n,a,s,u,c,d,h,p,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+K(e));if(null!=t&&(t=new $(t)),c=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+K(f),c?e.s*(2-v(e)):+K(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(a=!d&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||c&&f.c[1]>=24e7:f.c[0]<8e13||c&&f.c[0]<=9999975e7)))return u=f.s<0&&v(e)?-0:0,f.e>-1&&(u=1/u),new $(d?1/u:u);z&&(u=r(z/l+2))}for(c?(n=new $(.5),d&&(e.s=1),h=v(e)):h=(s=Math.abs(+K(e)))%2,p=new $(D);;){if(h){if(!(p=p.times(f)).c)break;u?p.c.length>u&&(p.c.length=u):a&&(p=p.mod(t))}if(s){if(0===(s=o(s/2)))break;h=s%2}else if(q(e=e.times(n),e.e+1,1),e.e>14)h=v(e);else{if(0==(s=+K(e)))break;h=s%2}f=f.times(f),u?f.c&&f.c.length>u&&(f.c.length=u):a&&(f=f.mod(t))}return a?p:(d&&(p=D.div(p)),t?p.mod(t):u?q(p,z,A,void 0):p)},R.integerValue=function(e){var t=new $(this);return null==e?e=A:g(e,0,8),q(t,t.e+1,e)},R.isEqualTo=R.eq=function(e,t){return 0===m(this,new $(e,t))},R.isFinite=function(){return!!this.c},R.isGreaterThan=R.gt=function(e,t){return m(this,new $(e,t))>0},R.isGreaterThanOrEqualTo=R.gte=function(e,t){return 1===(t=m(this,new $(e,t)))||0===t},R.isInteger=function(){return!!this.c&&p(this.e/l)>this.c.length-2},R.isLessThan=R.lt=function(e,t){return m(this,new $(e,t))<0},R.isLessThanOrEqualTo=R.lte=function(e,t){return-1===(t=m(this,new $(e,t)))||0===t},R.isNaN=function(){return!this.s},R.isNegative=function(){return this.s<0},R.isPositive=function(){return this.s>0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.minus=function(e,t){var n,r,o,i,a=this,u=a.s;if(t=(e=new $(e,t)).s,!u||!t)return new $(NaN);if(u!=t)return e.s=-t,a.plus(e);var c=a.e/l,d=e.e/l,h=a.c,f=e.c;if(!c||!d){if(!h||!f)return h?(e.s=-t,e):new $(f?a:NaN);if(!h[0]||!f[0])return f[0]?(e.s=-t,e):new $(h[0]?a:3==A?-0:0)}if(c=p(c),d=p(d),h=h.slice(),u=c-d){for((i=u<0)?(u=-u,o=h):(d=c,o=f),o.reverse(),t=u;t--;o.push(0));o.reverse()}else for(r=(i=(u=h.length)<(t=f.length))?u:t,u=t=0;t0)for(;t--;h[n++]=0);for(t=s-1;r>u;){if(h[--r]=0;){for(n=0,g=C[o]%x,v=C[o]/x|0,i=o+(a=c);i>o;)n=((h=g*(h=S[--a]%x)+(u=v*h+(f=S[a]/x|0)*g)%x*x+y[i]+n)/b|0)+(u/x|0)+v*f,y[i--]=h%b;y[i]=n}return n?++r:y.splice(0,1),U(e,y,r)},R.negated=function(){var e=new $(this);return e.s=-e.s||null,e},R.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new $(e,t)).s,!o||!t)return new $(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/l,a=e.e/l,u=r.c,c=e.c;if(!i||!a){if(!u||!c)return new $(o/0);if(!u[0]||!c[0])return c[0]?e:new $(u[0]?r:0*o)}if(i=p(i),a=p(a),u=u.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=u),n.reverse();o--;n.push(0));n.reverse()}for((o=u.length)-(t=c.length)<0&&(n=c,c=u,u=n,t=o),o=0;t;)o=(u[--t]=u[t]+c[t]+o)/s|0,u[t]=s===u[t]?0:u[t]%s;return o&&(u=[o].concat(u),++a),U(e,u,a)},R.precision=R.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return g(e,1,h),null==t?t=A:g(t,0,8),q(new $(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*l+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},R.shiftedBy=function(e){return g(e,-9007199254740991,u),this.times("1e"+e)},R.squareRoot=R.sqrt=function(){var e,t,n,r,o,i=this,a=i.c,s=i.s,l=i.e,u=O+4,c=new $("0.5");if(1!==s||!a||!a[0])return new $(!s||s<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(s=Math.sqrt(+K(i)))||s==1/0?(((t=f(a)).length+l)%2==0&&(t+="0"),s=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),n=new $(t=s==1/0?"5e"+l:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new $(s+""),n.c[0])for((s=(l=n.e)+u)<3&&(s=0);;)if(o=n,n=c.times(o.plus(y(i,o,u,1))),f(o.c).slice(0,s)===(t=f(n.c)).slice(0,s)){if(n.e0&&m>0){for(a=m%l||l,d=f.substr(0,a);a0&&(d+=c+f.slice(a)),p&&(d="-"+d)}r=h?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):d}return(n.prefix||"")+r+(n.suffix||"")},R.toFraction=function(e){var t,n,r,o,a,s,u,d,h,p,m,g,v=this,b=v.c;if(null!=e&&(!(u=new $(e)).isInteger()&&(u.c||1!==u.s)||u.lt(D)))throw Error(i+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!b)return new $(v);for(t=new $(D),h=n=new $(D),r=d=new $(D),g=f(b),a=t.e=g.length-v.e-1,t.c[0]=c[(s=a%l)<0?l+s:s],e=!e||u.comparedTo(t)>0?a>0?t:h:u,s=F,F=1/0,u=new $(g),d.c[0]=0;p=y(u,t,0,1),1!=(o=n.plus(p.times(r))).comparedTo(e);)n=r,r=o,h=d.plus(p.times(o=h)),d=o,t=u.minus(p.times(o=t)),u=o;return o=y(e.minus(n),r,0,1),d=d.plus(o.times(h)),n=n.plus(o.times(r)),d.s=h.s=v.s,m=y(h,r,a*=2,A).minus(v).abs().comparedTo(y(d,n,a,A).minus(v).abs())<1?[h,r]:[d,n],F=s,m},R.toNumber=function(){return+K(this)},R.toPrecision=function(e,t){return null!=e&&g(e,1,h),W(this,e,t,2)},R.toString=function(e){var t,n=this,r=n.s,o=n.e;return null===o?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=o<=E||o>=Z?b(f(n.c),o):x(f(n.c),o,"0"):10===e&&H?t=x(f((n=q(new $(n),O+o+1,A)).c),n.e,"0"):(g(e,2,V.length,"Base"),t=w(x(f(n.c),o,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},R.valueOf=R.toJSON=function(){return K(this)},R._isBigNumber=!0,null!=t&&$.set(t),$}(),t.default=t.BigNumber=t,y.exports?y.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(u);var x=b.exports;const w=g(),S=h(),C=m,k=x,M={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},_={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:T,decimalSuffixes:P}=w.currentBytes(),I={general:{scale:1024,suffixes:P,marker:"bd"},binary:{scale:1024,suffixes:T,marker:"b"},decimal:{scale:1e3,suffixes:P,marker:"d"}};function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("string"==typeof t&&(t=C.parseFormat(t)),!S.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",o=t.postfix||"",i=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){const r=n.currentCurrency();let o,i=Object.assign({},t),a=Object.assign({},_,i),s="",l=!!a.totalLength||!!a.forceAverage||a.average,u=i.currencyPosition||r.position,c=i.currencySymbol||r.symbol;const d=void 0!==a.spaceSeparatedCurrency?a.spaceSeparatedCurrency:a.spaceSeparated;void 0===i.lowPrecision&&(i.lowPrecision=!1);d&&(s=" ");"infix"===u&&(o=s+c+s);let h=E({instance:e,providedFormat:i,state:n,decimalSeparator:o});"prefix"===u&&(h=e._value<0&&"sign"===a.negative?`-${s}${c}${h.slice(1)}`:e._value>0&&a.forceSign?`+${s}${c}${h.slice(1)}`:c+s+h);u&&"postfix"!==u||(s=!a.spaceSeparatedAbbreviation&&l?"":s,h=h+s+c);return h}(e,t=Z(t,w.currentCurrencyDefaultFormat()),w);case"percent":return function(e,t,n,r){let o=t.prefixSymbol,i=E({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},_,t);if(o)return`%${a.spaceSeparated?" ":""}${i}`;return`${i}${a.spaceSeparated?" ":""}%`}(e,t=Z(t,w.currentPercentageDefaultFormat()),w,n);case"byte":return function(e,t,n,r){let o=t.base||"binary",i=Object.assign({},_,t);const{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes();let l={general:{scale:1024,suffixes:s||P,marker:"bd"},binary:{scale:1024,suffixes:a||T,marker:"b"},decimal:{scale:1e3,suffixes:s||P,marker:"d"}}[o],{value:u,suffix:c}=D(e._value,l.suffixes,l.scale),d=E({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${i.spaceSeparated?" ":""}${c}`}(e,t=Z(t,w.currentByteDefaultFormat()),w,n);case"time":return t=Z(t,w.currentTimeDefaultFormat()),function(e){let t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return`${t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}`}(e);case"ordinal":return function(e,t,n){let r=n.currentOrdinal(),o=Object.assign({},_,t),i=E({instance:e,providedFormat:t,state:n}),a=r(e._value);return`${i}${o.spaceSeparated?" ":""}${a}`}(e,t=Z(t,w.currentOrdinalDefaultFormat()),w);default:return E({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return i=function(e,t){return t+e}(i,r),i=function(e,t){return e+t}(i,o),i}function D(e,t,n){let r=t[0],o=Math.abs(e);if(o>=n){for(let i=1;i=a&&o2&&void 0!==arguments[2]?arguments[2]:Math.round;if(-1!==e.toString().indexOf("e"))return function(e,t){let n=e.toString(),[r,o]=n.split("e"),[i,a=""]=r.split(".");if(+o>0)n=i+a+O(o-a.length);else{let e=".";e=+i<0?`-0${e}`:`0${e}`;let r=(O(-o-1)+Math.abs(i)+a).substr(0,t);r.length0&&t>0&&(n+=`.${O(t)}`),n}(e,t);return new k(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}function E(e){let{instance:t,providedFormat:n,state:r=w,decimalSeparator:o,defaults:i=r.currentDefaults()}=e,a=t._value;if(0===a&&r.hasZeroFormat())return r.getZeroFormat();if(!isFinite(a))return a.toString();let s=Object.assign({},_,i,n),l=s.totalLength,u=l?0:s.characteristic,c=s.optionalCharacteristic,d=s.forceAverage,h=s.lowPrecision,p=!!l||!!d||s.average,f=l?-1:p&&void 0===n.mantissa?0:s.mantissa,m=!l&&(void 0===n.optionalMantissa?-1===f:s.optionalMantissa),g=s.trimMantissa,v=s.thousandSeparated,y=s.spaceSeparated,b=s.negative,x=s.forceSign,S=s.exponential,C=s.roundingFunction,k="";if(p){let e=function(e){let{value:t,forceAverage:n,lowPrecision:r=!0,abbreviations:o,spaceSeparated:i=!1,totalLength:a=0,roundingFunction:s=Math.round}=e,l="",u=Math.abs(t),c=-1;if(n&&o[n]&&M[n]?(l=o[n],t/=M[n]):u>=M.trillion||r&&1===s(u/M.trillion)?(l=o.trillion,t/=M.trillion):u=M.billion||r&&1===s(u/M.billion)?(l=o.billion,t/=M.billion):u=M.million||r&&1===s(u/M.million)?(l=o.million,t/=M.million):(u=M.thousand||r&&1===s(u/M.thousand))&&(l=o.thousand,t/=M.thousand),l&&(l=(i?" ":"")+l),a){let e=t<0,n=t.toString().split(".")[0],r=e?n.length-1:n.length;c=Math.max(a-r,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:a,forceAverage:d,lowPrecision:h,abbreviations:r.currentAbbreviations(),spaceSeparated:y,roundingFunction:C,totalLength:l});a=e.value,k+=e.abbreviation,l&&(f=e.mantissaPrecision)}if(S){let e=function(e){let{value:t,characteristicPrecision:n}=e,[r,o]=t.toExponential().split("e"),i=+r;return n?(1=0?`+${o}`:o),{value:i,abbreviation:`e${o}`}):{value:i,abbreviation:`e${o}`}}({value:a,characteristicPrecision:u});a=e.value,k=e.abbreviation+k}let T=function(e,t,n,r,o,i){if(-1===r)return e;let a=A(t,r,i),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||o))return s;let u=l.match(/0+$/);return o&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(a.toString(),a,m,f,g,C);return T=function(e,t,n,r){let o=e,[i,a]=o.toString().split(".");if(i.match(/^-?0$/)&&n)return a?`${i.replace("0","")}.${a}`:i.replace("0","");const s=t<0&&0===i.indexOf("-");if(s&&(i=i.slice(1),o=o.slice(1)),i.length0;o--)r===t&&(n.unshift(o),r=0),r++;return n}(u.length,s);e.forEach(((e,t)=>{u=u.slice(0,e+t)+a+u.slice(e+t)})),d&&(u=`-${u}`)}return l=c?u+o+c:u,l}(T,a,v,r,o),(p||S)&&(T=function(e,t){return e+t}(T,k)),(x||a<0)&&(T=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):t>0?`+${e}`:"sign"===n?e:`(${e.replace("-","")})`}(T,a,b)),T}function Z(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}const L=x;function F(e,t,n){let r=new L(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new L(o),e._value=r.minus(o).toNumber(),e}const j=g(),N=h(),z=(B=q,{loadLanguagesInNode:e=>v(e,B)});var B;const V=d();let H=(e=>({format:function(){for(var t=arguments.length,n=new Array(t),r=0;r({add:(t,n)=>function(e,t,n){let r=new L(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new L(o),e._value=r.plus(o).toNumber(),e}(t,n,e),subtract:(t,n)=>F(t,n,e),multiply:(t,n)=>function(e,t,n){let r=new L(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new L(o),e._value=r.times(o).toNumber(),e}(t,n,e),divide:(t,n)=>function(e,t,n){let r=new L(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new L(o),e._value=r.dividedBy(o).toNumber(),e}(t,n,e),set:(t,n)=>function(e,t,n){let r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e),difference:(t,n)=>function(e,t,n){let r=n(e._value);return F(r,t,n),Math.abs(r._value)}(t,n,e),BigNumber:L}))(q);const W=m;class G{clone(){return q(this._value)}format(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return H.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=W.parseFormat(e)),(e=H.formatOrDefault(e,j.currentCurrencyDefaultFormat())).output="currency",H.format(this,e)}formatTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",H.format(this,e)}binaryByteUnits(){return H.getBinaryByteUnit(this)}decimalByteUnits(){return H.getDecimalByteUnit(this)}byteUnits(){return H.getByteUnit(this)}difference(e){return $.difference(this,e)}add(e){return $.add(this,e)}subtract(e){return $.subtract(this,e)}multiply(e){return $.multiply(this,e)}divide(e){return $.divide(this,e)}set(e){return $.set(this,U(e))}value(){return this._value}valueOf(){return this._value}constructor(e){this._value=e}}function U(e){let t=e;return q.isNumbro(e)?t=e._value:"string"==typeof e?t=q.unformat(e):isNaN(e)&&(t=NaN),t}function q(e){return new G(U(e))}q.version="2.5.0",q.isNumbro=function(e){return e instanceof G},q.language=j.currentLanguage,q.registerLanguage=j.registerLanguage,q.setLanguage=j.setLanguage,q.languages=j.languages,q.languageData=j.languageData,q.zeroFormat=j.setZeroFormat,q.defaultFormat=j.currentDefaults,q.setDefaults=j.setDefaults,q.defaultCurrencyFormat=j.currentCurrencyDefaultFormat,q.validate=N.validate,q.loadLanguagesInNode=z.loadLanguagesInNode,q.unformat=V.unformat,q.BigNumber=$.BigNumber;var K=c(q),Y=n(50509),X=n(70609);const Q=2;function J(e,t){let{shortValues:n,decimalPlaces:r}=t;if(!(0,X.lk)(n)||Math.abs(e)<1e3){const t={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};(0,X.ej)(r)?(t.minimumFractionDigits=(0,X.Gs)(r),t.maximumFractionDigits=(0,X.Gs)(r)):(0,X.lk)(n)&&(t.maximumSignificantDigits=Y.$);return Intl.NumberFormat("en-US",t).format(e)}return K(e).format({output:"byte",base:"decimal",spaceSeparated:!0,mantissa:(0,X.ej)(r)?r:Q,trimMantissa:!(0,X.ej)(r),optionalMantissa:!(0,X.ej)(r)})}const ee="Percent",te={percent:{group:ee,label:"Percent (0-100)"},"percent-decimal":{group:ee,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:ee,label:"%"}};const ne="Time",re={milliseconds:{group:ne,label:"Milliseconds"},seconds:{group:ne,label:"Seconds"},minutes:{group:ne,label:"Minutes"},hours:{group:ne,label:"Hours"},days:{group:ne,label:"Days"},weeks:{group:ne,label:"Weeks"},months:{group:ne,label:"Months"},years:{group:ne,label:"Years"}};var oe=function(e){return e.milliseconds="millisecond",e.seconds="second",e.minutes="minute",e.hours="hour",e.days="day",e.weeks="week",e.months="month",e.years="year",e}({});const ie={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001},ae=["years","months","weeks","days","hours","minutes","seconds","milliseconds"];function se(e){return"months"===e||"years"===e}function le(e,t){let{unit:n,decimalPlaces:r}=t;if(0===e)return"0s";const o=function(e,t){const n=e*ie[t],r=ae[0]||"years";let o=r,i=n/ie[r];for(o of ae)if(i=n/ie[o],i>=1)return{value:i,unit:o};return{value:i,unit:o}}(e,n),i={style:"unit",unit:oe[o.unit],unitDisplay:se(o.unit)?"long":"narrow"};(0,X.ej)(r)?(i.minimumFractionDigits=(0,X.Gs)(r),i.maximumFractionDigits=(0,X.Gs)(r)):i.maximumSignificantDigits=Y.$;return Intl.NumberFormat("en-US",i).format(o.value)}const ue="Throughput";const ce={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0}},de={...re,...te,decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes"},...{"bits/sec":{group:ue,label:"Bits/sec"},"bytes/sec":{group:ue,label:"Bytes/sec"},"counts/sec":{group:ue,label:"Counts/sec"},"events/sec":{group:ue,label:"Events/sec"},"messages/sec":{group:ue,label:"Messages/sec"},"ops/sec":{group:ue,label:"Ops/sec"},"packets/sec":{group:ue,label:"Packets/sec"},"reads/sec":{group:ue,label:"Reads/sec"},"requests/sec":{group:ue,label:"Requests/sec"},"records/sec":{group:ue,label:"Records/sec"},"rows/sec":{group:ue,label:"Rows/sec"},"writes/sec":{group:ue,label:"Writes/sec"}}};function he(e,t){if(void 0===t)return e.toString();if(be(t))return J(e,t);if(ye(t))return function(e,t){let{shortValues:n,decimalPlaces:r}=t;const o={style:"decimal",useGrouping:!0};return(0,X.lk)(n)&&(o.notation="compact"),(0,X.ej)(r)?(o.minimumFractionDigits=(0,X.Gs)(r),o.maximumFractionDigits=(0,X.Gs)(r)):(0,X.lk)(n)&&(o.maximumSignificantDigits=Y.$),Intl.NumberFormat("en-US",o).format(e)}(e,t);if(ve(t))return function(e,t){let{unit:n,decimalPlaces:r}=t;const o={style:"percent",useGrouping:!0};return(0,X.ej)(r)?(o.minimumFractionDigits=(0,X.Gs)(r),o.maximumFractionDigits=(0,X.Gs)(r)):o.maximumSignificantDigits=Y.$,"percent"===n&&(e/=100),Intl.NumberFormat("en-US",o).format(e)}(e,t);if(ge(t))return le(e,t);if(Se(t))return function(e,t){let{unit:n,shortValues:r,decimalPlaces:o}=t;if("bytes/sec"===n){const t=Math.abs(e)<1e3?"sec":"s";return J(e,{unit:"bytes",shortValues:r,decimalPlaces:o})+"/"+t}const i={style:"decimal",useGrouping:!0};return(0,X.lk)(r)&&(i.notation="compact"),(0,X.ej)(o)?(i.minimumFractionDigits=(0,X.Gs)(o),i.maximumFractionDigits=(0,X.Gs)(o)):(0,X.lk)(r)&&(i.maximumSignificantDigits=Y.$),Intl.NumberFormat("en-US",i).format(e)+" "+n}(e,t);throw new Error(`Unknown unit options ${t}`)}function pe(e){return de[e.unit]}function fe(e){return pe(e).group}function me(e){const t=pe(e);return ce[t.group]}function ge(e){return"Time"===fe(e)}function ve(e){return"Percent"===fe(e)}function ye(e){return"Decimal"===fe(e)}function be(e){return"Bytes"===fe(e)}function xe(e){return!!me(e).decimalPlaces}function we(e){return!!me(e).shortValues}function Se(e){return"Throughput"===fe(e)}},70609:function(e,t,n){"use strict";function r(e){return!1!==e}function o(e){return"number"==typeof e}function i(e){return e?(e<0?e=0:e>20&&(e=20),e):e}n.d(t,{Gs:()=>i,ej:()=>o,lk:()=>r})},65694:function(e,t,n){"use strict";n.d(t,{a:()=>i});var r=n(77891),o=n(46310);const i=r.z.string().min(1,"Required").regex(o.T9,"Must be a valid duration string")},59707:function(e,t,n){"use strict";n.d(t,{Nq:()=>o,Pe:()=>a,ec:()=>i});var r=n(77891);const o=r.z.string().min(1,"Required").max(75,"Must be 75 or fewer characters long").regex(/^[a-zA-Z0-9_.-]+$/,"Must only contains alphanumerical characters and special characters _ . -"),i=r.z.object({name:o}),a=i.extend({project:o})},21953:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}async function o(){for(var e=arguments.length,t=new Array(e),r=0;ro,kp:()=>a,rd:()=>i,yh:()=>s});class a extends Error{constructor(e){super(`${e.status} ${e.statusText}`),r(this,"status",void 0),this.status=e.status,Object.setPrototypeOf(this,a.prototype)}}class s extends Error{constructor(e,t){super(e),r(this,"status",void 0),this.status=t,Object.setPrototypeOf(this,s.prototype)}}},77640:function(e,t,n){"use strict";function r(e){var t,n,r;return(null===(n=e.spec.spec)||void 0===n||null===(t=n.display)||void 0===t?void 0:t.name)?e.spec.spec.display.name:(null===(r=e.spec.display)||void 0===r?void 0:r.name)?e.spec.display.name:e.metadata.name}function o(e){var t,n,r;return(null===(n=e.spec.spec)||void 0===n||null===(t=n.display)||void 0===t?void 0:t.name)?`${e.spec.spec.display.name} (ID: ${e.metadata.name})`:(null===(r=e.spec.display)||void 0===r?void 0:r.name)?`${e.spec.display.name} (ID: ${e.metadata.name})`:e.metadata.name}n.d(t,{t:()=>o,y:()=>r})},70750:function(e,t,n){"use strict";n.d(t,{Z:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t2||T(b)>3?"":" "}function O(e,t){for(;--t&&C()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return _(e,M()+(t<6&&32==k()&&32==C()))}function A(e){for(;C();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&A(b);break;case 40:41===e&&A(e);break;case 92:C()}return y}function E(e,t){for(;C()&&e+b!==57&&(e+b!==84||47!==k()););return"/*"+_(t,y-1)+"*"+i(47===e?e:C())}function Z(e){for(;!T(k());)C();return _(e,y)}var L="-ms-",F="-moz-",j="-webkit-",N="comm",z="rule",B="decl",V="@keyframes";function H(e,t){for(var n="",r=p(e),o=0;o0&&h(V)-S&&f(T>32?K(V+";",r,n,S-1):K(l(V," ","")+";",r,n,S-2),p);break;case 59:V+=";";default:if(f(B=U(V,t,n,v,w,o,d,j,N=[],z=[],S),a),123===F)if(0===w)G(V,t,B,B,N,a,S,d,z);else switch(99===_&&110===c(V,3)?100:_){case 100:case 108:case 109:case 115:G(e,B,B,r&&f(U(e,B,B,0,0,o,d,j,o,N=[],S),z),o,z,S,d,r?N:z);break;default:G(V,B,B,B,[""],z,0,d,z)}}v=w=T=0,I=L=1,j=V="",S=s;break;case 58:S=1+h(V),T=P;default:if(I<1)if(123==F)--I;else if(125==F&&0==I++&&125==(b=y>0?c(x,--y):0,g--,10===b&&(g=1,m--),b))continue;switch(V+=i(F),F*I){case 38:L=w>0?1:(V+="\f",-1);break;case 44:d[v++]=(h(V)-1)*L,L=1;break;case 64:45===k()&&(V+=R(C())),_=k(),w=S=h(j=V+=Z(M())),F++;break;case 45:45===P&&2==h(V)&&(I=0)}}return a}function U(e,t,n,r,i,a,u,c,h,f,m){for(var g=i-1,v=0===i?a:[""],y=p(v),b=0,x=0,S=0;b0?v[C]+" "+k:l(k,/&\f/g,v[C])))&&(h[S++]=M);return w(e,t,n,0===i?z:c,h,f,m)}function q(e,t,n){return w(e,t,n,N,i(b),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,B,d(e,0,r),d(e,r+1,-1),r)}var Y=function(e,t,n){for(var r=0,o=0;r=o,o=k(),38===r&&12===o&&(t[n]=1),!T(o);)C();return _(e,y)},X=function(e,t){return I(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=Y(y-1,t,n);break;case 2:e[n]+=R(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=C());return e}(P(e),t))},Q=new WeakMap,J=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var o=[],i=X(t,o),a=n.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+F+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,h(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+j)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===c(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+L+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return j+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+L+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+L+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case B:e.return=te(e.value,e.length);break;case V:return H([S(e,{value:l(e.value,"@","@"+j)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([S(e,{props:[l(t,/:(plac\w+)/,":"+j+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,L+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||ne,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;nr})},99789:function(e,t,n){"use strict";n.d(t,{T:()=>y,_:()=>g,w:()=>v,i:()=>p,E:()=>T,h:()=>C,u:()=>b,C:()=>m,c:()=>M,b:()=>S,a:()=>w});var r=n(32123),o=n(70750),i=n(40182),a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},s=n(56279),l=n.n(s),u=function(e,t){return l()(e,t)},c=n(566),d=n(32710),h=n(85757),p=!1,f=r.createContext("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null),m=f.Provider,g=function(){return(0,r.useContext)(f)},v=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(f);return e(t,o,n)}))},y=r.createContext({}),b=function(){return r.useContext(y)},x=a((function(e){return a((function(t){return function(e,t){return"function"==typeof t?t(e):(0,i.Z)({},e,t)}(e,t)}))})),w=function(e){var t=r.useContext(y);return e.theme!==t&&(t=x(t)(e.theme)),r.createElement(y.Provider,{value:t},e.children)};function S(e){var t=e.displayName||e.name||"Component",n=r.forwardRef((function(t,n){var o=r.useContext(y);return r.createElement(e,(0,i.Z)({theme:o,ref:n},t))}));return n.displayName="WithTheme("+t+")",u(n,e)}var C={}.hasOwnProperty,k="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",M=function(e,t){var n={};for(var r in t)C.call(t,r)&&(n[r]=t[r]);return n[k]=e,n},_=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,h.L)((function(){return(0,c.My)(t,n,r)})),null},T=v((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[k],a=[o],s="";"string"==typeof e.className?s=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=(0,d.O)(a,void 0,r.useContext(y));s+=t.key+"-"+l.name;var u={};for(var h in e)C.call(e,h)&&"css"!==h&&h!==k&&!p&&(u[h]=e[h]);return u.className=s,n&&(u.ref=n),r.createElement(r.Fragment,null,r.createElement(_,{cache:t,serialized:l,isStringTag:"string"==typeof i}),r.createElement(i,u))}))},39962:function(e,t,n){"use strict";n.r(t),n.d(t,{CacheProvider:()=>r.C,ClassNames:()=>f,Global:()=>u,ThemeContext:()=>r.T,ThemeProvider:()=>r.a,__unsafe_useEmotionCache:()=>r._,createElement:()=>l,css:()=>c,jsx:()=>l,keyframes:()=>d,useTheme:()=>r.u,withEmotionCache:()=>r.w,withTheme:()=>r.b});var r=n(99789),o=n(32123),i=n(566),a=n(85757),s=n(32710),l=(n(70750),n(56279),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return o.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;sg});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(26629),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.Z)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:f}}},9068:function(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(40182),o=n(99789),i=n(32710),a=n(85757),s=n(566),l=n(32123),u=n(26629),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,u.Z)((function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.hC)(t,n,r),(0,a.L)((function(){return(0,s.My)(t,n,r)})),null},g=function e(t,n){var a,u,c=t.__emotion_real===t,d=c&&t.__emotion_base||t;void 0!==n&&(a=n.label,u=n.target);var h=f(t,n,c),g=h||p(d),v=!g("as");return function(){var y=arguments,b=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{var x=y[0];b.push(x[0]);for(var w=y.length,S=1;Sa,j:()=>s});var o=n(32123),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},566:function(e,t,n){"use strict";n.d(t,{My:()=>i,fp:()=>r,hC:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},88624:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(50942),c=n(87861),d=n(6985),h=n(80897),p=n(81543),f=n(32792),m=n(19577);function g(e){return(0,m.ZP)("MuiAccordion",e)}const v=(0,f.Z)("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]);var y=n(77928);const b=(0,a.ZP)(c.Z,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${v.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((0,s.Z)((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${v.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${v.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}})),(0,s.Z)((e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${v.expanded}`]:{margin:"16px 0"}}}]}}))),x=(0,a.ZP)("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),w=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordion"}),{children:a,className:s,defaultExpanded:c=!1,disabled:f=!1,disableGutters:m=!1,expanded:v,onChange:w,square:S=!1,slots:C={},slotProps:k={},TransitionComponent:M,TransitionProps:_,...T}=n,[P,I]=(0,h.Z)({controlled:v,default:c,name:"Accordion",state:"expanded"}),R=r.useCallback((e=>{I(!P),w&&w(e,!P)}),[P,w,I]),[D,...O]=r.Children.toArray(a),A=r.useMemo((()=>({expanded:P,disabled:f,disableGutters:m,toggle:R})),[P,f,m,R]),E={...n,square:S,disabled:f,disableGutters:m,expanded:P},Z=(e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:a}=e,s={root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!a&&"gutters"],heading:["heading"],region:["region"]};return(0,i.Z)(s,g,t)})(E),L={slots:{transition:M,...C},slotProps:{transition:_,...k}},[F,j]=(0,p.Z)("heading",{elementType:x,externalForwardedProps:L,className:Z.heading,ownerState:E}),[N,z]=(0,p.Z)("transition",{elementType:u.Z,externalForwardedProps:L,ownerState:E});return(0,y.jsxs)(b,{className:(0,o.Z)(Z.root,s),ref:t,ownerState:E,square:S,...T,children:[(0,y.jsx)(F,{...j,children:(0,y.jsx)(d.Z.Provider,{value:A,children:D})}),(0,y.jsx)(N,{in:P,timeout:"auto",...z,children:(0,y.jsx)("div",{"aria-labelledby":D.props.id,id:D.props["aria-controls"],role:"region",className:Z.region,children:O})})]})}))},6985:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext({})},17340:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiAccordionDetails",e)}(0,u.Z)("MuiAccordionDetails",["root"]);var h=n(77928);const p=(0,a.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}}))),f=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordionDetails"}),{className:r,...a}=n,s=n,u=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(s);return(0,h.jsx)(p,{className:(0,o.Z)(u.root,r),ref:t,ownerState:s,...a})}))},73492:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(89865),c=n(6985),d=n(32792),h=n(19577);function p(e){return(0,h.ZP)("MuiAccordionSummary",e)}const f=(0,d.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var m=n(77928);const g=(0,a.ZP)(u.Z,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${f.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${f.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${f.expanded}`]:{minHeight:64}}}]}}))),v=(0,a.ZP)("span",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((0,s.Z)((e=>{let{theme:t}=e;return{display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${f.expanded}`]:{margin:"20px 0"}}}]}}))),y=(0,a.ZP)("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((0,s.Z)((e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${f.expanded}`]:{transform:"rotate(180deg)"}}}))),b=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAccordionSummary"}),{children:a,className:s,expandIcon:u,focusVisibleClassName:d,onClick:h,...f}=n,{disabled:b=!1,disableGutters:x,expanded:w,toggle:S}=r.useContext(c.Z),C={...n,expanded:w,disabled:b,disableGutters:x},k=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e,a={root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,i.Z)(a,p,t)})(C);return(0,m.jsxs)(g,{focusRipple:!1,disableRipple:!0,disabled:b,"aria-expanded":w,className:(0,o.Z)(k.root,s),focusVisibleClassName:(0,o.Z)(k.focusVisible,d),onClick:e=>{S&&S(e),h&&h(e)},ref:t,ownerState:C,...f,children:[(0,m.jsx)(v,{className:k.content,ownerState:C,children:a}),u&&(0,m.jsx)(y,{className:k.expandIconWrapper,ownerState:C,children:u})]})}))},58730:function(e,t,n){"use strict";n.d(t,{Z:()=>P});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(99289),l=n(97136),u=n(71959),c=n(81543),d=n(80706),h=n(38358),p=n(87861),f=n(59685),m=n(16639),g=n(57698),v=n(77928);const y=(0,g.Z)((0,v.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),b=(0,g.Z)((0,v.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),x=(0,g.Z)((0,v.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),w=(0,g.Z)((0,v.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var S=n(4947);const C=(0,s.ZP)(p.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,d.Z)(n.color||n.severity)}`]]}})((0,l.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode?a._j:a.$n,r="light"===t.palette.mode?a.$n:a._j;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter((0,h.Z)(["light"])).map((e=>{let[o]=e;return{props:{colorSeverity:o,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${o}Color`]:n(t.palette[o].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${o}StandardBg`]:r(t.palette[o].light,.9),[`& .${f.Z.icon}`]:t.vars?{color:t.vars.palette.Alert[`${o}IconColor`]}:{color:t.palette[o].main}}}})),...Object.entries(t.palette).filter((0,h.Z)(["light"])).map((e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:n(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${f.Z.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}}})),...Object.entries(t.palette).filter((0,h.Z)(["dark"])).map((e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${n}FilledColor`],backgroundColor:t.vars.palette.Alert[`${n}FilledBg`]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)}}}}))]}}))),k=(0,s.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),M=(0,s.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),_=(0,s.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),T={success:(0,v.jsx)(y,{fontSize:"inherit"}),warning:(0,v.jsx)(b,{fontSize:"inherit"}),error:(0,v.jsx)(x,{fontSize:"inherit"}),info:(0,v.jsx)(w,{fontSize:"inherit"})},P=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiAlert"}),{action:r,children:a,className:s,closeText:l="Close",color:h,components:p={},componentsProps:g={},icon:y,iconMapping:b=T,onClose:x,role:w="alert",severity:P="success",slotProps:I={},slots:R={},variant:D="standard",...O}=n,A={...n,color:h,severity:P,variant:D,colorSeverity:h||P},E=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,a={root:["root",`color${(0,d.Z)(n||r)}`,`${t}${(0,d.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,i.Z)(a,f.t,o)})(A),Z={slots:{closeButton:p.CloseButton,closeIcon:p.CloseIcon,...R},slotProps:{...g,...I}},[L,F]=(0,c.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,o.Z)(E.root,s),elementType:C,externalForwardedProps:{...Z,...O},ownerState:A,additionalProps:{role:w,elevation:0}}),[j,N]=(0,c.Z)("icon",{className:E.icon,elementType:k,externalForwardedProps:Z,ownerState:A}),[z,B]=(0,c.Z)("message",{className:E.message,elementType:M,externalForwardedProps:Z,ownerState:A}),[V,H]=(0,c.Z)("action",{className:E.action,elementType:_,externalForwardedProps:Z,ownerState:A}),[$,W]=(0,c.Z)("closeButton",{elementType:m.Z,externalForwardedProps:Z,ownerState:A}),[G,U]=(0,c.Z)("closeIcon",{elementType:S.Z,externalForwardedProps:Z,ownerState:A});return(0,v.jsxs)(L,{...F,children:[!1!==y?(0,v.jsx)(j,{...N,children:y||b[P]||T[P]}):null,(0,v.jsx)(z,{...B,children:a}),null!=r?(0,v.jsx)(V,{...H,children:r}):null,null==r&&x?(0,v.jsx)(V,{...H,children:(0,v.jsx)($,{size:"small","aria-label":l,title:l,color:"inherit",onClick:x,...W,children:(0,v.jsx)(G,{fontSize:"small",...U})})}):null]})}))},59685:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiAlert",e)}const a=(0,r.Z)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"])},77402:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(80706),c=n(38358),d=n(87861),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiAppBar",e)}(0,h.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var m=n(77928);const g=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,v=(0,a.ZP)(d.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,u.Z)(n.position)}`],t[`color${(0,u.Z)(n.color)}`]]}})((0,s.Z)((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[100],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[100]),...t.applyStyles("dark",{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[900],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[900])})}},...Object.entries(t.palette).filter((0,c.Z)(["contrastText"])).map((e=>{let[n]=e;return{props:{color:n},style:{"--AppBar-background":(t.vars??t).palette[n].main,"--AppBar-color":(t.vars??t).palette[n].contrastText}}})),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundColor:t.vars?g(t.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:t.vars?g(t.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundImage:"none"})}}]}}))),y=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAppBar"}),{className:r,color:a="primary",enableColorOnDark:s=!1,position:c="fixed",...d}=n,h={...n,color:a,position:c,enableColorOnDark:s},p=(e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${(0,u.Z)(t)}`,`position${(0,u.Z)(n)}`]};return(0,i.Z)(o,f,r)})(h);return(0,m.jsx)(v,{square:!0,component:"header",ownerState:h,elevation:4,className:(0,o.Z)(p.root,r,"fixed"===c&&"mui-fixed"),ref:t,...d})}))},47782:function(e,t,n){"use strict";n.d(t,{Z:()=>W});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(11278),l=n(72204),u=n(99289),c=n(97136),d=n(71959),h=n(80706),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiListSubheader",e)}(0,p.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var g=n(77928);const v=(0,u.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,h.Z)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((0,c.Z)((e=>{let{theme:t}=e;return{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(t.vars||t).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:e=>{let{ownerState:t}=e;return!t.disableGutters},style:{paddingLeft:16,paddingRight:16}},{props:e=>{let{ownerState:t}=e;return t.inset},style:{paddingLeft:72}},{props:e=>{let{ownerState:t}=e;return!t.disableSticky},style:{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper}}]}}))),y=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiListSubheader"}),{className:r,color:a="default",component:s="li",disableGutters:l=!1,disableSticky:u=!1,inset:c=!1,...p}=n,f={...n,color:a,component:s,disableGutters:l,disableSticky:u,inset:c},y=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,s={root:["root","default"!==n&&`color${(0,h.Z)(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return(0,i.Z)(s,m,t)})(f);return(0,g.jsx)(v,{as:s,className:(0,o.Z)(y.root,r),ref:t,ownerState:f,...p})}));y&&(y.muiSkipListHighlight=!0);const b=y;var x=n(87861),w=n(16639),S=n(48356),C=n(10175),k=n(87360),M=n(57773),_=n(23942),T=n(4947),P=n(94963);function I(e){return(0,f.ZP)("MuiAutocomplete",e)}const R=(0,p.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var D,O,A=n(81543);const E=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${R.tag}`]:t.tag},{[`& .${R.tag}`]:t[`tagSize${(0,h.Z)(s)}`]},{[`& .${R.inputRoot}`]:t.inputRoot},{[`& .${R.input}`]:t.input},{[`& .${R.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${R.focused} .${R.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${R.clearIndicator}`]:{visibility:"visible"}},[`& .${R.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${R.inputRoot}`]:{[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:30},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:56},[`& .${R.input}`]:{width:0,minWidth:30}},[`& .${C.Z.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${C.Z.root}.${k.Z.sizeSmall}`]:{[`& .${C.Z.input}`]:{padding:"2px 4px 3px 0"}},[`& .${M.Z.root}`]:{padding:9,[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:39},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:65},[`& .${R.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${R.endAdornment}`]:{right:9}},[`& .${M.Z.root}.${k.Z.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${R.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${_.Z.root}`]:{paddingTop:19,paddingLeft:8,[`.${R.hasPopupIcon}&, .${R.hasClearIcon}&`]:{paddingRight:39},[`.${R.hasPopupIcon}.${R.hasClearIcon}&`]:{paddingRight:65},[`& .${_.Z.input}`]:{padding:"7px 4px"},[`& .${R.endAdornment}`]:{right:9}},[`& .${_.Z.root}.${k.Z.sizeSmall}`]:{paddingBottom:1,[`& .${_.Z.input}`]:{padding:"2.5px 4px"}},[`& .${k.Z.hiddenLabel}`]:{paddingTop:8},[`& .${_.Z.root}.${k.Z.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${R.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${_.Z.root}.${k.Z.hiddenLabel}.${k.Z.sizeSmall}`]:{[`& .${R.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${R.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${R.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${R.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${R.inputRoot}`]:{flexWrap:"wrap"}}}]}),Z=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),L=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),F=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),j=(0,u.ZP)(l.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${R.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((0,c.Z)((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}}))),N=(0,u.ZP)(x.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((0,c.Z)((e=>{let{theme:t}=e;return{...t.typography.body1,overflow:"auto"}}))),z=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((0,c.Z)((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}))),B=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((0,c.Z)((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}))),V=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((0,c.Z)((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${R.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,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${R.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${R.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${R.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${R.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}}))),H=(0,u.ZP)(b,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((0,c.Z)((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}}))),$=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${R.option}`]:{paddingLeft:24}}),W=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiAutocomplete"}),{autoComplete:a=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:p=!1,ChipProps:f,className:m,clearIcon:v=D||(D=(0,g.jsx)(T.Z,{fontSize:"small"})),clearOnBlur:y=!n.freeSolo,clearOnEscape:b=!1,clearText:w="Clear",closeText:C="Close",componentsProps:k,defaultValue:M=(n.multiple?[]:null),disableClearable:_=!1,disableCloseOnSelect:R=!1,disabled:W=!1,disabledItemsFocusable:G=!1,disableListWrap:U=!1,disablePortal:q=!1,filterOptions:K,filterSelectedOptions:Y=!1,forcePopupIcon:X="auto",freeSolo:Q=!1,fullWidth:J=!1,getLimitTagsText:ee=e=>`+${e}`,getOptionDisabled:te,getOptionKey:ne,getOptionLabel:re,isOptionEqualToValue:oe,groupBy:ie,handleHomeEndKeys:ae=!n.freeSolo,id:se,includeInputInList:le=!1,inputValue:ue,limitTags:ce=-1,ListboxComponent:de,ListboxProps:he,loading:pe=!1,loadingText:fe="Loading…",multiple:me=!1,noOptionsText:ge="No options",onChange:ve,onClose:ye,onHighlightChange:be,onInputChange:xe,onOpen:we,open:Se,openOnFocus:Ce=!1,openText:ke="Open",options:Me,PaperComponent:_e,PopperComponent:Te,popupIcon:Pe=O||(O=(0,g.jsx)(P.Z,{})),readOnly:Ie=!1,renderGroup:Re,renderInput:De,renderOption:Oe,renderTags:Ae,selectOnFocus:Ee=!n.freeSolo,size:Ze="medium",slots:Le={},slotProps:Fe={},value:je,...Ne}=n,{getRootProps:ze,getInputProps:Be,getInputLabelProps:Ve,getPopupIndicatorProps:He,getClearProps:$e,getTagProps:We,getListboxProps:Ge,getOptionProps:Ue,value:qe,dirty:Ke,expanded:Ye,id:Xe,popupOpen:Qe,focused:Je,focusedTag:et,anchorEl:tt,setAnchorEl:nt,inputValue:rt,groupedOptions:ot}=(0,s.Z)({...n,componentName:"Autocomplete"}),it=!_&&!W&&Ke&&!Ie,at=(!Q||!0===X)&&!1!==X,{onMouseDown:st}=Be(),{ref:lt,...ut}=Ge(),ct=re||(e=>e.label??e),dt={...n,disablePortal:q,expanded:Ye,focused:Je,fullWidth:J,getOptionLabel:ct,hasClearIcon:it,hasPopupIcon:at,inputFocused:-1===et,popupOpen:Qe,size:Ze},ht=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:s,hasPopupIcon:l,inputFocused:u,popupOpen:c,size:d}=e,p={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",s&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",u&&"inputFocused"],tag:["tag",`tagSize${(0,h.Z)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,i.Z)(p,I,t)})(dt),pt={slots:{paper:_e,popper:Te,...Le},slotProps:{chip:f,listbox:he,...k,...Fe}},[ft,mt]=(0,A.Z)("listbox",{elementType:V,externalForwardedProps:pt,ownerState:dt,className:ht.listbox,additionalProps:ut,ref:lt}),[gt,vt]=(0,A.Z)("paper",{elementType:x.Z,externalForwardedProps:pt,ownerState:dt,className:ht.paper}),[yt,bt]=(0,A.Z)("popper",{elementType:l.Z,externalForwardedProps:pt,ownerState:dt,className:ht.popper,additionalProps:{disablePortal:q,style:{width:tt?tt.clientWidth:null},role:"presentation",anchorEl:tt,open:Qe}});let xt;if(me&&qe.length>0){const e=e=>({className:ht.tag,disabled:W,...We(e)});xt=Ae?Ae(qe,e,dt):qe.map(((t,n)=>{const{key:r,...o}=e({index:n});return(0,g.jsx)(S.Z,{label:ct(t),size:Ze,...o,...pt.slotProps.chip},r)}))}if(ce>-1&&Array.isArray(xt)){const e=xt.length-ce;!Je&&e>0&&(xt=xt.splice(0,ce),xt.push((0,g.jsx)("span",{className:ht.tag,children:ee(e)},xt.length)))}const wt=Re||(e=>(0,g.jsxs)("li",{children:[(0,g.jsx)(H,{className:ht.groupLabel,ownerState:dt,component:"div",children:e.group}),(0,g.jsx)($,{className:ht.groupUl,ownerState:dt,children:e.children})]},e.key)),St=Oe||((e,t)=>{const{key:n,...r}=e;return(0,g.jsx)("li",{...r,children:ct(t)},n)}),Ct=(e,t)=>{const n=Ue({option:e,index:t});return St({...n,className:ht.option},e,{selected:n["aria-selected"],index:t,inputValue:rt},dt)},kt=pt.slotProps.clearIndicator,Mt=pt.slotProps.popupIndicator;return(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(E,{ref:t,className:(0,o.Z)(ht.root,m),ownerState:dt,...ze(Ne),children:De({id:Xe,disabled:W,fullWidth:!0,size:"small"===Ze?"small":void 0,InputLabelProps:Ve(),InputProps:{ref:nt,className:ht.inputRoot,startAdornment:xt,onMouseDown:e=>{e.target===e.currentTarget&&st(e)},...(it||at)&&{endAdornment:(0,g.jsxs)(Z,{className:ht.endAdornment,ownerState:dt,children:[it?(0,g.jsx)(L,{...$e(),"aria-label":w,title:w,ownerState:dt,...kt,className:(0,o.Z)(ht.clearIndicator,null==kt?void 0:kt.className),children:v}):null,at?(0,g.jsx)(F,{...He(),disabled:W,"aria-label":Qe?C:ke,title:Qe?C:ke,ownerState:dt,...Mt,className:(0,o.Z)(ht.popupIndicator,null==Mt?void 0:Mt.className),children:Pe}):null]})}},inputProps:{className:ht.input,disabled:W,readOnly:Ie,...Be()}})}),tt?(0,g.jsx)(j,{as:yt,...bt,children:(0,g.jsxs)(N,{as:gt,...vt,children:[pe&&0===ot.length?(0,g.jsx)(z,{className:ht.loading,ownerState:dt,children:fe}):null,0!==ot.length||Q||pe?null:(0,g.jsx)(B,{className:ht.noOptions,ownerState:dt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ge}),ot.length>0?(0,g.jsx)(ft,{as:de,...mt,children:ot.map(((e,t)=>ie?wt({key:e.key,group:e.group,children:e.options.map(((t,n)=>Ct(t,e.index+n)))}):Ct(e,t)))}):null]})}):null]})}))},39866:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(81543),u=n(75303),c=n(32792),d=n(19577);function h(e){return(0,d.ZP)("MuiBackdrop",e)}(0,c.Z)("MuiBackdrop",["root","invisible"]);var p=n(77928);const f=(0,a.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),m=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiBackdrop"}),{children:r,className:a,component:c="div",invisible:d=!1,open:m,components:g={},componentsProps:v={},slotProps:y={},slots:b={},TransitionComponent:x,transitionDuration:w,...S}=n,C={...n,component:c,invisible:d},k=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,i.Z)(r,h,t)})(C),M={slots:{transition:x,root:g.Root,...b},slotProps:{...v,...y}},[_,T]=(0,l.Z)("root",{elementType:f,externalForwardedProps:M,className:(0,o.Z)(k.root,a),ownerState:C}),[P,I]=(0,l.Z)("transition",{elementType:u.Z,externalForwardedProps:M,ownerState:C});return(0,p.jsx)(P,{in:m,timeout:w,...S,...I,children:(0,p.jsx)(_,{"aria-hidden":!0,...T,classes:k,ref:t,children:r})})}))},61045:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(32123),o=n(90496),i=n(55126),a=n(3645),s=n(89574),l=n(68555),u=n(77928);var c=n(83177),d=n(3254),h=n(31322);const p=(0,n(32792).Z)("MuiBox",["root"]),f=(0,d.Z)(),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:c="MuiBox-root",generateClassName:d}=e,h=(0,i.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(a.Z);return r.forwardRef((function(e,r){const i=(0,l.Z)(n),{className:a,component:p="div",...f}=(0,s.Z)(e);return(0,u.jsx)(h,{as:p,ref:r,className:(0,o.Z)(a,d?d(c):c),theme:t&&i[t]||i,...f})}))}({themeId:h.Z,defaultTheme:f,defaultClassName:p.root,generateClassName:c.Z.generate}),g=m},46724:function(e,t,n){"use strict";n.d(t,{Z:()=>R});var r=n(32123),o=n(90496),i=n(75214),a=n(42152),s=n(79717),l=n(50917),u=n(51977),c=n(99289),d=n(97136),h=n(71959),p=n(89865),f=n(23437),m=n(80706),g=n(38358),v=n(32792),y=n(19577);function b(e){return(0,y.ZP)("MuiButton",e)}const x=(0,v.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);var w=n(63578),S=n(90267),C=n(77928);const k=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],M=(0,c.ZP)(p.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,m.Z)(n.color)}`],t[`size${(0,m.Z)(n.size)}`],t[`${n.variant}Size${(0,m.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,d.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],r="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${x.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${x.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${x.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${x.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter((0,g.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{"--variant-textColor":(t.vars||t).palette[n].main,"--variant-outlinedColor":(t.vars||t).palette[n].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.5)`:(0,s.Fq)(t.palette[n].main,.5),"--variant-containedColor":(t.vars||t).palette[n].contrastText,"--variant-containedBg":(t.vars||t).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[n].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)(t.palette[n].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[n].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)(t.palette[n].main,t.palette.action.hoverOpacity)}}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:n,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${x.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${x.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${x.loading}`]:{color:"transparent"}}}]}}))),_=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.Z)(n.size)}`]]}})((e=>{let{theme:t}=e;return{display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...k]}})),T=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.Z)(n.size)}`]]}})((e=>{let{theme:t}=e;return{display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...k]}})),P=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((e=>{let{theme:t}=e;return{display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}})),I=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),R=r.forwardRef((function(e,t){const n=r.useContext(w.Z),s=r.useContext(S.Z),u=(0,i.Z)(n,e),c=(0,h.i)({props:u,name:"MuiButton"}),{children:d,color:p="primary",component:g="button",className:v,disabled:y=!1,disableElevation:x=!1,disableFocusRipple:k=!1,endIcon:R,focusVisibleClassName:D,fullWidth:O=!1,id:A,loading:E=null,loadingIndicator:Z,loadingPosition:L="center",size:F="medium",startIcon:j,type:N,variant:z="text",...B}=c,V=(0,l.Z)(A),H=Z??(0,C.jsx)(f.Z,{"aria-labelledby":V,color:"inherit",size:16}),$={...c,color:p,component:g,disabled:y,disableElevation:x,disableFocusRipple:k,fullWidth:O,loading:E,loadingIndicator:H,loadingPosition:L,size:F,type:N,variant:z},W=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:l,classes:u}=e,c={root:["root",s&&"loading",i,`${i}${(0,m.Z)(t)}`,`size${(0,m.Z)(o)}`,`${i}Size${(0,m.Z)(o)}`,`color${(0,m.Z)(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${(0,m.Z)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,m.Z)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,m.Z)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=(0,a.Z)(c,b,u);return{...u,...d}})($),G=(j||E&&"start"===L)&&(0,C.jsx)(_,{className:W.startIcon,ownerState:$,children:j||(0,C.jsx)(I,{className:W.loadingIconPlaceholder,ownerState:$})}),U=(R||E&&"end"===L)&&(0,C.jsx)(T,{className:W.endIcon,ownerState:$,children:R||(0,C.jsx)(I,{className:W.loadingIconPlaceholder,ownerState:$})}),q=s||"",K="boolean"==typeof E?(0,C.jsx)("span",{className:W.loadingWrapper,style:{display:"contents"},children:E&&(0,C.jsx)(P,{className:W.loadingIndicator,ownerState:$,children:H})}):null;return(0,C.jsxs)(M,{ownerState:$,className:(0,o.Z)(n.className,W.root,v,q),component:g,disabled:y||E,focusRipple:!k,focusVisibleClassName:(0,o.Z)(W.focusVisible,D),ref:t,type:N,id:E?V:A,...B,classes:W,children:[G,"end"!==L&&K,d,"end"===L&&K,U]})}))},89865:function(e,t,n){"use strict";n.d(t,{Z:()=>O});var r=n(32123),o=n(90496),i=n(42152),a=n(5129),s=n(99289),l=n(71959),u=n(70021),c=n(85270),d=n(89039);class h{static create(){return new h}static use(){const e=(0,d.Z)(h.create).current,[t,n]=r.useState(!1);return e.shouldMount=t,e.setShouldMount=n,r.useEffect(e.mountEffect,[t]),e}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(){for(var e=arguments.length,t=new Array(e),n=0;n{var e;return null===(e=this.ref.current)||void 0===e?void 0:e.start(...t)}))}stop(){for(var e=arguments.length,t=new Array(e),n=0;n{var e;return null===(e=this.ref.current)||void 0===e?void 0:e.stop(...t)}))}pulsate(){for(var e=arguments.length,t=new Array(e),n=0;n{var e;return null===(e=this.ref.current)||void 0===e?void 0:e.pulsate(...t)}))}constructor(){var e,t,n;n=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())},(t="mountEffect")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}}var p=n(47742),f=n(51154),m=n(39962),g=n(77928);const v=function(e){const{className:t,classes:n,pulsate:i=!1,rippleX:a,rippleY:s,rippleSize:l,in:u,onExited:c,timeout:d}=e,[h,p]=r.useState(!1),f=(0,o.Z)(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+a},v=(0,o.Z)(n.child,h&&n.childLeaving,i&&n.childPulsate);return u||h||p(!0),r.useEffect((()=>{if(!u&&null!=c){const e=setTimeout(c,d);return()=>{clearTimeout(e)}}}),[c,u,d]),(0,g.jsx)("span",{className:f,style:m,children:(0,g.jsx)("span",{className:v})})};var y=n(32792);const b=(0,y.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),x=m.keyframes` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `,w=m.keyframes` 0% { opacity: 1; } 100% { opacity: 0; } `,S=m.keyframes` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `,C=(0,s.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),k=(0,s.ZP)(v,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; &.${b.rippleVisible} { opacity: 0.3; transform: scale(1); animation-name: ${x}; animation-duration: ${550}ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; } &.${b.ripplePulsate} { animation-duration: ${e=>{let{theme:t}=e;return t.transitions.duration.shorter}}ms; } & .${b.child} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${b.childLeaving} { opacity: 0; animation-name: ${w}; animation-duration: ${550}ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; } & .${b.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${S}; animation-duration: 2500ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; animation-iteration-count: infinite; animation-delay: 200ms; } `,M=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...u}=n,[c,d]=r.useState([]),h=r.useRef(0),m=r.useRef(null);r.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[c]);const v=r.useRef(!1),y=(0,f.Z)(),x=r.useRef(null),w=r.useRef(null),S=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:s}=e;d((e=>[...e,(0,g.jsx)(k,{classes:{ripple:(0,o.Z)(a.ripple,b.ripple),rippleVisible:(0,o.Z)(a.rippleVisible,b.rippleVisible),ripplePulsate:(0,o.Z)(a.ripplePulsate,b.ripplePulsate),child:(0,o.Z)(a.child,b.child),childLeaving:(0,o.Z)(a.childLeaving,b.childLeaving),childPulsate:(0,o.Z)(a.childPulsate,b.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},h.current)])),h.current+=1,m.current=s}),[a]),M=r.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&v.current)return void(v.current=!1);"touchstart"===(null==e?void 0:e.type)&&(v.current=!0);const s=a?null:w.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}(null==e?void 0:e.touches)?null===x.current&&(x.current=()=>{S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})},y.start(80,(()=>{x.current&&(x.current(),x.current=null)}))):S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})}),[i,S,y]),_=r.useCallback((()=>{M({},{pulsate:!0})}),[M]),T=r.useCallback(((e,t)=>{if(y.clear(),"touchend"===(null==e?void 0:e.type)&&x.current)return x.current(),x.current=null,void y.start(0,(()=>{T(e,t)}));x.current=null,d((e=>e.length>0?e.slice(1):e)),m.current=t}),[y]);return r.useImperativeHandle(t,(()=>({pulsate:_,start:M,stop:T})),[_,M,T]),(0,g.jsx)(C,{className:(0,o.Z)(b.root,a.root,s),ref:w,...u,children:(0,g.jsx)(p.Z,{component:null,exit:!0,children:c})})})),_=M;var T=n(19577);function P(e){return(0,T.ZP)("MuiButtonBase",e)}const I=(0,y.Z)("MuiButtonBase",["root","disabled","focusVisible"]),R=(0,s.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${I.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function D(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(0,c.Z)((o=>(n&&n(o),r||e[t](o),!0)))}const O=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:d=!1,children:p,className:f,component:m="button",disabled:v=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:x=!1,focusVisibleClassName:w,LinkComponent:S="a",onBlur:C,onClick:k,onContextMenu:M,onDragLeave:T,onFocus:I,onFocusVisible:O,onKeyDown:A,onKeyUp:E,onMouseDown:Z,onMouseLeave:L,onMouseUp:F,onTouchEnd:j,onTouchMove:N,onTouchStart:z,tabIndex:B=0,TouchRippleProps:V,touchRippleRef:H,type:$,...W}=n,G=r.useRef(null),U=h.use(),q=(0,u.Z)(U.ref,H),[K,Y]=r.useState(!1);v&&K&&Y(!1),r.useImperativeHandle(s,(()=>({focusVisible:()=>{Y(!0),G.current.focus()}})),[]);const X=U.shouldMount&&!y&&!v;r.useEffect((()=>{K&&x&&!y&&U.pulsate()}),[y,x,K,U]);const Q=D(U,"start",Z,b),J=D(U,"stop",M,b),ee=D(U,"stop",T,b),te=D(U,"stop",F,b),ne=D(U,"stop",(e=>{K&&e.preventDefault(),L&&L(e)}),b),re=D(U,"start",z,b),oe=D(U,"stop",j,b),ie=D(U,"stop",N,b),ae=D(U,"stop",(e=>{(0,a.Z)(e.target)||Y(!1),C&&C(e)}),!1),se=(0,c.Z)((e=>{G.current||(G.current=e.currentTarget),(0,a.Z)(e.target)&&(Y(!0),O&&O(e)),I&&I(e)})),le=()=>{const e=G.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},ue=(0,c.Z)((e=>{x&&!e.repeat&&K&&" "===e.key&&U.stop(e,(()=>{U.start(e)})),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!v&&(e.preventDefault(),k&&k(e))})),ce=(0,c.Z)((e=>{x&&" "===e.key&&K&&!e.defaultPrevented&&U.stop(e,(()=>{U.pulsate(e)})),E&&E(e),k&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&k(e)}));let de=m;"button"===de&&(W.href||W.to)&&(de=S);const he={};"button"===de?(he.type=void 0===$?"button":$,he.disabled=v):(W.href||W.to||(he.role="button"),v&&(he["aria-disabled"]=v));const pe=(0,u.Z)(t,G),fe={...n,centerRipple:d,component:m,disabled:v,disableRipple:y,disableTouchRipple:b,focusRipple:x,tabIndex:B,focusVisible:K},me=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a={root:["root",t&&"disabled",n&&"focusVisible"]},s=(0,i.Z)(a,P,o);return n&&r&&(s.root+=` ${r}`),s})(fe);return(0,g.jsxs)(R,{as:de,className:(0,o.Z)(me.root,f),ownerState:fe,onBlur:ae,onClick:k,onContextMenu:J,onFocus:se,onKeyDown:ue,onKeyUp:ce,onMouseDown:Q,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:oe,onTouchMove:ie,onTouchStart:re,ref:pe,tabIndex:v?-1:B,type:$,...he,...W,children:[p,X?(0,g.jsx)(_,{ref:q,center:d,...V}):null]})}))},14937:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(54936),l=n(80706),u=n(99289),c=n(97136),d=n(38358),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiButtonGroup",e)}const g=(0,p.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var v=n(63578),y=n(90267),b=n(77928);const x=(0,u.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.grouped}`]:t.grouped},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.orientation)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}${(0,l.Z)(n.orientation)}`]},{[`& .${g.grouped}`]:t[`grouped${(0,l.Z)(n.variant)}${(0,l.Z)(n.color)}`]},{[`& .${g.firstButton}`]:t.firstButton},{[`& .${g.lastButton}`]:t.lastButton},{[`& .${g.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,c.Z)((e=>{let{theme:t}=e;return{display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(t.vars||t).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${g.lastButton},& .${g.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${g.lastButton},& .${g.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRight:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${g.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottom:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${g.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter((0,d.Z)()).flatMap((e=>{let[n]=e;return[{props:{variant:"text",color:n},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.5)`:(0,a.Fq)(t.palette[n].main,.5)}}}]})),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${g.lastButton},& .${g.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${g.lastButton},& .${g.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${g.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${g.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}}}},...Object.entries(t.palette).filter((0,d.Z)(["dark"])).map((e=>{let[n]=e;return{props:{variant:"contained",color:n},style:{[`& .${g.firstButton},& .${g.middleButton}`]:{borderColor:(t.vars||t).palette[n].dark}}}}))],[`& .${g.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}}))),w=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiButtonGroup"}),{children:a,className:u,color:c="primary",component:d="div",disabled:p=!1,disableElevation:f=!1,disableFocusRipple:g=!1,disableRipple:w=!1,fullWidth:S=!1,orientation:C="horizontal",size:k="medium",variant:M="outlined",..._}=n,T={...n,color:c,component:d,disabled:p,disableElevation:f,disableFocusRipple:g,disableRipple:w,fullWidth:S,orientation:C,size:k,variant:M},P=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:a,orientation:s,variant:u}=e,c={root:["root",u,s,a&&"fullWidth",o&&"disableElevation",`color${(0,l.Z)(n)}`],grouped:["grouped",`grouped${(0,l.Z)(s)}`,`grouped${(0,l.Z)(u)}`,`grouped${(0,l.Z)(u)}${(0,l.Z)(s)}`,`grouped${(0,l.Z)(u)}${(0,l.Z)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,i.Z)(c,m,t)})(T),I=r.useMemo((()=>({className:P.grouped,color:c,disabled:p,disableElevation:f,disableFocusRipple:g,disableRipple:w,fullWidth:S,size:k,variant:M})),[c,p,f,g,w,S,k,M,P.grouped]),R=(0,s.Z)(a),D=R.length,O=e=>{const t=0===e,n=e===D-1;return t&&n?"":t?P.firstButton:n?P.lastButton:P.middleButton};return(0,b.jsx)(x,{as:d,role:"group",className:(0,o.Z)(P.root,u),ref:t,ownerState:T,..._,children:(0,b.jsx)(v.Z.Provider,{value:I,children:R.map(((e,t)=>(0,b.jsx)(y.Z.Provider,{value:O(t),children:e},t)))})})}))},90267:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext(void 0)},63578:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext({})},9339:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(87861),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiCard",e)}(0,u.Z)("MuiCard",["root"]);var h=n(77928);const p=(0,a.ZP)(l.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCard"}),{className:r,raised:a=!1,...l}=n,u={...n,raised:a},c=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(u);return(0,h.jsx)(p,{className:(0,o.Z)(c.root,r),elevation:a?8:void 0,ref:t,ownerState:u,...l})}))},818:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(32792),u=n(19577);function c(e){return(0,u.ZP)("MuiCardContent",e)}(0,l.Z)("MuiCardContent",["root"]);var d=n(77928);const h=(0,a.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCardContent"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{as:a,className:(0,o.Z)(p.root,r),ownerState:u,ref:t,...l})}))},12242:function(e,t,n){"use strict";n.d(t,{Z:()=>I});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(5514),l=n(57698),u=n(77928);const c=(0,l.Z)((0,u.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),d=(0,l.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,l.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var p=n(80706),f=n(51977),m=n(32792),g=n(19577);function v(e){return(0,g.ZP)("MuiCheckbox",e)}const y=(0,m.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var b=n(99289),x=n(97136),w=n(38358),S=n(71959),C=n(76152),k=n(81543);const M=(0,b.ZP)(s.Z,{shouldForwardProp:e=>(0,f.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,p.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,p.Z)(n.color)}`]]}})((0,x.Z)((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette.action.active,t.palette.action.hoverOpacity)}}},...Object.entries(t.palette).filter((0,w.Z)()).map((e=>{let[n]=e;return{props:{color:n,disableRipple:!1},style:{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette[n].main,t.palette.action.hoverOpacity)}}}})),...Object.entries(t.palette).filter((0,w.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${y.checked}, &.${y.indeterminate}`]:{color:(t.vars||t).palette[n].main},[`&.${y.disabled}`]:{color:(t.vars||t).palette.action.disabled}}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}}))),_=(0,u.jsx)(d,{}),T=(0,u.jsx)(c,{}),P=(0,u.jsx)(h,{}),I=r.forwardRef((function(e,t){const n=(0,S.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:a=_,color:s="primary",icon:l=T,indeterminate:c=!1,indeterminateIcon:d=P,inputProps:h,size:f="medium",disableRipple:m=!1,className:g,slots:y={},slotProps:b={},...x}=n,w=c?d:l,I=c?d:a,R={...n,disableRipple:m,color:s,indeterminate:c,size:f},D=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,a={root:["root",n&&"indeterminate",`color${(0,p.Z)(r)}`,`size${(0,p.Z)(o)}`]},s=(0,i.Z)(a,v,t);return{...t,...s}})(R),O=b.input??h,[A,E]=(0,k.Z)("root",{ref:t,elementType:M,className:(0,o.Z)(D.root,g),shouldForwardComponentProp:!0,externalForwardedProps:{slots:y,slotProps:b,...x},ownerState:R,additionalProps:{type:"checkbox",icon:r.cloneElement(w,{fontSize:w.props.fontSize??f}),checkedIcon:r.cloneElement(I,{fontSize:I.props.fontSize??f}),disableRipple:m,slots:y,slotProps:{input:(0,C.Z)("function"==typeof O?O(R):O,{"data-indeterminate":c})}}});return(0,u.jsx)(A,{...E,classes:D})}))},48356:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(57698),l=n(77928);const u=(0,s.Z)((0,l.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var c=n(70021),d=n(80706),h=n(89865),p=n(99289),f=n(97136),m=n(38358),g=n(71959),v=n(32792),y=n(19577);function b(e){return(0,y.ZP)("MuiChip",e)}const x=(0,v.Z)("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),w=(0,p.ZP)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${x.avatar}`]:t.avatar},{[`& .${x.avatar}`]:t[`avatar${(0,d.Z)(s)}`]},{[`& .${x.avatar}`]:t[`avatarColor${(0,d.Z)(r)}`]},{[`& .${x.icon}`]:t.icon},{[`& .${x.icon}`]:t[`icon${(0,d.Z)(s)}`]},{[`& .${x.icon}`]:t[`iconColor${(0,d.Z)(o)}`]},{[`& .${x.deleteIcon}`]:t.deleteIcon},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(s)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIconColor${(0,d.Z)(r)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(l)}Color${(0,d.Z)(r)}`]},t.root,t[`size${(0,d.Z)(s)}`],t[`color${(0,d.Z)(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${(0,d.Z)(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${(0,d.Z)(r)}`],t[l],t[`${l}${(0,d.Z)(r)}`]]}})((0,f.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${x.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${x.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${x.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${x.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${x.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${x.icon}`]:{marginLeft:5,marginRight:-6},[`& .${x.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:(0,a.Fq)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:(0,a.Fq)(t.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${x.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${x.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter((0,m.Z)(["contrastText"])).map((e=>{let[n]=e;return{props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${x.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].contrastTextChannel} / 0.7)`:(0,a.Fq)(t.palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${x.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:n}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${x.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${x.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,a.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}},...Object.entries(t.palette).filter((0,m.Z)(["dark"])).map((e=>{let[n]=e;return{props:{color:n,onDelete:!0},style:{[`&.${x.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,a.Fq)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter((0,m.Z)(["dark"])).map((e=>{let[n]=e;return{props:{color:n,clickable:!0},style:{[`&:hover, &.${x.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${x.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${x.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${x.avatar}`]:{marginLeft:4},[`& .${x.avatarSmall}`]:{marginLeft:2},[`& .${x.icon}`]:{marginLeft:4},[`& .${x.iconSmall}`]:{marginLeft:2},[`& .${x.deleteIcon}`]:{marginRight:5},[`& .${x.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter((0,m.Z)()).map((e=>{let[n]=e;return{props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:(0,a.Fq)(t.palette[n].main,.7)}`,[`&.${x.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette[n].main,t.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,a.Fq)(t.palette[n].main,t.palette.action.focusOpacity)},[`& .${x.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:(0,a.Fq)(t.palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}}))]}}))),S=(0,p.ZP)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,d.Z)(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function C(e){return"Backspace"===e.key||"Delete"===e.key}const k=r.forwardRef((function(e,t){const n=(0,g.i)({props:e,name:"MuiChip"}),{avatar:a,className:s,clickable:p,color:f="default",component:m,deleteIcon:v,disabled:y=!1,icon:x,label:k,onClick:M,onDelete:_,onKeyDown:T,onKeyUp:P,size:I="medium",variant:R="filled",tabIndex:D,skipFocusWhenDisabled:O=!1,...A}=n,E=r.useRef(null),Z=(0,c.Z)(E,t),L=e=>{e.stopPropagation(),_&&_(e)},F=!(!1===p||!M)||p,j=F||_?h.Z:m||"div",N={...n,component:j,disabled:y,size:I,color:f,iconColor:r.isValidElement(x)&&x.props.color||f,onDelete:!!_,clickable:F,variant:R},z=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:s,clickable:l,variant:u}=e,c={root:["root",u,n&&"disabled",`size${(0,d.Z)(r)}`,`color${(0,d.Z)(o)}`,l&&"clickable",l&&`clickableColor${(0,d.Z)(o)}`,s&&"deletable",s&&`deletableColor${(0,d.Z)(o)}`,`${u}${(0,d.Z)(o)}`],label:["label",`label${(0,d.Z)(r)}`],avatar:["avatar",`avatar${(0,d.Z)(r)}`,`avatarColor${(0,d.Z)(o)}`],icon:["icon",`icon${(0,d.Z)(r)}`,`iconColor${(0,d.Z)(a)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,d.Z)(r)}`,`deleteIconColor${(0,d.Z)(o)}`,`deleteIcon${(0,d.Z)(u)}Color${(0,d.Z)(o)}`]};return(0,i.Z)(c,b,t)})(N),B=j===h.Z?{component:m||"div",focusVisibleClassName:z.focusVisible,..._&&{disableRipple:!0}}:{};let V=null;_&&(V=v&&r.isValidElement(v)?r.cloneElement(v,{className:(0,o.Z)(v.props.className,z.deleteIcon),onClick:L}):(0,l.jsx)(u,{className:(0,o.Z)(z.deleteIcon),onClick:L}));let H=null;a&&r.isValidElement(a)&&(H=r.cloneElement(a,{className:(0,o.Z)(z.avatar,a.props.className)}));let $=null;return x&&r.isValidElement(x)&&($=r.cloneElement(x,{className:(0,o.Z)(z.icon,x.props.className)})),(0,l.jsxs)(w,{as:j,className:(0,o.Z)(z.root,s),disabled:!(!F||!y)||void 0,onClick:M,onKeyDown:e=>{e.currentTarget===e.target&&C(e)&&e.preventDefault(),T&&T(e)},onKeyUp:e=>{e.currentTarget===e.target&&_&&C(e)&&_(e),P&&P(e)},ref:Z,tabIndex:O&&y?-1:D,ownerState:N,...B,...A,children:[H||$,(0,l.jsx)(S,{className:(0,o.Z)(z.label),ownerState:N,children:k}),V]})}))},23437:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(32123),o=n(90496),i=n(42152),a=n(39962),s=n(99289),l=n(97136),u=n(71959),c=n(80706),d=n(38358),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=n(77928);const g=44,v=a.keyframes` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,y=a.keyframes` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 1px, 200px; stroke-dashoffset: -126px; } `,b="string"!=typeof v?a.css` animation: ${v} 1.4s linear infinite; `:null,x="string"!=typeof y?a.css` animation: ${y} 1.4s ease-in-out infinite; `:null,w=(0,s.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,c.Z)(n.color)}`]]}})((0,l.Z)((e=>{let{theme:t}=e;return{display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:b||{animation:`${v} 1.4s linear infinite`}},...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}}))]}}))),S=(0,s.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),C=(0,s.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,c.Z)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,l.Z)((e=>{let{theme:t}=e;return{stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink},style:x||{animation:`${y} 1.4s ease-in-out infinite`}}]}}))),k=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiCircularProgress"}),{className:r,color:a="primary",disableShrink:s=!1,size:l=40,style:d,thickness:h=3.6,value:p=0,variant:v="indeterminate",...y}=n,b={...n,color:a,disableShrink:s,size:l,thickness:h,value:p,variant:v},x=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${(0,c.Z)(r)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(n)}`,o&&"circleDisableShrink"]};return(0,i.Z)(a,f,t)})(b),k={},M={},_={};if("determinate"===v){const e=2*Math.PI*((g-h)/2);k.strokeDasharray=e.toFixed(3),_["aria-valuenow"]=Math.round(p),k.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,M.transform="rotate(-90deg)"}return(0,m.jsx)(w,{className:(0,o.Z)(x.root,r),style:{width:l,height:l,...M,...d},ownerState:b,ref:t,role:"progressbar",..._,...y,children:(0,m.jsx)(S,{className:x.svg,ownerState:b,viewBox:"22 22 44 44",children:(0,m.jsx)(C,{className:x.circle,style:k,ownerState:b,cx:g,cy:g,r:(g-h)/2,fill:"none",strokeWidth:h})})})}))},73140:function(e,t,n){"use strict";n.d(t,{d:()=>u});var r=n(32123),o=n(84075),i=n(49098),a=n(769),s=n(41636);function l(e){return e.substring(2).toLowerCase()}function u(e){const{children:t,disableReactTree:n=!1,mouseEvent:u="onClick",onClickAway:c,touchEvent:d="onTouchEnd"}=e,h=r.useRef(!1),p=r.useRef(null),f=r.useRef(!1),m=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{f.current=!0}),0),()=>{f.current=!1})),[]);const g=(0,o.Z)((0,s.Z)(t),p),v=(0,i.Z)((e=>{const t=m.current;m.current=!1;const r=(0,a.Z)(p.current);if(!f.current||!p.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidthn=>{m.current=!0;const r=t.props[e];r&&r(n)},b={ref:g};return!1!==d&&(b[d]=y(d)),r.useEffect((()=>{if(!1!==d){const e=l(d),t=(0,a.Z)(p.current),n=()=>{h.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",n)}}}),[v,d]),!1!==u&&(b[u]=y(u)),r.useEffect((()=>{if(!1!==u){const e=l(u),t=(0,a.Z)(p.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}}),[v,u]),r.cloneElement(t,b)}},50942:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(32123),o=n(90496),i=n(3682),a=n(51154),s=n(42152),l=n(99289),u=n(35224),c=n(97136),d=n(71959),h=n(10042),p=n(9919),f=n(70021),m=n(32792),g=n(19577);function v(e){return(0,g.ZP)("MuiCollapse",e)}(0,m.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=n(77928);const b=(0,l.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((0,c.Z)((e=>{let{theme:t}=e;return{height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:e=>{let{ownerState:t}=e;return"exited"===t.state&&!t.in&&"0px"===t.collapsedSize},style:{visibility:"hidden"}}]}}))),x=(0,l.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),w=(0,l.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),S=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiCollapse"}),{addEndListener:l,children:c,className:m,collapsedSize:g="0px",component:S,easing:C,in:k,onEnter:M,onEntered:_,onEntering:T,onExit:P,onExited:I,onExiting:R,orientation:D="vertical",style:O,timeout:A=h.x9.standard,TransitionComponent:E=i.ZP,...Z}=n,L={...n,orientation:D,collapsedSize:g},F=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,s.Z)(r,v,n)})(L),j=(0,u.Z)(),N=(0,a.Z)(),z=r.useRef(null),B=r.useRef(),V="number"==typeof g?`${g}px`:g,H="horizontal"===D,$=H?"width":"height",W=r.useRef(null),G=(0,f.Z)(t,W),U=e=>t=>{if(e){const n=W.current;void 0===t?e(n):e(n,t)}},q=()=>z.current?z.current[H?"clientWidth":"clientHeight"]:0,K=U(((e,t)=>{z.current&&H&&(z.current.style.position="absolute"),e.style[$]=V,M&&M(e,t)})),Y=U(((e,t)=>{const n=q();z.current&&H&&(z.current.style.position="");const{duration:r,easing:o}=(0,p.C)({style:O,timeout:A,easing:C},{mode:"enter"});if("auto"===A){const t=j.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,B.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[$]=`${n}px`,e.style.transitionTimingFunction=o,T&&T(e,t)})),X=U(((e,t)=>{e.style[$]="auto",_&&_(e,t)})),Q=U((e=>{e.style[$]=`${q()}px`,P&&P(e)})),J=U(I),ee=U((e=>{const t=q(),{duration:n,easing:r}=(0,p.C)({style:O,timeout:A,easing:C},{mode:"exit"});if("auto"===A){const n=j.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,B.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[$]=V,e.style.transitionTimingFunction=r,R&&R(e)}));return(0,y.jsx)(E,{in:k,onEnter:K,onEntered:X,onEntering:Y,onExit:Q,onExited:J,onExiting:ee,addEndListener:e=>{"auto"===A&&N.start(B.current||0,e),l&&l(W.current,e)},nodeRef:W,timeout:"auto"===A?null:A,...Z,children:(e,t)=>{let{ownerState:n,...r}=t;return(0,y.jsx)(b,{as:S,className:(0,o.Z)(F.root,m,{entered:F.entered,exited:!k&&"0px"===V&&F.hidden}[e]),style:{[H?"minWidth":"minHeight"]:V,...O},ref:G,ownerState:{...L,state:e},...r,children:(0,y.jsx)(x,{ownerState:{...L,state:e},className:F.wrapper,ref:z,children:(0,y.jsx)(w,{ownerState:{...L,state:e},className:F.wrapperInner,children:c})})})}})}));S&&(S.muiSupportAuto=!0);const C=S},71959:function(e,t,n){"use strict";n.d(t,{i:()=>o});n(32123);var r=n(39907);n(77928);function o(e){return(0,r.i)(e)}},58731:function(e,t,n){"use strict";n.d(t,{Z:()=>T});var r=n(32123),o=n(90496),i=n(42152),a=n(30341),s=n(80706),l=n(43029),u=n(75303),c=n(87861),d=n(32792),h=n(19577);function p(e){return(0,h.ZP)("MuiDialog",e)}const f=(0,d.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var m=n(78814),g=n(39866),v=n(99289),y=n(35224),b=n(97136),x=n(71959),w=n(81543),S=n(77928);const C=(0,v.ZP)(g.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),k=(0,v.ZP)(l.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),M=(0,v.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,s.Z)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),_=(0,v.ZP)(c.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,s.Z)(n.scroll)}`],t[`paperWidth${(0,s.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,b.Z)((e=>{let{theme:t}=e;return{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:e=>{let{ownerState:t}=e;return!t.maxWidth},style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${f.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter((e=>"xs"!==e)).map((e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${f.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:e=>{let{ownerState:t}=e;return t.fullWidth},style:{width:"calc(100% - 64px)"}},{props:e=>{let{ownerState:t}=e;return t.fullScreen},style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${f.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}}))),T=r.forwardRef((function(e,t){const n=(0,x.i)({props:e,name:"MuiDialog"}),l=(0,y.Z)(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":h,"aria-labelledby":f,"aria-modal":g=!0,BackdropComponent:v,BackdropProps:b,children:T,className:P,disableEscapeKeyDown:I=!1,fullScreen:R=!1,fullWidth:D=!1,maxWidth:O="sm",onBackdropClick:A,onClick:E,onClose:Z,open:L,PaperComponent:F=c.Z,PaperProps:j={},scroll:N="paper",slots:z={},slotProps:B={},TransitionComponent:V=u.Z,transitionDuration:H=d,TransitionProps:$,...W}=n,G={...n,disableEscapeKeyDown:I,fullScreen:R,fullWidth:D,maxWidth:O,scroll:N},U=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(n)}`],paper:["paper",`paperScroll${(0,s.Z)(n)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return(0,i.Z)(l,p,t)})(G),q=r.useRef(),K=(0,a.Z)(f),Y=r.useMemo((()=>({titleId:K})),[K]),X={slots:{transition:V,...z},slotProps:{transition:$,paper:j,backdrop:b,...B}},[Q,J]=(0,w.Z)("root",{elementType:k,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G,className:(0,o.Z)(U.root,P),ref:t}),[ee,te]=(0,w.Z)("backdrop",{elementType:C,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G}),[ne,re]=(0,w.Z)("paper",{elementType:_,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G,className:(0,o.Z)(U.paper,j.className)}),[oe,ie]=(0,w.Z)("container",{elementType:M,externalForwardedProps:X,ownerState:G,className:(0,o.Z)(U.container)}),[ae,se]=(0,w.Z)("transition",{elementType:u.Z,externalForwardedProps:X,ownerState:G,additionalProps:{appear:!0,in:L,timeout:H,role:"presentation"}});return(0,S.jsx)(Q,{closeAfterTransition:!0,slots:{backdrop:ee},slotProps:{backdrop:{transitionDuration:H,as:v,...te}},disableEscapeKeyDown:I,onClose:Z,open:L,onClick:e=>{E&&E(e),q.current&&(q.current=null,A&&A(e),Z&&Z(e,"backdropClick"))},...J,...W,children:(0,S.jsx)(ae,{...se,children:(0,S.jsx)(oe,{onMouseDown:e=>{q.current=e.target===e.currentTarget},...ie,children:(0,S.jsx)(ne,{as:F,elevation:24,role:"dialog","aria-describedby":h,"aria-labelledby":K,"aria-modal":g,...re,children:(0,S.jsx)(m.Z.Provider,{value:Y,children:T})})})})})}))},78814:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext({})},86845:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(32792),u=n(19577);function c(e){return(0,u.ZP)("MuiDialogActions",e)}(0,l.Z)("MuiDialogActions",["root","spacing"]);var d=n(77928);const h=(0,a.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:e=>{let{ownerState:t}=e;return!t.disableSpacing},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:a=!1,...l}=n,u={...n,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,i.Z)(r,c,t)})(u);return(0,d.jsx)(h,{className:(0,o.Z)(p.root,r),ownerState:u,ref:t,...l})}))},13475:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiDialogContent",e)}(0,u.Z)("MuiDialogContent",["root","dividers"]);var h=n(73540),p=n(77928);const f=(0,a.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,s.Z)((e=>{let{theme:t}=e;return{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:e=>{let{ownerState:t}=e;return t.dividers},style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:e=>{let{ownerState:t}=e;return!t.dividers},style:{[`.${h.Z.root} + &`]:{paddingTop:0}}}]}}))),m=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContent"}),{className:r,dividers:a=!1,...s}=n,u={...n,dividers:a},c=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,i.Z)(r,d,t)})(u);return(0,p.jsx)(f,{className:(0,o.Z)(c.root,r),ownerState:u,ref:t,...s})}))},76981:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(32123),o=n(90496),i=n(42152),a=n(6773),s=n(99289),l=n(71959),u=n(73540),c=n(78814),d=n(77928);const h=(0,s.ZP)(a.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogTitle"}),{className:a,id:s,...p}=n,f=n,m=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},u.a,t)})(f),{titleId:g=s}=r.useContext(c.Z);return(0,d.jsx)(h,{component:"h2",className:(0,o.Z)(m.root,a),ownerState:f,ref:t,variant:"h6",id:s??g,...p})}))},73540:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiDialogTitle",e)}const a=(0,r.Z)("MuiDialogTitle",["root"])},99481:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(99289),l=n(97136),u=n(71959),c=n(67171),d=n(77928);const h=(0,s.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((0,l.Z)((e=>{let{theme:t}=e;return{margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:(0,a.Fq)(t.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:e=>{let{ownerState:t}=e;return!!t.children},style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:e=>{let{ownerState:t}=e;return t.children&&"vertical"!==t.orientation},style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:e=>{let{ownerState:t}=e;return"vertical"===t.orientation&&t.children},style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:e=>{let{ownerState:t}=e;return"right"===t.textAlign&&"vertical"!==t.orientation},style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:e=>{let{ownerState:t}=e;return"left"===t.textAlign&&"vertical"!==t.orientation},style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}}))),p=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((0,l.Z)((e=>{let{theme:t}=e;return{display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}}))),f=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:a,className:s,orientation:l="horizontal",component:f=(a||"vertical"===l?"div":"hr"),flexItem:m=!1,light:g=!1,role:v=("hr"!==f?"separator":void 0),textAlign:y="center",variant:b="fullWidth",...x}=n,w={...n,absolute:r,component:f,flexItem:m,light:g,orientation:l,role:v,textAlign:y,variant:b},S=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:a,orientation:s,textAlign:l,variant:u}=e,d={root:["root",t&&"absolute",u,a&&"light","vertical"===s&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===l&&"vertical"!==s&&"textAlignRight","left"===l&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]};return(0,i.Z)(d,c.V,r)})(w);return(0,d.jsx)(h,{as:f,className:(0,o.Z)(S.root,s),role:v,ref:t,ownerState:w,"aria-orientation":"separator"!==v||"hr"===f&&"vertical"!==l?void 0:l,...x,children:a?(0,d.jsx)(p,{className:S.wrapper,ownerState:w,children:a}):null})}));f&&(f.muiSkipListHighlight=!0);const m=f},67171:function(e,t,n){"use strict";n.d(t,{V:()=>i,Z:()=>a});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiDivider",e)}const a=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},75303:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(32123),o=n(3682),i=n(41636),a=n(35224),s=n(9919),l=n(70021),u=n(77928);const c={entering:{opacity:1},entered:{opacity:1}},d=r.forwardRef((function(e,t){const n=(0,a.Z)(),d={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:h,appear:p=!0,children:f,easing:m,in:g,onEnter:v,onEntered:y,onEntering:b,onExit:x,onExited:w,onExiting:S,style:C,timeout:k=d,TransitionComponent:M=o.ZP,..._}=e,T=r.useRef(null),P=(0,l.Z)(T,(0,i.Z)(f),t),I=e=>t=>{if(e){const n=T.current;void 0===t?e(n):e(n,t)}},R=I(b),D=I(((e,t)=>{(0,s.n)(e);const r=(0,s.C)({style:C,timeout:k,easing:m},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),v&&v(e,t)})),O=I(y),A=I(S),E=I((e=>{const t=(0,s.C)({style:C,timeout:k,easing:m},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),x&&x(e)})),Z=I(w);return(0,u.jsx)(M,{appear:p,in:g,nodeRef:T,onEnter:D,onEntered:O,onEntering:R,onExit:E,onExited:Z,onExiting:A,addEndListener:e=>{h&&h(T.current,e)},timeout:k,..._,children:(e,t)=>{let{ownerState:n,...o}=t;return r.cloneElement(f,{style:{opacity:0,visibility:"exited"!==e||g?void 0:"hidden",...c[e],...C,...f.props.style},ref:P,...o})}})}))},75424:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(32123),o=n(94668),i=n(42152),a=n(93188),s=n(51977),l=n(99289),u=n(97136),c=n(38358),d=n(71959),h=n(23942),p=n(80706),f=n(77928);const m=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode,r=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${h.Z.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${h.Z.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a},variants:[{props:e=>{let{ownerState:t}=e;return!t.disableUnderline},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter((0,c.Z)()).map((e=>{let[n]=e;var r;return{props:{disableUnderline:!1,color:n},style:{"&::after":{borderBottom:`2px solid ${null===(r=(t.vars||t).palette[n])||void 0===r?void 0:r.main}`}}}})),{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:12}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:12}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"25px 12px 8px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{paddingTop:21,paddingBottom:4}},{props:e=>{let{ownerState:t}=e;return t.multiline&&t.hiddenLabel},style:{paddingTop:16,paddingBottom:17}},{props:e=>{let{ownerState:t}=e;return t.multiline&&t.hiddenLabel&&"small"===t.size},style:{paddingTop:8,paddingBottom:9}}]}}))),g=(0,l.ZP)(a.ni,{name:"MuiFilledInput",slot:"Input",overridesResolver:a._o})((0,u.Z)((e=>{let{theme:t}=e;return{paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:e=>{let{ownerState:t}=e;return t.hiddenLabel},style:{paddingTop:16,paddingBottom:17}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:0}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:0}},{props:e=>{let{ownerState:t}=e;return t.hiddenLabel&&"small"===t.size},style:{paddingTop:8,paddingBottom:9}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}}))),v=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,hiddenLabel:c,inputComponent:v="input",multiline:y=!1,slotProps:b,slots:x={},type:w="text",...S}=n,C={...n,disableUnderline:r,fullWidth:u,inputComponent:v,multiline:y,type:w},k=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:a,hiddenLabel:s,multiline:l}=e,u={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===a&&`size${(0,p.Z)(a)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},c=(0,i.Z)(u,h._,t);return{...t,...c}})(n),M={root:{ownerState:C},input:{ownerState:C}},_=b??l?(0,o.Z)(M,b??l):M,T=x.root??s.Root??m,P=x.input??s.Input??g;return(0,f.jsx)(a.ZP,{slots:{root:T,input:P},slotProps:_,fullWidth:u,inputComponent:v,multiline:y,ref:t,type:w,...S,classes:k})}));v.muiName="Input";const y=v},23942:function(e,t,n){"use strict";n.d(t,{Z:()=>a,_:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiFilledInput",e)}const a={...n(87360).Z,...(0,r.Z)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},44206:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(69028),u=n(80706),c=n(67038),d=n(21656),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiFormControl",e)}(0,h.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var m=n(77928);const g=(0,a.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${(0,u.Z)(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),v=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiFormControl"}),{children:a,className:h,color:p="primary",component:v="div",disabled:y=!1,error:b=!1,focused:x,fullWidth:w=!1,hiddenLabel:S=!1,margin:C="none",required:k=!1,size:M="medium",variant:_="outlined",...T}=n,P={...n,color:p,component:v,disabled:y,error:b,fullWidth:w,hiddenLabel:S,margin:C,required:k,size:M,variant:_},I=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&`margin${(0,u.Z)(n)}`,r&&"fullWidth"]};return(0,i.Z)(o,f,t)})(P),[R,D]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{if(!(0,c.Z)(t,["Input","Select"]))return;const n=(0,c.Z)(t,["Select"])?t.props.input:t;n&&(0,l.B7)(n.props)&&(e=!0)})),e})),[O,A]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{(0,c.Z)(t,["Input","Select"])&&((0,l.vd)(t.props,!0)||(0,l.vd)(t.props.inputProps,!0))&&(e=!0)})),e})),[E,Z]=r.useState(!1);y&&E&&Z(!1);const L=void 0===x||y?E:x;let F;r.useRef(!1);const j=r.useCallback((()=>{A(!0)}),[]),N=r.useCallback((()=>{A(!1)}),[]),z=r.useMemo((()=>({adornedStart:R,setAdornedStart:D,color:p,disabled:y,error:b,filled:O,focused:L,fullWidth:w,hiddenLabel:S,size:M,onBlur:()=>{Z(!1)},onFocus:()=>{Z(!0)},onEmpty:N,onFilled:j,registerEffect:F,required:k,variant:_})),[R,p,y,b,O,L,w,S,F,N,j,k,M,_]);return(0,m.jsx)(d.Z.Provider,{value:z,children:(0,m.jsx)(g,{as:v,ownerState:P,className:(0,o.Z)(I.root,h),ref:t,...T,children:a})})}))},21656:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext(void 0)},37110:function(e,t,n){"use strict";function r(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e)),{})}n.d(t,{Z:()=>r})},40243:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(32123),o=n(21656);function i(){return r.useContext(o.Z)}},75918:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(32123),o=n(90496),i=n(42152),a=n(40243),s=n(99289),l=n(97136),u=n(71959),c=n(6773),d=n(80706),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiFormControlLabel",e)}const m=(0,h.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var g=n(37110),v=n(81543),y=n(77928);const b=(0,s.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m.label}`]:t.label},t.root,t[`labelPlacement${(0,d.Z)(n.labelPlacement)}`]]}})((0,l.Z)((e=>{let{theme:t}=e;return{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${m.disabled}`]:{cursor:"default"},[`& .${m.label}`]:{[`&.${m.disabled}`]:{color:(t.vars||t).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:e=>{let{labelPlacement:t}=e;return"start"===t||"top"===t||"bottom"===t},style:{marginLeft:16}}]}}))),x=(0,s.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,l.Z)((e=>{let{theme:t}=e;return{[`&.${m.error}`]:{color:(t.vars||t).palette.error.main}}}))),w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiFormControlLabel"}),{checked:s,className:l,componentsProps:h={},control:p,disabled:m,disableTypography:w,inputRef:S,label:C,labelPlacement:k="end",name:M,onChange:_,required:T,slots:P={},slotProps:I={},value:R,...D}=n,O=(0,a.Z)(),A=m??p.props.disabled??(null==O?void 0:O.disabled),E=T??p.props.required,Z={disabled:A,required:E};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===p.props[e]&&void 0!==n[e]&&(Z[e]=n[e])}));const L=(0,g.Z)({props:n,muiFormControl:O,states:["error"]}),F={...n,disabled:A,labelPlacement:k,required:E,error:L.error},j=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,s={root:["root",n&&"disabled",`labelPlacement${(0,d.Z)(r)}`,o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,i.Z)(s,f,t)})(F),N={slots:P,slotProps:{...h,...I}},[z,B]=(0,v.Z)("typography",{elementType:c.Z,externalForwardedProps:N,ownerState:F});let V=C;return null==V||V.type===c.Z||w||(V=(0,y.jsx)(z,{component:"span",...B,className:(0,o.Z)(j.label,null==B?void 0:B.className),children:V})),(0,y.jsxs)(b,{className:(0,o.Z)(j.root,l),ownerState:F,ref:t,...D,children:[r.cloneElement(p,Z),E?(0,y.jsxs)("div",{children:[V,(0,y.jsxs)(x,{ownerState:F,"aria-hidden":!0,className:j.asterisk,children:[" ","*"]})]}):V]})}))},90755:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(32123),o=n(90496),i=n(42152),a=n(37110),s=n(40243),l=n(99289),u=n(97136),c=n(71959),d=n(80706),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiFormHelperText",e)}const m=(0,h.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var g,v=n(77928);const y=(0,l.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,d.Z)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((0,u.Z)((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${m.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${m.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:e=>{let{ownerState:t}=e;return t.contained},style:{marginLeft:14,marginRight:14}}]}}))),b=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiFormHelperText"}),{children:r,className:l,component:u="p",disabled:h,error:p,filled:m,focused:b,margin:x,required:w,variant:S,...C}=n,k=(0,s.Z)(),M=(0,a.Z)({props:n,muiFormControl:k,states:["variant","size","disabled","error","filled","focused","required"]}),_={...n,component:u,contained:"filled"===M.variant||"outlined"===M.variant,variant:M.variant,size:M.size,disabled:M.disabled,error:M.error,filled:M.filled,focused:M.focused,required:M.required};delete _.ownerState;const T=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:s,focused:l,required:u}=e,c={root:["root",o&&"disabled",a&&"error",r&&`size${(0,d.Z)(r)}`,n&&"contained",l&&"focused",s&&"filled",u&&"required"]};return(0,i.Z)(c,f,t)})(_);return(0,v.jsx)(y,{as:u,className:(0,o.Z)(T.root,l),ref:t,...C,ownerState:_,children:" "===r?g||(g=(0,v.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})}))},3890:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(90496),i=n(42152),a=n(37110),s=n(40243),l=n(80706),u=n(99289),c=n(97136),d=n(38358),h=n(71959),p=n(12070),f=n(77928);const m=(0,u.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})((0,c.Z)((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${p.Z.focused}`]:{color:(t.vars||t).palette[n].main}}}})),{props:{},style:{[`&.${p.Z.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${p.Z.error}`]:{color:(t.vars||t).palette.error.main}}}]}}))),g=(0,u.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,c.Z)((e=>{let{theme:t}=e;return{[`&.${p.Z.error}`]:{color:(t.vars||t).palette.error.main}}}))),v=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiFormLabel"}),{children:r,className:u,color:c,component:d="label",disabled:v,error:y,filled:b,focused:x,required:w,...S}=n,C=(0,s.Z)(),k=(0,a.Z)({props:n,muiFormControl:C,states:["color","required","focused","disabled","error","filled"]}),M={...n,color:k.color||"primary",component:d,disabled:k.disabled,error:k.error,filled:k.filled,focused:k.focused,required:k.required},_=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:s,required:u}=e,c={root:["root",`color${(0,l.Z)(n)}`,o&&"disabled",a&&"error",s&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",a&&"error"]};return(0,i.Z)(c,p.M,t)})(M);return(0,f.jsxs)(m,{as:d,ownerState:M,className:(0,o.Z)(_.root,u),ref:t,...S,children:[r,k.required&&(0,f.jsxs)(g,{ownerState:M,"aria-hidden":!0,className:_.asterisk,children:[" ","*"]})]})}))},12070:function(e,t,n){"use strict";n.d(t,{M:()=>i,Z:()=>a});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiFormLabel",e)}const a=(0,r.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"])},10604:function(e,t,n){"use strict";n.d(t,{ZP:()=>w});var r=n(32123),o=n(90496),i=n(4641),a=n(89574),s=n(42152),l=n(99289),u=n(71959),c=n(35224);const d=r.createContext();var h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiGrid",e)}const m=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],g=(0,h.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...m.map((e=>`grid-xs-${e}`)),...m.map((e=>`grid-sm-${e}`)),...m.map((e=>`grid-md-${e}`)),...m.map((e=>`grid-lg-${e}`)),...m.map((e=>`grid-xl-${e}`))]);var v=n(77928);function y(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const o=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return o.slice(0,o.indexOf(r))}const b=(0,l.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,u,t));const d=[];return u.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...c,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((e=>{let{ownerState:t}=e;return{boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...t.item&&{margin:0},...t.zeroMinWidth&&{minWidth:0},..."wrap"!==t.wrap&&{flexWrap:t.wrap}}}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,i.P$)({values:n.direction,breakpoints:t.breakpoints.values});return(0,i.k9)({theme:t},r,(e=>{const t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${g.item}`]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,i.P$)({values:o,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=y({breakpoints:t.breakpoints.values,values:e})),a=(0,i.k9)({theme:t},e,((e,r)=>{const o=t.spacing(e);return"0px"!==o?{marginTop:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingTop:o}}:(null==n?void 0:n.includes(r))?{}:{marginTop:0,[`& > .${g.item}`]:{paddingTop:0}}}))}return a}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,i.P$)({values:o,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=y({breakpoints:t.breakpoints.values,values:e})),a=(0,i.k9)({theme:t},e,((e,r)=>{const o=t.spacing(e);if("0px"!==o){return{width:`calc(100% + ${o})`,marginLeft:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingLeft:o}}}return(null==n?void 0:n.includes(r))?{}:{width:"100%",marginLeft:0,[`& > .${g.item}`]:{paddingLeft:0}}}))}return a}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,o)=>{let a={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=(0,i.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"==typeof s?s[o]:s;if(null==l)return e;const u=Math.round(t/l*1e8)/1e6+"%";let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t=`calc(${u} + ${e})`;c={flexBasis:t,maxWidth:t}}}a={flexBasis:u,flexGrow:0,maxWidth:u,...c}}return 0===n.breakpoints.values[o]?Object.assign(e,a):e[n.breakpoints.up(o)]=a,e}),{})}));const x=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:u}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,u));const d=[];u.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const h={root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...d]};return(0,s.Z)(h,f,t)};const w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiGrid"}),{breakpoints:i}=(0,c.Z)(),s=(0,a.Z)(n),{className:l,columns:h,columnSpacing:p,component:f="div",container:m=!1,direction:g="row",item:y=!1,rowSpacing:w,spacing:S=0,wrap:C="wrap",zeroMinWidth:k=!1,...M}=s,_=w||S,T=p||S,P=r.useContext(d),I=m?h||12:P,R={},D={...M};i.keys.forEach((e=>{null!=M[e]&&(R[e]=M[e],delete D[e])}));const O={...s,columns:I,container:m,direction:g,item:y,rowSpacing:_,columnSpacing:T,wrap:C,zeroMinWidth:k,spacing:S,...R,breakpoints:i.keys},A=x(O);return(0,v.jsx)(d.Provider,{value:I,children:(0,v.jsx)(b,{ownerState:O,className:(0,o.Z)(A.root,l),as:f,ref:t,...D})})}))},78374:function(e,t,n){"use strict";n.d(t,{Z:()=>L});var r=n(32123),o=n(90496),i=n(55313),a=n(19577),s=n(42152),l=n(20140),u=n(95950),c=n(68555),d=n(89574),h=n(9661);const p=(e,t,n)=>{const r=e.keys[0];if(Array.isArray(t))t.forEach(((t,r)=>{n(((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)}),t)}));else if(t&&"object"==typeof t){(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,i=Object.keys(t),o.filter((e=>i.includes(e))))).forEach((o=>{if(e.keys.includes(o)){const i=t[o];void 0!==i&&n(((t,n)=>{r===o?Object.assign(t,n):t[e.up(o)]=n}),i)}}))}else"number"!=typeof t&&"string"!=typeof t||n(((e,t)=>{Object.assign(e,t)}),t);var o,i};function f(e){return`--Grid-${e}Spacing`}function m(e){return`--Grid-parent-${e}Spacing`}const g="--Grid-columns",v="--Grid-parent-columns",y=e=>{let{theme:t,ownerState:n}=e;const r={};return p(t.breakpoints,n.size,((e,t)=>{let n={};"grow"===t&&(n={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(n={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(n={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${v}) - (var(${v}) - ${t}) * (var(${m("column")}) / var(${v})))`}),e(r,n)})),r},b=e=>{let{theme:t,ownerState:n}=e;const r={};return p(t.breakpoints,n.offset,((e,t)=>{let n={};"auto"===t&&(n={marginLeft:"auto"}),"number"==typeof t&&(n={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${v}) + var(${m("column")}) * ${t} / var(${v}))`}),e(r,n)})),r},x=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r={[g]:12};return p(t.breakpoints,n.columns,((e,t)=>{const n=t??12;e(r,{[g]:n,"> *":{[v]:n}})})),r},w=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r={};return p(t.breakpoints,n.rowSpacing,((e,n)=>{var o;const i="string"==typeof n?n:null===(o=t.spacing)||void 0===o?void 0:o.call(t,n);e(r,{[f("row")]:i,"> *":{[m("row")]:i}})})),r},S=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r={};return p(t.breakpoints,n.columnSpacing,((e,n)=>{var o;const i="string"==typeof n?n:null===(o=t.spacing)||void 0===o?void 0:o.call(t,n);e(r,{[f("column")]:i,"> *":{[m("column")]:i}})})),r},C=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r={};return p(t.breakpoints,n.direction,((e,t)=>{e(r,{flexDirection:t})})),r},k=e=>{let{ownerState:t}=e;return{minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&"wrap"!==t.wrap&&{flexWrap:t.wrap},gap:`var(${f("row")}) var(${f("column")})`}}},M=e=>{const t=[];return Object.entries(e).forEach((e=>{let[n,r]=e;!1!==r&&void 0!==r&&t.push(`grid-${n}-${String(r)}`)})),t},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"xs";function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach((e=>{let[r,o]=e;n(o)&&t.push(`spacing-${r}-${String(o)}`)})),t}return[]},T=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map((e=>{let[t,n]=e;return`direction-${t}-${n}`})):[`direction-xs-${String(e)}`];var P=n(77928);const I=(0,h.Z)(),R=(0,l.Z)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function D(e){return(0,u.Z)({props:e,name:"MuiGrid",defaultTheme:I})}var O=n(99289),A=n(71959),E=n(35224);const Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=R,useThemeProps:n=D,useTheme:l=c.Z,componentName:u="MuiGrid"}=e;function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const r={};return null===e||(Array.isArray(e)?e.forEach(((e,o)=>{null!==e&&n(e)&&t.keys[o]&&(r[t.keys[o]]=e)})):"object"==typeof e?Object.keys(e).forEach((t=>{const o=e[t];null!=o&&n(o)&&(r[t]=o)})):r[t.keys[0]]=e),r}const p=t(x,S,w,y,C,k,b),f=r.forwardRef((function(e,t){const c=l(),f=n(e),m=(0,d.Z)(f);!function(e,t){const n=[];void 0!==e.item&&(delete e.item,n.push("item")),void 0!==e.zeroMinWidth&&(delete e.zeroMinWidth,n.push("zeroMinWidth")),t.keys.forEach((t=>{void 0!==e[t]&&(n.push(t),delete e[t])}))}(m,c.breakpoints);const{className:g,children:v,columns:y=12,container:b=!1,component:x="div",direction:w="row",wrap:S="wrap",size:C={},offset:k={},spacing:I=0,rowSpacing:R=I,columnSpacing:D=I,unstable_level:O=0,...A}=m,E=h(C,c.breakpoints,(e=>!1!==e)),Z=h(k,c.breakpoints),L=e.columns??(O?void 0:y),F=e.spacing??(O?void 0:I),j=e.rowSpacing??e.spacing??(O?void 0:R),N=e.columnSpacing??e.spacing??(O?void 0:D),z={...m,level:O,columns:L,container:b,direction:w,wrap:S,spacing:F,rowSpacing:j,columnSpacing:N,size:E,offset:Z},B=((e,t)=>{const{container:n,direction:r,spacing:o,wrap:i,size:l}=e,c={root:["root",n&&"container","wrap"!==i&&`wrap-xs-${String(i)}`,...T(r),...M(l),...n?_(o,t.breakpoints.keys[0]):[]]};return(0,s.Z)(c,(e=>(0,a.ZP)(u,e)),{})})(z,c);return(0,P.jsx)(p,{ref:t,as:x,ownerState:z,className:(0,o.Z)(B.root,g),...A,children:r.Children.map(v,(e=>{var t;return r.isValidElement(e)&&(0,i.Z)(e,["Grid"])&&b&&e.props.container?r.cloneElement(e,{unstable_level:(null===(t=e.props)||void 0===t?void 0:t.unstable_level)??O+1}):e}))})}));return f.muiName="Grid",f}({createStyledComponent:(0,O.ZP)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,A.i)({props:e,name:"MuiGrid2"}),useTheme:E.Z});const L=Z},63400:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(51154),i=n(41636),a=n(3682),s=n(35224),l=n(9919),u=n(70021),c=n(77928);function d(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:d(1)},entered:{opacity:1,transform:"none"}},p="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),f=r.forwardRef((function(e,t){const{addEndListener:n,appear:f=!0,children:m,easing:g,in:v,onEnter:y,onEntered:b,onEntering:x,onExit:w,onExited:S,onExiting:C,style:k,timeout:M="auto",TransitionComponent:_=a.ZP,...T}=e,P=(0,o.Z)(),I=r.useRef(),R=(0,s.Z)(),D=r.useRef(null),O=(0,u.Z)(D,(0,i.Z)(m),t),A=e=>t=>{if(e){const n=D.current;void 0===t?e(n):e(n,t)}},E=A(x),Z=A(((e,t)=>{(0,l.n)(e);const{duration:n,delay:r,easing:o}=(0,l.C)({style:k,timeout:M,easing:g},{mode:"enter"});let i;"auto"===M?(i=R.transitions.getAutoHeightDuration(e.clientHeight),I.current=i):i=n,e.style.transition=[R.transitions.create("opacity",{duration:i,delay:r}),R.transitions.create("transform",{duration:p?i:.666*i,delay:r,easing:o})].join(","),y&&y(e,t)})),L=A(b),F=A(C),j=A((e=>{const{duration:t,delay:n,easing:r}=(0,l.C)({style:k,timeout:M,easing:g},{mode:"exit"});let o;"auto"===M?(o=R.transitions.getAutoHeightDuration(e.clientHeight),I.current=o):o=t,e.style.transition=[R.transitions.create("opacity",{duration:o,delay:n}),R.transitions.create("transform",{duration:p?o:.666*o,delay:p?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=d(.75),w&&w(e)})),N=A(S);return(0,c.jsx)(_,{appear:f,in:v,nodeRef:D,onEnter:Z,onEntered:L,onEntering:E,onExit:j,onExited:N,onExiting:F,addEndListener:e=>{"auto"===M&&P.start(I.current||0,e),n&&n(D.current,e)},timeout:"auto"===M?null:M,...T,children:(e,t)=>{let{ownerState:n,...o}=t;return r.cloneElement(m,{style:{opacity:0,transform:d(.75),visibility:"exited"!==e||v?void 0:"hidden",...h[e],...k,...m.props.style},ref:O,...o})}})}));f&&(f.muiSupportAuto=!0);const m=f},16639:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(32123),o=n(90496),i=n(42152),a=n(50917),s=n(79717),l=n(99289),u=n(97136),c=n(38358),d=n(71959),h=n(89865),p=n(23437),f=n(80706),m=n(32792),g=n(19577);function v(e){return(0,g.ZP)("MuiIconButton",e)}const y=(0,m.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]);var b=n(77928);const x=(0,l.ZP)(h.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,f.Z)(n.color)}`],n.edge&&t[`edge${(0,f.Z)(n.edge)}`],t[`size${(0,f.Z)(n.size)}`]]}})((0,u.Z)((e=>{let{theme:t}=e;return{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}})),(0,u.Z)((e=>{let{theme:t}=e;return{variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter((0,c.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}})),...Object.entries(t.palette).filter((0,c.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,s.Fq)((t.vars||t).palette[n].main,t.palette.action.hoverOpacity)}}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${y.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${y.loading}`]:{color:"transparent"}}}))),w=(0,l.ZP)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((e=>{let{theme:t}=e;return{display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}})),S=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:s,className:l,color:u="default",disabled:c=!1,disableFocusRipple:h=!1,size:m="medium",id:g,loading:y=null,loadingIndicator:S,...C}=n,k=(0,a.Z)(g),M=S??(0,b.jsx)(p.Z,{"aria-labelledby":k,color:"inherit",size:16}),_={...n,edge:r,color:u,disabled:c,disableFocusRipple:h,loading:y,loadingIndicator:M,size:m},T=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a,loading:s}=e,l={root:["root",s&&"loading",n&&"disabled","default"!==r&&`color${(0,f.Z)(r)}`,o&&`edge${(0,f.Z)(o)}`,`size${(0,f.Z)(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,i.Z)(l,v,t)})(_);return(0,b.jsxs)(x,{id:y?k:g,className:(0,o.Z)(T.root,l),centerRipple:!0,focusRipple:!h,disabled:c||y,ref:t,...C,ownerState:_,children:["boolean"==typeof y&&(0,b.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:(0,b.jsx)(w,{className:T.loadingIndicator,ownerState:_,children:y&&M})}),s]})}))},30062:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(42152),i=n(94668),a=n(93188),s=n(51977),l=n(99289),u=n(97136),c=n(38358),d=n(71959),h=n(10175),p=n(77928);const f=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((e=>{let{theme:t}=e;let n="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:e=>{let{ownerState:t}=e;return t.formControl},style:{"label + &":{marginTop:16}}},{props:e=>{let{ownerState:t}=e;return!t.disableUnderline},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter((0,c.Z)()).map((e=>{let[n]=e;return{props:{color:n,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n].main}`}}}}))]}}))),m=(0,l.ZP)(a.ni,{name:"MuiInput",slot:"Input",overridesResolver:a._o})({}),g=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,inputComponent:c="input",multiline:g=!1,slotProps:v,slots:y={},type:b="text",...x}=n,w=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,o.Z)(r,h.l,t);return{...t,...i}})(n),S={root:{ownerState:{disableUnderline:r}}},C=v??l?(0,i.Z)(v??l,S):S,k=y.root??s.Root??f,M=y.input??s.Input??m;return(0,p.jsx)(a.ZP,{slots:{root:k,input:M},slotProps:C,fullWidth:u,inputComponent:c,multiline:g,ref:t,type:b,...x,classes:w})}));g.muiName="Input";const v=g},10175:function(e,t,n){"use strict";n.d(t,{Z:()=>a,l:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiInput",e)}const a={...n(87360).Z,...(0,r.Z)("MuiInput",["root","underline","input"])}},32134:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(32123),o=n(90496),i=n(42152),a=n(80706),s=n(6773),l=n(21656),u=n(40243),c=n(99289),d=n(97136),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiInputAdornment",e)}const g=(0,p.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var v,y=n(77928);const b=(0,c.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,a.Z)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,d.Z)((e=>{let{theme:t}=e;return{display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${g.positionStart}&:not(.${g.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}}))),x=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiInputAdornment"}),{children:c,className:d,component:p="div",disablePointerEvents:f=!1,disableTypography:g=!1,position:x,variant:w,...S}=n,C=(0,u.Z)()||{};let k=w;w&&C.variant,C&&!k&&(k=C.variant);const M={...n,hiddenLabel:C.hiddenLabel,size:C.size,disablePointerEvents:f,position:x,variant:k},_=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:s,variant:l}=e,u={root:["root",n&&"disablePointerEvents",o&&`position${(0,a.Z)(o)}`,l,r&&"hiddenLabel",s&&`size${(0,a.Z)(s)}`]};return(0,i.Z)(u,m,t)})(M);return(0,y.jsx)(l.Z.Provider,{value:null,children:(0,y.jsx)(b,{as:p,ownerState:M,className:(0,o.Z)(_.root,d),ref:t,...S,children:"string"!=typeof c||g?(0,y.jsxs)(r.Fragment,{children:["start"===x?v||(v=(0,y.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,c]}):(0,y.jsx)(s.Z,{color:"textSecondary",children:c})})})}))},93188:function(e,t,n){"use strict";n.d(t,{Gx:()=>I,ZP:()=>Z,Ej:()=>D,_o:()=>R,ni:()=>O});var r=n(6085),o=n(32123),i=n(90496),a=n(42152),s=n(84075),l=n(76477),u=n(14902),c=n(63070),d=n(77928);function h(e){return parseInt(e,10)||0}const p={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const f=o.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:f,...m}=e,{current:g}=o.useRef(null!=f),v=o.useRef(null),y=(0,s.Z)(t,v),b=o.useRef(null),x=o.useRef(null),w=o.useCallback((()=>{const t=v.current,n=x.current;if(!t||!n)return;const o=(0,l.Z)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=h(o.paddingBottom)+h(o.paddingTop),u=h(o.borderBottomWidth)+h(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+u:0),overflowing:Math.abs(p-c)<=1}}),[r,i,e.placeholder]),S=o.useCallback((()=>{const e=v.current,t=w();if(!e||!t||(function(e){for(const t in e)return!1;return!0}(n=t)||0===n.outerHeightStyle&&!n.overflowing))return;var n;const r=t.outerHeightStyle;b.current!==r&&(b.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""}),[w]),C=o.useRef(-1);(0,u.Z)((()=>{const e=(0,c.Z)((()=>S())),t=null==v?void 0:v.current;if(!t)return;const n=(0,l.Z)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{r.unobserve(t),cancelAnimationFrame(C.current),S(),C.current=requestAnimationFrame((()=>{r.observe(t)}))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(C.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[w,S]),(0,u.Z)((()=>{S()}));return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("textarea",{value:f,onChange:e=>{g||S(),n&&n(e)},ref:y,rows:i,style:a,...m}),(0,d.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:x,tabIndex:-1,style:{...p,...a,paddingTop:0,paddingBottom:0}})]})}));var m,g=n(69872),v=n(37110),y=n(21656),b=n(40243),x=n(99289),w=n(81612),S=n(97136),C=n(71959),k=n(80706),M=n(70021),_=n(12995),T=n(69028),P=n(87360);const I=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,k.Z)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},R=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},D=(0,x.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:I})((0,S.Z)((e=>{let{theme:t}=e;return{...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${P.Z.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"4px 0 5px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{paddingTop:1}},{props:e=>{let{ownerState:t}=e;return t.fullWidth},style:{width:"100%"}}]}}))),O=(0,x.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:R})((0,S.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode,r={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},o={opacity:"0 !important"},i=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${P.Z.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${P.Z.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:e=>{let{ownerState:t}=e;return!t.disableInjectingGlobalStyles},style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),A=(0,w.zY)({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),E=o.forwardRef((function(e,t){const n=(0,C.i)({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:l,autoFocus:u,className:c,color:h,components:p={},componentsProps:x={},defaultValue:w,disabled:S,disableInjectingGlobalStyles:I,endAdornment:R,error:E,fullWidth:Z=!1,id:L,inputComponent:F="input",inputProps:j={},inputRef:N,margin:z,maxRows:B,minRows:V,multiline:H=!1,name:$,onBlur:W,onChange:G,onClick:U,onFocus:q,onKeyDown:K,onKeyUp:Y,placeholder:X,readOnly:Q,renderSuffix:J,rows:ee,size:te,slotProps:ne={},slots:re={},startAdornment:oe,type:ie="text",value:ae,...se}=n,le=null!=j.value?j.value:ae,{current:ue}=o.useRef(null!=le),ce=o.useRef(),de=o.useCallback((e=>{0}),[]),he=(0,M.Z)(ce,N,j.ref,de),[pe,fe]=o.useState(!1),me=(0,b.Z)();const ge=(0,v.Z)({props:n,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=me?me.focused:pe,o.useEffect((()=>{!me&&S&&pe&&(fe(!1),W&&W())}),[me,S,pe,W]);const ve=me&&me.onFilled,ye=me&&me.onEmpty,be=o.useCallback((e=>{(0,T.vd)(e)?ve&&ve():ye&&ye()}),[ve,ye]);(0,_.Z)((()=>{ue&&be({value:le})}),[le,be,ue]);o.useEffect((()=>{be(ce.current)}),[]);let xe=F,we=j;H&&"input"===xe&&(we=ee?{type:void 0,minRows:ee,maxRows:ee,...we}:{type:void 0,maxRows:B,minRows:V,...we},xe=f);o.useEffect((()=>{me&&me.setAdornedStart(Boolean(oe))}),[me,oe]);const Se={...n,color:ge.color||"primary",disabled:ge.disabled,endAdornment:R,error:ge.error,focused:ge.focused,formControl:me,fullWidth:Z,hiddenLabel:ge.hiddenLabel,multiline:H,size:ge.size,startAdornment:oe,type:ie},Ce=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:l,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:f,type:m}=e,g={root:["root",`color${(0,k.Z)(n)}`,r&&"disabled",o&&"error",u&&"fullWidth",s&&"focused",l&&"formControl",p&&"medium"!==p&&`size${(0,k.Z)(p)}`,d&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return(0,a.Z)(g,P.u,t)})(Se),ke=re.root||p.Root||D,Me=ne.root||x.root||{},_e=re.input||p.Input||O;return we={...we,...ne.input??x.input},(0,d.jsxs)(o.Fragment,{children:[!I&&"function"==typeof A&&(m||(m=(0,d.jsx)(A,{}))),(0,d.jsxs)(ke,{...Me,ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),U&&U(e)},...se,...!(0,g.Z)(ke)&&{ownerState:{...Se,...Me.ownerState}},className:(0,i.Z)(Ce.root,Me.className,c,Q&&"MuiInputBase-readOnly"),children:[oe,(0,d.jsx)(y.Z.Provider,{value:null,children:(0,d.jsx)(_e,{"aria-invalid":ge.error,"aria-describedby":s,autoComplete:l,autoFocus:u,defaultValue:w,disabled:ge.disabled,id:L,onAnimationStart:e=>{be("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:$,placeholder:X,readOnly:Q,required:ge.required,rows:ee,value:le,onKeyDown:K,onKeyUp:Y,type:ie,...we,...!(0,g.Z)(_e)&&{as:xe,ownerState:{...Se,...we.ownerState}},ref:he,className:(0,i.Z)(Ce.input,we.className,Q&&"MuiInputBase-readOnly"),onBlur:e=>{W&&W(e),j.onBlur&&j.onBlur(e),me&&me.onBlur?me.onBlur(e):fe(!1)},onChange:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o{q&&q(e),j.onFocus&&j.onFocus(e),me&&me.onFocus?me.onFocus(e):fe(!0)}})}),R,J?J({...ge,startAdornment:oe}):null]})]})})),Z=E},87360:function(e,t,n){"use strict";n.d(t,{Z:()=>a,u:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiInputBase",e)}const a=(0,r.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},69028:function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{B7:()=>i,vd:()=>o})},630:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(32123),o=n(42152),i=n(90496),a=n(37110),s=n(40243),l=n(3890),u=n(12070),c=n(80706),d=n(51977),h=n(99289),p=n(97136),f=n(71959),m=n(32792),g=n(19577);function v(e){return(0,g.ZP)("MuiInputLabel",e)}(0,m.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var y=n(77928);const b=(0,h.ZP)(l.Z,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${u.Z.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((0,p.Z)((e=>{let{theme:t}=e;return{display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:e=>{let{ownerState:t}=e;return t.formControl},style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:e=>{let{ownerState:t}=e;return t.shrink},style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:e=>{let{ownerState:t}=e;return!t.disableAnimation},style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:e=>{let{variant:t,ownerState:n}=e;return"filled"===t&&n.shrink},style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:e=>{let{variant:t,ownerState:n,size:r}=e;return"filled"===t&&n.shrink&&"small"===r},style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:e=>{let{variant:t,ownerState:n}=e;return"outlined"===t&&n.shrink},style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}}))),x=r.forwardRef((function(e,t){const n=(0,f.i)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:l,shrink:u,variant:d,className:h,...p}=n,m=(0,s.Z)();let g=u;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);const x=(0,a.Z)({props:n,muiFormControl:m,states:["size","variant","required","focused"]}),w={...n,disableAnimation:r,formControl:m,shrink:g,size:x.size,variant:x.variant,required:x.required,focused:x.focused},S=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:s,required:l}=e,u={root:["root",n&&"formControl",!a&&"animated",i&&"shrink",r&&"normal"!==r&&`size${(0,c.Z)(r)}`,s],asterisk:[l&&"asterisk"]},d=(0,o.Z)(u,v,t);return{...t,...d}})(w);return(0,y.jsx)(b,{"data-shrink":g,ref:t,className:(0,i.Z)(S.root,h),...p,ownerState:w,classes:S})}))},23052:function(e,t,n){"use strict";n.d(t,{Z:()=>I});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(38952),l=n(39962),u=n(99289),c=n(97136),d=n(38358),h=n(71959),p=n(80706),f=n(32792),m=n(19577);function g(e){return(0,m.ZP)("MuiLinearProgress",e)}(0,f.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var v=n(77928);const y=l.keyframes` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `,b="string"!=typeof y?l.css` animation: ${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `:null,x=l.keyframes` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `,w="string"!=typeof x?l.css` animation: ${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `:null,S=l.keyframes` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `,C="string"!=typeof S?l.css` animation: ${S} 3s infinite linear; `:null,k=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,a.$n)(e.palette[t].main,.62):(0,a._j)(e.palette[t].main,.5),M=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,p.Z)(n.color)}`],t[n.variant]]}})((0,c.Z)((e=>{let{theme:t}=e;return{position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{backgroundColor:k(t,n)}}})),{props:e=>{let{ownerState:t}=e;return"inherit"===t.color&&"buffer"!==t.variant},style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}}))),_=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,p.Z)(n.color)}`]]}})((0,c.Z)((e=>{let{theme:t}=e;return{position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;const r=k(t,n);return{props:{color:n},style:{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`}}}))]}})),C||{animation:`${S} 3s infinite linear`}),T=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((0,c.Z)((e=>{let{theme:t}=e;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main}}})),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:{width:"auto"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:b||{animation:`${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}}))),P=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((0,c.Z)((e=>{let{theme:t}=e;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{"--LinearProgressBar2-barColor":(t.vars||t).palette[n].main}}})),{props:e=>{let{ownerState:t}=e;return"buffer"!==t.variant&&"inherit"!==t.color},style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:e=>{let{ownerState:t}=e;return"buffer"!==t.variant&&"inherit"===t.color},style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n,variant:"buffer"},style:{backgroundColor:k(t,n),transition:"transform .4s linear"}}})),{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:{width:"auto"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:w||{animation:`${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}}))),I=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiLinearProgress"}),{className:r,color:a="primary",value:l,valueBuffer:u,variant:c="indeterminate",...d}=n,f={...n,color:a,variant:c},m=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,p.Z)(r)}`,n],dashed:["dashed",`dashedColor${(0,p.Z)(r)}`],bar1:["bar","bar1",`barColor${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==n&&`barColor${(0,p.Z)(r)}`,"buffer"===n&&`color${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,i.Z)(o,g,t)})(f),y=(0,s.V)(),b={},x={bar1:{},bar2:{}};if("determinate"===c||"buffer"===c)if(void 0!==l){b["aria-valuenow"]=Math.round(l),b["aria-valuemin"]=0,b["aria-valuemax"]=100;let e=l-100;y&&(e=-e),x.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===c)if(void 0!==u){let e=(u||0)-100;y&&(e=-e),x.bar2.transform=`translateX(${e}%)`}else 0;return(0,v.jsxs)(M,{className:(0,o.Z)(m.root,r),ownerState:f,role:"progressbar",...b,ref:t,...d,children:["buffer"===c?(0,v.jsx)(_,{className:m.dashed,ownerState:f}):null,(0,v.jsx)(T,{className:m.bar1,ownerState:f,style:x.bar1}),"determinate"===c?null:(0,v.jsx)(P,{className:m.bar2,ownerState:f,style:x.bar2})]})}))},47395:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(32123),o=n(90496),i=n(79717),a=n(42152),s=n(5129),l=n(80706),u=n(99289),c=n(35224),d=n(97136),h=n(38358),p=n(71959),f=n(6773),m=n(11769),g=n(26206);const v=e=>{let{theme:t,ownerState:n}=e;const r=n.color,o=(0,g.DW)(t,`palette.${r}.main`,!1)||(0,g.DW)(t,`palette.${r}`,!1)||n.color,a=(0,g.DW)(t,`palette.${r}.mainChannel`)||(0,g.DW)(t,`palette.${r}Channel`);return"vars"in t&&a?`rgba(${a} / 0.4)`:(0,i.Fq)(o,.4)};var y=n(77928);const b={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},x=(0,u.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,l.Z)(n.underline)}`],"button"===n.component&&t.button]}})((0,d.Z)((e=>{let{theme:t}=e;return{variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:e=>{let{underline:t,ownerState:n}=e;return"always"===t&&"inherit"!==n.color},style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(t.palette).filter((0,h.Z)()).map((e=>{let[n]=e;return{props:{underline:"always",color:n},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.4)`:(0,i.Fq)(t.palette[n].main,.4)}}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:(0,i.Fq)(t.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":t.vars?`rgba(${t.vars.palette.text.secondaryChannel} / 0.4)`:(0,i.Fq)(t.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(t.vars||t).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${m.Z.focusVisible}`]:{outline:"auto"}}}]}}))),w=r.forwardRef((function(e,t){const n=(0,p.i)({props:e,name:"MuiLink"}),i=(0,c.Z)(),{className:u,color:d="primary",component:h="a",onBlur:f,onFocus:g,TypographyClasses:w,underline:S="always",variant:C="inherit",sx:k,...M}=n,[_,T]=r.useState(!1),P={...n,color:d,component:h,focusVisible:_,underline:S,variant:C},I=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${(0,l.Z)(o)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,a.Z)(i,m.w,t)})(P);return(0,y.jsx)(x,{color:d,className:(0,o.Z)(I.root,u),classes:w,component:h,onBlur:e=>{(0,s.Z)(e.target)||T(!1),f&&f(e)},onFocus:e=>{(0,s.Z)(e.target)&&T(!0),g&&g(e)},ref:t,ownerState:P,variant:C,...M,sx:[...void 0===b[d]?[{color:d}]:[],...Array.isArray(k)?k:[k]],style:{...M.style,..."always"===S&&"inherit"!==d&&!b[d]&&{"--Link-underlineColor":v({theme:i,ownerState:P})}}})}))},11769:function(e,t,n){"use strict";n.d(t,{Z:()=>a,w:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiLink",e)}const a=(0,r.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"])},56326:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(76353),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiList",e)}(0,u.Z)("MuiList",["root","padding","dense","subheader"]);var h=n(77928);const p=(0,a.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:e=>{let{ownerState:t}=e;return!t.disablePadding},style:{paddingTop:8,paddingBottom:8}},{props:e=>{let{ownerState:t}=e;return t.subheader},style:{paddingTop:0}}]}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiList"}),{children:a,className:u,component:c="ul",dense:f=!1,disablePadding:m=!1,subheader:g,...v}=n,y=r.useMemo((()=>({dense:f})),[f]),b={...n,component:c,dense:f,disablePadding:m},x=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,a={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,i.Z)(a,d,t)})(b);return(0,h.jsx)(l.Z.Provider,{value:y,children:(0,h.jsxs)(p,{as:c,className:(0,o.Z)(x.root,u),ref:t,ownerState:b,...v,children:[g,a]})})}))},76353:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext({})},6094:function(e,t,n){"use strict";n.d(t,{ZP:()=>k});var r=n(32123),o=n(90496),i=n(42152),a=n(69872),s=n(99289),l=n(97136),u=n(71959),c=n(67038),d=n(70021),h=n(76353),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiListItem",e)}(0,p.Z)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);var g=n(41871);function v(e){return(0,f.ZP)("MuiListItemSecondaryAction",e)}(0,p.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);var y=n(77928);const b=(0,s.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:e=>{let{ownerState:t}=e;return t.disableGutters},style:{right:0}}]}),x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:a,...s}=n,l=r.useContext(h.Z),c={...n,disableGutters:l.disableGutters},d=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,i.Z)(r,v,n)})(c);return(0,y.jsx)(b,{className:(0,o.Z)(d.root,a),ownerState:c,ref:t,...s})}));x.muiName="ListItemSecondaryAction";const w=x,S=(0,s.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,l.Z)((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:e=>{let{ownerState:t}=e;return!t.disablePadding},style:{paddingTop:8,paddingBottom:8}},{props:e=>{let{ownerState:t}=e;return!t.disablePadding&&t.dense},style:{paddingTop:4,paddingBottom:4}},{props:e=>{let{ownerState:t}=e;return!t.disablePadding&&!t.disableGutters},style:{paddingLeft:16,paddingRight:16}},{props:e=>{let{ownerState:t}=e;return!t.disablePadding&&!!t.secondaryAction},style:{paddingRight:48}},{props:e=>{let{ownerState:t}=e;return!!t.secondaryAction},style:{[`& > .${g.Z.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:e=>{let{ownerState:t}=e;return t.divider},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:e=>{let{ownerState:t}=e;return t.button},style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:e=>{let{ownerState:t}=e;return t.hasSecondaryAction},style:{paddingRight:48}}]}}))),C=(0,s.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),k=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItem"}),{alignItems:s="center",children:l,className:p,component:f,components:g={},componentsProps:v={},ContainerComponent:b="li",ContainerProps:{className:x,...k}={},dense:M=!1,disableGutters:_=!1,disablePadding:T=!1,divider:P=!1,secondaryAction:I,slotProps:R={},slots:D={},...O}=n,A=r.useContext(h.Z),E=r.useMemo((()=>({dense:M||A.dense||!1,alignItems:s,disableGutters:_})),[s,A.dense,M,_]),Z=r.useRef(null),L=r.Children.toArray(l),F=L.length&&(0,c.Z)(L[L.length-1],["ListItemSecondaryAction"]),j={...n,alignItems:s,dense:E.dense,disableGutters:_,disablePadding:T,divider:P,hasSecondaryAction:F},N=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:s,hasSecondaryAction:l}=e,u={root:["root",r&&"dense",!o&&"gutters",!a&&"padding",s&&"divider","flex-start"===t&&"alignItemsFlexStart",l&&"secondaryAction"],container:["container"]};return(0,i.Z)(u,m,n)})(j),z=(0,d.Z)(Z,t),B=D.root||g.Root||S,V=R.root||v.root||{},H={className:(0,o.Z)(N.root,V.className,p),...O};let $=f||"li";return F?($=H.component||f?$:"div","li"===b&&("li"===$?$="div":"li"===H.component&&(H.component="div")),(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(C,{as:b,className:(0,o.Z)(N.container,x),ref:z,ownerState:j,...k,children:[(0,y.jsx)(B,{...V,...!(0,a.Z)(B)&&{as:$,ownerState:{...j,...V.ownerState}},...H,children:L}),L.pop()]})})):(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(B,{...V,as:$,ref:z,...!(0,a.Z)(B)&&{ownerState:{...j,...V.ownerState}},...H,children:[L,I&&(0,y.jsx)(w,{children:I})]})})}))},41871:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiListItemButton",e)}const a=(0,r.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},67301:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(3165),c=n(76353),d=n(77928);const h=(0,a.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((0,s.Z)((e=>{let{theme:t}=e;return{minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}}))),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiListItemIcon"}),{className:a,...s}=n,p=r.useContext(c.Z),f={...n,alignItems:p.alignItems},m=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,i.Z)(r,u.f,n)})(f);return(0,d.jsx)(h,{className:(0,o.Z)(m.root,a),ownerState:f,ref:t,...s})}))},3165:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiListItemIcon",e)}const a=(0,r.Z)("MuiListItemIcon",["root","alignItemsFlexStart"])},9580:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(90496),i=n(42152),a=n(13224),s=n(6773),l=n(76353),u=n(99289),c=n(71959),d=n(82744),h=n(81543),p=n(77928);const f=(0,u.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${d.Z.primary}`]:t.primary},{[`& .${d.Z.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${a.Z.root}:where(& .${d.Z.primary})`]:{display:"block"},[`.${a.Z.root}:where(& .${d.Z.secondary})`]:{display:"block"},variants:[{props:e=>{let{ownerState:t}=e;return t.primary&&t.secondary},style:{marginTop:6,marginBottom:6}},{props:e=>{let{ownerState:t}=e;return t.inset},style:{paddingLeft:56}}]}),m=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiListItemText"}),{children:a,className:u,disableTypography:m=!1,inset:g=!1,primary:v,primaryTypographyProps:y,secondary:b,secondaryTypographyProps:x,slots:w={},slotProps:S={},...C}=n,{dense:k}=r.useContext(l.Z);let M=null!=v?v:a,_=b;const T={...n,disableTypography:m,inset:g,primary:!!M,secondary:!!_,dense:k},P=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e,s={root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,i.Z)(s,d.L,t)})(T),I={slots:w,slotProps:{primary:y,secondary:x,...S}},[R,D]=(0,h.Z)("primary",{className:P.primary,elementType:s.Z,externalForwardedProps:I,ownerState:T}),[O,A]=(0,h.Z)("secondary",{className:P.secondary,elementType:s.Z,externalForwardedProps:I,ownerState:T});return null==M||M.type===s.Z||m||(M=(0,p.jsx)(R,{variant:k?"body2":"body1",component:(null==D?void 0:D.variant)?void 0:"span",...D,children:M})),null==_||_.type===s.Z||m||(_=(0,p.jsx)(O,{variant:"body2",color:"textSecondary",...A,children:_})),(0,p.jsxs)(f,{className:(0,o.Z)(P.root,u),ownerState:T,ref:t,...C,children:[M,_]})}))},82744:function(e,t,n){"use strict";n.d(t,{L:()=>i,Z:()=>a});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiListItemText",e)}const a=(0,r.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},81353:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(32123),o=n(90496),i=n(42152),a=n(38952),s=n(62045),l=n(95806),u=n(37991),c=n(51977),d=n(99289),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiMenu",e)}(0,p.Z)("MuiMenu",["root","paper","list"]);var g=n(81543),v=n(77928);const y={vertical:"top",horizontal:"right"},b={vertical:"top",horizontal:"left"},x=(0,d.ZP)(u.ZP,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),w=(0,d.ZP)(u.XS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),S=(0,d.ZP)(l.Z,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),C=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiMenu"}),{autoFocus:l=!0,children:u,className:c,disableAutoFocusItem:d=!1,MenuListProps:p={},onClose:f,open:C,PaperProps:k={},PopoverClasses:M,transitionDuration:_="auto",TransitionProps:{onEntering:T,...P}={},variant:I="selectedMenu",slots:R={},slotProps:D={},...O}=n,A=(0,a.V)(),E={...n,autoFocus:l,disableAutoFocusItem:d,MenuListProps:p,onEntering:T,PaperProps:k,transitionDuration:_,TransitionProps:P,variant:I},Z=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"],list:["list"]},m,t)})(E),L=l&&!d&&C,F=r.useRef(null);let j=-1;r.Children.map(u,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===I&&e.props.selected||-1===j)&&(j=t))}));const N={slots:R,slotProps:{list:p,transition:P,paper:k,...D}},z=(0,s.Z)({elementType:R.root,externalSlotProps:D.root,ownerState:E,className:[Z.root,c]}),[B,V]=(0,g.Z)("paper",{className:Z.paper,elementType:w,externalForwardedProps:N,shouldForwardComponentProp:!0,ownerState:E}),[H,$]=(0,g.Z)("list",{className:(0,o.Z)(Z.list,p.className),elementType:S,shouldForwardComponentProp:!0,externalForwardedProps:N,getSlotProps:e=>({...e,onKeyDown:t=>{var n;(e=>{"Tab"===e.key&&(e.preventDefault(),f&&f(e,"tabKeyDown"))})(t),null===(n=e.onKeyDown)||void 0===n||n.call(e,t)}}),ownerState:E}),W="function"==typeof N.slotProps.transition?N.slotProps.transition(E):N.slotProps.transition;return(0,v.jsx)(x,{onClose:f,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?y:b,slots:{root:R.root,paper:B,backdrop:R.backdrop,...R.transition&&{transition:R.transition}},slotProps:{root:z,paper:V,backdrop:"function"==typeof D.backdrop?D.backdrop(E):D.backdrop,transition:{...W,onEntering:function(){for(var e=arguments.length,t=new Array(e),n=0;n{F.current&&F.current.adjustStyleForScrollbar(e,{direction:A?"rtl":"ltr"}),T&&T(e,t)})(...t),null==W||null===(r=W.onEntering)||void 0===r||r.call(W,...t)}}},open:C,ref:t,transitionDuration:_,ownerState:E,...O,classes:M,children:(0,v.jsx)(H,{actions:F,autoFocus:l&&(-1===j||d),autoFocusItem:L,variant:I,...$,children:u})})})),k=C},34905:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(51977),l=n(99289),u=n(97136),c=n(71959),d=n(76353),h=n(89865),p=n(12995),f=n(70021),m=n(67171),g=n(3165),v=n(82744),y=n(32792),b=n(19577);function x(e){return(0,b.ZP)("MuiMenuItem",e)}const w=(0,y.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var S=n(77928);const C=(0,l.ZP)(h.Z,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,u.Z)((e=>{let{theme:t}=e;return{...t.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${w.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${w.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${w.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${m.Z.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${m.Z.inset}`]:{marginLeft:52},[`& .${v.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${v.Z.inset}`]:{paddingLeft:36},[`& .${g.Z.root}`]:{minWidth:36},variants:[{props:e=>{let{ownerState:t}=e;return!t.disableGutters},style:{paddingLeft:16,paddingRight:16}},{props:e=>{let{ownerState:t}=e;return t.divider},style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:e=>{let{ownerState:t}=e;return!t.dense},style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:e=>{let{ownerState:t}=e;return t.dense},style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${g.Z.root} svg`]:{fontSize:"1.25rem"}}}]}}))),k=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiMenuItem"}),{autoFocus:a=!1,component:s="li",dense:l=!1,divider:u=!1,disableGutters:h=!1,focusVisibleClassName:m,role:g="menuitem",tabIndex:v,className:y,...b}=n,w=r.useContext(d.Z),k=r.useMemo((()=>({dense:l||w.dense||!1,disableGutters:h})),[w.dense,l,h]),M=r.useRef(null);(0,p.Z)((()=>{a&&M.current&&M.current.focus()}),[a]);const _={...n,dense:k.dense,divider:u,disableGutters:h},T=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:s}=e,l={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},u=(0,i.Z)(l,x,s);return{...s,...u}})(n),P=(0,f.Z)(M,t);let I;return n.disabled||(I=void 0!==v?v:-1),(0,S.jsx)(d.Z.Provider,{value:k,children:(0,S.jsx)(C,{ref:P,role:g,tabIndex:I,component:s,focusVisibleClassName:(0,o.Z)(T.focusVisible,m),className:(0,o.Z)(T.root,y),...b,ownerState:_,classes:T})})}))},95806:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(32123),o=n(76852),i=n(56326);const a=n(18157).Z;var s=n(70021),l=n(12995),u=n(13304),c=n(77928);function d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function h(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function p(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function f(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&p(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const m=r.forwardRef((function(e,t){const{actions:n,autoFocus:m=!1,autoFocusItem:g=!1,children:v,className:y,disabledItemsFocusable:b=!1,disableListWrap:x=!1,onKeyDown:w,variant:S="selectedMenu",...C}=e,k=r.useRef(null),M=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,l.Z)((()=>{m&&k.current.focus()}),[m]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!k.current.style.width;if(e.clientHeight{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===T)&&(T=t),T===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(T+=1,T>=v.length&&(T=-1))):T===t&&(T+=1,T>=v.length&&(T=-1))}));const P=r.Children.map(v,((e,t)=>{if(t===T){const t={};return g&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,c.jsx)(i.Z,{role:"menu",ref:_,className:y,onKeyDown:e=>{const t=k.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(w&&w(e));const r=(0,o.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),f(t,r,x,b,d);else if("ArrowUp"===n)e.preventDefault(),f(t,r,x,b,h);else if("Home"===n)e.preventDefault(),f(t,null,x,b,d);else if("End"===n)e.preventDefault(),f(t,null,x,b,h);else if(1===n.length){const o=M.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&p(r,o);o.previousKeyMatched&&(s||f(t,r,!1,b,d,o))?e.preventDefault():o.previousKeyMatched=!1}w&&w(e)},tabIndex:m?0:-1,...C,children:P})}))},43029:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(32123),o=n(90496),i=n(42152),a=n(44706),s=n(87391),l=n(99289),u=n(97136),c=n(71959),d=n(39866),h=n(84075),p=n(769),f=n(49098),m=n(5709),g=n(3022),v=n(76477),y=n(18157);function b(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,v.Z)(e).getComputedStyle(e).paddingRight,10)||0}function w(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&b(e,o)}))}function S(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function C(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,p.Z)(e);return t.body===e?(0,v.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,y.Z)((0,v.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${x(r)+e}px`;const t=(0,p.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${x(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,p.Z)(r).body;else{const t=r.parentElement,n=(0,v.Z)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const k=()=>{},M=new class{add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&b(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);w(t,e.mount,e.modalRef,r,!0);const o=S(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=S(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=C(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=S(this.containers,(t=>t.modals.includes(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&b(e.modalRef,t),w(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&b(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}constructor(){this.modals=[],this.containers=[]}};const _=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:d}=e,v=r.useRef({}),y=r.useRef(null),x=r.useRef(null),w=(0,h.Z)(x,d),[S,C]=r.useState(!c),_=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let T=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(T=!1);const P=()=>(v.current.modalRef=x.current,v.current.mount=y.current,v.current),I=()=>{M.mount(P(),{disableScrollLock:o}),x.current&&(x.current.scrollTop=0)},R=(0,f.Z)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,p.Z)(y.current).body;M.add(P(),e),x.current&&I()})),D=()=>M.isTopModal(P()),O=(0,f.Z)((e=>{y.current=e,e&&(c&&D()?I():x.current&&b(x.current,T))})),A=r.useCallback((()=>{M.remove(P(),T)}),[T]);r.useEffect((()=>()=>{A()}),[A]),r.useEffect((()=>{c?R():_&&i||A()}),[c,A,_,i,R]);const E=e=>t=>{var r;null===(r=e.onKeyDown)||void 0===r||r.call(e,t),"Escape"===t.key&&229!==t.which&&D()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},Z=e=>t=>{var n;null===(n=e.onClick)||void 0===n||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,g.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:E(r),ref:w}},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{"aria-hidden":!0,...e,onClick:Z(e),open:c}},getTransitionProps:()=>({onEnter:(0,m.Z)((()=>{C(!1),a&&a()}),(null==l?void 0:l.props.onEnter)??k),onExited:(0,m.Z)((()=>{C(!0),s&&s(),i&&A()}),(null==l?void 0:l.props.onExited)??k)}),rootRef:w,portalRef:O,isTopModal:D,exited:S,hasTransition:_}};var T=n(32792),P=n(19577);function I(e){return(0,P.ZP)("MuiModal",e)}(0,T.Z)("MuiModal",["root","hidden","backdrop"]);var R=n(81543),D=n(77928);const O=(0,l.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,u.Z)((e=>{let{theme:t}=e;return{position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:e=>{let{ownerState:t}=e;return!t.open&&t.exited},style:{visibility:"hidden"}}]}}))),A=(0,l.ZP)(d.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),E=r.forwardRef((function(e,t){const n=(0,c.i)({name:"MuiModal",props:e}),{BackdropComponent:l=A,BackdropProps:u,classes:d,className:h,closeAfterTransition:p=!1,children:f,container:m,component:g,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:k=!1,hideBackdrop:M=!1,keepMounted:T=!1,onBackdropClick:P,onClose:E,onTransitionEnter:Z,onTransitionExited:L,open:F,slotProps:j={},slots:N={},theme:z,...B}=n,V={...n,closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:C,disableScrollLock:k,hideBackdrop:M,keepMounted:T},{getRootProps:H,getBackdropProps:$,getTransitionProps:W,portalRef:G,isTopModal:U,exited:q,hasTransition:K}=_({...V,rootRef:t}),Y={...V,exited:q},X=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.Z)(o,I,r)})(Y),Q={};if(void 0===f.props.tabIndex&&(Q.tabIndex="-1"),K){const{onEnter:e,onExited:t}=W();Q.onEnter=e,Q.onExited=t}const J={slots:{root:v.Root,backdrop:v.Backdrop,...N},slotProps:{...y,...j}},[ee,te]=(0,R.Z)("root",{ref:t,elementType:O,externalForwardedProps:{...J,...B,component:g},getSlotProps:H,ownerState:Y,className:(0,o.Z)(h,null==X?void 0:X.root,!Y.open&&Y.exited&&(null==X?void 0:X.hidden))}),[ne,re]=(0,R.Z)("backdrop",{ref:null==u?void 0:u.ref,elementType:l,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:u,getSlotProps:e=>$({...e,onClick:t=>{P&&P(t),(null==e?void 0:e.onClick)&&e.onClick(t)}}),className:(0,o.Z)(null==u?void 0:u.className,null==X?void 0:X.backdrop),ownerState:Y});return T||F||K&&!q?(0,D.jsx)(s.Z,{ref:G,container:m,disablePortal:S,children:(0,D.jsxs)(ee,{...te,children:[!M&&l?(0,D.jsx)(ne,{...re}):null,(0,D.jsx)(a.Z,{disableEnforceFocus:x,disableAutoFocus:b,disableRestoreFocus:C,isEnabled:U,open:F,children:r.cloneElement(f,Q)})]})}):null}))},77297:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r,o=n(32123),i=n(42152),a=n(51977),s=n(99289),l=n(97136),u=n(77928);const c=(0,s.ZP)("fieldset",{shouldForwardProp:a.Z})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),d=(0,s.ZP)("legend",{shouldForwardProp:a.Z})((0,l.Z)((e=>{let{theme:t}=e;return{float:"unset",width:"auto",overflow:"hidden",variants:[{props:e=>{let{ownerState:t}=e;return!t.withLabel},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:e=>{let{ownerState:t}=e;return t.withLabel},style:{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"}}},{props:e=>{let{ownerState:t}=e;return t.withLabel&&t.notched},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}})));var h=n(40243),p=n(37110),f=n(38358),m=n(71959),g=n(57773),v=n(93188);const y=(0,s.ZP)(v.Ej,{shouldForwardProp:e=>(0,a.Z)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:v.Gx})((0,l.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${g.Z.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.Z.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter((0,f.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}})),{props:{},style:{[`&.${g.Z.error} .${g.Z.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${g.Z.disabled} .${g.Z.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:14}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:14}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"16.5px 14px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{padding:"8.5px 14px"}}]}}))),b=(0,s.ZP)((function(e){const{children:t,classes:n,className:o,label:i,notched:a,...s}=e,l=null!=i&&""!==i,h={...e,notched:a,withLabel:l};return(0,u.jsx)(c,{"aria-hidden":!0,className:o,ownerState:h,...s,children:(0,u.jsx)(d,{ownerState:h,children:l?(0,u.jsx)("span",{children:i}):r||(r=(0,u.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((0,l.Z)((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}}))),x=(0,s.ZP)(v.ni,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:v._o})((0,l.Z)((e=>{let{theme:t}=e;return{padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:0}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:0}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:0}}]}}))),w=o.forwardRef((function(e,t){var n;const r=(0,m.i)({props:e,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:l="input",label:c,multiline:d=!1,notched:f,slots:w={},type:S="text",...C}=r,k=(e=>{const{classes:t}=e,n=(0,i.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.e,t);return{...t,...n}})(r),M=(0,h.Z)(),_=(0,p.Z)({props:r,muiFormControl:M,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T={...r,color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:M,fullWidth:s,hiddenLabel:_.hiddenLabel,multiline:d,size:_.size,type:S},P=w.root??a.Root??y,I=w.input??a.Input??x;return(0,u.jsx)(v.ZP,{slots:{root:P,input:I},renderSuffix:e=>(0,u.jsx)(b,{ownerState:T,className:k.notchedOutline,label:null!=c&&""!==c&&_.required?n||(n=(0,u.jsxs)(o.Fragment,{children:[c," ","*"]})):c,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:s,inputComponent:l,multiline:d,ref:t,type:S,...C,classes:{...k,notchedOutline:null}})}));w.muiName="Input";const S=w},57773:function(e,t,n){"use strict";n.d(t,{Z:()=>a,e:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiOutlinedInput",e)}const a={...n(87360).Z,...(0,r.Z)("MuiOutlinedInput",["root","notchedOutline","input"])}},87861:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(99289),l=n(35224),u=n(97136),c=n(71959),d=n(84858),h=n(32792),p=n(19577);function f(e){return(0,p.ZP)("MuiPaper",e)}(0,h.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(77928);const g=(0,s.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((0,u.Z)((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:e=>{let{ownerState:t}=e;return!t.square},style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}}))),v=r.forwardRef((function(e,t){var n;const r=(0,c.i)({props:e,name:"MuiPaper"}),s=(0,l.Z)(),{className:u,component:h="div",elevation:p=1,square:v=!1,variant:y="elevation",...b}=r,x={...r,component:h,elevation:p,square:v,variant:y},w=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,i.Z)(a,f,o)})(x);return(0,m.jsx)(g,{as:h,ownerState:x,className:(0,o.Z)(w.root,u),ref:t,...b,style:{..."elevation"===y&&{"--Paper-shadow":(s.vars||s).shadows[p],...s.vars&&{"--Paper-overlay":null===(n=s.vars.overlays)||void 0===n?void 0:n[p]},...!s.vars&&"dark"===s.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,a.Fq)("#fff",(0,d.Z)(p))}, ${(0,a.Fq)("#fff",(0,d.Z)(p))})`}},...b.style}})}))},37991:function(e,t,n){"use strict";n.d(t,{XS:()=>_,ZP:()=>T});var r=n(32123),o=n(90496),i=n(42152),a=n(69872),s=n(99289),l=n(71959),u=n(50330),c=n(76852),d=n(13304),h=n(63400),p=n(43029),f=n(87861),m=n(32792),g=n(19577);function v(e){return(0,g.ZP)("MuiPopover",e)}(0,m.Z)("MuiPopover",["root","paper"]);var y=n(81543),b=n(76152),x=n(77928);function w(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function k(e){return"function"==typeof e?e():e}const M=(0,s.ZP)(p.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_=(0,s.ZP)(f.Z,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),T=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiPopover"}),{action:s,anchorEl:p,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:g="anchorEl",children:T,className:P,container:I,elevation:R=8,marginThreshold:D=16,open:O,PaperProps:A={},slots:E={},slotProps:Z={},transformOrigin:L={vertical:"top",horizontal:"left"},TransitionComponent:F,transitionDuration:j="auto",TransitionProps:N={},disableScrollLock:z=!1,...B}=n,V=r.useRef(),H={...n,anchorOrigin:f,anchorReference:g,elevation:R,marginThreshold:D,transformOrigin:L,TransitionComponent:F,transitionDuration:j,TransitionProps:N},$=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"]},v,t)})(H),W=r.useCallback((()=>{if("anchorPosition"===g)return m;const e=k(p),t=(e&&1===e.nodeType?e:(0,c.Z)(V.current).body).getBoundingClientRect();return{top:t.top+w(t,f.vertical),left:t.left+S(t,f.horizontal)}}),[p,f.horizontal,f.vertical,m,g]),G=r.useCallback((e=>({vertical:w(e,L.vertical),horizontal:S(e,L.horizontal)})),[L.horizontal,L.vertical]),U=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===g)return{top:null,left:null,transformOrigin:C(n)};const r=W();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,l=(0,d.Z)(k(p)),u=l.innerHeight-D,c=l.innerWidth-D;if(null!==D&&ou){const e=a-u;o-=e,n.vertical+=e}if(null!==D&&ic){const e=s-c;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:C(n)}}),[p,g,W,G,D]),[q,K]=r.useState(O),Y=r.useCallback((()=>{const e=V.current;if(!e)return;const t=U(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,K(!0)}),[U]);r.useEffect((()=>(z&&window.addEventListener("scroll",Y),()=>window.removeEventListener("scroll",Y))),[p,z,Y]);r.useEffect((()=>{O&&Y()})),r.useImperativeHandle(s,(()=>O?{updatePosition:()=>{Y()}}:null),[O,Y]),r.useEffect((()=>{if(!O)return;const e=(0,u.Z)((()=>{Y()})),t=(0,d.Z)(p);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[p,O,Y]);let X=j;const Q={slots:{transition:F,...E},slotProps:{transition:N,paper:A,...Z}},[J,ee]=(0,y.Z)("transition",{elementType:h.Z,externalForwardedProps:Q,ownerState:H,getSlotProps:e=>({...e,onEntering:(t,n)=>{var r;null===(r=e.onEntering)||void 0===r||r.call(e,t,n),Y()},onExited:t=>{var n;null===(n=e.onExited)||void 0===n||n.call(e,t),K(!1)}}),additionalProps:{appear:!0,in:O}});"auto"!==j||J.muiSupportAuto||(X=void 0);const te=I||(p?(0,c.Z)(k(p)).body:void 0),[ne,{slots:re,slotProps:oe,...ie}]=(0,y.Z)("root",{ref:t,elementType:M,externalForwardedProps:{...Q,...B},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:E.backdrop},slotProps:{backdrop:(0,b.Z)("function"==typeof Z.backdrop?Z.backdrop(H):Z.backdrop,{invisible:!0})},container:te,open:O},ownerState:H,className:(0,o.Z)($.root,P)}),[ae,se]=(0,y.Z)("paper",{ref:V,className:$.paper,elementType:_,externalForwardedProps:Q,shouldForwardComponentProp:!0,additionalProps:{elevation:R,style:q?void 0:{opacity:0}},ownerState:H});return(0,x.jsx)(ne,{...ie,...!(0,a.Z)(ne)&&{slots:re,slotProps:oe,disableScrollLock:z},children:(0,x.jsx)(J,{...ee,timeout:X,children:(0,x.jsx)(ae,{...se,children:T})})})}))},72204:function(e,t,n){"use strict";n.d(t,{Z:()=>Oe});var r=n(38952),o=n(32123),i=n(84075),a=n(14902),s=n(769);function l(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function u(e){return e instanceof l(e).Element||e instanceof Element}function c(e){return e instanceof l(e).HTMLElement||e instanceof HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof l(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,p=Math.min,f=Math.round;function m(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function g(){return!/^((?!chrome|android).)*safari/i.test(m())}function v(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&c(e)&&(o=e.offsetWidth>0&&f(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&f(r.height)/e.offsetHeight||1);var a=(u(e)?l(e):window).visualViewport,s=!g()&&n,d=(r.left+(s&&a?a.offsetLeft:0))/o,h=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,m=r.height/i;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function y(e){var t=l(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return v(x(e)).left+y(e).scrollLeft}function S(e){return l(e).getComputedStyle(e)}function C(e){var t=S(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function k(e,t,n){void 0===n&&(n=!1);var r,o,i=c(t),a=c(t)&&function(e){var t=e.getBoundingClientRect(),n=f(t.width)/e.offsetWidth||1,r=f(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=x(t),u=v(e,a,n),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(i||!i&&!n)&&(("body"!==b(t)||C(s))&&(d=(r=t)!==l(r)&&c(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:y(r)),c(t)?((h=v(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):s&&(h.x=w(s))),{x:u.left+d.scrollLeft-h.x,y:u.top+d.scrollTop-h.y,width:u.width,height:u.height}}function M(e){var t=v(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function _(e){return"html"===b(e)?e:e.assignedSlot||e.parentNode||(d(e)?e.host:null)||x(e)}function T(e){return["html","body","#document"].indexOf(b(e))>=0?e.ownerDocument.body:c(e)&&C(e)?e:T(_(e))}function P(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=l(r),a=o?[i].concat(i.visualViewport||[],C(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(P(_(a)))}function I(e){return["table","td","th"].indexOf(b(e))>=0}function R(e){return c(e)&&"fixed"!==S(e).position?e.offsetParent:null}function D(e){for(var t=l(e),n=R(e);n&&I(n)&&"static"===S(n).position;)n=R(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===S(n).position)?t:n||function(e){var t=/firefox/i.test(m());if(/Trident/i.test(m())&&c(e)&&"fixed"===S(e).position)return null;var n=_(e);for(d(n)&&(n=n.host);c(n)&&["html","body"].indexOf(b(n))<0;){var r=S(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",A="bottom",E="right",Z="left",L="auto",F=[O,A,E,Z],j="start",N="end",z="viewport",B="popper",V=F.reduce((function(e,t){return e.concat([t+"-"+j,t+"-"+N])}),[]),H=[].concat(F,[L]).reduce((function(e,t){return e.concat([t,t+"-"+j,t+"-"+N])}),[]),$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var G={placement:"bottom",modifiers:[],strategy:"absolute"};function U(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function J(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Y(o):null,a=o?X(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case O:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case E:t={x:n.x+n.width,y:l};break;case Z:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?Q(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case j:t[u]=t[u]-(n[c]/2-r[c]/2);break;case N:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,m=void 0===p?0:p,g=a.y,v=void 0===g?0:g,y="function"==typeof d?d({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),C=Z,k=O,M=window;if(c){var _=D(n),T="clientHeight",P="clientWidth";if(_===l(n)&&"static"!==S(_=x(n)).position&&"absolute"===s&&(T="scrollHeight",P="scrollWidth"),o===O||(o===Z||o===E)&&i===N)k=A,v-=(h&&_===M&&M.visualViewport?M.visualViewport.height:_[T])-r.height,v*=u?1:-1;if(o===Z||(o===O||o===A)&&i===N)C=E,m-=(h&&_===M&&M.visualViewport?M.visualViewport.width:_[P])-r.width,m*=u?1:-1}var I,R=Object.assign({position:s},c&&ee),L=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:f(n*o)/o||0,y:f(r*o)/o||0}}({x:m,y:v},l(n)):{x:m,y:v};return m=L.x,v=L.y,u?Object.assign({},R,((I={})[k]=w?"0":"",I[C]=b?"0":"",I.transform=(M.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",I)):Object.assign({},R,((t={})[k]=w?v+"px":"",t[C]=b?m+"px":"",t.transform="",t))}var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function re(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var oe={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function ae(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&d(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function se(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function le(e,t,n){return t===z?se(function(e,t){var n=l(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var c=g();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+w(e),y:u}}(e,n)):u(t)?function(e,t){var n=v(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):se(function(e){var t,n=x(e),r=y(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+w(e),l=-r.scrollTop;return"rtl"===S(o||n).direction&&(s+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(x(e)))}function ue(e,t,n,r){var o="clippingParents"===t?function(e){var t=P(_(e)),n=["absolute","fixed"].indexOf(S(e).position)>=0&&c(e)?D(e):e;return u(n)?t.filter((function(e){return u(e)&&ae(e,n)&&"body"!==b(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=le(e,n,r);return t.top=h(o.top,t.top),t.right=p(o.right,t.right),t.bottom=p(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),le(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function de(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function he(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?z:c,h=n.elementContext,p=void 0===h?B:h,f=n.altBoundary,m=void 0!==f&&f,g=n.padding,y=void 0===g?0:g,b=ce("number"!=typeof y?y:de(y,F)),w=p===B?"reference":B,S=e.rects.popper,C=e.elements[m?w:p],k=ue(u(C)?C:C.contextElement||x(e.elements.popper),l,d,a),M=v(e.elements.reference),_=J({reference:M,element:S,strategy:"absolute",placement:o}),T=se(Object.assign({},S,_)),P=p===B?T:M,I={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},R=e.modifiersData.offset;if(p===B&&R){var D=R[o];Object.keys(I).forEach((function(e){var t=[E,A].indexOf(e)>=0?1:-1,n=[O,A].indexOf(e)>=0?"y":"x";I[e]+=D[n]*t}))}return I}function pe(e,t,n){return h(e,p(t,n))}function fe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function me(e){return[O,E,A,Z].some((function(t){return e[t]>=0}))}var ge=q({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=l(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,K)})),s&&u.addEventListener("resize",n.update,K),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,K)})),s&&u.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=J({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:Y(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&b(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&b(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=H.reduce((function(e,n){return e[n]=function(e,t,n){var r=Y(e),o=[Z,O].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Z,E].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=Y(g),y=l||(v===g||!f?[re(g)]:function(e){if(Y(e)===L)return[];var t=re(e);return[ie(e),t,ie(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(Y(n)===L?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?H:l,c=X(r),d=c?s?V:V.filter((function(e){return X(e)===c})):F,h=d.filter((function(e){return u.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=he(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Y(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,k=b[0],M=0;M=0,R=I?"width":"height",D=he(t,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),N=I?P?E:Z:P?A:O;x[R]>w[R]&&(N=re(N));var z=re(N),B=[];if(i&&B.push(D[T]<=0),s&&B.push(D[N]<=0,D[z]<=0),B.every((function(e){return e}))){k=_,C=!1;break}S.set(_,B)}if(C)for(var $=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},W=f?3:1;W>0;W--){if("break"===$(W))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,m=void 0===f||f,g=n.tetherOffset,v=void 0===g?0:g,y=he(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Y(t.placement),x=X(t.placement),w=!x,S=Q(b),C="x"===S?"y":"x",k=t.modifiersData.popperOffsets,_=t.rects.reference,T=t.rects.popper,P="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,I="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(k){if(i){var F,N="y"===S?O:Z,z="y"===S?A:E,B="y"===S?"height":"width",V=k[S],H=V+y[N],$=V-y[z],W=m?-T[B]/2:0,G=x===j?_[B]:T[B],U=x===j?-T[B]:-_[B],q=t.elements.arrow,K=m&&q?M(q):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=J[N],te=J[z],ne=pe(0,_[B],K[B]),re=w?_[B]/2-W-ne-ee-I.mainAxis:G-ne-ee-I.mainAxis,oe=w?-_[B]/2+W+ne+te+I.mainAxis:U+ne+te+I.mainAxis,ie=t.elements.arrow&&D(t.elements.arrow),ae=ie?"y"===S?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(F=null==R?void 0:R[S])?F:0,le=V+oe-se,ue=pe(m?p(H,V+re-se-ae):H,V,m?h($,le):$);k[S]=ue,L[S]=ue-V}if(s){var ce,de="x"===S?O:Z,fe="x"===S?A:E,me=k[C],ge="y"===C?"height":"width",ve=me+y[de],ye=me-y[fe],be=-1!==[O,Z].indexOf(b),xe=null!=(ce=null==R?void 0:R[C])?ce:0,we=be?ve:me-_[ge]-T[ge]-xe+I.altAxis,Se=be?me+_[ge]+T[ge]-xe-I.altAxis:ye,Ce=m&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(we,me,Se):pe(m?we:ve,me,m?Se:ye);k[C]=Ce,L[C]=Ce-me}t.modifiersData[r]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Y(n.placement),l=Q(s),u=[Z,E].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:de(e,F))}(o.padding,n),d=M(i),h="y"===l?O:Z,p="y"===l?A:E,f=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=D(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=c[h],x=v-d[u]-c[p],w=v/2-d[u]/2+y,S=pe(b,w,x),C=l;n.modifiersData[r]=((t={})[C]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ae(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=he(t,{elementContext:"reference"}),s=he(t,{altBoundary:!0}),l=fe(a,r),u=fe(s,o,i),c=me(l),d=me(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),ve=n(42152),ye=n(62045),be=n(87391),xe=n(32792),we=n(19577);function Se(e){return(0,we.ZP)("MuiPopper",e)}(0,xe.Z)("MuiPopper",["root"]);var Ce=n(77928);function ke(e){return"function"==typeof e?e():e}function Me(e){return void 0!==e.nodeType}const _e={},Te=o.forwardRef((function(e,t){const{anchorEl:n,children:r,direction:s,disablePortal:l,modifiers:u,open:c,placement:d,popperOptions:h,popperRef:p,slotProps:f={},slots:m={},TransitionProps:g,ownerState:v,...y}=e,b=o.useRef(null),x=(0,i.Z)(b,t),w=o.useRef(null),S=(0,i.Z)(w,p),C=o.useRef(S);(0,a.Z)((()=>{C.current=S}),[S]),o.useImperativeHandle(p,(()=>w.current),[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(d,s),[M,_]=o.useState(k),[T,P]=o.useState(ke(n));o.useEffect((()=>{w.current&&w.current.forceUpdate()})),o.useEffect((()=>{n&&P(ke(n))}),[n]),(0,a.Z)((()=>{if(!T||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;_(t.placement)}}];null!=u&&(e=e.concat(u)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));const t=ge(T,b.current,{placement:k,...h,modifiers:e});return C.current(t),()=>{t.destroy(),C.current(null)}}),[T,l,u,c,h,k]);const I={placement:M};null!==g&&(I.TransitionProps=g);const R=(e=>{const{classes:t}=e;return(0,ve.Z)({root:["root"]},Se,t)})(e),D=m.root??"div",O=(0,ye.Z)({elementType:D,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:R.root});return(0,Ce.jsx)(D,{...O,children:"function"==typeof r?r(I):r})})),Pe=o.forwardRef((function(e,t){const{anchorEl:n,children:r,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=_e,popperRef:f,style:m,transition:g=!1,slotProps:v={},slots:y={},...b}=e,[x,w]=o.useState(!0);if(!u&&!d&&(!g||x))return null;let S;if(i)S=i;else if(n){const e=ke(n);S=e&&Me(e)?(0,s.Z)(e).body:(0,s.Z)(null).body}const C=d||!u||g&&!x?void 0:"none",k=g?{in:d,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return(0,Ce.jsx)(be.Z,{disablePortal:l,container:S,children:(0,Ce.jsx)(Te,{anchorEl:n,direction:a,disablePortal:l,modifiers:c,ref:t,open:g?!x:d,placement:h,popperOptions:p,popperRef:f,slotProps:v,slots:y,...b,style:{position:"fixed",top:0,left:0,display:C,...m},TransitionProps:k,children:r})})}));var Ie=n(99289),Re=n(71959);const De=(0,Ie.ZP)(Pe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Oe=o.forwardRef((function(e,t){const n=(0,r.V)(),o=(0,Re.i)({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,slots:y,slotProps:b,...x}=o,w=(null==y?void 0:y.root)??(null==s?void 0:s.Root),S={anchorEl:i,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,...x};return(0,Ce.jsx)(De,{as:a,direction:n?"rtl":"ltr",slots:{root:w},slotProps:b??l,...S,ref:t})}))},87391:function(e,t,n){"use strict";n.d(t,{Z:()=>u});var r=n(32123),o=n(76418),i=n(84075),a=n(41636),s=n(14902),l=n(83997);const u=r.forwardRef((function(e,t){const{children:n,container:u,disablePortal:c=!1}=e,[d,h]=r.useState(null),p=(0,i.Z)(r.isValidElement(n)?(0,a.Z)(n):null,t);if((0,s.Z)((()=>{c||h(function(e){return"function"==typeof e?e():e}(u)||document.body)}),[u,c]),(0,s.Z)((()=>{if(d&&!c)return(0,l.Z)(t,d),()=>{(0,l.Z)(t,null)}}),[t,d,c]),c){if(r.isValidElement(n)){const e={ref:p};return r.cloneElement(n,e)}return n}return d?o.createPortal(n,d):d}))},99551:function(e,t,n){"use strict";n.d(t,{Z:()=>Y});var r=n(32123),o=n(90496),i=n(94668),a=n(42152),s=n(41636),l=n(6085),u=n(30341),c=n(76852),d=n(80706),h=n(81353),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiNativeSelect",e)}const g=(0,p.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var v=n(99289),y=n(51977),b=n(77928);const x=(0,v.ZP)("select")((e=>{let{theme:t}=e;return{MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${g.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:e=>{let{ownerState:t}=e;return"filled"!==t.variant&&"outlined"!==t.variant},style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]}})),w=(0,v.ZP)(x,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:y.Z,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${g.multiple}`]:t.multiple}]}})({}),S=(0,v.ZP)("svg")((e=>{let{theme:t}=e;return{position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${g.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:e=>{let{ownerState:t}=e;return t.open},style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}})),C=(0,v.ZP)(S,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),k=r.forwardRef((function(e,t){const{className:n,disabled:i,error:s,IconComponent:l,inputRef:u,variant:c="standard",...h}=e,p={...e,disabled:i,variant:c,error:s},f=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"]};return(0,a.Z)(l,m,t)})(p);return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(w,{ownerState:p,className:(0,o.Z)(f.select,n),disabled:i,ref:u||t,...h}),e.multiple?null:(0,b.jsx)(C,{as:l,ownerState:p,className:f.icon})]})}));var M=n(69028),_=n(77740),T=n(70021),P=n(80897);function I(e){return(0,f.ZP)("MuiSelect",e)}const R=(0,p.Z)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var D;const O=(0,v.ZP)(x,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${R.select}`]:t.select},{[`&.${R.select}`]:t[n.variant]},{[`&.${R.error}`]:t.error},{[`&.${R.multiple}`]:t.multiple}]}})({[`&.${R.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),A=(0,v.ZP)(S,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),E=(0,v.ZP)("input",{shouldForwardProp:e=>(0,_.Z)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Z(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function L(e){return null==e||"string"==typeof e&&!e.trim()}const F=r.forwardRef((function(e,t){var n;const{"aria-describedby":i,"aria-label":s,autoFocus:p,autoWidth:f,children:m,className:g,defaultOpen:v,defaultValue:y,disabled:x,displayEmpty:w,error:S=!1,IconComponent:C,inputRef:k,labelId:_,MenuProps:R={},multiple:F,name:j,onBlur:N,onChange:z,onClose:B,onFocus:V,onOpen:H,open:$,readOnly:W,renderValue:G,required:U,SelectDisplayProps:q={},tabIndex:K,type:Y,value:X,variant:Q="standard",...J}=e,[ee,te]=(0,P.Z)({controlled:X,default:y,name:"Select"}),[ne,re]=(0,P.Z)({controlled:$,default:v,name:"Select"}),oe=r.useRef(null),ie=r.useRef(null),[ae,se]=r.useState(null),{current:le}=r.useRef(null!=$),[ue,ce]=r.useState(),de=(0,T.Z)(t,k),he=r.useCallback((e=>{ie.current=e,e&&se(e)}),[]),pe=null==ae?void 0:ae.parentNode;r.useImperativeHandle(de,(()=>({focus:()=>{ie.current.focus()},node:oe.current,value:ee})),[ee]),r.useEffect((()=>{v&&ne&&ae&&!le&&(ce(f?null:pe.clientWidth),ie.current.focus())}),[ae,f]),r.useEffect((()=>{p&&ie.current.focus()}),[p]),r.useEffect((()=>{if(!_)return;const e=(0,c.Z)(ie.current).getElementById(_);if(e){const t=()=>{getSelection().isCollapsed&&ie.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[_]);const fe=(e,t)=>{e?H&&H(t):B&&B(t),le||(ce(f?null:pe.clientWidth),re(e))},me=r.Children.toArray(m),ge=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(F){n=Array.isArray(ee)?ee.slice():[];const t=ee.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),ee!==n&&(te(n),z)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:j}}),z(o,e)}F||fe(!1,t)}},ve=null!==ae&≠let ye,be;delete J["aria-invalid"];const xe=[];let we=!1,Se=!1;((0,M.vd)({value:ee})||w)&&(G?ye=G(ee):we=!0);const Ce=me.map((e=>{if(!r.isValidElement(e))return null;let t;if(F){if(!Array.isArray(ee))throw new Error((0,l.Z)(2));t=ee.some((t=>Z(t,e.props.value))),t&&we&&xe.push(e.props.children)}else t=Z(ee,e.props.value),t&&we&&(be=e.props.children);return t&&(Se=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:ge(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})}));we&&(ye=F?0===xe.length?null:xe.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,a.Z)(l,I,t)})(Te),Ie={...R.PaperProps,...null===(n=R.slotProps)||void 0===n?void 0:n.paper},Re=(0,u.Z)();return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(O,{as:"div",ref:he,tabIndex:ke,role:"combobox","aria-controls":ve?Re:void 0,"aria-disabled":x?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[_,_e].filter(Boolean).join(" ")||void 0,"aria-describedby":i,"aria-required":U?"true":void 0,"aria-invalid":S?"true":void 0,onKeyDown:e=>{if(!W){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),fe(!0,e))}},onMouseDown:x||W?null:e=>{0===e.button&&(e.preventDefault(),ie.current.focus(),fe(!0,e))},onBlur:e=>{!ve&&N&&(Object.defineProperty(e,"target",{writable:!0,value:{value:ee,name:j}}),N(e))},onFocus:V,...q,ownerState:Te,className:(0,o.Z)(q.className,Pe.select,g),id:_e,children:L(ye)?D||(D=(0,b.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ye}),(0,b.jsx)(E,{"aria-invalid":S,value:Array.isArray(ee)?ee.join(","):ee,name:j,ref:oe,"aria-hidden":!0,onChange:e=>{const t=me.find((t=>t.props.value===e.target.value));void 0!==t&&(te(t.props.value),z&&z(e,t))},tabIndex:-1,disabled:x,className:Pe.nativeInput,autoFocus:p,required:U,...J,ownerState:Te}),(0,b.jsx)(A,{as:C,className:Pe.icon,ownerState:Te}),(0,b.jsx)(h.Z,{id:`menu-${j||""}`,anchorEl:pe,open:ve,onClose:e=>{fe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...R,slotProps:{...R.slotProps,list:{"aria-labelledby":_,role:"listbox","aria-multiselectable":F?"true":void 0,disableListWrap:!0,id:Re,...R.MenuListProps},paper:{...Ie,style:{minWidth:Me,...null!=Ie?Ie.style:null}}},children:Ce})]})}));var j=n(37110),N=n(40243),z=n(94963),B=n(30062),V=n(75424),H=n(77297),$=n(71959);const W={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,y.Z)(e)&&"variant"!==e,slot:"Root"},G=(0,v.ZP)(B.Z,W)(""),U=(0,v.ZP)(H.Z,W)(""),q=(0,v.ZP)(V.Z,W)(""),K=r.forwardRef((function(e,t){const n=(0,$.i)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:u,classes:c={},className:d,defaultOpen:h=!1,displayEmpty:p=!1,IconComponent:f=z.Z,id:m,input:g,inputProps:v,label:y,labelId:x,MenuProps:w,multiple:S=!1,native:C=!1,onClose:M,onOpen:_,open:P,renderValue:R,SelectDisplayProps:D,variant:O="outlined",...A}=n,E=C?k:F,Z=(0,N.Z)(),L=(0,j.Z)({props:n,muiFormControl:Z,states:["variant","error"]}),B=L.variant||O,V={...n,variant:B,classes:c},H=(e=>{const{classes:t}=e,n=(0,a.Z)({root:["root"]},I,t);return{...t,...n}})(V),{root:W,...K}=H,Y=g||{standard:(0,b.jsx)(G,{ownerState:V}),outlined:(0,b.jsx)(U,{label:y,ownerState:V}),filled:(0,b.jsx)(q,{ownerState:V})}[B],X=(0,T.Z)(t,(0,s.Z)(Y));return(0,b.jsx)(r.Fragment,{children:r.cloneElement(Y,{inputComponent:E,inputProps:{children:u,error:L.error,IconComponent:f,variant:B,type:void 0,multiple:S,...C?{id:m}:{autoWidth:l,defaultOpen:h,displayEmpty:p,labelId:x,MenuProps:w,onClose:M,onOpen:_,open:P,renderValue:R,SelectDisplayProps:{id:m,...D}},...v,classes:v?(0,i.Z)(K,v.classes):K,...g?g.props.inputProps:{}},...(S&&C||p)&&"outlined"===B?{notched:!0}:{},ref:X,className:(0,o.Z)(Y.props.className,d,H.root),...!g&&{variant:B},...A})})}));K.muiName="Select";const Y=K},35691:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(32123),o=n(90496),i=n(42152);function a(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function s(e){return parseFloat(e)}var l=n(79717),u=n(39962),c=n(99289),d=n(97136),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiSkeleton",e)}(0,p.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(77928);const v=u.keyframes` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `,y=u.keyframes` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `,b="string"!=typeof v?u.css` animation: ${v} 2s ease-in-out 0.5s infinite; `:null,x="string"!=typeof y?u.css` &::after { animation: ${y} 2s linear 0.5s infinite; } `:null,w=(0,c.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,d.Z)((e=>{let{theme:t}=e;const n=a(t.shape.borderRadius)||"px",r=s(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,l.Fq)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:e=>{let{ownerState:t}=e;return t.hasChildren},style:{"& > *":{visibility:"hidden"}}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.width},style:{maxWidth:"fit-content"}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.height},style:{height:"auto"}},{props:{animation:"pulse"},style:b||{animation:`${v} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(t.vars||t).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:x||{"&::after":{animation:`${y} 2s linear 0.5s infinite`}}}]}}))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d,...p}=n,f={...n,animation:r,component:s,variant:c,hasChildren:Boolean(p.children)},v=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:s}=e,l={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!s&&"heightAuto"]};return(0,i.Z)(l,m,t)})(f);return(0,g.jsx)(w,{as:s,ref:t,className:(0,o.Z)(v.root,a),ownerState:f,...p,style:{width:d,height:l,...u}})}))},40331:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(17180),o=n(99289),i=n(71959);const a=(0,r.Z)({createStyledComponent:(0,o.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,i.i)({props:e,name:"MuiStack"})})},31052:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(80706),l=n(38358),u=n(5514),c=n(99289),d=n(97136),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiSwitch",e)}const g=(0,p.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var v=n(77928);const y=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,s.Z)(n.edge)}`],t[`size${(0,s.Z)(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}}}]}),b=(0,c.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==n.color&&t[`color${(0,s.Z)(n.color)}`]]}})((0,d.Z)((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${"light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${"light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:""+("light"===t.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}}})),(0,d.Z)((e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter((0,l.Z)(["light"])).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${g.checked}`]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,a.Fq)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n}DisabledColor`]:`${"light"===t.palette.mode?(0,a.$n)(t.palette[n].main,.62):(0,a._j)(t.palette[n].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(t.vars||t).palette[n].main}}}}))]}}))),x=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,d.Z)((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${"light"===t.palette.mode?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:""+("light"===t.palette.mode?.38:.3)}}))),w=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,d.Z)((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSwitch"}),{className:r,color:a="primary",edge:l=!1,size:u="medium",sx:c,...d}=n,p={...n,color:a,edge:l,size:u},f=(e=>{const{classes:t,edge:n,size:r,color:o,checked:a,disabled:l}=e,u={root:["root",n&&`edge${(0,s.Z)(n)}`,`size${(0,s.Z)(r)}`],switchBase:["switchBase",`color${(0,s.Z)(o)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,i.Z)(u,m,t);return{...t,...c}})(p),g=(0,v.jsx)(w,{className:f.thumb,ownerState:p});return(0,v.jsxs)(y,{className:(0,o.Z)(f.root,r),sx:c,ownerState:p,children:[(0,v.jsx)(b,{type:"checkbox",icon:g,checkedIcon:g,ref:t,ownerState:p,...d,classes:{...f,root:f.switchBase}}),(0,v.jsx)(x,{className:f.track,ownerState:p})]})}))},54918:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(90496),i=n(42152),a=n(89865),s=n(80706),l=n(99289),u=n(97136),c=n(71959),d=n(32792),h=n(19577);function p(e){return(0,h.ZP)("MuiTab",e)}const f=(0,d.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=n(77928);const g=(0,l.ZP)(a.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,s.Z)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${f.iconWrapper}`]:t.iconWrapper},{[`& .${f.icon}`]:t.icon}]}})((0,u.Z)((e=>{let{theme:t}=e;return{...t.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:e=>{let{ownerState:t}=e;return t.label&&("top"===t.iconPosition||"bottom"===t.iconPosition)},style:{flexDirection:"column"}},{props:e=>{let{ownerState:t}=e;return t.label&&"top"!==t.iconPosition&&"bottom"!==t.iconPosition},style:{flexDirection:"row"}},{props:e=>{let{ownerState:t}=e;return t.icon&&t.label},style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:e=>{let{ownerState:t,iconPosition:n}=e;return t.icon&&t.label&&"top"===n},style:{[`& > .${f.icon}`]:{marginBottom:6}}},{props:e=>{let{ownerState:t,iconPosition:n}=e;return t.icon&&t.label&&"bottom"===n},style:{[`& > .${f.icon}`]:{marginTop:6}}},{props:e=>{let{ownerState:t,iconPosition:n}=e;return t.icon&&t.label&&"start"===n},style:{[`& > .${f.icon}`]:{marginRight:t.spacing(1)}}},{props:e=>{let{ownerState:t,iconPosition:n}=e;return t.icon&&t.label&&"end"===n},style:{[`& > .${f.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${f.selected}`]:{opacity:1},[`&.${f.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${f.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${f.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${f.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${f.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:e=>{let{ownerState:t}=e;return t.fullWidth},style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:e=>{let{ownerState:t}=e;return t.wrapped},style:{fontSize:t.typography.pxToRem(12)}}]}}))),v=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTab"}),{className:a,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d,icon:h,iconPosition:f="top",indicator:v,label:y,onChange:b,onClick:x,onFocus:w,selected:S,selectionFollowsFocus:C,textColor:k="inherit",value:M,wrapped:_=!1,...T}=n,P={...n,disabled:l,disableFocusRipple:u,selected:S,icon:!!h,iconPosition:f,label:!!y,fullWidth:d,textColor:k,wrapped:_},I=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:l,selected:u,disabled:c}=e,d={root:["root",a&&l&&"labelIcon",`textColor${(0,s.Z)(n)}`,r&&"fullWidth",o&&"wrapped",u&&"selected",c&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.Z)(d,p,t)})(P),R=h&&y&&r.isValidElement(h)?r.cloneElement(h,{className:(0,o.Z)(I.icon,h.props.className)}):h;return(0,m.jsxs)(g,{focusRipple:!u,className:(0,o.Z)(I.root,a),ref:t,role:"tab","aria-selected":S,disabled:l,onClick:e=>{!S&&b&&b(e,M),x&&x(e)},onFocus:e=>{C&&!S&&b&&b(e,M),w&&w(e)},ownerState:P,tabIndex:S?0:-1,...T,children:["top"===f||"start"===f?(0,m.jsxs)(r.Fragment,{children:[R,y]}):(0,m.jsxs)(r.Fragment,{children:[y,R]}),v]})}))},36901:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(32123),o=n(90496),i=n(42152),a=n(87071),s=n(99289),l=n(97136),u=n(71959),c=n(32792),d=n(19577);function h(e){return(0,d.ZP)("MuiTable",e)}(0,c.Z)("MuiTable",["root","stickyHeader"]);var p=n(77928);const f=(0,s.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,l.Z)((e=>{let{theme:t}=e;return{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:e=>{let{ownerState:t}=e;return t.stickyHeader},style:{borderCollapse:"separate"}}]}}))),m="table",g=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiTable"}),{className:s,component:l=m,padding:c="normal",size:d="medium",stickyHeader:g=!1,...v}=n,y={...n,component:l,padding:c,size:d,stickyHeader:g},b=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,i.Z)(r,h,t)})(y),x=r.useMemo((()=>({padding:c,size:d,stickyHeader:g})),[c,d,g]);return(0,p.jsx)(a.Z.Provider,{value:x,children:(0,p.jsx)(f,{as:l,role:l===m?null:"table",ref:t,className:(0,o.Z)(b.root,s),ownerState:y,...v})})}))},87071:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext()},21787:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(32123).createContext()},13295:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(32123),o=n(90496),i=n(42152),a=n(21787),s=n(99289),l=n(71959),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiTableBody",e)}(0,u.Z)("MuiTableBody",["root"]);var h=n(77928);const p=(0,s.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),f={variant:"body"},m="tbody",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableBody"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{className:(0,o.Z)(g.root,r),as:s,ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},15058:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(80706),l=n(87071),u=n(21787),c=n(99289),d=n(97136),h=n(71959),p=n(32792),f=n(19577);function m(e){return(0,f.ZP)("MuiTableCell",e)}const g=(0,p.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var v=n(77928);const y=(0,c.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,s.Z)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,s.Z)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,s.Z)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,d.Z)((e=>{let{theme:t}=e;return{...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n ${"light"===t.palette.mode?(0,a.$n)((0,a.Fq)(t.palette.divider,1),.88):(0,a._j)((0,a.Fq)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${g.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:e=>{let{ownerState:t}=e;return t.stickyHeader},style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}}))),b=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiTableCell"}),{align:a="inherit",className:c,component:d,padding:p,scope:f,size:g,sortDirection:b,variant:x,...w}=n,S=r.useContext(l.Z),C=r.useContext(u.Z),k=C&&"head"===C.variant;let M;M=d||(k?"th":"td");let _=f;"td"===M?_=void 0:!_&&k&&(_="col");const T=x||C&&C.variant,P={...n,align:a,component:M,padding:p||(S&&S.padding?S.padding:"normal"),size:g||(S&&S.size?S.size:"medium"),sortDirection:b,stickyHeader:"head"===T&&S&&S.stickyHeader,variant:T},I=(e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:l}=e,u={root:["root",n,l&&"stickyHeader","inherit"!==r&&`align${(0,s.Z)(r)}`,"normal"!==o&&`padding${(0,s.Z)(o)}`,`size${(0,s.Z)(a)}`]};return(0,i.Z)(u,m,t)})(P);let R=null;return b&&(R="asc"===b?"ascending":"descending"),(0,v.jsx)(y,{as:M,ref:t,className:(0,o.Z)(I.root,c),"aria-sort":R,scope:_,ownerState:P,...w})}))},60753:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(71959),l=n(32792),u=n(19577);function c(e){return(0,u.ZP)("MuiTableContainer",e)}(0,l.Z)("MuiTableContainer",["root"]);var d=n(77928);const h=(0,a.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{ref:t,as:a,className:(0,o.Z)(p.root,r),ownerState:u,...l})}))},39298:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(32123),o=n(90496),i=n(42152),a=n(21787),s=n(99289),l=n(71959),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiTableHead",e)}(0,u.Z)("MuiTableHead",["root"]);var h=n(77928);const p=(0,s.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),f={variant:"head"},m="thead",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableHead"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{as:s,className:(0,o.Z)(g.root,r),ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},76534:function(e,t,n){"use strict";n.d(t,{Z:()=>L});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(93188),c=n(34905),d=n(99551),h=n(15058),p=n(20026),f=n(38952),m=n(75294),g=n(92021),v=n(16639),y=n(57698),b=n(77928);const x=(0,y.Z)((0,b.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),w=(0,y.Z)((0,b.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),S=r.forwardRef((function(e,t){const{backIconButtonProps:n,count:r,disabled:o=!1,getItemAriaLabel:i,nextIconButtonProps:a,onPageChange:s,page:l,rowsPerPage:u,showFirstButton:c,showLastButton:d,slots:h={},slotProps:p={},...y}=e,S=(0,f.V)(),C=h.firstButton??v.Z,k=h.lastButton??v.Z,M=h.nextButton??v.Z,_=h.previousButton??v.Z,T=h.firstButtonIcon??w,P=h.lastButtonIcon??x,I=h.nextButtonIcon??g.Z,R=h.previousButtonIcon??m.Z,D=S?k:C,O=S?M:_,A=S?_:M,E=S?C:k,Z=S?p.lastButton:p.firstButton,L=S?p.nextButton:p.previousButton,F=S?p.previousButton:p.nextButton,j=S?p.firstButton:p.lastButton;return(0,b.jsxs)("div",{ref:t,...y,children:[c&&(0,b.jsx)(D,{onClick:e=>{s(e,0)},disabled:o||0===l,"aria-label":i("first",l),title:i("first",l),...Z,children:S?(0,b.jsx)(P,{...p.lastButtonIcon}):(0,b.jsx)(T,{...p.firstButtonIcon})}),(0,b.jsx)(O,{onClick:e=>{s(e,l-1)},disabled:o||0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l),...L??n,children:S?(0,b.jsx)(I,{...p.nextButtonIcon}):(0,b.jsx)(R,{...p.previousButtonIcon})}),(0,b.jsx)(A,{onClick:e=>{s(e,l+1)},disabled:o||-1!==r&&l>=Math.ceil(r/u)-1,color:"inherit","aria-label":i("next",l),title:i("next",l),...F??a,children:S?(0,b.jsx)(R,{...p.previousButtonIcon}):(0,b.jsx)(I,{...p.nextButtonIcon})}),d&&(0,b.jsx)(E,{onClick:e=>{s(e,Math.max(0,Math.ceil(r/u)-1))},disabled:o||l>=Math.ceil(r/u)-1,"aria-label":i("last",l),title:i("last",l),...j,children:S?(0,b.jsx)(T,{...p.firstButtonIcon}):(0,b.jsx)(P,{...p.lastButtonIcon})})]})}));var C,k=n(50917),M=n(8615),_=n(81543);const T=(0,a.ZP)(h.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}}))),P=(0,a.ZP)(p.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${M.Z.actions}`]:t.actions,...t.toolbar})})((0,s.Z)((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${M.Z.actions}`]:{flexShrink:0,marginLeft:20}}}))),I=(0,a.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),R=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((0,s.Z)((e=>{let{theme:t}=e;return{...t.typography.body2,flexShrink:0}}))),D=(0,a.ZP)(d.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${M.Z.selectIcon}`]:t.selectIcon,[`& .${M.Z.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${M.Z.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),O=(0,a.ZP)(c.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),A=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((0,s.Z)((e=>{let{theme:t}=e;return{...t.typography.body2,flexShrink:0}})));function E(e){let{from:t,to:n,count:r}=e;return`${t}–${n} of ${-1!==r?r:`more than ${n}`}`}function Z(e){return`Go to ${e} page`}const L=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTablePagination"}),{ActionsComponent:a=S,backIconButtonProps:s,colSpan:c,component:d=h.Z,count:p,disabled:f=!1,getItemAriaLabel:m=Z,labelDisplayedRows:g=E,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:x,onRowsPerPageChange:w,page:L,rowsPerPage:F,rowsPerPageOptions:j=[10,25,50,100],SelectProps:N={},showFirstButton:z=!1,showLastButton:B=!1,slotProps:V={},slots:H={},...$}=n,W=n,G=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},M.U,t)})(W),U=(null==V?void 0:V.select)??N,q=U.native?"option":O;let K;d!==h.Z&&"td"!==d||(K=c||1e3);const Y=(0,k.Z)(U.id),X=(0,k.Z)(U.labelId),Q={slots:H,slotProps:V},[J,ee]=(0,_.Z)("root",{ref:t,className:G.root,elementType:T,externalForwardedProps:{...Q,component:d,...$},ownerState:W,additionalProps:{colSpan:K}}),[te,ne]=(0,_.Z)("toolbar",{className:G.toolbar,elementType:P,externalForwardedProps:Q,ownerState:W}),[re,oe]=(0,_.Z)("spacer",{className:G.spacer,elementType:I,externalForwardedProps:Q,ownerState:W}),[ie,ae]=(0,_.Z)("selectLabel",{className:G.selectLabel,elementType:R,externalForwardedProps:Q,ownerState:W,additionalProps:{id:X}}),[se,le]=(0,_.Z)("select",{className:G.select,elementType:D,externalForwardedProps:Q,ownerState:W}),[ue,ce]=(0,_.Z)("menuItem",{className:G.menuItem,elementType:q,externalForwardedProps:Q,ownerState:W}),[de,he]=(0,_.Z)("displayedRows",{className:G.displayedRows,elementType:A,externalForwardedProps:Q,ownerState:W});return(0,b.jsx)(J,{...ee,children:(0,b.jsxs)(te,{...ne,children:[(0,b.jsx)(re,{...oe}),j.length>1&&(0,b.jsx)(ie,{...ae,children:v}),j.length>1&&(0,b.jsx)(se,{variant:"standard",...!U.variant&&{input:C||(C=(0,b.jsx)(u.ZP,{}))},value:F,onChange:w,id:Y,labelId:X,...U,classes:{...U.classes,root:(0,o.Z)(G.input,G.selectRoot,(U.classes||{}).root),select:(0,o.Z)(G.select,(U.classes||{}).select),icon:(0,o.Z)(G.selectIcon,(U.classes||{}).icon)},disabled:f,...le,children:j.map((e=>(0,r.createElement)(ue,{...ce,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e)))}),(0,b.jsx)(de,{...he,children:g({from:0===p?0:L*F+1,to:-1===p?(L+1)*F:-1===F?p:Math.min(p,(L+1)*F),count:-1===p?-1:p,page:L})}),(0,b.jsx)(a,{className:G.actions,backIconButtonProps:s,count:p,nextIconButtonProps:y,onPageChange:x,page:L,rowsPerPage:F,showFirstButton:z,showLastButton:B,slotProps:V.actions,slots:H.actions,getItemAriaLabel:m,disabled:f})]})})}))},8615:function(e,t,n){"use strict";n.d(t,{U:()=>i,Z:()=>a});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiTablePagination",e)}const a=(0,r.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"])},2902:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(32123),o=n(90496),i=n(42152),a=n(79717),s=n(21787),l=n(99289),u=n(97136),c=n(71959),d=n(32792),h=n(19577);function p(e){return(0,h.ZP)("MuiTableRow",e)}const f=(0,d.Z)("MuiTableRow",["root","selected","hover","head","footer"]);var m=n(77928);const g=(0,l.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,u.Z)((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${f.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${f.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}}))),v="tr",y=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTableRow"}),{className:a,component:l=v,hover:u=!1,selected:d=!1,...h}=n,f=r.useContext(s.Z),y={...n,component:l,hover:u,selected:d,head:f&&"head"===f.variant,footer:f&&"footer"===f.variant},b=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:a}=e,s={root:["root",n&&"selected",r&&"hover",o&&"head",a&&"footer"]};return(0,i.Z)(s,p,t)})(y);return(0,m.jsx)(g,{as:l,ref:t,className:(0,o.Z)(b.root,a),role:l===v?null:"row",ownerState:y,...h})}))},18911:function(e,t,n){"use strict";n.d(t,{Z:()=>B});var r=n(32123),o=n(90496),i=n(42152),a=n(38952),s=n(62045),l=n(99289),u=n(35224),c=n(97136),d=n(71959),h=n(50330);function p(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var f=n(12995),m=n(13304),g=n(77928);const v={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var y=n(75294),b=n(92021),x=n(89865),w=n(32792),S=n(19577);function C(e){return(0,S.ZP)("MuiTabScrollButton",e)}const k=(0,w.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),M=(0,l.ZP)(x.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${k.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),_=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:l={},slotProps:u={},direction:c,orientation:h,disabled:p,...f}=n,m=(0,a.V)(),v={isRtl:m,...n},x=(e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return(0,i.Z)(o,C,t)})(v),w=l.StartScrollButtonIcon??y.Z,S=l.EndScrollButtonIcon??b.Z,k=(0,s.Z)({elementType:w,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),_=(0,s.Z)({elementType:S,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return(0,g.jsx)(M,{component:"div",className:(0,o.Z)(x.root,r),ref:t,role:null,ownerState:v,tabIndex:null,...f,style:{...f.style,..."vertical"===h&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:"left"===c?(0,g.jsx)(w,{...k}):(0,g.jsx)(S,{..._})})}));var T=n(85270),P=n(28705),I=n(76852),R=n(81543);const D=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,O=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,A=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},E=(0,l.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${P.Z.scrollButtons}`]:t.scrollButtons},{[`& .${P.Z.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,c.Z)((e=>{let{theme:t}=e;return{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:e=>{let{ownerState:t}=e;return t.vertical},style:{flexDirection:"column"}},{props:e=>{let{ownerState:t}=e;return t.scrollButtonsHideMobile},style:{[`& .${P.Z.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}}))),Z=(0,l.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:e=>{let{ownerState:t}=e;return t.fixed},style:{overflowX:"hidden",width:"100%"}},{props:e=>{let{ownerState:t}=e;return t.hideScrollbar},style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:e=>{let{ownerState:t}=e;return t.scrollableX},style:{overflowX:"auto",overflowY:"hidden"}},{props:e=>{let{ownerState:t}=e;return t.scrollableY},style:{overflowY:"auto",overflowX:"hidden"}}]}),L=(0,l.ZP)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:e=>{let{ownerState:t}=e;return t.vertical},style:{flexDirection:"column"}},{props:e=>{let{ownerState:t}=e;return t.centered},style:{justifyContent:"center"}}]}),F=(0,l.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,c.Z)((e=>{let{theme:t}=e;return{position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:e=>{let{ownerState:t}=e;return t.vertical},style:{height:"100%",width:2,right:0}}]}}))),j=(0,l.ZP)((function(e){const{onChange:t,...n}=e,o=r.useRef(),i=r.useRef(null),a=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return(0,f.Z)((()=>{const e=(0,h.Z)((()=>{const e=o.current;a(),e!==o.current&&t(o.current)})),n=(0,m.Z)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{a(),t(o.current)}),[t]),(0,g.jsx)("div",{style:v,...n,ref:i})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),N={};const z=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabs"}),l=(0,u.Z)(),c=(0,a.V)(),{"aria-label":f,"aria-labelledby":v,action:y,centered:b=!1,children:x,className:w,component:S="div",allowScrollButtonsMobile:C=!1,indicatorColor:k="primary",onChange:M,orientation:z="horizontal",ScrollButtonComponent:B,scrollButtons:V="auto",selectionFollowsFocus:H,slots:$={},slotProps:W={},TabIndicatorProps:G={},TabScrollButtonProps:U={},textColor:q="primary",value:K,variant:Y="standard",visibleScrollbar:X=!1,...Q}=n,J="scrollable"===Y,ee="vertical"===z,te=ee?"scrollTop":"scrollLeft",ne=ee?"top":"left",re=ee?"bottom":"right",oe=ee?"clientHeight":"clientWidth",ie=ee?"height":"width",ae={...n,component:S,allowScrollButtonsMobile:C,indicatorColor:k,orientation:z,vertical:ee,scrollButtons:V,textColor:q,variant:Y,visibleScrollbar:X,fixed:!J,hideScrollbar:J&&!X,scrollableX:J&&!ee,scrollableY:J&&ee,centered:b&&!J,scrollButtonsHideMobile:!C},se=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,i.Z)(c,P.m,u)})(ae),le=(0,s.Z)({elementType:$.StartScrollButtonIcon,externalSlotProps:W.startScrollButtonIcon,ownerState:ae}),ue=(0,s.Z)({elementType:$.EndScrollButtonIcon,externalSlotProps:W.endScrollButtonIcon,ownerState:ae});const[ce,de]=r.useState(!1),[he,pe]=r.useState(N),[fe,me]=r.useState(!1),[ge,ve]=r.useState(!1),[ye,be]=r.useState(!1),[xe,we]=r.useState({overflow:"hidden",scrollbarWidth:0}),Se=new Map,Ce=r.useRef(null),ke=r.useRef(null),Me={slots:$,slotProps:{indicator:G,scrollButton:U,...W}},_e=()=>{const e=Ce.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==K){const e=ke.current.children;if(e.length>0){const t=e[Se.get(K)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},Te=(0,T.Z)((()=>{const{tabsMeta:e,tabMeta:t}=_e();let n,r=0;ee?(n="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(n=c?"right":"left",t&&e&&(r=(c?-1:1)*(t[n]-e[n]+e.scrollLeft)));const o={[n]:r,[ie]:t?t[ie]:0};if("number"!=typeof he[n]||"number"!=typeof he[ie])pe(o);else{const e=Math.abs(he[n]-o[n]),t=Math.abs(he[ie]-o[ie]);(e>=1||t>=1)&&pe(o)}})),Pe=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:i=p,duration:a=300}=r;let s=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void o(new Error("Animation cancelled"));null===s&&(s=r);const c=Math.min(1,(r-s)/a);t[e]=i(c)*(n-l)+l,c>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(te,Ce.current,e,{duration:l.transitions.duration.standard}):Ce.current[te]=e},Ie=e=>{let t=Ce.current[te];t+=ee?e:e*(c?-1:1),Pe(t)},Re=()=>{const e=Ce.current[oe];let t=0;const n=Array.from(ke.current.children);for(let r=0;re){0===r&&(t=e);break}t+=o[oe]}return t},De=()=>{Ie(-1*Re())},Oe=()=>{Ie(Re())},[Ae,{onChange:Ee,...Ze}]=(0,R.Z)("scrollbar",{className:(0,o.Z)(se.scrollableX,se.hideScrollbar),elementType:j,shouldForwardComponentProp:!0,externalForwardedProps:Me,ownerState:ae}),Le=r.useCallback((e=>{null==Ee||Ee(e),we({overflow:null,scrollbarWidth:e})}),[Ee]),[Fe,je]=(0,R.Z)("scrollButtons",{className:(0,o.Z)(se.scrollButtons,U.className),elementType:_,externalForwardedProps:Me,ownerState:ae,additionalProps:{orientation:z,slots:{StartScrollButtonIcon:$.startScrollButtonIcon||$.StartScrollButtonIcon,EndScrollButtonIcon:$.endScrollButtonIcon||$.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:le,endScrollButtonIcon:ue}}}),Ne=(0,T.Z)((e=>{const{tabsMeta:t,tabMeta:n}=_e();if(n&&t)if(n[ne]t[re]){const r=t[te]+(n[re]-t[re]);Pe(r,{animation:e})}})),ze=(0,T.Z)((()=>{J&&!1!==V&&be(!ye)}));r.useEffect((()=>{const e=(0,h.Z)((()=>{Ce.current&&Te()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{null==t||t.unobserve(e)})),e.addedNodes.forEach((e=>{null==t||t.observe(e)}))})),e(),ze()},r=(0,m.Z)(Ce.current);let o;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ke.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ke.current,{childList:!0})),()=>{e.clear(),r.removeEventListener("resize",e),null==o||o.disconnect(),null==t||t.disconnect()}}),[Te,ze]),r.useEffect((()=>{const e=Array.from(ke.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&J&&!1!==V){const n=e[0],r=e[t-1],o={root:Ce.current,threshold:.99},i=new IntersectionObserver((e=>{me(!e[0].isIntersecting)}),o);i.observe(n);const a=new IntersectionObserver((e=>{ve(!e[0].isIntersecting)}),o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}}),[J,V,ye,null==x?void 0:x.length]),r.useEffect((()=>{de(!0)}),[]),r.useEffect((()=>{Te()})),r.useEffect((()=>{Ne(N!==he)}),[Ne,he]),r.useImperativeHandle(y,(()=>({updateIndicator:Te,updateScrollButtons:ze})),[Te,ze]);const[Be,Ve]=(0,R.Z)("indicator",{className:(0,o.Z)(se.indicator,G.className),elementType:F,externalForwardedProps:Me,ownerState:ae,additionalProps:{style:he}}),He=(0,g.jsx)(Be,{...Ve});let $e=0;const We=r.Children.map(x,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?$e:e.props.value;Se.set(t,$e);const n=t===K;return $e+=1,r.cloneElement(e,{fullWidth:"fullWidth"===Y,indicator:n&&!ce&&He,selected:n,selectionFollowsFocus:H,onChange:M,textColor:q,value:t,...1!==$e||!1!==K||e.props.tabIndex?{}:{tabIndex:0}})})),Ge=(()=>{const e={};e.scrollbarSizeListener=J?(0,g.jsx)(Ae,{...Ze,onChange:Le}):null;const t=J&&("auto"===V&&(fe||ge)||!0===V);return e.scrollButtonStart=t?(0,g.jsx)(Fe,{direction:c?"right":"left",onClick:De,disabled:!fe,...je}):null,e.scrollButtonEnd=t?(0,g.jsx)(Fe,{direction:c?"left":"right",onClick:Oe,disabled:!ge,...je}):null,e})(),[Ue,qe]=(0,R.Z)("root",{ref:t,className:(0,o.Z)(se.root,w),elementType:E,externalForwardedProps:{...Me,...Q,component:S},ownerState:ae}),[Ke,Ye]=(0,R.Z)("scroller",{ref:Ce,className:se.scroller,elementType:Z,externalForwardedProps:Me,ownerState:ae,additionalProps:{style:{overflow:xe.overflow,[ee?"margin"+(c?"Left":"Right"):"marginBottom"]:X?void 0:-xe.scrollbarWidth}}}),[Xe,Qe]=(0,R.Z)("list",{ref:ke,className:(0,o.Z)(se.list,se.flexContainer),elementType:L,externalForwardedProps:Me,ownerState:ae,getSlotProps:e=>({...e,onKeyDown:t=>{var n;(e=>{const t=ke.current,n=(0,I.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===z?"ArrowLeft":"ArrowUp",o="horizontal"===z?"ArrowRight":"ArrowDown";switch("horizontal"===z&&c&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),A(t,n,O);break;case o:e.preventDefault(),A(t,n,D);break;case"Home":e.preventDefault(),A(t,null,D);break;case"End":e.preventDefault(),A(t,null,O)}})(t),null===(n=e.onKeyDown)||void 0===n||n.call(e,t)}})});return(0,g.jsxs)(Ue,{...qe,children:[Ge.scrollButtonStart,Ge.scrollbarSizeListener,(0,g.jsxs)(Ke,{...Ye,children:[(0,g.jsx)(Xe,{"aria-label":f,"aria-labelledby":v,"aria-orientation":"vertical"===z?"vertical":null,role:"tablist",...Qe,children:We}),ce&&He]}),Ge.scrollButtonEnd]})})),B=z},28705:function(e,t,n){"use strict";n.d(t,{Z:()=>a,m:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiTabs",e)}const a=(0,r.Z)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"])},6931:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(32123),o=n(90496),i=n(42152),a=n(30341),s=n(99289),l=n(71959),u=n(30062),c=n(75424),d=n(77297),h=n(630),p=n(44206),f=n(90755),m=n(99551),g=n(32792),v=n(19577);function y(e){return(0,v.ZP)("MuiTextField",e)}(0,g.Z)("MuiTextField",["root"]);var b=n(81543),x=n(77928);const w={standard:u.Z,filled:c.Z,outlined:d.Z},S=(0,s.ZP)(p.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),C=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:u,className:c,color:d="primary",defaultValue:p,disabled:g=!1,error:v=!1,FormHelperTextProps:C,fullWidth:k=!1,helperText:M,id:_,InputLabelProps:T,inputProps:P,InputProps:I,inputRef:R,label:D,maxRows:O,minRows:A,multiline:E=!1,name:Z,onBlur:L,onChange:F,onFocus:j,placeholder:N,required:z=!1,rows:B,select:V=!1,SelectProps:H,slots:$={},slotProps:W={},type:G,value:U,variant:q="outlined",...K}=n,Y={...n,autoFocus:s,color:d,disabled:g,error:v,fullWidth:k,multiline:E,required:z,select:V,variant:q},X=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},y,t)})(Y);const Q=(0,a.Z)(_),J=M&&Q?`${Q}-helper-text`:void 0,ee=D&&Q?`${Q}-label`:void 0,te=w[q],ne={slots:$,slotProps:{input:I,inputLabel:T,htmlInput:P,formHelperText:C,select:H,...W}},re={},oe=ne.slotProps.inputLabel;"outlined"===q&&(oe&&void 0!==oe.shrink&&(re.notched=oe.shrink),re.label=D),V&&(H&&H.native||(re.id=void 0),re["aria-describedby"]=void 0);const[ie,ae]=(0,b.Z)("input",{elementType:te,externalForwardedProps:ne,additionalProps:re,ownerState:Y}),[se,le]=(0,b.Z)("inputLabel",{elementType:h.Z,externalForwardedProps:ne,ownerState:Y}),[ue,ce]=(0,b.Z)("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Y}),[de,he]=(0,b.Z)("formHelperText",{elementType:f.Z,externalForwardedProps:ne,ownerState:Y}),[pe,fe]=(0,b.Z)("select",{elementType:m.Z,externalForwardedProps:ne,ownerState:Y}),me=(0,x.jsx)(ie,{"aria-describedby":J,autoComplete:r,autoFocus:s,defaultValue:p,fullWidth:k,multiline:E,name:Z,rows:B,maxRows:O,minRows:A,type:G,value:U,id:Q,inputRef:R,onBlur:L,onChange:F,onFocus:j,placeholder:N,inputProps:ce,slots:{input:$.htmlInput?ue:void 0},...ae});return(0,x.jsxs)(S,{className:(0,o.Z)(X.root,c),disabled:g,error:v,fullWidth:k,ref:t,required:z,color:d,variant:q,ownerState:Y,...K,children:[null!=D&&""!==D&&(0,x.jsx)(se,{htmlFor:Q,id:ee,...le,children:D}),V?(0,x.jsx)(pe,{"aria-describedby":J,id:Q,labelId:ee,value:U,input:me,...fe,children:u}):me,M&&(0,x.jsx)(de,{id:J,...he,children:M})]})}))},20026:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(32123),o=n(90496),i=n(42152),a=n(99289),s=n(97136),l=n(71959),u=n(32792),c=n(19577);function d(e){return(0,c.ZP)("MuiToolbar",e)}(0,u.Z)("MuiToolbar",["root","gutters","regular","dense"]);var h=n(77928);const p=(0,a.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,s.Z)((e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",variants:[{props:e=>{let{ownerState:t}=e;return!t.disableGutters},style:{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:t.mixins.toolbar}]}}))),f=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiToolbar"}),{className:r,component:a="div",disableGutters:s=!1,variant:u="regular",...c}=n,f={...n,component:a,disableGutters:s,variant:u},m=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,i.Z)(o,d,t)})(f);return(0,h.jsx)(p,{as:a,className:(0,o.Z)(m.root,r),ref:t,ownerState:f,...c})}))},95359:function(e,t,n){"use strict";n.d(t,{Z:()=>O});var r=n(32123),o=n(90496),i=n(51154),a=n(42152),s=n(79717),l=n(38952),u=n(5129),c=n(41636),d=n(99289),h=n(35224),p=n(97136),f=n(71959),m=n(80706),g=n(63400),v=n(72204),y=n(85270),b=n(70021),x=n(50917),w=n(80897),S=n(81543),C=n(77887),k=n(77928);const M=(0,d.ZP)(v.Z,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((0,p.Z)((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none",variants:[{props:e=>{let{ownerState:t}=e;return!t.disableInteractive},style:{pointerEvents:"auto"}},{props:e=>{let{open:t}=e;return!t},style:{pointerEvents:"none"}},{props:e=>{let{ownerState:t}=e;return t.arrow},style:{[`&[data-popper-placement*="bottom"] .${C.Z.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${C.Z.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:e=>{let{ownerState:t}=e;return t.arrow&&!t.isRtl},style:{[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:e=>{let{ownerState:t}=e;return t.arrow&&!!t.isRtl},style:{[`&[data-popper-placement*="right"] .${C.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:e=>{let{ownerState:t}=e;return t.arrow&&!t.isRtl},style:{[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:e=>{let{ownerState:t}=e;return t.arrow&&!!t.isRtl},style:{[`&[data-popper-placement*="left"] .${C.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}}))),_=(0,d.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,m.Z)(n.placement.split("-")[0])}`]]}})((0,p.Z)((e=>{let{theme:t}=e;return{backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,s.Fq)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium,[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${C.Z.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${C.Z.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:e=>{let{ownerState:t}=e;return t.arrow},style:{position:"relative",margin:0}},{props:e=>{let{ownerState:t}=e;return t.touch},style:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:t.typography.fontWeightRegular}},{props:e=>{let{ownerState:t}=e;return!t.isRtl},style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:e=>{let{ownerState:t}=e;return!t.isRtl&&t.touch},style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:e=>{let{ownerState:t}=e;return!!t.isRtl},style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:e=>{let{ownerState:t}=e;return!!t.isRtl&&t.touch},style:{[`.${C.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${C.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:e=>{let{ownerState:t}=e;return t.touch},style:{[`.${C.Z.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:e=>{let{ownerState:t}=e;return t.touch},style:{[`.${C.Z.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var n}))),T=(0,d.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((0,p.Z)((e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,s.Fq)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}})));let P=!1;const I=new i.V;let R={x:0,y:0};function D(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i{void 0!==we.current&&(document.body.style.WebkitUserSelect=we.current,we.current=void 0),ge.clear()}));r.useEffect((()=>Se),[Se]);const Ce=e=>{I.clear(),P=!0,ye(!0),U&&!be&&U(e)},ke=(0,y.Z)((e=>{I.start(800+$,(()=>{P=!1})),ye(!1),G&&be&&G(e),pe.start(ie.transitions.duration.shortest,(()=>{de.current=!1}))})),Me=e=>{de.current&&"touchstart"!==e.type||(se&&se.removeAttribute("title"),fe.clear(),me.clear(),N||P&&z?fe.start(P?z:N,(()=>{Ce(e)})):Ce(e))},_e=e=>{fe.clear(),me.start($,(()=>{ke(e)}))},[,Te]=r.useState(!1),Pe=e=>{(0,u.Z)(e.target)||(Te(!1),_e(e))},Ie=e=>{se||le(e.currentTarget),(0,u.Z)(e.target)&&(Te(!0),Me(e))},Re=e=>{de.current=!0;const t=oe.props;t.onTouchStart&&t.onTouchStart(e)},De=e=>{Re(e),me.clear(),pe.clear(),Se(),we.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ge.start(B,(()=>{document.body.style.WebkitUserSelect=we.current,Me(e)}))},Oe=e=>{oe.props.onTouchEnd&&oe.props.onTouchEnd(e),Se(),me.start(W,(()=>{ke(e)}))};r.useEffect((()=>{if(be)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&ke(e)}}),[ke,be]);const Ae=(0,b.Z)((0,c.Z)(oe),le,t);ee||0===ee||(be=!1);const Ee=r.useRef(),Ze={},Le="string"==typeof ee;E?(Ze.title=be||!Le||L?null:ee,Ze["aria-describedby"]=be?xe:null):(Ze["aria-label"]=Le?ee:null,Ze["aria-labelledby"]=be&&!Le?xe:null);const Fe={...Ze,...re,...oe.props,className:(0,o.Z)(re.className,oe.props.className),onTouchStart:Re,ref:Ae,...V?{onMouseMove:e=>{const t=oe.props;t.onMouseMove&&t.onMouseMove(e),R={x:e.clientX,y:e.clientY},Ee.current&&Ee.current.update()}}:{}};const je={};j||(Fe.onTouchStart=De,Fe.onTouchEnd=Oe),L||(Fe.onMouseOver=D(Me,Fe.onMouseOver),Fe.onMouseLeave=D(_e,Fe.onMouseLeave),he||(je.onMouseOver=Me,je.onMouseLeave=_e)),Z||(Fe.onFocus=D(Ie,Fe.onFocus),Fe.onBlur=D(Pe,Fe.onBlur),he||(je.onFocus=Ie,je.onBlur=Pe));const Ne={...n,isRtl:ae,arrow:s,disableInteractive:he,placement:K,PopperComponentProp:Y,touch:de.current},ze="function"==typeof Q.popper?Q.popper(Ne):Q.popper,Be=r.useMemo((()=>{var e,t;let n=[{name:"arrow",enabled:Boolean(ue),options:{element:ue,padding:4}}];return(null===(e=X.popperOptions)||void 0===e?void 0:e.modifiers)&&(n=n.concat(X.popperOptions.modifiers)),(null==ze||null===(t=ze.popperOptions)||void 0===t?void 0:t.modifiers)&&(n=n.concat(ze.popperOptions.modifiers)),{...X.popperOptions,...null==ze?void 0:ze.popperOptions,modifiers:n}}),[ue,X.popperOptions,null==ze?void 0:ze.popperOptions]),Ve=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,m.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,a.Z)(s,C.Q,t)})(Ne),He="function"==typeof Q.transition?Q.transition(Ne):Q.transition,$e={slots:{popper:O.Popper,transition:O.Transition??te,tooltip:O.Tooltip,arrow:O.Arrow,...J},slotProps:{arrow:Q.arrow??A.arrow,popper:{...X,...ze??A.popper},tooltip:Q.tooltip??A.tooltip,transition:{...ne,...He??A.transition}}},[We,Ge]=(0,S.Z)("popper",{elementType:M,externalForwardedProps:$e,ownerState:Ne,className:(0,o.Z)(Ve.popper,null==X?void 0:X.className)}),[Ue,qe]=(0,S.Z)("transition",{elementType:g.Z,externalForwardedProps:$e,ownerState:Ne}),[Ke,Ye]=(0,S.Z)("tooltip",{elementType:_,className:Ve.tooltip,externalForwardedProps:$e,ownerState:Ne}),[Xe,Qe]=(0,S.Z)("arrow",{elementType:T,className:Ve.arrow,externalForwardedProps:$e,ownerState:Ne,ref:ce});return(0,k.jsxs)(r.Fragment,{children:[r.cloneElement(oe,Fe),(0,k.jsx)(We,{as:Y??v.Z,placement:K,anchorEl:V?{getBoundingClientRect:()=>({top:R.y,left:R.x,right:R.x,bottom:R.y,width:0,height:0})}:se,popperRef:Ee,open:!!se&&be,id:xe,transition:!0,...je,...Ge,popperOptions:Be,children:e=>{let{TransitionProps:t}=e;return(0,k.jsx)(Ue,{timeout:ie.transitions.duration.shorter,...t,...qe,children:(0,k.jsxs)(Ke,{...Ye,children:[ee,s?(0,k.jsx)(Xe,{...Qe}):null]})})}})]})}))},77887:function(e,t,n){"use strict";n.d(t,{Q:()=>i,Z:()=>a});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiTooltip",e)}const a=(0,r.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"])},6773:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(32123),o=n(90496),i=n(42152),a=n(81612),s=n(99289),l=n(97136),u=n(71959),c=n(80706),d=n(38358),h=n(13224),p=n(77928);const f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},m=(0,a.u7)(),g=(0,s.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,c.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((0,l.Z)((e=>{let{theme:t}=e;var n;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter((e=>{let[t,n]=e;return"inherit"!==t&&n&&"object"==typeof n})).map((e=>{let[t,n]=e;return{props:{variant:t},style:n}})),...Object.entries(t.palette).filter((0,d.Z)()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}})),...Object.entries((null===(n=t.palette)||void 0===n?void 0:n.text)||{}).filter((e=>{let[,t]=e;return"string"==typeof t})).map((e=>{let[n]=e;return{props:{color:`text${(0,c.Z)(n)}`},style:{color:(t.vars||t).palette.text[n]}}})),{props:e=>{let{ownerState:t}=e;return"inherit"!==t.align},style:{textAlign:"var(--Typography-textAlign)"}},{props:e=>{let{ownerState:t}=e;return t.noWrap},style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:e=>{let{ownerState:t}=e;return t.gutterBottom},style:{marginBottom:"0.35em"}},{props:e=>{let{ownerState:t}=e;return t.paragraph},style:{marginBottom:16}}]}}))),v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y=r.forwardRef((function(e,t){const{color:n,...r}=(0,u.i)({props:e,name:"MuiTypography"}),a=m({...r,...!f[n]&&{color:n}}),{align:s="inherit",className:l,component:d,gutterBottom:y=!1,noWrap:b=!1,paragraph:x=!1,variant:w="body1",variantMapping:S=v,...C}=a,k={...a,align:s,color:n,className:l,component:d,gutterBottom:y,noWrap:b,paragraph:x,variant:w,variantMapping:S},M=d||(x?"p":S[w]||v[w])||"span",_=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:s}=e,l={root:["root",a,"inherit"!==e.align&&`align${(0,c.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,i.Z)(l,h.f,s)})(k);return(0,p.jsx)(g,{as:M,ref:t,className:(0,o.Z)(_.root,l),...C,ownerState:k,style:{..."inherit"!==s&&{"--Typography-textAlign":s},...C.style}})}))},13224:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(32792),o=n(19577);function i(e){return(0,o.ZP)("MuiTypography",e)}const a=(0,r.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},44706:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(32123),o=n(84075),i=n(41636),a=n(769),s=n(77928);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function u(e){const t=[],n=[];return Array.from(e.querySelectorAll(l)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function c(){return!0}const d=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:l=!1,disableRestoreFocus:d=!1,getTabbable:h=u,isEnabled:p=c,open:f}=e,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(null),y=r.useRef(null),b=r.useRef(null),x=r.useRef(!1),w=r.useRef(null),S=(0,o.Z)((0,i.Z)(t),w),C=r.useRef(null);r.useEffect((()=>{f&&w.current&&(x.current=!n)}),[n,f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current);return w.current.contains(e.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),x.current&&w.current.focus()),()=>{d||(y.current&&y.current.focus&&(m.current=!0,y.current.focus()),y.current=null)}}),[f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current),t=t=>{C.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===w.current&&t.shiftKey&&(m.current=!0,v.current&&v.current.focus())},n=()=>{const t=w.current;if(null===t)return;if(!e.hasFocus()||!p()||m.current)return void(m.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==v.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!x.current)return;let n=[];if(e.activeElement!==g.current&&e.activeElement!==v.current||(n=h(w.current)),n.length>0){var r,o;const e=Boolean((null===(r=C.current)||void 0===r?void 0:r.shiftKey)&&"Tab"===(null===(o=C.current)||void 0===o?void 0:o.key)),t=n[0],i=n[n.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,l,d,p,f,h]);const k=e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0};return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:k,ref:g,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:S,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:k,ref:v,"data-testid":"sentinelEnd"})]})}},5514:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(32123),o=n(42152),i=n(80706),a=n(51977),s=n(99289),l=n(80897),u=n(40243),c=n(89865),d=n(32792),h=n(19577);function p(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,d.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var f=n(81543),m=n(77928);const g=(0,s.ZP)(c.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:e=>{let{edge:t,ownerState:n}=e;return"start"===t&&"small"!==n.size},style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:e=>{let{edge:t,ownerState:n}=e;return"end"===t&&"small"!==n.size},style:{marginRight:-12}}]}),v=(0,s.ZP)("input",{shouldForwardProp:a.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=r.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:a,defaultChecked:s,disabled:c,disableFocusRipple:d=!1,edge:h=!1,icon:y,id:b,inputProps:x,inputRef:w,name:S,onBlur:C,onChange:k,onFocus:M,readOnly:_,required:T=!1,tabIndex:P,type:I,value:R,slots:D={},slotProps:O={},...A}=e,[E,Z]=(0,l.Z)({controlled:r,default:Boolean(s),name:"SwitchBase",state:"checked"}),L=(0,u.Z)();let F=c;L&&void 0===F&&(F=L.disabled);const j="checkbox"===I||"radio"===I,N={...e,checked:E,disabled:F,disableFocusRipple:d,edge:h},z=(e=>{const{classes:t,checked:n,disabled:r,edge:a}=e,s={root:["root",n&&"checked",r&&"disabled",a&&`edge${(0,i.Z)(a)}`],input:["input"]};return(0,o.Z)(s,p,t)})(N),B={slots:D,slotProps:{input:x,...O}},[V,H]=(0,f.Z)("root",{ref:t,elementType:g,className:z.root,shouldForwardComponentProp:!0,externalForwardedProps:{...B,component:"span",...A},getSlotProps:e=>({...e,onFocus:t=>{var n;null===(n=e.onFocus)||void 0===n||n.call(e,t),(e=>{M&&M(e),L&&L.onFocus&&L.onFocus(e)})(t)},onBlur:t=>{var n;null===(n=e.onBlur)||void 0===n||n.call(e,t),(e=>{C&&C(e),L&&L.onBlur&&L.onBlur(e)})(t)}}),ownerState:N,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:F,role:void 0,tabIndex:null}}),[$,W]=(0,f.Z)("input",{ref:w,elementType:v,className:z.input,externalForwardedProps:B,getSlotProps:e=>({onChange:t=>{var n;null===(n=e.onChange)||void 0===n||n.call(e,t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;Z(t),k&&k(e,t)})(t)}}),ownerState:N,additionalProps:{autoFocus:n,checked:r,defaultChecked:s,disabled:F,id:j?b:void 0,name:S,readOnly:_,required:T,tabIndex:P,type:I,..."checkbox"===I&&void 0===R?{}:{value:R}}});return(0,m.jsxs)(V,{...H,children:[(0,m.jsx)($,{...W}),E?a:y]})}))},94963:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(32123);var r=n(57698),o=n(77928);const i=(0,r.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},4947:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(32123);var r=n(57698),o=n(77928);const i=(0,r.Z)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},75294:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(32123);var r=n(57698),o=n(77928);const i=(0,r.Z)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},92021:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(32123);var r=n(57698),o=n(77928);const i=(0,r.Z)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},3254:function(e,t,n){"use strict";n.d(t,{Z:()=>Q});var r=n(6085),o=n(94668),i=n(79717);const a={black:"#000",white:"#fff"},s={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},u={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},c={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},d={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},h={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},p={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function f(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:a.white,default:a.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const m=f();function g(){return{text:{primary:a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const v=g();function y(e,t,n,r){const o=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,i.$n)(e.main,o):"dark"===t&&(e.dark=(0,i._j)(e.main,a)))}function b(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:b=.2,...x}=e,w=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:d[200],light:d[50],dark:d[400]}:{main:d[700],light:d[400],dark:d[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),C=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:u[500],light:u[300],dark:u[700]}:{main:u[700],light:u[400],dark:u[800]}}(t),k=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[400],light:h[300],dark:h[700]}:{main:h[700],light:h[500],dark:h[900]}}(t),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[400],light:p[300],dark:p[700]}:{main:p[800],light:p[500],dark:p[900]}}(t),_=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:c[400],light:c[300],dark:c[700]}:{main:"#ed6c02",light:c[500],dark:c[900]}}(t);function T(e){return(0,i.mi)(e,v.text.primary)>=n?v.text.primary:m.text.primary}const P=e=>{let{color:t,name:n,mainShade:o=500,lightShade:i=300,darkShade:a=700}=e;if(t={...t},!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,r.Z)(11,n?` (${n})`:"",o));if("string"!=typeof t.main)throw new Error((0,r.Z)(12,n?` (${n})`:"",JSON.stringify(t.main)));return y(t,"light",i,b),y(t,"dark",a,b),t.contrastText||(t.contrastText=T(t.main)),t};let I;"light"===t?I=f():"dark"===t&&(I=g());return(0,o.Z)({common:{...a},mode:t,primary:P({color:w,name:"primary"}),secondary:P({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:P({color:C,name:"error"}),warning:P({color:_,name:"warning"}),info:P({color:k,name:"info"}),success:P({color:M,name:"success"}),grey:s,contrastThreshold:n,getContrastText:T,augmentColor:P,tonalOffset:b,...I},x)}function x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";function t(){for(var n=arguments.length,r=new Array(n),o=0;o1?r-1:0),i=1;i{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const k=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function M(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),k(i,e,`var(${r})`,s),k(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object.entries(t).forEach((t=>{let[o,i]=t;(!l||l&&!l([...n,o]))&&null!=i&&("object"==typeof i&&Object.keys(i).length>0?e(i,[...n,o],Array.isArray(i)?[...r,o]:r):s([...n,o],i,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const _=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...u}=e,{vars:c,css:d,varsWithDefaults:h}=M(u,t);let p=h;const f={},{[l]:m,...g}=a;if(Object.entries(g||{}).forEach((e=>{let[n,r]=e;const{vars:i,css:a,varsWithDefaults:s}=M(r,t);p=(0,o.Z)(p,s),f[n]={css:a,vars:i}})),m){const{css:e,vars:n,varsWithDefaults:r}=M(m,t);p=(0,o.Z)(p,r),f[l]={css:e,vars:n}}function v(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),(null==i?void 0:i.startsWith("data-"))&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){var o,s;if(e.defaultColorScheme===t)return":root";const r=(null===(s=a[t])||void 0===s||null===(o=s.palette)||void 0===o?void 0:o.mode)||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(f).forEach((t=>{let[,{vars:n}]=t;e=(0,o.Z)(e,n)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}i(n(void 0,{...d}),d);const{[o]:s,...l}=f;if(s){var u,c;const{css:e}=s,t=null===(c=a[o])||void 0===c||null===(u=c.palette)||void 0===u?void 0:u.mode,l=!r&&t?{colorScheme:t,...e}:{...e};i(n(o,{...l}),l)}return Object.entries(l).forEach((e=>{let[t,{css:o}]=e;var s,l;const u=null===(l=a[t])||void 0===l||null===(s=l.palette)||void 0===s?void 0:s.mode,c=!r&&u?{colorScheme:u,...o}:{...o};i(n(t,{...c}),c)})),t}}};var T=n(31922),P=n(3645),I=n(9661);var R=n(41618);function D(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{}};return function e(t){const n=Object.entries(t);for(let i=0;i0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i(0,o.Z)(e,t)),g),g.unstable_sxConfig={...T.Z,...null==p?void 0:p.unstable_sxConfig},g.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},g.toRuntimeSource=Z,g}const F=L;var j=n(84858);const N=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=(0,j.Z)(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function z(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function B(e){return"dark"===e?N:[]}function V(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!(null===(t=e[1])||void 0===t?void 0:t.match(/(mode|contrastThreshold|tonalOffset)/))}const H=e=>[...[...Array(25)].map(((t,n)=>`--${e?`${e}-`:""}overlays-${n}`)),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],$=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),(null==o?void 0:o.startsWith("data-"))&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return H(e.cssVarPrefix).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function W(e,t,n){!e[t]&&n&&(e[t]=n)}function G(e){return"string"==typeof e&&e.startsWith("hsl")?(0,i.ve)(e):e}function U(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,i.LR)(G(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const q=e=>{try{return e()}catch(e){}},K=function(){return x(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mui")};function Y(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=b(t);return{palette:i,opacity:{...z(i.mode),...n},overlays:r||B(i.mode),...o}}({...t,palette:{mode:o,...null==t?void 0:t.palette}}));const{palette:i,...a}=F({...n,palette:{mode:o,...null==t?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...z(o),...null==t?void 0:t.opacity},overlays:(null==t?void 0:t.overlays)||B(o)},a}function X(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:b({...!0===n?{}:n.palette,mode:t})})}function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{const t=D.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return v(e,t[r][o])};var r;if("light"===t.mode&&(W(t.common,"background","#fff"),W(t.common,"onBackground","#000")),"dark"===t.mode&&(W(t.common,"background","#000"),W(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){W(t.Alert,"errorColor",(0,i.q8)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.q8)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.q8)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.q8)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-main")),W(t.Alert,"infoFilledBg",n("palette-info-main")),W(t.Alert,"successFilledBg",n("palette-success-main")),W(t.Alert,"warningFilledBg",n("palette-warning-main")),W(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.main)))),W(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.main)))),W(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.main)))),W(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.main)))),W(t.Alert,"errorStandardBg",(0,i.ux)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.ux)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.ux)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.ux)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-100")),W(t.Avatar,"defaultBg",n("palette-grey-400")),W(t.Button,"inheritContainedBg",n("palette-grey-300")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),W(t.Chip,"defaultBorder",n("palette-grey-400")),W(t.Chip,"defaultAvatarColor",n("palette-grey-700")),W(t.Chip,"defaultIconColor",n("palette-grey-700")),W(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.ux)(t.primary.main,.62)),W(t.LinearProgress,"secondaryBg",(0,i.ux)(t.secondary.main,.62)),W(t.LinearProgress,"errorBg",(0,i.ux)(t.error.main,.62)),W(t.LinearProgress,"infoBg",(0,i.ux)(t.info.main,.62)),W(t.LinearProgress,"successBg",(0,i.ux)(t.success.main,.62)),W(t.LinearProgress,"warningBg",(0,i.ux)(t.warning.main,.62)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),W(t.Slider,"primaryTrack",(0,i.ux)(t.primary.main,.62)),W(t.Slider,"secondaryTrack",(0,i.ux)(t.secondary.main,.62)),W(t.Slider,"errorTrack",(0,i.ux)(t.error.main,.62)),W(t.Slider,"infoTrack",(0,i.ux)(t.info.main,.62)),W(t.Slider,"successTrack",(0,i.ux)(t.success.main,.62)),W(t.Slider,"warningTrack",(0,i.ux)(t.warning.main,.62));const e=(0,i.fk)(t.background.default,.8);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-400")),W(t.StepContent,"border",n("palette-grey-400")),W(t.Switch,"defaultColor",n("palette-common-white")),W(t.Switch,"defaultDisabledColor",n("palette-grey-100")),W(t.Switch,"primaryDisabledColor",(0,i.ux)(t.primary.main,.62)),W(t.Switch,"secondaryDisabledColor",(0,i.ux)(t.secondary.main,.62)),W(t.Switch,"errorDisabledColor",(0,i.ux)(t.error.main,.62)),W(t.Switch,"infoDisabledColor",(0,i.ux)(t.info.main,.62)),W(t.Switch,"successDisabledColor",(0,i.ux)(t.success.main,.62)),W(t.Switch,"warningDisabledColor",(0,i.ux)(t.warning.main,.62)),W(t.TableCell,"border",(0,i.ux)((0,i.zp)(t.divider,1),.88)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}if("dark"===t.mode){W(t.Alert,"errorColor",(0,i.ux)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.ux)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.ux)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.ux)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-dark")),W(t.Alert,"infoFilledBg",n("palette-info-dark")),W(t.Alert,"successFilledBg",n("palette-success-dark")),W(t.Alert,"warningFilledBg",n("palette-warning-dark")),W(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.dark)))),W(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.dark)))),W(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.dark)))),W(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.dark)))),W(t.Alert,"errorStandardBg",(0,i.q8)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.q8)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.q8)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.q8)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-900")),W(t.AppBar,"darkBg",n("palette-background-paper")),W(t.AppBar,"darkColor",n("palette-text-primary")),W(t.Avatar,"defaultBg",n("palette-grey-600")),W(t.Button,"inheritContainedBg",n("palette-grey-800")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),W(t.Chip,"defaultBorder",n("palette-grey-700")),W(t.Chip,"defaultAvatarColor",n("palette-grey-300")),W(t.Chip,"defaultIconColor",n("palette-grey-300")),W(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.q8)(t.primary.main,.5)),W(t.LinearProgress,"secondaryBg",(0,i.q8)(t.secondary.main,.5)),W(t.LinearProgress,"errorBg",(0,i.q8)(t.error.main,.5)),W(t.LinearProgress,"infoBg",(0,i.q8)(t.info.main,.5)),W(t.LinearProgress,"successBg",(0,i.q8)(t.success.main,.5)),W(t.LinearProgress,"warningBg",(0,i.q8)(t.warning.main,.5)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),W(t.Slider,"primaryTrack",(0,i.q8)(t.primary.main,.5)),W(t.Slider,"secondaryTrack",(0,i.q8)(t.secondary.main,.5)),W(t.Slider,"errorTrack",(0,i.q8)(t.error.main,.5)),W(t.Slider,"infoTrack",(0,i.q8)(t.info.main,.5)),W(t.Slider,"successTrack",(0,i.q8)(t.success.main,.5)),W(t.Slider,"warningTrack",(0,i.q8)(t.warning.main,.5));const e=(0,i.fk)(t.background.default,.98);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-600")),W(t.StepContent,"border",n("palette-grey-600")),W(t.Switch,"defaultColor",n("palette-grey-300")),W(t.Switch,"defaultDisabledColor",n("palette-grey-600")),W(t.Switch,"primaryDisabledColor",(0,i.q8)(t.primary.main,.55)),W(t.Switch,"secondaryDisabledColor",(0,i.q8)(t.secondary.main,.55)),W(t.Switch,"errorDisabledColor",(0,i.q8)(t.error.main,.55)),W(t.Switch,"infoDisabledColor",(0,i.q8)(t.info.main,.55)),W(t.Switch,"successDisabledColor",(0,i.q8)(t.success.main,.55)),W(t.Switch,"warningDisabledColor",(0,i.q8)(t.warning.main,.55)),W(t.TableCell,"border",(0,i.q8)((0,i.zp)(t.divider,1),.68)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}U(t.background,"default"),U(t.background,"paper"),U(t.common,"background"),U(t.common,"onBackground"),U(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&W(t[e],"mainChannel",(0,i.LR)(G(n.main))),n.light&&W(t[e],"lightChannel",(0,i.LR)(G(n.light))),n.dark&&W(t[e],"darkChannel",(0,i.LR)(G(n.dark))),n.contrastText&&W(t[e],"contrastTextChannel",(0,i.LR)(G(n.contrastText))),"text"===e&&(U(t[e],"primary"),U(t[e],"secondary")),"action"===e&&(n.active&&U(t[e],"active"),n.selected&&U(t[e],"selected")))}))})),D=n.reduce(((e,t)=>(0,o.Z)(e,t)),D);const A={prefix:c,disableCssColorScheme:u,shouldSkipGeneratingVar:d,getSelector:$(D)},{vars:E,generateThemeVars:L,generateStyleSheets:F}=_(D,A);return D.vars=E,Object.entries(D.colorSchemes[D.defaultColorScheme]).forEach((e=>{let[t,n]=e;D[t]=n})),D.generateThemeVars=L,D.generateStyleSheets=F,D.generateSpacing=function(){return(0,w.Z)(f.spacing,(0,S.hB)(this))},D.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(h),D.spacing=D.generateSpacing(),D.shouldSkipGeneratingVar=d,D.unstable_sxConfig={...T.Z,...null==f?void 0:f.unstable_sxConfig},D.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},D.toRuntimeSource=Z,D}({...d,colorSchemes:f,defaultColorScheme:h,..."boolean"!=typeof l&&l},...n)}},10042:function(e,t,n){"use strict";n.d(t,{ZP:()=>s,x9:()=>o});const r={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return`${Math.round(e)}ms`}function a(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function s(e){const t={...r,...e.easing},n={...o,...e.duration};return{getAutoHeightDuration:a,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:a=t.easeInOut,delay:s=0,...l}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:i(o)} ${a} ${"string"==typeof s?s:i(s)}`)).join(",")},...e,easing:t,duration:n}}},41618:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(94668);const o={textTransform:"uppercase"},i='"Roboto", "Helvetica", "Arial", sans-serif';function a(e,t){const{fontFamily:n=i,fontSize:a=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:h,pxToRem:p,...f}="function"==typeof t?t(e):t;const m=a/14,g=p||(e=>e/d*m+"rem"),v=(e,t,r,o,a)=>{return{fontFamily:n,fontWeight:e,fontSize:g(t),lineHeight:r,...n===i?{letterSpacing:(s=o/t,Math.round(1e5*s)/1e5)+"em"}:{},...a,...h};var s},y={h1:v(s,96,1.167,-1.5),h2:v(s,60,1.2,-.5),h3:v(l,48,1.167,0),h4:v(l,34,1.235,.25),h5:v(l,24,1.334,0),h6:v(u,20,1.6,.15),subtitle1:v(l,16,1.75,.15),subtitle2:v(u,14,1.57,.1),body1:v(l,16,1.5,.15),body2:v(l,14,1.43,.15),button:v(u,14,1.75,.4,o),caption:v(l,12,1.66,.4),overline:v(l,12,2.66,1,o),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,r.Z)({htmlFontSize:d,pxToRem:g,fontFamily:n,fontSize:a,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:u,fontWeightBold:c,...y},f,{clone:!1})}},83577:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(3254).Z)()},84858:function(e,t,n){"use strict";function r(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}n.d(t,{Z:()=>r})},31322:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r="$$material"},51977:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(77740);const o=e=>(0,r.Z)(e)&&"classes"!==e},77740:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},99289:function(e,t,n){"use strict";n.d(t,{ZP:()=>s});var r=n(62774),o=n(83577),i=n(31322),a=n(51977);const s=(0,r.ZP)({themeId:i.Z,defaultTheme:o.Z,rootShouldForwardProp:a.Z})},35224:function(e,t,n){"use strict";n.d(t,{Z:()=>a});n(32123);var r=n(68555),o=n(83577),i=n(31322);function a(){const e=(0,r.Z)(o.Z);return e[i.Z]||e}},19703:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(95950),o=n(83577),i=n(31322);function a(e){let{props:t,name:n}=e;return(0,r.Z)({props:t,name:n,defaultTheme:o.Z,themeId:i.Z})}},9919:function(e,t,n){"use strict";n.d(t,{C:()=>o,n:()=>r});const r=e=>e.scrollTop;function o(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}},11278:function(e,t,n){"use strict";n.d(t,{D:()=>c,Z:()=>m});var r=n(32123),o=n(30341),i=n(89210),a=n(35889),s=n(49098),l=n(83997);function u(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,s)=>{let{inputValue:l,getOptionLabel:c}=s,d=a?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=u(d));const h=d?e.filter((e=>{let r=(i||c)(e);return n&&(r=r.toLowerCase()),t&&(r=u(r)),"start"===o?r.startsWith(d):r.includes(d)})):e;return"number"==typeof r?h.slice(0,r):h}}const d=c(),h=e=>{var t;return null!==e.current&&(null===(t=e.current.parentElement)||void 0===t?void 0:t.contains(document.activeElement))},p=[];function f(e,t,n){if(t||null==e)return"";const r=n(e);return"string"==typeof r?r:""}const m=function(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:n="Mui",autoComplete:u=!1,autoHighlight:c=!1,autoSelect:m=!1,blurOnSelect:g=!1,clearOnBlur:v=!e.freeSolo,clearOnEscape:y=!1,componentName:b="useAutocomplete",defaultValue:x=(e.multiple?p:null),disableClearable:w=!1,disableCloseOnSelect:S=!1,disabled:C,disabledItemsFocusable:k=!1,disableListWrap:M=!1,filterOptions:_=d,filterSelectedOptions:T=!1,freeSolo:P=!1,getOptionDisabled:I,getOptionKey:R,getOptionLabel:D=e=>e.label??e,groupBy:O,handleHomeEndKeys:A=!e.freeSolo,id:E,includeInputInList:Z=!1,inputValue:L,isOptionEqualToValue:F=(e,t)=>e===t,multiple:j=!1,onChange:N,onClose:z,onHighlightChange:B,onInputChange:V,onOpen:H,open:$,openOnFocus:W=!1,options:G,readOnly:U=!1,selectOnFocus:q=!e.freeSolo,value:K}=e,Y=(0,o.Z)(E);let X=D;X=e=>{const t=D(e);return"string"!=typeof t?String(t):t};const Q=r.useRef(!1),J=r.useRef(!0),ee=r.useRef(null),te=r.useRef(null),[ne,re]=r.useState(null),[oe,ie]=r.useState(-1),ae=c?0:-1,se=r.useRef(ae),le=r.useRef(f(x,j,X)).current,[ue,ce]=(0,i.Z)({controlled:K,default:x,name:b}),[de,he]=(0,i.Z)({controlled:L,default:le,name:b,state:"inputValue"}),[pe,fe]=r.useState(!1),me=r.useCallback(((e,t,n)=>{if(!(j?ue.length!T||!(j?ue:[ue]).some((t=>null!==t&&F(e,t))))),{inputValue:xe&&ye?"":de,getOptionLabel:X}):[],Ce=(0,a.Z)({filteredOptions:Se,value:ue,inputValue:de});r.useEffect((()=>{const e=ue!==Ce.value;pe&&!e||P&&!e||me(null,ue,"reset")}),[ue,me,pe,Ce.value,P]);const ke=ge&&Se.length>0&&!U,Me=(0,s.Z)((e=>{-1===e?ee.current.focus():ne.querySelector(`[data-tag-index="${e}"]`).focus()}));r.useEffect((()=>{j&&oe>ue.length-1&&(ie(-1),Me(-1))}),[ue,j,oe,Me]);const _e=(0,s.Z)((e=>{let{event:t,index:r,reason:o="auto"}=e;if(se.current=r,-1===r?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Y}-option-${r}`),B&&B(t,-1===r?null:Se[r],o),!te.current)return;const i=te.current.querySelector(`[role="option"].${n}-focused`);i&&(i.classList.remove(`${n}-focused`),i.classList.remove(`${n}-focusVisible`));let a=te.current;if("listbox"!==te.current.getAttribute("role")&&(a=te.current.parentElement.querySelector('[role="listbox"]')),!a)return;if(-1===r)return void(a.scrollTop=0);const s=te.current.querySelector(`[data-option-index="${r}"]`);if(s&&(s.classList.add(`${n}-focused`),"keyboard"===o&&s.classList.add(`${n}-focusVisible`),a.scrollHeight>a.clientHeight&&"mouse"!==o&&"touch"!==o)){const e=s,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(O?1.3:0){let{event:t,diff:n,direction:r="next",reason:o="auto"}=e;if(!we)return;const i=function(e,t){if(!te.current||e<0||e>=Se.length)return-1;let n=e;for(;;){const r=te.current.querySelector(`[data-option-index="${n}"]`),o=!k&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%Se.length:(n-1+Se.length)%Se.length,n===e)return-1}}((()=>{const e=Se.length-1;if("reset"===n)return ae;if("start"===n)return 0;if("end"===n)return e;const t=se.current+n;return t<0?-1===t&&Z?-1:M&&-1!==se.current||Math.abs(n)>1?0:e:t>e?t===e+1&&Z?-1:M||Math.abs(n)>1?e:0:t})(),r);if(_e({index:i,reason:o,event:t}),u&&"reset"!==n)if(-1===i)ee.current.value=de;else{const e=X(Se[i]);ee.current.value=e;0===e.toLowerCase().indexOf(de.toLowerCase())&&de.length>0&&ee.current.setSelectionRange(de.length,e.length)}})),Pe=r.useCallback((()=>{if(!we)return;const e=(()=>{if(-1!==se.current&&Ce.filteredOptions&&Ce.filteredOptions.length!==Se.length&&Ce.inputValue===de&&(j?ue.length===Ce.value.length&&Ce.value.every(((e,t)=>X(ue[t])===X(e))):(e=Ce.value,t=ue,(e?X(e):"")===(t?X(t):"")))){const e=Ce.filteredOptions[se.current];if(e)return Se.findIndex((t=>X(t)===X(e)))}var e,t;return-1})();if(-1!==e)return void(se.current=e);const t=j?ue[0]:ue;if(0!==Se.length&&null!=t){if(te.current)if(null==t)se.current>=Se.length-1?_e({index:Se.length-1}):_e({index:se.current});else{const e=Se[se.current];if(j&&e&&-1!==ue.findIndex((t=>F(e,t))))return;const n=Se.findIndex((e=>F(e,t)));-1===n?Te({diff:"reset"}):_e({index:n})}}else Te({diff:"reset"})}),[Se.length,!j&&ue,T,Te,_e,we,de,j]),Ie=(0,s.Z)((e=>{(0,l.Z)(te,e),e&&Pe()}));r.useEffect((()=>{Pe()}),[Pe]);const Re=e=>{ge||(ve(!0),be(!0),H&&H(e))},De=(e,t)=>{ge&&(ve(!1),z&&z(e,t))},Oe=(e,t,n,r)=>{if(j){if(ue.length===t.length&&ue.every(((e,n)=>e===t[n])))return}else if(ue===t)return;N&&N(e,t,n,r),ce(t)},Ae=r.useRef(!1),Ee=function(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",o=t;if(j){o=Array.isArray(ue)?ue.slice():[];const e=o.findIndex((e=>F(t,e)));-1===e?o.push(t):"freeSolo"!==n&&(o.splice(e,1),r="removeOption")}me(e,o,r),Oe(e,o,r,{option:t}),S||e&&(e.ctrlKey||e.metaKey)||De(e,r),(!0===g||"touch"===g&&Ae.current||"mouse"===g&&!Ae.current)&&ee.current.blur()},Ze=(e,t)=>{if(!j)return;""===de&&De(e,"toggleInput");let n=oe;-1===oe?""===de&&"previous"===t&&(n=ue.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===ue.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===ue.length||"previous"===t&&-1===n)return-1;const e=ne.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ie(n),Me(n)},Le=e=>{Q.current=!0,he(""),V&&V(e,"","clear"),Oe(e,j?[]:null,"clear")},Fe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===oe||["ArrowLeft","ArrowRight"].includes(t.key)||(ie(-1),Me(-1)),229!==t.which))switch(t.key){case"Home":we&&A&&(t.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":we&&A&&(t.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Te({diff:-5,direction:"previous",reason:"keyboard",event:t}),Re(t);break;case"PageDown":t.preventDefault(),Te({diff:5,direction:"next",reason:"keyboard",event:t}),Re(t);break;case"ArrowDown":t.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:t}),Re(t);break;case"ArrowUp":t.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:t}),Re(t);break;case"ArrowLeft":Ze(t,"previous");break;case"ArrowRight":Ze(t,"next");break;case"Enter":if(-1!==se.current&&we){const e=Se[se.current],n=!!I&&I(e);if(t.preventDefault(),n)return;Ee(t,e,"selectOption"),u&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else P&&""!==de&&!1===xe&&(j&&t.preventDefault(),Ee(t,de,"createOption","freeSolo"));break;case"Escape":we?(t.preventDefault(),t.stopPropagation(),De(t,"escape")):y&&(""!==de||j&&ue.length>0)&&(t.preventDefault(),t.stopPropagation(),Le(t));break;case"Backspace":if(j&&!U&&""===de&&ue.length>0){const e=-1===oe?ue.length-1:oe,n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})}break;case"Delete":if(j&&!U&&""===de&&ue.length>0&&-1!==oe){const e=oe,n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})}}},je=e=>{fe(!0),W&&!Q.current&&Re(e)},Ne=e=>{t(te)?ee.current.focus():(fe(!1),J.current=!0,Q.current=!1,m&&-1!==se.current&&we?Ee(e,Se[se.current],"blur"):m&&P&&""!==de?Ee(e,de,"blur","freeSolo"):v&&me(e,ue,"blur"),De(e,"blur"))},ze=e=>{const t=e.target.value;de!==t&&(he(t),be(!1),V&&V(e,t,"input")),""===t?w||j||Oe(e,null,"clear"):Re(e)},Be=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));se.current!==t&&_e({event:e,index:t,reason:"mouse"})},Ve=e=>{_e({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Ae.current=!0},He=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Ee(e,Se[t],"selectOption"),Ae.current=!1},$e=e=>t=>{const n=ue.slice();n.splice(e,1),Oe(t,n,"removeOption",{option:ue[e]})},We=e=>{ge?De(e,"toggleInput"):Re(e)},Ge=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Y&&e.preventDefault()},Ue=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),q&&J.current&&ee.current.selectionEnd-ee.current.selectionStart==0&&ee.current.select(),J.current=!1)},qe=e=>{C||""!==de&&ge||We(e)};let Ke=P&&de.length>0;Ke=Ke||(j?ue.length>0:null!==ue);let Ye=Se;if(O){new Map;Ye=Se.reduce(((e,t,n)=>{const r=O(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return C&&pe&&Ne(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...e,onKeyDown:Fe(e),onMouseDown:Ge,onClick:Ue}},getInputLabelProps:()=>({id:`${Y}-label`,htmlFor:Y}),getInputProps:()=>({id:Y,value:de,onBlur:Ne,onFocus:je,onChange:ze,onMouseDown:qe,"aria-activedescendant":we?"":null,"aria-autocomplete":u?"both":"list","aria-controls":ke?`${Y}-listbox`:void 0,"aria-expanded":ke,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:C}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Le}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:We}),getTagProps:e=>{let{index:t}=e;return{key:t,"data-tag-index":t,tabIndex:-1,...!U&&{onDelete:$e(t)}}},getListboxProps:()=>({role:"listbox",id:`${Y}-listbox`,"aria-labelledby":`${Y}-label`,ref:Ie,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:n}=e;const r=(j?ue:[ue]).some((e=>null!=e&&F(n,e))),o=!!I&&I(n);return{key:(null==R?void 0:R(n))??X(n),tabIndex:-1,role:"option",id:`${Y}-option-${t}`,onMouseMove:Be,onClick:He,onTouchStart:Ve,"data-option-index":t,"aria-disabled":o,"aria-selected":r}},id:Y,inputValue:de,value:ue,dirty:Ke,expanded:we&&ne,popupOpen:we,focused:pe||-1!==oe,anchorEl:ne,setAnchorEl:re,focusedTag:oe,groupedOptions:Ye}}},62248:function(e,t,n){"use strict";n.d(t,{Z:()=>h});var r=n(32123),o=n.t(r,2),i=n(14902),a=n(85351),s=n(95979);function l(e,t,n,o,a){const[s,l]=r.useState((()=>a&&n?n(e).matches:o?o(e).matches:t));return(0,i.Z)((()=>{if(!n)return;const t=n(e),r=()=>{l(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}}),[e,n]),s}const u={...o}.useSyncExternalStore;function c(e,t,n,o,i){const a=r.useCallback((()=>t),[t]),s=r.useMemo((()=>{if(i&&n)return()=>n(e).matches;if(null!==o){const{matches:t}=o(e);return()=>t}return a}),[a,e,o,i,n]),[l,c]=r.useMemo((()=>{if(null===n)return[a,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]}),[a,n,e]);return u(c,l,s)}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t}=e;return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,s.Z)();r&&t&&(r=r[t]||r);const o="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:i=!1,matchMedia:d=(o?window.matchMedia:null),ssrMatchMedia:h=null,noSsr:p=!1}=(0,a.Z)({name:"MuiUseMediaQuery",props:n,theme:r});let f="function"==typeof e?e(r):e;f=f.replace(/^@media( ?)/m,"");return(void 0!==u?c:l)(f,i,d,h,p)}}d();const h=d({themeId:n(31322).Z})},80706:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(98251).Z},70747:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(5709).Z},38358:function(e,t,n){"use strict";function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>{let[,n]=t;return n&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(n,e)}}n.d(t,{Z:()=>r})},57698:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(32123),o=n(90496),i=n(42152),a=n(80706),s=n(99289),l=n(97136),u=n(71959),c=n(32792),d=n(19577);function h(e){return(0,d.ZP)("MuiSvgIcon",e)}(0,c.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(77928);const f=(0,s.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,a.Z)(n.color)}`],t[`fontSize${(0,a.Z)(n.fontSize)}`]]}})((0,l.Z)((e=>{let{theme:t}=e;var n,r,o,i,a,s,l,u,c,d,h,p,f,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:null===(i=t.transitions)||void 0===i||null===(o=i.create)||void 0===o?void 0:o.call(i,"fill",{duration:null===(r=(t.vars??t).transitions)||void 0===r||null===(n=r.duration)||void 0===n?void 0:n.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:(null===(s=t.typography)||void 0===s||null===(a=s.pxToRem)||void 0===a?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:(null===(u=t.typography)||void 0===u||null===(l=u.pxToRem)||void 0===l?void 0:l.call(u,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:(null===(d=t.typography)||void 0===d||null===(c=d.pxToRem)||void 0===c?void 0:c.call(d,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter((e=>{let[,t]=e;return t&&t.main})).map((e=>{let[n]=e;var r,o;return{props:{color:n},style:{color:null===(o=(t.vars??t).palette)||void 0===o||null===(r=o[n])||void 0===r?void 0:r.main}}})),{props:{color:"action"},style:{color:null===(p=(t.vars??t).palette)||void 0===p||null===(h=p.action)||void 0===h?void 0:h.active}},{props:{color:"disabled"},style:{color:null===(m=(t.vars??t).palette)||void 0===m||null===(f=m.action)||void 0===f?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}}))),m=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:c="inherit",component:d="svg",fontSize:m="medium",htmlColor:g,inheritViewBox:v=!1,titleAccess:y,viewBox:b="0 0 24 24",...x}=n,w=r.isValidElement(s)&&"svg"===s.type,S={...n,color:c,component:d,fontSize:m,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:b,hasSvgAsChild:w},C={};v||(C.viewBox=b);const k=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&`color${(0,a.Z)(t)}`,`fontSize${(0,a.Z)(n)}`]};return(0,i.Z)(o,h,r)})(S);return(0,p.jsxs)(f,{as:d,className:(0,o.Z)(k.root,l),focusable:"false",color:g,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t,...C,...x,...w&&s.props,ownerState:S,children:[w?s.props.children:s,y?(0,p.jsx)("title",{children:y}):null]})}));m.muiName="SvgIcon";const g=m;function v(e,t){function n(n,r){return(0,p.jsx)(g,{"data-testid":`${t}Icon`,ref:r,...n,children:e})}return n.muiName=g.muiName,r.memo(r.forwardRef(n))}},50330:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(63070).Z},35150:function(e,t,n){"use strict";n.r(t),n.d(t,{useForkRef:()=>x.Z,mergeSlotProps:()=>w.Z,isMuiElement:()=>u.Z,unstable_memoTheme:()=>c.Z,deprecatedPropType:()=>l,setRef:()=>f,createChainedFunction:()=>i.Z,requirePropFactory:()=>p,unstable_useEnhancedEffect:()=>m.Z,capitalize:()=>o.Z,useControlled:()=>y.Z,useEventCallback:()=>b.Z,ownerWindow:()=>h.Z,debounce:()=>s.Z,ownerDocument:()=>d.Z,unstable_useId:()=>g.Z,unstable_ClassNameGenerator:()=>S,createSvgIcon:()=>a.Z,unsupportedProp:()=>v});var r=n(83177),o=n(80706),i=n(70747),a=n(57698),s=n(50330);const l=function(e,t){return()=>null};var u=n(67038),c=n(97136),d=n(76852),h=n(13304);const p=function(e,t){return()=>null};const f=n(83997).Z;var m=n(12995),g=n(50917);const v=function(e,t,n,r,o){return null};var y=n(80897),b=n(85270),x=n(70021),w=n(76152);const S={configure:e=>{r.Z.configure(e)}}},69872:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"string"==typeof e}},67038:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(55313).Z},97136:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(9003);const o={theme:void 0};const i=function(e){let t,n;return function(i){let a=t;return void 0!==a&&i.theme===n||(o.theme=i.theme,a=(0,r.Z)(e(o)),t=a,n=i.theme),a}}},76152:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(90496);function o(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const o="function"==typeof t?t(n):t,i="function"==typeof e?e({...n,...o}):e,a=(0,r.Z)(null==n?void 0:n.className,null==o?void 0:o.className,null==i?void 0:i.className);return{...o,...i,...!!a&&{className:a},...(null==o?void 0:o.style)&&(null==i?void 0:i.style)&&{style:{...o.style,...i.style}},...(null==o?void 0:o.sx)&&(null==i?void 0:i.sx)&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(i.sx)?i.sx:[i.sx]]}}};const n=t,o=(0,r.Z)(null==n?void 0:n.className,null==e?void 0:e.className);return{...t,...e,...!!o&&{className:o},...(null==n?void 0:n.style)&&(null==e?void 0:e.style)&&{style:{...n.style,...e.style}},...(null==n?void 0:n.sx)&&(null==e?void 0:e.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}},76852:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(769).Z},13304:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(76477).Z},80897:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(89210).Z},12995:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(14902).Z},85270:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(49098).Z},70021:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(84075).Z},50917:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(30341).Z},81543:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(84075),o=n(33105),i=n(31973),a=n(31889);function s(e,t){const{className:n,elementType:s,ownerState:l,externalForwardedProps:u,internalForwardedProps:c,shouldForwardComponentProp:d=!1,...h}=t,{component:p,slots:f={[e]:void 0},slotProps:m={[e]:void 0},...g}=u,v=f[e]||s,y=(0,i.Z)(m[e],l),{props:{component:b,...x},internalRef:w}=(0,a.Z)({className:n,...h,externalForwardedProps:"root"===e?g:void 0,externalSlotProps:y}),S=(0,r.Z)(w,null==y?void 0:y.ref,t.ref),C="root"===e?b||p:b;return[v,(0,o.Z)(v,{..."root"===e&&!p&&!f[e]&&c,..."root"!==e&&!f[e]&&c,...x,...C&&!d&&{as:C},...C&&d&&{component:C},ref:S},l)]}},81612:function(e,t,n){"use strict";n.d(t,{zY:()=>d,u7:()=>h});n(32123);var r=n(89574),o=n(62986),i=n(68555),a=n(77928);const s=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const s=(0,i.Z)(r),l="function"==typeof t?t(n&&s[n]||s):t;return(0,a.jsx)(o.Z,{styles:l})};var l=n(83577),u=n(31322);const c=function(e){return(0,a.jsx)(s,{...e,defaultTheme:l.Z,themeId:u.Z})};function d(e){return function(t){return(0,a.jsx)(c,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}function h(){return r.Z}},62986:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(32123);var r=n(39962),o=n(77928);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.Global,{styles:i})}},55126:function(e,t,n){"use strict";n.d(t,{ZP:()=>i,bu:()=>l,nf:()=>a});var r=n(9068),o=n(32710);function i(e,t){return(0,r.default)(e,t)}function a(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const s=[];function l(e){return s[0]=e,(0,o.O)(s)}},39907:function(e,t,n){"use strict";n.d(t,{Z:()=>l,i:()=>s});var r=n(32123),o=n(75214),i=n(77928);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.Z)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.Z)(i,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,i.jsx)(a.Provider,{value:t,children:n})}},38952:function(e,t,n){"use strict";n.d(t,{V:()=>a,Z:()=>s});var r=n(32123),o=n(77928);const i=r.createContext();const a=()=>r.useContext(i)??!1,s=function(e){let{value:t,...n}=e;return(0,o.jsx)(i.Provider,{value:t??!0,...n})}},17180:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(32123),o=n(90496),i=n(94668),a=n(19577),s=n(42152),l=n(20140),u=n(95950),c=n(89574),d=n(9661),h=n(4641),p=n(67098),f=n(77928);const m=(0,d.Z)(),g=(0,l.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function v(e){return(0,u.Z)({props:e,name:"MuiStack",defaultTheme:m})}function y(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i{let{ownerState:t,theme:n}=e,r={display:"flex",flexDirection:"column",...(0,h.k9)({theme:n},(0,h.P$)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e})))};if(t.spacing){const e=(0,p.hB)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"==typeof t.spacing&&null!=t.spacing[n]||"object"==typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),a=(0,h.P$)({values:t.direction,base:o}),s=(0,h.P$)({values:t.spacing,base:o});"object"==typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const l=(n,r)=>{return t.useFlexGap?{gap:(0,p.NA)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=r?a[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,p.NA)(e,n)}};var o};r=(0,i.Z)(r,(0,h.k9)({theme:n},s,l))}return r=(0,h.dt)(n.breakpoints,r),r};function x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=g,useThemeProps:n=v,componentName:i="MuiStack"}=e,l=t(b);return r.forwardRef((function(e,t){const r=n(e),u=(0,c.Z)(r),{component:d="div",direction:h="column",spacing:p=0,divider:m,children:g,className:v,useFlexGap:b=!1,...x}=u,w={direction:h,spacing:p,useFlexGap:b},S=(0,s.Z)({root:["root"]},(e=>(0,a.ZP)(i,e)),{});return(0,f.jsx)(l,{as:d,ownerState:w,ref:t,className:(0,o.Z)(S.root,v),...x,children:m?y(g,m):g})}))}},4641:function(e,t,n){"use strict";n.d(t,{L7:()=>c,P$:()=>h,VO:()=>i,W8:()=>u,dt:()=>d,k9:()=>l});var r=n(94668),o=n(36803);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`},s={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:i[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function l(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||a;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||a;return Object.keys(t).reduce(((a,l)=>{if((0,o.WX)(e.keys,l)){const e=(0,o.ue)(r.containerQueries?r:s,l);e&&(a[e]=n(t[l],l))}else if(Object.keys(e.values||i).includes(l)){a[e.up(l)]=n(t[l],l)}else{const e=l;a[e]=t[e]}return a}),{})}return n(t)}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null===(t=e.keys)||void 0===t?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o(0,r.Z)(e,t)),{});return c(Object.keys(i),a)}function h(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let a;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"==typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}},79717:function(e,t,n){"use strict";n.d(t,{ve:()=>u,_4:()=>y,LR:()=>s,Fq:()=>h,q8:()=>m,fk:()=>b,mi:()=>d,ux:()=>v,$n:()=>g,zp:()=>p,wy:()=>l,tB:()=>a,_j:()=>f});var r=n(6085);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))};function i(e){return o(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error((0,r.Z)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error((0,r.Z)(10,o))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:o}}const s=(e,t)=>{try{return(e=>{const t=a(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(t){return e}};function l(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function u(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)};let u="rgb";const c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}function c(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(u(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function h(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function p(e,t,n){try{return h(e,t)}catch(t){return e}}function f(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function m(e,t,n){try{return f(e,t)}catch(t){return e}}function g(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}function v(e,t,n){try{return g(e,t)}catch(t){return e}}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return c(e)>.5?f(e,t):g(e,t)}function b(e,t,n){try{return y(e,t)}catch(t){return e}}},62774:function(e,t,n){"use strict";n.d(t,{ZP:()=>p,x9:()=>u});var r=n(55126),o=n(94668),i=n(9661),a=n(3645),s=n(9003);const l=(0,i.Z)();function u(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function c(e){return e?(t,n)=>n[e]:null}function d(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>d(e,t)));if(Array.isArray(null==n?void 0:n.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return h(e,n.variants,[t])}return(null==n?void 0:n.isProcessed)?n.style:n}function h(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e:for(let i=0;i0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=l,rootShouldForwardProp:i=u,slotShouldForwardProp:p=u}=e;function g(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.nf)(e,(e=>e.filter((e=>e!==a.Z))));const{name:n,slot:l,skipVariantsResolver:v,skipSx:y,overridesResolver:b=c(m(l)),...x}=t,w=void 0!==v?v:l&&"Root"!==l&&"root"!==l||!1,S=y||!1;let C=u;"Root"===l||"root"===l?C=i:l?C=p:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const k=(0,r.ZP)(e,{shouldForwardProp:C,label:f(n,l),...x}),M=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return d(t,e)};if((0,o.P)(e)){const t=(0,s.Z)(e);return t.variants?function(e){return d(e,t)}:t.style}return e},_=function(){for(var t=arguments.length,r=new Array(t),o=0;oo});var r=n(67098);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,r.hB)({spacing:e});if(e.mui)return e;const n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}},9661:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(94668);function o(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:u,only:function(e){return a.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),d=1;d(0,r.Z)(e,t)),b),b.unstable_sxConfig={...u.Z,...null==g?void 0:g.unstable_sxConfig},b.unstable_sx=function(e){return(0,l.Z)({sx:e,theme:this})},b}},36803:function(e,t,n){"use strict";function r(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{var n,r;const o=/min-width:\s*([0-9.]+)/;return+((null===(n=e.match(o))||void 0===n?void 0:n[1])||0)-+((null===(r=t.match(o))||void 0===r?void 0:r[1])||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}function o(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}function i(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function a(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=function(){for(var n=arguments.length,o=new Array(n),i=0;i").replace("and","or"):a}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}n.d(t,{WX:()=>o,ZP:()=>a,ar:()=>r,ue:()=>i})},18458:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(94668);const o=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},9003:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(55126);function o(e){const{variants:t,...n}=e,o={variants:t,style:(0,r.bu)(n),isProcessed:!0};return o.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=(0,r.bu)(e.style))})),o}},67098:function(e,t,n){"use strict";n.d(t,{NA:()=>m,hB:()=>f,e6:()=>y,o3:()=>b,eI:()=>p});var r=n(4641),o=n(26206),i=n(18458);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...c,...d];function p(e,t,n,r){const i=(0,o.DW)(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e);const n=i[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof i?i:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){return"string"==typeof t||null==t?t:e(t)}function g(e,t,n,o){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(u(n),o),a=e[n];return(0,r.k9)(e,a,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.Z,{})}function y(e){return v(e,c)}function b(e){return v(e,d)}function x(e){return v(e,h)}y.propTypes={},y.filterProps=c,b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=h},26206:function(e,t,n){"use strict";n.d(t,{DW:()=>i,Jq:()=>a,ZP:()=>s});var r=n(98251),o=n(4641);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],c=i(e.theme,s)||{};return(0,o.k9)(e,u,(e=>{let o=a(c,l,e);return e===o&&"string"==typeof e&&(o=a(c,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?o:{[n]:o}}))};return u.propTypes={},u.filterProps=[t],u}},31922:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(67098),o=n(26206),i=n(18458);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,i.Z)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var s=n(4641);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,o.ZP)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),d=u("borderTop",l),h=u("borderRight",l),p=u("borderBottom",l),f=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),x=u("outline",l),w=u("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(c,d,h,p,f,m,g,v,y,b,S,x,w);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.gap,n)}return null};C.propTypes={},C.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const M=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.rowGap,n)}return null};M.propTypes={},M.filterProps=["rowGap"];a(C,k,M,(0,o.ZP)({prop:"gridColumn"}),(0,o.ZP)({prop:"gridRow"}),(0,o.ZP)({prop:"gridAutoFlow"}),(0,o.ZP)({prop:"gridAutoColumns"}),(0,o.ZP)({prop:"gridAutoRows"}),(0,o.ZP)({prop:"gridTemplateColumns"}),(0,o.ZP)({prop:"gridTemplateRows"}),(0,o.ZP)({prop:"gridTemplateAreas"}),(0,o.ZP)({prop:"gridArea"}));function _(e,t){return"grey"===t?t:e}a((0,o.ZP)({prop:"color",themeKey:"palette",transform:_}),(0,o.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_}),(0,o.ZP)({prop:"backgroundColor",themeKey:"palette",transform:_}));function T(e){return e<=1&&0!==e?100*e+"%":e}const P=(0,o.ZP)({prop:"width",transform:T}),I=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,o,i,a;const l=(null===(o=e.theme)||void 0===o||null===(r=o.breakpoints)||void 0===r||null===(n=r.values)||void 0===n?void 0:n[t])||s.VO[t];return l?"px"!==(null===(a=e.theme)||void 0===a||null===(i=a.breakpoints)||void 0===i?void 0:i.unit)?{maxWidth:`${l}${e.theme.breakpoints.unit}`}:{maxWidth:l}:{maxWidth:T(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};I.filterProps=["maxWidth"];const R=(0,o.ZP)({prop:"minWidth",transform:T}),D=(0,o.ZP)({prop:"height",transform:T}),O=(0,o.ZP)({prop:"maxHeight",transform:T}),A=(0,o.ZP)({prop:"minHeight",transform:T}),E=((0,o.ZP)({prop:"size",cssProperty:"width",transform:T}),(0,o.ZP)({prop:"size",cssProperty:"height",transform:T}),a(P,I,R,D,O,A,(0,o.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:_},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_},backgroundColor:{themeKey:"palette",transform:_},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:C},rowGap:{style:M},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:T},maxWidth:{style:I},minWidth:{transform:T},height:{transform:T},maxHeight:{transform:T},minHeight:{transform:T},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},89574:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(94668),o=n(31922);const i=e=>{var t;const n={systemProps:{},otherProps:{}},r=(null==e||null===(t=e.theme)||void 0===t?void 0:t.unstable_sxConfig)??o.Z;return Object.keys(e).forEach((t=>{r[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n};function a(e){const{sx:t,...n}=e,{systemProps:o,otherProps:a}=i(n);let s;return s=Array.isArray(t)?[o,...t]:"function"==typeof t?function(){for(var e=arguments.length,n=new Array(e),i=0;ic});var r=n(98251),o=n(18458),i=n(26206),a=n(4641),s=n(36803),l=n(31922);const u=function(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:d,style:h}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const p=(0,i.DW)(n,c)||{};if(h)return h(s);return(0,a.k9)(s,t,(t=>{let n=(0,i.Jq)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,i.Jq)(p,d,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===u?n:{[u]:n}}))}return function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const u=i.unstable_sxConfig??l.Z;function c(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const l=(0,a.W8)(i.breakpoints),c=Object.keys(l);let d=l;return Object.keys(r).forEach((n=>{const s=(l=r[n],c=i,"function"==typeof l?l(c):l);var l,c;if(null!=s)if("object"==typeof s)if(u[n])d=(0,o.Z)(d,e(n,s,i,u));else{const e=(0,a.k9)({theme:i},s,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;ne.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,s)?d=(0,o.Z)(d,e):d[n]=t({sx:s,theme:i})}else d=(0,o.Z)(d,e(n,s,i,u))})),(0,s.ar)(i,(0,a.L7)(c,d))}return Array.isArray(r)?r.map(c):c(r)}}();u.filterProps=["sx"];const c=u},20140:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(62774).ZP)()},68555:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(9661),o=n(95979);const i=(0,r.Z)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return(0,o.Z)(e)}},85351:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(75214);function o(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}},95950:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(85351),o=n(68555);function i(e){let{props:t,name:n,defaultTheme:i,themeId:a}=e,s=(0,o.Z)(i);return a&&(s=s[a]||s),(0,r.Z)({theme:s,name:n,props:t})}},95979:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(32123),o=n(99789);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},83177:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},33105:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=function(e){return"string"==typeof e};const o=function(e,t,n){return void 0===e||r(e)?t:{...t,ownerState:{...t.ownerState,...n}}}},98251:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(6085);function o(e){if("string"!=typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},42152:function(e,t,n){"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;er})},5709:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}n.d(t,{Z:()=>r})},63070:function(e,t,n){"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i{e.apply(this,o)}),n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{Z:()=>r})},94668:function(e,t,n){"use strict";n.d(t,{P:()=>i,Z:()=>s});var r=n(32123),o=n(9138);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(r.isValidElement(e)||(0,o.isValidElementType)(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?{...e}:e;return i(e)&&i(t)&&Object.keys(t).forEach((u=>{r.isValidElement(t[u])||(0,o.isValidElementType)(t[u])?l[u]=t[u]:i(t[u])&&Object.prototype.hasOwnProperty.call(e,u)&&i(e[u])?l[u]=s(e[u],t[u],n):n.clone?l[u]=i(t[u])?a(t[u]):t[u]:l[u]=t[u]})),l}},3022:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},6085:function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ro.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${o} for the full message.`}n.d(t,{Z:()=>r})},19577:function(e,t,n){"use strict";n.d(t,{ZP:()=>i});var r=n(83177);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=o[t];return i?`${n}-${i}`:`${r.Z.generate(e)}-${t}`}},32792:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(19577);function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o={};return t.forEach((t=>{o[t]=(0,r.ZP)(e,t,n)})),o}},41636:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);function o(e){var t;return parseInt(r.version,10)>=19?(null==e||null===(t=e.props)||void 0===t?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}},18157:function(e,t,n){"use strict";function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document.documentElement.clientWidth;return e.innerWidth-t}n.d(t,{Z:()=>r})},54936:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);function o(e){return r.Children.toArray(e).filter((e=>r.isValidElement(e)))}},5129:function(e,t,n){"use strict";function r(e){try{return e.matches(":focus-visible")}catch(e){0}return!1}n.d(t,{Z:()=>r})},55313:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);function o(e,t){var n,o,i;return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??(null===(i=e.type)||void 0===i||null===(o=i._payload)||void 0===o||null===(n=o.value)||void 0===n?void 0:n.muiName))}},31889:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(90496),o=n(3022);const i=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const a=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:s,className:l}=e;if(!t){const e=(0,r.Z)(null==n?void 0:n.className,l,null==s?void 0:s.className,null==a?void 0:a.className),t={...null==n?void 0:n.style,...null==s?void 0:s.style,...null==a?void 0:a.style},o={...n,...s,...a};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}const u=(0,o.Z)({...s,...a}),c=i(a),d=i(s),h=t(u),p=(0,r.Z)(null==h?void 0:h.className,null==n?void 0:n.className,l,null==s?void 0:s.className,null==a?void 0:a.className),f={...null==h?void 0:h.style,...null==n?void 0:n.style,...null==s?void 0:s.style,...null==a?void 0:a.style},m={...h,...n,...d,...c};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:h.ref}}},769:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>r})},76477:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(769);function o(e){return(0,r.Z)(e).defaultView||window}},31973:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n){return"function"==typeof e?e(t,n):e}},75214:function(e,t,n){"use strict";function r(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){n[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;n[i][t]=r(o[t],a[t])}}else n[i]=a;else n[i]=o||{}}else void 0===n[i]&&(n[i]=e[i])}return n}n.d(t,{Z:()=>r})},83997:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>r})},89210:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);function o(e){let{controlled:t,default:n,name:o,state:i="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback((e=>{a||l(e)}),[])]}},14902:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},49098:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(32123),o=n(14902);const i=function(e){const t=r.useRef(e);return(0,o.Z)((()=>{t.current=e})),r.useRef((function(){for(var e=arguments.length,n=new Array(e),r=0;ri});var r=n(32123),o=n(83997);function i(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,o.Z)(t,e)}))}),t)}},30341:function(e,t,n){"use strict";var r;n.d(t,{Z:()=>s});var o=n(32123);let i=0;const a={...r||(r=n.t(o,2))}.useId;function s(e){if(void 0!==a){const t=a();return e??t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),r}(e)}},89039:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(32123);const o={};function i(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}},8603:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(32123);const o=[];function i(e){r.useEffect(e,o)}},35889:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(32123);const o=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},62045:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(84075),o=n(33105),i=n(31889),a=n(31973);const s=function(e){var t;const{elementType:n,externalSlotProps:s,ownerState:l,skipResolvingSlotProps:u=!1,...c}=e,d=u?{}:(0,a.Z)(s,l),{props:h,internalRef:p}=(0,i.Z)({...c,externalSlotProps:d}),f=(0,r.Z)(p,null==d?void 0:d.ref,null===(t=e.additionalProps)||void 0===t?void 0:t.ref);return(0,o.Z)(n,{...h,ref:f},l)}},51154:function(e,t,n){"use strict";n.d(t,{V:()=>a,Z:()=>s});var r=n(89039),o=n(8603);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class a{static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}constructor(){i(this,"currentId",null),i(this,"clear",(()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)})),i(this,"disposeEffect",(()=>this.clear))}}function s(){const e=(0,r.Z)(a.create).current;return(0,o.Z)(e.disposeEffect),e}},9138:function(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case p:case h:case s:return e;default:return t}}case r:return t}}}t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===c||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)}},26387:function(e,t,n){"use strict";n.d(t,{_:()=>ns});var r=n(40182),o=n(32123),i=n(34662),a=n.n(i),s=n(53831),l=n(73079),u=n(90496),c=n(98251),d=n(42152),h=n(84075),p=n(77834),f=n(79717),m=n(99289),g=n(55856),v=n(2105),y=n(81092);const b={[`& .${g._.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${g._.menuIcon}`]:{width:"auto",visibility:"visible"}},x={width:3,rx:1.5,x:10.5},w=e=>e.dimensions.hasScrollX&&(!e.dimensions.hasScrollY||0===e.dimensions.scrollbarSize),S=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${g._.autoHeight}`]:t.autoHeight},{[`&.${g._.autosizing}`]:t.autosizing},{[`&.${g._["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${g._["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${g._["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${g._["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${g._["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${g._.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${g._.actionsCell}`]:t.actionsCell},{[`& .${g._.booleanCell}`]:t.booleanCell},{[`& .${g._.cell}`]:t.cell},{[`& .${g._["cell--editable"]}`]:t["cell--editable"]},{[`& .${g._["cell--editing"]}`]:t["cell--editing"]},{[`& .${g._["cell--flex"]}`]:t["cell--flex"]},{[`& .${g._["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${g._["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${g._["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${g._["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${g._["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${g._["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${g._["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${g._["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${g._["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${g._["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${g._["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${g._["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${g._.cellCheckbox}`]:t.cellCheckbox},{[`& .${g._.cellEmpty}`]:t.cellEmpty},{[`& .${g._.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${g._.cellSkeleton}`]:t.cellSkeleton},{[`& .${g._.checkboxInput}`]:t.checkboxInput},{[`& .${g._.columnHeader}`]:t.columnHeader},{[`& .${g._["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${g._["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${g._["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${g._["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${g._["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${g._["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${g._["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${g._["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${g._["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${g._["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${g._["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${g._["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${g._["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${g._["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${g._["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${g._["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${g._["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${g._["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${g._.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${g._.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${g._.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${g._.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${g._.columnSeparator}`]:t.columnSeparator},{[`& .${g._["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${g._["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${g._["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${g._["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${g._["container--bottom"]}`]:t["container--bottom"]},{[`& .${g._["container--top"]}`]:t["container--top"]},{[`& .${g._.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${g._["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${g._.editBooleanCell}`]:t.editBooleanCell},{[`& .${g._.filterIcon}`]:t.filterIcon},{[`& .${g._["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${g._["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${g._["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${g._.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${g._.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${g._.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${g._.headerFilterRow}`]:t.headerFilterRow},{[`& .${g._.iconSeparator}`]:t.iconSeparator},{[`& .${g._.menuIcon}`]:t.menuIcon},{[`& .${g._.menuIconButton}`]:t.menuIconButton},{[`& .${g._.menuList}`]:t.menuList},{[`& .${g._.menuOpen}`]:t.menuOpen},{[`& .${g._.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${g._.pinnedRows}`]:t.pinnedRows},{[`& .${g._["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${g._["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${g._.row}`]:t.row},{[`& .${g._["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${g._["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${g._["row--dragging"]}`]:t["row--dragging"]},{[`& .${g._["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${g._["row--editable"]}`]:t["row--editable"]},{[`& .${g._["row--editing"]}`]:t["row--editing"]},{[`& .${g._["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${g._["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${g._.rowReorderCell}`]:t.rowReorderCell},{[`& .${g._["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${g._.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${g._.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${g._.rowSkeleton}`]:t.rowSkeleton},{[`& .${g._.scrollbar}`]:t.scrollbar},{[`& .${g._["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${g._["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${g._.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${g._["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${g._["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${g._["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${g._["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${g._.sortIcon}`]:t.sortIcon},{[`& .${g._.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${g._.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${g._.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${g._.withBorderColor}`]:t.withBorderColor}]})((e=>{let{theme:t}=e;var n,o;const i=(0,y.$)(),a=(0,v.Pp)(i,w),s=(l=t).vars?l.vars.palette.TableCell.border:"light"===l.palette.mode?(0,f.$n)((0,f.Fq)(l.palette.divider,1),.88):(0,f._j)((0,f.Fq)(l.palette.divider,1),.68);var l;const u=t.shape.borderRadius,c=t.vars?t.vars.palette.background.default:(null===(n=t.mixins.MuiDataGrid)||void 0===n?void 0:n.containerBackground)??t.palette.background.default,d=(null===(o=t.mixins.MuiDataGrid)||void 0===o?void 0:o.pinnedBackground)??c,h=t.vars?`rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})`:(0,f.Fq)(t.palette.background.default,t.palette.action.disabledOpacity),p=(t.vars||t).palette.action.hoverOpacity,m=(t.vars||t).palette.action.hover,S=(t.vars||t).palette.action.selectedOpacity,k=t.vars?`calc(${p} + ${S})`:p+S,_=t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${S})`:(0,f.Fq)(t.palette.primary.main,S),T=t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${k})`:(0,f.Fq)(t.palette.primary.main,k),P=t.vars?M:C,I=e=>({[`& .${g._["cell--pinnedLeft"]}, & .${g._["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:P(e,_,S),"&:hover":{backgroundColor:P(e,_,k)}}}}),R=I(P(d,m,p)),D=P(d,_,S),O=I(D),A=I(P(d,T,k)),E={backgroundColor:_,"&:hover":{backgroundColor:T,"@media (hover: none)":{backgroundColor:_}}};return(0,r.Z)({"--unstable_DataGrid-radius":"number"==typeof u?`${u}px`:u,"--unstable_DataGrid-headWeight":t.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":h,"--DataGrid-containerBackground":c,"--DataGrid-pinnedBackground":d,"--DataGrid-rowBorderColor":s,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:s,borderRadius:"var(--unstable_DataGrid-radius)",color:(t.vars||t).palette.text.primary},t.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${g._.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${g._.autoHeight}`]:{height:"auto"},[`&.${g._.autosizing}`]:{[`& .${g._.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${g._.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${g._.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${g._.groupingCriteriaCell}`]:{width:"unset"},[`& .${g._.treeDataGroupingCell}`]:{width:"unset"}},[`& .${g._.columnHeader}, & .${g._.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${g._.columnHeader}:focus-within, & .${g._.cell}:focus-within`]:{outline:`solid ${t.vars?`rgba(${t.vars.palette.primary.mainChannel} / 0.5)`:(0,f.Fq)(t.palette.primary.main,.5)} 1px`,outlineOffset:-1},[`& .${g._.columnHeader}:focus, & .${g._.cell}:focus`]:{outline:`solid ${t.palette.primary.main} 1px`,outlineOffset:-1},[`& .${g._.columnHeader}:focus,\n & .${g._["columnHeader--withLeftBorder"]},\n & .${g._["columnHeader--withRightBorder"]},\n & .${g._["columnHeader--siblingFocused"]},\n & .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--lastUnpinned"]},\n & .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--last"]}\n `]:{[`& .${g._.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${g._["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${g._["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${g._["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${g._["root--noToolbar"]} [aria-rowindex="1"] .${g._["columnHeader--last"]}`]:{borderTopRightRadius:a?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${g._.columnHeaderCheckbox}, & .${g._.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${g._.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${g._["virtualScroller--hasScrollX"]} .${g._["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${g._["columnHeader--sorted"]} .${g._.iconButtonContainer}, & .${g._["columnHeader--filtered"]} .${g._.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${g._.columnHeader}:not(.${g._["columnHeader--sorted"]}) .${g._.sortIcon}`]:{opacity:0,transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.shorter})},[`& .${g._.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:t.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${g._.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${g._["columnHeader--filledGroup"]} .${g._.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${g._.sortIcon}, & .${g._.filterIcon}`]:{fontSize:"inherit"},[`& .${g._["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${g._["columnHeader--alignCenter"]} .${g._.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${g._["columnHeader--alignRight"]} .${g._.columnHeaderDraggableContainer}, & .${g._["columnHeader--alignRight"]} .${g._.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${g._["columnHeader--alignCenter"]} .${g._.menuIcon}`]:{marginLeft:"auto"},[`& .${g._["columnHeader--alignRight"]} .${g._.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${g._["columnHeader--moving"]}`]:{backgroundColor:(t.vars||t).palette.action.hover},[`& .${g._["columnHeader--pinnedLeft"]}, & .${g._["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${g._.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:s},[`& .${g._.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${g._.columnHeader}:hover`]:b,[`& .${g._.columnHeader}:not(.${g._["columnHeader--sorted"]}):hover .${g._.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${g._.columnHeader}`]:b,[`& .${g._.columnHeader}:focus,\n & .${g._["columnHeader--siblingFocused"]}`]:{[`.${g._["columnSeparator--resizable"]}`]:{color:(t.vars||t).palette.primary.main}}},[`& .${g._["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${g._["columnSeparator--sideRight"]}`]:{right:-5},[`& .${g._["columnHeader--withRightBorder"]} .${g._["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${g._["columnHeader--withRightBorder"]} .${g._["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${g._["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${g._["columnSeparator--resizing"]}`]:{color:(t.vars||t).palette.primary.main},"@media (hover: none)":{[`& .${g._.iconSeparator} rect`]:x},"@media (hover: hover)":{"&:hover":{color:(t.vars||t).palette.primary.main,[`& .${g._.iconSeparator} rect`]:x}},"& svg":{pointerEvents:"none"}},[`& .${g._.iconSeparator}`]:{color:"inherit",transition:t.transitions.create(["color","width"],{duration:t.transitions.duration.shortest})},[`& .${g._.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${g._.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${g._.headerFilterRow}`]:{[`& .${g._.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${g._["row--borderBottom"]} .${g._.columnHeader},\n & .${g._["row--borderBottom"]} .${g._.filler},\n & .${g._["row--borderBottom"]} .${g._.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${g._["row--borderBottom"]} .${g._.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${g._.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${g._["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g._.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":E},[`& .${g._["container--top"]}, & .${g._["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${g._.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":E},[`& .${g._["virtualScrollerContent--overflowed"]} .${g._["row--lastVisible"]} .${g._.cell}`]:{borderTopColor:"transparent"},[`& .${g._["pinnedRows--top"]} :first-of-type`]:{[`& .${g._.cell}, .${g._.scrollbarFiller}`]:{borderTop:"none"}},[`&.${g._["root--disableUserSelection"]} .${g._.cell}`]:{userSelect:"none"},[`& .${g._["row--dynamicHeight"]} > .${g._.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${g._.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${g._.cell}.${g._["cell--selectionMode"]}`]:{cursor:"default"},[`& .${g._.cell}.${g._["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:t.shadows[2],backgroundColor:(t.vars||t).palette.background.paper,"&:focus-within":{outline:`1px solid ${(t.vars||t).palette.primary.main}`,outlineOffset:-1}},[`& .${g._["row--editing"]}`]:{boxShadow:t.shadows[2]},[`& .${g._["row--editing"]} .${g._.cell}`]:{boxShadow:t.shadows[0],backgroundColor:(t.vars||t).palette.background.paper},[`& .${g._.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${g._.booleanCell}[data-value="true"]`]:{color:(t.vars||t).palette.text.secondary},[`& .${g._.booleanCell}[data-value="false"]`]:{color:(t.vars||t).palette.text.disabled},[`& .${g._.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:t.spacing(1)},[`& .${g._.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${g._["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${g._.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${g._.withBorderColor}`]:{borderColor:s},[`& .${g._["cell--withLeftBorder"]}, & .${g._["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${g._["cell--withRightBorder"]}, & .${g._["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${g._["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${g._["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${g._["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${g._["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${g._["cell--pinnedLeft"]}, & .${g._["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:D}},[`& .${g._.virtualScrollerContent} .${g._.row}`]:{"&:hover":R,"&.Mui-selected":O,"&.Mui-selected:hover":A},[`& .${g._.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${g._.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${g._.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${g._.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${g._["columnHeader--dragging"]}, & .${g._["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${g._["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity,[`& .${g._.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${g._.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${g._.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)},[`& .${g._.treeDataGroupingCellLoadingContainer}, .${g._.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${g._.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${g._.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)},[`.${g._.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${g._["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${g._["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${g._["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${g._.filler}`]:{flex:"1 0 auto"},[`& .${g._["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${g._["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${g._.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${g._["scrollbar--vertical"]}, & .${g._.pinnedRows}, & .${g._.virtualScroller} > .${g._.filler}`]:{display:"none"}}})}));function C(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),i=(0,f.tB)(e),a=(0,f.tB)(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return(0,f.wy)({type:"rgb",values:s})}const k=e=>`rgb(from ${e} r g b / 1)`;function M(e,t,n){return`color-mix(in srgb,${e}, ${k(t)} calc(${n} * 100%))`}var _=n(21221),T=n(57974),P=n(92327);const I=()=>()=>{},R=()=>!1,D=()=>!0;var O=n(64564),A=n(76105),E=n(44e3),Z=n(98841),L=n(77928);function F(){var e,t;const n=(0,Z.l)(),o=(0,v.Pp)(n,O.d$),i=(0,_.B)(),a=(0,v.Pp)(n,A.e),s=n.current.unstable_applyPipeProcessors("preferencePanel",null,a.openedPanelValue??E.y.filters);return(0,L.jsx)(i.slots.panel,(0,r.Z)({as:i.slots.basePopper,open:o.length>0&&a.open,id:a.panelId,"aria-labelledby":a.labelId},null===(e=i.slotProps)||void 0===e?void 0:e.panel,null===(t=i.slotProps)||void 0===t?void 0:t.basePopper,{children:s}))}function j(){var e;const t=(0,_.B)();return(0,L.jsxs)(o.Fragment,{children:[(0,L.jsx)(F,{}),t.slots.toolbar&&(0,L.jsx)(t.slots.toolbar,(0,r.Z)({},null===(e=t.slotProps)||void 0===e?void 0:e.toolbar))]})}var N=n(20140),z=n(6647),B=n(49098),V=n(59603),H=n(51154),$=n(18504),W=n(4369);const G=(0,N.Z)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${g._["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${g._["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${g._["scrollArea--left"]}`]:{left:0},[`&.${g._["scrollArea--right"]}`]:{right:0}}))),U=(0,W.bG)(z.jY,((e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0));function q(e){const{scrollDirection:t,scrollPosition:n}=e,i=o.useRef(null),a=(0,Z.l)(),s=(0,H.Z)(),l=(0,v.Pp)(a,T.CD),c=(0,v.Pp)(a,z.iD),h=(0,v.AC)(a,U,t),p=()=>{const e=(0,z.jY)(a.current.state);if("left"===t)return n.current.left>0;if("right"===t){const t=c-e.viewportInnerSize.width;return n.current.left{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return(0,d.Z)(r,g.d,n)})(b),w=(0,$.Jb)(a,y),S=Math.floor(y.columnHeaderHeight*l),C={height:S,top:w-S};"left"===t?C.left=h:"right"===t&&(C.right=h);const k=(0,B.Z)((e=>{let r;if(e.preventDefault(),"left"===t)r=e.clientX-i.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI X: Wrong drag direction");r=Math.max(1,e.clientX-i.current.getBoundingClientRect().left)}r=1.5*(r-1)+1,s.start(0,(()=>{a.current.scroll({left:n.current.left+r,top:n.current.top})}))}));return(0,V.zn)(a,"scrollPositionChange",(()=>{m(p)})),f?(0,L.jsx)(G,{ref:i,className:(0,u.Z)(x.root),ownerState:b,onDragOver:k,style:C}):null}const K=(0,p.X)((function(e){const t=(0,Z.l)(),[n,i]=o.useState(!1);return(0,V.zn)(t,"columnHeaderDragStart",(()=>i(!0))),(0,V.zn)(t,"columnHeaderDragEnd",(()=>i(!1))),n?(0,L.jsx)(q,(0,r.Z)({},e)):null}));var Y=n(38093),X=n(88153),Q=n(10694);var J=n(54924);const ee=(0,N.Z)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e,overridesResolver:(e,t)=>t.overlayWrapper})((e=>{let{overlayType:t,loadingOverlayVariant:n}=e;return"skeleton"!==n?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:"loadingOverlay"===t?5:4}:{}})),te=(0,N.Z)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function ne(e){const t=(0,Z.l)(),n=(0,_.B)(),o=(0,v.Pp)(t,z.jY);let i=Math.max(o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0),0);0===i&&(i=J.m1);const a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},g.d,t)})((0,r.Z)({},e,{classes:n.classes}));return(0,L.jsx)(ee,(0,r.Z)({className:(0,u.Z)(a.root)},e,{children:(0,L.jsx)(te,(0,r.Z)({className:(0,u.Z)(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function re(e){var t,n;const{overlayType:o}=e,i=(0,_.B)();if(!o)return null;const a=null===(t=i.slots)||void 0===t?void 0:t[o],s=null===(n=i.slotProps)||void 0===n?void 0:n[o];return(0,L.jsx)(ne,(0,r.Z)({},e,{children:(0,L.jsx)(a,(0,r.Z)({},s))}))}var oe=n(49390),ie=n(14695),ae=n(6168);const se=e=>e.columnMenu;const le=(0,p.X)((function(){var e;const t=(0,y.$)(),n=(0,_.B)(),o=(0,v.Pp)(t,O.FE),i=(0,v.Pp)(t,X.AF),a=(0,v.Pp)(t,oe.Nl),s=(0,v.Pp)(t,ie.X5),l=(0,v.Pp)(t,(()=>null===(0,ie.d6)(t))),u=(0,v.Pp)(t,ie.jc),c=(0,v.Pp)(t,ie.ud),d=(0,v.Pp)(t,ie.jC),h=(0,v.Pp)(t,ae.uW),p=(0,v.Pp)(t,se),f=(0,v.Pp)(t,O.g0),m=(0,v.Pp)(t,ae.WT),g=!(null===u&&null===s&&l),b=t.current.columnHeadersContainerRef;return(0,L.jsx)(n.slots.columnHeaders,(0,r.Z)({ref:b,visibleColumns:o,filterColumnLookup:i,sortColumnLookup:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,headerGroupingMaxDepth:h,columnMenuState:p,columnVisibility:f,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g},null===(e=n.slotProps)||void 0===e?void 0:e.columnHeaders))}));var ue=n(19e3);const ce=(0,N.Z)("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),de=(0,N.Z)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],"skeleton"===n.loadingOverlayVariant&&t["main--hasSkeletonLoadingOverlay"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),he=(0,s.G)(((e,t)=>{var n;const{ownerState:o}=e,i=(0,_.B)(),a=(0,ue.x)().hooks.useGridAriaAttributes();return(0,L.jsxs)(de,(0,r.Z)({ownerState:o,className:e.className,tabIndex:-1},a,null===(n=i.slotProps)||void 0===n?void 0:n.main,{ref:t,children:[(0,L.jsx)(ce,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))})),pe=(0,N.Z)("div")({position:"sticky",zIndex:4,top:0});function fe(e){const t=(0,d.Z)({root:["topContainer"]},g.d,{});return(0,L.jsx)(pe,(0,r.Z)({},e,{className:(0,u.Z)(t.root,g._["container--top"]),role:"presentation"}))}const me=(0,N.Z)("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function ge(e){const t=(0,d.Z)({root:["bottomContainer"]},g.d,{});return(0,L.jsx)(me,(0,r.Z)({},e,{className:(0,u.Z)(t.root,g._["container--bottom"]),role:"presentation"}))}const ve=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),ye=(0,s.G)((function(e,t){var n;const o=(0,_.B)(),i=!o.autoHeight&&"auto"===(null===(n=e.style)||void 0===n?void 0:n.minHeight),a=((e,t)=>{const{classes:n}=e,r={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,d.Z)(r,g.d,n)})(o,i),s={classes:o.classes,overflowedContent:i};return(0,L.jsx)(ve,(0,r.Z)({},e,{ownerState:s,className:(0,u.Z)(a.root,e.className),ref:t}))})),be=(0,N.Z)("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),xe=(0,N.Z)("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),we=(0,N.Z)(xe)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),Se=(0,N.Z)(xe)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),Ce=(0,N.Z)("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});const ke=(0,p.X)((function(e){let{rowsLength:t}=e;const n=(0,Z.l)(),{viewportOuterSize:r,minimumSize:o,hasScrollX:i,hasScrollY:a,scrollbarSize:s,leftPinnedWidth:l,rightPinnedWidth:u}=(0,v.Pp)(n,z.jY),c=i?s:0,d=r.height-o.height>0;return 0!==c||d?(0,L.jsxs)(be,{className:g._.filler,role:"presentation",style:{height:c,"--rowBorderColor":0===t?"transparent":"var(--DataGrid-rowBorderColor)"},children:[l>0&&(0,L.jsx)(we,{className:g._["filler--pinnedLeft"],style:{width:l}}),(0,L.jsx)(Ce,{}),u>0&&(0,L.jsx)(Se,{className:g._["filler--pinnedRight"],style:{width:u+(a?s:0)}})]}):null}));var Me=n(17226),_e=n(97697);const Te=["className"],Pe=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Ie=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,Te),i=(0,Z.l)(),a=(0,_.B)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["virtualScrollerRenderZone"]},g.d,t)})(a),c=(0,v.Pp)(i,(()=>{const e=(0,_e.r8)(i);return(0,Me.k)(i.current.state).positions[e.firstRowIndex]??0}));return(0,L.jsx)(Pe,(0,r.Z)({className:(0,u.Z)(s.root,n),ownerState:a,style:{transform:`translate3d(0, ${c}px, 0)`}},o,{ref:t}))}));var Re=n(8603);const De=(0,N.Z)("div")({position:"absolute",display:"inline-block",zIndex:6,"&:hover":{zIndex:7},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),Oe=(0,N.Z)(De)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),Ae=(0,N.Z)(De)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),Ee=(0,s.G)((function(e,t){const n=(0,y.$)(),r=(0,_.B)(),i=o.useRef(!1),a=o.useRef(0),s=o.useRef(null),l=o.useRef(null),u=((e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return(0,d.Z)(r,g.d,n)})(r,e.position),c=(0,v.Pp)(n,z.jY),p="vertical"===e.position?"height":"width",f="vertical"===e.position?"scrollTop":"scrollLeft",m="vertical"===e.position?"top":"left",b="vertical"===e.position?c.hasScrollX:c.hasScrollY,x=c.minimumSize[p]+(b?c.scrollbarSize:0),w=("vertical"===e.position?c.viewportInnerSize.height:c.viewportOuterSize.width)*(x/c.viewportOuterSize[p]),S=(0,B.Z)((()=>{const t=s.current,n=e.scrollPosition.current;if(!t)return;if(n[m]===a.current)return;if(a.current=n[m],i.current)return void(i.current=!1);i.current=!0;const r=n[m]/x;t[f]=r*w})),C=(0,B.Z)((()=>{const e=n.current.virtualScrollerRef.current,t=s.current;if(!t)return;if(i.current)return void(i.current=!1);i.current=!0;const r=t[f]/w;e[f]=r*x}));(0,Re.Z)((()=>{const e=n.current.virtualScrollerRef.current,t=s.current,r={passive:!0};return e.addEventListener("scroll",S,r),t.addEventListener("scroll",C,r),()=>{e.removeEventListener("scroll",S,r),t.removeEventListener("scroll",C,r)}})),o.useEffect((()=>{l.current.style.setProperty(p,`${w}px`)}),[w,p]);const k="vertical"===e.position?Oe:Ae;return(0,L.jsx)(k,{ref:(0,h.Z)(t,s),className:u.root,style:"vertical"===e.position&&r.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:(0,L.jsx)("div",{ref:l,className:u.content})})})),Ze=(0,N.Z)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),Le=e=>e.dimensions.rightPinnedWidth>0;function Fe(e){const t=(0,Z.l)(),n=(0,_.B)(),o=(0,v.Pp)(t,z.Wp),i=(0,v.Pp)(t,z.H4),a=(0,v.Pp)(t,Le),s=(0,v.Pp)(t,z.D6),l=(()=>{const e=(0,Z.l)(),t=(0,_.B)(),n=(0,v.Pp)(e,Q.hh),r=(0,v.Pp)(e,X.IQ),o=(0,v.Pp)(e,Q.J5),i=0===n&&0===o,a=(0,v.Pp)(e,Q.Vk);let s=null,l=null;var u,c;return!a&&i&&(s="noRowsOverlay"),!a&&n>0&&0===r&&(s="noResultsOverlay"),a&&(s="loadingOverlay",l=(null===(c=t.slotProps)||void 0===c||null===(u=c.loadingOverlay)||void 0===u?void 0:u[i?"noRowsVariant":"variant"])||null),{overlayType:s,loadingOverlayVariant:l}})(),u={classes:n.classes,hasScrollX:i,hasPinnedRight:a,loadingOverlayVariant:l.loadingOverlayVariant},c=(e=>{const{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o}=e,i={root:["main",r&&"main--hasPinnedRight","skeleton"===o&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]};return(0,d.Z)(i,g.d,t)})(u),h=(0,Y.cD)(),{getContainerProps:p,getScrollerProps:f,getContentProps:m,getRenderZoneProps:y,getScrollbarVerticalProps:b,getScrollbarHorizontalProps:x,getRows:w,getScrollAreaProps:S}=h,C=w();return(0,L.jsxs)(he,(0,r.Z)({className:c.root},p(),{ownerState:u,children:[(0,L.jsx)(K,(0,r.Z)({scrollDirection:"left"},S())),(0,L.jsx)(K,(0,r.Z)({scrollDirection:"right"},S())),(0,L.jsxs)(Ze,(0,r.Z)({className:c.scroller},f(),{ownerState:u,children:[(0,L.jsxs)(fe,{children:[!n.unstable_listView&&(0,L.jsx)(le,{}),(0,L.jsx)(n.slots.pinnedRows,{position:"top",virtualScroller:h})]}),(0,L.jsx)(re,(0,r.Z)({},l)),(0,L.jsx)(ye,(0,r.Z)({},m(),{children:(0,L.jsxs)(Ie,(0,r.Z)({},y(),{children:[C,(0,L.jsx)(n.slots.detailPanels,{virtualScroller:h})]}))})),s&&(0,L.jsx)(ke,{rowsLength:C.length}),(0,L.jsx)(ge,{children:(0,L.jsx)(n.slots.pinnedRows,{position:"bottom",virtualScroller:h})})]})),i&&!n.unstable_listView&&(0,L.jsx)(Ee,(0,r.Z)({position:"horizontal"},x())),o&&(0,L.jsx)(Ee,(0,r.Z)({position:"vertical"},b())),e.children]}))}function je(){var e;const t=(0,_.B)();return t.hideFooter?null:(0,L.jsx)(t.slots.footer,(0,r.Z)({},null===(e=t.slotProps)||void 0===e?void 0:e.footer))}const Ne=["className","children"],ze=(0,s.G)((function(e,t){const n=(0,_.B)(),{className:i,children:a}=e,s=(0,l.Z)(e,Ne),p=(0,y.$)(),f=(0,v.Pp)(p,T.EH),m=p.current.rootElementRef,b=o.useCallback((e=>{null!==e&&p.current.publishEvent("rootMount",e)}),[p]),x=(0,h.Z)(m,t,b),w=n,C=((e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${(0,c.Z)(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return(0,d.Z)(i,g.d,r)})(w,f);return(0,P.useSyncExternalStore)(I,R,D)?null:(0,L.jsxs)(S,(0,r.Z)({className:(0,u.Z)(C.root,i),ownerState:w},s,{ref:x,children:[(0,L.jsx)(j,{}),(0,L.jsx)(Fe,{children:a}),(0,L.jsx)(je,{})]}))})),Be=(0,p.X)(ze);var Ve=n(64201);var He=n(84708);var $e=n(35666),We=n(56202),Ge=n(98068);function Ue(e){let{privateApiRef:t,configuration:n,props:r,children:i}=e;const a=o.useRef(t.current.getPublicApi());return(0,L.jsx)(Ge.s.Provider,{value:n,children:(0,L.jsx)(We.G.Provider,{value:r,children:(0,L.jsx)(y.j.Provider,{value:t,children:(0,L.jsx)($e.r.Provider,{value:a,children:i})})})})}var qe=n(38952);var Ke=n(87394),Ye=n(95362);const Xe=(0,Ke.Vu)()&&null!=window.localStorage.getItem("DEBUG"),Qe=()=>{},Je={debug:Qe,info:Qe,warn:Qe,error:Qe},et=["debug","info","warn","error"];function tt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;const r=et.indexOf(t);if(-1===r)throw new Error(`MUI X: Log level ${t} not recognized.`);const o=et.reduce(((t,o,i)=>(t[o]=i>=r?function(){for(var t=arguments.length,r=new Array(t),i=0;i2&&void 0!==arguments[2]?arguments[2]:{},r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;e-=1){const t=i[e];o.highPriority.has(t)&&t.apply(this,n)}for(let e=0;e(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}const ot=Symbol("mui.api_private");let it=0;function at(e,t){var n;const r=o.useRef(null),i=o.useRef(null);i.current||(i.current=function(e){var t;const n=null===(t=e.current)||void 0===t?void 0:t[ot];if(n)return n;const r={},o={state:r,store:rt.create(r),instanceId:{id:it}};return it+=1,o.getPublicApi=()=>e.current,o.register=(t,n)=>{Object.keys(n).forEach((r=>{const i=n[r],a=o[r];if(!0===(null==a?void 0:a.spying)?a.target=i:o[r]=i,"public"===t){const t=e.current,n=t[r];!0===(null==n?void 0:n.spying)?n.target=i:t[r]=i}}))},o.register("private",{caches:{},eventManager:new nt}),o}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[ot]:e.current}}(i));const a=o.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;rvoid 0!==e.isPropagationStopped)(s)&&s.isPropagationStopped())return;const l=t.signature===V.cG.DataGridPro||t.signature===V.cG.DataGridPremium?{api:i.current.getPublicApi()}:{};i.current.eventManager.emit(o,a,s,l)}),[i,t.signature]),s=o.useCallback(((e,t,n)=>{i.current.eventManager.on(e,t,n);const r=i.current;return()=>{r.eventManager.removeListener(e,t)}}),[i]);return(0,Ye.h)(i,{subscribeEvent:s,publishEvent:a},"public"),e&&!(null===(n=e.current)||void 0===n?void 0:n.state)&&(e.current=r.current),o.useImperativeHandle(e,(()=>r.current),[r]),o.useEffect((()=>{const e=i.current;return()=>{e.publishEvent("unmount")}}),[i]),i}var st=n(72131);const lt="none",ut={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},ct=(e,t)=>(0,r.Z)({},e,{props:{getRowId:t.getRowId}}),dt=(e,t)=>{const n=at(e,t);return(e=>{const t=o.useRef(null),n=o.useRef(null),r=o.useRef(null),i=o.useRef(null),a=o.useRef(null),s=o.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:i,virtualScrollbarHorizontalRef:a,columnHeadersContainerRef:s})})(n),((e,t)=>{o.useEffect((()=>{e.current.setState((e=>(0,r.Z)({},e,{props:{getRowId:t.getRowId}})))}),[e,t.getRowId])})(n,t),(e=>{const t=(0,qe.V)();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const n=o.useRef(!0);o.useEffect((()=>{n.current?n.current=!1:e.current.setState((e=>(0,r.Z)({},e,{isRtl:t})))}),[e,t])})(n),((e,t)=>{const n=o.useCallback((e=>Xe?tt(e,"debug",t.logger):t.logLevel?tt(e,t.logLevel.toString(),t.logger):Je),[t.logLevel,t.logger]);(0,Ye.h)(e,{getLogger:n},"private")})(n,t),(e=>{const t=o.useRef({}),n=o.useCallback((e=>{t.current[e.stateId]=e}),[]),i=o.useCallback(((n,r)=>{let o;if(o=(0,Ke.mf)(n)?n(e.current.state):n,e.current.state===o)return!1;let i=!1;const a=[];if(Object.keys(t.current).forEach((n=>{const r=t.current[n],s=r.stateSelector(e.current.state,e.current.instanceId),l=r.stateSelector(o,e.current.instanceId);l!==s&&(a.push({stateId:r.stateId,hasPropChanged:l!==r.propModel}),void 0!==r.propModel&&l!==r.propModel&&(i=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=o,e.current.publishEvent("stateChange",o),e.current.store.update(o)),1===a.length){const{stateId:n,hasPropChanged:s}=a[0],l=t.current[n],u=l.stateSelector(o,e.current.instanceId);l.propOnChange&&s&&l.propOnChange(u,{reason:r,api:e.current}),i||e.current.publishEvent(l.changeEvent,u,{reason:r})}return!i}),[e]),a=o.useCallback(((t,n,o)=>e.current.setState((e=>(0,r.Z)({},e,{[t]:n(e[t])})),o)),[e]),s={setState:i,forceUpdate:o.useCallback((()=>{}),[])},l={updateControlState:a,registerControlState:n};(0,Ye.h)(e,s,"public"),(0,Ye.h)(e,l,"private")})(n),(e=>{const t=o.useRef({}),n=o.useRef(!1),r=o.useCallback((e=>{!n.current&&e&&(n.current=!0,Object.values(e.appliers).forEach((e=>{e()})),n.current=!1)}),[]),i=o.useCallback(((e,n,o)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}});const i=t.current[e];return i.processors.get(n)!==o&&(i.processors.set(n,o),i.processorsAsArray=Array.from(t.current[e].processors.values()),r(i)),()=>{t.current[e].processors.delete(n),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values())}}),[r]),a=o.useCallback(((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[e].appliers[n]=r,()=>{const r=t.current[e].appliers,o=(0,l.Z)(r,[n].map(st.Z));t.current[e].appliers=o})),[]),s=o.useCallback((e=>{r(t.current[e])}),[r]),u=o.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r{const t=o.useRef(new Map),n=o.useRef({}),r={registerStrategyProcessor:o.useCallback(((t,r,o)=>{const i=()=>{const e=n.current[r],o=(0,l.Z)(e,[t].map(st.Z));n.current[r]=o};n.current[r]||(n.current[r]={});const a=n.current[r],s=a[t];return a[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(ut[r])&&e.current.publishEvent("activeStrategyProcessorChange",r),i):i}),[e]),applyStrategyProcessor:o.useCallback(((t,r)=>{const o=e.current.getActiveStrategy(ut[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=n.current[t];if(!i||!i[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,i[o])(r)}),[e]),getActiveStrategy:o.useCallback((e=>{const n=Array.from(t.current.entries()).find((t=>{let[,n]=t;return n.group===e&&n.isAvailable()}));return(null==n?void 0:n[0])??lt}),[]),setStrategyAvailability:o.useCallback(((n,r,o)=>{t.current.set(r,{group:n,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e])};(0,Ye.h)(e,r,"private")})(n),((e,t)=>{const n=o.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:n})})(n,t),n.current.register("private",{rootProps:t}),n},ht=(e,t,n)=>{const r=o.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function pt(e,t){const n=o.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const ft=(e,t,n,r,o)=>{const i=pt(e,"useNativeEventListener");(0,V.x3)(e,"rootMount",(()=>{const e="function"==typeof t?t():t.current;if(e&&n&&r)return i.debug(`Binding native ${n} event`),e.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),e.removeEventListener(n,r,o)}}))};var mt=n(98873);function gt(e,t){if(null==e)return"";const n="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some((e=>n.includes(e)))?`"${e}"`:e}return n}const vt=(e,t)=>{const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){var i;const t=e.colDef.type;if("number"===t)o=String(e.value);else if("date"===t||"dateTime"===t){var a;o=null===(a=e.value)||void 0===a?void 0:a.toISOString()}else o="function"==typeof(null===(i=e.value)||void 0===i?void 0:i.toString)?e.value.toString():e.value}else o=e.formattedValue;return gt(o,n)};class yt{addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}}function bt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce(((e,n)=>`${e}${(e=>{let{id:t,columns:n,getCellParams:r,csvOptions:o,ignoreValueFormatter:i}=e;const a=new yt({csvOptions:o});return n.forEach((e=>{const n=r(t,e.field);a.addValue(vt(n,{ignoreValueFormatter:i,csvOptions:o}))})),a.getRowString()})({id:n,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r\n`),"").trim();if(!r.includeHeaders)return a;const s=t.filter((e=>e.field!==mt.n.field)),l=[];if(r.includeColumnGroupsHeaders){const e=i.current.getAllGroupDetails();let t=0;const n=s.reduce(((e,n)=>{const r=i.current.getColumnGroupPath(n.field);return e[n.field]=r,t=Math.max(t,r.length),e}),{});for(let o=0;o{const i=(n[r.field]||[])[o],a=e[i];t.addValue(a?a.headerName||a.groupId:"")}))}}const u=new yt({csvOptions:r,sanitizeCellValue:gt});s.forEach((e=>{u.addValue(e.headerName||e.field)})),l.push(u);return`${`${l.map((e=>e.getRowString())).join("\r\n")}\r\n`}${a}`.trim()}function xt(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const wt=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,St=e=>"Tab"===e||"Escape"===e;function Ct(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}function kt(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const Mt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=("object"==typeof n?null==n?void 0:n.clipboardExport:n)||!1,i=t.clipboardCopyCellDelimiter,a=o.useCallback((t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(n=t.target,(null===(o=window.getSelection())||void 0===o?void 0:o.toString())||n&&(n.selectionEnd||0)-(n.selectionStart||0)>0)return;var n,o;let a="";if(e.current.getSelectedRows().size>0)a=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=(0,ie.TR)(e);if(t){const n=e.current.getCellParams(t.id,t.field);a=vt(n,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}var s;a=e.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(s=a,navigator.clipboard?navigator.clipboard.writeText(s).catch((()=>{kt(s)})):kt(s),e.current.publishEvent("clipboardCopy",a))}),[e,r,i]);ft(e,(()=>e.current.rootElementRef.current),"keydown",a),(0,V.x3)(e,"clipboardCopy",t.onClipboardCopy)},_t=e=>(0,r.Z)({},e,{columnMenu:{open:!1}}),Tt=e=>{const t=o.useRef(!0);t.current&&(t.current=!1,e())},Pt=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=o.useRef(null),a=o.useRef(`mui-${Math.round(1e9*Math.random())}`),s=o.useCallback((()=>{i.current=e.current.registerPipeProcessor(t,a.current,n)}),[e,n,t]);Tt((()=>{r&&s()}));const l=o.useRef(!0);o.useEffect((()=>(l.current?l.current=!1:r&&s(),()=>{i.current&&(i.current(),i.current=null)})),[s,r])},It=(e,t,n)=>{const r=o.useRef(null),i=o.useRef(`mui-${Math.round(1e9*Math.random())}`),a=o.useCallback((()=>{r.current=e.current.registerPipeApplier(t,i.current,n)}),[e,n,t]);Tt((()=>{a()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])};var Rt=n(48994);const Dt=(e,t,n)=>{var o,i,a;const s=(0,$.QC)({apiRef:n,columnsToUpsert:t.columns,initialState:null===(o=t.initialState)||void 0===o?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??(null===(a=t.initialState)||void 0===a||null===(i=a.columns)||void 0===i?void 0:i.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return(0,r.Z)({},e,{columns:s,pinnedColumns:e.pinnedColumns??Rt.J})};function Ot(e){return t=>(0,r.Z)({},t,{columns:e})}const At=(e,t)=>{var n;return(0,r.Z)({},e,{density:(null===(n=t.initialState)||void 0===n?void 0:n.density)??t.density??"standard"})};const Et=e=>{let{apiRef:t,options:n}=e;const r=(0,O.d$)(t);if(n.fields)return n.fields.reduce(((e,t)=>{const n=r.find((e=>e.field===t));return n&&e.push(n),e}),[]);return(n.allColumns?r:(0,O.FE)(t)).filter((e=>!e.disableExport))},Zt=e=>{let{apiRef:t}=e;var n,r;const o=(0,X.Lp)(t),i=(0,Q.Kd)(t),a=t.current.getSelectedRows(),s=o.filter((e=>"footer"!==i[e].type)),l=(0,Q.Kf)(t),u=(null==l||null===(n=l.top)||void 0===n?void 0:n.map((e=>e.id)))||[],c=(null==l||null===(r=l.bottom)||void 0===r?void 0:r.map((e=>e.id)))||[];return s.unshift(...u),s.push(...c),a.size>0?s.filter((e=>a.has(e))):s};var Lt=n(34905),Ft=n(30341),jt=n(95806),Nt=n(96521);const zt=(0,s.G)((function(e,t){var n,i;const{children:a,slotProps:s={}}=e,l=s.button||{},u=s.tooltip||{},c=(0,Z.l)(),d=(0,_.B)(),p=(0,Ft.Z)(),f=(0,Ft.Z)(),[m,v]=o.useState(!1),y=o.useRef(null),b=(0,h.Z)(t,y),x=()=>v(!1);return null==a?null:(0,L.jsxs)(o.Fragment,{children:[(0,L.jsx)(d.slots.baseTooltip,(0,r.Z)({title:c.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},null===(n=d.slotProps)||void 0===n?void 0:n.baseTooltip,u,{children:(0,L.jsx)(d.slots.baseButton,(0,r.Z)({size:"small",startIcon:(0,L.jsx)(d.slots.exportIcon,{}),"aria-expanded":m,"aria-label":c.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":m?f:void 0,id:p},null===(i=d.slotProps)||void 0===i?void 0:i.baseButton,l,{onClick:e=>{var t;v((e=>!e)),null===(t=l.onClick)||void 0===t||t.call(l,e)},ref:b,children:c.current.getLocaleText("toolbarExport")}))})),(0,L.jsx)(Nt.r,{open:m,target:y.current,onClose:x,position:"bottom-start",children:(0,L.jsx)(jt.Z,{id:f,className:g._.menuList,"aria-labelledby":p,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),St(e.key)&&x()},autoFocusItem:m,children:o.Children.map(a,(e=>o.isValidElement(e)?o.cloneElement(e,{hideMenu:x}):e))})})]})})),Bt=["hideMenu","options"],Vt=["hideMenu","options"],Ht=["csvOptions","printOptions","excelOptions"];function $t(e){const t=(0,Z.l)(),{hideMenu:n,options:o}=e,i=(0,l.Z)(e,Bt);return(0,L.jsx)(Lt.Z,(0,r.Z)({onClick:()=>{t.current.exportDataAsCsv(o),null==n||n()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Wt(e){const t=(0,Z.l)(),{hideMenu:n,options:o}=e,i=(0,l.Z)(e,Vt);return(0,L.jsx)(Lt.Z,(0,r.Z)({onClick:()=>{t.current.exportDataAsPrint(o),null==n||n()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}(0,s.G)((function(e,t){const n=e,{csvOptions:i={},printOptions:a={},excelOptions:s}=n,u=(0,l.Z)(n,Ht),c=(0,Z.l)().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:s,csvOptions:i,printOptions:a}).sort(((e,t)=>e.componentName>t.componentName?1:-1));return 0===c.length?null:(0,L.jsx)(zt,(0,r.Z)({},u,{ref:t,children:c.map(((e,t)=>o.cloneElement(e.component,{key:t})))}))}));const Gt=(e,t)=>{const n=pt(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,i=("object"==typeof r?null==r?void 0:r.csvExport:r)||!1,a=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.debug("Get data as CSV");return bt({columns:Et({apiRef:e,options:t}),rowIds:(t.getRowsToExport??Zt)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:i,apiRef:e})}),[n,e,i]),s=o.useCallback((e=>{n.debug("Export data as CSV");const t=a(e);!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv";const n=`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.title||"untitled"}.${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 X: exportAs not supported.")}(new Blob([(null==e?void 0:e.utf8WithBom)?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[n,a]),l={getDataAsCsv:a,exportDataAsCsv:s};(0,Ye.h)(e,l,"public");const u=o.useCallback(((e,t)=>{var n;return(null===(n=t.csvOptions)||void 0===n?void 0:n.disableToolbarButton)?e:[...e,{component:(0,L.jsx)($t,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);Pt(e,"exportMenu",u)};var Ut=n(769),qt=n(10780),Kt=n(88117);const Yt=(e,t,n)=>{let o=e.paginationModel;const i=e.rowCount,a=(null==n?void 0:n.pageSize)??o.pageSize,s=(null==n?void 0:n.page)??o.page,l=(0,Kt.tR)(i,a,s);!n||(null==n?void 0:n.page)===o.page&&(null==n?void 0:n.pageSize)===o.pageSize||(o=n);const u=-1===a?0:(0,Kt.NZ)(o.page,l);return u!==o.page&&(o=(0,r.Z)({},o,{page:u})),(0,Kt.Ip)(o.pageSize,t),o};const Xt=(e,t)=>{const n=null!==e.current.rootElementRef.current,i=pt(e,"useGridPrintExport"),a=o.useRef(null),s=o.useRef(null),l=o.useRef({}),u=o.useRef([]),c=o.useRef(null);o.useEffect((()=>{a.current=(0,Ut.Z)(e.current.rootElementRef.current)}),[e,n]);const d=o.useCallback(((t,n,r)=>new Promise((o=>{const i=Et({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),a=(0,O.d$)(e),s={};a.forEach((e=>{s[e.field]=i.includes(e.field)})),r&&(s[mt.n.field]=!0),e.current.setColumnVisibilityModel(s),o()}))),[e]),h=o.useCallback((t=>{const n=t({apiRef:e}).reduce(((t,n)=>{const r=e.current.getRow(n);return r[J._1]||t.push(r),t}),[]);e.current.setRows(n)}),[e]),p=o.useCallback(((n,o)=>{var i,s;const l=(0,r.Z)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),u=n.contentDocument;if(!u)return;const c=(0,Me.k)(e.current.state),d=e.current.rootElementRef.current,h=d.cloneNode(!0);h.querySelector(`.${g._.main}`).style.overflow="visible",h.style.contain="size";let p=(null===(i=d.querySelector(`.${g._.toolbarContainer}`))||void 0===i?void 0:i.offsetHeight)||0,f=(null===(s=d.querySelector(`.${g._.footerContainer}`))||void 0===s?void 0:s.offsetHeight)||0;var m,v;l.hideToolbar&&(null===(m=h.querySelector(`.${g._.toolbarContainer}`))||void 0===m||m.remove(),p=0);l.hideFooter&&(null===(v=h.querySelector(`.${g._.footerContainer}`))||void 0===v||v.remove(),f=0);const y=c.currentPageTotalHeight+(0,$.Jb)(e,t)+p+f;if(h.style.height=`${y}px`,h.style.boxSizing="content-box",!l.hideFooter){const e=h.querySelector(`.${g._.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=y-f+"px"}const b=document.createElement("div");b.appendChild(h),u.body.style.marginTop="0px",u.body.innerHTML=b.innerHTML;const x="function"==typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"==typeof x){const e=u.createElement("style");e.appendChild(u.createTextNode(x)),u.head.appendChild(e)}l.bodyClassName&&u.body.classList.add(...l.bodyClassName.split(" "));const w=[];if(l.copyStyles){const e=d.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:a.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e{e.addEventListener("load",(()=>t()))}))),u.head.appendChild(e)}}}Promise.all(w).then((()=>{n.contentWindow.print()}))}),[e,a,t]),f=o.useCallback((t=>{var n,o;a.current.body.removeChild(t),e.current.restoreState(s.current||{}),(null===(o=s.current)||void 0===o||null===(n=o.columns)||void 0===n?void 0:n.columnVisibilityModel)||e.current.setColumnVisibilityModel(l.current),e.current.setState((e=>(0,r.Z)({},e,{virtualization:c.current}))),e.current.setRows(u.current),s.current=null,l.current={},u.current=[]}),[e]),m={exportDataAsPrint:o.useCallback((async n=>{if(i.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(s.current=e.current.exportState(),l.current=(0,O.g0)(e),u.current=e.current.getSortedRows().filter((e=>!e[J._1])),t.pagination){const t={page:0,pageSize:(0,X.IQ)(e)};e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,"DataGridPro",t)})})))}c.current=e.current.state.virtualization,e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabled:!1,enabledForColumns:!1})}))),await d(null==n?void 0:n.fields,null==n?void 0:n.allColumns,null==n?void 0:n.includeCheckboxes),h((null==n?void 0:n.getRowsToExport)??Zt),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const o=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==n?void 0:n.fileName);o.onload=()=>{p(o,n);o.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&f(o)}))},a.current.body.appendChild(o)}),[t,i,e,p,f,d,h])};(0,Ye.h)(e,m,"public");const v=o.useCallback(((e,t)=>{var n;return(null===(n=t.printOptions)||void 0===n?void 0:n.disableToolbarButton)?e:[...e,{component:(0,L.jsx)(Wt,{options:t.printOptions}),componentName:"printExport"}]}),[]);Pt(e,"exportMenu",v)};var Qt=n(42849),Jt=n(14902),en=n(89039),tn=n(36651);const nn=(e,t,n,r)=>{const i=o.useCallback((()=>{e.current.registerStrategyProcessor(t,n,r)}),[e,r,n,t]);Tt((()=>{i()}));const a=o.useRef(!0);o.useEffect((()=>{a.current?a.current=!1:i()}),[i])};var rn=n(137);const on=(e,t,n)=>{var o,i;const a=t.filterModel??(null===(i=t.initialState)||void 0===i||null===(o=i.filter)||void 0===o?void 0:o.filterModel)??(0,tn.c)();return(0,r.Z)({},e,{filter:(0,r.Z)({filterModel:(0,rn.NF)(a,t.disableMultipleColumnsFiltering,n)},tn.R),visibleRowsLookup:{}})},an=e=>e.filteredRowsLookup;function sn(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function ln(){return(0,Qt.PP)(Object.values)}var un=n(48719);const cn=e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});var dn=n(97616);var hn=n(42669),pn=n(14113),fn=n(2258),mn=n(32194);const gn=e=>{let{currentColIndex:t,firstColIndex:n,lastColIndex:r,isRtl:o}=e;if(o){if(tn)return t-1;return null},vn=e=>{let{currentColIndex:t,firstColIndex:n,lastColIndex:r,isRtl:o}=e;if(o){if(t>n)return t-1}else if(!o&&t(t.top||[]).concat(e.rows,t.bottom||[]))),xn=(e,t)=>{const n=pt(e,"useGridKeyboardNavigation"),r=(0,qe.V)(),i=t.unstable_listView,a=o.useCallback((()=>bn(e)),[e]),s="DataGrid"!==t.signature&&t.headerFilters,l=o.useCallback((function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"up";const s=(0,X.D7)(e),l=e.current.unstable_getCellColSpanInfo(r,t);l&&l.spannedByColSpan&&("left"===o?t=l.leftVisibleCellIndex:"right"===o&&(t=l.rightVisibleCellIndex));const u=i?(0,yn.z)(e.current.state).field:(0,O.pK)(e)[t],c=function(e,t,n,r){var o;const i=(0,mn.mf)(e);if(!(null===(o=i[t])||void 0===o?void 0:o[n]))return t;const a=(0,X.Lp)(e);let s=a.indexOf(t)+("down"===r?1:-1);for(;s>=0&&se.id===c));n.debug(`Navigating to cell row ${d}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:d}),e.current.setCellFocus(c,u)}),[e,n,i]),u=o.useCallback(((t,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,r)}),[e,n]),c=o.useCallback(((t,r)=>{n.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,r)}),[e,n]),d=o.useCallback(((t,r,o)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:i}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(i,r,o)}),[e,n]),h=o.useCallback((e=>{var t;return null===(t=a()[e])||void 0===t?void 0:t.id}),[a]),p=o.useCallback(((t,n)=>{const o=n.currentTarget.querySelector(`.${g._.columnHeaderTitleContainerContent}`);if(!!o&&o.contains(n.target)&&t.field!==mt.n.field)return;const i=a(),p=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,m=i.length>0?0:null,v=i.length-1,y=(0,O.FE)(e).length-1,b=(0,ae.uW)(e);let x=!0;switch(n.key){case"ArrowDown":s?c(f,n):null!==m&&l(f,h(m));break;case"ArrowRight":{const e=vn({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&u(e,n);break}case"ArrowLeft":{const e=gn({currentColIndex:f,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&u(e,n);break}case"ArrowUp":b>0&&d(f,b-1,n);break;case"PageDown":null!==m&&null!==v&&l(f,h(Math.min(m+p,v)));break;case"Home":u(0,n);break;case"End":u(y,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:x=!1}x&&n.preventDefault()}),[e,a,s,c,l,h,r,u,d]),f=o.useCallback(((t,n)=>{const o=(0,pn.tr)(e)===t.field,i=(0,pn.xs)(e)===t.field;if(o||i||!wt(n.key))return;const s=a(),d=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,f=s.length-1,m=(0,O.FE)(e).length-1;let g=!0;switch(n.key){case"ArrowDown":{const e=h(0);null!=e&&l(p,e);break}case"ArrowRight":{const e=vn({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:r});null!==e&&c(e,n);break}case"ArrowLeft":{const o=gn({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:r});null!==o?c(o,n):e.current.setColumnHeaderFilterFocus(t.field,n);break}case"ArrowUp":u(p,n);break;case"PageDown":null!==f&&l(p,h(Math.min(0+d,f)));break;case"Home":c(0,n);break;case"End":c(m,n);break;case" ":break;default:g=!1}g&&n.preventDefault()}),[e,a,c,r,u,l,h]),m=o.useCallback(((t,n)=>{const r=(0,ie.jC)(e);if(null===r)return;const{field:o,depth:i}=r,{fields:s,depth:c,maxDepth:p}=t,f=a(),m=e.current.getViewportPageSize(),g=e.current.getColumnIndex(o),v=o?e.current.getColumnIndex(o):0,y=f.length-1,b=(0,O.FE)(e).length-1;let x=!0;switch(n.key){case"ArrowDown":c===p-1?u(g,n):d(g,i+1,n);break;case"ArrowUp":c>0&&d(g,i-1,n);break;case"ArrowRight":{const e=s.length-s.indexOf(o)-1;g+e+1<=b&&d(g+e+1,i,n);break}case"ArrowLeft":{const e=s.indexOf(o);g-e-1>=0&&d(g-e-1,i,n);break}case"PageDown":null!==y&&l(v,h(Math.min(0+m,y)));break;case"Home":d(0,i,n);break;case"End":d(b,i,n);break;case" ":break;default:x=!1}x&&n.preventDefault()}),[e,a,u,d,l,h]),v=o.useCallback(((t,n)=>{if((0,fn.q_)(n))return;const o=e.current.getCellParams(t.id,t.field);if(o.cellMode===hn.Vl.Edit||!wt(n.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:o}))return;const d=a();if(0===d.length)return;const p=e.current.getViewportPageSize(),f=i?()=>0:e.current.getColumnIndex,m=t.field?f(t.field):0,g=d.findIndex((e=>e.id===t.id)),v=d.length-1,y=(i?[(0,yn.z)(e.current.state)]:(0,O.FE)(e)).length-1;let b=!0;switch(n.key){case"ArrowDown":g0?l(m,h(g-1)):s?c(m,n):u(m,n);break;case"ArrowRight":{const e=vn({currentColIndex:m,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&l(e,h(g),r?"left":"right");break}case"ArrowLeft":{const e=gn({currentColIndex:m,firstColIndex:0,lastColIndex:y,isRtl:r});null!==e&&l(e,h(g),r?"right":"left");break}case"Tab":n.shiftKey&&m>0?l(m-1,h(g),"left"):!n.shiftKey&&me===dn.KK||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(e))(e.field)))break;!n.shiftKey&&g=0?l(m,h(e)):u(m,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?l(0,h(0)):l(0,h(g));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?l(y,h(v)):l(y,h(g));break;default:b=!1}b&&n.preventDefault()}),[e,a,r,l,h,s,c,u,i]),y=o.useCallback(((e,t)=>{let{event:n}=t;return" "!==n.key&&e}),[]);Pt(e,"canStartEditing",y),(0,V.zn)(e,"columnHeaderKeyDown",p),(0,V.zn)(e,"headerFilterKeyDown",f),(0,V.zn)(e,"columnGroupHeaderKeyDown",m),(0,V.zn)(e,"cellKeyDown",v)},wn=(e,t)=>{var n,o,i,a,s,l,u;const c=(0,r.Z)({},(0,Kt.Xd)(t.autoPageSize),t.paginationModel??(null===(o=t.initialState)||void 0===o||null===(n=o.pagination)||void 0===n?void 0:n.paginationModel));(0,Kt.Ip)(c.pageSize,t.signature);const d=t.rowCount??(null===(a=t.initialState)||void 0===a||null===(i=a.pagination)||void 0===i?void 0:i.rowCount)??("client"===t.paginationMode?null===(s=e.rows)||void 0===s?void 0:s.totalRowCount:void 0),h=t.paginationMeta??(null===(u=t.initialState)||void 0===u||null===(l=u.pagination)||void 0===l?void 0:l.meta)??{};return(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:c,rowCount:d,meta:h,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},Sn=(e,t)=>{((e,t)=>{var n,i;const a=pt(e,"useGridPaginationMeta"),s=(0,v.Pp)(e,qt.OR);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:qt.OR,changeEvent:"paginationMetaChange"});const l={setPaginationMeta:o.useCallback((t=>{s!==t&&(a.debug("Setting 'paginationMeta' to",t),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{meta:t})}))))}),[e,a,s])};(0,Ye.h)(e,l,"public");const u=o.useCallback(((n,o)=>{var i,a;const s=(0,qt.OR)(e);return o.exportOnlyDirtyModels&&null==t.paginationMeta&&null==(null===(a=t.initialState)||void 0===a||null===(i=a.pagination)||void 0===i?void 0:i.meta)?n:(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{meta:s})})}),[e,t.paginationMeta,null===(i=t.initialState)||void 0===i||null===(n=i.pagination)||void 0===n?void 0:n.meta]),c=o.useCallback(((t,n)=>{var o;const i=(null===(o=n.stateToRestore.pagination)||void 0===o?void 0:o.meta)?n.stateToRestore.pagination.meta:(0,qt.OR)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{meta:i})}))),t}),[e]);Pt(e,"exportState",u),Pt(e,"restoreState",c),o.useEffect((()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)}),[e,t.paginationMeta])})(e,t),((e,t)=>{var n,i;const a=pt(e,"useGridPaginationModel"),s=(0,v.Pp)(e,T.CD),l=o.useRef((0,X.uf)(e)),u=Math.floor(t.rowHeight*s);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:qt.O$,changeEvent:"paginationModelChange"});const c={setPage:o.useCallback((t=>{const n=(0,qt.O$)(e);t!==n.page&&(a.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:n.pageSize}))}),[e,a]),setPageSize:o.useCallback((t=>{const n=(0,qt.O$)(e);t!==n.pageSize&&(a.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:n.page}))}),[e,a]),setPaginationModel:o.useCallback((n=>{const o=(0,qt.O$)(e);n!==o&&(a.debug("Setting 'paginationModel' to",n),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,n)})})),"setPaginationModel"))}),[e,a,t.signature])};(0,Ye.h)(e,c,"public");const d=o.useCallback(((n,o)=>{var i,a;const s=(0,qt.O$)(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=(null===(a=t.initialState)||void 0===a||null===(i=a.pagination)||void 0===i?void 0:i.paginationModel)||0!==s.page&&s.pageSize!==(0,Kt.dG)(t.autoPageSize)?(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{paginationModel:s})}):n}),[e,t.paginationModel,null===(i=t.initialState)||void 0===i||null===(n=i.pagination)||void 0===n?void 0:n.paginationModel,t.autoPageSize]),h=o.useCallback(((n,o)=>{var i,a;const s=(null===(i=o.stateToRestore.pagination)||void 0===i?void 0:i.paginationModel)?(0,r.Z)({},(0,Kt.Xd)(t.autoPageSize),null===(a=o.stateToRestore.pagination)||void 0===a?void 0:a.paginationModel):(0,qt.O$)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,s)})})),"stateRestorePreProcessing"),n}),[e,t.autoPageSize,t.signature]);Pt(e,"exportState",d),Pt(e,"restoreState",h);const p=o.useCallback((()=>{if(!t.autoPageSize)return;const n=e.current.getRootDimensions(),r=Math.floor(n.viewportInnerSize.height/u);e.current.setPageSize(r)}),[e,t.autoPageSize,u]),f=o.useCallback((t=>{if(null==t)return;const n=(0,qt.O$)(e);if(0===n.page)return;const r=(0,qt.UB)(e);n.page>r-1&&e.current.setPage(Math.max(0,r-1))}),[e]),m=o.useCallback((()=>{0!==(0,qt.O$)(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})}),[e]),g=o.useCallback((t=>{const n=(0,r.Z)({},t,{items:(0,X.DY)(e)});(0,Ke.xb)(n,l.current)||(l.current=n,m())}),[e,m]);(0,V.zn)(e,"viewportInnerSizeChange",p),(0,V.zn)(e,"paginationModelChange",(()=>{var t;const n=(0,qt.O$)(e);(null===(t=e.current.virtualScrollerRef)||void 0===t?void 0:t.current)&&e.current.scrollToIndexes({rowIndex:n.page*n.pageSize})})),(0,V.zn)(e,"rowCountChange",f),(0,V.zn)(e,"sortModelChange",(0,Ke.d$)(t.resetPageOnSortFilter,m)),(0,V.zn)(e,"filterModelChange",(0,Ke.d$)(t.resetPageOnSortFilter,g));const y=o.useRef(!0);o.useEffect((()=>{y.current?y.current=!1:t.pagination&&e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationModel:Yt(e.pagination,t.signature,t.paginationModel)})})))}),[e,t.paginationModel,t.signature,t.pagination]),o.useEffect((()=>{e.current.setState((e=>{const n=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===n?e:(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})}))}),[e,t.paginationMode,t.pagination]),o.useEffect(p,[p])})(e,t),((e,t)=>{var n,i;const a=pt(e,"useGridRowCount"),s=(0,v.Pp)(e,X.xf),l=(0,v.Pp)(e,qt.RM),u=(0,v.Pp)(e,qt.OR),c=(0,v.Pp)(e,qt.O$),d=(0,en.Z)((()=>(0,qt.O$)(e).pageSize));e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:qt.RM,changeEvent:"rowCountChange"});const h={setRowCount:o.useCallback((t=>{l!==t&&(a.debug("Setting 'rowCount' to",t),e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{rowCount:t})}))))}),[e,a,l])};(0,Ye.h)(e,h,"public");const p=o.useCallback(((n,o)=>{var i,a;const s=(0,qt.RM)(e);return o.exportOnlyDirtyModels&&null==t.rowCount&&null==(null===(a=t.initialState)||void 0===a||null===(i=a.pagination)||void 0===i?void 0:i.rowCount)?n:(0,r.Z)({},n,{pagination:(0,r.Z)({},n.pagination,{rowCount:s})})}),[e,t.rowCount,null===(i=t.initialState)||void 0===i||null===(n=i.pagination)||void 0===n?void 0:n.rowCount]),f=o.useCallback(((t,n)=>{var o;const i=(null===(o=n.stateToRestore.pagination)||void 0===o?void 0:o.rowCount)?n.stateToRestore.pagination.rowCount:(0,qt.RM)(e);return e.current.setState((e=>(0,r.Z)({},e,{pagination:(0,r.Z)({},e.pagination,{rowCount:i})}))),t}),[e]);Pt(e,"exportState",p),Pt(e,"restoreState",f);const m=o.useCallback((n=>{"client"!==t.paginationMode&&d.current&&n.pageSize!==d.current&&(d.current=n.pageSize,-1===l&&e.current.setPage(0))}),[t.paginationMode,d,l,e]);(0,V.zn)(e,"paginationModelChange",m),o.useEffect((()=>{"client"===t.paginationMode?e.current.setRowCount(s):null!=t.rowCount&&e.current.setRowCount(t.rowCount)}),[e,t.paginationMode,s,t.rowCount]);const g=!1===u.hasNextPage;o.useEffect((()=>{g&&-1===l&&e.current.setRowCount(c.pageSize*c.page+s)}),[e,s,g,l,c])})(e,t)},Cn=(e,t)=>{var n;return(0,r.Z)({},e,{preferencePanel:(null===(n=t.initialState)||void 0===n?void 0:n.preferencePanel)??{open:!1}})};var kn=n(68056),Mn=n(95254);const _n=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},Tn=["id","field"],Pn=["id","field"];var In=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(In||{}),Rn=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Rn||{}),Dn=n(793);const On=["id"],An=["id"],En=e=>(0,r.Z)({},e,{editRows:{}}),Zn=(e,t)=>{((e,t)=>{const[n,i]=o.useState({}),a=o.useRef(n),s=o.useRef({}),{processRowUpdate:u,onProcessRowUpdateError:c,cellModesModel:d,onCellModesModelChange:h}=t,p=e=>function(){for(var n=arguments.length,r=new Array(n),o=0;o{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),m=o.useCallback(((t,n,r)=>{if(e.current.getCellMode(t,n)!==r)throw new Error(`MUI X: The cell with id=${t} and field=${n} is not in ${r} mode.`)}),[e]),g=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===hn.Vl.Edit)return;const o=(0,r.Z)({},t,{reason:Mn.b.cellDoubleClick});e.current.publishEvent("cellEditStart",o,n)}),[e]),v=o.useCallback(((t,n)=>{if(t.cellMode===hn.Vl.View)return;if(e.current.getCellMode(t.id,t.field)===hn.Vl.View)return;const o=(0,r.Z)({},t,{reason:Mn.r.cellFocusOut});e.current.publishEvent("cellEditStop",o,n)}),[e]),y=o.useCallback(((t,n)=>{if(t.cellMode===hn.Vl.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=Mn.r.escapeKeyDown:"Enter"===n.key?o=Mn.r.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?Mn.r.shiftTabKeyDown:Mn.r.tabKeyDown,n.preventDefault()),o){const i=(0,r.Z)({},t,{reason:o});e.current.publishEvent("cellEditStop",i,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"cell"}))return;if(xt(n)?o=Mn.b.printableKeyDown:Ct(n)?o=Mn.b.pasteKeyDown:"Enter"===n.key?o=Mn.b.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(o=Mn.b.deleteKeyDown),o){const i=(0,r.Z)({},t,{reason:o,key:n.key});e.current.publishEvent("cellEditStart",i,n)}}}),[e]),b=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,i={id:n,field:r};o!==Mn.b.printableKeyDown&&o!==Mn.b.deleteKeyDown&&o!==Mn.b.pasteKeyDown||(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),x=o.useCallback((t=>{const{id:n,field:r,reason:o}=t;let i;e.current.runPendingEditCellValueMutation(n,r),o===Mn.r.enterKeyDown?i="below":o===Mn.r.tabKeyDown?i="right":o===Mn.r.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===o;e.current.stopCellEditMode({id:n,field:r,ignoreModifications:a,cellToFocusAfter:i})}),[e]);var w;(0,V.zn)(e,"cellDoubleClick",p(g)),(0,V.zn)(e,"cellFocusOut",p(v)),(0,V.zn)(e,"cellKeyDown",p(y)),(0,V.zn)(e,"cellEditStart",p(b)),(0,V.zn)(e,"cellEditStop",p(x)),(0,V.x3)(e,"cellEditStart",t.onCellEditStart),(0,V.x3)(e,"cellEditStop",(w=t.onCellEditStop,async function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r=(0,kn.bj)(e.current.state);return r[t]&&r[t][n]?hn.Vl.Edit:hn.Vl.View}),[e]),C=(0,B.Z)((n=>{const r=n!==t.cellModesModel;h&&r&&h(n,{api:e.current}),t.cellModesModel&&r||(i(n),a.current=n,e.current.publishEvent("cellModesModelChange",n))})),k=o.useCallback(((e,t,n)=>{const o=(0,r.Z)({},a.current);if(null!==n)o[e]=(0,r.Z)({},o[e],{[t]:(0,r.Z)({},n)});else{const n=o[e],r=(0,l.Z)(n,[t].map(st.Z));o[e]=r,0===Object.keys(o[e]).length&&delete o[e]}C(o)}),[C]),M=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const i=(0,r.Z)({},e.editRows);return null!==o?i[t]=(0,r.Z)({},i[t],{[n]:(0,r.Z)({},o)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,r.Z)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),_=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,l.Z)(e,Tn);f(t,n),m(t,n,hn.Vl.View),k(t,n,(0,r.Z)({mode:hn.Vl.Edit},o))}),[f,m,k]),T=(0,B.Z)((async t=>{const{id:n,field:o,deleteValue:i,initialValue:a}=t,s=e.current.getCellValue(n,o);let l=s;i?l=_n(e.current.getColumn(o)):a&&(l=a);const u=e.current.getColumn(o),c=!!u.preProcessEditCellProps&&i;let d={value:l,error:!1,isProcessingProps:c};if(M(n,o,d),e.current.setCellFocus(n,o),c&&(d=await Promise.resolve(u.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:d,hasChanged:l!==s})),e.current.getCellMode(n,o)===hn.Vl.Edit)){const t=(0,kn.bj)(e.current.state);M(n,o,(0,r.Z)({},d,{value:t[n][o].value,isProcessingProps:!1}))}})),P=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,l.Z)(e,Pn);m(t,n,hn.Vl.Edit),k(t,n,(0,r.Z)({mode:hn.Vl.View},o))}),[m,k]),I=(0,B.Z)((async t=>{const{id:n,field:r,ignoreModifications:o,cellToFocusAfter:i="none"}=t;m(n,r,hn.Vl.Edit),e.current.runPendingEditCellValueMutation(n,r);const a=()=>{M(n,r,null),k(n,r,null),"none"!==i&&e.current.moveFocusToRelativeCell(n,r,i)};if(o)return void a();const l=(0,kn.bj)(e.current.state),{error:d,isProcessingProps:h}=l[n][r];if(d||h)return s.current[n][r].mode=hn.Vl.Edit,void k(n,r,{mode:hn.Vl.Edit});const p=e.current.getRowWithUpdatedValuesFromCellEditing(n,r);if(u){const t=e=>{s.current[n][r].mode=hn.Vl.Edit,k(n,r,{mode:hn.Vl.Edit}),c&&c(e)};try{const r=e.current.getRow(n);Promise.resolve(u(p,r,{rowId:n})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([p]),a()})),R={getCellMode:S,startCellEditMode:_,stopCellEditMode:P},D={setCellEditingEditCellValue:o.useCallback((async t=>{var n,o;const{id:i,field:a,value:s,debounceMs:l,unstable_skipValueParser:u}=t;f(i,a),m(i,a,hn.Vl.Edit);const c=e.current.getColumn(a),d=e.current.getRow(i);let h=s;c.valueParser&&!u&&(h=c.valueParser(s,d,c,e));let p=(0,kn.bj)(e.current.state),g=(0,r.Z)({},p[i][a],{value:h,changeReason:l?"debouncedSetEditCellValue":"setEditCellValue"});if(c.preProcessEditCellProps){const e=s!==p[i][a].value;g=(0,r.Z)({},g,{isProcessingProps:!0}),M(i,a,g),g=await Promise.resolve(c.preProcessEditCellProps({id:i,row:d,props:g,hasChanged:e}))}return e.current.getCellMode(i,a)!==hn.Vl.View&&(p=(0,kn.bj)(e.current.state),g=(0,r.Z)({},g,{isProcessingProps:!1}),g.value=c.preProcessEditCellProps?p[i][a].value:h,M(i,a,g),p=(0,kn.bj)(e.current.state),!(null===(o=p[i])||void 0===o||null===(n=o[a])||void 0===n?void 0:n.error))}),[e,f,m,M]),getRowWithUpdatedValuesFromCellEditing:o.useCallback(((t,n)=>{const o=e.current.getColumn(n),i=(0,kn.bj)(e.current.state),a=e.current.getRow(t);if(!i[t]||!i[t][n])return e.current.getRow(t);const{value:s}=i[t][n];return o.valueSetter?o.valueSetter(s,a,o,e):(0,r.Z)({},a,{[n]:s})}),[e])};(0,Ye.h)(e,R,"public"),(0,Ye.h)(e,D,"private"),o.useEffect((()=>{d&&C(d)}),[d,C]),(0,Jt.Z)((()=>{const t=(0,Q.J4)(e),o=s.current;s.current=(0,Ke.I8)(n),Object.entries(n).forEach((n=>{let[i,a]=n;Object.entries(a).forEach((n=>{let[a,s]=n;var l,u;const c=(null===(u=o[i])||void 0===u||null===(l=u[a])||void 0===l?void 0:l.mode)||hn.Vl.View,d=t[i]?e.current.getRowId(t[i]):i;s.mode===hn.Vl.Edit&&c===hn.Vl.View?T((0,r.Z)({id:d,field:a},s)):s.mode===hn.Vl.View&&c===hn.Vl.Edit&&I((0,r.Z)({id:d,field:a},s))}))}))}),[e,n,T,I])})(e,t),((e,t)=>{const[n,i]=o.useState({}),a=o.useRef(n),s=o.useRef({}),u=o.useRef(void 0),c=o.useRef(null),{processRowUpdate:d,onProcessRowUpdateError:h,rowModesModel:p,onRowModesModelChange:f}=t,m=e=>function(){for(var n=arguments.length,r=new Array(n),o=0;o{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),v=o.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI X: The row with id=${t} is not in ${n} mode.`)}),[e]),y=o.useCallback((t=>{const n=(0,kn.bj)(e.current.state);return Object.values(n[t]).some((e=>e.error))}),[e]),b=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===hn.se.Edit)return;const o=e.current.getRowParams(t.id),i=(0,r.Z)({},o,{field:t.field,reason:In.cellDoubleClick});e.current.publishEvent("rowEditStart",i,n)}),[e]),x=o.useCallback((e=>{c.current=e}),[]),w=o.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==hn.se.View&&(c.current=null,u.current=setTimeout((()=>{var o;if((null===(o=c.current)||void 0===o?void 0:o.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===hn.se.View)return;if(y(t.id))return;const o=e.current.getRowParams(t.id),i=(0,r.Z)({},o,{field:t.field,reason:Rn.rowFocusOut});e.current.publishEvent("rowEditStop",i,n)}})))}),[e,y]);o.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const S=o.useCallback(((t,n)=>{if(t.cellMode===hn.se.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=Rn.escapeKeyDown;else if("Enter"===n.key)o=Rn.enterKeyDown;else if("Tab"===n.key){const r=(0,O.pK)(e).filter((n=>e.current.getColumn(n).type===Dn.W||e.current.isCellEditable(e.current.getCellParams(t.id,n))));if(n.shiftKey?t.field===r[0]&&(o=Rn.shiftTabKeyDown):t.field===r[r.length-1]&&(o=Rn.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex((e=>e===t.field)),i=r[n.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,i)}}if(o){if(o!==Rn.escapeKeyDown&&y(t.id))return;const i=(0,r.Z)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",i,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"row"}))return;if(xt(n)||Ct(n)?o=In.printableKeyDown:"Enter"===n.key?o=In.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(o=In.deleteKeyDown),o){const i=e.current.getRowParams(t.id),a=(0,r.Z)({},i,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",a,n)}}}),[e,y]),C=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,i={id:n,fieldToFocus:r};o!==In.printableKeyDown&&o!==In.deleteKeyDown||(i.deleteValue=!!r),e.current.startRowEditMode(i)}),[e]),k=o.useCallback((t=>{const{id:n,reason:r,field:o}=t;let i;e.current.runPendingEditCellValueMutation(n),r===Rn.enterKeyDown?i="below":r===Rn.tabKeyDown?i="right":r===Rn.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===r;e.current.stopRowEditMode({id:n,ignoreModifications:a,field:o,cellToFocusAfter:i})}),[e]);(0,V.zn)(e,"cellDoubleClick",m(b)),(0,V.zn)(e,"cellFocusIn",m(x)),(0,V.zn)(e,"cellFocusOut",m(w)),(0,V.zn)(e,"cellKeyDown",m(S)),(0,V.zn)(e,"rowEditStart",m(C)),(0,V.zn)(e,"rowEditStop",m(k)),(0,V.x3)(e,"rowEditStart",t.onRowEditStart),(0,V.x3)(e,"rowEditStop",t.onRowEditStop);const M=o.useCallback((n=>(0,kn.uR)(e,{rowId:n,editMode:t.editMode})?hn.se.Edit:hn.se.View),[e,t.editMode]),_=(0,B.Z)((n=>{const r=n!==t.rowModesModel;f&&r&&f(n,{api:e.current}),t.rowModesModel&&r||(i(n),a.current=n,e.current.publishEvent("rowModesModelChange",n))})),T=o.useCallback(((e,t)=>{const n=(0,r.Z)({},a.current);null!==t?n[e]=(0,r.Z)({},t):delete n[e],_(n)}),[_]),P=o.useCallback(((t,n)=>{e.current.setState((e=>{const o=(0,r.Z)({},e.editRows);return null!==n?o[t]=n:delete o[t],(0,r.Z)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),I=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const i=(0,r.Z)({},e.editRows);return null!==o?i[t]=(0,r.Z)({},i[t],{[n]:(0,r.Z)({},o)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,r.Z)({},e,{editRows:i})})),e.current.forceUpdate()}),[e]),R=o.useCallback((e=>{const{id:t}=e,n=(0,l.Z)(e,On);v(t,hn.se.View),T(t,(0,r.Z)({mode:hn.se.Edit},n))}),[v,T]),D=(0,B.Z)((t=>{const{id:n,fieldToFocus:o,deleteValue:i,initialValue:a}=t,s=(0,O.Zi)(e),l=s.reduce(((t,r)=>{if(!e.current.getCellParams(n,r).isEditable)return t;const s=e.current.getColumn(r);let l=e.current.getCellValue(n,r);return o===r&&(i||a)&&(i?l=_n(s):a&&(l=a)),t[r]={value:l,error:!1,isProcessingProps:!!s.preProcessEditCellProps&&i},t}),{});P(n,l),o&&e.current.setCellFocus(n,o),s.filter((t=>!!e.current.getColumn(t).preProcessEditCellProps&&i)).forEach((t=>{const o=e.current.getColumn(t),s=e.current.getCellValue(n,t),u=i?_n(o):a??s;Promise.resolve(o.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:l[t],hasChanged:u!==s})).then((o=>{if(e.current.getRowMode(n)===hn.se.Edit){const i=(0,kn.bj)(e.current.state);I(n,t,(0,r.Z)({},o,{value:i[n][t].value,isProcessingProps:!1}))}}))}))})),A=o.useCallback((e=>{const{id:t}=e,n=(0,l.Z)(e,An);v(t,hn.se.Edit),T(t,(0,r.Z)({mode:hn.se.View},n))}),[v,T]),E=(0,B.Z)((t=>{const{id:n,ignoreModifications:r,field:o,cellToFocusAfter:i="none"}=t;e.current.runPendingEditCellValueMutation(n);const a=()=>{"none"!==i&&o&&e.current.moveFocusToRelativeCell(n,o,i),P(n,null),T(n,null)};if(r)return void a();const l=(0,kn.bj)(e.current.state),u=e.current.getRow(n);if(Object.values(l[n]).some((e=>e.isProcessingProps)))return void(s.current[n].mode=hn.se.Edit);if(y(n))return s.current[n].mode=hn.se.Edit,void T(n,{mode:hn.se.Edit});const c=e.current.getRowWithUpdatedValuesFromRowEditing(n);if(d){const t=e=>{s.current[n].mode=hn.se.Edit,T(n,{mode:hn.se.Edit}),h&&h(e)};try{Promise.resolve(d(c,u,{rowId:n})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([c]),a()})),Z={getRowMode:M,startRowEditMode:R,stopRowEditMode:A},L={setRowEditingEditCellValue:o.useCallback((t=>{const{id:n,field:o,value:i,debounceMs:a,unstable_skipValueParser:s}=t;g(n,o);const u=e.current.getColumn(o),c=e.current.getRow(n);let d=i;u.valueParser&&!s&&(d=u.valueParser(i,c,u,e));let h=(0,kn.bj)(e.current.state),p=(0,r.Z)({},h[n][o],{value:d,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return u.preProcessEditCellProps||I(n,o,p),new Promise((t=>{const i=[];if(u.preProcessEditCellProps){const a=p.value!==h[n][o].value;p=(0,r.Z)({},p,{isProcessingProps:!0}),I(n,o,p);const s=h[n],f=(0,l.Z)(s,[o].map(st.Z)),m=Promise.resolve(u.preProcessEditCellProps({id:n,row:c,props:p,hasChanged:a,otherFieldsProps:f})).then((i=>{e.current.getRowMode(n)!==hn.se.View?(h=(0,kn.bj)(e.current.state),(i=(0,r.Z)({},i,{isProcessingProps:!1})).value=u.preProcessEditCellProps?h[n][o].value:d,I(n,o,i)):t(!1)}));i.push(m)}Object.entries(h[n]).forEach((a=>{let[s,u]=a;if(s===o)return;const d=e.current.getColumn(s);if(!d.preProcessEditCellProps)return;u=(0,r.Z)({},u,{isProcessingProps:!0}),I(n,s,u),h=(0,kn.bj)(e.current.state);const p=h[n],f=(0,l.Z)(p,[s].map(st.Z)),m=Promise.resolve(d.preProcessEditCellProps({id:n,row:c,props:u,hasChanged:!1,otherFieldsProps:f})).then((o=>{e.current.getRowMode(n)!==hn.se.View?(o=(0,r.Z)({},o,{isProcessingProps:!1}),I(n,s,o)):t(!1)}));i.push(m)})),Promise.all(i).then((()=>{e.current.getRowMode(n)===hn.se.Edit?(h=(0,kn.bj)(e.current.state),t(!h[n][o].error)):t(!1)}))}))}),[e,g,I]),getRowWithUpdatedValuesFromRowEditing:o.useCallback((t=>{const n=(0,kn.bj)(e.current.state),o=e.current.getRow(t);if(!n[t])return e.current.getRow(t);let i=(0,r.Z)({},o);return Object.entries(n[t]).forEach((t=>{let[n,r]=t;const o=e.current.getColumn(n);o.valueSetter?i=o.valueSetter(r.value,i,o,e):i[n]=r.value})),i}),[e])};(0,Ye.h)(e,Z,"public"),(0,Ye.h)(e,L,"private"),o.useEffect((()=>{p&&_(p)}),[p,_]),(0,Jt.Z)((()=>{const t=(0,Q.J4)(e),o=s.current;s.current=(0,Ke.I8)(n);const i=new Set([...Object.keys(n),...Object.keys(o)]);Array.from(i).forEach((i=>{var a;const s=n[i]??{mode:hn.se.View},l=(null===(a=o[i])||void 0===a?void 0:a.mode)||hn.se.View,u=t[i]?e.current.getRowId(t[i]):i;s.mode===hn.se.Edit&&l===hn.se.View?D((0,r.Z)({id:u},s)):s.mode===hn.se.View&&l===hn.se.Edit&&E((0,r.Z)({id:u},s))}))}),[e,n,D,E])})(e,t);const n=o.useRef({}),{isCellEditable:i}=t,a=o.useCallback((e=>!(0,J.I7)(e.rowNode)&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(!i||i(e))))),[i]);o.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((t=>{let[n,r]=t;Object.keys(r).forEach((t=>{const[r]=e[n][t];clearTimeout(r),delete e[n][t]}))}))}}),[]);const s=o.useCallback(((e,t)=>{if(n.current[e])if(t){if(n.current[e][t]){const[,r]=n.current[e][t];r()}}else Object.keys(n.current[e]).forEach((t=>{const[,r]=n.current[e][t];r()}))}),[]),u={isCellEditable:a,setEditCellValue:o.useCallback((r=>{const{id:o,field:i,debounceMs:a}=r;return new Promise((s=>{((e,t,r,o)=>{if(!r)return void o();if(n.current[e]||(n.current[e]={}),n.current[e][t]){const[r]=n.current[e][t];clearTimeout(r)}const i=setTimeout((()=>{o(),delete n.current[e][t]}),r);n.current[e][t]=[i,()=>{const[r]=n.current[e][t];clearTimeout(r),o(),delete n.current[e][t]}]})(o,i,a,(async()=>{const n=t.editMode===hn.r2.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,i)===hn.Vl.Edit){const e=await n(r);s(e)}}))}))}),[e,t.editMode]),getRowWithUpdatedValues:o.useCallback(((n,r)=>t.editMode===hn.r2.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(n,r):e.current.getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),unstable_getEditCellMeta:o.useCallback(((t,n)=>{var r;return(null===(r=(0,kn.bj)(e.current.state)[t])||void 0===r?void 0:r[n])??null}),[e])},c={runPendingEditCellValueMutation:s};(0,Ye.h)(e,u,"public"),(0,Ye.h)(e,c,"private")};var Ln=n(72353);const Fn=(e,t,n)=>{const o=!!t.unstable_dataSource;return n.current.caches.rows=(0,J.PO)({rows:o?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,r.Z)({},e,{rows:(0,J.IX)({apiRef:n,rowCountProp:t.rowCount,loadingProp:!!o||t.loading,previousTree:null,previousTreeDepths:null})})},jn=e=>"full"===e.updates.type?(e=>{const t={[J.U5]:(0,r.Z)({},(0,J.E2)(),{children:e})};for(let n=0;n{let{previousTree:t,actions:n}=e;const o=(0,r.Z)({},t),i={};for(let e=0;e!i[e]))),o[J.U5]=(0,r.Z)({},a,{children:s}),{groupingName:lt,tree:o,treeDepths:{0:s.length},dataRowIds:s}})({previousTree:e.previousTree,actions:e.updates.actions});class Nn extends Error{}const zn=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],Bn=(e,t)=>(0,r.Z)({},e,{rowSelection:t.rowSelection?zn(t.rowSelectionModel)??[]:[]}),Vn=(e,t)=>{var n,i,a,s,l,u,c;const d=pt(e,"useGridSelection"),h=o.useCallback((e=>function(){for(var n=arguments.length,r=new Array(n),o=0;ozn(t.rowSelectionModel,(0,He.Y1)(e.current.state))),[e,t.rowSelectionModel]),m=o.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:f,propOnChange:t.onRowSelectionModelChange,stateSelector:He.Y1,changeEvent:"rowSelectionChange"});const{checkboxSelection:y,disableRowSelectionOnClick:b,isRowSelectable:x}=t,w=(0,Ve.Hs)(t),S=(0,v.Pp)(e,Q.Kd),C=(0,v.Pp)(e,Q.Lq)>1,k=o.useCallback((t=>{let n=t;const r=m.current??t,o=e.current.isRowSelected(t);if(o){const t=(0,X.zn)(e),o=t.findIndex((e=>e===r)),i=t.findIndex((e=>e===n));if(o===i)return;n=o>i?t[i+1]:t[i-1]}m.current=t,e.current.selectRowRange({startId:r,endId:n},!o)}),[e]),M=o.useCallback((n=>{if(t.signature===V.cG.DataGrid&&!w&&Array.isArray(n)&&n.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));(0,He.Y1)(e.current.state)!==n&&(d.debug("Setting selection model"),e.current.setState((e=>(0,r.Z)({},e,{rowSelection:t.rowSelection?n:[]}))),e.current.forceUpdate())}),[e,d,t.rowSelection,t.signature,w]),_=o.useCallback((t=>(0,He.Y1)(e.current.state).includes(t)),[e]),T=o.useCallback((n=>{if(!1===t.rowSelection)return!1;if(x&&!x(e.current.getRowParams(n)))return!1;const r=(0,Q.Kd)(e)[n];return"footer"!==(null==r?void 0:r.type)&&"pinnedRow"!==(null==r?void 0:r.type)}),[e,t.rowSelection,x]),P=o.useCallback((()=>(0,He.bR)(e)),[e]),I=o.useCallback((function(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.current.isRowSelectable(n))if(m.current=n,o){d.debug(`Setting selection for row ${n}`);const o=[],s=e=>{o.push(e)};var i,a;if(r)if(s(n),p)(0,Ve.SJ)(e,S,n,(null===(i=t.rowSelectionPropagation)||void 0===i?void 0:i.descendants)??!1,(null===(a=t.rowSelectionPropagation)||void 0===a?void 0:a.parents)??!1,s);e.current.setRowSelectionModel(o)}else{d.debug(`Toggling selection for row ${n}`);const o=(0,He.Y1)(e.current.state),i=new Set(o);i.delete(n);const a=e=>{i.add(e)},h=e=>{i.delete(e)};var s,l;if(r){if(a(n),p)(0,Ve.SJ)(e,S,n,(null===(s=t.rowSelectionPropagation)||void 0===s?void 0:s.descendants)??!1,(null===(l=t.rowSelectionPropagation)||void 0===l?void 0:l.parents)??!1,a)}else if(p){var u,c;(0,Ve.HR)(e,S,n,(null===(u=t.rowSelectionPropagation)||void 0===u?void 0:u.descendants)??!1,(null===(c=t.rowSelectionPropagation)||void 0===c?void 0:c.parents)??!1,h)}(i.size<2||w)&&e.current.setRowSelectionModel(Array.from(i))}}),[e,d,p,S,null===(a=t.rowSelectionPropagation)||void 0===a?void 0:a.descendants,null===(s=t.rowSelectionPropagation)||void 0===s?void 0:s.parents,w]),R=o.useCallback((function(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d.debug("Setting selection for several rows");const i=n.filter((t=>e.current.isRowSelectable(t)));let a;if(o){if(r){if(a=new Set(i),p){const n=e=>{a.add(e)};i.forEach((r=>{var o,i;(0,Ve.SJ)(e,S,r,(null===(o=t.rowSelectionPropagation)||void 0===o?void 0:o.descendants)??!1,(null===(i=t.rowSelectionPropagation)||void 0===i?void 0:i.parents)??!1,n)}))}}else a=new Set;const n=(0,He.z8)(e);if(a.size===Object.keys(n).length&&Array.from(a).every((e=>n[e]===e)))return}else{a=new Set(Object.values((0,He.z8)(e)));const n=e=>{a.add(e)},o=e=>{a.delete(e)};i.forEach((i=>{var s,l,u,c;r?(a.add(i),p&&(0,Ve.SJ)(e,S,i,(null===(s=t.rowSelectionPropagation)||void 0===s?void 0:s.descendants)??!1,(null===(l=t.rowSelectionPropagation)||void 0===l?void 0:l.parents)??!1,n)):(o(i),p&&(0,Ve.HR)(e,S,i,(null===(u=t.rowSelectionPropagation)||void 0===u?void 0:u.descendants)??!1,(null===(c=t.rowSelectionPropagation)||void 0===c?void 0:c.parents)??!1,o))}))}(a.size<2||w)&&e.current.setRowSelectionModel(Array.from(a))}),[d,p,w,e,S,null===(l=t.rowSelectionPropagation)||void 0===l?void 0:l.descendants,null===(u=t.rowSelectionPropagation)||void 0===u?void 0:u.parents]),D=o.useCallback((function(t){let{startId:n,endId:r}=t,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e.current.getRow(n)||!e.current.getRow(r))return;d.debug(`Expanding selection from row ${n} to row ${r}`);const a=(0,X.zn)(e),s=a.indexOf(n),l=a.indexOf(r),[u,c]=s>l?[l,s]:[s,l],h=a.slice(u,c+1);e.current.selectRows(h,o,i)}),[e,d]),O={selectRow:I,setRowSelectionModel:M,getSelectedRows:P,isRowSelected:_,isRowSelectable:T},A={selectRows:R,selectRowRange:D};(0,Ye.h)(e,O,"public"),(0,Ye.h)(e,A,t.signature===V.cG.DataGrid?"private":"public");const E=o.useCallback((function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var o;const i=(0,He.Y1)(e.current.state),a=(0,Q.J4)(e),s=(0,X._g)(e),l=(0,r.Z)({},(0,He.z8)(e));let u=!1;i.forEach((e=>{var n;if((e=>"server"===t.filterMode?!a[e]:!a[e]||!1===s[e])(e)){if(t.keepNonExistentRowsSelected)return;return delete l[e],void(u=!0)}if(!(null===(n=t.rowSelectionPropagation)||void 0===n?void 0:n.parents))return;const r=S[e];if("group"===r.type){if(r.isAutoGenerated)return delete l[e],void(u=!0);r.children.every((e=>!1===s[e]))||(delete l[e],u=!0)}}));const c=C&&(null===(o=t.rowSelectionPropagation)||void 0===o?void 0:o.parents)&&Object.keys(l).length>0;if(u||c&&!n){const t=Object.values(l);c?e.current.selectRows(t,!0,!0):e.current.setRowSelectionModel(t)}}),[e,C,null===(c=t.rowSelectionPropagation)||void 0===c?void 0:c.parents,t.keepNonExistentRowsSelected,t.filterMode,S]),Z=o.useCallback(((t,n)=>{const r=n.metaKey||n.ctrlKey,o=!y&&!r&&!(e=>!!e.key)(n),i=!w||o,a=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!a,!0):e.current.selectRow(t,!a,!1)}),[e,w,y]),L=o.useCallback(((t,n)=>{var r;if(b)return;const o=null===(r=n.target.closest(`.${g._.cell}`))||void 0===r?void 0:r.getAttribute("data-field");if(o===mt.n.field)return;if(o===dn.u9)return;if(o){const t=e.current.getColumn(o);if((null==t?void 0:t.type)===Dn.W)return}"pinnedRow"!==(0,Q.Kd)(e)[t.id].type&&(n.shiftKey&&w?k(t.id):Z(t.id,n))}),[b,w,e,k,Z]),F=o.useCallback(((e,t)=>{var n;w&&t.shiftKey&&(null===(n=window.getSelection())||void 0===n||n.removeAllRanges())}),[w]),j=o.useCallback(((t,n)=>{w&&n.nativeEvent.shiftKey?k(t.id):e.current.selectRow(t.id,t.value,!w)}),[e,k,w]),N=o.useCallback((n=>{const r=t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?(0,qt.Yp)(e):(0,X.zn)(e);e.current.selectRows(r,n.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),z=o.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==hn.Vl.Edit&&!(0,fn.q_)(n)){if(wt(n.key)&&n.shiftKey){const r=(0,ie.TR)(e);if(r&&r.id!==t.id){n.preventDefault();const o=e.current.isRowSelected(r.id);if(!w)return void e.current.selectRow(r.id,!o,!0);const i=e.current.getRowIndexRelativeToVisibleRows(r.id),a=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;i>a?o?(s=a,l=i-1):(s=a,l=i):o?(s=i+1,l=a):(s=i,l=a);const u=(0,un.j)(e).rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(u,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void Z(t.id,n);"A"===String.fromCharCode(n.keyCode)&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),R(e.current.getAllRowIds(),!0))}}),[e,Z,R,w]);(0,V.zn)(e,"sortedRowsSet",h((()=>E(!0)))),(0,V.zn)(e,"filteredRowsSet",h(E)),(0,V.zn)(e,"rowClick",h(L)),(0,V.zn)(e,"rowSelectionCheckboxChange",h(j)),(0,V.zn)(e,"headerSelectionCheckboxChange",N),(0,V.zn)(e,"cellMouseDown",h(F)),(0,V.zn)(e,"cellKeyDown",h(z)),o.useEffect((()=>{void 0!==f&&e.current.setRowSelectionModel(f)}),[e,f,t.rowSelection]),o.useEffect((()=>{t.rowSelection||e.current.setRowSelectionModel([])}),[e,t.rowSelection]);const B=null!=f;o.useEffect((()=>{if(B||!t.rowSelection)return;const n=(0,He.Y1)(e.current.state);if(T){const t=n.filter((e=>T(e)));t.length{if(!t.rowSelection||B)return;const n=(0,He.Y1)(e.current.state);!w&&n.length>1&&e.current.setRowSelectionModel([])}),[e,w,y,B,t.rowSelection]),o.useEffect((()=>{h(E)}),[E,h])},Hn=(e,t)=>{const n=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,d.Z)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},g.d,t)),[t])})({classes:t.classes}),i=o.useCallback((o=>{const i=(0,r.Z)({},mt.n,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,s=null!=o.lookup[mt.e];return a&&!s?(o.lookup[mt.e]=i,o.orderedFields=[mt.e,...o.orderedFields]):!a&&s?(delete o.lookup[mt.e],o.orderedFields=o.orderedFields.filter((e=>e!==mt.e))):a&&s&&(o.lookup[mt.e]=(0,r.Z)({},i,o.lookup[mt.e])),o}),[e,n,t.checkboxSelection]);Pt(e,"hydrateColumns",i)};var $n=n(38220);const Wn=(e,t)=>{var n,o;const i=t.sortModel??(null===(o=t.initialState)||void 0===o||null===(n=o.sorting)||void 0===n?void 0:n.sortModel)??[];return(0,r.Z)({},e,{sorting:{sortModel:(0,$n.Te)(i,t.disableMultipleColumnsSorting),sortedRows:[]}})};function Gn(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;return r>t?o:i-t>n?i-t:o{const o=Qn,i=(0,T.CD)(n);return(0,r.Z)({},e,{dimensions:(0,r.Z)({},o,rr(t,n,i,(0,O.s3)(n)))})},er=(0,W.P1)(O.FE,O.Ag,((e,t)=>{const n=e.length;return 0===n?0:(0,Kn.T)(t[n-1]+e[n-1].computedWidth,1)}));function tr(e,t){const n=pt(e,"useResizeContainer"),i=o.useRef(!1),a=o.useRef(Xn),s=(0,v.Pp)(e,O.s3),l=(0,v.Pp)(e,T.CD),u=(0,v.Pp)(e,er),c=o.useRef(!0),{rowHeight:d,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,headersTotalHeight:m,leftPinnedWidth:g,rightPinnedWidth:y}=rr(t,e,l,s),b=o.useRef(void 0),x=o.useCallback((()=>(0,z.jY)(e.current.state)),[e]),w=o.useCallback((t=>{e.current.setState((e=>(0,r.Z)({},e,{dimensions:t}))),e.current.rootElementRef.current&&nr(e.current.rootElementRef.current,(0,z.jY)(e.current.state))}),[e]),S=o.useCallback((()=>{const t=e.current.mainElementRef.current;if(!t)return;const n=(0,Un.Z)(t).getComputedStyle(t),r={width:parseFloat(n.width)||0,height:parseFloat(n.height)||0};b.current&&ir(b.current,r)||(e.current.publishEvent("resize",r),b.current=r)}),[e]),C=o.useCallback((()=>{const n=(0,z.jY)(e.current.state);if(!n.isReady)return 0;const r=(0,un.j)(e);if(t.getRowHeight){const t=(0,_e.r8)(e),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,r.rows.length)}const o=Math.floor(n.viewportInnerSize.height/d);return Math.min(o,r.rows.length)}),[e,t.getRowHeight,d]),k=o.useCallback((()=>{var n,r;if(c.current)return;const o=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const n=or.get(e);if(void 0!==n)return n;const r=(0,Ut.Z)(e).createElement("div");r.style.width="99px",r.style.height="99px",r.style.position="absolute",r.style.overflow="scroll",r.className="scrollDiv",e.appendChild(r);const o=r.offsetWidth-r.clientWidth;return e.removeChild(r),or.set(e,o),o}(e.current.mainElementRef.current,t.scrollbarSize),i=(0,Me.k)(e.current.state),s=m+i.pinnedTopRowsTotalHeight,l=i.pinnedBottomRowsTotalHeight,v={width:u-g-y,height:(0,Kn.T)(i.currentPageTotalHeight,1)};let b,x,S=!1,C=!1;if(t.autoHeight)C=!1,S=Math.round(u)>Math.round(a.current.width),b={width:a.current.width,height:s+l+v.height},x={width:Math.max(0,b.width-(C?o:0)),height:Math.max(0,b.height-(S?o:0))};else{b={width:a.current.width,height:a.current.height},x={width:Math.max(0,b.width-g-y),height:Math.max(0,b.height-s-l)};const e=v,t=x,n=e.width>t.width,r=e.height>t.height;(n||r)&&(C=r,S=e.width+(C?o:0)>t.width,S&&(C=e.height+o>t.height)),C&&(x.width-=o),S&&(x.height-=o)}const k=Math.max(b.width,u+(C?o:0)),M={width:u,height:s+v.height+l},_={isReady:!0,root:a.current,viewportOuterSize:b,viewportInnerSize:x,contentSize:v,minimumSize:M,hasScrollX:S,hasScrollY:C,scrollbarSize:o,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,rowWidth:k,rowHeight:d,columnsTotalWidth:u,leftPinnedWidth:g,rightPinnedWidth:y,headersTotalHeight:m,topContainerHeight:s,bottomContainerHeight:l},T=e.current.state.dimensions;(0,Ke.xb)(T,_)||(w(_),ir(_.viewportInnerSize,T.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",_.viewportInnerSize),null===(n=(r=e.current).updateRenderContext)||void 0===n||n.call(r))}),[e,w,t.scrollbarSize,t.autoHeight,d,h,p,f,u,m,g,y]),M=(0,B.Z)(k),_=o.useMemo((()=>t.resizeThrottleMs>0?function(e){let t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;const o=()=>{t=void 0,e(...n)};function i(){for(var e=arguments.length,i=new Array(e),a=0;a{clearTimeout(t),t=void 0},i}((()=>{M(),e.current.publishEvent("debouncedResize",a.current)}),t.resizeThrottleMs):void 0),[e,t.resizeThrottleMs,M]);o.useEffect((()=>null==_?void 0:_.clear),[_]);const P={resize:S,getRootDimensions:x},I={updateDimensions:k,getViewportPageSize:C};(0,Jt.Z)(k,[k]),(0,Ye.h)(e,P,"public"),(0,Ye.h)(e,I,"private");const R=o.useCallback((t=>{nr(t,(0,z.jY)(e.current.state))}),[e]),D=o.useCallback((e=>{if(a.current=e,0!==e.height||i.current||t.autoHeight||Yn.P||(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),i.current=!0),0!==e.width||i.current||Yn.P||(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),i.current=!0),c.current||!_)return c.current=!1,void k();_()}),[k,t.autoHeight,_,n]);(0,V.x3)(e,"rootMount",R),(0,V.x3)(e,"resize",D),(0,V.x3)(e,"debouncedResize",t.onResize)}function nr(e,t){const n=(t,n)=>e.style.setProperty(t,n);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function rr(e,t,n,r){const o=(0,J.qJ)(e.rowHeight,qn.rowHeight,J.bm);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:er(t),headersTotalHeight:(0,$.Jb)(t,e),leftPinnedWidth:r.left.reduce(((e,t)=>e+t.computedWidth),0),rightPinnedWidth:r.right.reduce(((e,t)=>e+t.computedWidth),0)}}const or=new WeakMap;function ir(e,t){return e.width===t.width&&e.height===t.height}const ar=void 0!==globalThis.ResizeObserver?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}};var sr=n(24392);const lr=(e,t,n)=>{n.current.caches.rowsMeta={heights:new Map};const o=(0,z.E$)(n.current.state),i=(0,Q.hh)(n),a=(0,qt.fL)(n.current.state),s=Math.min(a.enabled?a.paginationModel.pageSize:i,i);return(0,r.Z)({},e,{rowsMeta:{currentPageTotalHeight:s*o,positions:Array.from({length:s},((e,t)=>t*o)),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function ur(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,u=s[r],c=t.current.getRow(o),d=t.current.getRowValue(c,u),h="function"==typeof u.colSpan?u.colSpan(d,c,u,t):u.colSpan;if(!h||1===h)return cr(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let p=u.computedWidth;for(let e=1;e=i&&t{if(dr(e)){if(void 0!==n[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:r,children:o}=e;o.forEach((e=>{hr(e,[...t,r],n)}))},pr=e=>{if(!e)return{};const t={};return e.forEach((e=>{hr(e,[],t)})),t},fr=(e,t,n)=>{const r=e=>t[e]??[],o=[],i=Math.max(...e.map((e=>r(e).length))),a=(e,t,n)=>(0,Ke.xb)(r(e).slice(0,n+1),r(t).slice(0,n+1));for(let t=0;t{const i=r(o)[t]??null;if(0===e.length)return[{columnFields:[o],groupId:i}];const s=e[e.length-1],l=s.columnFields[s.columnFields.length-1];return s.groupId!==i||!a(l,o,t)||(u=l,c=o,(null==n?void 0:n.left)&&n.left.includes(u)&&!n.left.includes(c)||(null==n?void 0:n.right)&&!n.right.includes(u)&&n.right.includes(c))?[...e,{columnFields:[o],groupId:i}]:[...e.slice(0,e.length-1),{columnFields:[...s.columnFields,o],groupId:i}];var u,c}),[]);o.push(i)}return o},mr=["groupId","children"],gr=e=>{let t={};return e.forEach((e=>{if(dr(e))return;const{groupId:n,children:o}=e,i=(0,l.Z)(e,mr);if(!n)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=(0,r.Z)({},i,{groupId:n}),s=gr(o);if(void 0!==s[n]||void 0!==t[n])throw new Error(`MUI X: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=(0,r.Z)({},t,s,{[n]:a})})),(0,r.Z)({},t)},vr=(e,t,n)=>{if(!t.columnGroupingModel)return e;const o=(0,O.Zi)(n),i=(0,O.pK)(n),a=gr(t.columnGroupingModel??[]),s=pr(t.columnGroupingModel??[]),l=fr(o,s,n.current.state.pinnedColumns??{}),u=0===i.length?0:Math.max(...i.map((e=>{var t;return(null===(t=s[e])||void 0===t?void 0:t.length)??0})));return(0,r.Z)({},e,{columnGrouping:{lookup:a,unwrappedGroupingModel:s,headerStructure:l,maxDepth:u}})};var yr=n(70334);const br={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0};function xr(e,t){if(void 0!==t&&e.changedTouches){for(let n=0;n(0,_e.IC)(e),r=(0,v.Pp)(e,n);o.useEffect((()=>{t.current&&!1===r&&(t.current.resolve(),t.current=void 0)}));return()=>{if(!t.current){if(!1===n())return Promise.resolve();t.current=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}()}return t.current}}function kr(e,t,n){const r={},o=e.current.rootElementRef.current;return o.classList.add(g._.autosizing),n.forEach((n=>{const o=(0,fn.m5)(e.current,n.field).map((e=>e.getBoundingClientRect().width??0)),i=t.includeOutliers?o:function(e,t){if(e.length<4)return e;const n=e.slice();n.sort(((e,t)=>e-t));const r=n[Math.floor(.25*n.length)],o=n[Math.floor(.75*n.length)-1],i=o-r,a=i<5?5:i*t;return n.filter((e=>e>r-a&&e(0,r.Z)({},e,{columnResize:{resizingColumnField:""}});function _r(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const Tr=(e,t)=>{const n=(0,qe.V)(),i=pt(e,"useGridColumnResize"),a=(0,en.Z)(_r).current,s=o.useRef(null),l=o.useRef(null),u=(0,H.Z)(),c=o.useRef(void 0),d=t=>{i.debug(`Updating width to ${t} for col ${a.colDef.field}`);const n=a.columnHeaderElement.offsetWidth,r=t-n,o=t-a.initialColWidth;if(o>0){var s,l;const t=a.initialTotalWidth+o;null===(l=e.current.rootElementRef)||void 0===l||null===(s=l.current)||void 0===s||s.style.setProperty("--DataGrid-rowWidth",`${t}px`)}a.colDef.computedWidth=t,a.colDef.width=t,a.colDef.flex=0,a.columnHeaderElement.style.width=`${t}px`;const u=a.headerFilterElement;u&&(u.style.width=`${t}px`),a.groupHeaderElements.forEach((e=>{const n=e;let o;o="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+r}px`,n.style.width=o})),a.cellElements.forEach((e=>{const n=e;let o;o="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+r}px`,n.style.setProperty("--width",o)}));const c=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,a.colDef.field);c===Rt.I.LEFT&&(Pr(a.fillerLeft,"width",r),a.leftPinnedCellsAfter.forEach((e=>{Pr(e,"left",r)})),a.leftPinnedHeadersAfter.forEach((e=>{Pr(e,"left",r)}))),c===Rt.I.RIGHT&&(Pr(a.fillerRight,"width",r),a.rightPinnedCellsBefore.forEach((e=>{Pr(e,"right",r)})),a.rightPinnedHeadersBefore.forEach((e=>{Pr(e,"right",r)})))},h=t=>{if(x(),a.previousMouseClickEvent){const n=a.previousMouseClickEvent,r=n.timeStamp,o=n.clientX,i=n.clientY;if(t.timeStamp-r<300&&t.clientX===o&&t.clientY===i)return a.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(a.colDef){e.current.setColumnWidth(a.colDef.field,a.colDef.width),i.debug(`Updating col ${a.colDef.field} with new width: ${a.colDef.width}`);const t=(0,O.wH)(e.current.state);a.groupHeaderElements.forEach((e=>{const n=e,r=`${(0,fn.R2)(e).reduce(((e,n)=>!1!==t.columnVisibilityModel[n]?e+t.lookup[n].computedWidth:e),0)}px`;n.style.width=r}))}u.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},p=(t,r,o)=>{var i;const u=e.current.rootElementRef.current;a.initialColWidth=t.computedWidth,a.initialTotalWidth=e.current.getRootDimensions().rowWidth,a.colDef=t,a.columnHeaderElement=(0,fn.K5)(e.current.columnHeadersContainerRef.current,t.field);const c=u.querySelector(`.${g._.headerFilterRow} [data-field="${(0,fn.z6)(t.field)}"]`);c&&(a.headerFilterElement=c),a.groupHeaderElements=(0,fn.Y$)(null===(i=e.current.columnHeadersContainerRef)||void 0===i?void 0:i.current,t.field),a.cellElements=(0,fn.oF)(a.columnHeaderElement,e.current),a.fillerLeft=(0,fn.mi)(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),a.fillerRight=(0,fn.mi)(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const d=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,a.colDef.field);a.leftPinnedCellsAfter=d!==Rt.I.LEFT?[]:(0,fn.z$)(e.current,a.columnHeaderElement,n),a.rightPinnedCellsBefore=d!==Rt.I.RIGHT?[]:(0,fn.JF)(e.current,a.columnHeaderElement,n),a.leftPinnedHeadersAfter=d!==Rt.I.LEFT?[]:(0,fn.bp)(e.current,a.columnHeaderElement,n),a.rightPinnedHeadersBefore=d!==Rt.I.RIGHT?[]:(0,fn.a9)(e.current,a.columnHeaderElement,n),l.current=function(e,t){const n=e.classList.contains(g._["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(n):n}(r,n),s.current=function(e,t,n){return"Left"===n?e-t.left:t.right-e}(o,a.columnHeaderElement.getBoundingClientRect(),l.current)},f=(0,B.Z)(h),m=(0,B.Z)((t=>{if(0===t.buttons)return void f(t);let n=wr(s.current,t.clientX,a.columnHeaderElement.getBoundingClientRect(),l.current);n=(0,Ke.uZ)(n,a.colDef.minWidth,a.colDef.maxWidth),d(n);const r={element:a.columnHeaderElement,colDef:a.colDef,width:n};e.current.publishEvent("columnResize",r,t)})),v=(0,B.Z)((e=>{xr(e,c.current)&&h(e)})),y=(0,B.Z)((t=>{const n=xr(t,c.current);if(!n)return;if("mousemove"===t.type&&0===t.buttons)return void v(t);let r=wr(s.current,n.x,a.columnHeaderElement.getBoundingClientRect(),l.current);r=(0,Ke.uZ)(r,a.colDef.minWidth,a.colDef.maxWidth),d(r);const o={element:a.columnHeaderElement,colDef:a.colDef,width:r};e.current.publishEvent("columnResize",o,t)})),b=(0,B.Z)((t=>{const n=(0,fn.w5)(t.target,g._["columnSeparator--resizable"]);if(!n)return;const r=t.changedTouches[0];null!=r&&(c.current=r.identifier);const o=(0,fn.w5)(t.target,g._.columnHeader),a=(0,fn.WI)(o),s=e.current.getColumn(a);i.debug(`Start Resize on col ${s.field}`),e.current.publishEvent("columnResizeStart",{field:a},t),p(s,n,r.clientX);const l=(0,Ut.Z)(t.currentTarget);l.addEventListener("touchmove",y),l.addEventListener("touchend",v)})),x=o.useCallback((()=>{const t=(0,Ut.Z)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",m),t.removeEventListener("mouseup",f),t.removeEventListener("touchmove",y),t.removeEventListener("touchend",v),setTimeout((()=>{t.removeEventListener("click",Sr,!0)}),100),a.columnHeaderElement&&(a.columnHeaderElement.style.pointerEvents="unset")}),[e,a,m,f,y,v]),w=o.useCallback((t=>{let{field:n}=t;e.current.setState((e=>(0,r.Z)({},e,{columnResize:(0,r.Z)({},e.columnResize,{resizingColumnField:n})}))),e.current.forceUpdate()}),[e]),S=o.useCallback((()=>{e.current.setState((e=>(0,r.Z)({},e,{columnResize:(0,r.Z)({},e.columnResize,{resizingColumnField:""})}))),e.current.forceUpdate()}),[e]),C=(0,B.Z)(((t,n)=>{let{colDef:r}=t;if(0!==n.button)return;if(!n.currentTarget.classList.contains(g._["columnSeparator--resizable"]))return;n.preventDefault(),i.debug(`Start Resize on col ${r.field}`),e.current.publishEvent("columnResizeStart",{field:r.field},n),p(r,n.currentTarget,n.clientX);const o=(0,Ut.Z)(e.current.rootElementRef.current);o.body.style.cursor="col-resize",a.previousMouseClickEvent=n.nativeEvent,o.addEventListener("mousemove",m),o.addEventListener("mouseup",f),o.addEventListener("click",Sr,!0)})),k=(0,B.Z)(((n,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const i=e.current.state.columns.lookup[n.field];!1!==i.resizable&&e.current.autosizeColumns((0,r.Z)({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[i.field]}))})),M=Cr(e),_=o.useRef(!1),T=o.useCallback((async n=>{var o;if(!(null===(o=e.current.rootElementRef)||void 0===o?void 0:o.current))return;if(_.current)return;_.current=!0;const i=(0,O.wH)(e.current.state),a=(0,r.Z)({},br,n,{columns:(null==n?void 0:n.columns)??i.orderedFields});a.columns=a.columns.filter((e=>!1!==i.columnVisibilityModel[e]));const s=a.columns.map((t=>e.current.state.columns.lookup[t]));try{!t.disableVirtualization&&a.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await M());const n=kr(e,a,s),o=s.map((e=>(0,r.Z)({},e,{width:n[e.field],computedWidth:n[e.field],flex:0})));if(a.expand){const t=i.orderedFields.map((e=>i.lookup[e])).filter((e=>!1!==i.columnVisibilityModel[e.field])).reduce(((e,t)=>e+(n[t.field]??t.computedWidth??t.width)),0),r=e.current.getRootDimensions(),a=r.viewportInnerSize.width-t;if(a>0){const e=a/(o.length||1);o.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}e.current.updateColumns(o),o.forEach(((t,n)=>{if(t.width!==s[n].width){const n=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:n})}}))}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),_.current=!1}}),[e,M,t.disableVirtualization]);o.useEffect((()=>x),[x]),(0,Re.Z)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),ft(e,(()=>{var t;return null===(t=e.current.columnHeadersContainerRef)||void 0===t?void 0:t.current}),"touchstart",b,{passive:!0}),(0,Ye.h)(e,{autosizeColumns:T},"public"),(0,V.zn)(e,"columnResizeStop",S),(0,V.zn)(e,"columnResizeStart",w),(0,V.zn)(e,"columnSeparatorMouseDown",C),(0,V.zn)(e,"columnSeparatorDoubleClick",k),(0,V.x3)(e,"columnResize",t.onColumnResize),(0,V.x3)(e,"columnWidthChange",t.onColumnWidthChange)};function Pr(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function Ir(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const Rr=(e,t,n)=>{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},Dr={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Or={firstRowIndex:0,lastRowIndex:0},Ar=new Set([mt.e,"__reorder__",dn.u9]),Er=(e,t,n,o,i,a,s)=>{const l=a?{}:(0,r.Z)({},e.current.state.rowSpanning.spannedCells),u=a?{}:(0,r.Z)({},e.current.state.rowSpanning.hiddenCells),c=a?{}:(0,r.Z)({},e.current.state.rowSpanning.hiddenCellOriginMap);return a&&(s=Or),t.forEach((t=>{if(!Ar.has(t.field)){for(let a=i.firstRowIndex;a=o.firstRowIndex&&i&&Rr(i.model,t,e)===d;){const e=n[r+1];u[e.id]?u[e.id][t.field]=!0:u[e.id]={[t.field]:!0},m.push(a),f+=1,h=i.id,p=r,r-=1,i=n[r]}}m.forEach((e=>{c[e]?c[e][t.field]=p:c[e]={[t.field]:p}}));let g=a+1;for(;g<=o.lastRowIndex&&n[g]&&Rr(n[g].model,t,e)===d;){const e=n[g];u[e.id]?u[e.id][t.field]=!0:u[e.id]={[t.field]:!0},c[g]?c[g][t.field]=p:c[g]={[t.field]:p},g+=1,f+=1}f>0&&(l[h]?l[h][t.field]=f+1:l[h]={[t.field]:f+1})}s={firstRowIndex:Math.min(s.firstRowIndex,i.firstRowIndex),lastRowIndex:Math.max(s.lastRowIndex,i.lastRowIndex)}}})),{spannedCells:l,hiddenCells:u,hiddenCellOriginMap:c,processedRange:s}},Zr=(e,t)=>{const n=(0,Q.yM)(t).length;if(e.pagination){const e=(0,qt.B_)(t);let r=20;return e>0&&(r=e-1),{firstRowIndex:0,lastRowIndex:Math.min(r,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,n)}},Lr=(e,t,n)=>{var o;if(!t.unstable_rowSpanning)return(0,r.Z)({},e,{rowSpanning:Dr});const i=e.rows.dataRowIds||[],a=e.columns.orderedFields||[],s=e.rows.dataRowIdToModelLookup,l=e.columns.lookup,u=Boolean(e.filter.filterModel.items.length)||Boolean(null===(o=e.filter.filterModel.quickFilterValues)||void 0===o?void 0:o.length);if(!i.length||!a.length||!s||!l||u)return(0,r.Z)({},e,{rowSpanning:Dr});const c=Zr(t,n),d=i.map((e=>({id:e,model:s[e]}))),h=a.map((e=>l[e])),{spannedCells:p,hiddenCells:f,hiddenCellOriginMap:m}=Er(n,h,d,c,c,!0,Or);return(0,r.Z)({},e,{rowSpanning:{spannedCells:p,hiddenCells:f,hiddenCellOriginMap:m}})};new Set;const Fr=(e,t,n)=>(0,r.Z)({},e,{listViewColumn:t.unstable_listColumn?(0,r.Z)({},t.unstable_listColumn,{computedWidth:jr(n)}):void 0});function jr(e){return(0,z.jY)(e.current.state).viewportInnerSize.width}const Nr=(e,t)=>{const n=dt(e,t);return Hn(n,t),(e=>{nn(e,lt,"rowTreeCreation",jn)})(n),ht(ct,n,t),ht(Bn,n,t),ht(Dt,n,t),ht(Fn,n,t),ht(wn,n,t),ht(En,n,t),ht(cn,n,t),ht(Wn,n,t),ht(Cn,n,t),ht(on,n,t),ht(Lr,n,t),ht(At,n,t),ht(Mr,n,t),ht(_t,n,t),ht(vr,n,t),ht(yr.Nn,n,t),ht(Jn,n,t),ht(lr,n,t),ht(Fr,n,t),xn(n,t),Vn(n,t),function(e,t){var n,i;const a=pt(e,"useGridColumns"),s=o.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:O.g0,changeEvent:"columnVisibilityModelChange"});const l=o.useCallback((t=>{var n,r;a.debug("Updating columns state."),e.current.setState(Ot(t)),e.current.publishEvent("columnsChange",t.orderedFields),null===(n=(r=e.current).updateRenderContext)||void 0===n||n.call(r),e.current.forceUpdate()}),[a,e]),u=o.useCallback((t=>(0,O.WH)(e)[t]),[e]),c=o.useCallback((()=>(0,O.d$)(e)),[e]),d=o.useCallback((()=>(0,O.FE)(e)),[e]),h=o.useCallback((function(t){return(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?(0,O.d$)(e):(0,O.FE)(e)).findIndex((e=>e.field===t))}),[e]),p=o.useCallback((t=>{const n=h(t);return(0,O.Ag)(e)[n]}),[e,h]),f=o.useCallback((t=>{var n,o;(0,O.g0)(e)!==t&&(e.current.setState((n=>(0,r.Z)({},n,{columns:(0,$.QC)({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),null===(n=(o=e.current).updateRenderContext)||void 0===n||n.call(o),e.current.forceUpdate())}),[e]),m=o.useCallback((t=>{const n=(0,$.QC)({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1});l(n)}),[e,l]),g=o.useCallback(((t,n)=>{const o=(0,O.g0)(e);if(n!==(o[t]??!0)){const i=(0,r.Z)({},o,{[t]:n});e.current.setColumnVisibilityModel(i)}}),[e]),v=o.useCallback((t=>(0,O.Zi)(e).findIndex((e=>e===t))),[e]),y=o.useCallback(((t,n)=>{const o=(0,O.Zi)(e),i=v(t);if(i===n)return;a.debug(`Moving column ${t} to index ${n}`);const s=[...o],u=s.splice(i,1)[0];s.splice(n,0,u),l((0,r.Z)({},(0,O.wH)(e.current.state),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)}),[e,a,l,v]),b=o.useCallback(((t,n)=>{a.debug(`Updating column ${t} width to ${n}`);const o=(0,O.wH)(e.current.state),i=o.lookup[t],s=(0,r.Z)({},i,{width:n,hasBeenResized:!0});l((0,$.eH)((0,r.Z)({},o,{lookup:(0,r.Z)({},o.lookup,{[t]:s})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:s,width:n})}),[e,a,l]),x={getColumn:u,getAllColumns:c,getColumnIndex:h,getColumnPosition:p,getVisibleColumns:d,getColumnIndexRelativeToVisibleColumns:v,updateColumns:m,setColumnVisibilityModel:f,setColumnVisibility:g,setColumnWidth:b},w={setColumnIndex:y};(0,Ye.h)(e,x,"public"),(0,Ye.h)(e,w,t.signature===V.cG.DataGrid?"private":"public");const S=o.useCallback(((n,o)=>{var i,a;const s={},l=(0,O.g0)(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys((null===(a=t.initialState)||void 0===a||null===(i=a.columns)||void 0===i?void 0:i.columnVisibilityModel)??{}).length>0||Object.keys(l).length>0)&&(s.columnVisibilityModel=l),s.orderedFields=(0,O.Zi)(e);const u=(0,O.d$)(e),c={};return u.forEach((e=>{if(e.hasBeenResized){const t={};$.VU.forEach((n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r})),c[e.field]=t}})),Object.keys(c).length>0&&(s.dimensions=c),(0,r.Z)({},n,{columns:s})}),[e,t.columnVisibilityModel,null===(n=t.initialState)||void 0===n?void 0:n.columns]),C=o.useCallback(((t,n)=>{var r;const o=null===(r=n.stateToRestore.columns)||void 0===r?void 0:r.columnVisibilityModel,i=n.stateToRestore.columns;if(null==o&&null==i)return t;const a=(0,$.QC)({apiRef:e,columnsToUpsert:[],initialState:i,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(Ot(a)),null!=i&&e.current.publishEvent("columnsChange",a.orderedFields),t}),[e]),k=o.useCallback(((e,n)=>{if(n===E.y.columns){var o;const e=t.slots.columnsPanel;return(0,L.jsx)(e,(0,r.Z)({},null===(o=t.slotProps)||void 0===o?void 0:o.columnsPanel))}return e}),[t.slots.columnsPanel,null===(i=t.slotProps)||void 0===i?void 0:i.columnsPanel]),M=o.useCallback((e=>t.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[t.disableColumnSelector]);Pt(e,"columnMenu",M),Pt(e,"exportState",S),Pt(e,"restoreState",C),Pt(e,"preferencePanel",k);const _=o.useRef(null);(0,V.zn)(e,"viewportInnerSizeChange",(t=>{if(_.current!==t.width){if(_.current=t.width,!(0,O.FE)(e).some((e=>e.flex&&e.flex>0)))return;l((0,$.eH)((0,O.wH)(e.current.state),e.current.getRootDimensions()))}}));const T=o.useCallback((()=>{a.info("Columns pipe processing have changed, regenerating the columns");const t=(0,$.QC)({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});l(t)}),[e,a,l]);It(e,"hydrateColumns",T);const P=o.useRef(!0);o.useEffect((()=>{if(P.current)return void(P.current=!1);if(a.info(`GridColumns have changed, new length ${t.columns.length}`),s.current===t.columns)return;const n=(0,$.QC)({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});s.current=t.columns,l(n)}),[a,e,l,t.columns]),o.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,a,t.columnVisibilityModel])}(n,t),((e,t)=>{const n=pt(e,"useGridRows"),i=o.useRef(Date.now()),a=o.useRef(t.rowCount),s=(0,H.Z)(),l=o.useCallback((t=>{const n=(0,Q.J4)(e)[t];if(n)return n;const r=e.current.getRowNode(t);return r&&(0,J.I7)(r)?{[J._1]:t}:null}),[e]),u=o.useCallback((t=>(0,Ln.X)(e.current.state,t)),[e]),c=o.useCallback((n=>{let{cache:o,throttle:a}=n;const l=()=>{i.current=Date.now(),e.current.setState((n=>(0,r.Z)({},n,{rows:(0,J.IX)({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,Q.Kd)(e),previousTreeDepths:(0,Q.i$)(e),previousGroupsToFetch:(0,Q.GG)(e)})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(s.clear(),e.current.caches.rows=o,!a)return void l();const u=t.throttleRowsMs-(Date.now()-i.current);u>0?s.start(u,l):l()}),[t.throttleRowsMs,t.rowCount,t.loading,e,s]),d=o.useCallback((r=>{n.debug(`Updating all rows, new length ${r.length}`);const o=(0,J.PO)({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),i=e.current.caches.rows;o.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,c({cache:o,throttle:!0})}),[n,t.getRowId,t.loading,t.rowCount,c,e]),h=o.useCallback((n=>{if(t.signature===V.cG.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const r=(0,J.Wj)(e,n,t.getRowId),o=(0,J.vn)({updates:r,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:o,throttle:!0})}),[t.signature,t.getRowId,c,e]),p=o.useCallback(((n,r)=>{const o=(0,J.Wj)(e,n,t.getRowId),i=(0,J.vn)({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:r??[]});c({cache:i,throttle:!1})}),[t.getRowId,c,e]),f=o.useCallback((o=>{o!==t.loading&&(n.debug(`Setting loading to ${o}`),e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{loading:o})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=o)}),[t.loading,e,n]),m=o.useCallback((()=>{const t=(0,Q.yM)(e),n=(0,Q.J4)(e);return new Map(t.map((e=>[e,n[e]??{}])))}),[e]),g=o.useCallback((()=>(0,Q.hh)(e)),[e]),v=o.useCallback((()=>(0,Q.yM)(e)),[e]),y=o.useCallback((t=>{const n=e.current.getRow(t),{rowToIndexMap:r}=(0,un.j)(e);return r.get(n)}),[e]),b=o.useCallback(((t,n)=>{const o=e.current.getRowNode(t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==o.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const i=(0,r.Z)({},o,{childrenExpanded:n});e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{tree:(0,r.Z)({},e.rows.tree,{[t]:i})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",i)}),[e]),x=o.useCallback((t=>(0,Q.Kd)(e)[t]??null),[e]),w=o.useCallback((t=>{let{skipAutoGeneratedRows:n=!0,groupId:r,applySorting:o,applyFiltering:i}=t;const a=(0,Q.Kd)(e);let s;if(o){const t=a[r];if(!t)return[];const o=(0,oe.aV)(e);s=[];for(let e=o.findIndex((e=>e===r))+1;et.depth;e+=1){const t=o[e];n&&(0,J.I7)(a[t])||s.push(t)}}else s=(0,J.u4)(a,r,n);if(i){const t=(0,X._g)(e);s=s.filter((e=>!1!==t[e]))}return s}),[e]),S=o.useCallback(((t,o)=>{const i=e.current.getRowNode(t);if(!i)throw new Error(`MUI X: No row with id #${t} found.`);if(i.parent!==J.U5)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==i.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState((i=>{const a=(0,Q.Kd)(i,e.current.instanceId)[J.U5],s=a.children,l=s.findIndex((e=>e===t));if(-1===l||l===o)return i;n.debug(`Moving row ${t} to index ${o}`);const u=[...s];return u.splice(o,0,u.splice(l,1)[0]),(0,r.Z)({},i,{rows:(0,r.Z)({},i.rows,{tree:(0,r.Z)({},i.rows.tree,{[J.U5]:(0,r.Z)({},a,{children:u})})})})})),e.current.publishEvent("rowsSet")}),[e,n]),C={getRow:l,setLoading:f,getRowId:u,getRowModels:m,getRowsCount:g,getAllRowIds:v,setRows:d,updateRows:h,getRowNode:x,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:o.useCallback(((n,o)=>{if(t.signature===V.cG.DataGrid&&o.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if((0,Q.Lq)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const i=(0,r.Z)({},(0,Q.Kd)(e)),a=(0,r.Z)({},(0,Q.J4)(e)),s=(0,r.Z)({},(0,Q.Qr)(e)),l=i[J.U5],u=[...l.children],c=new Set;for(let e=0;e{var t;return"leaf"===(null===(t=i[e])||void 0===t?void 0:t.type)}));e.current.caches.rows.dataRowIdToModelLookup=a,e.current.caches.rows.dataRowIdToIdLookup=s,e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,dataRowIds:d,tree:i})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},k={setRowIndex:S,setRowChildrenExpansion:b,getRowGroupChildren:w},M={updateServerRows:p},_=o.useCallback((()=>{let o;n.info("Row grouping pre-processing have changed, regenerating the row tree"),o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,r.Z)({},e.current.caches.rows,{updates:{type:"full",rows:(0,Q.yM)(e)}}):(0,J.PO)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:o,throttle:!1})}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),T=(0,en.Z)((()=>t.unstable_dataSource)),P=o.useCallback((e=>{t.unstable_dataSource&&t.unstable_dataSource!==T.current?T.current=t.unstable_dataSource:"rowTreeCreation"===e&&_()}),[_,T,t.unstable_dataSource]),I=o.useCallback((()=>{e.current.getActiveStrategy("rowTree")!==(0,Q.Le)(e)&&_()}),[e,_]);(0,V.zn)(e,"activeStrategyProcessorChange",P),(0,V.zn)(e,"strategyAvailabilityChange",I);const R=o.useCallback((()=>{e.current.setState((n=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,Q.Kd)(n,e.current.instanceId),treeDepths:(0,Q.i$)(n,e.current.instanceId),dataRowIds:(0,Q.yM)(n,e.current.instanceId),dataRowIdToModelLookup:(0,Q.J4)(n,e.current.instanceId),dataRowIdToIdLookup:(0,Q.Qr)(n,e.current.instanceId)});return(0,r.Z)({},n,{rows:(0,r.Z)({},n.rows,o,{totalTopLevelRowCount:(0,J.ZD)({tree:o.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e,t.rowCount]);It(e,"hydrateRows",R),(0,Ye.h)(e,C,"public"),(0,Ye.h)(e,k,t.signature===V.cG.DataGrid?"private":"public"),(0,Ye.h)(e,M,"private");const D=o.useRef(!0);o.useEffect((()=>{var o;if(D.current)return void(D.current=!1);let i=!1;t.rowCount!==a.current&&(i=!0,a.current=t.rowCount);const s=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,l=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,u=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;s&&(l||(e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),u||(e.current.setState((e=>(0,r.Z)({},e,{rows:(0,r.Z)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!i)||(n.debug(`Updating all rows, new length ${null===(o=t.rows)||void 0===o?void 0:o.length}`),c({cache:(0,J.PO)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))}),[t.rows,t.rowCount,t.getRowId,t.loading,n,c,e])})(n,t),((e,t)=>{const n=(0,en.Z)((()=>e.current.state.rowSpanning!==Dr?Zr(t,e):Or)),i=o.useCallback((function(o){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{range:a,rows:s}=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(null===a||!Ir(o))return;i&&(n.current=Or);const l=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex(0,r.Z)({},e,{rowSpanning:{spannedCells:c,hiddenCells:d,hiddenCellOriginMap:h}})))}),[e,n,t.pagination,t.paginationMode]),a=o.useCallback((()=>{const t=(0,_e.r8)(e);Ir(t)&&i(t,!0)}),[e,i]);(0,V.zn)(e,"renderedRowsIntervalChange",(0,Ke.d$)(t.unstable_rowSpanning,i)),(0,V.zn)(e,"sortedRowsSet",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"paginationModelChange",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"filteredRowsSet",(0,Ke.d$)(t.unstable_rowSpanning,a)),(0,V.zn)(e,"columnsChange",(0,Ke.d$)(t.unstable_rowSpanning,a)),o.useEffect((()=>{t.unstable_rowSpanning?e.current.state.rowSpanning===Dr&&a():e.current.state.rowSpanning!==Dr&&e.current.setState((e=>(0,r.Z)({},e,{rowSpanning:Dr})))}),[e,a,t.unstable_rowSpanning])})(n,t),function(e,t){var n;const r=o.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),i=o.useCallback((t=>{const n=e.current.getRow(t);if(!n)throw new Nn(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n}}),[e]),a=o.useCallback(((t,n,r,o)=>{let{cellMode:i,colDef:a,hasFocus:s,rowNode:l,tabIndex:u}=o;const c=r[n],d=(null==a?void 0:a.valueGetter)?a.valueGetter(c,r,a,e):c,h={id:t,field:n,row:r,rowNode:l,colDef:a,cellMode:i,hasFocus:s,tabIndex:u,value:d,formattedValue:d,isEditable:!1,api:null};return a&&a.valueFormatter&&(h.formattedValue=a.valueFormatter(d,r,a,e)),h.isEditable=a&&e.current.isCellEditable(h),h}),[e]),s=o.useCallback(((n,r)=>{var o;const i=e.current.getRow(n),a=e.current.getRowNode(n);if(!i||!a)throw new Nn(`No row with id #${n} found`);const s=(0,ie.TR)(e),l=(0,ie.d6)(e),u=e.current.getCellMode(n,r);return e.current.getCellParamsForRow(n,r,i,{colDef:t.unstable_listView&&(null===(o=t.unstable_listColumn)||void 0===o?void 0:o.field)===r?(0,yn.z)(e.current.state):e.current.getColumn(r),rowNode:a,hasFocus:null!==s&&s.field===r&&s.id===n,tabIndex:l&&l.field===r&&l.id===n?0:-1,cellMode:u})}),[e,t.unstable_listView,null===(n=t.unstable_listColumn)||void 0===n?void 0:n.field]),l=o.useCallback(((t,n)=>{const r=e.current.getColumn(n),o=e.current.getRow(t);if(!o)throw new Nn(`No row with id #${t} found`);return r&&r.valueGetter?r.valueGetter(o[r.field],o,r,e):o[n]}),[e]),u=o.useCallback(((t,n)=>{const r=n.field;if(!n||!n.valueGetter)return t[r];const o=t[n.field];return n.valueGetter(o,t,n,e)}),[e]),c=o.useCallback(((t,n)=>{const r=u(t,n);return n&&n.valueFormatter?n.valueFormatter(r,t,n,e):r}),[e,u]),d=o.useCallback((t=>e.current.rootElementRef.current?(0,fn.qk)(e.current.rootElementRef.current,t):null),[e]),h=o.useCallback((t=>e.current.rootElementRef.current?(0,fn.Q6)(e.current.rootElementRef.current,t):null),[e]),p={getCellValue:l,getCellParams:s,getCellElement:o.useCallback(((t,n)=>e.current.rootElementRef.current?(0,fn.ct)(e.current.rootElementRef.current,{id:t,field:n}):null),[e]),getRowValue:u,getRowFormattedValue:c,getRowParams:i,getRowElement:h,getColumnHeaderParams:r,getColumnHeaderElement:d},f={getCellParamsForRow:a};(0,Ye.h)(e,p,"public"),(0,Ye.h)(e,f,"private")}(n,t),(e=>{const t=o.useRef({}),n=()=>{t.current={}},r={unstable_getCellColSpanInfo:(e,n)=>{var r;return null===(r=t.current[e])||void 0===r?void 0:r[n]}},i={resetColSpan:n,calculateColSpan:o.useCallback((n=>{let{rowId:r,minFirstColumn:o,maxLastColumn:i,columns:a}=n;for(let n=o;n1&&(n+=s.colSpan-1)}}),[e])};(0,Ye.h)(e,r,"public"),(0,Ye.h)(e,i,"private"),(0,V.zn)(e,"columnOrderChange",n)})(n),((e,t)=>{const n={getColumnGroupPath:o.useCallback((t=>(0,ae.Cv)(e)[t]??[]),[e]),getAllGroupDetails:o.useCallback((()=>(0,ae.XS)(e)),[e])};(0,Ye.h)(e,n,"public");const i=o.useCallback((()=>{const n=pr(t.columnGroupingModel??[]);e.current.setState((e=>{var t;const o=(null===(t=e.columns)||void 0===t?void 0:t.orderedFields)??[],i=e.pinnedColumns??{},a=fr(o,n,i);return(0,r.Z)({},e,{columnGrouping:(0,r.Z)({},e.columnGrouping,{headerStructure:a})})}))}),[e,t.columnGroupingModel]),a=o.useCallback((t=>{var n,o;const i=(null===(n=(o=e.current).getPinnedColumns)||void 0===n?void 0:n.call(o))??{},a=(0,O.Zi)(e),s=(0,O.pK)(e),l=gr(t??[]),u=pr(t??[]),c=fr(a,u,i),d=0===s.length?0:Math.max(...s.map((e=>{var t;return(null===(t=u[e])||void 0===t?void 0:t.length)??0})));e.current.setState((e=>(0,r.Z)({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:u,headerStructure:c,maxDepth:d}})))}),[e]);(0,V.zn)(e,"columnIndexChange",i),(0,V.zn)(e,"columnsChange",(()=>{a(t.columnGroupingModel)})),(0,V.zn)(e,"columnVisibilityModelChange",(()=>{a(t.columnGroupingModel)})),o.useEffect((()=>{a(t.columnGroupingModel)}),[a,t.columnGroupingModel])})(n,t),Zn(n,t),((e,t)=>{const n=pt(e,"useGridFocus"),i=o.useRef(null),a=null!==e.current.rootElementRef.current,s=o.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),l=o.useCallback(((t,o)=>{const i=(0,ie.TR)(e);(null==i?void 0:i.id)===t&&(null==i?void 0:i.field)===o||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${o}`),(0,r.Z)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(i&&s(i,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))}),[e,n,s]),u=o.useCallback((function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=(0,ie.TR)(e);s(i,o),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),(0,r.Z)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,s]),c=o.useCallback((function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=(0,ie.TR)(e);s(i,o),e.current.setState((e=>(n.debug(`Focusing on column header filter with colIndex=${t}`),(0,r.Z)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,s]),d=o.useCallback((function(t,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(0,ie.TR)(e);i&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(i.id,i.field),o),e.current.setState((e=>(0,r.Z)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))),e.current.forceUpdate()}),[e]),h=o.useCallback((()=>(0,ie.jC)(e)),[e]),p=o.useCallback(((n,r,o)=>{let i=e.current.getColumnIndex(r);const a=(0,O.FE)(e),s=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode}),l=(0,Q.Kf)(e),u=[].concat(l.top||[],s.rows,l.bottom||[]);let c=u.findIndex((e=>e.id===n));"right"===o?i+=1:"left"===o?i-=1:c+=1,i>=a.length?(c+=1,c=0&&(i=a.length-1)),c=(0,Ke.uZ)(c,0,u.length-1);const d=u[c];if(!d)return;const h=e.current.unstable_getCellColSpanInfo(d.id,i);h&&h.spannedByColSpan&&("left"===o||"below"===o?i=h.leftVisibleCellIndex:"right"===o&&(i=h.rightVisibleCellIndex)),i=(0,Ke.uZ)(i,0,a.length-1);const p=a[i];e.current.setCellFocus(d.id,p.field)}),[e,t.pagination,t.paginationMode]),f=o.useCallback((t=>{let{id:n,field:r}=t;e.current.setCellFocus(n,r)}),[e]),m=o.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||wt(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),v=o.useCallback(((t,n)=>{let{field:r}=t;n.target===n.currentTarget&&e.current.setColumnHeaderFocus(r,n)}),[e]),y=o.useCallback(((t,n)=>{let{fields:r,depth:o}=t;if(n.target!==n.currentTarget)return;const i=(0,ie.jC)(e);null!==i&&i.depth===o&&r.includes(i.field)||e.current.setColumnGroupHeaderFocus(r[0],o,n)}),[e]),b=o.useCallback(((t,o)=>{var i,a;(null===(a=o.relatedTarget)||void 0===a||null===(i=a.getAttribute("class"))||void 0===i?void 0:i.includes(g._.columnHeader))||(n.debug("Clearing focus"),e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[n,e]),x=o.useCallback((e=>{i.current=e}),[]),w=o.useCallback((t=>{const n=i.current;i.current=null;const o=(0,ie.TR)(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:n}))return;if(!o)return void(n&&e.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===o.id&&(null==n?void 0:n.field)===o.field)return;const a=e.current.getCellElement(o.id,o.field);(null==a?void 0:a.contains(t.target))||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),s(o,t)))}),[e,s]),S=o.useCallback((t=>{if("view"===t.cellMode)return;const n=(0,ie.TR)(e);(null==n?void 0:n.id)===t.id&&(null==n?void 0:n.field)===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),C=o.useCallback((()=>{const n=(0,ie.TR)(e);if(n&&!e.current.getRow(n.id)){const o=n.id;let i=null;if(void 0!==o){const n=e.current.getRowElement(o),r=(null==n?void 0:n.dataset.rowindex)?Number(null==n?void 0:n.dataset.rowindex):0,a=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode}),s=a.rows[(0,Ke.uZ)(r,0,a.rows.length-1)];i=(null==s?void 0:s.id)??null}e.current.setState((e=>(0,r.Z)({},e,{focus:{cell:null===i?null:{id:i,field:n.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}}),[e,t.pagination,t.paginationMode]),k=(0,B.Z)((()=>{const n=(0,ie.TR)(e);if(!n)return;const o=(0,un.j)(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(o.rows.find((e=>e.id===n.id)))return;const i=(0,O.FE)(e);e.current.setState((e=>(0,r.Z)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))})),M={setCellFocus:l,setColumnHeaderFocus:u,setColumnHeaderFilterFocus:c},_={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:d,getColumnGroupHeaderFocus:h};(0,Ye.h)(e,M,"public"),(0,Ye.h)(e,_,"private"),o.useEffect((()=>{const t=(0,Ut.Z)(e.current.rootElementRef.current);return t.addEventListener("mouseup",w),()=>{t.removeEventListener("mouseup",w)}}),[e,a,w]),(0,V.zn)(e,"columnHeaderBlur",b),(0,V.zn)(e,"cellDoubleClick",f),(0,V.zn)(e,"cellMouseDown",x),(0,V.zn)(e,"cellKeyDown",m),(0,V.zn)(e,"cellModeChange",S),(0,V.zn)(e,"columnHeaderFocus",v),(0,V.zn)(e,"columnGroupHeaderFocus",y),(0,V.zn)(e,"rowsSet",C),(0,V.zn)(e,"paginationModelChange",k)})(n,t),((e,t)=>{var n;const i=pt(e,"useGridPreferencesPanel"),a=o.useCallback((()=>{e.current.setState((t=>{if(!t.preferencePanel.open)return t;i.debug("Hiding Preferences Panel");const n=(0,A.e)(t);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:n.openedPanelValue}),(0,r.Z)({},t,{preferencePanel:{open:!1}})}))}),[e,i]),s=o.useCallback(((t,n,o)=>{i.debug("Opening Preferences Panel"),e.current.setState((e=>(0,r.Z)({},e,{preferencePanel:(0,r.Z)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:n,labelId:o})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})}),[i,e]);(0,Ye.h)(e,{showPreferences:s,hidePreferences:a},"public");const l=o.useCallback(((n,o)=>{var i;const a=(0,A.e)(e.current.state);return!o.exportOnlyDirtyModels||null!=(null===(i=t.initialState)||void 0===i?void 0:i.preferencePanel)||a.open?(0,r.Z)({},n,{preferencePanel:a}):n}),[e,null===(n=t.initialState)||void 0===n?void 0:n.preferencePanel]),u=o.useCallback(((t,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&e.current.setState((e=>(0,r.Z)({},e,{preferencePanel:o}))),t}),[e]);Pt(e,"exportState",l),Pt(e,"restoreState",u)})(n,t),((e,t)=>{var n,i,a;const s=pt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:X.uf,changeEvent:"filterModelChange"});const l=o.useCallback((()=>{e.current.setState((t=>{const n=(0,X.uf)(t,e.current.instanceId),o=e.current.getFilterState(n),i=(0,r.Z)({},t,{filter:(0,r.Z)({},t.filter,o)}),a=sn(e,i);return(0,r.Z)({},i,{visibleRowsLookup:a})})),e.current.publishEvent("filteredRowsSet")}),[e]),u=o.useCallback(((e,n)=>null==n||!1===n.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),c=o.useCallback((()=>{l(),e.current.forceUpdate()}),[e,l]),d=o.useCallback((t=>{const n=(0,X.uf)(e),o=[...n.items],i=o.findIndex((e=>e.id===t.id));-1===i?o.push(t):o[i]=t,e.current.setFilterModel((0,r.Z)({},n,{items:o}),"upsertFilterItem")}),[e]),h=o.useCallback((t=>{const n=(0,X.uf)(e),o=[...n.items];t.forEach((e=>{const t=o.findIndex((t=>t.id===e.id));-1===t?o.push(e):o[t]=e})),e.current.setFilterModel((0,r.Z)({},n,{items:o}),"upsertFilterItems")}),[e]),p=o.useCallback((t=>{const n=(0,X.uf)(e),o=n.items.filter((e=>e.id!==t.id));o.length!==n.items.length&&e.current.setFilterModel((0,r.Z)({},n,{items:o}),"deleteFilterItem")}),[e]),f=o.useCallback(((n,o,i)=>{if(s.debug("Displaying filter panel"),n){const o=(0,X.uf)(e),i=o.items.filter((t=>{var n;if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const r=null===(n=e.current.getColumn(t.field).filterOperators)||void 0===n?void 0:n.find((e=>e.value===t.operator));return!(void 0===(null==r?void 0:r.requiresFilterValue)||(null==r?void 0:r.requiresFilterValue))}));let a;const s=i.find((e=>e.field===n)),l=e.current.getColumn(n);a=s?i:t.disableMultipleColumnsFiltering?[(0,rn.p3)({field:n,operator:l.filterOperators[0].value},e)]:[...i,(0,rn.p3)({field:n,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,r.Z)({},o,{items:a}))}e.current.showPreferences(E.y.filters,o,i)}),[e,s,t.disableMultipleColumnsFiltering]),m=o.useCallback((()=>{s.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,s]),g=o.useCallback((t=>{const n=(0,X.uf)(e);n.logicOperator!==t&&e.current.setFilterModel((0,r.Z)({},n,{logicOperator:t}),"changeLogicOperator")}),[e]),v=o.useCallback((t=>{const n=(0,X.uf)(e);(0,Ke.xb)(n.quickFilterValues,t)||e.current.setFilterModel((0,r.Z)({},n,{quickFilterValues:[...t]}))}),[e]),y=o.useCallback(((n,r)=>{(0,X.uf)(e)!==n&&(s.debug("Setting filter model"),e.current.updateControlState("filter",(0,rn.S)(n,t.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,s,t.disableMultipleColumnsFiltering]),b=o.useCallback((n=>{const o=(0,rn.NF)(n,t.disableMultipleColumnsFiltering,e),i="client"===t.filterMode?(0,rn.tY)(o,e,t.disableEval):null,a=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:o??(0,tn.c)()});return(0,r.Z)({},a,{filterModel:o})}),[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),x={setFilterLogicOperator:g,unstable_applyFilters:c,deleteFilterItem:p,upsertFilterItem:d,upsertFilterItems:h,setFilterModel:y,showFilterPanel:f,hideFilterPanel:m,setQuickFilterValues:v,ignoreDiacritics:t.ignoreDiacritics,getFilterState:b};(0,Ye.h)(e,x,"public");const w=o.useCallback(((n,o)=>{var i,a;const s=(0,X.uf)(e);return o.exportOnlyDirtyModels&&null==t.filterModel&&null==(null===(a=t.initialState)||void 0===a||null===(i=a.filter)||void 0===i?void 0:i.filterModel)&&(0,Ke.xb)(s,(0,tn.c)())?n:(0,r.Z)({},n,{filter:{filterModel:s}})}),[e,t.filterModel,null===(i=t.initialState)||void 0===i||null===(n=i.filter)||void 0===n?void 0:n.filterModel]),S=o.useCallback(((n,o)=>{var i;const a=null===(i=o.stateToRestore.filter)||void 0===i?void 0:i.filterModel;return null==a?n:(e.current.updateControlState("filter",(0,rn.S)(a,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,r.Z)({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),C=o.useCallback(((e,n)=>{if(n===E.y.filters){var o;const e=t.slots.filterPanel;return(0,L.jsx)(e,(0,r.Z)({},null===(o=t.slotProps)||void 0===o?void 0:o.filterPanel))}return e}),[t.slots.filterPanel,null===(a=t.slotProps)||void 0===a?void 0:a.filterPanel]),{getRowId:k}=t,M=(0,en.Z)(ln),_=o.useCallback((n=>{var r;if("client"!==t.filterMode||!n.isRowMatchingFilters||!n.filterModel.items.length&&!(null===(r=n.filterModel.quickFilterValues)||void 0===r?void 0:r.length))return tn.R;const o=(0,Q.J4)(e),i={},{isRowMatchingFilters:a}=n,s={},l={passingFilterItems:null,passingQuickFilterValues:null},u=M.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t{s.debug("onColUpdated - GridColumns changed, applying filters");const t=(0,X.uf)(e),n=(0,O.WH)(e),o=t.items.filter((e=>e.field&&n[e.field]));o.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),I=o.useCallback((()=>{e.current.setState((t=>(0,r.Z)({},t,{visibleRowsLookup:sn(e,t)}))),e.current.forceUpdate()}),[e]);(0,V.zn)(e,"rowsSet",l),(0,V.zn)(e,"columnsChange",T),(0,V.zn)(e,"activeStrategyProcessorChange",P),(0,V.zn)(e,"rowExpansionChange",I),(0,V.zn)(e,"columnVisibilityModelChange",(()=>{const t=(0,X.uf)(e);t.quickFilterValues&&(0,rn.Tv)(t)&&e.current.unstable_applyFilters()})),Tt((()=>{e.current.unstable_applyFilters()})),(0,Jt.Z)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,s,t.filterModel])})(n,t),((e,t)=>{var n,i;const a=pt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:oe.Gm,changeEvent:"sortModelChange"});const s=o.useCallback(((t,n)=>{const r=(0,oe.Gm)(e),o=r.findIndex((e=>e.field===t));let i=[...r];return o>-1?null==(null==n?void 0:n.sort)?i.splice(o,1):i.splice(o,1,n):i=[...r,n],i}),[e]),l=o.useCallback(((n,o)=>{const i=(0,oe.Gm)(e).find((e=>e.field===n.field));if(i){const e=void 0===o?(0,$n.vY)(n.sortingOrder??t.sortingOrder,i.sort):o;return void 0===e?void 0:(0,r.Z)({},i,{sort:e})}return{field:n.field,sort:void 0===o?(0,$n.vY)(n.sortingOrder??t.sortingOrder):o}}),[e,t.sortingOrder]),u=o.useCallback(((e,n)=>null==n||!1===n.sortable||t.disableColumnSorting?e:(n.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder,t.disableColumnSorting]),c=o.useCallback((()=>{e.current.setState((n=>{if("server"===t.sortingMode)return a.debug("Skipping sorting rows as sortingMode = server"),(0,r.Z)({},n,{sorting:(0,r.Z)({},n.sorting,{sortedRows:(0,J.u4)((0,Q.Kd)(e),J.U5,!1)})});const o=(0,oe.Gm)(n,e.current.instanceId),i=(0,$n.oX)(o,e),s=e.current.applyStrategyProcessor("sorting",{sortRowList:i});return(0,r.Z)({},n,{sorting:(0,r.Z)({},n.sorting,{sortedRows:s})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,a,t.sortingMode]),d=o.useCallback((n=>{(0,oe.Gm)(e)!==n&&(a.debug("Setting sort model"),e.current.setState((0,$n.E8)(n,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,a,t.disableMultipleColumnsSorting]),h=o.useCallback(((n,r,o)=>{const i=e.current.getColumn(n),a=l(i,r);let u;u=!o||t.disableMultipleColumnsSorting?null==(null==a?void 0:a.sort)?[]:[a]:s(i.field,a),e.current.setSortModel(u)}),[e,s,l,t.disableMultipleColumnsSorting]),p={getSortModel:o.useCallback((()=>(0,oe.Gm)(e)),[e]),getSortedRows:o.useCallback((()=>(0,oe.sX)(e).map((e=>e.model))),[e]),getSortedRowIds:o.useCallback((()=>(0,oe.aV)(e)),[e]),getRowIdFromRowIndex:o.useCallback((t=>e.current.getSortedRowIds()[t]),[e]),setSortModel:d,sortColumn:h,applySorting:c};(0,Ye.h)(e,p,"public");const f=o.useCallback(((n,o)=>{var i,a;const s=(0,oe.Gm)(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=(null===(a=t.initialState)||void 0===a||null===(i=a.sorting)||void 0===i?void 0:i.sortModel)||s.length>0?(0,r.Z)({},n,{sorting:{sortModel:s}}):n}),[e,t.sortModel,null===(i=t.initialState)||void 0===i||null===(n=i.sorting)||void 0===n?void 0:n.sortModel]),m=o.useCallback(((n,o)=>{var i;const a=null===(i=o.stateToRestore.sorting)||void 0===i?void 0:i.sortModel;return null==a?n:(e.current.setState((0,$n.E8)(a,t.disableMultipleColumnsSorting)),(0,r.Z)({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),g=o.useCallback((t=>{const n=(0,Q.Kd)(e),r=n[J.U5],o=t.sortRowList?t.sortRowList(r.children.map((e=>n[e]))):[...r.children];return null!=r.footerId&&o.push(r.footerId),o}),[e]);Pt(e,"exportState",f),Pt(e,"restoreState",m),nn(e,lt,"sorting",g);const v=o.useCallback(((e,n)=>{let{field:r,colDef:o}=e;if(!o.sortable||t.disableColumnSorting)return;const i=n.shiftKey||n.metaKey||n.ctrlKey;h(r,void 0,i)}),[h,t.disableColumnSorting]),y=o.useCallback(((e,n)=>{let{field:r,colDef:o}=e;o.sortable&&!t.disableColumnSorting&&("Enter"!==n.key||n.ctrlKey||n.metaKey||h(r,void 0,n.shiftKey))}),[h,t.disableColumnSorting]),b=o.useCallback((()=>{const t=(0,oe.Gm)(e),n=(0,O.WH)(e);if(t.length>0){const r=t.filter((e=>n[e.field]));r.length{"sorting"===t&&e.current.applySorting()}),[e]);Pt(e,"columnMenu",u),(0,V.zn)(e,"columnHeaderClick",v),(0,V.zn)(e,"columnHeaderKeyDown",y),(0,V.zn)(e,"rowsSet",e.current.applySorting),(0,V.zn)(e,"columnsChange",b),(0,V.zn)(e,"activeStrategyProcessorChange",x),Tt((()=>{e.current.applySorting()})),(0,Jt.Z)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(n,t),((e,t)=>{var n;const i=pt(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:T.EH,changeEvent:"densityChange"});const a={setDensity:(0,B.Z)((t=>{(0,T.EH)(e.current.state)!==t&&(i.debug(`Set grid density to ${t}`),e.current.setState((e=>(0,r.Z)({},e,{density:t}))))}))};(0,Ye.h)(e,a,"public");const s=o.useCallback(((n,o)=>{var i;const a=(0,T.EH)(e.current.state);return o.exportOnlyDirtyModels&&null==t.density&&null==(null===(i=t.initialState)||void 0===i?void 0:i.density)?n:(0,r.Z)({},n,{density:a})}),[e,t.density,null===(n=t.initialState)||void 0===n?void 0:n.density]),l=o.useCallback(((t,n)=>{var o;const i=(null===(o=n.stateToRestore)||void 0===o?void 0:o.density)?n.stateToRestore.density:(0,T.EH)(e.current.state);return e.current.setState((e=>(0,r.Z)({},e,{density:i}))),t}),[e]);Pt(e,"exportState",s),Pt(e,"restoreState",l),o.useEffect((()=>{t.density&&e.current.setDensity(t.density)}),[e,t.density])})(n,t),Tr(n,t),Sn(n,t),((e,t)=>{const{getRowHeight:n,getRowSpacing:i,getEstimatedRowHeight:a}=t,s=e.current.caches.rowsMeta.heights,l=o.useRef(-1),u=o.useRef(!1),c=o.useRef(!1),d=(0,v.Pp)(e,T.CD),h=(0,un.y)(e,t),p=(0,v.Pp)(e,Q.Kf),f=(0,v.Pp)(e,z.E$),m=o.useCallback((t=>{const o=(0,z.jY)(e.current.state).rowHeight;(0,Ke.eV)(f);const s=e.current.getRowHeightEntry(t.id);if(n){const e=n((0,r.Z)({},t,{densityFactor:d}));if("auto"===e){if(s.needsFirstMeasurement){const e=a?a((0,r.Z)({},t,{densityFactor:d})):o;s.content=e??o}u.current=!0,s.autoHeight=!0}else s.content=(0,J.qJ)(e,o,J.JX),s.needsFirstMeasurement=!1,s.autoHeight=!1}else s.content=o,s.needsFirstMeasurement=!1;if(i){const n=e.current.getRowIndexRelativeToVisibleRows(t.id),o=i((0,r.Z)({},t,{isFirstVisible:0===n,isLastVisible:n===h.rows.length-1,indexRelativeToCurrentPage:n}));s.spacingTop=o.top??0,s.spacingBottom=o.bottom??0}else s.spacingTop=0,s.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",s,t),s}),[e,h.rows,n,a,f,i,d]),g=o.useCallback((()=>{u.current=!1;const t=p.top.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),n=p.bottom.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),o=[],i=h.rows.reduce(((e,t)=>{o.push(e);const n=m(t);return e+(n.content+n.spacingTop+n.spacingBottom+n.detail)}),0);u.current||(l.current=1/0);const a=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||n!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||i!==e.current.state.rowsMeta.currentPageTotalHeight,s={currentPageTotalHeight:i,positions:o,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:n};e.current.setState((e=>(0,r.Z)({},e,{rowsMeta:s}))),a&&e.current.updateDimensions(),c.current=!0}),[e,p,h.rows,m]),y=(0,en.Z)((()=>new ar((t=>{for(let r=0;r0?o.borderBoxSize[0].blockSize:o.contentRect.height,a=o.target.__mui_id;if((null===(n=(0,sr.l)(e))||void 0===n?void 0:n.id)===a&&0===i)return;e.current.unstable_storeRowHeightMeasurement(a,i)}c.current||e.current.requestPipeProcessorsApplication("rowHeight")})))).current;It(e,"rowHeight",g),(0,Jt.Z)((()=>{g()}),[g]);const b={unstable_getRowHeight:e=>{var t;return(null===(t=s.get(e))||void 0===t?void 0:t.content)??f},unstable_setLastMeasuredRowIndex:e=>{u.current&&e>l.current&&(l.current=e)},unstable_storeRowHeightMeasurement:(t,n)=>{var r;const o=e.current.getRowHeightEntry(t),i=o.content!==n;o.needsFirstMeasurement=!1,o.content=n,(r=c).current&&(r.current=!i)},resetRowHeights:()=>{s.clear(),g()}},x={hydrateRowsMeta:g,observeRowHeight:(e,t)=>(e.__mui_id=t,y.observe(e),()=>y.unobserve(e)),rowHasAutoHeight:e=>{var t;return(null===(t=s.get(e))||void 0===t?void 0:t.autoHeight)??!1},getRowHeightEntry:e=>{let t=s.get(e);return void 0===t&&(t={content:f,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},s.set(e,t)),t},getLastMeasuredRowIndex:()=>l.current};(0,Ye.h)(e,b,"public"),(0,Ye.h)(e,x,"private")})(n,t),((e,t)=>{const n=(0,qe.V)(),r=pt(e,"useGridScroll"),i=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,s=(0,v.Pp)(e,X.D7),l=o.useCallback((n=>{const o=(0,z.jY)(e.current.state),i=(0,Q.hh)(e),l=t.unstable_listView?[(0,yn.z)(e.current.state)]:(0,O.FE)(e);if(null!=n.rowIndex&&0===i||0===l.length)return!1;r.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let u={};if(void 0!==n.colIndex){const t=(0,O.Ag)(e);let r;if(void 0!==n.rowIndex){var c;const t=null===(c=s[n.rowIndex])||void 0===c?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),u.left=Gn({containerSize:o.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:r,elementOffset:t[n.colIndex]})}if(void 0!==n.rowIndex){const r=(0,Me.k)(e.current.state),i=(0,qt.bu)(e),s=(0,qt.B_)(e),l=t.pagination?n.rowIndex-i*s:n.rowIndex,c=r.positions[l+1]?r.positions[l+1]-r.positions[l]:r.currentPageTotalHeight-r.positions[l];u.top=Gn({containerSize:o.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:c,elementOffset:r.positions[l]})}return u=e.current.unstable_applyPipeProcessors("scrollToIndexes",u,n),(void 0!==typeof u.left||void 0!==typeof u.top)&&(e.current.scroll(u),!0)}),[r,e,a,t.pagination,s,t.unstable_listView]),u={scroll:o.useCallback((e=>{if(a.current&&void 0!==e.left&&i.current){const t=n?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}a.current&&void 0!==e.top&&(a.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[a,n,i,r]),scrollToIndexes:l,getScrollPosition:o.useCallback((()=>(null==a?void 0:a.current)?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0}),[a])};(0,Ye.h)(e,u,"public")})(n,t),(e=>{const t=pt(e,"useGridColumnMenu"),n=o.useCallback((n=>{const o=se(e.current.state),i=n;(!0!==o.open||i!==o.field)&&(e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),(0,r.Z)({},e,{columnMenu:{open:!0,field:n}})))),e.current.hidePreferences())}),[e,t]),i=o.useCallback((()=>{const n=se(e.current.state);if(n.field){const t=(0,O.WH)(e),r=(0,O.g0)(e),o=(0,O.Zi)(e);let i=n.field;if(t[i]||(i=o[0]),!1===r[i]){const e=o.filter((e=>e===i||!1!==r[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(i)}const o={open:!1,field:void 0};(o.open!==n.open||o.field!==n.field)&&e.current.setState((e=>(t.debug("Hiding Column Menu"),(0,r.Z)({},e,{columnMenu:o}))))}),[e,t]),a=o.useCallback((r=>{t.debug("Toggle Column Menu");const o=se(e.current.state);o.open&&o.field===r?i():n(r)}),[e,t,n,i]),s={showColumnMenu:n,hideColumnMenu:i,toggleColumnMenu:a};(0,Ye.h)(e,s,"public"),(0,V.zn)(e,"columnResizeStart",i),(0,V.zn)(e,"virtualScrollerWheel",e.current.hideColumnMenu),(0,V.zn)(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(n),Gt(n,t),Xt(n,t),Mt(n,t),tr(n,t),function(e,t){(0,V.x3)(e,"columnHeaderClick",t.onColumnHeaderClick),(0,V.x3)(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),(0,V.x3)(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),(0,V.x3)(e,"columnHeaderOver",t.onColumnHeaderOver),(0,V.x3)(e,"columnHeaderOut",t.onColumnHeaderOut),(0,V.x3)(e,"columnHeaderEnter",t.onColumnHeaderEnter),(0,V.x3)(e,"columnHeaderLeave",t.onColumnHeaderLeave),(0,V.x3)(e,"cellClick",t.onCellClick),(0,V.x3)(e,"cellDoubleClick",t.onCellDoubleClick),(0,V.x3)(e,"cellKeyDown",t.onCellKeyDown),(0,V.x3)(e,"preferencePanelClose",t.onPreferencePanelClose),(0,V.x3)(e,"preferencePanelOpen",t.onPreferencePanelOpen),(0,V.x3)(e,"menuOpen",t.onMenuOpen),(0,V.x3)(e,"menuClose",t.onMenuClose),(0,V.x3)(e,"rowDoubleClick",t.onRowDoubleClick),(0,V.x3)(e,"rowClick",t.onRowClick),(0,V.x3)(e,"stateChange",t.onStateChange)}(n,t),(e=>{const t=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.current.unstable_applyPipeProcessors("exportState",{},t)}),[e]),n={exportState:t,restoreState:o.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e])};(0,Ye.h)(e,n,"public")})(n),(0,yr.fO)(n,t),function(e,t){const n=()=>{e.current.setState((t=>t.listViewColumn?(0,r.Z)({},t,{listViewColumn:(0,r.Z)({},t.listViewColumn,{computedWidth:jr(e)})}):t))},i=o.useRef(null);(0,V.zn)(e,"viewportInnerSizeChange",(e=>{i.current!==e.width&&(i.current=e.width,n())})),(0,V.zn)(e,"columnVisibilityModelChange",n),(0,Jt.Z)((()=>{const n=t.unstable_listColumn;n&&e.current.setState((t=>(0,r.Z)({},t,{listViewColumn:(0,r.Z)({},n,{computedWidth:jr(e)})})))}),[e,t.unstable_listColumn]),o.useEffect((()=>{t.unstable_listView&&t.unstable_listColumn}),[t.unstable_listView,t.unstable_listColumn])}(n,t),n};var zr=n(19703);const Br={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};var Vr=n(35691);const Hr=["field","type","align","width","height","empty","style","className"],$r="1.3em",Wr=[40,80],Gr={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Ur=(0,Ke.iR)(12345);const qr=(0,p.X)((function(e){const{field:t,type:n,align:i,width:a,height:s,empty:h=!1,style:p,className:f}=e,m=(0,l.Z)(e,Hr),v=(e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?(0,c.Z)(t):"Left"}`,r&&"cellEmpty"]};return(0,d.Z)(o,g.d,n)})({classes:(0,_.B)().classes,align:i,empty:h}),y=o.useMemo((()=>{if("boolean"===n||"actions"===n)return{variant:"circular",width:$r,height:$r};const[e,t]=n?Gr[n]??Wr:Wr;return{variant:"text",width:`${Math.round(Ur(e,t))}%`,height:"1.2em"}}),[n]);return(0,L.jsx)("div",(0,r.Z)({"data-field":t,className:(0,u.Z)(v.root,f),style:(0,r.Z)({height:s,maxWidth:a,minWidth:a},p)},m,{children:!h&&(0,L.jsx)(Vr.Z,(0,r.Z)({},y))}))})),Kr=["className"],Yr=(0,N.Z)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Xr=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,Kr),i=(0,_.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["iconButtonContainer"]},g.d,t)})(i);return(0,L.jsx)(Yr,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))}));function Qr(e){var t,n;const{counter:i,field:a,onClick:s}=e,l=(0,Z.l)(),u=(0,_.B)(),c=(e=>{const{classes:t}=e;return(0,d.Z)({icon:["filterIcon"]},g.d,t)})((0,r.Z)({},e,{classes:u.classes})),h=(0,Ft.Z)(),p=(0,v.AC)(l,A.R,h),f=(0,Ft.Z)(),m=o.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:n}=(0,A.e)(l.current.state);t&&n===E.y.filters?l.current.hideFilterPanel():l.current.showFilterPanel(void 0,f,h),s&&s(l.current.getColumnHeaderParams(a),e)}),[l,a,s,f,h]);if(!i)return null;const y=(0,L.jsx)(u.slots.baseIconButton,(0,r.Z)({id:h,onClick:m,color:"default","aria-label":l.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?f:void 0},null===(t=u.slotProps)||void 0===t?void 0:t.baseIconButton,{children:(0,L.jsx)(u.slots.columnFilteredIcon,{className:c.icon,fontSize:"small"})}));return(0,L.jsx)(u.slots.baseTooltip,(0,r.Z)({title:l.current.getLocaleText("columnHeaderFiltersTooltipActive")(i),enterDelay:1e3},null===(n=u.slotProps)||void 0===n?void 0:n.baseTooltip,{children:(0,L.jsxs)(Xr,{children:[i>1&&(0,L.jsx)(u.slots.baseBadge,{badgeContent:i,color:"default",children:y}),1===i&&y]})}))}const Jr=["direction","index","sortingOrder","disabled"];function eo(e){var t;const{direction:n,index:o,sortingOrder:i,disabled:a}=e,s=(0,l.Z)(e,Jr),u=(0,Z.l)(),c=(0,_.B)(),h=(e=>{const{classes:t}=e;return(0,d.Z)({icon:["sortIcon"]},g.d,t)})((0,r.Z)({},e,{classes:c.classes})),p=function(e,t,n,o){let i;const a={};return"asc"===t?i=e.columnSortedAscendingIcon:"desc"===t?i=e.columnSortedDescendingIcon:(i=e.columnUnsortedIcon,a.sortingOrder=o),i?(0,L.jsx)(i,(0,r.Z)({fontSize:"small",className:n},a)):null}(c.slots,n,h.icon,i);if(!p)return null;const f=(0,L.jsx)(c.slots.baseIconButton,(0,r.Z)({tabIndex:-1,"aria-label":u.current.getLocaleText("columnHeaderSortIconLabel"),title:u.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:a},null===(t=c.slotProps)||void 0===t?void 0:t.baseIconButton,s,{children:p}));return(0,L.jsxs)(Xr,{children:[null!=o&&(0,L.jsx)(c.slots.baseBadge,{badgeContent:o,color:"default",overlap:"circular",children:f}),null==o&&f]})}const to=o.memo(eo),no=["className","selectedRowCount"],ro=(0,N.Z)("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})((e=>{let{theme:t}=e;return{alignItems:"center",display:"flex",margin:t.spacing(0,2),visibility:"hidden",width:0,height:0,[t.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}})),oo=(0,s.G)((function(e,t){const{className:n,selectedRowCount:o}=e,i=(0,l.Z)(e,no),a=(0,Z.l)(),s=(0,_.B)(),c=(e=>{const{classes:t}=e;return(0,d.Z)({root:["selectedRowCount"]},g.d,t)})(s),h=a.current.getLocaleText("footerRowSelected")(o);return(0,L.jsx)(ro,(0,r.Z)({className:(0,u.Z)(c.root,n),ownerState:s},i,{ref:t,children:h}))})),io=["className"],ao=(0,N.Z)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),so=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,io),i=(0,_.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["footerContainer","withBorderColor"]},g.d,t)})(i);return(0,L.jsx)(ao,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))})),lo=(0,s.G)((function(e,t){var n,o;const i=(0,Z.l)(),a=(0,_.B)(),s=(0,v.Pp)(i,Q.G$),l=(0,v.Pp)(i,He.xD),u=(0,v.Pp)(i,X.xf),c=!a.hideFooterSelectedRowCount&&l>0?(0,L.jsx)(oo,{selectedRowCount:l}):(0,L.jsx)("div",{}),d=a.hideFooterRowCount||a.pagination?null:(0,L.jsx)(a.slots.footerRowCount,(0,r.Z)({},null===(n=a.slotProps)||void 0===n?void 0:n.footerRowCount,{rowCount:s,visibleRowCount:u})),h=a.pagination&&!a.hideFooterPagination&&a.slots.pagination&&(0,L.jsx)(a.slots.pagination,(0,r.Z)({},null===(o=a.slotProps)||void 0===o?void 0:o.pagination));return(0,L.jsxs)(so,(0,r.Z)({},e,{ref:t,children:[c,d,h]}))})),uo=["className","rowCount","visibleRowCount"],co=(0,N.Z)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((e=>{let{theme:t}=e;return{alignItems:"center",display:"flex",margin:t.spacing(0,2)}})),ho=(0,s.G)((function(e,t){const{className:n,rowCount:o,visibleRowCount:i}=e,a=(0,l.Z)(e,uo),s=(0,Z.l)(),c=(0,_.B)(),h=(e=>{const{classes:t}=e;return(0,d.Z)({root:["rowCount"]},g.d,t)})(c);if(0===o)return null;const p=it.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),vo=(0,s.G)((function(e,t){const{className:n}=e,o=(0,l.Z)(e,mo),i=(0,_.B)(),a=(e=>{const{classes:t}=e;return(0,d.Z)({root:["overlay"]},g.d,t)})(i);return(0,L.jsx)(go,(0,r.Z)({className:(0,u.Z)(a.root,n),ownerState:i},o,{ref:t}))}));var yo=n(7605),bo=n(51076),xo=n(39731),wo=n(47313),So=n(71602);const Co=(0,N.Z)("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),ko=e=>parseInt(e.getAttribute("data-colindex"),10),Mo=(0,s.G)((function(e,t){const n=(0,_.B)(),{slots:i}=n,a=(0,qe.V)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["skeletonLoadingOverlay"]},g.d,t)})({classes:n.classes}),l=o.useRef(null),c=(0,h.Z)(l,t),p=(0,Z.l)(),f=(0,v.Pp)(p,z.jY),m=(null==f?void 0:f.viewportInnerSize.height)??0,y=Math.ceil(m/f.rowHeight),b=(0,v.Pp)(p,z.iD),x=(0,v.Pp)(p,O.Ag),w=o.useMemo((()=>x.filter((e=>e<=b)).length),[b,x]),S=(0,v.Pp)(p,O.FE),C=o.useMemo((()=>S.slice(0,w)),[S,w]),k=(0,v.Pp)(p,O.s3),M=o.useCallback((e=>-1!==k.left.findIndex((t=>t.field===e))?dn.FX.LEFT:-1!==k.right.findIndex((t=>t.field===e))?dn.FX.RIGHT:void 0),[k.left,k.right]),T=o.useMemo((()=>{const e=[];for(let t=0;te.field===s.field)):e-k.left.length,v=f.hasScrollY?f.scrollbarSize:0,y=(0,So.Q)({},a,l,(0,yo.a)(l,s.computedWidth,e,x,f.columnsTotalWidth,v)),b=f.columnsTotalWidth0},`skeleton-scrollbar-filler-${t}`))}e.push((0,L.jsx)("div",{className:(0,u.Z)(g._.row,g._.rowSkeleton,0===t&&g._["row--firstVisible"]),children:o},`skeleton-row-${t}`))}return e}),[i,C,k,y,n.showCellVerticalBorder,f,x,M,a]);return(0,V.zn)(p,"columnResize",(e=>{var t;const{colDef:n,width:r}=e,o=null===(t=l.current)||void 0===t?void 0:t.querySelectorAll(`[data-field="${(0,fn.z6)(n.field)}"]`);if(!o)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const i=C.findIndex((e=>e.field===n.field)),a=M(n.field),s=a===dn.FX.LEFT,u=a===dn.FX.RIGHT,c=getComputedStyle(o[0]).getPropertyValue("--width"),d=parseInt(c,10)-r;if(o&&o.forEach((e=>{e.style.setProperty("--width",`${r}px`)})),s){var h;const e=null===(h=l.current)||void 0===h?void 0:h.querySelectorAll(`.${g._["cell--pinnedLeft"]}`);null==e||e.forEach((e=>{ko(e)>i&&(e.style.left=parseInt(getComputedStyle(e).left,10)-d+"px")}))}if(u){var p;const e=null===(p=l.current)||void 0===p?void 0:p.querySelectorAll(`.${g._["cell--pinnedRight"]}`);null==e||e.forEach((e=>{ko(e){let{theme:t}=e;return{maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${Do.Z.selectLabel}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"block"}},[`& .${Do.Z.input}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"inline-flex"}}}})),Ao=e=>{let{from:t,to:n,count:r,estimated:o}=e;return o?`${t}–${n} of ${-1!==r?r:`more than ${o>n?o:n}`}`:`${t}–${n} of ${-1!==r?r:`more than ${n}`}`},Eo=(0,s.G)((function(e,t){const n=(0,Z.l)(),i=(0,_.B)(),a=(0,v.Pp)(n,qt.O$),s=(0,v.Pp)(n,qt.RM),l=(0,v.Pp)(n,qt.UB),{paginationMode:u,loading:c,estimatedRowCount:d}=i,h=o.useMemo((()=>-1===s&&"server"===u&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{}),[c,u,s]),p=o.useMemo((()=>Math.max(0,l-1)),[l]),f=o.useMemo((()=>-1===s||a.page<=p?a.page:p),[p,a.page,s]),m=o.useCallback((e=>{const t=Number(e.target.value);n.current.setPageSize(t)}),[n]),g=o.useCallback(((e,t)=>{n.current.setPage(t)}),[n]);const y=(e=>{for(let t=0;t{let{from:t,to:n,count:r,page:o}=e;return w({from:t,to:n,count:r,page:o,estimated:S})});var w,S;return(0,L.jsx)(Oo,(0,r.Z)({component:"div",count:s,page:f,rowsPerPageOptions:y,rowsPerPage:a.pageSize,onPageChange:g,onRowsPerPageChange:m},h,b,{labelDisplayedRows:x},e,{ref:t}))}));var Zo=n(37358);const Lo=["className"],Fo=(0,N.Z)("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function jo(e){const{className:t}=e,n=(0,l.Z)(e,Lo),o=(0,_.B)(),i=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelContent"]},g.d,t)})(o);return(0,L.jsx)(Fo,(0,r.Z)({className:(0,u.Z)(i.root,t),ownerState:o},n))}const No=["className"],zo=(0,N.Z)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((e=>{let{theme:t}=e;return{padding:t.spacing(.5),display:"flex",justifyContent:"space-between"}}));function Bo(e){const{className:t}=e,n=(0,l.Z)(e,No),o=(0,_.B)(),i=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelFooter"]},g.d,t)})(o);return(0,L.jsx)(zo,(0,r.Z)({className:(0,u.Z)(i.root,t),ownerState:o},n))}var Vo=n(44706);const Ho=["className","slotProps"],$o=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),Wo=()=>!0,Go=(0,s.G)((function(e,t){const{className:n,slotProps:o={}}=e,i=(0,l.Z)(e,Ho),a=(0,_.B)(),s=(e=>{const{classes:t}=e;return(0,d.Z)({root:["panelWrapper"]},g.d,t)})(a);return(0,L.jsx)(Vo.Z,(0,r.Z)({open:!0,disableEnforceFocus:!0,isEnabled:Wo},o.TrapFocus,{children:(0,L.jsx)($o,(0,r.Z)({tabIndex:-1,className:(0,u.Z)(s.root,n),ownerState:a},i,{ref:t}))}))}));var Uo=n(32544);const qo=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Ko=["InputComponentProps"],Yo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((e=>{let{theme:t}=e;return{display:"flex",padding:t.spacing(1)}})),Xo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((e=>{let{theme:t}=e;return{flexShrink:0,justifyContent:"flex-end",marginRight:t.spacing(.5),marginBottom:t.spacing(.2)}})),Qo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),Jo=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),ei=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),ti=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),ni=e=>e.headerName||e.field,ri=new Intl.Collator,oi=(0,s.G)((function(e,t){var n,i,a,s,h,p,f,m,y;const{item:b,hasMultipleFilters:x,deleteFilter:w,applyFilterChanges:S,showMultiFilterOperators:C,disableMultiFilterOperator:k,applyMultiFilterOperatorChanges:M,focusElementRef:T,logicOperators:P=[Zo.G.And,Zo.G.Or],columnsSort:I,filterColumns:R,deleteIconProps:D={},logicOperatorInputProps:A={},operatorInputProps:E={},columnInputProps:F={},valueInputProps:j={},readOnly:N}=e,z=(0,l.Z)(e,qo),B=(0,Z.l)(),V=(0,v.Pp)(B,O.WH),H=(0,v.Pp)(B,O.qH),$=(0,v.Pp)(B,X.uf),W=(0,Ft.Z)(),G=(0,Ft.Z)(),U=(0,Ft.Z)(),q=(0,Ft.Z)(),K=(0,_.B)(),Y=(e=>{const{classes:t}=e;return(0,d.Z)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},g.d,t)})(K),Q=o.useRef(null),J=o.useRef(null),ee=$.logicOperator??Zo.G.And,te=x&&P.length>0,ne=(null===(n=K.slotProps)||void 0===n?void 0:n.baseFormControl)||{},re=((null===(i=K.slotProps)||void 0===i?void 0:i.baseSelect)||{}).native??!1,oe=(null===(a=K.slotProps)||void 0===a?void 0:a.baseInputLabel)||{},ie=(null===(s=K.slotProps)||void 0===s?void 0:s.baseSelectOption)||{},{InputComponentProps:ae}=j,se=(0,l.Z)(j,Ko),{filteredColumns:le,selectedField:ue}=o.useMemo((()=>{let e=b.field;const t=!1===V[b.field].filterable?V[b.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(void 0===R||"function"!=typeof R)return{filteredColumns:H,selectedField:e};const n=R({field:b.field,columns:H,currentFilters:(null==$?void 0:$.items)||[]});return{filteredColumns:H.filter((t=>{const r=n.includes(t.field);return t.field!==b.field||r||(e=void 0),r})),selectedField:e}}),[R,null==$?void 0:$.items,H,b.field,V]),ce=o.useMemo((()=>{switch(I){case"asc":return le.sort(((e,t)=>ri.compare(ni(e),ni(t))));case"desc":return le.sort(((e,t)=>-ri.compare(ni(e),ni(t))));default:return le}}),[le,I]),de=b.field?B.current.getColumn(b.field):null,he=o.useMemo((()=>{var e;return b.operator&&de?null===(e=de.filterOperators)||void 0===e?void 0:e.find((e=>e.value===b.operator)):null}),[b,de]),pe=o.useCallback((e=>{const t=e.target.value,n=B.current.getColumn(t);if(n.field===de.field)return;const o=n.filterOperators.find((e=>e.value===b.operator))||n.filterOperators[0];let i=!o.InputComponent||o.InputComponent!==(null==he?void 0:he.InputComponent)||n.type!==de.type?void 0:b.value;if("singleSelect"===n.type&&void 0!==i){const e=n,t=(0,Uo.sf)(e);Array.isArray(i)?i=i.filter((n=>void 0!==(0,Uo.sk)(n,t,null==e?void 0:e.getOptionValue))):void 0===(0,Uo.sk)(b.value,t,null==e?void 0:e.getOptionValue)&&(i=void 0)}S((0,r.Z)({},b,{field:t,operator:o.value,value:i}))}),[B,S,b,de,he]),fe=o.useCallback((e=>{const t=e.target.value,n=null==de?void 0:de.filterOperators.find((e=>e.value===t)),o=!(null==n?void 0:n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==he?void 0:he.InputComponent);S((0,r.Z)({},b,{operator:t,value:o?void 0:b.value}))}),[S,b,de,he]),me=o.useCallback((e=>{const t=e.target.value===Zo.G.And.toString()?Zo.G.And:Zo.G.Or;M(t)}),[M]);return o.useImperativeHandle(T,(()=>({focus:()=>{var e;(null==he?void 0:he.InputComponent)?null==Q||null===(e=Q.current)||void 0===e||e.focus():J.current.focus()}})),[he]),(0,L.jsxs)(Yo,(0,r.Z)({className:Y.root,"data-id":b.id,ownerState:K},z,{ref:t,children:[(0,L.jsx)(Xo,(0,r.Z)({variant:"standard",as:K.slots.baseFormControl},ne,D,{className:(0,u.Z)(Y.deleteIcon,ne.className,D.className),ownerState:K,children:(0,L.jsx)(K.slots.baseIconButton,(0,r.Z)({"aria-label":B.current.getLocaleText("filterPanelDeleteIconLabel"),title:B.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{w(b)},size:"small",disabled:N},null===(h=K.slotProps)||void 0===h?void 0:h.baseIconButton,{children:(0,L.jsx)(K.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,L.jsx)(Qo,(0,r.Z)({variant:"standard",as:K.slots.baseFormControl},ne,A,{sx:[te?{display:"flex"}:{display:"none"},C?{visibility:"visible"}:{visibility:"hidden"},ne.sx,A.sx],className:(0,u.Z)(Y.logicOperatorInput,ne.className,A.className),ownerState:K,children:(0,L.jsx)(K.slots.baseSelect,(0,r.Z)({inputProps:{"aria-label":B.current.getLocaleText("filterPanelLogicOperator")},value:ee??"",onChange:me,disabled:!!k||1===P.length,native:re},null===(p=K.slotProps)||void 0===p?void 0:p.baseSelect,{children:P.map((e=>(0,o.createElement)(K.slots.baseSelectOption,(0,r.Z)({},ie,{native:re,key:e.toString(),value:e.toString()}),B.current.getLocaleText((e=>{switch(e){case Zo.G.And:return"filterPanelOperatorAnd";case Zo.G.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))}))})),(0,L.jsxs)(Jo,(0,r.Z)({variant:"standard",as:K.slots.baseFormControl},ne,F,{className:(0,u.Z)(Y.columnInput,ne.className,F.className),ownerState:K,children:[(0,L.jsx)(K.slots.baseInputLabel,(0,r.Z)({},oe,{htmlFor:W,id:G,children:B.current.getLocaleText("filterPanelColumns")})),(0,L.jsx)(K.slots.baseSelect,(0,r.Z)({labelId:G,id:W,label:B.current.getLocaleText("filterPanelColumns"),value:ue??"",onChange:pe,native:re,disabled:N},null===(f=K.slotProps)||void 0===f?void 0:f.baseSelect,{children:ce.map((e=>(0,o.createElement)(K.slots.baseSelectOption,(0,r.Z)({},ie,{native:re,key:e.field,value:e.field}),ni(e))))}))]})),(0,L.jsxs)(ei,(0,r.Z)({variant:"standard",as:K.slots.baseFormControl},ne,E,{className:(0,u.Z)(Y.operatorInput,ne.className,E.className),ownerState:K,children:[(0,L.jsx)(K.slots.baseInputLabel,(0,r.Z)({},oe,{htmlFor:U,id:q,children:B.current.getLocaleText("filterPanelOperator")})),(0,L.jsx)(K.slots.baseSelect,(0,r.Z)({labelId:q,label:B.current.getLocaleText("filterPanelOperator"),id:U,value:b.operator,onChange:fe,native:re,inputRef:J,disabled:N},null===(m=K.slotProps)||void 0===m?void 0:m.baseSelect,{children:null==de||null===(y=de.filterOperators)||void 0===y?void 0:y.map((e=>(0,o.createElement)(K.slots.baseSelectOption,(0,r.Z)({},ie,{native:re,key:e.value,value:e.value}),e.label||B.current.getLocaleText(`filterOperator${(0,c.Z)(e.value)}`))))}))]})),(0,L.jsx)(ti,(0,r.Z)({variant:"standard",as:K.slots.baseFormControl},ne,se,{className:(0,u.Z)(Y.valueInput,ne.className,se.className),ownerState:K,children:(null==he?void 0:he.InputComponent)?(0,L.jsx)(he.InputComponent,(0,r.Z)({apiRef:B,item:b,applyValue:S,focusElementRef:Q,disabled:N},he.InputComponentProps,ae),b.field):null}))]}))})),ii=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],ai=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),si=(0,s.G)((function(e,t){var n,i;const a=(0,Z.l)(),s=(0,_.B)(),u=(0,v.Pp)(a,X.uf),c=(0,v.Pp)(a,O.qH),d=(0,v.Pp)(a,O.xs),h=o.useRef(null),p=o.useRef(null),{logicOperators:f=[Zo.G.And,Zo.G.Or],columnsSort:m,filterFormProps:g,getColumnForNewFilter:y,disableAddFilterButton:b=!1,disableRemoveAllButton:x=!1}=e,w=(0,l.Z)(e,ii),S=a.current.upsertFilterItem,C=o.useCallback((e=>{a.current.setFilterLogicOperator(e)}),[a]),k=o.useCallback((()=>{let e;if(y&&"function"==typeof y){const t=y({currentFilters:(null==u?void 0:u.items)||[],columns:c});if(null===t)return null;e=c.find((e=>{let{field:n}=e;return n===t}))}else e=c.find((e=>{var t;return null===(t=e.filterOperators)||void 0===t?void 0:t.length}));return e?ai(e):null}),[null==u?void 0:u.items,c,y]),M=o.useCallback((()=>{if(void 0===y||"function"!=typeof y)return k();const e=u.items.length?u.items:[k()].filter(Boolean),t=y({currentFilters:e,columns:c});if(null===t)return null;const n=c.find((e=>{let{field:n}=e;return n===t}));return n?ai(n):null}),[u.items,c,y,k]),T=o.useMemo((()=>u.items.length?u.items:(p.current||(p.current=k()),p.current?[p.current]:[])),[u.items,k]),P=T.length>1,{readOnlyFilters:I,validFilters:R}=o.useMemo((()=>T.reduce(((e,t)=>(d[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e)),{readOnlyFilters:[],validFilters:[]})),[T,d]),D=o.useCallback((()=>{const e=M();e&&a.current.upsertFilterItems([...T,e])}),[a,M,T]),A=o.useCallback((e=>{const t=1===R.length;a.current.deleteFilterItem(e),t&&a.current.hideFilterPanel()}),[a,R.length]),E=o.useCallback((()=>1===R.length&&void 0===R[0].value?(a.current.deleteFilterItem(R[0]),a.current.hideFilterPanel()):a.current.setFilterModel((0,r.Z)({},u,{items:I}),"removeAllFilterItems")),[a,I,u,R]);return o.useEffect((()=>{f.length>0&&u.logicOperator&&!f.includes(u.logicOperator)&&C(f[0])}),[f,C,u.logicOperator]),o.useEffect((()=>{R.length>0&&h.current.focus()}),[R.length]),(0,L.jsxs)(Go,(0,r.Z)({},w,{ref:t,children:[(0,L.jsxs)(jo,{children:[I.map(((e,t)=>(0,L.jsx)(oi,(0,r.Z)({item:e,applyFilterChanges:S,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:t>0,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:C,focusElementRef:null,readOnly:!0,logicOperators:f,columnsSort:m},g),null==e.id?t:e.id))),R.map(((e,t)=>(0,L.jsx)(oi,(0,r.Z)({item:e,applyFilterChanges:S,deleteFilter:A,hasMultipleFilters:P,showMultiFilterOperators:I.length+t>0,disableMultiFilterOperator:I.length+t!==1,applyMultiFilterOperatorChanges:C,focusElementRef:t===R.length-1?h:null,logicOperators:f,columnsSort:m},g),null==e.id?t+I.length:e.id)))]}),s.disableMultipleColumnsFiltering||b&&x?null:(0,L.jsxs)(Bo,{children:[b?(0,L.jsx)("span",{}):(0,L.jsx)(s.slots.baseButton,(0,r.Z)({onClick:D,startIcon:(0,L.jsx)(s.slots.filterPanelAddIcon,{})},null===(n=s.slotProps)||void 0===n?void 0:n.baseButton,{children:a.current.getLocaleText("filterPanelAddFilter")})),!x&&R.length>0?(0,L.jsx)(s.slots.baseButton,(0,r.Z)({onClick:E,startIcon:(0,L.jsx)(s.slots.filterPanelRemoveAllIcon,{})},null===(i=s.slotProps)||void 0===i?void 0:i.baseButton,{children:a.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))}));var li=n(75918),ui=n(6931),ci=n(87360);const di=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,hi=new Intl.Collator;const pi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})((e=>{let{theme:t}=e;return{padding:t.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"}})),fi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})((e=>{let{theme:t}=e;return{padding:t.spacing(1.5,3)}})),mi=(0,m.ZP)(ui.Z,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput",overridesResolver:(e,t)=>t.columnsManagementSearchInput})((e=>{let{theme:t}=e;return{[`& .${ci.Z.root}`]:{padding:t.spacing(0,1.5,0,1.5)},[`& .${ci.Z.input}::-webkit-search-decoration,\n & .${ci.Z.input}::-webkit-search-cancel-button,\n & .${ci.Z.input}::-webkit-search-results-button,\n & .${ci.Z.input}::-webkit-search-results-decoration`]:{display:"none"}}})),gi=(0,m.ZP)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})((e=>{let{theme:t}=e;return{padding:t.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${t.palette.divider}`}})),vi=(0,m.ZP)("div")((e=>{let{theme:t}=e;return{padding:t.spacing(.5,0),color:t.palette.grey[500]}}));var yi=n(32792),bi=n(73140),xi=n(87861),wi=n(72204);const Si=["children","className","classes"],Ci=(0,yi.Z)("MuiDataGrid",["panel","paper"]),ki=(0,m.ZP)(wi.Z,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),Mi=(0,m.ZP)(xi.Z,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${t.spacing(.5)})`,overflow:"auto"}})),_i=(0,s.G)(((e,t)=>{const{children:n,className:i}=e,a=(0,l.Z)(e,Si),s=(0,Z.l)(),c=(0,_.B)(),d=Ci,[h,p]=o.useState(!1),f=o.useCallback((()=>{s.current.hidePreferences()}),[s]),m=o.useCallback((e=>{"Escape"===e.key&&s.current.hidePreferences()}),[s]),g=o.useMemo((()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{p(!0)},effect:()=>()=>{p(!1)}}]),[]),[v,y]=o.useState(null);return o.useEffect((()=>{var e,t;const n=null===(t=s.current.rootElementRef)||void 0===t||null===(e=t.current)||void 0===e?void 0:e.querySelector('[data-id="gridPanelAnchor"]');n&&y(n)}),[s]),v?(0,L.jsx)(ki,(0,r.Z)({placement:"bottom-start",className:(0,u.Z)(d.panel,i),ownerState:c,anchorEl:v,modifiers:g},a,{ref:t,children:(0,L.jsx)(bi.d,{mouseEvent:"onPointerUp",touchEvent:!1,onClickAway:f,children:(0,L.jsx)(Mi,{className:d.paper,ownerState:c,elevation:8,onKeyDown:m,children:h&&n})})})):null}));var Ti=n(39422);let Pi;const Ii=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],Ri=["changeReason","unstable_updateValueOnRender"];dn.FX.LEFT,Rt.I.LEFT,dn.FX.RIGHT,Rt.I.RIGHT,dn.FX.NONE,dn.FX.VIRTUAL;const Di=(0,s.G)((function(e,t){var n,i,a;const{column:s,row:p,rowId:f,rowNode:m,align:b,colIndex:x,width:w,className:S,style:C,colSpan:k,disableDragEvents:M,isNotVisible:T,pinnedOffset:P,pinnedPosition:I,showRightBorder:R,showLeftBorder:D,onClick:O,onDoubleClick:A,onMouseDown:E,onMouseUp:Z,onMouseOver:F,onKeyDown:j,onKeyUp:N,onDragEnter:z,onDragOver:B}=e,V=(0,l.Z)(e,Ii),H=(0,y.$)(),$=(0,_.B)(),W=(0,qe.V)(),G=s.field,U=(0,v.AC)(H,kn.Am,{rowId:f,field:G}),q=U?hn.Vl.Edit:hn.Vl.View,K=H.current.getCellParamsForRow(f,G,p,{colDef:s,cellMode:q,rowNode:m,tabIndex:(0,v.Pp)(H,(()=>{const e=(0,ie.d6)(H);return e&&e.field===G&&e.id===f?0:-1})),hasFocus:(0,v.Pp)(H,(()=>{const e=(0,ie.TR)(H);return(null==e?void 0:e.id)===f&&e.field===G}))});K.api=H.current;const Y=(0,v.Pp)(H,(()=>H.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:f,field:G}))),X=(0,v.Pp)(H,mn.mf),Q=(0,v.Pp)(H,mn.zq),{hasFocus:J,isEditable:ee=!1,value:te}=K,ne="actions"===s.type&&(null===(n=s.getActions)||void 0===n?void 0:n.call(s,H.current.getRowParams(f)).some((e=>!e.props.disabled))),re="view"!==q&&ee||ne?-1:K.tabIndex,{classes:oe,getCellClassName:ae}=$,se=[(0,v.Pp)(H,(()=>H.current.unstable_applyPipeProcessors("cellClassName",[],{id:f,field:G}).filter(Boolean).join(" ")))];s.cellClassName&&se.push("function"==typeof s.cellClassName?s.cellClassName(K):s.cellClassName),"flex"===s.display&&se.push(g._["cell--flex"]),ae&&se.push(ae(K));const le=K.formattedValue??te,ue=o.useRef(null),ce=(0,h.Z)(t,ue),de=o.useRef(null),he=$.cellSelection??!1,pe=(e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,u={root:["cell",`cell--text${(0,c.Z)(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===dn.FX.LEFT&&"cell--pinnedLeft",o===dn.FX.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return(0,d.Z)(u,g.d,l)})({align:b,showLeftBorder:D,showRightBorder:R,isEditable:ee,classes:$.classes,pinnedPosition:I,isSelected:Y,isSelectionMode:he}),fe=o.useCallback((e=>t=>{const n=H.current.getCellParams(f,G||"");H.current.publishEvent(e,n,t),Z&&Z(t)}),[H,G,Z,f]),me=o.useCallback((e=>t=>{const n=H.current.getCellParams(f,G||"");H.current.publishEvent(e,n,t),E&&E(t)}),[H,G,E,f]),ge=o.useCallback(((e,t)=>n=>{if(!H.current.getRow(f))return;const r=H.current.getCellParams(f,G||"");H.current.publishEvent(e,r,n),t&&t(n)}),[H,G,f]),ve=(null===(i=X[f])||void 0===i?void 0:i[G])??!1,ye=(null===(a=Q[f])||void 0===a?void 0:a[G])??1,be=o.useMemo((()=>{if(T)return{padding:0,opacity:0,width:0,height:0,border:0};const e=(0,So.Q)((0,r.Z)({"--width":`${w}px`},C),W,I,P),t=I===dn.FX.LEFT,n=I===dn.FX.RIGHT;return ye>1&&(e.height=`calc(var(--height) * ${ye})`,e.zIndex=5,(t||n)&&(e.zIndex=6)),e}),[w,T,C,P,I,W,ye]);if(o.useEffect((()=>{if(!J||q===hn.Vl.Edit)return;const e=(0,Ut.Z)(H.current.rootElementRef.current);if(ue.current&&!ue.current.contains(e.activeElement)){const e=ue.current.querySelector('[tabindex="0"]'),t=de.current||e||ue.current;if(void 0===Pi&&document.createElement("div").focus({get preventScroll(){return Pi=!0,!1}}),Pi)t.focus({preventScroll:!0});else{const e=H.current.getScrollPosition();t.focus(),H.current.scroll(e)}}}),[J,q,H]),ve)return(0,L.jsx)("div",{"data-colindex":x,role:"presentation",style:(0,r.Z)({width:"var(--width)"},be)});let xe,we,Se=V.onFocus;if(null===U&&s.renderCell&&(xe=s.renderCell(K)),null!==U&&s.renderEditCell){const e=H.current.getRowWithUpdatedValues(f,s.field),t=(0,l.Z)(U,Ri),n=s.valueFormatter?s.valueFormatter(U.value,e,s,H):K.formattedValue,o=(0,r.Z)({},K,{row:e,formattedValue:n},t);xe=s.renderEditCell(o),se.push(g._["cell--editing"]),se.push(null==oe?void 0:oe["cell--editing"])}if(void 0===xe){const e=null==le?void 0:le.toString();xe=e,we=e}o.isValidElement(xe)&&ne&&(xe=o.cloneElement(xe,{focusElementRef:de}));const Ce=M?null:{onDragEnter:ge("cellDragEnter",z),onDragOver:ge("cellDragOver",B)};return(0,L.jsx)("div",(0,r.Z)({className:(0,u.Z)(pe.root,se,S),role:"gridcell","data-field":G,"data-colindex":x,"aria-colindex":x+1,"aria-colspan":k,"aria-rowspan":ye,style:be,title:we,tabIndex:re,onClick:ge("cellClick",O),onDoubleClick:ge("cellDoubleClick",A),onMouseOver:ge("cellMouseOver",F),onMouseDown:me("cellMouseDown"),onMouseUp:fe("cellMouseUp"),onKeyDown:ge("cellKeyDown",j),onKeyUp:ge("cellKeyUp",N)},Ce,V,{onFocus:Se,ref:ce,children:xe}))})),Oi=(0,p.X)(Di);var Ai=n(52779);const Ei=["displayOrder"],Zi=["hideMenu","colDef","id","labelledby","className","children","open"],Li=(0,m.ZP)(jt.Z)((()=>({minWidth:248}))),Fi=(0,s.G)((function(e,t){const{hideMenu:n,id:i,labelledby:a,className:s,children:c,open:d}=e,h=(0,l.Z)(e,Zi),p=o.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),St(e.key)&&n(e)}),[n]);return(0,L.jsx)(Li,(0,r.Z)({id:i,className:(0,u.Z)(g._.menuList,s),"aria-labelledby":a,onKeyDown:p,autoFocus:d},h,{ref:t,children:c}))}));var ji=n(67301),Ni=n(9580);function zi(e){const{colDef:t,onClick:n}=e,r=(0,Z.l)(),i=(0,_.B)(),a=1===(0,O.FE)(r).filter((e=>!0!==e.disableColumnMenu)).length,s=o.useCallback((e=>{a||(r.current.setColumnVisibility(t.field,!1),n(e))}),[r,t.field,n,a]);return i.disableColumnSelector||!1===t.hideable?null:(0,L.jsxs)(Lt.Z,{onClick:s,disabled:a,children:[(0,L.jsx)(ji.Z,{children:(0,L.jsx)(i.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,L.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function Bi(e){const{onClick:t}=e,n=(0,Z.l)(),r=(0,_.B)(),i=o.useCallback((e=>{t(e),n.current.showPreferences(E.y.columns)}),[n,t]);return r.disableColumnSelector?null:(0,L.jsxs)(Lt.Z,{onClick:i,children:[(0,L.jsx)(ji.Z,{children:(0,L.jsx)(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,L.jsx)(Ni.Z,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}const Vi=["defaultSlots","defaultSlotProps","slots","slotProps"],Hi={columnMenuSortItem:function(e){const{colDef:t,onClick:n}=e,r=(0,Z.l)(),i=(0,v.Pp)(r,oe.Gm),a=(0,_.B)(),s=o.useMemo((()=>{if(!t)return null;const e=i.find((e=>e.field===t.field));return null==e?void 0:e.sort}),[t,i]),l=t.sortingOrder??a.sortingOrder,u=o.useCallback((e=>{n(e);const o=e.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,o===s?null:o)}),[r,t,n,s]);if(a.disableColumnSorting||!t||!t.sortable||!l.some((e=>!!e)))return null;const c=e=>{const n=r.current.getLocaleText(e);return"function"==typeof n?n(t):n};return(0,L.jsxs)(o.Fragment,{children:[l.includes("asc")&&"asc"!==s?(0,L.jsxs)(Lt.Z,{onClick:u,"data-value":"asc",children:[(0,L.jsx)(ji.Z,{children:(0,L.jsx)(a.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,L.jsx)(Ni.Z,{children:c("columnMenuSortAsc")})]}):null,l.includes("desc")&&"desc"!==s?(0,L.jsxs)(Lt.Z,{onClick:u,"data-value":"desc",children:[(0,L.jsx)(ji.Z,{children:(0,L.jsx)(a.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,L.jsx)(Ni.Z,{children:c("columnMenuSortDesc")})]}):null,l.includes(null)&&null!=s?(0,L.jsxs)(Lt.Z,{onClick:u,children:[(0,L.jsx)(ji.Z,{}),(0,L.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:n}=e,r=(0,Z.l)(),i=(0,_.B)(),a=o.useCallback((e=>{n(e),r.current.showFilterPanel(t.field)}),[r,t.field,n]);return i.disableColumnFilter||!t.filterable?null:(0,L.jsxs)(Lt.Z,{onClick:a,children:[(0,L.jsx)(ji.Z,{children:(0,L.jsx)(i.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,L.jsx)(Ni.Z,{children:r.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(e){return(0,L.jsxs)(o.Fragment,{children:[(0,L.jsx)(zi,(0,r.Z)({},e)),(0,L.jsx)(Bi,(0,r.Z)({},e))]})}},$i={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Wi=(0,s.G)((function(e,t){const{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:s}=e,u=(0,l.Z)(e,Vi),c=(e=>{const t=(0,y.$)(),n=(0,_.B)(),{defaultSlots:i,defaultSlotProps:a,slots:s={},slotProps:u={},hideMenu:c,colDef:d,addDividers:h=!0}=e,p=o.useMemo((()=>(0,r.Z)({},i,s)),[i,s]),f=o.useMemo((()=>{if(!u||0===Object.keys(u).length)return a;const e=(0,r.Z)({},u);return Object.entries(a).forEach((t=>{let[n,o]=t;e[n]=(0,r.Z)({},o,u[n]||{})})),e}),[a,u]),m=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),g=o.useMemo((()=>{const e=Object.keys(i);return Object.keys(s).filter((t=>!e.includes(t)))}),[s,i]);return o.useMemo((()=>{const e=Array.from(new Set([...m,...g])).filter((e=>null!=p[e])).sort(((e,t)=>{const n=f[e],r=f[t];return(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)-(Number.isFinite(null==r?void 0:r.displayOrder)?r.displayOrder:100)}));return e.reduce(((t,o,i)=>{let a={colDef:d,onClick:c};const s=f[o];if(s){const e=(0,l.Z)(s,Ei);a=(0,r.Z)({},a,e)}return h&&i!==e.length-1?[...t,[p[o],a],[n.slots.baseDivider,{}]]:[...t,[p[o],a]]}),[])}),[h,d,m,c,p,f,g,n.slots.baseDivider])})((0,r.Z)({},u,{defaultSlots:n,defaultSlotProps:i,slots:a,slotProps:s}));return(0,L.jsx)(Fi,(0,r.Z)({},u,{ref:t,children:c.map(((e,t)=>{let[n,o]=e;return(0,L.jsx)(n,(0,r.Z)({},o),t)}))}))})),Gi=(0,s.G)((function(e,t){return(0,L.jsx)(Wi,(0,r.Z)({},e,{ref:t,defaultSlots:Hi,defaultSlotProps:$i}))}));const Ui=(0,s.G)((function(e,t){const n=(0,Z.l)().current.getLocaleText("noResultsOverlayLabel");return(0,L.jsx)(vo,(0,r.Z)({},e,{ref:t,children:n}))}));var qi=n(35889),Ki=n(62045);const Yi=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=(0,qi.Z)({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}};var Xi=n(97136),Qi=n(38358),Ji=n(71959),ea=n(80706),ta=n(19577);function na(e){return(0,ta.ZP)("MuiBadge",e)}const ra=(0,yi.Z)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),oa=(0,m.ZP)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),ia=(0,m.ZP)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${(0,ea.Z)(n.anchorOrigin.vertical)}${(0,ea.Z)(n.anchorOrigin.horizontal)}${(0,ea.Z)(n.overlap)}`],"default"!==n.color&&t[`color${(0,ea.Z)(n.color)}`],n.invisible&&t.invisible]}})((0,Xi.Z)((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.entries(t.palette).filter((0,Qi.Z)(["contrastText"])).map((e=>{let[n]=e;return{props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText}}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ra.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})));function aa(e){return{vertical:(null==e?void 0:e.vertical)??"top",horizontal:(null==e?void 0:e.horizontal)??"right"}}const sa=o.forwardRef((function(e,t){const n=(0,Ji.i)({props:e,name:"MuiBadge"}),{anchorOrigin:r,className:o,classes:i,component:a,components:s={},componentsProps:l={},children:c,overlap:h="rectangular",color:p="default",invisible:f=!1,max:m=99,badgeContent:g,slots:v,slotProps:y,showZero:b=!1,variant:x="standard",...w}=n,{badgeContent:S,invisible:C,max:k,displayValue:M}=Yi({max:m,invisible:f,badgeContent:g,showZero:b}),_=(0,qi.Z)({anchorOrigin:aa(r),color:p,overlap:h,variant:x,badgeContent:g}),T=C||null==S&&"dot"!==x,{color:P=p,overlap:I=h,anchorOrigin:R,variant:D=x}=T?_:n,O=aa(R),A="dot"!==D?M:void 0,E={...n,badgeContent:S,invisible:T,max:k,displayValue:A,showZero:b,anchorOrigin:O,color:P,overlap:I,variant:D},Z=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${(0,ea.Z)(n.vertical)}${(0,ea.Z)(n.horizontal)}`,`anchorOrigin${(0,ea.Z)(n.vertical)}${(0,ea.Z)(n.horizontal)}${(0,ea.Z)(o)}`,`overlap${(0,ea.Z)(o)}`,"default"!==t&&`color${(0,ea.Z)(t)}`]};return(0,d.Z)(s,na,a)})(E),F=(null==v?void 0:v.root)??s.Root??oa,j=(null==v?void 0:v.badge)??s.Badge??ia,N=(null==y?void 0:y.root)??l.root,z=(null==y?void 0:y.badge)??l.badge,B=(0,Ki.Z)({elementType:F,externalSlotProps:N,externalForwardedProps:w,additionalProps:{ref:t,as:a},ownerState:E,className:(0,u.Z)(null==N?void 0:N.className,Z.root,o)}),V=(0,Ki.Z)({elementType:j,externalSlotProps:z,ownerState:E,className:(0,u.Z)(Z.badge,null==z?void 0:z.className)});return(0,L.jsxs)(F,{...B,children:[c,(0,L.jsx)(j,{...V,children:A})]})}));var la=n(12242),ua=n(99481),ca=n(44206),da=n(99551),ha=n(46724),pa=n(16639),fa=n(32134),ma=n(95359),ga=n(630),va=n(48356);const ya=["sortingOrder"],ba=o.memo((function(e){const{sortingOrder:t}=e,n=(0,l.Z)(e,ya),o=(0,_.B)(),[i]=t,a="asc"===i?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?(0,L.jsx)(a,(0,r.Z)({},n)):null}));var xa=n(57698);const wa=(0,xa.Z)((0,L.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Sa=(0,xa.Z)((0,L.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Ca=(0,xa.Z)((0,L.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),ka=(0,xa.Z)((0,L.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ma=(0,xa.Z)((0,L.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),_a=(0,xa.Z)((0,L.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),Ta=(0,xa.Z)((0,L.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),Pa=((0,xa.Z)((0,L.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,xa.Z)((0,L.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),(0,xa.Z)((0,L.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")),Ia=(0,xa.Z)((0,L.jsx)("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),Ra=(0,xa.Z)((0,L.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Da=(0,xa.Z)((0,L.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Oa=(0,xa.Z)((0,L.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Aa=(0,xa.Z)((0,L.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),Ea=(0,xa.Z)((0,L.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"),Za=(0,xa.Z)((0,L.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),La=(0,xa.Z)((0,L.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Fa=(0,xa.Z)((0,L.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),ja=(0,xa.Z)((0,L.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),Na=(0,xa.Z)((0,L.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),za=(0,xa.Z)((0,L.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ba=(0,xa.Z)((0,L.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),Va=(0,xa.Z)((0,L.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Ha=(0,xa.Z)((0,L.jsx)("g",{children:(0,L.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),$a=(0,xa.Z)((0,L.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Wa=((0,xa.Z)((0,L.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),(0,xa.Z)((0,L.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),Ga=["native"];const Ua={booleanCellTrueIcon:za,booleanCellFalseIcon:Ea,columnMenuIcon:Aa,openFilterButtonIcon:Ma,filterPanelDeleteIcon:Ea,columnFilteredIcon:_a,columnSelectorIcon:Pa,columnUnsortedIcon:ba,columnSortedAscendingIcon:wa,columnSortedDescendingIcon:Sa,columnResizeIcon:Ia,densityCompactIcon:Ra,densityStandardIcon:Da,densityComfortableIcon:Oa,exportIcon:Na,moreActionsIcon:Ba,treeDataCollapseIcon:ka,treeDataExpandIcon:Ca,groupingCriteriaCollapseIcon:ka,groupingCriteriaExpandIcon:Ca,detailPanelExpandIcon:Za,detailPanelCollapseIcon:La,rowReorderIcon:ja,quickFilterIcon:Ta,quickFilterClearIcon:Ea,columnMenuHideIcon:Va,columnMenuSortAscendingIcon:wa,columnMenuSortDescendingIcon:Sa,columnMenuFilterIcon:_a,columnMenuManageColumnsIcon:Ha,columnMenuClearIcon:$a,loadIcon:Fa,filterPanelAddIcon:Za,filterPanelRemoveAllIcon:Wa,columnReorderIcon:ja},qa=(0,r.Z)({},Ua,{baseBadge:sa,baseCheckbox:la.Z,baseDivider:ua.Z,baseTextField:ui.Z,baseFormControl:ca.Z,baseSelect:da.Z,baseButton:ha.Z,baseIconButton:pa.Z,baseInputAdornment:fa.Z,baseTooltip:ma.Z,basePopper:wi.Z,baseInputLabel:ga.Z,baseSelectOption:function(e){let{native:t}=e,n=(0,l.Z)(e,Ga);return t?(0,L.jsx)("option",(0,r.Z)({},n)):(0,L.jsx)(Lt.Z,(0,r.Z)({},n))},baseChip:va.Z}),Ka=(0,r.Z)({},qa,{cell:Oi,skeletonCell:qr,columnHeaderFilterIconButton:function(e){return e.counter?(0,L.jsx)(Qr,(0,r.Z)({},e)):null},columnHeaderSortIcon:to,columnMenu:Gi,columnHeaders:Ai.n,detailPanels:function(e){return null},footer:lo,footerRowCount:ho,toolbar:null,pinnedRows:function(e){return null},loadingOverlay:Po,noResultsOverlay:Ui,noRowsOverlay:Io,pagination:Eo,filterPanel:si,columnsPanel:function(e){var t;const n=(0,_.B)();return(0,L.jsx)(Go,(0,r.Z)({},e,{children:(0,L.jsx)(n.slots.columnsManagement,(0,r.Z)({},null===(t=n.slotProps)||void 0===t?void 0:t.columnsManagement))}))},columnsManagement:function(e){var t,n,i,a;const s=(0,Z.l)(),l=o.useRef(null),u=(0,v.Pp)(s,O.d$),c=(0,en.Z)((()=>(0,O.g0)(s))).current,h=(0,v.Pp)(s,O.g0),p=(0,_.B)(),[f,m]=o.useState(""),y=(e=>{const{classes:t}=e;return(0,d.Z)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},g.d,t)})(p),{sort:b,searchPredicate:x=di,autoFocusSearchField:w=!0,disableShowHideToggle:S=!1,disableResetButton:C=!1,toggleAllMode:k="all",getTogglableColumns:M,searchInputProps:T}=e,P=o.useMemo((()=>((e,t)=>{const n=new Set(Object.keys(e).filter((t=>!1===e[t]))),r=new Set(Object.keys(t).filter((e=>!1===t[e])));if(n.size!==r.size)return!1;let o=!0;return n.forEach((e=>{r.has(e)||(o=!1)})),o})(h,c)),[h,c]),I=o.useMemo((()=>{switch(b){case"asc":return[...u].sort(((e,t)=>hi.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...u].sort(((e,t)=>-hi.compare(e.headerName||e.field,t.headerName||t.field)));default:return u}}),[u,b]),R=e=>{const{name:t}=e.target;s.current.setColumnVisibility(t,!1===h[t])},D=o.useMemo((()=>{const e=M?M(I):null,t=e?I.filter((t=>{let{field:n}=t;return e.includes(n)})):I;return f?t.filter((e=>x(e,f.toLowerCase()))):t}),[I,f,x,M]),A=o.useCallback((e=>{const t=(0,O.g0)(s),n=(0,r.Z)({},t),o=M?M(u):null;return("filteredOnly"===k?D:u).forEach((t=>{t.hideable&&(null==o||o.includes(t.field))&&(e?delete n[t.field]:n[t.field]=!1)})),s.current.setColumnVisibilityModel(n)}),[s,u,M,k,D]),E=o.useCallback((e=>{m(e.target.value)}),[]),F=o.useMemo((()=>D.filter((e=>e.hideable))),[D]),j=o.useMemo((()=>F.every((e=>null==h[e.field]||!1!==h[e.field]))),[h,F]),N=o.useMemo((()=>F.every((e=>!1===h[e.field]))),[h,F]),z=o.useRef(null);o.useEffect((()=>{w?l.current.focus():z.current&&"function"==typeof z.current.focus&&z.current.focus()}),[w]);let B=!1;const V=e=>!1===B&&!1!==e.hideable&&(B=!0,!0),H=o.useCallback((()=>{m(""),l.current.focus()}),[]);return(0,L.jsxs)(o.Fragment,{children:[(0,L.jsx)(fi,{className:y.header,ownerState:p,children:(0,L.jsx)(mi,(0,r.Z)({as:p.slots.baseTextField,ownerState:p,placeholder:s.current.getLocaleText("columnsManagementSearchTitle"),inputRef:l,className:y.searchInput,value:f,onChange:E,variant:"outlined",size:"small",type:"search",InputProps:{startAdornment:(0,L.jsx)(p.slots.baseInputAdornment,{position:"start",children:(0,L.jsx)(p.slots.quickFilterIcon,{})}),endAdornment:(0,L.jsx)(p.slots.baseIconButton,(0,r.Z)({"aria-label":s.current.getLocaleText("columnsManagementDeleteIconLabel"),size:"small",sx:[f?{visibility:"visible"}:{visibility:"hidden"}],tabIndex:-1,onClick:H},null===(t=p.slotProps)||void 0===t?void 0:t.baseIconButton,{children:(0,L.jsx)(p.slots.quickFilterClearIcon,{fontSize:"small"})}))},inputProps:{"aria-label":s.current.getLocaleText("columnsManagementSearchTitle")},autoComplete:"off",fullWidth:!0},null===(n=p.slotProps)||void 0===n?void 0:n.baseTextField,T))}),(0,L.jsxs)(pi,{className:y.root,ownerState:p,children:[D.map((e=>{var t;return(0,L.jsx)(li.Z,{className:y.row,control:(0,L.jsx)(p.slots.baseCheckbox,(0,r.Z)({disabled:!1===e.hideable,checked:!1!==h[e.field],onClick:R,name:e.field,sx:{p:.5},inputRef:V(e)?z:void 0},null===(t=p.slotProps)||void 0===t?void 0:t.baseCheckbox)),label:e.headerName||e.field},e.field)})),0===D.length&&(0,L.jsx)(vi,{ownerState:p,children:s.current.getLocaleText("columnsManagementNoColumns")})]}),S&&C||!(D.length>0)?null:(0,L.jsxs)(gi,{ownerState:p,className:y.footer,children:[S?(0,L.jsx)("span",{}):(0,L.jsx)(li.Z,{control:(0,L.jsx)(p.slots.baseCheckbox,(0,r.Z)({disabled:0===F.length,checked:j,indeterminate:!j&&!N,onClick:()=>A(!j),name:s.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},null===(i=p.slotProps)||void 0===i?void 0:i.baseCheckbox)),label:s.current.getLocaleText("columnsManagementShowHideAllText")}),C?null:(0,L.jsx)(p.slots.baseButton,(0,r.Z)({onClick:()=>s.current.setColumnVisibilityModel(c),disabled:P},null===(a=p.slotProps)||void 0===a?void 0:a.baseButton,{children:s.current.getLocaleText("columnsManagementReset")}))]})]})},panel:_i,row:Ti.J});function Ya(e){return o.useMemo((()=>function(e){var t;if(null===(t=e.slotProps)||void 0===t?void 0:t.root)return e;const n=Object.keys(e);if(!n.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const r={},o=e.forwardedProps??{};for(let t=0;t{const t=Ya((0,zr.Z)({props:e,name:"MuiDataGrid"})),n=o.useMemo((()=>(0,r.Z)({},Br,t.localeText)),[t.localeText]),i=o.useMemo((()=>function(e){let{defaultSlots:t,slots:n}=e;const o=n;if(!o||0===Object.keys(o).length)return t;const i=(0,r.Z)({},t);return Object.keys(o).forEach((e=>{const t=e;void 0!==o[t]&&(i[t]=o[t])})),i}({defaultSlots:Qa,slots:t.slots})),[t.slots]),a=o.useMemo((()=>Object.keys(qn).reduce(((e,n)=>(e[n]=t[n]??qn[n],e)),{})),[t]);return o.useMemo((()=>(0,r.Z)({},t,a,{localeText:n,slots:i},Xa)),[t,n,i,a])},es={hooks:{useGridAriaAttributes:()=>{const e=(0,y.$)(),t=(0,_.B)(),n=(0,v.Pp)(e,O.FE),r=(0,v.Pp)(e,X.IQ),o=(0,v.Pp)(e,ae.uW),i=(0,v.Pp)(e,Q.J5);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":(0,Ve.Hs)(t)}},useGridRowAriaAttributes:()=>{const e=(0,y.$)(),t=(0,v.Pp)(e,He.z8),n=(0,v.Pp)(e,ae.uW);return o.useCallback(((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=void 0!==t[r.id]),i}),[e,t,n])}}},ts=(0,s.G)((function(e,t){var n;const o=Ja(e),i=Nr(o.apiRef,o);return(0,L.jsx)(Ue,{privateApiRef:i,configuration:es,props:o,children:(0,L.jsx)(Be,(0,r.Z)({className:o.className,style:o.style,sx:o.sx},o.forwardedProps,null===(n=o.slotProps)||void 0===n?void 0:n.root,{ref:t}))})})),ns=o.memo(ts);ts.propTypes={apiRef:a().shape({current:a().object.isRequired}),"aria-label":a().string,"aria-labelledby":a().string,autoHeight:a().bool,autoPageSize:a().bool,autosizeOnMount:a().bool,autosizeOptions:a().shape({columns:a().arrayOf(a().string),disableColumnVirtualization:a().bool,expand:a().bool,includeHeaders:a().bool,includeOutliers:a().bool,outliersFactor:a().number}),cellModesModel:a().object,checkboxSelection:a().bool,classes:a().object,clipboardCopyCellDelimiter:a().string,columnBufferPx:a().number,columnGroupHeaderHeight:a().number,columnGroupingModel:a().arrayOf(a().object),columnHeaderHeight:a().number,columns:a().arrayOf(a().object).isRequired,columnVisibilityModel:a().object,density:a().oneOf(["comfortable","compact","standard"]),disableAutosize:a().bool,disableColumnFilter:a().bool,disableColumnMenu:a().bool,disableColumnResize:a().bool,disableColumnSelector:a().bool,disableColumnSorting:a().bool,disableDensitySelector:a().bool,disableEval:a().bool,disableMultipleRowSelection:a().bool,disableRowSelectionOnClick:a().bool,disableVirtualization:a().bool,editMode:a().oneOf(["cell","row"]),estimatedRowCount:a().number,experimentalFeatures:a().shape({warnIfFocusStateIsNotSynced:a().bool}),filterDebounceMs:a().number,filterMode:a().oneOf(["client","server"]),filterModel:a().shape({items:a().arrayOf(a().shape({field:a().string.isRequired,id:a().oneOfType([a().number,a().string]),operator:a().string.isRequired,value:a().any})).isRequired,logicOperator:a().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:a().bool,quickFilterLogicOperator:a().oneOf(["and","or"]),quickFilterValues:a().array}),forwardedProps:a().object,getCellClassName:a().func,getDetailPanelContent:a().func,getEstimatedRowHeight:a().func,getRowClassName:a().func,getRowHeight:a().func,getRowId:a().func,getRowSpacing:a().func,hideFooter:a().bool,hideFooterPagination:a().bool,hideFooterSelectedRowCount:a().bool,ignoreDiacritics:a().bool,ignoreValueFormatterDuringExport:a().oneOfType([a().shape({clipboardExport:a().bool,csvExport:a().bool}),a().bool]),indeterminateCheckboxAction:a().oneOf(["deselect","select"]),initialState:a().object,isCellEditable:a().func,isRowSelectable:a().func,keepNonExistentRowsSelected:a().bool,loading:a().bool,localeText:a().object,logger:a().shape({debug:a().func.isRequired,error:a().func.isRequired,info:a().func.isRequired,warn:a().func.isRequired}),logLevel:a().oneOf(["debug","error","info","warn",!1]),nonce:a().string,onCellClick:a().func,onCellDoubleClick:a().func,onCellEditStart:a().func,onCellEditStop:a().func,onCellKeyDown:a().func,onCellModesModelChange:a().func,onClipboardCopy:a().func,onColumnHeaderClick:a().func,onColumnHeaderContextMenu:a().func,onColumnHeaderDoubleClick:a().func,onColumnHeaderEnter:a().func,onColumnHeaderLeave:a().func,onColumnHeaderOut:a().func,onColumnHeaderOver:a().func,onColumnOrderChange:a().func,onColumnResize:a().func,onColumnVisibilityModelChange:a().func,onColumnWidthChange:a().func,onDensityChange:a().func,onFilterModelChange:a().func,onMenuClose:a().func,onMenuOpen:a().func,onPaginationMetaChange:a().func,onPaginationModelChange:a().func,onPreferencePanelClose:a().func,onPreferencePanelOpen:a().func,onProcessRowUpdateError:a().func,onResize:a().func,onRowClick:a().func,onRowCountChange:a().func,onRowDoubleClick:a().func,onRowEditStart:a().func,onRowEditStop:a().func,onRowModesModelChange:a().func,onRowSelectionModelChange:a().func,onSortModelChange:a().func,onStateChange:a().func,pageSizeOptions:a().arrayOf(a().oneOfType([a().number,a().shape({label:a().string.isRequired,value:a().number.isRequired})]).isRequired),pagination:a().oneOf([!0]),paginationMeta:a().shape({hasNextPage:a().bool}),paginationMode:a().oneOf(["client","server"]),paginationModel:a().shape({page:a().number.isRequired,pageSize:a().number.isRequired}),processRowUpdate:a().func,resetPageOnSortFilter:a().bool,resizeThrottleMs:a().number,rowBufferPx:a().number,rowCount:a().number,rowHeight:a().number,rowModesModel:a().object,rowPositionsDebounceMs:a().number,rows:a().arrayOf(a().object),rowSelection:a().bool,rowSelectionModel:a().oneOfType([a().arrayOf(a().oneOfType([a().number,a().string]).isRequired),a().number,a().string]),rowSpacingType:a().oneOf(["border","margin"]),scrollbarSize:a().number,showCellVerticalBorder:a().bool,showColumnVerticalBorder:a().bool,slotProps:a().object,slots:a().object,sortingMode:a().oneOf(["client","server"]),sortingOrder:a().arrayOf(a().oneOf(["asc","desc"])),sortModel:a().arrayOf(a().shape({field:a().string.isRequired,sort:a().oneOf(["asc","desc"])})),sx:a().oneOfType([a().arrayOf(a().oneOfType([a().func,a().object,a().bool])),a().func,a().object]),unstable_rowSpanning:a().bool,virtualizeColumnsWithAutoRowHeight:a().bool}},793:function(e,t,n){"use strict";n.d(t,{w:()=>y,W:()=>v});var r=n(40182),o=n(90850),i=n(73079),a=n(32123),s=n(95806),l=n(38952),u=n(30341),c=n(55856),d=n(96521),h=n(21221),p=n(98841),f=n(77928);const m=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function g(e){var t;const{colDef:n,id:o,hasFocus:g,tabIndex:v,position:y="bottom-end",focusElementRef:b}=e,x=(0,i.Z)(e,m),[w,S]=a.useState(-1),[C,k]=a.useState(!1),M=(0,p.l)(),_=a.useRef(null),T=a.useRef(null),P=a.useRef(!1),I=a.useRef({}),R=(0,l.V)(),D=(0,u.Z)(),O=(0,u.Z)(),A=(0,h.B)();if(!(e=>"function"==typeof e.getActions)(n))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const E=n.getActions(M.current.getRowParams(o)),Z=E.filter((e=>!e.props.showInMenu)),L=E.filter((e=>e.props.showInMenu)),F=Z.length+(L.length?1:0);a.useLayoutEffect((()=>{g||Object.entries(I.current).forEach((e=>{let[t,n]=e;null==n||n.stop({},(()=>{delete I.current[t]}))}))}),[g]),a.useEffect((()=>{if(w<0||!_.current)return;if(w>=_.current.children.length)return;_.current.children[w].focus({preventScroll:!0})}),[w]),a.useEffect((()=>{g||(S(-1),P.current=!1)}),[g]),a.useImperativeHandle(b,(()=>({focus(){if(!P.current){const e=E.findIndex((e=>!e.props.disabled));S(e)}}})),[E]),a.useEffect((()=>{w>=F&&S(F-1)}),[w,F]);const j=()=>{k(!1)},N=e=>t=>{I.current[e]=t},z=(e,t)=>n=>{S(e),P.current=!0,t&&t(n)};return(0,f.jsxs)("div",(0,r.Z)({role:"menu",ref:_,tabIndex:-1,className:c._.actionsCell,onKeyDown:e=>{if(F<=1)return;const t=(e,n)=>{var r;if(e<0||e>E.length)return e;const o=("left"===n?-1:1)*(R?-1:1);return(null===(r=E[e+o])||void 0===r?void 0:r.props.disabled)?t(e+o,n):e+o};let n=w;"ArrowRight"===e.key?n=t(w,"right"):"ArrowLeft"===e.key&&(n=t(w,"left")),n<0||n>=F||n!==w&&(e.preventDefault(),e.stopPropagation(),S(n))}},x,{children:[Z.map(((e,t)=>a.cloneElement(e,{key:t,touchRippleRef:N(t),onClick:z(t,e.props.onClick),tabIndex:w===t?v:-1}))),L.length>0&&O&&(0,f.jsx)(A.slots.baseIconButton,(0,r.Z)({ref:T,id:O,"aria-label":M.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":C,"aria-controls":C?D:void 0,role:"menuitem",size:"small",onClick:()=>{C?j():(k(!0),S(F-1),P.current=!0)},touchRippleRef:N(O),tabIndex:w===Z.length?v:-1},null===(t=A.slotProps)||void 0===t?void 0:t.baseIconButton,{children:(0,f.jsx)(A.slots.moreActionsIcon,{fontSize:"small"})})),L.length>0&&(0,f.jsx)(d.r,{open:C,target:T.current,position:y,onClose:j,children:(0,f.jsx)(s.Z,{id:D,className:c._.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&j()},"aria-labelledby":O,variant:"menu",autoFocusItem:!0,children:L.map(((e,t)=>a.cloneElement(e,{key:t,closeMenu:j})))})})]}))}const v="actions",y=(0,r.Z)({},o.z,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,f.jsx)(g,(0,r.Z)({},e)),getApplyQuickFilterFn:void 0})},17988:function(e,t,n){"use strict";n.d(t,{p:()=>R});var r=n(40182),o=n(90850),i=n(73079),a=n(32123),s=n(42152),l=n(2105),u=n(10694),c=n(55856),d=n(21221),h=n(98841),p=n(54924),f=n(97616),m=n(77928);const g=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function v(e){const{value:t,rowNode:n}=e,o=(0,i.Z)(e,g),p=(0,h.l)(),f=(0,d.B)(),v=(e=>{const{classes:t}=e;return(0,s.Z)({root:["booleanCell"]},c.d,t)})({classes:f.classes}),y=(0,l.Pp)(p,u.Lq)>0&&"group"===n.type&&!1===f.treeData,b=a.useMemo((()=>t?f.slots.booleanCellTrueIcon:f.slots.booleanCellFalseIcon),[f.slots.booleanCellFalseIcon,f.slots.booleanCellTrueIcon,t]);return y&&void 0===t?null:(0,m.jsx)(b,(0,r.Z)({fontSize:"small",className:v.root,titleAccess:p.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},o))}const y=a.memo(v);var b=n(90496),x=n(30341),w=n(14902);const S=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function C(e){var t;const{id:n,value:o,field:l,className:u,hasFocus:p,onValueChange:f}=e,g=(0,i.Z)(e,S),v=(0,h.l)(),y=a.useRef(null),C=(0,x.Z)(),[k,M]=a.useState(o),_=(0,d.B)(),T=(e=>{const{classes:t}=e;return(0,s.Z)({root:["editBooleanCell"]},c.d,t)})({classes:_.classes}),P=a.useCallback((async e=>{const t=e.target.checked;f&&await f(e,t),M(t),await v.current.setEditCellValue({id:n,field:l,value:t},e)}),[v,l,n,f]);return a.useEffect((()=>{M(o)}),[o]),(0,w.Z)((()=>{p&&y.current.focus()}),[p]),(0,m.jsx)("label",(0,r.Z)({htmlFor:C,className:(0,b.Z)(T.root,u)},g,{children:(0,m.jsx)(_.slots.baseCheckbox,(0,r.Z)({id:C,inputRef:y,checked:Boolean(k),onChange:P,size:"small"},null===(t=_.slotProps)||void 0===t?void 0:t.baseCheckbox))}))}var k=n(38220),M=n(99289);const _=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],T=e=>"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0,P=(0,M.ZP)("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function I(e){var t,n,o;const{item:s,applyValue:l,apiRef:u,focusElementRef:c,clearButton:h,tabIndex:p,label:f,variant:g="standard"}=e,v=(0,i.Z)(e,_),[y,b]=a.useState(T(s.value)),w=(0,d.B)(),S=(0,x.Z)(),C=(0,x.Z)(),k=(null===(t=w.slotProps)||void 0===t?void 0:t.baseSelect)||{},M=k.native??!1,I=(null===(n=w.slotProps)||void 0===n?void 0:n.baseSelectOption)||{},R=a.useCallback((e=>{const t=T(e.target.value);b(t),l((0,r.Z)({},s,{value:t}))}),[l,s]);a.useEffect((()=>{b(T(s.value))}),[s.value]);const D=f??u.current.getLocaleText("filterPanelInputLabel");return(0,m.jsxs)(P,{children:[(0,m.jsxs)(w.slots.baseFormControl,{fullWidth:!0,children:[(0,m.jsx)(w.slots.baseInputLabel,(0,r.Z)({},null===(o=w.slotProps)||void 0===o?void 0:o.baseInputLabel,{id:S,shrink:!0,variant:g,children:D})),(0,m.jsxs)(w.slots.baseSelect,(0,r.Z)({labelId:S,id:C,label:D,value:void 0===y?"":String(y),onChange:R,variant:g,notched:"outlined"===g||void 0,native:M,displayEmpty:!0,inputProps:{ref:c,tabIndex:p}},v,k,{children:[(0,m.jsx)(w.slots.baseSelectOption,(0,r.Z)({},I,{native:M,value:"",children:u.current.getLocaleText("filterValueAny")})),(0,m.jsx)(w.slots.baseSelectOption,(0,r.Z)({},I,{native:M,value:"true",children:u.current.getLocaleText("filterValueTrue")})),(0,m.jsx)(w.slots.baseSelectOption,(0,r.Z)({},I,{native:M,value:"false",children:u.current.getLocaleText("filterValueFalse")}))]}))]}),h]})}const R=(0,r.Z)({},o.z,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:e=>e.field!==f.KK&&(0,p.I7)(e.rowNode)?"":(0,m.jsx)(y,(0,r.Z)({},e)),renderEditCell:e=>(0,m.jsx)(C,(0,r.Z)({},e)),sortComparator:k.GH,valueFormatter:(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=T(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:I}],getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)})},98873:function(e,t,n){"use strict";n.d(t,{n:()=>_,e:()=>M});var r=n(40182),o=n(32123),i=n(73079),a=n(42152),s=n(84075),l=n(53831),u=n(98841),c=n(21221),d=n(55856),h=n(2105),p=n(64201),f=n(77928);const m=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],g=(0,l.G)((function(e,t){var n,l;const{field:g,id:v,rowNode:y,hasFocus:b,tabIndex:x}=e,w=(0,i.Z)(e,m),S=(0,u.l)(),C=(0,c.B)(),k=(e=>{const{classes:t}=e;return(0,a.Z)({root:["checkboxInput"]},d.d,t)})({classes:C.classes}),M=o.useRef(null),_=o.useRef(null),T=(0,s.Z)(M,t);o.useLayoutEffect((()=>{if(0===x){const e=S.current.getCellElement(v,g);e&&(e.tabIndex=-1)}}),[S,x,v,g]),o.useEffect((()=>{if(b){var e;const t=null===(e=M.current)||void 0===e?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else _.current&&_.current.stop({})}),[b]);const P=o.useCallback((e=>{" "===e.key&&e.stopPropagation()}),[]),I=S.current.isRowSelectable(v),R=(0,p.m8)(v,(null===(n=C.rowSelectionPropagation)||void 0===n?void 0:n.parents)??!1),{isIndeterminate:D,isChecked:O}=(0,h.Pp)(S,R,h.vV);if("footer"===y.type||"pinnedRow"===y.type)return null;const A="select"===C.indeterminateCheckboxAction?O&&!D:O,E=S.current.getLocaleText(A?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,f.jsx)(C.slots.baseCheckbox,(0,r.Z)({tabIndex:x,checked:A,onChange:e=>{const t={value:e.target.checked,id:v};S.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:k.root,inputProps:{"aria-label":E,name:"select_row"},onKeyDown:P,indeterminate:D,disabled:!I,touchRippleRef:_},null===(l=C.slotProps)||void 0===l?void 0:l.baseCheckbox,w,{ref:T}))}));var v=n(14695),y=n(84708),b=n(88153),x=n(10780);const w=["field","colDef"],S=(0,l.G)((function(e,t){var n;const s=(0,i.Z)(e,w),[,l]=o.useState(!1),m=(0,u.l)(),g=(0,c.B)(),S=(e=>{const{classes:t}=e;return(0,a.Z)({root:["checkboxInput"]},d.d,t)})({classes:g.classes}),C=(0,h.Pp)(m,v.X5),k=(0,h.Pp)(m,y.Y1),M=(0,h.Pp)(m,b.zn),_=(0,h.Pp)(m,x.Yp),T=o.useMemo((()=>"function"!=typeof g.isRowSelectable?k:k.filter((e=>!!g.keepNonExistentRowsSelected||!!m.current.getRow(e)&&g.isRowSelectable(m.current.getRowParams(e))))),[m,g.isRowSelectable,k,g.keepNonExistentRowsSelected]),P=o.useMemo((()=>(g.pagination&&g.checkboxSelectionVisibleOnly?_:M).reduce(((e,t)=>(e[t]=!0,e)),{})),[g.pagination,g.checkboxSelectionVisibleOnly,_,M]),I=o.useMemo((()=>T.filter((e=>P[e])).length),[T,P]),R=I>0&&I0,O=null!==C&&C.field===e.field?0:-1;o.useLayoutEffect((()=>{const t=m.current.getColumnHeaderElement(e.field);0===O&&t&&(t.tabIndex=-1)}),[O,m,e.field]);const A=o.useCallback((e=>{" "===e.key&&m.current.publishEvent("headerSelectionCheckboxChange",{value:!D})}),[m,D]),E=o.useCallback((()=>{l((e=>!e))}),[]);o.useEffect((()=>m.current.subscribeEvent("rowSelectionChange",E)),[m,E]);const Z="select"===g.indeterminateCheckboxAction?D&&!R:D,L=m.current.getLocaleText(Z?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,f.jsx)(g.slots.baseCheckbox,(0,r.Z)({indeterminate:R,checked:Z,onChange:e=>{const t={value:e.target.checked};m.current.publishEvent("headerSelectionCheckboxChange",t)},className:S.root,inputProps:{"aria-label":L,name:"select_all_rows"},tabIndex:O,onKeyDown:A,disabled:!(0,p.Hs)(g)},null===(n=g.slotProps)||void 0===n?void 0:n.baseCheckbox,s,{ref:t}))}));var C=n(17988),k=n(72353);const M="__check__",_=(0,r.Z)({},C.p,{type:"custom",field:M,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>void 0!==(0,y.z8)(r)[(0,k.X)(r.current.state,t)],renderHeader:e=>(0,f.jsx)(S,(0,r.Z)({},e)),renderCell:e=>(0,f.jsx)(g,(0,r.Z)({},e))})},90850:function(e,t,n){"use strict";n.d(t,{z:()=>_});var r=n(73079),o=n(40182),i=n(32123),a=n(42152),s=n(14902),l=n(99289),u=n(93188),c=n(53831),d=n(55856),h=n(21221),p=n(98841),f=n(77928);const m=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],g=(0,l.ZP)(u.ZP,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((e=>{let{theme:t}=e;return(0,o.Z)({},t.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})})),v=(0,c.G)(((e,t)=>{const n=(0,h.B)(),{id:l,value:u,field:c,colDef:v,hasFocus:y,debounceMs:b=200,isProcessingProps:x,onValueChange:w}=e,S=(0,r.Z)(e,m),C=(0,p.l)(),k=i.useRef(null),[M,_]=i.useState(u),T=(e=>{const{classes:t}=e;return(0,a.Z)({root:["editInputCell"]},d.d,t)})(n),P=i.useCallback((async e=>{const t=e.target.value;w&&await w(e,t);const n=C.current.getColumn(c);let r=t;n.valueParser&&(r=n.valueParser(t,C.current.getRow(l),n,C)),_(r),C.current.setEditCellValue({id:l,field:c,value:r,debounceMs:b,unstable_skipValueParser:!0},e)}),[C,b,c,l,w]),I=C.current.unstable_getEditCellMeta(l,c);return i.useEffect((()=>{"debouncedSetEditCellValue"!==(null==I?void 0:I.changeReason)&&_(u)}),[I,u]),(0,s.Z)((()=>{y&&k.current.focus()}),[y]),(0,f.jsx)(g,(0,o.Z)({inputRef:k,className:T.root,ownerState:n,fullWidth:!0,type:"number"===v.type?v.type:"text",value:M??"",onChange:P,endAdornment:x?(0,f.jsx)(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},S,{ref:t}))}));var y=n(38220),b=n(51654),x=n(87394),w=n(65630),S=n(137);const C=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp((0,x.hr)(r),"i");return e=>{if(null==e)return t;const n=o.test(String(e));return t?!n:n}},k=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const n=0===o.compare(r,e.toString());return t?!n:n}},M=e=>()=>t=>{const n=""===t||null==t;return e?!n:n},_={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:y.Id,type:"string",align:"left",filterOperators:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[{value:"contains",getApplyFilterFn:C(e,!1),InputComponent:b.r},{value:"doesNotContain",getApplyFilterFn:C(e,!0),InputComponent:b.r},{value:"equals",getApplyFilterFn:k(e,!1),InputComponent:b.r},{value:"doesNotEqual",getApplyFilterFn:k(e,!0),InputComponent:b.r},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${(0,x.hr)(n)}.*$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:b.r},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${(0,x.hr)(n)}$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:b.r},{value:"isEmpty",getApplyFilterFn:M(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:M(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map((e=>e.trim())),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some((t=>0===r.compare(t,e.toString()||"")))},InputComponent:w.S}]}(),renderEditCell:e=>(0,f.jsx)(v,(0,o.Z)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp((0,x.hr)(e),"i");return(e,n,r,o)=>{let i=o.current.getRowFormattedValue(n,r);return o.current.ignoreDiacritics&&(i=(0,S.GS)(i)),null!=i&&t.test(i.toString())}}}},35666:function(e,t,n){"use strict";n.d(t,{r:()=>r});const r=n(32123).createContext(void 0)},52779:function(e,t,n){"use strict";n.d(t,{n:()=>ne});var r=n(40182),o=n(73079),i=n(32123),a=n(77834),s=n(53831),l=n(90496),u=n(99289),c=n(2105),d=n(21221),h=n(81092),p=n(59603),f=n(42152),m=n(30341),g=n(38952),v=n(98841),y=n(55856),b=n(77928);const x=i.memo((e=>{var t,n;const{colDef:o,open:a,columnMenuId:s,columnMenuButtonId:l,iconButtonRef:u}=e,c=(0,v.l)(),h=(0,d.B)(),p=(e=>{const{classes:t,open:n}=e,r={root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]};return(0,f.Z)(r,y.d,t)})((0,r.Z)({},e,{classes:h.classes})),m=i.useCallback((e=>{e.preventDefault(),e.stopPropagation(),c.current.toggleColumnMenu(o.field)}),[c,o.field]);return(0,b.jsx)("div",{className:p.root,children:(0,b.jsx)(h.slots.baseTooltip,(0,r.Z)({title:c.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null===(t=h.slotProps)||void 0===t?void 0:t.baseTooltip,{children:(0,b.jsx)(h.slots.baseIconButton,(0,r.Z)({ref:u,tabIndex:-1,className:p.button,"aria-label":c.current.getLocaleText("columnMenuLabel"),size:"small",onClick:m,"aria-haspopup":"menu","aria-expanded":a,"aria-controls":a?s:void 0,id:l},null===(n=h.slotProps)||void 0===n?void 0:n.baseIconButton,{children:(0,b.jsx)(h.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})}));var w=n(49098),S=n(96521);function C(e){let{columnMenuId:t,columnMenuButtonId:n,ContentComponent:o,contentComponentProps:i,field:a,open:s,target:l,onExited:u}=e;const c=(0,v.l)(),d=c.current.getColumn(a),h=(0,w.Z)((e=>{e&&(e.stopPropagation(),null==l?void 0:l.contains(e.target))||c.current.hideColumnMenu()}));return l&&d?(0,b.jsx)(S.r,{placement:"bottom-"+("right"===d.align?"start":"end"),open:s,target:l,onClose:h,onExited:u,children:(0,b.jsx)(o,(0,r.Z)({colDef:d,hideMenu:h,open:s,id:t,labelledby:n},i))}):null}var k=n(84075),M=n(20140),_=n(2258);const T=["className","aria-label"],P=(0,M.Z)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),I=(0,s.G)((function(e,t){const{className:n}=e,i=(0,o.Z)(e,T),a=(0,d.B)(),s=(e=>{const{classes:t}=e;return(0,f.Z)({root:["columnHeaderTitle"]},y.d,t)})(a);return(0,b.jsx)(P,(0,r.Z)({className:(0,l.Z)(s.root,n),ownerState:a},i,{ref:t}))}));function R(e){var t;const{label:n,description:o}=e,a=(0,d.B)(),s=i.useRef(null),[l,u]=i.useState(""),c=i.useCallback((()=>{if(!o&&(null==s?void 0:s.current)){const e=(0,_.OF)(s.current);u(e?n:"")}}),[o,n]);return(0,b.jsx)(a.slots.baseTooltip,(0,r.Z)({title:o||l},null===(t=a.slotProps)||void 0===t?void 0:t.baseTooltip,{children:(0,b.jsx)(I,{onMouseOver:c,ref:s,children:n})}))}var D=n(98251);const O=["resizable","resizing","height","side"];var A=function(e){return e.Left="left",e.Right="right",e}(A||{});function E(e){const{height:t,side:n=A.Right}=e,a=(0,o.Z)(e,O),s=(0,d.B)(),l=(e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,D.Z)(o)}`],icon:["iconSeparator"]};return(0,f.Z)(i,y.d,r)})((0,r.Z)({},e,{side:n,classes:s.classes})),u=i.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,b.jsx)("div",(0,r.Z)({className:l.root,style:{minHeight:t}},a,{onClick:u,children:(0,b.jsx)(s.slots.columnResizeIcon,{className:l.icon})}))}const Z=i.memo(E),L=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],F=(0,s.G)((function(e,t){const{classes:n,colIndex:a,height:s,isResizing:u,sortDirection:c,hasFocus:p,tabIndex:f,separatorSide:m,isDraggable:g,headerComponent:v,description:y,width:x,columnMenuIconButton:w=null,columnMenu:S=null,columnTitleIconButtons:C=null,headerClassName:M,label:_,resizable:T,draggableContainerProps:P,columnHeaderSeparatorProps:I,style:D}=e,O=(0,o.Z)(e,L),A=(0,h.$)(),E=(0,d.B)(),F=i.useRef(null),j=(0,k.Z)(F,t);let N="none";return null!=c&&(N="asc"===c?"ascending":"descending"),i.useLayoutEffect((()=>{const e=A.current.state.columnMenu;if(p&&!e.open){var t;const e=F.current.querySelector('[tabindex="0"]')||F.current;null==e||e.focus(),(null===(t=A.current.columnHeadersContainerRef)||void 0===t?void 0:t.current)&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[A,p]),(0,b.jsxs)("div",(0,r.Z)({className:(0,l.Z)(n.root,M),style:(0,r.Z)({},D,{height:s,width:x}),role:"columnheader",tabIndex:f,"aria-colindex":a+1,"aria-sort":N},O,{ref:j,children:[(0,b.jsxs)("div",(0,r.Z)({className:n.draggableContainer,draggable:g,role:"presentation"},P,{children:[(0,b.jsxs)("div",{className:n.titleContainer,role:"presentation",children:[(0,b.jsx)("div",{className:n.titleContainerContent,children:void 0!==v?v:(0,b.jsx)(R,{label:_,description:y,columnWidth:x})}),C]}),w]})),(0,b.jsx)(Z,(0,r.Z)({resizable:!E.disableColumnResize&&!!T,resizing:u,height:s,side:m},I)),S]}))}));var j=n(97616),N=n(71602);const z=(0,a.X)((function(e){var t,n,o;const{colDef:a,columnMenuOpen:s,colIndex:u,headerHeight:c,isResizing:p,isLast:v,sortDirection:w,sortIndex:S,filterItemsCounter:k,hasFocus:M,tabIndex:T,disableReorder:P,separatorSide:I,showLeftBorder:R,showRightBorder:D,pinnedPosition:O,pinnedOffset:A}=e,E=(0,h.$)(),Z=(0,d.B)(),L=(0,g.V)(),z=i.useRef(null),B=(0,m.Z)(),V=(0,m.Z)(),H=i.useRef(null),[$,W]=i.useState(s),G=i.useMemo((()=>!Z.disableColumnReorder&&!P&&!a.disableReorder),[Z.disableColumnReorder,P,a.disableReorder]);let U;a.renderHeader&&(U=a.renderHeader(E.current.getColumnHeaderParams(a.field)));const q=(e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:u,isSiblingFocused:c}=e,d=null!=o,h=null!=s&&s>0,p="number"===t.type,m={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",h&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l===j.FX.LEFT&&"columnHeader--pinnedLeft",l===j.FX.RIGHT&&"columnHeader--pinnedRight",u&&"columnHeader--lastUnpinned",c&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,f.Z)(m,y.d,n)})((0,r.Z)({},e,{classes:Z.classes,showRightBorder:D,showLeftBorder:R})),K=i.useCallback((e=>t=>{(0,_.q_)(t)||E.current.publishEvent(e,E.current.getColumnHeaderParams(a.field),t)}),[E,a.field]),Y=i.useMemo((()=>({onClick:K("columnHeaderClick"),onContextMenu:K("columnHeaderContextMenu"),onDoubleClick:K("columnHeaderDoubleClick"),onMouseOver:K("columnHeaderOver"),onMouseOut:K("columnHeaderOut"),onMouseEnter:K("columnHeaderEnter"),onMouseLeave:K("columnHeaderLeave"),onKeyDown:K("columnHeaderKeyDown"),onFocus:K("columnHeaderFocus"),onBlur:K("columnHeaderBlur")})),[K]),X=i.useMemo((()=>G?{onDragStart:K("columnHeaderDragStart"),onDragEnter:K("columnHeaderDragEnter"),onDragOver:K("columnHeaderDragOver"),onDragEnd:K("columnHeaderDragEnd")}:{}),[G,K]),Q=i.useMemo((()=>({onMouseDown:K("columnSeparatorMouseDown"),onDoubleClick:K("columnSeparatorDoubleClick")})),[K]);i.useEffect((()=>{$||W(s)}),[$,s]);const J=i.useCallback((()=>{W(!1)}),[]),ee=!Z.disableColumnMenu&&!a.disableColumnMenu&&(0,b.jsx)(x,{colDef:a,columnMenuId:B,columnMenuButtonId:V,open:$,iconButtonRef:H}),te=(0,b.jsx)(C,{columnMenuId:B,columnMenuButtonId:V,field:a.field,open:s,target:H.current,ContentComponent:Z.slots.columnMenu,contentComponentProps:null===(t=Z.slotProps)||void 0===t?void 0:t.columnMenu,onExited:J}),ne=a.sortingOrder??Z.sortingOrder,re=(a.sortable||null!=w)&&!a.hideSortIcons&&!Z.disableColumnSorting,oe=(0,b.jsxs)(i.Fragment,{children:[!Z.disableColumnFilter&&(0,b.jsx)(Z.slots.columnHeaderFilterIconButton,(0,r.Z)({field:a.field,counter:k},null===(n=Z.slotProps)||void 0===n?void 0:n.columnHeaderFilterIconButton)),re&&(0,b.jsx)(Z.slots.columnHeaderSortIcon,(0,r.Z)({field:a.field,direction:w,index:S,sortingOrder:ne,disabled:!a.sortable},null===(o=Z.slotProps)||void 0===o?void 0:o.columnHeaderSortIcon))]});i.useLayoutEffect((()=>{const e=E.current.state.columnMenu;if(M&&!e.open){var t;const e=z.current.querySelector('[tabindex="0"]')||z.current;null==e||e.focus(),(null===(t=E.current.columnHeadersContainerRef)||void 0===t?void 0:t.current)&&(E.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[E,M]);const ie="function"==typeof a.headerClassName?a.headerClassName({field:a.field,colDef:a}):a.headerClassName,ae=a.headerName??a.field,se=i.useMemo((()=>(0,N.Q)((0,r.Z)({},e.style),L,O,A)),[O,A,e.style,L]);return(0,b.jsx)(F,(0,r.Z)({ref:z,classes:q,columnMenuOpen:s,colIndex:u,height:c,isResizing:p,sortDirection:w,hasFocus:M,tabIndex:T,separatorSide:I,isDraggable:G,headerComponent:U,description:a.description,elementId:a.field,width:a.computedWidth,columnMenuIconButton:ee,columnTitleIconButtons:oe,headerClassName:(0,l.Z)(ie,v&&y._["columnHeader--last"]),label:ae,resizable:!Z.disableColumnResize&&!!a.resizable,"data-field":a.field,columnMenu:te,draggableContainerProps:X,columnHeaderSeparatorProps:Q,style:se},Y))}));var B=n(6647),V=n(97697),H=n(38093),$=n(6168);function W(e){var t;const{groupId:n,width:o,depth:a,maxDepth:s,fields:l,height:u,colIndex:h,hasFocus:p,tabIndex:x,isLastColumn:w,pinnedPosition:S,pinnedOffset:C}=e,k=(0,d.B)(),M=(0,g.V)(),T=i.useRef(null),P=(0,v.l)(),I=(0,c.Pp)(P,$.XS),R=n?I[n]:{},{headerName:D=n??"",description:O="",headerAlign:A}=R;let E;const Z=n&&(null===(t=I[n])||void 0===t?void 0:t.renderHeaderGroup),L=i.useMemo((()=>({groupId:n,headerName:D,description:O,depth:a,maxDepth:s,fields:l,colIndex:h,isLastColumn:w})),[n,D,O,a,s,l,h,w]);n&&Z&&(E=Z(L));const z=(0,r.Z)({},e,{classes:k.classes,headerAlign:A,depth:a,isDragging:!1}),B=D??n,V=(0,m.Z)(),H=null===n?`empty-group-cell-${V}`:n,W=(e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e,u={root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===s?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===j.FX.LEFT&&"columnHeader--pinnedLeft",l===j.FX.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,f.Z)(u,y.d,t)})(z);i.useLayoutEffect((()=>{if(p){const e=T.current.querySelector('[tabindex="0"]')||T.current;null==e||e.focus()}}),[P,p]);const G=i.useCallback((e=>t=>{(0,_.q_)(t)||P.current.publishEvent(e,L,t)}),[P,L]),U=i.useMemo((()=>({onKeyDown:G("columnGroupHeaderKeyDown"),onFocus:G("columnGroupHeaderFocus"),onBlur:G("columnGroupHeaderBlur")})),[G]),q="function"==typeof R.headerClassName?R.headerClassName(L):R.headerClassName,K=i.useMemo((()=>(0,N.Q)((0,r.Z)({},e.style),M,S,C)),[S,C,e.style,M]);return(0,b.jsx)(F,(0,r.Z)({ref:T,classes:W,columnMenuOpen:!1,colIndex:h,height:u,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:x,isDraggable:!1,headerComponent:E,headerClassName:q,description:O,elementId:H,width:o,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:B,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`,style:K},U))}var G=n(64564),U=n(39731),q=n(7605),K=n(51076);const Y=(0,u.ZP)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),X=["className"],Q=(0,M.Z)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),J=(0,s.G)((function(e,t){const{className:n}=e,i=(0,o.Z)(e,X),a=(0,d.B)(),s=(e=>{const{classes:t}=e;return(0,f.Z)({root:["columnHeaders"]},y.d,t)})(a);return(0,b.jsx)(Q,(0,r.Z)({className:(0,l.Z)(s.root,n),ownerState:a},i,{role:"presentation",ref:t}))})),ee=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],te=(0,s.G)((function(e,t){const{visibleColumns:n,sortColumnLookup:a,filterColumnLookup:s,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:f,columnHeaderFocus:m,columnGroupHeaderFocus:g,headerGroupingMaxDepth:v,columnMenuState:x,columnVisibility:w,columnGroupsHeaderStructure:S,hasOtherElementInTabSequence:C}=e,k=(0,o.Z)(e,ee),{getInnerProps:M,getColumnHeadersRow:_,getColumnGroupHeadersRows:T}=(e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:u,columnGroupHeaderFocus:f,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:v,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:w}=e,[S,C]=i.useState(""),[k,M]=i.useState(""),_=(0,h.$)(),T=(0,d.B)(),P=(0,c.Pp)(_,$.Cv),I=(0,c.Pp)(_,G.Ag),R=(0,c.Pp)(_,V.VK),D=(0,c.Pp)(_,G.s3),O=(0,c.Pp)(_,G.WH),E=(0,H.Ty)(I,R,D.left.length),Z=(0,c.Pp)(_,B.iD),L=(0,c.Pp)(_,B.Xu),F=(0,c.Pp)(_,B.rA),N=(0,c.Pp)(_,B.Oz),X=(0,c.Pp)(_,B.hh),Q=i.useCallback((e=>M(e.field)),[]),J=i.useCallback((()=>M("")),[]),ee=i.useCallback((e=>C(e.field)),[]),te=i.useCallback((()=>C("")),[]),ne=i.useMemo((()=>D.left.length?{firstColumnIndex:0,lastColumnIndex:D.left.length}:null),[D.left.length]),re=i.useMemo((()=>D.right.length?{firstColumnIndex:t.length-D.right.length,lastColumnIndex:t.length}:null),[D.right.length,t.length]);(0,p.zn)(_,"columnResizeStart",Q),(0,p.zn)(_,"columnResizeStop",J),(0,p.zn)(_,"columnHeaderDragStart",ee),(0,p.zn)(_,"columnHeaderDragEnd",te);const oe=e=>{const{renderContext:n=R}=e||{},r=n.firstColumnIndex,o=n.lastColumnIndex;return{renderedColumns:t.slice(r,o),firstColumnToRender:r,lastColumnToRender:o}},ie=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=(null==e?void 0:e.position)===j.FX.RIGHT,a=void 0===(null==e?void 0:e.position),s=D.right.length>0&&o||0===D.right.length&&a,u=E-n;return(0,b.jsxs)(i.Fragment,{children:[a&&(0,b.jsx)("div",{role:"presentation",style:{width:u}}),t,a&&(0,b.jsx)("div",{role:"presentation",className:(0,l.Z)(y._.filler,r&&y._["filler--borderBottom"])}),s&&(0,b.jsx)(U.V,{header:!0,pinnedRight:o,borderBottom:r,borderTop:!1})]})},ae=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{renderedColumns:i,firstColumnToRender:s}=oe(e),l=[];for(let c=0;c{let{depth:n,params:o}=e;var i,a;const l=oe(o);if(0===l.renderedColumns.length)return null;const{firstColumnToRender:u,lastColumnToRender:c}=l,d=x[n],h=t[u].field,p=(null===(i=P[h])||void 0===i?void 0:i[n])??null,g=d.findIndex((e=>{let{groupId:t,columnFields:n}=e;return t===p&&n.includes(h)})),y=t[c-1].field,w=(null===(a=P[y])||void 0===a?void 0:a[n])??null,S=d.findIndex((e=>{let{groupId:t,columnFields:n}=e;return t===w&&n.includes(y)})),C=d.slice(g,S+1).map((e=>(0,r.Z)({},e,{columnFields:e.columnFields.filter((e=>!1!==v[e]))}))).filter((e=>e.columnFields.length>0)),k=C[0].columnFields.indexOf(h),M=C[0].columnFields.slice(0,k).reduce(((e,t)=>e+(O[t].computedWidth??0)),0);let _=u;const R=C.map(((e,t)=>{let{groupId:r,columnFields:i}=e;const a=null!==f&&f.depth===n&&i.includes(f.field),l=null!==s&&s.depth===n&&i.includes(s.field)?0:-1,u={groupId:r,width:i.reduce(((e,t)=>e+O[t].computedWidth),0),fields:i,colIndex:_,hasFocus:a,tabIndex:l},c=o.position,d=(0,q.a)(c,u.width,_,I,Z,X);_+=i.length;let h=t;return c===j.FX.LEFT&&(h=_-1),(0,b.jsx)(W,{groupId:r,width:u.width,fields:u.fields,colIndex:u.colIndex,depth:n,isLastColumn:t===C.length-1,maxDepth:m,height:N,hasFocus:a,tabIndex:l,pinnedPosition:c,pinnedOffset:d,showLeftBorder:(0,K.S)(c,h),showRightBorder:(0,K.y)(c,h,C.length,T.showColumnVerticalBorder,L)},t)}));return ie(o,R,M)};return{renderContext:R,leftRenderContext:ne,rightRenderContext:re,pinnedColumns:D,visibleColumns:t,columnPositions:I,getFillers:ie,getColumnHeadersRow:()=>(0,b.jsxs)(Y,{role:"row","aria-rowindex":m+1,ownerState:T,className:y._["row--borderBottom"],children:[ne&&ae({position:j.FX.LEFT,renderContext:ne},{disableReorder:!0}),ae({renderContext:R}),re&&ae({position:j.FX.RIGHT,renderContext:re},{disableReorder:!0,separatorSide:A.Left})]}),getColumnsToRender:oe,getColumnGroupHeadersRows:()=>{if(0===m)return null;const e=[];for(let t=0;t({role:"rowgroup"})}})({visibleColumns:n,sortColumnLookup:a,filterColumnLookup:s,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:f,columnHeaderFocus:m,columnGroupHeaderFocus:g,headerGroupingMaxDepth:v,columnMenuState:x,columnVisibility:w,columnGroupsHeaderStructure:S,hasOtherElementInTabSequence:C});return(0,b.jsxs)(J,(0,r.Z)({},k,M(),{ref:t,children:[T(),_()]}))})),ne=(0,a.X)(te)},98068:function(e,t,n){"use strict";n.d(t,{s:()=>r});const r=n(32123).createContext(void 0)},39422:function(e,t,n){"use strict";n.d(t,{J:()=>E});var r=n(40182),o=n(73079),i=n(32123),a=n(90496),s=n(84075),l=n(77834),u=n(53831);var c=n(42669),d=n(55856),h=n(42152);var p=n(21221),f=n(51076),m=n(64564),g=n(2105),v=n(48719),y=n(2258),b=n(98873),x=n(793),w=n(97616),S=n(49390),C=n(10694),k=n(68056),M=n(39731),_=n(7605),T=n(19e3),P=n(81092),I=n(4369),R=n(77928);const D=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],O=(0,I.bG)(k.bj,((e,t)=>{if(!t)return!1;return!!function(e){for(const t in e)return!1;return!0}(e)})),A=(0,u.G)((function(e,t){const{selected:n,rowId:l,row:u,index:I,style:A,rowHeight:E,className:Z,visibleColumns:L,pinnedColumns:F,offsetLeft:j,columnsTotalWidth:N,firstColumnIndex:z,lastColumnIndex:B,focusedColumnIndex:V,isFirstVisible:H,isLastVisible:$,isNotVisible:W,showBottomBorder:G,scrollbarWidth:U,gridHasFiller:q,onClick:K,onDoubleClick:Y,onMouseEnter:X,onMouseLeave:Q,onMouseOut:J,onMouseOver:ee}=e,te=(0,o.Z)(e,D),ne=(0,P.$)(),re=(0,T.x)(),oe=i.useRef(null),ie=(0,p.B)(),ae=(0,v.y)(ne,ie),se=(0,g.Pp)(ne,S.Gm),le=(0,g.Pp)(ne,C.Lq),ue=(0,g.Pp)(ne,m.Ag),ce=ie.rowReordering,de=(0,g.AC)(ne,O,ce),he=(0,s.Z)(oe,t),pe=ne.current.getRowNode(l),fe=(0,g.AC)(ne,k.uR,{rowId:l,editMode:ie.editMode}),me=ie.editMode===c.r2.Row,ge=void 0!==V,ve=ge&&V>=F.left.length&&V=B,be=function(e,t){return(0,h.Z)(t,d.d,e)}(ie.classes,{root:["row",n&&"selected",me&&"row--editable",fe&&"row--editing",H&&"row--firstVisible",$&&"row--lastVisible",G&&"row--borderBottom","auto"===E&&"row--dynamicHeight"]}),xe=re.hooks.useGridRowAriaAttributes();i.useLayoutEffect((()=>{if(ae.range){const e=ne.current.getRowIndexRelativeToVisibleRows(l);void 0!==e&&ne.current.unstable_setLastMeasuredRowIndex(e)}if(oe.current&&"auto"===E)return ne.current.observeRowHeight(oe.current,l)}),[ne,ae.range,E,l]);const we=i.useCallback(((e,t)=>n=>{(0,y.q_)(n)||ne.current.getRow(l)&&(ne.current.publishEvent(e,ne.current.getRowParams(l),n),t&&t(n))}),[ne,l]),Se=i.useCallback((e=>{const t=(0,y.w5)(e.target,d._.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===b.n.field)return;if(n===w.u9)return;if("__reorder__"===n)return;if(ne.current.getCellMode(l,n)===c.Vl.Edit)return;const e=ne.current.getColumn(n);if((null==e?void 0:e.type)===x.W)return}we("rowClick",K)(e)}),[ne,K,we,l]),{slots:Ce,slotProps:ke,disableColumnReorder:Me}=ie,_e=(0,g.Pp)(ne,(()=>(0,r.Z)({},ne.current.getRowHeightEntry(l))),g.vV),Te=i.useMemo((()=>{if(W)return{opacity:0,width:0,height:0};const e=(0,r.Z)({},A,{maxHeight:"auto"===E?"none":E,minHeight:E,"--height":"number"==typeof E?`${E}px`:E});if(_e.spacingTop){e["border"===ie.rowSpacingType?"borderTopWidth":"marginTop"]=_e.spacingTop}if(_e.spacingBottom){const t="border"===ie.rowSpacingType?"borderBottomWidth":"marginBottom";let n=e[t];"number"!=typeof n&&(n=parseInt(n||"0",10)),n+=_e.spacingBottom,e[t]=n}return e}),[W,E,A,_e,ie.rowSpacingType]),Pe=ne.current.unstable_applyPipeProcessors("rowClassName",[],l),Ie=pe?xe(pe,I):void 0;if("function"==typeof ie.getRowClassName){var Re;const e=I-((null===(Re=ae.range)||void 0===Re?void 0:Re.firstRowIndex)||0),t=(0,r.Z)({},ne.current.getRowParams(l),{isFirstVisible:0===e,isLastVisible:e===ae.rows.length-1,indexRelativeToCurrentPage:e});Pe.push(ie.getRowClassName(t))}if(!pe)return null;const De=function(e,t,n,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:w.FX.NONE;const a=ne.current.unstable_getCellColSpanInfo(l,n);if(null==a?void 0:a.spannedByColSpan)return null;const s=(null==a?void 0:a.cellProps.width)??e.computedWidth,c=(null==a?void 0:a.cellProps.colSpan)??1,d=(0,_.a)(i,e.computedWidth,n,ue,N,U);if("skeletonRow"===(null==pe?void 0:pe.type))return(0,R.jsx)(Ce.skeletonCell,{type:e.type,width:s,height:E,field:e.field,align:e.align},e.field);const h="__reorder__"===e.field,p=!(Me||e.disableReorder),m=de&&!se.length&&le<=1,g=!(p||h&&m),v=i===w.FX.VIRTUAL,y=(0,f.S)(i,t),b=(0,f.y)(i,t,o,ie.showCellVerticalBorder,q);return(0,R.jsx)(Ce.cell,(0,r.Z)({column:e,width:s,rowId:l,align:e.align||"left",colIndex:n,colSpan:c,disableDragEvents:g,isNotVisible:v,pinnedOffset:d,pinnedPosition:i,showLeftBorder:y,showRightBorder:b,row:u,rowNode:pe},null==ke?void 0:ke.cell),e.field)},Oe=F.left.map(((e,t)=>De(e,t,t,F.left.length,w.FX.LEFT))),Ae=F.right.map(((e,t)=>{const n=L.length-F.right.length+t;return De(e,t,n,F.right.length,w.FX.RIGHT)})),Ee=L.length-F.left.length-F.right.length,Ze=[];ve&&Ze.push(De(L[V],V-F.left.length,V,Ee,w.FX.VIRTUAL));for(let e=z;e0,borderTop:!H})]}))})),E=(0,l.X)(A)},39731:function(e,t,n){"use strict";n.d(t,{V:()=>s});n(32123);var r=n(90496),o=n(55856),i=n(77928);const a={root:o._.scrollbarFiller,header:o._["scrollbarFiller--header"],borderTop:o._["scrollbarFiller--borderTop"],borderBottom:o._["scrollbarFiller--borderBottom"],pinnedRight:o._["scrollbarFiller--pinnedRight"]};function s(e){let{header:t,borderTop:n=!0,borderBottom:o,pinnedRight:s}=e;return(0,i.jsx)("div",{role:"presentation",className:(0,r.Z)(a.root,t&&a.header,n&&a.borderTop,o&&a.borderBottom,s&&a.pinnedRight)})}},96521:function(e,t,n){"use strict";n.d(t,{r:()=>S});var r=n(40182),o=n(73079),i=n(32123),a=n(90496),s=n(73140),l=n(42152),u=n(14902),c=n(63400),d=n(87861),h=n(72204),p=n(99289),f=n(55856),m=n(21221),g=n(98841),v=n(77928);const y=["open","target","onClose","children","position","className","onExited"],b=e=>{const{classes:t}=e;return(0,l.Z)({root:["menu"]},f.d,t)},x=(0,p.ZP)(h.Z,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal,[`& .${f._.menuList}`]:{outline:0}}})),w={"bottom-start":"top left","bottom-end":"top right"};function S(e){var t;const{open:n,target:l,onClose:h,children:p,position:f,className:S,onExited:C}=e,k=(0,o.Z)(e,y),M=(0,g.l)(),_=(0,m.B)(),T=b(_),P=i.useRef(null);(0,u.Z)((()=>{var e,t;n?P.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null===(t=P.current)||void 0===t||null===(e=t.focus)||void 0===e||e.call(t),P.current=null)}),[n]),i.useEffect((()=>{const e=n?"menuOpen":"menuClose";M.current.publishEvent(e,{target:l})}),[M,n,l]);const I=e=>{e.target&&(l===e.target||(null==l?void 0:l.contains(e.target)))||h(e)};return(0,v.jsx)(x,(0,r.Z)({as:_.slots.basePopper,className:(0,a.Z)(T.root,S),ownerState:_,open:n,anchorEl:l,transition:!0,placement:f},k,null===(t=_.slotProps)||void 0===t?void 0:t.basePopper,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,v.jsx)(s.d,{onClickAway:I,mouseEvent:"onMouseDown",children:(0,v.jsx)(c.Z,(0,r.Z)({},t,{style:{transformOrigin:w[n]},onExited:(o=null==t?void 0:t.onExited,e=>{o&&o(),C&&C(e)}),children:(0,v.jsx)(d.Z,{children:p})}))});var o}}))}},65630:function(e,t,n){"use strict";n.d(t,{S:()=>h});var r=n(40182),o=n(73079),i=n(32123),a=n(47782),s=n(30341),l=n(21221),u=n(77928);const c=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],d=["key"];function h(e){const{item:t,applyValue:n,type:h,apiRef:p,focusElementRef:f,color:m,error:g,helperText:v,size:y,variant:b="standard"}=e,x=(0,o.Z)(e,c),w={color:m,error:g,helperText:v,size:y,variant:b},[S,C]=i.useState(t.value||[]),k=(0,s.Z)(),M=(0,l.B)();i.useEffect((()=>{const e=t.value??[];C(e.map(String))}),[t.value]);const _=i.useCallback(((e,o)=>{C(o.map(String)),n((0,r.Z)({},t,{value:[...o.map((e=>"number"===h?Number(e):e))]}))}),[n,t,h]);return(0,u.jsx)(a.Z,(0,r.Z)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:k,value:S,onChange:_,renderTags:(e,t)=>e.map(((e,n)=>{const i=t({index:n}),{key:a}=i,s=(0,o.Z)(i,d);return(0,u.jsx)(M.slots.baseChip,(0,r.Z)({variant:"outlined",size:"small",label:e},s),a)})),renderInput:e=>{var t;return(0,u.jsx)(M.slots.baseTextField,(0,r.Z)({},e,{label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.Z)({},e.InputLabelProps,{shrink:!0}),inputRef:f,type:h||"text"},w,null===(t=M.slotProps)||void 0===t?void 0:t.baseTextField))}},x))}},51654:function(e,t,n){"use strict";n.d(t,{r:()=>d});var r=n(40182),o=n(73079),i=n(32123),a=n(30341),s=n(51154),l=n(21221),u=n(77928);const c=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function d(e){var t;const{item:n,applyValue:d,type:p,apiRef:f,focusElementRef:m,tabIndex:g,disabled:v,clearButton:y,InputProps:b,variant:x="standard"}=e,w=(0,o.Z)(e,c),S=(0,s.Z)(),[C,k]=i.useState(h(n.value)),[M,_]=i.useState(!1),T=(0,a.Z)(),P=(0,l.B)(),I=i.useCallback((e=>{const t=h(e.target.value);k(t),_(!0),S.start(P.filterDebounceMs,(()=>{const e=(0,r.Z)({},n,{value:"number"!==p||Number.isNaN(Number(t))?t:Number(t),fromInput:T});d(e),_(!1)}))}),[S,P.filterDebounceMs,n,p,T,d]);return i.useEffect((()=>{n.fromInput===T&&null!=n.value||k(h(n.value))}),[T,n]),(0,u.jsx)(P.slots.baseTextField,(0,r.Z)({id:T,label:f.current.getLocaleText("filterPanelInputLabel"),placeholder:f.current.getLocaleText("filterPanelInputPlaceholder"),value:C??"",onChange:I,variant:x,type:p||"text",InputProps:(0,r.Z)({},M||y?{endAdornment:M?(0,u.jsx)(P.slots.loadIcon,{fontSize:"small",color:"action"}):y}:{},{disabled:v},b,{inputProps:(0,r.Z)({tabIndex:g},null==b?void 0:b.inputProps)}),InputLabelProps:{shrink:!0},inputRef:m},w,null===(t=P.slotProps)||void 0===t?void 0:t.baseTextField))}function h(e){if(null!=e&&""!==e)return String(e)}},32544:function(e,t,n){"use strict";n.d(t,{jv:()=>o,sf:()=>i,sk:()=>a});var r=n(40182);function o(e){return"singleSelect"===(null==e?void 0:e.type)}function i(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions((0,r.Z)({field:e.field},t)):e.valueOptions}function a(e,t,n){if(void 0===t)return;const r=t.find((t=>{const r=n(t);return String(r)===String(e)}));return n(r)}},55856:function(e,t,n){"use strict";n.d(t,{_:()=>i,d:()=>o});var r=n(19577);function o(e){return(0,r.ZP)("MuiDataGrid",e)}const i=(0,n(32792).Z)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},56202:function(e,t,n){"use strict";n.d(t,{G:()=>r});const r=n(32123).createContext(void 0)},72353:function(e,t,n){"use strict";n.d(t,{X:()=>o});var r=n(54924);const o=(e,t)=>r._1 in t?t[r._1]:e.props.getRowId?e.props.getRowId(t):t.id},6168:function(e,t,n){"use strict";n.d(t,{Cv:()=>i,WT:()=>s,XS:()=>a,uW:()=>l});var r=n(4369);const o=e=>e.columnGrouping,i=(0,r.Xw)(o,(e=>(null==e?void 0:e.unwrappedGroupingModel)??{})),a=(0,r.Xw)(o,(e=>(null==e?void 0:e.lookup)??{})),s=(0,r.Xw)(o,(e=>(null==e?void 0:e.headerStructure)??[])),l=(0,r.P1)(o,(e=>(null==e?void 0:e.maxDepth)??0))},48994:function(e,t,n){"use strict";n.d(t,{I:()=>r,J:()=>o});let r=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const o={left:[],right:[]}},64564:function(e,t,n){"use strict";n.d(t,{ph:()=>g,Zi:()=>a,qH:()=>f,s3:()=>h,FE:()=>c,WH:()=>s,xs:()=>m,wH:()=>i,g0:()=>u,d$:()=>l,pK:()=>d,Ag:()=>p});var r=n(4369),o=n(48994);const i=e=>e.columns,a=(0,r.P1)(i,(e=>e.orderedFields)),s=(0,r.P1)(i,(e=>e.lookup)),l=(0,r.Xw)(a,s,((e,t)=>e.map((e=>t[e])))),u=(0,r.P1)(i,(e=>e.columnVisibilityModel)),c=(0,r.Xw)(l,u,((e,t)=>e.filter((e=>!1!==t[e.field])))),d=(0,r.Xw)(c,(e=>e.map((e=>e.field)))),h=(0,r.Xw)(i,(e=>e.pinnedColumns),d,(e=>e.isRtl),((e,t,n,r)=>{const i=function(e,t,n){var r,i;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return o.J;if(0===(null===(r=e.left)||void 0===r?void 0:r.length)&&0===(null===(i=e.right)||void 0===i?void 0:i.length))return o.J;const a=(e,t)=>Array.isArray(e)?e.filter((e=>t.includes(e))):[],s=a(e.left,t),l=t.filter((e=>!s.includes(e))),u=a(e.right,l);if(n)return{left:u,right:s};return{left:s,right:u}}(t,n,r);return{left:i.left.map((t=>e.lookup[t])),right:i.right.map((t=>e.lookup[t]))}}));const p=(0,r.Xw)(c,(e=>{const t=[];let n=0;for(let r=0;re.filter((e=>e.filterable)))),m=(0,r.Xw)(l,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{}))),g=(0,r.Xw)(l,(e=>e.some((e=>void 0!==e.colSpan))))},18504:function(e,t,n){"use strict";n.d(t,{QC:()=>de,Jb:()=>pe,eH:()=>ue,VU:()=>se,bc:()=>he});var r=n(40182),o=n(75214),i=n(90850),a=n(38220),s=n(87394),l=n(51654),u=n(65630);const c=e=>null==e?null:Number(e),d=(0,r.Z)({},i.z,{type:"number",align:"right",headerAlign:"right",sortComparator:a.GH,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>(0,s.hj)(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>c(t)===e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>c(t)!==e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)>e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)>=e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&c(t)<=e.value,InputComponent:l.r,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:u.S,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>c(t)===c(e)});var h=n(73079),p=n(32123),f=n(30341),m=n(51154),g=n(21221),v=n(77928);const y=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function b(e,t){if(null==e)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":"date"===t?n.toISOString().substring(0,10):"datetime-local"===t?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function x(e){var t;const{item:n,applyValue:o,type:i,apiRef:a,focusElementRef:s,InputProps:l,clearButton:u,tabIndex:c,disabled:d}=e,x=(0,h.Z)(e,y),w=(0,m.Z)(),[S,C]=p.useState((()=>b(n.value,i))),[k,M]=p.useState(!1),_=(0,f.Z)(),T=(0,g.B)(),P=p.useCallback((e=>{w.clear();const t=e.target.value;C(t),M(!0),w.start(T.filterDebounceMs,(()=>{const e=new Date(t);o((0,r.Z)({},n,{value:Number.isNaN(e.getTime())?void 0:e})),M(!1)}))}),[o,n,T.filterDebounceMs,w]);return p.useEffect((()=>{const e=b(n.value,i);C(e)}),[n.value,i]),(0,v.jsx)(T.slots.baseTextField,(0,r.Z)({fullWidth:!0,id:_,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:S,onChange:P,variant:"standard",type:i||"text",InputLabelProps:{shrink:!0},inputRef:s,InputProps:(0,r.Z)({},k||u?{endAdornment:k?(0,v.jsx)(T.slots.loadIcon,{fontSize:"small",color:"action"}):u}:{},{disabled:d},l,{inputProps:(0,r.Z)({max:"datetime-local"===i?"9999-12-31T23:59":"9999-12-31",tabIndex:c},null==l?void 0:l.inputProps)})},x,null===(t=T.slotProps)||void 0===t?void 0:t.baseTextField))}function w(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return e=>{if(!e)return!1;if(r)return t(e.getTime(),i);const o=new Date(e);return n?o.setSeconds(0,0):o.setHours(0,0,0,0),t(o.getTime(),i)}}const S=e=>[{value:"is",getApplyFilterFn:t=>w(t,((e,t)=>e===t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>w(t,((e,t)=>e!==t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>w(t,((e,t)=>e>t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>w(t,((e,t)=>e>=t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>w(t,((e,t)=>ew(t,((e,t)=>e<=t),e),InputComponent:x,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}];var C=n(42152),k=n(14902),M=n(93188),_=n(99289),T=n(55856),P=n(98841);const I=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],R=(0,_.ZP)(M.ZP)({fontSize:"inherit"});function D(e){const{id:t,value:n,field:o,colDef:i,hasFocus:a,inputProps:s,onValueChange:l}=e,u=(0,h.Z)(e,I),c="dateTime"===i.type,d=(0,P.l)(),f=p.useRef(null),m=p.useMemo((()=>{let e,t;if(e=null==n?null:n instanceof Date?n:new Date((n??"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,c?16:10)}return{parsed:e,formatted:t}}),[n,c]),[y,b]=p.useState(m),x=(e=>{const{classes:t}=e;return(0,C.Z)({root:["editInputCell"]},T.d,t)})({classes:(0,g.B)().classes}),w=p.useCallback((e=>{if(""===e)return null;const[t,n]=e.split("T"),[r,o,i]=t.split("-"),a=new Date;if(a.setFullYear(Number(r),Number(o)-1,Number(i)),a.setHours(0,0,0,0),n){const[e,t]=n.split(":");a.setHours(Number(e),Number(t),0,0)}return a}),[]),S=p.useCallback((async e=>{const n=e.target.value,r=w(n);l&&await l(e,r),b({parsed:r,formatted:n}),d.current.setEditCellValue({id:t,field:o,value:r},e)}),[d,o,t,l,w]);return p.useEffect((()=>{b((e=>{var t,n;return m.parsed!==e.parsed&&(null===(t=m.parsed)||void 0===t?void 0:t.getTime())!==(null===(n=e.parsed)||void 0===n?void 0:n.getTime())?m:e}))}),[m]),(0,k.Z)((()=>{a&&f.current.focus()}),[a]),(0,v.jsx)(R,(0,r.Z)({inputRef:f,fullWidth:!0,className:x.root,type:c?"datetime-local":"date",inputProps:(0,r.Z)({max:c?"9999-12-31T23:59":"9999-12-31"},s),value:y.formatted,onChange:S},u))}const O=e=>(0,v.jsx)(D,(0,r.Z)({},e));var A=n(72353);function E(e){let{value:t,columnType:n,rowId:r,field:o}=e;if(!(t instanceof Date))throw new Error([`MUI X: \`${n}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${o}".`].join("\n"))}const Z=(0,r.Z)({},i.z,{type:"date",sortComparator:a.mA,valueFormatter:(e,t,n,r)=>{if(!e)return"";return E({value:e,columnType:"date",rowId:(0,A.X)(r.current.state,t),field:n.field}),e.toLocaleDateString()},filterOperators:S(),renderEditCell:O,pastedValueParser:e=>new Date(e)}),L=(0,r.Z)({},i.z,{type:"dateTime",sortComparator:a.mA,valueFormatter:(e,t,n,r)=>{if(!e)return"";return E({value:e,columnType:"dateTime",rowId:(0,A.X)(r.current.state,t),field:n.field}),e.toLocaleString()},filterOperators:S(!0),renderEditCell:O,pastedValueParser:e=>new Date(e)});var F=n(17988),j=n(95254),N=n(42669),z=n(32544);const B=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],V=["MenuProps"];function H(e){var t,n;const o=(0,g.B)(),{id:i,value:a,field:s,row:l,colDef:u,hasFocus:c,error:d,onValueChange:f,initialOpen:m=o.editMode===N.r2.Cell}=e,y=(0,h.Z)(e,B),b=(0,P.l)(),x=p.useRef(null),w=p.useRef(null),[S,C]=p.useState(m),M=((null===(t=o.slotProps)||void 0===t?void 0:t.baseSelect)||{}).native??!1,_=(null===(n=o.slotProps)||void 0===n?void 0:n.baseSelect)||{},{MenuProps:T}=_,I=(0,h.Z)(_,V);if((0,k.Z)((()=>{var e;c&&(null===(e=w.current)||void 0===e||e.focus())}),[c]),!(0,z.jv)(u))return null;const R=(0,z.sf)(u,{id:i,row:l});if(!R)return null;const D=u.getOptionValue,O=u.getOptionLabel;return R&&u?(0,v.jsx)(o.slots.baseSelect,(0,r.Z)({ref:x,inputRef:w,value:a,onChange:async e=>{if(!(0,z.jv)(u)||!R)return;C(!1);const t=e.target,n=(0,z.sk)(t.value,R,D);f&&await f(e,n),await b.current.setEditCellValue({id:i,field:s,value:n},e)},open:S,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||C(!0)},MenuProps:(0,r.Z)({onClose:(e,t)=>{if(o.editMode!==N.r2.Row){if("backdropClick"===t||"Escape"===e.key){const t=b.current.getCellParams(i,s);b.current.publishEvent("cellEditStop",(0,r.Z)({},t,{reason:"Escape"===e.key?j.r.escapeKeyDown:j.r.cellFocusOut}))}}else C(!1)}},T),error:d,native:M,fullWidth:!0},y,I,{children:R.map((e=>{var t;const n=D(e);return(0,p.createElement)(o.slots.baseSelectOption,(0,r.Z)({},(null===(t=o.slotProps)||void 0===t?void 0:t.baseSelectOption)||{},{native:M,key:n,value:n}),O(e))}))})):null}const $=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],W=e=>{let{column:t,OptionComponent:n,getOptionLabel:o,getOptionValue:i,isSelectNative:a,baseSelectOptionProps:s}=e;return["",...(0,z.sf)(t)||[]].map((e=>{const t=i(e);let l=o(e);return""===l&&(l=" "),(0,p.createElement)(n,(0,r.Z)({},s,{native:a,key:t,value:t}),l)}))},G=(0,_.ZP)("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function U(e){var t,n,o,i,a;const{item:s,applyValue:l,type:u,apiRef:c,focusElementRef:d,placeholder:m,tabIndex:y,label:b,variant:x="standard",clearButton:w}=e,S=(0,h.Z)(e,$),C=s.value??"",k=(0,f.Z)(),M=(0,f.Z)(),_=(0,g.B)(),T=(null===(n=_.slotProps)||void 0===n||null===(t=n.baseSelect)||void 0===t?void 0:t.native)??!1;let P=null;if(s.field){const e=c.current.getColumn(s.field);(0,z.jv)(e)&&(P=e)}const I=null==P?void 0:P.getOptionValue,R=null==P?void 0:P.getOptionLabel,D=p.useMemo((()=>(0,z.sf)(P)),[P]),O=p.useCallback((e=>{let t=e.target.value;t=(0,z.sk)(t,D,I),l((0,r.Z)({},s,{value:t}))}),[D,I,l,s]);if(!(0,z.jv)(P))return null;const A=b??c.current.getLocaleText("filterPanelInputLabel");return(0,v.jsxs)(G,{children:[(0,v.jsxs)(_.slots.baseFormControl,{fullWidth:!0,children:[(0,v.jsx)(_.slots.baseInputLabel,(0,r.Z)({},null===(o=_.slotProps)||void 0===o?void 0:o.baseInputLabel,{id:M,htmlFor:k,shrink:!0,variant:x,children:A})),(0,v.jsx)(_.slots.baseSelect,(0,r.Z)({id:k,label:A,labelId:M,value:C,onChange:O,variant:x,type:u||"text",inputProps:{tabIndex:y,ref:d,placeholder:m??c.current.getLocaleText("filterPanelInputPlaceholder")},native:T,notched:"outlined"===x||void 0},S,null===(i=_.slotProps)||void 0===i?void 0:i.baseSelect,{children:W({column:P,OptionComponent:_.slots.baseSelectOption,getOptionLabel:R,getOptionValue:I,isSelectNative:T,baseSelectOptionProps:null===(a=_.slotProps)||void 0===a?void 0:a.baseSelectOption})}))]}),w]})}var q=n(11278),K=n(47782);const Y=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],X=["key"],Q=(0,q.D)();function J(e){const{item:t,applyValue:n,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:u,variant:c="standard"}=e,d=(0,h.Z)(e,Y),m={color:a,error:s,helperText:l,size:u,variant:c},y=(0,f.Z)(),b=(0,g.B)();let x=null;if(t.field){const e=o.current.getColumn(t.field);(0,z.jv)(e)&&(x=e)}const w=null==x?void 0:x.getOptionValue,S=null==x?void 0:x.getOptionLabel,C=p.useCallback(((e,t)=>w(e)===w(t)),[w]),k=p.useMemo((()=>(0,z.sf)(x)||[]),[x]),M=p.useMemo((()=>Array.isArray(t.value)?t.value.reduce(((e,t)=>{const n=k.find((e=>w(e)===t));return null!=n&&e.push(n),e}),[]):[]),[w,t.value,k]),_=p.useCallback(((e,o)=>{n((0,r.Z)({},t,{value:o.map(w)}))}),[n,t,w]);return(0,v.jsx)(K.Z,(0,r.Z)({multiple:!0,options:k,isOptionEqualToValue:C,filterOptions:Q,id:y,value:M,onChange:_,getOptionLabel:S,renderTags:(e,t)=>e.map(((e,n)=>{const o=t({index:n}),{key:i}=o,a=(0,h.Z)(o,X);return(0,v.jsx)(b.slots.baseChip,(0,r.Z)({variant:"outlined",size:"small",label:S(e)},a),i)})),renderInput:e=>{var t;return(0,v.jsx)(b.slots.baseTextField,(0,r.Z)({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.Z)({},e.InputLabelProps,{shrink:!0}),inputRef:i,type:"singleSelect"},m,null===(t=b.slotProps)||void 0===t?void 0:t.baseTextField))}},d))}const ee=e=>null!=e&&(0,s.Kn)(e)?e.value:e,te=(0,r.Z)({},i.z,{type:"singleSelect",getOptionLabel:e=>(0,s.Kn)(e)?e.label:String(e),getOptionValue:e=>(0,s.Kn)(e)?e.value:e,valueFormatter(e,t,n,r){const o=(0,A.X)(r.current.state,t);if(!(0,z.jv)(n))return"";const i=(0,z.sf)(n,{id:o,row:t});if(null==e)return"";if(!i)return e;if("object"!=typeof i[0])return n.getOptionLabel(e);const a=i.find((t=>n.getOptionValue(t)===e));return a?n.getOptionLabel(a):""},renderEditCell:e=>(0,v.jsx)(H,(0,r.Z)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>ee(t)===ee(e.value),InputComponent:U},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>ee(t)!==ee(e.value),InputComponent:U},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(ee);return e=>t.includes(ee(e))},InputComponent:J}],pastedValueParser:(e,t,n)=>{const r=n,o=(0,z.sf)(r)||[],i=r.getOptionValue;if(o.find((t=>i(t)===e)))return e}});var ne=n(793);var re=n(64564),oe=n(57974),ie=n(14113),ae=n(6168);const se=["maxWidth","minWidth","width","flex"],le={string:i.z,number:d,date:Z,dateTime:L,boolean:F.p,singleSelect:te,[ne.W]:ne.w,custom:i.z};const ue=(e,t)=>{const n={};let o=0,a=0;const l=[];e.orderedFields.forEach((t=>{let u=e.lookup[t],c=0,d=!1;!1!==e.columnVisibilityModel[t]&&(u.flex&&u.flex>0?(o+=u.flex,d=!0):c=(0,s.uZ)(u.width||i.z.width,u.minWidth||i.z.minWidth,u.maxWidth||i.z.maxWidth),a+=c),u.computedWidth!==c&&(u=(0,r.Z)({},u,{computedWidth:c})),d&&l.push(u),n[t]=u}));const u=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),c=Math.max(u-a,0);if(o>0&&u>0){const e=function(e){let{initialFreeSpace:t,totalFlexUnits:n,flexColumns:r}=e;const o=new Set(r.map((e=>e.field))),i={all:{},frozenFields:[],freeze:e=>{const t=i.all[e];t&&!0!==t.frozen&&(i.all[e].frozen=!0,i.frozenFields.push(e))}};return function e(){if(i.frozenFields.length===o.size)return;const a={min:{},max:{}};let s=t,l=n,u=0;i.frozenFields.forEach((e=>{s-=i.all[e].computedWidth,l-=i.all[e].flex}));for(let e=0;et.maxWidth&&(u+=t.maxWidth-n,n=t.maxWidth,a.max[t.field]=!0),i.all[t.field]={frozen:!1,computedWidth:n,flex:t.flex}}u<0?Object.keys(a.max).forEach((e=>{i.freeze(e)})):u>0?Object.keys(a.min).forEach((e=>{i.freeze(e)})):r.forEach((e=>{let{field:t}=e;i.freeze(t)})),e()}(),i.all}({initialFreeSpace:c,totalFlexUnits:o,flexColumns:l});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return(0,r.Z)({},e,{lookup:n})};function ce(e){let t=le.string;return e&&le[e]&&(t=le[e]),t}const de=e=>{let{apiRef:t,columnsToUpsert:n,initialState:i,columnVisibilityModel:a=(0,re.g0)(t),keepOnlyColumnsToUpsert:s=!1}=e;var l,u;const c=!t.current.state.columns;let d;if(c)d={orderedFields:[],lookup:{},columnVisibilityModel:a};else{const e=(0,re.wH)(t.current.state);d={orderedFields:s?[]:[...e.orderedFields],lookup:(0,r.Z)({},e.lookup),columnVisibilityModel:a}}let h={};s&&!c&&(h=Object.keys(d.lookup).reduce(((e,t)=>(0,r.Z)({},e,{[t]:!1})),{}));const p={};n.forEach((e=>{const{field:t}=e;p[t]=!0,h[t]=!0;let n=d.lookup[t];null==n?(n=(0,r.Z)({},ce(e.type),{field:t,hasBeenResized:!1}),d.orderedFields.push(t)):s&&d.orderedFields.push(t),n&&n.type!==e.type&&(n=(0,r.Z)({},ce(e.type),{field:t}));let i=n.hasBeenResized;se.forEach((t=>{void 0!==e[t]&&(i=!0,-1===e[t]&&(e[t]=1/0))})),d.lookup[t]=(0,o.Z)(n,(0,r.Z)({},e,{hasBeenResized:i}))})),s&&!c&&Object.keys(d.lookup).forEach((e=>{h[e]||delete d.lookup[e]}));const f=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,i=Object.keys(o);if(0===i.length&&0===n.length)return e;const a={},s=[];for(let t=0;t!a[e]))],u=(0,r.Z)({},e.lookup);for(let e=0;e{let[t,r]=e;n[t]=-1===r?1/0:r})),u[t]=n}return(0,r.Z)({},e,{orderedFields:l,lookup:u})})(t.current.unstable_applyPipeProcessors("hydrateColumns",d),i);return ue(f,(null===(l=(u=t.current).getRootDimensions)||void 0===l?void 0:l.call(u))??void 0)};function he(e){let{firstColumnToRender:t,apiRef:n,firstRowToRender:r,lastRowToRender:o,visibleRows:i}=e,a=t;for(let e=r;ea,EH:()=>i});var r=n(4369);const o={compact:.7,comfortable:1.3,standard:1},i=e=>e.density,a=(0,r.P1)(i,(e=>o[e]))},6647:function(e,t,n){"use strict";n.d(t,{D6:()=>f,E$:()=>a,H4:()=>l,Oz:()=>h,RS:()=>s,Wp:()=>u,Xu:()=>c,hh:()=>p,iD:()=>i,jY:()=>o,rA:()=>d});var r=n(4369);const o=e=>e.dimensions,i=(0,r.P1)(o,(e=>e.columnsTotalWidth)),a=e=>e.dimensions.rowHeight,s=e=>e.dimensions.contentSize.height,l=e=>e.dimensions.hasScrollX,u=e=>e.dimensions.hasScrollY,c=e=>e.dimensions.columnsTotalWidthe.dimensions.headerHeight,h=e=>e.dimensions.groupHeaderHeight,p=e=>e.dimensions.hasScrollY?e.dimensions.scrollbarSize:0,f=e=>{const t=e.dimensions.hasScrollX?e.dimensions.scrollbarSize:0,n=e.dimensions.viewportOuterSize.height-e.dimensions.minimumSize.height>0;return!(0===t&&!n)}},68056:function(e,t,n){"use strict";n.d(t,{Am:()=>s,bj:()=>i,uR:()=>a});var r=n(4369),o=n(42669);const i=e=>e.editRows,a=(0,r.bG)(i,((e,t)=>{let{rowId:n,editMode:r}=t;return r===o.r2.Row&&Boolean(e[n])})),s=(0,r.bG)(i,((e,t)=>{let{rowId:n,field:r}=t;var o;return(null===(o=e[n])||void 0===o?void 0:o[r])??null}))},88153:function(e,t,n){"use strict";n.d(t,{AF:()=>x,Az:()=>u,D7:()=>d,DY:()=>b,IQ:()=>g,Lp:()=>f,_g:()=>c,a4:()=>m,uf:()=>l,xf:()=>v,zn:()=>h});var r=n(4369),o=n(49390),i=n(64564),a=n(10694);const s=e=>e.filter,l=(0,r.P1)(s,(e=>e.filterModel)),u=(0,r.P1)(l,(e=>e.quickFilterValues)),c=(0,r.P1)(s,(e=>e.filteredRowsLookup)),d=((0,r.P1)(s,(e=>e.filteredChildrenCountLookup)),(0,r.P1)(s,(e=>e.filteredDescendantCountLookup)),(0,r.Xw)((e=>e.visibleRowsLookup),o.sX,a.Lq,l,u,((e,t,n,r,o)=>n<2&&!r.items.length&&!(null==o?void 0:o.length)?t:t.filter((t=>!1!==e[t.id]))))),h=(0,r.Xw)(d,(e=>e.map((e=>e.id)))),p=(0,r.Xw)(c,o.sX,((e,t)=>t.filter((t=>!1!==e[t.id])))),f=(0,r.Xw)(p,(e=>e.map((e=>e.id)))),m=((0,r.Xw)(h,a.Kd,((e,t)=>{const n={};let r=0;return e.reduce(((e,o)=>{const i=t[o];return n[i.depth]||(n[i.depth]=0),i.depth>r&&(n[i.depth]=0),r=i.depth,n[i.depth]+=1,e[o]=n[i.depth],e}),{})})),(0,r.Xw)(d,a.Kd,a.Lq,((e,t,n)=>n<2?e:e.filter((e=>{var n;return 0===(null===(n=t[e.id])||void 0===n?void 0:n.depth)}))))),g=(0,r.P1)(d,(e=>e.length)),v=(0,r.P1)(m,(e=>e.length)),y=(0,r.P1)(p,(e=>e.length)),b=((0,r.P1)(y,v,((e,t)=>e-t)),(0,r.Xw)(l,i.WH,((e,t)=>{var n;return null===(n=e.items)||void 0===n?void 0:n.filter((e=>{var n,r;if(!e.field)return!1;const o=t[e.field];if(!(null==o?void 0:o.filterOperators)||0===(null==o||null===(n=o.filterOperators)||void 0===n?void 0:n.length))return!1;const i=o.filterOperators.find((t=>t.value===e.operator));return!!i&&(!i.InputComponent||null!=e.value&&""!==(null===(r=e.value)||void 0===r?void 0:r.toString()))}))}))),x=(0,r.Xw)(b,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{})))},36651:function(e,t,n){"use strict";n.d(t,{R:()=>o,c:()=>i});var r=n(37358);const o={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},i=()=>({items:[],logicOperator:r.G.And,quickFilterValues:[],quickFilterLogicOperator:r.G.And})},137:function(e,t,n){"use strict";n.d(t,{p3:()=>u,tY:()=>v,S:()=>d,Tv:()=>g,GS:()=>h,NF:()=>c,W$:()=>b});var r=n(40182),o=n(37358),i=n(36651);function a(e){return{current:e.current.getPublicApi()}}var s=n(64564);let l;const u=(e,t)=>{const n=(0,r.Z)({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=(0,s.WH)(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},c=(e,t,n)=>{const o=e.items.length>1;let i;i=o&&t?[e.items[0]]:e.items;const a=o&&i.some((e=>null==e.id));return i.some((e=>null==e.operator))||a?(0,r.Z)({},e,{items:i.map((e=>u(e,n)))}):e.items!==i?(0,r.Z)({},e,{items:i}):e},d=(e,t,n)=>o=>(0,r.Z)({},o,{filterModel:c(e,t,n)}),h=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,p=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){var i;const r=n.valueParser;o=Array.isArray(e.value)?null===(i=e.value)||void 0===i?void 0:i.map((e=>r(e,void 0,n,t))):r(e.value,void 0,n,t)}else o=e.value;const{ignoreDiacritics:s}=t.current.rootProps;s&&(o=h(o));const l=(0,r.Z)({},e,{value:o}),u=n.filterOperators;if(!(null==u?void 0:u.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const c=u.find((e=>e.value===l.operator));if(!c)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${l.operator}'.`);const d=a(t),p=c.getApplyFilterFn(l,n);return"function"!=typeof p?null:{item:l,fn:e=>{let r=t.current.getRowValue(e,n);return s&&(r=h(r)),p(r,e,n,d)}}};let f=1;const m=(e,t,n)=>{const{items:r}=e,o=r.map((e=>p(e,t))).filter((e=>!!e));if(0===o.length)return null;if(n||!function(){if(void 0!==l)return l;try{l=new Function("return true")()}catch(e){l=!1}return l}())return(e,t)=>{const n={};for(let r=0;r`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\nconst result$$ = {\n${o.map(((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`)).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(f)));f+=1;return(e,t)=>i(o,e,t)},g=e=>e.quickFilterExcludeHiddenColumns??!0,v=(e,t,n)=>{const r=m(e,t,n),o=((e,t)=>{var n;const r=(null===(n=e.quickFilterValues)||void 0===n?void 0:n.filter(Boolean))??[];if(0===r.length)return null;const o=g(e)?(0,s.pK)(t):(0,s.Zi)(t),i=[],{ignoreDiacritics:l}=t.current.rootProps,u=a(t);return o.forEach((e=>{const n=t.current.getColumn(e),o=null==n?void 0:n.getApplyQuickFilterFn;o&&i.push({column:n,appliers:r.map((e=>{const t=l?h(e):e;return{fn:o(t,n,u)}}))})})),function(e,n){const o={};e:for(let a=0;anull!=e,b=(e,t,n,r,a)=>{const s=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==p(e,t)))),e.cleanedFilterItems))(a,r,n.items),l=e.filter(y),u=t.filter(y);if(l.length>0){const e=e=>l.some((t=>t[e.id]));if((n.logicOperator??(0,i.c)().logicOperator)===o.G.And){if(!s.every(e))return!1}else{if(!s.some(e))return!1}}if(u.length>0&&null!=n.quickFilterValues){const e=e=>u.some((t=>t[e]));if((n.quickFilterLogicOperator??(0,i.c)().quickFilterLogicOperator)===o.G.And){if(!n.quickFilterValues.every(e))return!1}else{if(!n.quickFilterValues.some(e))return!1}}return!0}},14695:function(e,t,n){"use strict";n.d(t,{TR:()=>i,X5:()=>c,d6:()=>u,jC:()=>s,jc:()=>d,ud:()=>a});var r=n(4369);const o=e=>e.focus,i=(0,r.P1)(o,(e=>e.cell)),a=(0,r.P1)(o,(e=>e.columnHeader)),s=((0,r.P1)(o,(e=>e.columnHeaderFilter)),(0,r.P1)(o,(e=>e.columnGroupHeader))),l=e=>e.tabIndex,u=(0,r.P1)(l,(e=>e.cell)),c=(0,r.P1)(l,(e=>e.columnHeader)),d=((0,r.P1)(l,(e=>e.columnHeaderFilter)),(0,r.P1)(l,(e=>e.columnGroupHeader)))},14113:function(e,t,n){"use strict";n.d(t,{WT:()=>i,tr:()=>a,xs:()=>s});var r=n(4369);const o=e=>e.headerFiltering,i=(0,r.P1)(o,(e=>(null==e?void 0:e.enabled)??!1)),a=(0,r.P1)(o,(e=>e.editing)),s=(0,r.P1)(o,(e=>e.menuOpen))},88005:function(e,t,n){"use strict";n.d(t,{z:()=>r});const r=e=>e.listViewColumn},10780:function(e,t,n){"use strict";n.d(t,{B_:()=>p,O$:()=>u,OR:()=>d,RM:()=>c,UB:()=>f,Yp:()=>v,bu:()=>h,fL:()=>s,iJ:()=>y});var r=n(4369),o=n(88153),i=n(10694),a=n(88117);const s=e=>e.pagination,l=(0,r.P1)(s,(e=>e.enabled&&"client"===e.paginationMode)),u=(0,r.P1)(s,(e=>e.paginationModel)),c=(0,r.P1)(s,(e=>e.rowCount)),d=(0,r.P1)(s,(e=>e.meta)),h=(0,r.P1)(u,(e=>e.page)),p=(0,r.P1)(u,(e=>e.pageSize)),f=(0,r.P1)(u,c,((e,t)=>(0,a.tR)(t,e.pageSize,e.page))),m=(0,r.Xw)(l,u,i.Kd,i.Lq,o.D7,o.a4,((e,t,n,r,o,i)=>{if(!e)return null;const a=i.length,s=Math.min(t.pageSize*t.page,a-1),l=-1===t.pageSize?a-1:Math.min(s+t.pageSize-1,a-1);if(-1===s||-1===l)return null;if(r<2)return{firstRowIndex:s,lastRowIndex:l};const u=i[s],c=l-s+1,d=o.findIndex((e=>e.id===u.id));let h=d,p=0;for(;h0)&&(h+=1),0===e&&(p+=1))}return{firstRowIndex:d,lastRowIndex:h-1}})),g=(0,r.Xw)(o.D7,m,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),v=(0,r.Xw)(o.zn,m,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),y=(0,r.Xw)(l,m,g,o.D7,((e,t,n,r)=>e?{rows:n,range:t,rowToIndexMap:n.reduce(((e,t,n)=>(e.set(t.model,n),e)),new Map)}:{rows:r,range:0===r.length?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowToIndexMap:r.reduce(((e,t,n)=>(e.set(t.model,n),e)),new Map)}))},88117:function(e,t,n){"use strict";n.d(t,{Ip:()=>l,NZ:()=>s,Xd:()=>a,dG:()=>o,tR:()=>i});var r=n(59603);const o=e=>e?0:100,i=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):-1===e?n+2:0,a=e=>({page:0,pageSize:e?0:100}),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 0===t?e:Math.max(Math.min(e,t-1),0)},l=(e,t)=>{if(t===r.cG.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))}},76105:function(e,t,n){"use strict";n.d(t,{R:()=>i,e:()=>o});var r=n(4369);const o=e=>e.preferencePanel,i=(0,r.bG)(o,((e,t)=>!(!e.open||e.labelId!==t)))},44e3:function(e,t,n){"use strict";n.d(t,{y:()=>r});var r=function(e){return e.filters="filters",e.columns="columns",e}(r||{})},84708:function(e,t,n){"use strict";n.d(t,{Y1:()=>i,bR:()=>s,xD:()=>a,z8:()=>l});var r=n(4369),o=n(10694);const i=e=>e.rowSelection,a=(0,r.P1)(i,(e=>e.length)),s=(0,r.Xw)(i,o.J4,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),l=(0,r.Xw)(i,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{})))},64201:function(e,t,n){"use strict";n.d(t,{HR:()=>f,Hs:()=>h,SJ:()=>p,m8:()=>d});var r=n(59603),o=n(54924),i=n(88153),a=n(49390),s=n(84708),l=n(10694),u=n(4369);function c(e,t){var n;const r=(0,l.Kd)(e),o=(0,a.aV)(e),s=(0,i._g)(e),u=r[t];if(!u||"group"!==u.type)return[];const c=[];for(let i=o.findIndex((e=>e===t))+1;iu.depth;i+=1){const t=o[i];!1!==s[t]&&e.current.isRowSelectable(t)&&c.push(t)}return c}function d(e,t){return(0,u.P1)(l.Kd,a.aV,i._g,s.z8,((n,r,o,i)=>{var a;const s=n[e];if(!s||"group"!==s.type)return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let l=0,u=0;for(let t=r.findIndex((t=>t===e))+1;ts.depth;t+=1){const e=r[t];!1!==o[e]&&(l+=1,void 0!==i[e]&&(u+=1))}return{isIndeterminate:u>0&&(u0:i[e]===e}}))}function h(e){return e.signature===r.cG.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const p=(e,t,n,r,a,l)=>{const u=(0,i._g)(e),d=(0,s.z8)(e),h=new Set([]);if(r||a){if(r){const r=t[n];if("group"===(null==r?void 0:r.type)){c(e,n).forEach((e=>{l(e),h.add(e)}))}}if(a){const r=e=>{if(d[e]!==e&&!h.has(e))return!1;const n=t[e];return"group"!==(null==n?void 0:n.type)||n.children.every(r)},i=n=>{const a=((e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return null==o?[]:e[o].children.filter((e=>e!==n&&!1!==t[e]))})(t,u,n);if(0===a.length||a.every(r)){const r=t[n].parent;null!=r&&r!==o.U5&&e.current.isRowSelectable(r)&&(l(r),h.add(r),i(r))}};i(n)}}},f=(e,t,n,r,i,a)=>{const l=(0,s.z8)(e);if(i||r){if(i){const e=((e,t)=>{const n=[];let r=t;for(;null!=r&&r!==o.U5;){const t=e[r];if(!t)return n;n.push(r),r=t.parent}return n})(t,n);e.forEach((e=>{l[e]===e&&a(e)}))}if(r){const r=t[n];if("group"===(null==r?void 0:r.type)){c(e,n).forEach((e=>{a(e)}))}}}}},32194:function(e,t,n){"use strict";n.d(t,{mf:()=>i,uR:()=>s,zq:()=>a});var r=n(4369);const o=e=>e.rowSpanning,i=(0,r.P1)(o,(e=>e.hiddenCells)),a=(0,r.P1)(o,(e=>e.spannedCells)),s=(0,r.P1)(o,(e=>e.hiddenCellOriginMap))},17226:function(e,t,n){"use strict";n.d(t,{k:()=>r});const r=e=>e.rowsMeta},10694:function(e,t,n){"use strict";n.d(t,{G$:()=>s,GG:()=>d,J4:()=>l,J5:()=>y,Kd:()=>c,Kf:()=>v,Le:()=>h,Lq:()=>f,Qr:()=>u,Vk:()=>a,hh:()=>i,i$:()=>p,yM:()=>m});var r=n(4369);const o=e=>e.rows,i=(0,r.P1)(o,(e=>e.totalRowCount)),a=(0,r.P1)(o,(e=>e.loading)),s=(0,r.P1)(o,(e=>e.totalTopLevelRowCount)),l=(0,r.P1)(o,(e=>e.dataRowIdToModelLookup)),u=(0,r.P1)(o,(e=>e.dataRowIdToIdLookup)),c=(0,r.P1)(o,(e=>e.tree)),d=(0,r.P1)(o,(e=>e.groupsToFetch)),h=(0,r.P1)(o,(e=>e.groupingName)),p=(0,r.P1)(o,(e=>e.treeDepths)),f=(0,r.Xw)(o,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter((e=>{let[,t]=e;return t>0})).map((e=>{let[t]=e;return Number(t)})).sort(((e,t)=>t-e))[0]??0)+1})),m=(0,r.P1)(o,(e=>e.dataRowIds)),g=(0,r.P1)(o,(e=>null==e?void 0:e.additionalRowGroups)),v=(0,r.Xw)(g,(e=>{var t,n;const r=null==e?void 0:e.pinnedRows;return{bottom:(null==r||null===(t=r.bottom)||void 0===t?void 0:t.map((e=>({id:e.id,model:e.model??{}}))))??[],top:(null==r||null===(n=r.top)||void 0===n?void 0:n.map((e=>({id:e.id,model:e.model??{}}))))??[]}})),y=(0,r.P1)(v,(e=>{var t,n;return((null==e||null===(t=e.top)||void 0===t?void 0:t.length)||0)+((null==e||null===(n=e.bottom)||void 0===n?void 0:n.length)||0)}))},54924:function(e,t,n){"use strict";n.d(t,{E2:()=>a,I7:()=>d,IX:()=>c,JX:()=>y,PO:()=>l,U5:()=>o,Wj:()=>m,ZD:()=>u,_1:()=>i,bm:()=>v,jI:()=>s,m1:()=>f,qJ:()=>g,u4:()=>h,vn:()=>p});var r=n(40182);const o="auto-generated-group-node-root",i=Symbol("mui.id_autogenerated"),a=()=>({type:"group",id:o,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});const s=(e,t,n)=>{const r=t?t(e):e.id;return function(e,t){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"A row was provided without id in the rows prop:",JSON.stringify(t)].join("\n"))}(r,e,n),r},l=e=>{let{rows:t,getRowId:n,loading:r,rowCount:o}=e;const i={type:"full",rows:[]},a={},l={};for(let e=0;e{let{tree:t,rowCountProp:n=0}=e;const r=t[o];return Math.max(n,r.children.length+(null==r.footerId?0:1))},c=e=>{let{apiRef:t,rowCountProp:n=0,loadingProp:o,previousTree:i,previousTreeDepths:a,previousGroupsToFetch:s}=e;const l=t.current.caches.rows,{tree:c,treeDepths:d,dataRowIds:h,groupingName:p,groupsToFetch:f=[]}=t.current.applyStrategyProcessor("rowTreeCreation",{previousTree:i,previousTreeDepths:a,updates:l.updates,dataRowIdToIdLookup:l.dataRowIdToIdLookup,dataRowIdToModelLookup:l.dataRowIdToModelLookup,previousGroupsToFetch:s}),m=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:c,treeDepths:d,dataRowIdToIdLookup:l.dataRowIdToIdLookup,dataRowIds:h,dataRowIdToModelLookup:l.dataRowIdToModelLookup});return t.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,r.Z)({},m,{totalRowCount:Math.max(n,m.dataRowIds.length),totalTopLevelRowCount:u({tree:m.tree,rowCountProp:n}),groupingName:p,loading:o,groupsToFetch:f})},d=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,h=(e,t,n)=>{const r=e[t];if("group"!==r.type)return[];const o=[];for(let t=0;t{let{previousCache:t,getRowId:n,updates:o,groupKeys:i}=e;if("full"===t.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const a=new Map;o.forEach((e=>{const t=s(e,n,"A row was provided without id when calling updateRows():");a.has(t)?a.set(t,(0,r.Z)({},a.get(t),e)):a.set(t,e)}));const l={type:"partial",actions:{insert:[...t.updates.actions.insert??[]],modify:[...t.updates.actions.modify??[]],remove:[...t.updates.actions.remove??[]]},idToActionLookup:(0,r.Z)({},t.updates.idToActionLookup),groupKeys:i},u=(0,r.Z)({},t.dataRowIdToModelLookup),c=(0,r.Z)({},t.dataRowIdToIdLookup),d={insert:{},modify:{},remove:{}};a.forEach(((e,t)=>{const n=l.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!u[t])return;return null!=n&&(d[n][t]=!0),l.actions.remove.push(t),delete u[t],void delete c[t]}const o=u[t];if(o)return"remove"===n?(d.remove[t]=!0,l.actions.modify.push(t)):null==n&&l.actions.modify.push(t),void(u[t]=(0,r.Z)({},o,e));"remove"===n?(d.remove[t]=!0,l.actions.insert.push(t)):null==n&&l.actions.insert.push(t),u[t]=e,c[t]=t}));const h=Object.keys(d);for(let e=0;e0&&(l.actions[t]=l.actions[t].filter((e=>!n[e])))}return{dataRowIdToModelLookup:u,dataRowIdToIdLookup:c,updates:l,rowsBeforePartialUpdates:t.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:t.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:t.rowCountPropBeforePartialUpdates}},f="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function m(e,t,n){const o=[];return t.forEach((t=>{const i=s(t,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if("pinnedRow"===(null==a?void 0:a.type)){const n=e.current.caches.pinnedRows,o=n.idLookup[i];o&&(n.idLookup[i]=(0,r.Z)({},o,t))}else o.push(t)})),o}const g=(e,t,n)=>"number"==typeof e&&e>0?e:t,v=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),y=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n")},49390:function(e,t,n){"use strict";n.d(t,{Gm:()=>u,Nl:()=>c,aV:()=>s,sX:()=>l});var r=n(4369),o=n(10694),i=n(54924);const a=e=>e.sorting,s=(0,r.P1)(a,(e=>e.sortedRows)),l=(0,r.Xw)(s,o.J4,o.Kd,((e,t,n)=>e.reduce(((e,r)=>{const o=t[r];if(o)e.push({id:r,model:o});else{const t=n[r];t&&(0,i.I7)(t)&&e.push({id:r,model:{[i._1]:r}})}return e}),[]))),u=(0,r.P1)(a,(e=>e.sortModel)),c=(0,r.Xw)(u,(e=>e.reduce(((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t)),{})));(0,r.Xw)(s,(e=>e.reduce(((e,t,n)=>(e[t]=n,e)),Object.create(null))))},38220:function(e,t,n){"use strict";n.d(t,{E8:()=>a,GH:()=>h,Id:()=>d,Te:()=>i,mA:()=>p,oX:()=>s,vY:()=>l});var r=n(40182),o=n(10694);const i=(e,t)=>t&&e.length>1?[e[0]]:e,a=(e,t)=>n=>(0,r.Z)({},n,{sorting:(0,r.Z)({},n.sorting,{sortModel:i(e,t)})}),s=(e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);if(!n||null===e.sort)return null;let r;return r=n.getSortComparator?n.getSortComparator(e.sort):"desc"===e.sort?function(){for(var e=arguments.length,t=new Array(e),r=0;r({id:e,field:n.field,rowNode:(0,o.Kd)(t)[e],value:t.current.getCellValue(e,n.field),api:t.current}),comparator:r}:null})(e,t))).filter((e=>!!e));return 0===n.length?null:e=>e.map((e=>({node:e,params:n.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>{return r=e,o=t,n.reduce(((e,t,n)=>{if(0!==e)return e;const i=r.params[n],a=o.params[n];return t.comparator(i.value,a.value,i,a)}),0);var r,o})).map((e=>e.node.id))},l=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},u=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,c=new Intl.Collator,d=(e,t)=>{const n=u(e,t);return null!==n?n:"string"==typeof e?c.compare(e.toString(),t.toString()):e-t},h=(e,t)=>{const n=u(e,t);return null!==n?n:Number(e)-Number(t)},p=(e,t)=>{const n=u(e,t);return null!==n?n:e>t?1:eh});var r=n(40182),o=n(42849),i=n(4369),a=n(64564),s=n(97697),l=n(14695),u=n(10780),c=n(10694);const d=(0,o.P1)(l.TR,s.r8,u.iJ,a.FE,c.J4,((e,t,n,r,o)=>{if(!e)return!1;const i=o[e.id];if(!i)return!1;const a=n.rowToIndexMap.get(i),s=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex((t=>t.field===e.field));return!(void 0!==a&&-1!==s&&a>=t.firstRowIndex&&a<=t.lastRowIndex)})),h=(0,i.Xw)(d,a.FE,u.iJ,c.J4,l.TR,((e,t,n,o,i)=>{if(!e)return null;const a=o[i.id];if(!a)return null;const s=n.rowToIndexMap.get(a);if(void 0===s)return null;const l=t.findIndex((e=>e.field===i.field));return-1===l?null:(0,r.Z)({},i,{rowIndex:s,columnIndex:l})}))},97697:function(e,t,n){"use strict";n.d(t,{IC:()=>i,VK:()=>l,pf:()=>a,r8:()=>s});var r=n(4369);const o=e=>e.virtualization,i=((0,r.P1)(o,(e=>e.enabled)),(0,r.P1)(o,(e=>e.enabledForColumns))),a=(0,r.P1)(o,(e=>e.enabledForRows)),s=(0,r.P1)(o,(e=>e.renderContext)),l=(0,r.Xw)((e=>e.virtualization.renderContext.firstColumnIndex),(e=>e.virtualization.renderContext.lastColumnIndex),((e,t)=>({firstColumnIndex:e,lastColumnIndex:t})))},38093:function(e,t,n){"use strict";n.d(t,{Ty:()=>G,cD:()=>N});var r=n(40182),o=n(32123),i=n(76418),a=n(49098),s=n(14902),l=n(89039),u=n(51154),c=n(38952),d=n(30329),h=n(6647),p=n(81092),f=n(21221),m=n(2105);const g=()=>{};var v=n(64564),y=n(10694),b=n(48719),x=n(59603);const w=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox");var S=n(87394),C=n(84708),k=n(17226),M=n(18504),_=n(97697),T=n(70334),P=n(32194),I=n(88005),R=n(54924),D=n(48994),O=n(24392),A=n(21806),E=n(39111),Z=n(77928);var L=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(L||{});const F={top:0,left:0},j=Object.freeze(new Map),N=()=>{var e;const t=(0,p.$)(),n=(0,f.B)(),{unstable_listView:k}=n,M=(0,m.Pp)(t,(()=>k?[(0,I.z)(t.current.state)]:(0,v.FE)(t))),P=(0,m.Pp)(t,_.pf)&&!E.P,N=(0,m.Pp)(t,_.IC)&&!E.P,H=(0,m.Pp)(t,y.Kf),$=(0,v.s3)(t),W=k?D.J:$,q=H.bottom.length>0,[K,Y]=o.useState(j),X=(0,c.V)(),Q=(0,m.Pp)(t,C.z8),J=(0,b.y)(t),ee=t.current.mainElementRef,te=t.current.virtualScrollerRef,ne=t.current.virtualScrollbarVerticalRef,re=t.current.virtualScrollbarHorizontalRef,oe=(0,m.Pp)(t,v.ph),ie=o.useRef(!1),ae=(0,m.Pp)(t,h.E$),se=(0,m.Pp)(t,h.RS),le=(0,m.Pp)(t,h.iD),ue=(0,m.Pp)(t,z),ce=(0,m.Pp)(t,h.hh),de=(0,m.Pp)(t,h.Xu),he=o.useRef(null),pe=o.useCallback((e=>{if(ee.current=e,!e)return;const n=e.getBoundingClientRect();let r={width:(0,A.T)(n.width,1),height:(0,A.T)(n.height,1)};if((!he.current||r.width!==he.current.width&&r.height!==he.current.height)&&(he.current=r,t.current.publishEvent("resize",r)),"undefined"==typeof ResizeObserver)return;const o=new ResizeObserver((e=>{const n=e[0];if(!n)return;const o={width:(0,A.T)(n.contentRect.width,1),height:(0,A.T)(n.contentRect.height,1)};o.width===r.width&&o.height===r.height||(t.current.publishEvent("resize",o),r=o)}));return o.observe(e),d.default>=19?()=>{ee.current=null,o.disconnect()}:void 0}),[t,ee]),fe=o.useRef((null===(e=n.initialState)||void 0===e?void 0:e.scroll)??F),me=o.useRef(!1),ge=o.useRef(F),ve=o.useRef(T.bH),ye=(0,m.Pp)(t,_.r8),be=(0,m.Pp)(t,O.l),xe=(0,u.Z)(),we=o.useRef(void 0),Se=(0,l.Z)((()=>((e,t,n,r,o)=>({direction:L.NONE,buffer:U(e,L.NONE,t,n,r,o)}))(X,n.rowBufferPx,n.columnBufferPx,15*ae,300))).current,Ce=o.useCallback((e=>{if(function(e,t){if(e===t)return!0;return e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}(e,t.current.state.virtualization.renderContext))return;const n=e.firstRowIndex!==ve.current.firstRowIndex||e.lastRowIndex!==ve.current.lastRowIndex;t.current.setState((t=>(0,r.Z)({},t,{virtualization:(0,r.Z)({},t.virtualization,{renderContext:e})})));(0,h.jY)(t.current.state).isReady&&n&&(ve.current=e,t.current.publishEvent("renderedRowsIntervalChange",e)),ge.current=fe.current}),[t]),ke=(0,a.Z)((()=>{const e=te.current;if(!e)return;const r=(0,h.jY)(t.current.state),o=Math.ceil(r.minimumSize.height-r.viewportOuterSize.height),a=Math.ceil(r.minimumSize.width-r.viewportInnerSize.width),s={top:(0,S.uZ)(e.scrollTop,0,o),left:X?(0,S.uZ)(e.scrollLeft,-a,0):(0,S.uZ)(e.scrollLeft,0,a)},l=s.left-fe.current.left,u=s.top-fe.current.top,c=0!==l||0!==u;fe.current=s;const d=c?function(e,t){if(0===e&&0===t)return L.NONE;return Math.abs(t)>=Math.abs(e)?t>0?L.DOWN:L.UP:e>0?L.RIGHT:L.LEFT}(l,u):L.NONE,p=Math.abs(fe.current.top-ge.current.top),f=Math.abs(fe.current.left-ge.current.left),m=p>=ae||f>=50,g=Se.direction!==d;if(!(m||g))return ye;if(g)switch(d){case L.NONE:case L.LEFT:case L.RIGHT:we.current=void 0;break;default:we.current=ye}Se.direction=d,Se.buffer=U(X,d,n.rowBufferPx,n.columnBufferPx,15*ae,300);const v=V(B(t,n,P,N),fe.current,Se);return i.flushSync((()=>{Ce(v)})),xe.start(1e3,ke),v})),Me=()=>{if(!(0,h.jY)(t.current.state).isReady&&(P||N))return;const e=V(B(t,n,P,N),fe.current,Se);we.current=void 0,Ce(e)},_e=(0,a.Z)((()=>{if(me.current)return void(me.current=!1);const e=ke();t.current.publishEvent("scrollPositionChange",{top:fe.current.top,left:fe.current.left,renderContext:e})})),Te=(0,a.Z)((e=>{t.current.publishEvent("virtualScrollerWheel",{},e)})),Pe=(0,a.Z)((e=>{t.current.publishEvent("virtualScrollerTouchMove",{},e)})),Ie=o.useMemo((()=>({overflowX:!ue||k?"hidden":void 0,overflowY:n.autoHeight?"hidden":void 0})),[ue,n.autoHeight,k]),Re=o.useMemo((()=>{const e={width:ue?le:"auto",flexBasis:se,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=R.m1),e}),[le,se,ue]),De=o.useCallback((e=>{e&&t.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:le,contentHeight:se})}),[t,le,se]);return(0,s.Z)((()=>{var e,n;ie.current&&(null===(e=(n=t.current).updateRenderContext)||void 0===e||e.call(n))}),[t,N,P]),(0,s.Z)((()=>{k&&(te.current.scrollLeft=0)}),[k,te]),((e,t)=>{const n=o.useRef(!1);(0,s.Z)((()=>n.current||!e?g:(n.current=!0,t())),[n.current||e])})(ye!==T.bH,(()=>{var e;if(t.current.publishEvent("scrollPositionChange",{top:fe.current.top,left:fe.current.left,renderContext:ye}),ie.current=!0,(null===(e=n.initialState)||void 0===e?void 0:e.scroll)&&te.current){const e=te.current,{top:r,left:o}=n.initialState.scroll,i={top:!(r>0),left:!(o>0)};if(!i.left&&le&&(e.scrollLeft=o,me.current=!0,i.left=!0),!i.top&&se&&(e.scrollTop=r,me.current=!0,i.top=!0),!i.top||!i.left){const n=t.current.subscribeEvent("virtualScrollerContentSizeChange",(t=>{!i.left&&t.columnsTotalWidth&&(e.scrollLeft=o,me.current=!0,i.left=!0),!i.top&&t.contentHeight&&(e.scrollTop=r,me.current=!0,i.top=!0),i.left&&i.top&&n()}));return n}}})),t.current.register("private",{updateRenderContext:Me}),(0,x.x3)(t,"sortedRowsSet",Me),(0,x.x3)(t,"paginationModelChange",Me),(0,x.x3)(t,"columnsChange",Me),{renderContext:ye,setPanels:Y,getRows:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o;if(!e.rows&&!J.range)return[];let i=ye;e.renderContext&&(i=e.renderContext,i.firstColumnIndex=ye.firstColumnIndex,i.lastColumnIndex=ye.lastColumnIndex);const a=!q&&void 0===e.position||q&&"bottom"===e.position,s=void 0!==e.position;let l;switch(e.position){case"top":l=0;break;case"bottom":l=H.top.length+J.rows.length;break;case void 0:l=H.top.length}const u=e.rows??J.rows,c=i.firstRowIndex,d=Math.min(i.lastRowIndex,u.length),h=e.rows?(0,S.w6)(0,e.rows.length):(0,S.w6)(c,d);let p=-1;!s&&be&&(be.rowIndexd&&(h.push(be.rowIndex),p=be.rowIndex));const f=[],m=null===(o=n.slotProps)||void 0===o?void 0:o.row,g=(0,v.Ag)(t);return h.forEach((o=>{var c;const{id:d,model:h}=u[o],v=((null==J||null===(c=J.range)||void 0===c?void 0:c.firstRowIndex)||0)+l+o;if(oe){const e=W.left.length,n=M.length-W.right.length;t.current.calculateColSpan({rowId:d,minFirstColumn:e,maxLastColumn:n,columns:M}),W.left.length>0&&t.current.calculateColSpan({rowId:d,minFirstColumn:0,maxLastColumn:W.left.length,columns:M}),W.right.length>0&&t.current.calculateColSpan({rowId:d,minFirstColumn:M.length-W.right.length,maxLastColumn:M.length,columns:M})}const y=t.current.rowHasAutoHeight(d)?"auto":t.current.unstable_getRowHeight(d);let b;b=null!=Q[d]&&t.current.isRowSelectable(d);let x=!1;void 0===e.position&&(x=0===o);let w=!1;const S=o===u.length-1;if(a)if(s)w=S;else{o===J.rows.length-1&&(w=!0)}let C=i;we.current&&o>=we.current.firstRowIndex&&o({ref:pe}),getScrollerProps:()=>({ref:te,onScroll:_e,onWheel:Te,onTouchMove:Pe,style:Ie,role:"presentation",tabIndex:w?-1:void 0}),getContentProps:()=>({style:Re,role:"presentation",ref:De}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:ne,scrollPosition:fe}),getScrollbarHorizontalProps:()=>({ref:re,scrollPosition:fe}),getScrollAreaProps:()=>({scrollPosition:fe})}};function z(e){return e.dimensions.viewportOuterSize.width>0&&e.dimensions.columnsTotalWidth>e.dimensions.viewportOuterSize.width}function B(e,t,n,r){const o=(0,h.jY)(e.current.state),i=(0,b.j)(e,t),a=t.unstable_listView?[(0,I.z)(e.current.state)]:(0,v.FE)(e),s=(0,P.uR)(e),l=e.current.state.rows.dataRowIds.at(-1),u=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:void 0!==l?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(null==u?void 0:u.computedWidth)??0,rowsMeta:(0,k.k)(e.current.state),columnPositions:(0,v.Ag)(e),rows:i.rows,range:i.range,pinnedColumns:(0,v.s3)(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function V(e,t,n){const o={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length};if(e.listView)return(0,r.Z)({},o,{lastColumnIndex:1});const{top:i,left:a}=t,s=Math.abs(a)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(H(e,i,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const n=e.hiddenCellsOriginMap[t];if(n){const e=Math.min(...Object.values(n));t=Math.min(t,e)}const r=e.autoHeight?t+e.rows.length:H(e,i+e.viewportInnerHeight);o.firstRowIndex=t,o.lastRowIndex=r}if(e.enabledForColumns){let t=0,r=e.columnPositions.length,i=!1;const[a,l]=W({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let t=a;t=e.range.lastRowIndex);const s=(0,S.uZ)(i-((null===(o=e.range)||void 0===o?void 0:o.firstRowIndex)||0),0,e.rowsMeta.positions.length);return a||e.rowsMeta.positions[s]>=t?$(t,e.rowsMeta.positions,n):function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=1;for(;n2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length;if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(null==n?void 0:n.atStart){s=e-((i===t.length-1?n.lastPosition:t[i+1])-a)s,bH:()=>a,fO:()=>l});var r=n(40182),o=n(32123),i=n(95362);const a={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},s=(e,t)=>{const{disableVirtualization:n,autoHeight:o}=t,i={enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!o,renderContext:a};return(0,r.Z)({},e,{virtualization:i})};function l(e,t){const n=n=>{e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabled:n,enabledForColumns:n,enabledForRows:n&&!t.autoHeight})})))},a={unstable_setVirtualization:n,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,r.Z)({},e,{virtualization:(0,r.Z)({},e.virtualization,{enabledForColumns:t})})))}};(0,i.h)(e,a,"public"),o.useEffect((()=>{n(!t.disableVirtualization)}),[t.disableVirtualization,t.autoHeight])}},98841:function(e,t,n){"use strict";n.d(t,{l:()=>i});var r=n(32123),o=n(35666);function i(){const e=r.useContext(o.r);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},59603:function(e,t,n){"use strict";n.d(t,{cG:()=>a,x3:()=>d,zn:()=>u});var r=n(32123);class o{register(e,t,n){this.timeouts||(this.timeouts=new Map);const r=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,r)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach(((e,t)=>{this.unregister({cleanupToken:t})})),this.timeouts=void 0)}constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}}class i{register(e,t,n){this.registry.register(e,t,n)}unregister(e){this.registry.unregister(e)}reset(){}constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}}var a=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(a||{});class s{}const l={registry:null},u=function(e){let t=0;return function(n,a,l,u){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new i:new o);const[c]=r.useState(new s),d=r.useRef(null),h=r.useRef(null);h.current=l;const p=r.useRef(null);if(!d.current&&h.current){const r=(e,t,n)=>{var r;t.defaultMuiPrevented||(null===(r=h.current)||void 0===r||r.call(h,e,t,n))};d.current=n.current.subscribeEvent(a,r,u),t+=1,p.current={cleanupToken:t},e.registry.register(c,(()=>{var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null,p.current=null}),p.current)}else!h.current&&d.current&&(d.current(),d.current=null,p.current&&(e.registry.unregister(p.current),p.current=null));r.useEffect((()=>{if(!d.current&&h.current){const e=(e,t,n)=>{var r;t.defaultMuiPrevented||(null===(r=h.current)||void 0===r||r.call(h,e,t,n))};d.current=n.current.subscribeEvent(a,e,u)}return p.current&&e.registry&&(e.registry.unregister(p.current),p.current=null),()=>{var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null}}),[n,a,u])}}(l),c={isFirst:!0};function d(e,t,n){u(e,t,n,c)}},95362:function(e,t,n){"use strict";n.d(t,{h:()=>i});var r=n(32123),o=n(14902);function i(e,t,n){const i=r.useRef(!0);(0,o.Z)((()=>{i.current=!1,e.current.register(n,t)}),[e,n,t]),i.current&&e.current.register(n,t)}},19e3:function(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(32123),o=n(98068);const i=()=>{const e=r.useContext(o.s);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},81092:function(e,t,n){"use strict";n.d(t,{$:()=>i,j:()=>o});var r=n(32123);const o=r.createContext(void 0);function i(){const e=r.useContext(o);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},21221:function(e,t,n){"use strict";n.d(t,{B:()=>i});var r=n(32123),o=n(56202);const i=()=>{const e=r.useContext(o.G);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},2105:function(e,t,n){"use strict";n.d(t,{AC:()=>v,Pp:()=>g,vV:()=>d});var r=n(32123),o=n(12925),i=n(92327),a=n(89039);function s(e){return e.acceptsApiRef}function l(e,t){return s(t)?t(e):t(e.current.state)}function u(e,t,n,r){return s(t)?t(e,n):t(e.current.state,r)}const c=Object.is,d=o.w,h=(e,t)=>e===t||e.length===t.length&&e.every(((e,n)=>e===t[n])),p=()=>({state:null,equals:null,selector:null,args:void 0}),f=[],m=()=>null,g=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;const o=(0,a.Z)(p),s=null!==o.current.selector,[u,d]=r.useState(s?null:l(e,t));o.current.state=u,o.current.equals=n,o.current.selector=t;const h=r.useCallback((()=>(o.current.subscription||(o.current.subscription=e.current.store.subscribe((()=>{const t=l(e,o.current.selector);o.current.equals(o.current.state,t)||(o.current.state=t,d(t))}))),null)),f),g=r.useCallback((()=>()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)}),f);return(0,i.useSyncExternalStore)(g,h,m),u},v=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c;const s=(0,a.Z)(p),l=null!==s.current.selector,[g,v]=r.useState(l?null:u(e,t,n,e.current.instanceId));s.current.state=g,s.current.equals=o,s.current.selector=t;const y=s.current.args;if(s.current.args=n,l&&!((e,t)=>{let n=Object.is;return t instanceof Array?n=h:t instanceof Object&&(n=d),n(e,t)})(y,n)){const t=u(e,s.current.selector,s.current.args,e.current.instanceId);s.current.equals(s.current.state,t)||(s.current.state=t,v(t))}const b=r.useCallback((()=>(s.current.subscription||(s.current.subscription=e.current.store.subscribe((()=>{const t=u(e,s.current.selector,s.current.args,e.current.instanceId);s.current.equals(s.current.state,t)||(s.current.state=t,v(t))}))),null)),f),x=r.useCallback((()=>()=>{s.current.subscription&&(s.current.subscription(),s.current.subscription=void 0)}),f);return(0,i.useSyncExternalStore)(x,b,m),g}},48719:function(e,t,n){"use strict";n.d(t,{j:()=>i,y:()=>a});var r=n(10780),o=n(2105);const i=(e,t)=>(0,r.iJ)(e),a=(e,t)=>(0,o.Pp)(e,r.iJ)},97616:function(e,t,n){"use strict";n.d(t,{FX:()=>a,KK:()=>o,QG:()=>r,u9:()=>i});const r="__tree_data_group__",o="__row_group_by_columns_group__",i="__detail_panel_toggle__";let a=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({})},71602:function(e,t,n){"use strict";n.d(t,{Q:()=>o});var r=n(47313);function o(e,t,n,o){const i=(0,r.b)(n,t);return i&&void 0!==o?(e[i]=o,e):e}},7605:function(e,t,n){"use strict";n.d(t,{a:()=>o});var r=n(97616);const o=(e,t,n,o,i,a)=>{let s;switch(e){case r.FX.LEFT:s=o[n];break;case r.FX.RIGHT:s=i-o[n]-t+a;break;default:s=void 0}return s}},42669:function(e,t,n){"use strict";n.d(t,{Vl:()=>o,r2:()=>r,se:()=>i});var r=function(e){return e.Cell="cell",e.Row="row",e}(r||{}),o=function(e){return e.Edit="edit",e.View="view",e}(o||{}),i=function(e){return e.Edit="edit",e.View="view",e}(i||{})},37358:function(e,t,n){"use strict";n.d(t,{G:()=>r});var r=function(e){return e.And="and",e.Or="or",e}(r||{})},95254:function(e,t,n){"use strict";n.d(t,{b:()=>r,r:()=>o});var r=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(r||{}),o=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(o||{})},51076:function(e,t,n){"use strict";n.d(t,{S:()=>i,y:()=>o});var r=n(97616);const o=(e,t,n,o,i)=>{const a=t===n-1;return!(e!==r.FX.LEFT||!a)||!!o&&(e===r.FX.LEFT||(e===r.FX.RIGHT?!a:!a||i))},i=(e,t)=>e===r.FX.RIGHT&&0===t},4369:function(e,t,n){"use strict";n.d(t,{P1:()=>l,Xw:()=>c,bG:()=>u});var r=n(42849);const o=(0,r.wN)({memoize:r.PP,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),i=new WeakMap;function a(e){return"current"in e&&"instanceId"in e.current}const s={id:"default"},l=function(e,t,n,r,o,i){for(var l=arguments.length,u=new Array(l>6?l-6:0),c=6;c0)throw new Error("Unsupported number of selectors");let d;if(e&&t&&n&&r&&o&&i)d=(l,u)=>{const c=a(l),d=u??(c?l.current.instanceId:s),h=c?l.current.state:l,p=e(h,d),f=t(h,d),m=n(h,d),g=r(h,d),v=o(h,d);return i(p,f,m,g,v)};else if(e&&t&&n&&r&&o)d=(i,l)=>{const u=a(i),c=l??(u?i.current.instanceId:s),d=u?i.current.state:i,h=e(d,c),p=t(d,c),f=n(d,c),m=r(d,c);return o(h,p,f,m)};else if(e&&t&&n&&r)d=(o,i)=>{const l=a(o),u=i??(l?o.current.instanceId:s),c=l?o.current.state:o,d=e(c,u),h=t(c,u),p=n(c,u);return r(d,h,p)};else if(e&&t&&n)d=(r,o)=>{const i=a(r),l=o??(i?r.current.instanceId:s),u=i?r.current.state:r,c=e(u,l),d=t(u,l);return n(c,d)};else{if(!e||!t)throw new Error("Missing arguments");d=(n,r)=>{const o=a(n),i=r??(o?n.current.instanceId:s),l=o?n.current.state:n,u=e(l,i);return t(u)}}return d.acceptsApiRef=!0,d},u=function(e,t,n,r,o,i){for(var l=arguments.length,u=new Array(l>6?l-6:0),c=6;c0)throw new Error("Unsupported number of selectors");let d;if(e&&t&&n&&r&&o&&i)d=(l,u,c)=>{const d=a(l),h=c??(d?l.current.instanceId:s),p=d?l.current.state:l,f=e(p,u,h),m=t(p,u,h),g=n(p,u,h),v=r(p,u,h),y=o(p,u,h);return i(f,m,g,v,y,u)};else if(e&&t&&n&&r&&o)d=(i,l,u)=>{const c=a(i),d=u??(c?i.current.instanceId:s),h=c?i.current.state:i,p=e(h,l,d),f=t(h,l,d),m=n(h,l,d),g=r(h,l,d);return o(p,f,m,g,l)};else if(e&&t&&n&&r)d=(o,i,l)=>{const u=a(o),c=l??(u?o.current.instanceId:s),d=u?o.current.state:o,h=e(d,i,c),p=t(d,i,c),f=n(d,i,c);return r(h,p,f,i)};else if(e&&t&&n)d=(r,o,i)=>{const l=a(r),u=i??(l?r.current.instanceId:s),c=l?r.current.state:r,d=e(c,o,u),h=t(c,o,u);return n(d,h,o)};else{if(!e||!t)throw new Error("Missing arguments");d=(n,r,o)=>{const i=a(n),l=o??(i?n.current.instanceId:s),u=i?n.current.state:n,c=e(u,r,l);return t(c,r)}}return d.acceptsApiRef=!0,d},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=a(e),l=r?e.current.instanceId:n??s,u=r?e.current.state:e;const c=i.get(l),d=c??new Map,h=null==d?void 0:d.get(t);if(d&&h)return h(u,l);const p=o(...t);return c||i.set(l,d),d.set(t,p),p(u,l)};return r.acceptsApiRef=!0,r}},2258:function(e,t,n){"use strict";n.d(t,{IA:()=>k,JF:()=>x,K5:()=>p,OF:()=>o,Q6:()=>u,R2:()=>f,WI:()=>h,Y$:()=>m,a9:()=>C,bp:()=>S,ct:()=>c,m5:()=>M,mi:()=>v,oF:()=>g,q_:()=>d,qk:()=>s,w5:()=>i,z$:()=>b,z6:()=>a});var r=n(55856);function o(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function i(e,t){return e.closest(`.${t}`)}function a(e){return e.replace(/["\\]/g,"\\$&")}function s(e,t){return e.querySelector(`[role="columnheader"][data-field="${a(t)}"]`)}function l(e){return`.${r._.row}[data-id="${a(String(e))}"]`}function u(e,t){return e.querySelector(l(t))}function c(e,t){let{id:n,field:o}=t;const i=`${l(n)} ${`.${r._.cell}[data-field="${a(o)}"]`}`;return e.querySelector(i)}function d(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function h(e){return e.getAttribute("data-field")}function p(e,t){return e.querySelector(`[data-field="${a(t)}"]`)}function f(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function m(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${a(t)}-|"]`)??[])}function g(e,t){var n;if(!i(e,r._.root))throw new Error("MUI X: The root element is not found.");const o=e.getAttribute("aria-colindex");if(!o)return[];const a=Number(o)-1,s=[];return(null===(n=t.virtualScrollerRef)||void 0===n?void 0:n.current)?(_(t).forEach((e=>{const n=e.getAttribute("data-id");if(!n)return;let r=a;const o=t.unstable_getCellColSpanInfo(n,a);o&&o.spannedByColSpan&&(r=o.leftVisibleCellIndex);const i=e.querySelector(`[data-colindex="${r}"]`);i&&s.push(i)})),s):[]}function v(e,t){return e.rootElementRef.current.querySelector(`.${r._[t]}`)}const y=e=>{let{api:t,colIndex:n,position:o,filterFn:i}=e;if(null===n)return[];const a=[];return _(t).forEach((e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${r._["left"===o?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach((e=>{const t=T(e);null!==t&&i(t)&&a.push(e)}))})),a};function b(e,t,n){const r=T(t);return y({api:e,colIndex:r,position:n?"right":"left",filterFn:e=>n?er})}function x(e,t,n){const r=T(t);return y({api:e,colIndex:r,position:n?"left":"right",filterFn:e=>n?e>r:e{let{api:t,colIndex:n,position:o,filterFn:i}=e;var a;if(!(null===(a=t.columnHeadersContainerRef)||void 0===a?void 0:a.current))return[];if(null===n)return[];const s=[];return t.columnHeadersContainerRef.current.querySelectorAll(`.${r._["left"===o?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach((e=>{const t=T(e);null!==t&&i(t,e)&&s.push(e)})),s};function S(e,t,n){const r=T(t);return w({api:e,position:n?"right":"left",colIndex:r,filterFn:e=>n?er})}function C(e,t,n){const o=T(t);return w({api:e,position:n?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(r._["columnHeader--last"])&&(n?e>o:e div > [data-field="${a(t)}"][role="columnheader"]`)}function M(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${a(t)}"][role="gridcell"]`))}function _(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${r._.row}`)}function T(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}},39111:function(e,t,n){"use strict";n.d(t,{P:()=>r});const r="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent)},21806:function(e,t,n){"use strict";function r(e,t){return Math.round(e*10**t)/10**t}n.d(t,{T:()=>r})},47313:function(e,t,n){"use strict";n.d(t,{b:()=>o});var r=n(97616);const o=(e,t)=>{if(e)if(t){if(e===r.FX.LEFT)return"right";if(e===r.FX.RIGHT)return"left"}else{if(e===r.FX.LEFT)return"left";if(e===r.FX.RIGHT)return"right"}}},87394:function(e,t,n){"use strict";function r(e){return"number"==typeof e&&!Number.isNaN(e)}function o(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}function s(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}n.d(t,{I8:()=>h,Kn:()=>i,Vu:()=>a,d$:()=>f,eV:()=>p,hj:()=>r,hr:()=>s,iR:()=>d,mf:()=>o,uZ:()=>l,w6:()=>u,xb:()=>c});const l=(e,t,n)=>Math.max(t,Math.min(n,e));function u(e,t){return Array.from({length:t-e}).map(((t,n)=>e+n))}function c(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return(e,n)=>e+(n-e)*t()}function h(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}function p(e){}const f=(e,t)=>n=>{e&&t(n)}},77834:function(e,t,n){"use strict";n.d(t,{X:()=>i});var r=n(32123),o=n(12925);function i(e){return r.memo(e,o.w)}},12925:function(e,t,n){"use strict";n.d(t,{w:()=>o});const r=Object.is;function o(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,o=0;for(const o in e){if(n+=1,!r(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return n===o}},53831:function(e,t,n){"use strict";n.d(t,{G:()=>i});var r=n(32123);const o=parseInt(r.version,10),i=e=>{if(o>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return r.forwardRef(e)}},30329:function(e,t,n){"use strict";var r=n(26424).default;t.default=void 0;var o=r(n(32123));t.default=parseInt(o.version,10)},72874:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tG,Cd:()=>Z,Ep:()=>p,Gn:()=>A,J0:()=>u,LX:()=>E,OF:()=>ee,PP:()=>a,PQ:()=>Y,RQ:()=>V,WK:()=>te,WS:()=>w,X3:()=>U,Zn:()=>L,aU:()=>o,cP:()=>f,cm:()=>z,fZ:()=>Q,fp:()=>b,gx:()=>J,i3:()=>F,lX:()=>s,ov:()=>ue,p7:()=>fe,pC:()=>B,q_:()=>l,qp:()=>ce,uX:()=>X}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){void 0===e&&(e={});let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let a=u(null==r?t.length-1:r),s=o.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[a]}function m(e,n,r){void 0===n&&(n=null);let o=h(t?d().pathname:"/",e,n,r);return c("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function g(e){return"string"==typeof e?e:p(e)}return{get index(){return a},get action(){return s},get location(){return d()},createHref:g,createURL:e=>new URL(g(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?f(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){s=o.Push;let r=m(e,n);a+=1,t.splice(a,t.length,r),i&&l&&l({action:s,location:r,delta:1})},replace(e,n){s=o.Replace;let r=m(e,n);t[a]=r,i&&l&&l({action:s,location:r,delta:0})},go(e){s=o.Pop;let n=u(a+e),r=t[n];a=n,l&&l({action:s,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}function s(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:p(t)}),null,e)}function l(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:p(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m(e,t,n,a){void 0===a&&(a={});let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,f=o.Pop,m=null,g=v();function v(){return(c.state||{idx:null}).idx}function y(){f=o.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:f,location:x.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),u(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,c.replaceState(r({},c.state,{idx:g}),""));let x={get action(){return f},get location(){return e(s,c)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(i,y),m=e,()=>{s.removeEventListener(i,y),m=null}},createHref:e=>t(s,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){f=o.Push;let r=h(x.location,e,t);n&&n(r,e),g=v()+1;let i=d(r,g),a=x.createHref(r);try{c.pushState(i,"",a)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(a)}l&&m&&m({action:f,location:x.location,delta:1})},replace:function(e,t){f=o.Replace;let r=h(x.location,e,t);n&&n(r,e),g=v();let i=d(r,g),a=x.createHref(r);c.replaceState(i,"",a),l&&m&&m({action:f,location:x.location,delta:0})},go:e=>c.go(e)};return x}var g;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));const v=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n,o){return void 0===n&&(n=[]),void 0===o&&(o={}),e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(!o[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=r({},e,t(e),{id:s});return o[s]=n,n}{let n=r({},e,t(e),{id:s,children:void 0});return o[s]=n,e.children&&(n.children=y(e.children,t,a,o)),n}}))}function b(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let o=L(("string"==typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(u(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=V([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(u(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),S(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:D(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of C(e.path))o(e,t,n);else o(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=C(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const k=/^:[\w-]+$/,M=3,_=2,T=1,P=10,I=-2,R=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(R)&&(r+=I),t&&(r+=_),n.filter((e=>!R(e))).reduce(((e,t)=>e+(k.test(t)?M:""===t?T:P)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;enull==e?"":"string"==typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e){return o(t["*"])}const i=e.match(/^:([\w-]+)(\??)$/);if(i){const[,e,n]=i;let r=t[e];return u("?"===n||null!=r,'Missing ":'+e+'" param'),o(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function Z(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function L(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function F(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:$(r),hash:W(o)}}function j(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function N(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function z(e,t){let n=N(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function B(e,t,n,o){let i;void 0===o&&(o=!1),"string"==typeof e?i=f(e):(i=r({},e),u(!i.pathname||!i.pathname.includes("?"),j("?","pathname","search",i)),u(!i.pathname||!i.pathname.includes("#"),j("#","pathname","hash",i)),u(!i.search||!i.search.includes("#"),j("#","search","hash",i)));let a,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(null==l)a=n;else{let e=t.length-1;if(!o&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=F(i,a),d=l&&"/"!==l&&l.endsWith("/"),h=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}const V=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",W=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",G=function(e,t){void 0===t&&(t={});let n="number"==typeof t?{status:t}:t,o=new Headers(n.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),r({},n,{headers:o}))};class U extends Error{}class q{trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(n,e,void 0,t)),(t=>this.onSettle(n,e,t)));return n.catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof U)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===n&&void 0===r){let n=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return void 0===r?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach((n=>n(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),t=await new Promise((t=>{this.subscribe((r=>{e.removeEventListener("abort",n),(r||this.done)&&t(r)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return u(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:K(r)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}constructor(e,t){let n;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],u(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>n=t)),this.controller=new AbortController;let r=()=>n(new U("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r),this.controller.signal.addEventListener("abort",r),this.data=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}}function K(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const Y=function(e,t){return void 0===t&&(t={}),new q(e,"number"==typeof t?{status:t}:t)},X=function(e,t){void 0===t&&(t=302);let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let o=new Headers(n.headers);return o.set("Location",e),new Response(null,r({},n,{headers:o}))},Q=(e,t)=>{let n=X(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n},J=(e,t)=>{let n=X(e,t);return n.headers.set("X-Remix-Replace","true"),n};class ee{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ne=["post","put","patch","delete"],re=new Set(ne),oe=["get",...ne],ie=new Set(oe),ae=new Set([301,302,303,307,308]),se=new Set([307,308]),le={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ue={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,he=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),pe="remix-router-transitions";function fe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,i=!n;let a;if(u(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=he;let s,l,d,p={},f=y(e.routes,a,void 0,p),m=e.basename||"/",v=e.dataStrategy||ke,S=e.patchRoutesOnNavigation,C=r({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),k=null,M=new Set,_=null,T=null,P=null,I=null!=e.hydrationData,R=b(f,e.history.location,m),D=!1,O=null;if(null==R&&!S){let t=je(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Fe(f);R=n,O={[r.id]:t}}if(R&&!e.hydrationData){ct(R,f,e.history.location.pathname).active&&(R=null)}if(R)if(R.some((e=>e.route.lazy)))l=!1;else if(R.some((e=>e.route.loader)))if(C.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=R.findIndex((e=>void 0!==n[e.route.id]));l=R.slice(0,e+1).every((e=>!be(e.route,t,n)))}else l=R.every((e=>!be(e.route,t,n)))}else l=null!=e.hydrationData;else l=!0;else if(l=!1,R=[],C.v7_partialHydration){let t=ct(null,f,e.history.location.pathname);t.active&&t.matches&&(D=!0,R=t.matches)}let A,E,Z={historyAction:e.history.action,location:e.history.location,matches:R,initialized:l,navigation:le,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||O,fetchers:new Map,blockers:new Map},F=o.Pop,j=!1,N=!1,z=new Map,B=null,V=!1,H=!1,$=[],W=new Set,G=new Map,U=0,q=-1,K=new Map,Y=new Set,X=new Map,Q=new Map,J=new Set,ee=new Map,ne=new Map;function re(e,t){void 0===t&&(t={}),Z=r({},Z,e);let n=[],o=[];C.v7_fetcherPersist&&Z.fetchers.forEach(((e,t)=>{"idle"===e.state&&(J.has(t)?o.push(t):n.push(t))})),J.forEach((e=>{Z.fetchers.has(e)||G.has(e)||o.push(e)})),[...M].forEach((e=>e(Z,{deletedFetchers:o,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),C.v7_fetcherPersist?(n.forEach((e=>Z.fetchers.delete(e))),o.forEach((e=>Oe(e)))):o.forEach((e=>J.delete(e)))}function oe(t,n,i){var a,l;let u,{flushSync:c}=void 0===i?{}:i,d=null!=Z.actionData&&null!=Z.navigation.formMethod&&qe(Z.navigation.formMethod)&&"loading"===Z.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);u=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?Z.actionData:null;let h=n.loaderData?Ee(Z.loaderData,n.loaderData,n.matches||[],n.errors):Z.loaderData,p=Z.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,ce))));let m,g=!0===j||null!=Z.navigation.formMethod&&qe(Z.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(f=s,s=void 0),V||F===o.Pop||(F===o.Push?e.history.push(t,t.state):F===o.Replace&&e.history.replace(t,t.state)),F===o.Pop){let e=z.get(Z.location.pathname);e&&e.has(t.pathname)?m={currentLocation:Z.location,nextLocation:t}:z.has(t.pathname)&&(m={currentLocation:t,nextLocation:Z.location})}else if(N){let e=z.get(Z.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(Z.location.pathname,e)),m={currentLocation:Z.location,nextLocation:t}}re(r({},n,{actionData:u,loaderData:h,historyAction:F,location:t,initialized:!0,navigation:le,revalidation:"idle",restoreScrollPosition:ut(t,n.matches||Z.matches),preventScrollReset:g,blockers:p}),{viewTransitionOpts:m,flushSync:!0===c}),F=o.Pop,j=!1,N=!1,V=!1,H=!1,$=[]}async function ie(t,n,i){A&&A.abort(),A=null,F=t,V=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(_&&P){let n=lt(e,t);_[n]=P()}}(Z.location,Z.matches),j=!0===(i&&i.preventScrollReset),N=!0===(i&&i.enableViewTransition);let a=s||f,l=i&&i.overrideNavigation,u=null!=i&&i.initialHydration&&Z.matches&&Z.matches.length>0&&!D?Z.matches:b(a,n,m),c=!0===(i&&i.flushSync);if(u&&Z.initialized&&!H&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(Z.location,n)&&!(i&&i.submission&&qe(i.submission.formMethod)))return void oe(n,{matches:u},{flushSync:c});let d=ct(u,a,n.pathname);if(d.active&&d.matches&&(u=d.matches),!u){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return void oe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c})}A=new AbortController;let h,p=Ie(e.history,n,A.signal,i&&i.submission);if(i&&i.pendingError)h=[Le(u).route.id,{type:g.error,error:i.pendingError}];else if(i&&i.submission&&qe(i.submission.formMethod)){let t=await async function(e,t,n,r,i,a){void 0===a&&(a={});we();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(t,n);if(re({navigation:l},{flushSync:!0===a.flushSync}),i){let n=await dt(r,t.pathname,e.signal);if("aborted"===n.type)return{shortCircuited:!0};if("error"===n.type){let e=Le(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:g.error,error:n.error}]}}if(!n.matches){let{notFoundMatches:e,error:n,route:r}=at(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:g.error,error:n}]}}r=n.matches}let u=Je(r,t);if(u.route.action||u.route.lazy){if(s=(await ve("action",Z,e,[u],r,null))[u.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:g.error,error:je(405,{method:e.method,pathname:t.pathname,routeId:u.route.id})};if($e(s)){let t;if(a&&null!=a.replace)t=a.replace;else{t=Pe(s.response.headers.get("Location"),new URL(e.url),m)===Z.location.pathname+Z.location.search}return await fe(e,s,!0,{submission:n,replace:t}),{shortCircuited:!0}}if(Ve(s))throw je(400,{type:"defer-action"});if(He(s)){let e=Le(r,u.route.id);return!0!==(a&&a.replace)&&(F=o.Push),{matches:r,pendingActionResult:[e.route.id,s]}}return{matches:r,pendingActionResult:[u.route.id,s]}}(p,n,i.submission,u,d.active,{replace:i.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(He(r)&&te(r.error)&&404===r.error.status)return A=null,void oe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}u=t.matches||u,h=t.pendingActionResult,l=tt(n,i.submission),c=!1,d.active=!1,p=Ie(e.history,p.url,p.signal)}let{shortCircuited:v,matches:y,loaderData:x,errors:w}=await async function(t,n,o,i,a,l,u,c,d,h,p){let g=a||tt(n,l),v=l||u||et(g),y=!(V||C.v7_partialHydration&&d);if(i){if(y){let e=ae(p);re(r({navigation:g},void 0!==e?{actionData:e}:{}),{flushSync:h})}let e=await dt(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Le(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let b=s||f,[x,w]=ye(e.history,Z,o,v,n,C.v7_partialHydration&&!0===d,C.v7_skipActionErrorRevalidation,H,$,W,J,X,Y,b,m,p);if(st((e=>!(o&&o.some((t=>t.route.id===e)))||x&&x.some((t=>t.route.id===e)))),q=++U,0===x.length&&0===w.length){let e=Ge();return oe(n,r({matches:o,loaderData:{},errors:p&&He(p[1])?{[p[0]]:p[1].error}:null},Ze(p),e?{fetchers:new Map(Z.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(y){let e={};if(!i){e.navigation=g;let t=ae(p);void 0!==t&&(e.actionData=t)}w.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=Z.fetchers.get(e.key),n=nt(void 0,t?t.data:void 0);Z.fetchers.set(e.key,n)})),new Map(Z.fetchers)}(w)),re(e,{flushSync:h})}w.forEach((e=>{ze(e.key),e.controller&&G.set(e.key,e.controller)}));let S=()=>w.forEach((e=>ze(e.key)));A&&A.signal.addEventListener("abort",S);let{loaderResults:k,fetcherResults:M}=await xe(Z,o,x,w,t);if(t.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",S);w.forEach((e=>G.delete(e.key)));let _=Ne(k);if(_)return await fe(t,_.result,!0,{replace:c}),{shortCircuited:!0};if(_=Ne(M),_)return Y.add(_.key),await fe(t,_.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:T,errors:P}=Ae(Z,o,k,p,w,M,ee);ee.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&ee.delete(t)}))})),C.v7_partialHydration&&d&&Z.errors&&(P=r({},Z.errors,P));let I=Ge(),R=Ue(q),D=I||R||w.length>0;return r({matches:o,loaderData:T,errors:P},D?{fetchers:new Map(Z.fetchers)}:{})}(p,n,u,d.active,l,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&!0===i.initialHydration,c,h);v||(A=null,oe(n,r({matches:y||u},Ze(h),{loaderData:x,errors:w})))}function ae(e){return e&&!He(e[1])?{[e[0]]:e[1].data}:Z.actionData?0===Object.keys(Z.actionData).length?null:Z.actionData:void 0}async function fe(i,a,s,l){let{submission:c,fetcherSubmission:d,preventScrollReset:p,replace:f}=void 0===l?{}:l;a.response.headers.has("X-Remix-Revalidate")&&(H=!0);let g=a.response.headers.get("Location");u(g,"Expected a Location header on the redirect Response"),g=Pe(g,new URL(i.url),m);let v=h(Z.location,g,{_isRedirect:!0});if(n){let n=!1;if(a.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(de.test(g)){const r=e.history.createURL(g);n=r.origin!==t.location.origin||null==L(r.pathname,m)}if(n)return void(f?t.location.replace(g):t.location.assign(g))}A=null;let y=!0===f||a.response.headers.has("X-Remix-Replace")?o.Replace:o.Push,{formMethod:b,formAction:x,formEncType:w}=Z.navigation;!c&&!d&&b&&x&&w&&(c=et(Z.navigation));let S=c||d;if(se.has(a.response.status)&&S&&qe(S.formMethod))await ie(y,v,{submission:r({},S,{formAction:g}),preventScrollReset:p||j,enableViewTransition:s?N:void 0});else{let e=tt(v,c);await ie(y,v,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:p||j,enableViewTransition:s?N:void 0})}}async function ve(e,t,n,r,o,i){let s,l={};try{s=await Me(v,e,t,n,r,o,i,p,a)}catch(e){return r.forEach((t=>{l[t.route.id]={type:g.error,error:e}})),l}for(let[e,t]of Object.entries(s))if(Be(t)){let r=t.result;l[e]={type:g.redirect,response:Te(r,n,e,o,m,C.v7_relativeSplatPath)}}else l[e]=await _e(t);return l}async function xe(t,n,r,o,i){let a=t.matches,s=ve("loader",t,i,r,n,null),l=Promise.all(o.map((async n=>{if(n.matches&&n.match&&n.controller){let r=(await ve("loader",t,Ie(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:g.error,error:je(404,{pathname:n.path})}})}))),u=await s,c=(await l).reduce(((e,t)=>Object.assign(e,t)),{});return await Promise.all([Ke(n,u,i.signal,a,t.loaderData),Ye(n,c,o)]),{loaderResults:u,fetcherResults:c}}function we(){H=!0,$.push(...st()),X.forEach(((e,t)=>{G.has(t)&&W.add(t),ze(t)}))}function Ce(e,t,n){void 0===n&&(n={}),Z.fetchers.set(e,t),re({fetchers:new Map(Z.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Re(e,t,n,r){void 0===r&&(r={});let o=Le(Z.matches,t);Oe(e),re({errors:{[o.route.id]:n},fetchers:new Map(Z.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function De(e){return Q.set(e,(Q.get(e)||0)+1),J.has(e)&&J.delete(e),Z.fetchers.get(e)||ue}function Oe(e){let t=Z.fetchers.get(e);!G.has(e)||t&&"loading"===t.state&&K.has(e)||ze(e),X.delete(e),K.delete(e),Y.delete(e),C.v7_fetcherPersist&&J.delete(e),W.delete(e),Z.fetchers.delete(e)}function ze(e){let t=G.get(e);t&&(t.abort(),G.delete(e))}function We(e){for(let t of e){let e=rt(De(t).data);Z.fetchers.set(t,e)}}function Ge(){let e=[],t=!1;for(let n of Y){let r=Z.fetchers.get(n);u(r,"Expected fetcher: "+n),"loading"===r.state&&(Y.delete(n),e.push(n),t=!0)}return We(e),t}function Ue(e){let t=[];for(let[n,r]of K)if(r0}function Qe(e){Z.blockers.delete(e),ne.delete(e)}function ot(e,t){let n=Z.blockers.get(e)||ce;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(Z.blockers);r.set(e,t),re({blockers:r})}function it(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===ne.size)return;ne.size>1&&c(!1,"A router only supports one blocker at a time");let o=Array.from(ne.entries()),[i,a]=o[o.length-1],s=Z.blockers.get(i);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?i:void 0}function at(e){let t=je(404,{pathname:e}),n=s||f,{matches:r,route:o}=Fe(n);return st(),{notFoundMatches:r,route:o,error:t}}function st(e){let t=[];return ee.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),ee.delete(r))})),t}function lt(e,t){if(T){return T(e,t.map((e=>w(e,Z.loaderData))))||e.key}return e.key}function ut(e,t){if(_){let n=lt(e,t),r=_[n];if("number"==typeof r)return r}return null}function ct(e,t,n){if(S){if(!e){return{active:!0,matches:x(t,n,m,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:x(t,n,m,!0)}}}return{active:!1,matches:null}}async function dt(e,t,n,r){if(!S)return{type:"success",matches:e};let o=e;for(;;){let e=null==s,i=s||f,l=p;try{await S({signal:n,path:t,matches:o,fetcherKey:r,patch:(e,t)=>{n.aborted||Se(e,t,i,l,a)}})}catch(e){return{type:"error",error:e,partialMatches:o}}finally{e&&!n.aborted&&(f=[...f])}if(n.aborted)return{type:"aborted"};let u=b(i,t,m);if(u)return{type:"success",matches:u};let c=x(i,t,m,!0);if(!c||o.length===c.length&&o.every(((e,t)=>e.route.id===c[t].route.id)))return{type:"success",matches:null};o=c}}return d={get basename(){return m},get future(){return C},get state(){return Z},get routes(){return f},get window(){return t},initialize:function(){if(k=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(E)return E(),void(E=void 0);c(0===ne.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=it({currentLocation:Z.location,nextLocation:r,historyAction:n});if(i&&null!=o){let t=new Promise((e=>{E=e}));return e.history.go(-1*o),void ot(i,{state:"blocked",location:r,proceed(){ot(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then((()=>e.history.go(o)))},reset(){let e=new Map(Z.blockers);e.set(i,ce),re({blockers:e})}})}return ie(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(pe);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,z);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(pe,JSON.stringify(n))}catch(e){c(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,z);t.addEventListener("pagehide",e),B=()=>t.removeEventListener("pagehide",e)}return Z.initialized||ie(o.Pop,Z.location,{initialHydration:!0}),d},subscribe:function(e){return M.add(e),()=>M.delete(e)},enableScrollRestoration:function(e,t,n){if(_=e,P=t,T=n||null,!I&&Z.navigation===le){I=!0;let e=ut(Z.location,Z.matches);null!=e&&re({restoreScrollPosition:e})}return()=>{_=null,P=null,T=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let a=me(Z.location,Z.matches,m,C.v7_prependBasename,n,C.v7_relativeSplatPath,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:s,submission:l,error:u}=ge(C.v7_normalizeFormMethod,!1,a,i),c=Z.location,d=h(Z.location,s,i&&i.state);d=r({},d,e.history.encodeLocation(d));let p=i&&null!=i.replace?i.replace:void 0,f=o.Push;!0===p?f=o.Replace:!1===p||null!=l&&qe(l.formMethod)&&l.formAction===Z.location.pathname+Z.location.search&&(f=o.Replace);let g=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,v=!0===(i&&i.flushSync),y=it({currentLocation:c,nextLocation:d,historyAction:f});if(!y)return await ie(f,d,{submission:l,pendingError:u,preventScrollReset:g,replace:i&&i.replace,enableViewTransition:i&&i.viewTransition,flushSync:v});ot(y,{state:"blocked",location:d,proceed(){ot(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,i)},reset(){let e=new Map(Z.blockers);e.set(y,ce),re({blockers:e})}})},fetch:function(t,n,r,o){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ze(t);let a=!0===(o&&o.flushSync),l=s||f,c=me(Z.location,Z.matches,m,C.v7_prependBasename,r,C.v7_relativeSplatPath,n,null==o?void 0:o.relative),d=b(l,c,m),h=ct(d,l,c);if(h.active&&h.matches&&(d=h.matches),!d)return void Re(t,n,je(404,{pathname:c}),{flushSync:a});let{path:p,submission:g,error:v}=ge(C.v7_normalizeFormMethod,!0,c,o);if(v)return void Re(t,n,v,{flushSync:a});let y=Je(d,p),x=!0===(o&&o.preventScrollReset);g&&qe(g.formMethod)?async function(t,n,r,o,i,a,l,c,d){function h(e){if(!e.route.action&&!e.route.lazy){let e=je(405,{method:d.formMethod,pathname:r,routeId:n});return Re(t,n,e,{flushSync:l}),!0}return!1}if(we(),X.delete(t),!a&&h(o))return;let p=Z.fetchers.get(t);Ce(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(d,p),{flushSync:l});let g=new AbortController,v=Ie(e.history,r,g.signal,d);if(a){let e=await dt(i,new URL(v.url).pathname,v.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Re(t,n,e.error,{flushSync:l});if(!e.matches)return void Re(t,n,je(404,{pathname:r}),{flushSync:l});if(h(o=Je(i=e.matches,r)))return}G.set(t,g);let y=U,x=await ve("action",Z,v,[o],i,t),w=x[o.route.id];if(v.signal.aborted)return void(G.get(t)===g&&G.delete(t));if(C.v7_fetcherPersist&&J.has(t)){if($e(w)||He(w))return void Ce(t,rt(void 0))}else{if($e(w))return G.delete(t),q>y?void Ce(t,rt(void 0)):(Y.add(t),Ce(t,nt(d)),fe(v,w,!1,{fetcherSubmission:d,preventScrollReset:c}));if(He(w))return void Re(t,n,w.error)}if(Ve(w))throw je(400,{type:"defer-action"});let S=Z.navigation.location||Z.location,k=Ie(e.history,S,g.signal),M=s||f,_="idle"!==Z.navigation.state?b(M,Z.navigation.location,m):Z.matches;u(_,"Didn't find any matches after fetcher action");let T=++U;K.set(t,T);let P=nt(d,w.data);Z.fetchers.set(t,P);let[I,R]=ye(e.history,Z,_,d,S,!1,C.v7_skipActionErrorRevalidation,H,$,W,J,X,Y,M,m,[o.route.id,w]);R.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=Z.fetchers.get(t),r=nt(void 0,n?n.data:void 0);Z.fetchers.set(t,r),ze(t),e.controller&&G.set(t,e.controller)})),re({fetchers:new Map(Z.fetchers)});let D=()=>R.forEach((e=>ze(e.key)));g.signal.addEventListener("abort",D);let{loaderResults:O,fetcherResults:E}=await xe(Z,_,I,R,k);if(g.signal.aborted)return;g.signal.removeEventListener("abort",D),K.delete(t),G.delete(t),R.forEach((e=>G.delete(e.key)));let L=Ne(O);if(L)return fe(k,L.result,!1,{preventScrollReset:c});if(L=Ne(E),L)return Y.add(L.key),fe(k,L.result,!1,{preventScrollReset:c});let{loaderData:j,errors:N}=Ae(Z,_,O,void 0,R,E,ee);if(Z.fetchers.has(t)){let e=rt(w.data);Z.fetchers.set(t,e)}Ue(T),"loading"===Z.navigation.state&&T>q?(u(F,"Expected pending action"),A&&A.abort(),oe(Z.navigation.location,{matches:_,loaderData:j,errors:N,fetchers:new Map(Z.fetchers)})):(re({errors:N,loaderData:Ee(Z.loaderData,j,_,N),fetchers:new Map(Z.fetchers)}),H=!1)}(t,n,p,y,d,h.active,a,x,g):(X.set(t,{routeId:n,path:p}),async function(t,n,r,o,i,a,s,l,c){let d=Z.fetchers.get(t);Ce(t,nt(c,d?d.data:void 0),{flushSync:s});let h=new AbortController,p=Ie(e.history,r,h.signal);if(a){let e=await dt(i,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Re(t,n,e.error,{flushSync:s});if(!e.matches)return void Re(t,n,je(404,{pathname:r}),{flushSync:s});o=Je(i=e.matches,r)}G.set(t,h);let f=U,m=await ve("loader",Z,p,[o],i,t),g=m[o.route.id];Ve(g)&&(g=await Xe(g,p.signal,!0)||g);G.get(t)===h&&G.delete(t);if(p.signal.aborted)return;if(J.has(t))return void Ce(t,rt(void 0));if($e(g))return q>f?void Ce(t,rt(void 0)):(Y.add(t),void await fe(p,g,!1,{preventScrollReset:l}));if(He(g))return void Re(t,n,g.error);u(!Ve(g),"Unhandled fetcher deferred data"),Ce(t,rt(g.data))}(t,n,p,y,d,h.active,a,x,g))},revalidate:function(){we(),re({revalidation:"loading"}),"submitting"!==Z.navigation.state&&("idle"!==Z.navigation.state?ie(F||Z.historyAction,Z.navigation.location,{overrideNavigation:Z.navigation,enableViewTransition:!0===N}):ie(Z.historyAction,Z.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),J.add(e),C.v7_fetcherPersist||Oe(e)):Q.set(e,t),re({fetchers:new Map(Z.fetchers)})},dispose:function(){k&&k(),B&&B(),M.clear(),A&&A.abort(),Z.fetchers.forEach(((e,t)=>Oe(t))),Z.blockers.forEach(((e,t)=>Qe(t)))},getBlocker:function(e,t){let n=Z.blockers.get(e)||ce;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Qe,patchRoutes:function(e,t){let n=null==s;Se(e,t,s||f,p,a),n&&(f=[...f],re({}))},_internalFetchControllers:G,_internalActiveDeferreds:ee,_internalSetRoutes:function(e){p={},s=y(e,a,void 0,p)}},d}Symbol("deferred");function me(e,t,n,r,o,i,a,s){let l,u;if(a){l=[];for(let e of t)if(l.push(e),e.route.id===a){u=e;break}}else l=t,u=t[t.length-1];let c=B(o||".",z(l,i),L(e.pathname,n)||e.pathname,"path"===s);if(null==o&&(c.search=e.search,c.hash=e.hash),(null==o||""===o||"."===o)&&u){let e=Qe(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?"?"+n:""}}return r&&"/"!==n&&(c.pathname="/"===c.pathname?n:V([n,c.pathname])),p(c)}function ge(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ue(r.formMethod))return{path:n,error:je(405,{method:r.formMethod})};let o,i,a=()=>({path:n,error:je(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),c=ze(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!qe(l))return a();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!qe(l))return a();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return a()}}}if(u("function"==typeof FormData,"FormData is not available in this environment"),r.formData)o=Re(r.formData),i=r.formData;else if(r.body instanceof FormData)o=Re(r.body),i=r.body;else if(r.body instanceof URLSearchParams)o=r.body,i=De(o);else if(null==r.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(r.body),i=De(o)}catch(e){return a()}let d={formMethod:l,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(qe(d.formMethod))return{path:n,submission:d};let h=f(n);return t&&h.search&&Qe(h.search)&&o.append("index",""),h.search="?"+o,{path:p(h),submission:d}}function ve(e,t,n){void 0===n&&(n=!1);let r=e.findIndex((e=>e.route.id===t));return r>=0?e.slice(0,n?r+1:r):e}function ye(e,t,n,o,i,a,s,l,u,c,d,h,p,f,m,g){let v=g?He(g[1])?g[1].error:g[1].data:void 0,y=e.createURL(t.location),x=e.createURL(i),w=n;a&&t.errors?w=ve(n,Object.keys(t.errors)[0],!0):g&&He(g[1])&&(w=ve(n,g[0]));let S=g?g[1].statusCode:void 0,C=s&&S&&S>=400,k=w.filter(((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(null==i.loader)return!1;if(a)return be(i,t.loaderData,t.errors);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||u.some((t=>t===e.route.id)))return!0;let s=t.matches[n],c=e;return we(e,r({currentUrl:y,currentParams:s.params,nextUrl:x,nextParams:c.params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!C&&(l||y.pathname+y.search===x.pathname+x.search||y.search!==x.search||xe(s,c))}))})),M=[];return h.forEach(((e,i)=>{if(a||!n.some((t=>t.route.id===e.routeId))||d.has(i))return;let s=b(f,e.path,m);if(!s)return void M.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(i),h=Je(s,e.path),g=!1;p.has(i)?g=!1:c.has(i)?(c.delete(i),g=!0):g=u&&"idle"!==u.state&&void 0===u.data?l:we(h,r({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!C&&l})),g&&M.push({key:i,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[k,M]}function be(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function xe(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function we(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Se(e,t,n,r,o){var i;let a;if(e){let t=r[e];u(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),a=t.children}else a=n;let s=y(t.filter((e=>!a.some((t=>Ce(e,t))))),o,[e||"_","patch",String((null==(i=a)?void 0:i.length)||"0")],r);a.push(...s)}function Ce(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>{var r;return null==(r=t.children)?void 0:r.some((t=>Ce(e,t)))})))}async function ke(e){let{matches:t}=e,n=t.filter((e=>e.shouldLoad));return(await Promise.all(n.map((e=>e.resolve())))).reduce(((e,t,r)=>Object.assign(e,{[n[r].route.id]:t})),{})}async function Me(e,t,n,o,i,a,s,l,d,h){let p=a.map((e=>e.route.lazy?async function(e,t,n){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let i=n[e.id];u(i,"No route found in manifest");let a={};for(let e in o){let t=void 0!==i[e]&&"hasErrorBoundary"!==e;c(!t,'Route "'+i.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||v.has(e)||(a[e]=o[e])}Object.assign(i,a),Object.assign(i,r({},t(i),{lazy:void 0}))}(e.route,d,l):void 0)),f=a.map(((e,n)=>{let a=p[n],s=i.some((t=>t.route.id===e.route.id));return r({},e,{shouldLoad:s,resolve:async n=>(n&&"GET"===o.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?async function(e,t,n,r,o,i){let a,s,l=r=>{let a,l=new Promise(((e,t)=>a=t));s=()=>a(),t.signal.addEventListener("abort",s);let u=o=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:i},...void 0!==o?[o]:[]),c=(async()=>{try{return{type:"data",result:await(o?o((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let o=n.route[e];if(r)if(o){let e,[t]=await Promise.all([l(o).catch((t=>{e=t})),r]);if(void 0!==e)throw e;a=t}else{if(await r,o=n.route[e],!o){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw je(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:g.data,result:void 0}}a=await l(o)}else{if(!o){let e=new URL(t.url);throw je(404,{pathname:e.pathname+e.search})}a=await l(o)}u(void 0!==a.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:g.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return a}(t,o,e,a,n,h):Promise.resolve({type:g.data,result:void 0}))})})),m=await e({matches:f,request:o,params:a[0].params,fetcherKey:s,context:h});try{await Promise.all(p)}catch(e){}return m}async function _e(e){let{result:t,type:n}=e;if(Ge(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:g.error,error:e}}return n===g.error?{type:g.error,error:new ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:g.data,data:e,statusCode:t.status,headers:t.headers}}var r,o,i,a,s,l,u,c;return n===g.error?We(t)?t.data instanceof Error?{type:g.error,error:t.data,statusCode:null==(i=t.init)?void 0:i.status,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:new ee((null==(r=t.init)?void 0:r.status)||500,void 0,t.data),statusCode:te(t)?t.status:void 0,headers:null!=(o=t.init)&&o.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:t,statusCode:te(t)?t.status:void 0}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:g.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:We(t)?{type:g.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:g.data,data:t}}function Te(e,t,n,r,o,i){let a=e.headers.get("Location");if(u(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!de.test(a)){let s=r.slice(0,r.findIndex((e=>e.route.id===n))+1);a=me(new URL(t.url),s,o,!0,a,i),e.headers.set("Location",a)}return e}function Pe(e,t,n){if(de.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=null!=L(o.pathname,n);if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function Ie(e,t,n,r){let o=e.createURL(ze(t)).toString(),i={signal:n};if(r&&qe(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Re(r.formData):i.body=r.formData}return new Request(o,i)}function Re(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function De(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Oe(e,t,n,r,o){let i,a={},s=null,l=!1,c={},d=n&&He(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let h=n.route.id,p=t[h];if(u(!$e(p),"Cannot handle redirect results in processLoaderData"),He(p)){let t=p.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[h]=t;else{let n=Le(e,h);null==s[n.route.id]&&(s[n.route.id]=t)}a[h]=void 0,l||(l=!0,i=te(p.error)?p.error.status:500),p.headers&&(c[h]=p.headers)}else Ve(p)?(r.set(h,p.deferredData),a[h]=p.deferredData.data,null==p.statusCode||200===p.statusCode||l||(i=p.statusCode),p.headers&&(c[h]=p.headers)):(a[h]=p.data,p.statusCode&&200!==p.statusCode&&!l&&(i=p.statusCode),p.headers&&(c[h]=p.headers))})),void 0!==d&&n&&(s={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function Ae(e,t,n,o,i,a,s){let{loaderData:l,errors:c}=Oe(t,n,o,s,!1);return i.forEach((t=>{let{key:n,match:o,controller:i}=t,s=a[n];if(u(s,"Did not find corresponding fetcher result"),!i||!i.signal.aborted)if(He(s)){let t=Le(e.matches,null==o?void 0:o.route.id);c&&c[t.route.id]||(c=r({},c,{[t.route.id]:s.error})),e.fetchers.delete(n)}else if($e(s))u(!1,"Unhandled fetcher revalidation redirect");else if(Ve(s))u(!1,"Unhandled fetcher deferred data");else{let t=rt(s.data);e.fetchers.set(n,t)}})),{loaderData:l,errors:c}}function Ee(e,t,n,o){let i=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(i[n]=t[n]):void 0!==e[n]&&r.route.loader&&(i[n]=e[n]),o&&o.hasOwnProperty(n))break}return i}function Ze(e){return e?He(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Le(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Fe(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function je(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===i?l="defer() is not supported in actions":"invalid-body"===i&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new ee(e||500,s,new Error(l),!0)}function Ne(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if($e(r))return{key:n,result:r}}}function ze(e){return p(r({},"string"==typeof e?f(e):e,{hash:""}))}function Be(e){return Ge(e.result)&&ae.has(e.result.status)}function Ve(e){return e.type===g.deferred}function He(e){return e.type===g.error}function $e(e){return(e&&e.type)===g.redirect}function We(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ue(e){return ie.has(e.toLowerCase())}function qe(e){return re.has(e.toLowerCase())}async function Ke(e,t,n,r,o){let i=Object.entries(t);for(let a=0;a(null==e?void 0:e.route.id)===s));if(!u)continue;let c=r.find((e=>e.route.id===u.route.id)),d=null!=c&&!xe(c,u)&&void 0!==(o&&o[u.route.id]);Ve(l)&&d&&await Xe(l,n,!1).then((e=>{e&&(t[s]=e)}))}}async function Ye(e,t,n){for(let r=0;r(null==e?void 0:e.route.id)===i))&&(Ve(s)&&(u(a,"Expected an AbortController for revalidating fetcher deferred result"),await Xe(s,a.signal,!0).then((e=>{e&&(t[o]=e)}))))}}async function Xe(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(e){return{type:g.error,error:e}}return{type:g.data,data:e.deferredData.data}}}function Qe(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Je(e,t){let n="string"==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&Qe(n||""))return e[e.length-1];let r=N(e);return r[r.length-1]}function et(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function tt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function rt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},93714:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++rc))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f-1&&e%1==0&&e-1}},66920:function(e,t,n){var r=n(1886);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},52448:function(e,t,n){var r=n(11494),o=n(47445),i=n(57141);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},37148:function(e,t,n){var r=n(88513);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},45244:function(e,t,n){var r=n(88513);e.exports=function(e){return r(this,e).get(e)}},26096:function(e,t,n){var r=n(88513);e.exports=function(e){return r(this,e).has(e)}},76443:function(e,t,n){var r=n(88513);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},36811:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},5836:function(e,t,n){var r=n(2231)(Object,"create");e.exports=r},37606:function(e,t,n){var r=n(2212)(Object.keys,Object);e.exports=r},25278:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},42246:function(e,t,n){e=n.nmd(e);var r=n(21244),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},87868:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2212:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},77065:function(e,t,n){var r=n(71927),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},93096:function(e,t,n){var r=n(47445);e.exports=function(){this.__data__=new r,this.size=0}},53792:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},89430:function(e){e.exports=function(e){return this.__data__.get(e)}},34130:function(e){e.exports=function(e){return this.__data__.has(e)}},70479:function(e,t,n){var r=n(47445),o=n(57141),i=n(98992);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},96217:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},64649:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},44346:function(e){e.exports=function(e){return function(){return e}}},76250:function(e,t,n){var r=n(84518),o=n(42850),i=n(86510),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=c}function x(){var e=o();if(b(e))return w(e);h=setTimeout(x,function(e){var n=t-(e-p);return g?s(n,c-(e-f)):n}(e))}function w(e){return h=void 0,v&&l?y(e):(l=u=void 0,d)}function S(){var e=o(),n=b(e);if(l=arguments,u=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(x,t),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(x,t),y(p)}return void 0===h&&(h=setTimeout(x,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?d:w(o())},S}},84859:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},81577:function(e){e.exports=function(e){return e}},29286:function(e,t,n){var r=n(14801),o=n(8676),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},73748:function(e){var t=Array.isArray;e.exports=t},48341:function(e,t,n){var r=n(90077),o=n(99798);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},91197:function(e,t,n){var r=n(48341),o=n(8676);e.exports=function(e){return o(e)&&r(e)}},57716:function(e,t,n){e=n.nmd(e);var r=n(79700),o=n(97414),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},53196:function(e,t,n){var r=n(88789);e.exports=function(e,t){return r(e,t)}},90077:function(e,t,n){var r=n(36656),o=n(84518);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},99798:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},84518:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8676:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},85871:function(e,t,n){var r=n(36656),o=n(70724),i=n(8676),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},26172:function(e,t,n){var r=n(36656),o=n(8676);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},20669:function(e,t,n){var r=n(78976),o=n(25384),i=n(42246),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},4968:function(e,t,n){var r=n(76433),o=n(15506),i=n(48341);e.exports=function(e){return i(e)?r(e):o(e)}},63498:function(e,t,n){var r=n(76433),o=n(85765),i=n(48341);e.exports=function(e){return i(e)?r(e,!0):o(e)}},64501:function(e,t,n){var r=n(71103),o=n(8422)((function(e,t,n){r(e,t,n)}));e.exports=o},42850:function(e,t,n){var r=n(79700);e.exports=function(){return r.Date.now()}},52177:function(e){e.exports=function(){return[]}},97414:function(e){e.exports=function(){return!1}},86510:function(e,t,n){var r=n(66841),o=n(84518),i=n(26172),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},3849:function(e,t,n){var r=n(87160),o=n(63498);e.exports=function(e){return r(e,o(e))}},8746:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z","AccountCircle")},17896:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,3H21V7H3V3M4,8H20V21H4V8M9.5,11A0.5,0.5 0 0,0 9,11.5V13H15V11.5A0.5,0.5 0 0,0 14.5,11H9.5Z","Archive")},28048:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M2.65 3C2.3 3 2 3.3 2 3.65C2 3.69 2 3.73 2 3.77L4.73 20.27C4.8 20.69 5.16 21 5.58 21H18.63C18.94 21 19.22 20.78 19.27 20.46L22 3.77C22.05 3.42 21.81 3.09 21.46 3.04C21.43 3.03 21.39 3.03 21.35 3.03L2.65 3M14.1 14.95H9.94L8.81 9.07H15.11L14.1 14.95Z","Bitbucket")},45793:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18C11.11,18 10.26,17.8 9.5,17.45C11.56,16.5 13,14.42 13,12C13,9.58 11.56,7.5 9.5,6.55C10.26,6.2 11.11,6 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z","Brightness4")},88718:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z","Brightness5")},37411:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},46292:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},56124:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},69999:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Circle")},81223:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},77338:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z","Cog")},75022:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M14.19,14.19L6,18L9.81,9.81L18,6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,10.9A1.1,1.1 0 0,0 10.9,12A1.1,1.1 0 0,0 12,13.1A1.1,1.1 0 0,0 13.1,12A1.1,1.1 0 0,0 12,10.9Z","Compass")},75175:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z","ContentCopy")},76918:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M4,9V12C4,14.21 7.58,16 12,16C16.42,16 20,14.21 20,12V9C20,11.21 16.42,13 12,13C7.58,13 4,11.21 4,9M4,14V17C4,19.21 7.58,21 12,21C16.42,21 20,19.21 20,17V14C20,16.21 16.42,18 12,18C7.58,18 4,16.21 4,14Z","Database")},50913:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},21319:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},17596:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},47903:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},18978:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},87792:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z","FormatListBulleted")},43656:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z","Github")},94710:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69","Gitlab")},43234:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3","History")},84936:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z","Home")},90965:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Information")},56418:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},79886:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z","Logout")},23887:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},18159:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z","Menu")},22311:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,10L12,15L17,10H7Z","MenuDown")},42140:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H5V11H19V13Z","Minus")},64547:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z","Pencil")},64255:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},82609:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},36025:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},76368:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.08 16L12 14.15L8.93 16L9.74 12.5L7.03 10.16L10.61 9.85L12 6.55L13.39 9.84L16.97 10.15L14.26 12.5L15.08 16Z","ShieldStar")},94485:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(62629))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z","ViewDashboard")},62629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(35150),o=n(77928);t.default=function(e,t){return(0,r.createSvgIcon)((0,o.jsx)("path",{d:e}),t)}},62594:function(e,t,n){"use strict";var r=n(37166);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},34662:function(e,t,n){e.exports=n(62594)()},37166:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},75666:function(e,t,n){"use strict";var r=n(32123),o=n(80335);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n