@minecraft-docker/mcctl-console 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +93 -105
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +54 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +54 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +3 -3
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +20 -20
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3633.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8091.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8847.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9023.js +51 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1099-fa64c7b90813b0a5.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-385dbd7376f5851d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5004-6ecca3df16643209.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5123-bc0af955f93964c7.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/674-096e0376c367d751.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7296-063cc1cf1200429d.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7436-dc5c09a9f287522b.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8738-25eee78e0dfd0adf.js +1 -0
- package/.next/{static/chunks/app/(main)/admin/users/page-db10014c56588381.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js} +1 -1
- package/.next/{static/chunks/app/(main)/audit-logs/page-b8468e574885e74f.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js} +1 -1
- package/.next/{static/chunks/app/(main)/backups/page-76da68ecfd3fd38f.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-e6d8aef242d7e516.js → layout-22d4db17be3f8c25.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/{page-4a3f72a092662e75.js → page-fef43a34b56c2fcf.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-29d4216d11c4d426.js → page-0fbdeec8fee218ef.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/{page-4e811ac018a2a049.js → page-1287129ad47a4440.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/{page-12a46542ea952feb.js → page-94ebb6f110d7cba4.js} +1 -1
- package/.next/{static/chunks/app/(main)/worlds/page-7f194148444c39f3.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-e78b9914366748cf.js} +1 -1
- package/.next/{static/chunks/app/login/page-ff4d395f77e036b5.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-55283ea041e00fc0.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/{page-861124fab907567f.js → page-d3f96f0e775636fd.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/css/2579b9365591037f.css +1 -0
- package/.next/static/chunks/1099-fa64c7b90813b0a5.js +1 -0
- package/.next/static/chunks/2701-385dbd7376f5851d.js +1 -0
- package/.next/static/chunks/5004-6ecca3df16643209.js +1 -0
- package/.next/static/chunks/5123-bc0af955f93964c7.js +1 -0
- package/.next/static/chunks/674-096e0376c367d751.js +1 -0
- package/.next/static/chunks/7296-063cc1cf1200429d.js +1 -0
- package/.next/static/chunks/7436-dc5c09a9f287522b.js +1 -0
- package/.next/static/chunks/8738-25eee78e0dfd0adf.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-db10014c56588381.js → static/chunks/app/(main)/admin/users/page-3cc240ec265dc135.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-b8468e574885e74f.js → static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-76da68ecfd3fd38f.js → static/chunks/app/(main)/backups/page-47c96f8f36c1c1a3.js} +1 -1
- package/.next/static/chunks/app/(main)/dashboard/page-fba60ccdbc06c136.js +1 -0
- package/.next/static/chunks/app/(main)/{layout-e6d8aef242d7e516.js → layout-22d4db17be3f8c25.js} +1 -1
- package/.next/static/chunks/app/(main)/players/{page-4a3f72a092662e75.js → page-fef43a34b56c2fcf.js} +1 -1
- package/.next/static/chunks/app/(main)/routing/{page-29d4216d11c4d426.js → page-0fbdeec8fee218ef.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/console/{page-4e811ac018a2a049.js → page-1287129ad47a4440.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-1becd4dc3adb9b97.js +1 -0
- package/.next/static/chunks/app/(main)/servers/page-bebe3d652d7cf3fb.js +1 -0
- package/.next/static/chunks/app/(main)/settings/{page-12a46542ea952feb.js → page-94ebb6f110d7cba4.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-7f194148444c39f3.js → static/chunks/app/(main)/worlds/page-e78b9914366748cf.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-ff4d395f77e036b5.js → static/chunks/app/login/page-55283ea041e00fc0.js} +1 -1
- package/.next/static/chunks/app/signup/{page-861124fab907567f.js → page-d3f96f0e775636fd.js} +1 -1
- package/.next/static/css/2579b9365591037f.css +1 -0
- package/package.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2743.js +0 -54
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6509.js +0 -51
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8055.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1668-c41281dc3163e1c2.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2535-54681cf49f7f39e8.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3945-7c1c5f7e488ff042.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6758-d0a2d1008691eff1.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/680-61e3cda59bad5959.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7082-a03865af2ed57a67.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7436-44378c85b24787cc.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8858-e009f69745d12205.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-37b9107156ee1587.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-4324a833564ed326.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/css/0c287cf361a10682.css +0 -1
- package/.next/static/chunks/1668-c41281dc3163e1c2.js +0 -1
- package/.next/static/chunks/2535-54681cf49f7f39e8.js +0 -1
- package/.next/static/chunks/3945-7c1c5f7e488ff042.js +0 -1
- package/.next/static/chunks/6758-d0a2d1008691eff1.js +0 -1
- package/.next/static/chunks/680-61e3cda59bad5959.js +0 -1
- package/.next/static/chunks/7082-a03865af2ed57a67.js +0 -1
- package/.next/static/chunks/7436-44378c85b24787cc.js +0 -1
- package/.next/static/chunks/8858-e009f69745d12205.js +0 -1
- package/.next/static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js +0 -1
- package/.next/static/chunks/app/(main)/servers/[name]/page-37b9107156ee1587.js +0 -1
- package/.next/static/chunks/app/(main)/servers/page-4324a833564ed326.js +0 -1
- package/.next/static/css/0c287cf361a10682.css +0 -1
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{Yn14R25oBpteEUUEyZNGO → 89Bssec70Vx75pcmzcDoG}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{Yn14R25oBpteEUUEyZNGO → 89Bssec70Vx75pcmzcDoG}/_ssgManifest.js +0 -0
- /package/.next/static/{Yn14R25oBpteEUUEyZNGO → 89Bssec70Vx75pcmzcDoG}/_buildManifest.js +0 -0
- /package/.next/static/{Yn14R25oBpteEUUEyZNGO → 89Bssec70Vx75pcmzcDoG}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7436],{41704:function(e,t,r){var n=r(32324),o=r(81500),i=r(35106),a=r(41499),l=r(65951),s=r(47684),d=r(34519),u=r(15651),c=r(28057),p=r(39448),m=r(94655);let f=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],h=e=>{let{classes:t,disableUnderline:r}=e,n=(0,l.Z)({root:["root",!r&&"underline"],input:["input"]},p._,t);return(0,o.Z)({},t,n)},v=(0,d.ZP)(s.Ej,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[...(0,s.Gx)(e,t),!r.disableUnderline&&t.underline]}})(e=>{var t;let{theme:r,ownerState:n}=e,i="light"===r.palette.mode,a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return(0,o.Z)({position:"relative",backgroundColor:r.vars?r.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(r.vars||r).shape.borderRadius,borderTopRightRadius:(r.vars||r).shape.borderRadius,transition:r.transitions.create("background-color",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),"&:hover":{backgroundColor:r.vars?r.vars.palette.FilledInput.hoverBg:i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r.vars?r.vars.palette.FilledInput.bg:a}},["&.".concat(p.Z.focused)]:{backgroundColor:r.vars?r.vars.palette.FilledInput.bg:a},["&.".concat(p.Z.disabled)]:{backgroundColor:r.vars?r.vars.palette.FilledInput.disabledBg:i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(t=(r.vars||r).palette[n.color||"primary"])?void 0:t.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:r.transitions.create("transform",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(p.Z.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(p.Z.error)]:{"&::before, &::after":{borderBottomColor:(r.vars||r).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r.vars?"rgba(".concat(r.vars.palette.common.onBackgroundChannel," / ").concat(r.vars.opacity.inputUnderline,")"):i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:r.transitions.create("border-bottom-color",{duration:r.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(p.Z.disabled,", .").concat(p.Z.error,"):before")]:{borderBottom:"1px solid ".concat((r.vars||r).palette.text.primary)},["&.".concat(p.Z.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,o.Z)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),b=(0,d.ZP)(s.rA,{name:"MuiFilledInput",slot:"Input",overridesResolver:s._o})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({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"}}},"small"===r.size&&{paddingTop:21,paddingBottom:4},r.hiddenLabel&&{paddingTop:16,paddingBottom:17},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0},r.hiddenLabel&&"small"===r.size&&{paddingTop:8,paddingBottom:9},r.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),Z=i.forwardRef(function(e,t){var r,i,l,d;let u=(0,c.i)({props:e,name:"MuiFilledInput"}),{components:p={},componentsProps:Z,fullWidth:g=!1,inputComponent:x="input",multiline:y=!1,slotProps:w,slots:S={},type:R="text"}=u,C=(0,n.Z)(u,f),P=(0,o.Z)({},u,{fullWidth:g,inputComponent:x,multiline:y,type:R}),k=h(u),M={root:{ownerState:P},input:{ownerState:P}},F=(null!=w?w:Z)?(0,a.Z)(M,null!=w?w:Z):M,I=null!=(r=null!=(i=S.root)?i:p.Root)?r:v,z=null!=(l=null!=(d=S.input)?d:p.Input)?l:b;return(0,m.jsx)(s.ZP,(0,o.Z)({slots:{root:I,input:z},componentsProps:F,fullWidth:g,inputComponent:x,multiline:y,ref:t,type:R},C,{classes:k}))});Z.muiName="Input",t.Z=Z},39448:function(e,t,r){r.d(t,{_:function(){return l}});var n=r(81500),o=r(11379),i=r(9049),a=r(79254);function l(e){return(0,i.ZP)("MuiFilledInput",e)}let s=(0,n.Z)({},a.Z,(0,o.Z)("MuiFilledInput",["root","underline","input"]));t.Z=s},29793:function(e,t,r){r.d(t,{Z:function(){return y}});var n=r(32324),o=r(81500),i=r(35106),a=r(70316),l=r(65951),s=r(28057),d=r(34519),u=r(23424),c=r(38762),p=r(9290),m=r(14406),f=r(11379),h=r(9049);function v(e){return(0,h.ZP)("MuiFormControl",e)}(0,f.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var b=r(94655);let Z=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],g=e=>{let{classes:t,margin:r,fullWidth:n}=e,o={root:["root","none"!==r&&"margin".concat((0,c.Z)(r)),n&&"fullWidth"]};return(0,l.Z)(o,v,t)},x=(0,d.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return(0,o.Z)({},t.root,t["margin".concat((0,c.Z)(r.margin))],r.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,o.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})});var y=i.forwardRef(function(e,t){let r;let l=(0,s.i)({props:e,name:"MuiFormControl"}),{children:d,className:c,color:f="primary",component:h="div",disabled:v=!1,error:y=!1,focused:w,fullWidth:S=!1,hiddenLabel:R=!1,margin:C="none",required:P=!1,size:k="medium",variant:M="outlined"}=l,F=(0,n.Z)(l,Z),I=(0,o.Z)({},l,{color:f,component:h,disabled:v,error:y,fullWidth:S,hiddenLabel:R,margin:C,required:P,size:k,variant:M}),z=g(I),[N,O]=i.useState(()=>{let e=!1;return d&&i.Children.forEach(d,t=>{if(!(0,p.Z)(t,["Input","Select"]))return;let r=(0,p.Z)(t,["Select"])?t.props.input:t;r&&(0,u.B7)(r.props)&&(e=!0)}),e}),[A,j]=i.useState(()=>{let e=!1;return d&&i.Children.forEach(d,t=>{(0,p.Z)(t,["Input","Select"])&&((0,u.vd)(t.props,!0)||(0,u.vd)(t.props.inputProps,!0))&&(e=!0)}),e}),[E,L]=i.useState(!1);v&&E&&L(!1);let B=void 0===w||v?E:w,T=i.useMemo(()=>({adornedStart:N,setAdornedStart:O,color:f,disabled:v,error:y,filled:A,focused:B,fullWidth:S,hiddenLabel:R,size:k,onBlur:()=>{L(!1)},onEmpty:()=>{j(!1)},onFilled:()=>{j(!0)},onFocus:()=>{L(!0)},registerEffect:r,required:P,variant:M}),[N,f,v,y,A,B,S,R,r,P,k,M]);return(0,b.jsx)(m.Z.Provider,{value:T,children:(0,b.jsx)(x,(0,o.Z)({as:h,ownerState:I,className:(0,a.Z)(z.root,c),ref:t},F,{children:d}))})})},14406:function(e,t,r){let n=r(35106).createContext(void 0);t.Z=n},95953:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){let{props:t,states:r,muiFormControl:n}=e;return r.reduce((e,r)=>(e[r]=t[r],n&&void 0===t[r]&&(e[r]=n[r]),e),{})}},85016:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(35106),o=r(14406);function i(){return n.useContext(o.Z)}},68038:function(e,t,r){var n=r(32324),o=r(81500),i=r(35106),a=r(70316),l=r(65951),s=r(95953),d=r(85016),u=r(38762),c=r(28057),p=r(34519),m=r(25945),f=r(94655);let h=["children","className","color","component","disabled","error","filled","focused","required"],v=e=>{let{classes:t,color:r,focused:n,disabled:o,error:i,filled:a,required:s}=e,d={root:["root","color".concat((0,u.Z)(r)),o&&"disabled",i&&"error",a&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return(0,l.Z)(d,m.M,t)},b=(0,p.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return(0,o.Z)({},t.root,"secondary"===r.color&&t.colorSecondary,r.filled&&t.filled)}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(m.Z.focused)]:{color:(t.vars||t).palette[r.color].main},["&.".concat(m.Z.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(m.Z.error)]:{color:(t.vars||t).palette.error.main}})}),Z=(0,p.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(m.Z.error)]:{color:(t.vars||t).palette.error.main}}}),g=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiFormLabel"}),{children:i,className:l,component:u="label"}=r,p=(0,n.Z)(r,h),m=(0,d.Z)(),g=(0,s.Z)({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),x=(0,o.Z)({},r,{color:g.color||"primary",component:u,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required}),y=v(x);return(0,f.jsxs)(b,(0,o.Z)({as:u,ownerState:x,className:(0,a.Z)(y.root,l),ref:t},p,{children:[i,g.required&&(0,f.jsxs)(Z,{ownerState:x,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]}))});t.Z=g},25945:function(e,t,r){r.d(t,{M:function(){return i}});var n=r(11379),o=r(9049);function i(e){return(0,o.ZP)("MuiFormLabel",e)}let a=(0,n.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);t.Z=a},63131:function(e,t,r){var n=r(81500);r(35106);var o=r(71965),i=r(76213),a=r(10739),l=r(94655);t.Z=function(e){return(0,l.jsx)(o.Z,(0,n.Z)({},e,{defaultTheme:i.Z,themeId:a.Z}))}},69011:function(e,t,r){var n=r(32324),o=r(81500),i=r(35106),a=r(65951),l=r(41499),s=r(47684),d=r(34519),u=r(15651),c=r(28057),p=r(5180),m=r(94655);let f=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],h=e=>{let{classes:t,disableUnderline:r}=e,n=(0,a.Z)({root:["root",!r&&"underline"],input:["input"]},p.l,t);return(0,o.Z)({},t,n)},v=(0,d.ZP)(s.Ej,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[...(0,s.Gx)(e,t),!r.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:r}=e,n="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,o.Z)({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[r.color].main),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"},["&.".concat(p.Z.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(p.Z.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(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(.".concat(p.Z.disabled,", .").concat(p.Z.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},["&.".concat(p.Z.disabled,":before")]:{borderBottomStyle:"dotted"}})}),b=(0,d.ZP)(s.rA,{name:"MuiInput",slot:"Input",overridesResolver:s._o})({}),Z=i.forwardRef(function(e,t){var r,i,a,d;let u=(0,c.i)({props:e,name:"MuiInput"}),{disableUnderline:p,components:Z={},componentsProps:g,fullWidth:x=!1,inputComponent:y="input",multiline:w=!1,slotProps:S,slots:R={},type:C="text"}=u,P=(0,n.Z)(u,f),k=h(u),M={root:{ownerState:{disableUnderline:p}}},F=(null!=S?S:g)?(0,l.Z)(null!=S?S:g,M):M,I=null!=(r=null!=(i=R.root)?i:Z.Root)?r:v,z=null!=(a=null!=(d=R.input)?d:Z.Input)?a:b;return(0,m.jsx)(s.ZP,(0,o.Z)({slots:{root:I,input:z},slotProps:F,fullWidth:x,inputComponent:y,multiline:w,ref:t,type:C},P,{classes:k}))});Z.muiName="Input",t.Z=Z},5180:function(e,t,r){r.d(t,{l:function(){return l}});var n=r(81500),o=r(11379),i=r(9049),a=r(79254);function l(e){return(0,i.ZP)("MuiInput",e)}let s=(0,n.Z)({},a.Z,(0,o.Z)("MuiInput",["root","underline","input"]));t.Z=s},47684:function(e,t,r){r.d(t,{rA:function(){return L},Ej:function(){return E},ZP:function(){return T},_o:function(){return A},Gx:function(){return O}});var n=r(32324),o=r(81500),i=r(22085),a=r(35106),l=r(70316),s=r(65951),d=r(23225),u=r(22429),c=r(27009),p=r(16987),m=r(93207),f=r(81217),h=r(94655);let v=["onChange","maxRows","minRows","style","value"];function b(e){return parseInt(e,10)||0}let Z={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function g(e){return function(e){for(let t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}let x=a.forwardRef(function(e,t){let{onChange:r,maxRows:i,minRows:l=1,style:s,value:d}=e,x=(0,n.Z)(e,v),{current:y}=a.useRef(null!=d),w=a.useRef(null),S=(0,u.Z)(t,w),R=a.useRef(null),C=a.useRef(null),P=a.useCallback(()=>{let t=w.current,r=C.current;if(!t||!r)return;let n=(0,c.Z)(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");let o=n.boxSizing,a=b(n.paddingBottom)+b(n.paddingTop),s=b(n.borderBottomWidth)+b(n.borderTopWidth),d=r.scrollHeight;r.value="x";let u=r.scrollHeight,p=d;return l&&(p=Math.max(Number(l)*u,p)),i&&(p=Math.min(Number(i)*u,p)),{outerHeightStyle:(p=Math.max(p,u))+("border-box"===o?a+s:0),overflowing:1>=Math.abs(p-d)}},[i,l,e.placeholder]),k=(0,p.Z)(()=>{let e=w.current,t=P();if(!e||!t||g(t))return!1;let r=t.outerHeightStyle;return null!=R.current&&R.current!==r}),M=a.useCallback(()=>{let e=w.current,t=P();if(!e||!t||g(t))return;let r=t.outerHeightStyle;R.current!==r&&(R.current=r,e.style.height="".concat(r,"px")),e.style.overflow=t.overflowing?"hidden":""},[P]),F=a.useRef(-1);return(0,m.Z)(()=>{let e;let t=(0,f.Z)(M),r=null==w?void 0:w.current;if(!r)return;let n=(0,c.Z)(r);return n.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(()=>{k()&&(e.unobserve(r),cancelAnimationFrame(F.current),M(),F.current=requestAnimationFrame(()=>{e.observe(r)}))})).observe(r),()=>{t.clear(),cancelAnimationFrame(F.current),n.removeEventListener("resize",t),e&&e.disconnect()}},[P,M,k]),(0,m.Z)(()=>{M()}),(0,h.jsxs)(a.Fragment,{children:[(0,h.jsx)("textarea",(0,o.Z)({value:d,onChange:e=>{y||M(),r&&r(e)},ref:S,rows:l,style:s},x)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:C,tabIndex:-1,style:(0,o.Z)({},Z,s,{paddingTop:0,paddingBottom:0})})]})});var y=r(95953),w=r(14406),S=r(85016),R=r(34519),C=r(28057),P=r(38762),k=r(38481),M=r(65425),F=r(63131),I=r(23424),z=r(79254);let N=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],O=(e,t)=>{let{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,"small"===r.size&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t["color".concat((0,P.Z)(r.color))],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},A=(e,t)=>{let{ownerState:r}=e;return[t.input,"small"===r.size&&t.inputSizeSmall,r.multiline&&t.inputMultiline,"search"===r.type&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},j=e=>{let{classes:t,color:r,disabled:n,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:d,hiddenLabel:u,multiline:c,readOnly:p,size:m,startAdornment:f,type:h}=e,v={root:["root","color".concat((0,P.Z)(r)),n&&"disabled",o&&"error",d&&"fullWidth",a&&"focused",l&&"formControl",m&&"medium"!==m&&"size".concat((0,P.Z)(m)),c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",n&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===m&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return(0,s.Z)(v,z.u,t)},E=(0,R.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:O})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({},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",["&.".concat(z.Z.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},r.multiline&&(0,o.Z)({padding:"4px 0 5px"},"small"===r.size&&{paddingTop:1}),r.fullWidth&&{width:"100%"})}),L=(0,R.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:A})(e=>{let{theme:t,ownerState:r}=e,n="light"===t.palette.mode,i=(0,o.Z)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),a={opacity:"0 !important"},l=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,o.Z)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(z.Z.formControl," &")]:{"&::-webkit-input-placeholder":a,"&::-moz-placeholder":a,"&:-ms-input-placeholder":a,"&::-ms-input-placeholder":a,"&:focus::-webkit-input-placeholder":l,"&:focus::-moz-placeholder":l,"&:focus:-ms-input-placeholder":l,"&:focus::-ms-input-placeholder":l},["&.".concat(z.Z.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===r.size&&{paddingTop:1},r.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===r.type&&{MozAppearance:"textfield"})}),B=(0,h.jsx)(F.Z,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}});var T=a.forwardRef(function(e,t){var r;let s=(0,C.i)({props:e,name:"MuiInputBase"}),{"aria-describedby":u,autoComplete:c,autoFocus:p,className:m,components:f={},componentsProps:v={},defaultValue:b,disabled:Z,disableInjectingGlobalStyles:g,endAdornment:R,fullWidth:P=!1,id:F,inputComponent:z="input",inputProps:O={},inputRef:A,maxRows:T,minRows:W,multiline:D=!1,name:H,onBlur:q,onChange:K,onClick:U,onFocus:V,onKeyDown:_,onKeyUp:X,placeholder:G,readOnly:$,renderSuffix:J,rows:Q,slotProps:Y={},slots:ee={},startAdornment:et,type:er="text",value:en}=s,eo=(0,n.Z)(s,N),ei=null!=O.value?O.value:en,{current:ea}=a.useRef(null!=ei),el=a.useRef(),es=a.useCallback(e=>{},[]),ed=(0,k.Z)(el,A,O.ref,es),[eu,ec]=a.useState(!1),ep=(0,S.Z)(),em=(0,y.Z)({props:s,muiFormControl:ep,states:["color","disabled","error","hiddenLabel","size","required","filled"]});em.focused=ep?ep.focused:eu,a.useEffect(()=>{!ep&&Z&&eu&&(ec(!1),q&&q())},[ep,Z,eu,q]);let ef=ep&&ep.onFilled,eh=ep&&ep.onEmpty,ev=a.useCallback(e=>{(0,I.vd)(e)?ef&&ef():eh&&eh()},[ef,eh]);(0,M.Z)(()=>{ea&&ev({value:ei})},[ei,ev,ea]),a.useEffect(()=>{ev(el.current)},[]);let eb=z,eZ=O;D&&"input"===eb&&(eZ=Q?(0,o.Z)({type:void 0,minRows:Q,maxRows:Q},eZ):(0,o.Z)({type:void 0,maxRows:T,minRows:W},eZ),eb=x),a.useEffect(()=>{ep&&ep.setAdornedStart(!!et)},[ep,et]);let eg=(0,o.Z)({},s,{color:em.color||"primary",disabled:em.disabled,endAdornment:R,error:em.error,focused:em.focused,formControl:ep,fullWidth:P,hiddenLabel:em.hiddenLabel,multiline:D,size:em.size,startAdornment:et,type:er}),ex=j(eg),ey=ee.root||f.Root||E,ew=Y.root||v.root||{},eS=ee.input||f.Input||L;return eZ=(0,o.Z)({},eZ,null!=(r=Y.input)?r:v.input),(0,h.jsxs)(a.Fragment,{children:[!g&&B,(0,h.jsxs)(ey,(0,o.Z)({},ew,!(0,d.Z)(ey)&&{ownerState:(0,o.Z)({},eg,ew.ownerState)},{ref:t,onClick:e=>{el.current&&e.currentTarget===e.target&&el.current.focus(),U&&U(e)}},eo,{className:(0,l.Z)(ex.root,ew.className,m,$&&"MuiInputBase-readOnly"),children:[et,(0,h.jsx)(w.Z.Provider,{value:null,children:(0,h.jsx)(eS,(0,o.Z)({ownerState:eg,"aria-invalid":em.error,"aria-describedby":u,autoComplete:c,autoFocus:p,defaultValue:b,disabled:em.disabled,id:F,onAnimationStart:e=>{ev("mui-auto-fill-cancel"===e.animationName?el.current:{value:"x"})},name:H,placeholder:G,readOnly:$,required:em.required,rows:Q,value:ei,onKeyDown:_,onKeyUp:X,type:er},eZ,!(0,d.Z)(eS)&&{as:eb,ownerState:(0,o.Z)({},eg,eZ.ownerState)},{ref:ed,className:(0,l.Z)(ex.input,eZ.className,$&&"MuiInputBase-readOnly"),onBlur:e=>{q&&q(e),O.onBlur&&O.onBlur(e),ep&&ep.onBlur?ep.onBlur(e):ec(!1)},onChange:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(!ea){let t=e.target||el.current;if(null==t)throw Error((0,i.Z)(1));ev({value:t.value})}O.onChange&&O.onChange(e,...r),K&&K(e,...r)},onFocus:e=>{if(em.disabled){e.stopPropagation();return}V&&V(e),O.onFocus&&O.onFocus(e),ep&&ep.onFocus?ep.onFocus(e):ec(!0)}}))}),R,J?J((0,o.Z)({},em,{startAdornment:et})):null]}))]})})},79254:function(e,t,r){r.d(t,{u:function(){return i}});var n=r(11379),o=r(9049);function i(e){return(0,o.ZP)("MuiInputBase",e)}let a=(0,n.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);t.Z=a},23424:function(e,t,r){function n(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&&(n(e.value)&&""!==e.value||t&&n(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}r.d(t,{B7:function(){return i},vd:function(){return o}})},75726:function(e,t,r){r.d(t,{Z:function(){return S}});var n=r(32324),o=r(81500),i=r(35106),a=r(65951),l=r(70316),s=r(95953),d=r(85016),u=r(68038),c=r(25945),p=r(28057),m=r(38762),f=r(34519),h=r(15651),v=r(11379),b=r(9049);function Z(e){return(0,b.ZP)("MuiInputLabel",e)}(0,v.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var g=r(94655);let x=["disableAnimation","margin","shrink","variant","className"],y=e=>{let{classes:t,formControl:r,size:n,shrink:i,disableAnimation:l,variant:s,required:d}=e,u={root:["root",r&&"formControl",!l&&"animated",i&&"shrink",n&&"normal"!==n&&"size".concat((0,m.Z)(n)),s],asterisk:[d&&"asterisk"]},c=(0,a.Z)(u,Z,t);return(0,o.Z)({},t,c)},w=(0,f.ZP)(u.Z,{shouldForwardProp:e=>(0,h.Z)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{["& .".concat(c.Z.asterisk)]:t.asterisk},t.root,r.formControl&&t.formControl,"small"===r.size&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},r.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===r.size&&{transform:"translate(0, 17px) scale(1)"},r.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!r.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===r.variant&&(0,o.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(12px, 13px) scale(1)"},r.shrink&&(0,o.Z)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===r.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===r.variant&&(0,o.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===r.size&&{transform:"translate(14px, 9px) scale(1)"},r.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))});var S=i.forwardRef(function(e,t){let r=(0,p.i)({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:a,className:u}=r,c=(0,n.Z)(r,x),m=(0,d.Z)(),f=a;void 0===f&&m&&(f=m.filled||m.focused||m.adornedStart);let h=(0,s.Z)({props:r,muiFormControl:m,states:["size","variant","required","focused"]}),v=(0,o.Z)({},r,{disableAnimation:i,formControl:m,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused}),b=y(v);return(0,g.jsx)(w,(0,o.Z)({"data-shrink":f,ownerState:v,ref:t,className:(0,l.Z)(b.root,u)},c,{classes:b}))})},88812:function(e,t,r){r.d(t,{Z:function(){return L}});var n=r(81500),o=r(32324),i=r(35106),a=r(70316),l=r(65951),s=r(16501),d=r(95582),u=r(34713),c=r(90158),p=r(83185).Z,m=r(38481),f=r(65425),h=r(94655);let v=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function b(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function Z(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function g(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function x(e,t,r,n,o,i){let a=!1,l=o(e,t,!!t&&r);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}let t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&g(l,i)&&!t)return l.focus(),!0;l=o(e,l,r)}return!1}let y=i.forwardRef(function(e,t){let{actions:r,autoFocus:a=!1,autoFocusItem:l=!1,children:s,className:d,disabledItemsFocusable:y=!1,disableListWrap:w=!1,onKeyDown:S,variant:R="selectedMenu"}=e,C=(0,o.Z)(e,v),P=i.useRef(null),k=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,f.Z)(()=>{a&&P.current.focus()},[a]),i.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:r}=t,n=!P.current.style.width;if(e.clientHeight<P.current.clientHeight&&n){let t="".concat(p((0,u.Z)(e)),"px");P.current.style["rtl"===r?"paddingLeft":"paddingRight"]=t,P.current.style.width="calc(100% + ".concat(t,")")}return P.current}}),[]);let M=(0,m.Z)(P,t),F=-1;i.Children.forEach(s,(e,t)=>{if(!i.isValidElement(e)){F===t&&(F+=1)>=s.length&&(F=-1);return}e.props.disabled||("selectedMenu"===R&&e.props.selected?F=t:-1!==F||(F=t)),F===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(F+=1)>=s.length&&(F=-1)});let I=i.Children.map(s,(e,t)=>{if(t===F){let t={};return l&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===R&&(t.tabIndex=0),i.cloneElement(e,t)}return e});return(0,h.jsx)(c.Z,(0,n.Z)({role:"menu",ref:M,className:d,onKeyDown:e=>{let t=P.current,r=e.key,n=(0,u.Z)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),x(t,n,w,y,b);else if("ArrowUp"===r)e.preventDefault(),x(t,n,w,y,Z);else if("Home"===r)e.preventDefault(),x(t,null,w,y,b);else if("End"===r)e.preventDefault(),x(t,null,w,y,Z);else if(1===r.length){let o=k.current,i=r.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);let l=n&&!o.repeating&&g(n,o);o.previousKeyMatched&&(l||x(t,n,!1,y,b,o))?e.preventDefault():o.previousKeyMatched=!1}S&&S(e)},tabIndex:a?0:-1},C,{children:I}))});var w=r(93300),S=r(34519),R=r(15651),C=r(28057),P=r(11379),k=r(9049);function M(e){return(0,k.ZP)("MuiMenu",e)}(0,P.Z)("MuiMenu",["root","paper","list"]);let F=["onEntering"],I=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],z={vertical:"top",horizontal:"right"},N={vertical:"top",horizontal:"left"},O=e=>{let{classes:t}=e;return(0,l.Z)({root:["root"],paper:["paper"],list:["list"]},M,t)},A=(0,S.ZP)(w.ZP,{shouldForwardProp:e=>(0,R.Z)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),j=(0,S.ZP)(w.XS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),E=(0,S.ZP)(y,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0});var L=i.forwardRef(function(e,t){var r,l;let u=(0,C.i)({props:e,name:"MuiMenu"}),{autoFocus:c=!0,children:p,className:m,disableAutoFocusItem:f=!1,MenuListProps:v={},onClose:b,open:Z,PaperProps:g={},PopoverClasses:x,transitionDuration:y="auto",TransitionProps:{onEntering:w}={},variant:S="selectedMenu",slots:R={},slotProps:P={}}=u,k=(0,o.Z)(u.TransitionProps,F),M=(0,o.Z)(u,I),L=(0,s.V)(),B=(0,n.Z)({},u,{autoFocus:c,disableAutoFocusItem:f,MenuListProps:v,onEntering:w,PaperProps:g,transitionDuration:y,TransitionProps:k,variant:S}),T=O(B),W=c&&!f&&Z,D=i.useRef(null),H=-1;i.Children.map(p,(e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===S&&e.props.selected?H=t:-1!==H||(H=t)))});let q=null!=(r=R.paper)?r:j,K=null!=(l=P.paper)?l:g,U=(0,d.Z)({elementType:R.root,externalSlotProps:P.root,ownerState:B,className:[T.root,m]}),V=(0,d.Z)({elementType:q,externalSlotProps:K,ownerState:B,className:T.paper});return(0,h.jsx)(A,(0,n.Z)({onClose:b,anchorOrigin:{vertical:"bottom",horizontal:L?"right":"left"},transformOrigin:L?z:N,slots:{paper:q,root:R.root},slotProps:{root:U,paper:V},open:Z,ref:t,transitionDuration:y,TransitionProps:(0,n.Z)({onEntering:(e,t)=>{D.current&&D.current.adjustStyleForScrollbar(e,{direction:L?"rtl":"ltr"}),w&&w(e,t)}},k),ownerState:B},M,{classes:x,children:(0,h.jsx)(E,(0,n.Z)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),b&&b(e,"tabKeyDown"))},actions:D,autoFocus:c&&(-1===H||f),autoFocusItem:W,variant:S},v,{className:(0,a.Z)(T.list,v.className),children:p}))}))})},80954:function(e,t,r){r.d(t,{Z:function(){return C}});var n,o=r(32324),i=r(81500),a=r(35106),l=r(65951),s=r(34519),d=r(15651),u=r(94655);let c=["children","classes","className","label","notched"],p=(0,s.ZP)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:d.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%"}),m=(0,s.ZP)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:d.Z})(e=>{let{ownerState:t,theme:r}=e;return(0,i.Z)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:r.transitions.create("width",{duration:150,easing:r.transitions.easing.easeOut})},t.withLabel&&(0,i.Z)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:r.transitions.create("max-width",{duration:50,easing:r.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:r.transitions.create("max-width",{duration:100,easing:r.transitions.easing.easeOut,delay:50})}))});var f=r(85016),h=r(95953),v=r(47228),b=r(47684),Z=r(28057);let g=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],x=e=>{let{classes:t}=e,r=(0,l.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},v.e,t);return(0,i.Z)({},t,r)},y=(0,s.ZP)(b.Ej,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:b.Gx})(e=>{let{theme:t,ownerState:r}=e,n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,i.Z)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(v.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(v.Z.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}},["&.".concat(v.Z.focused," .").concat(v.Z.notchedOutline)]:{borderColor:(t.vars||t).palette[r.color].main,borderWidth:2},["&.".concat(v.Z.error," .").concat(v.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(v.Z.disabled," .").concat(v.Z.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&(0,i.Z)({padding:"16.5px 14px"},"small"===r.size&&{padding:"8.5px 14px"}))}),w=(0,s.ZP)(function(e){let{className:t,label:r,notched:a}=e,l=(0,o.Z)(e,c),s=null!=r&&""!==r,d=(0,i.Z)({},e,{notched:a,withLabel:s});return(0,u.jsx)(p,(0,i.Z)({"aria-hidden":!0,className:t,ownerState:d},l,{children:(0,u.jsx)(m,{ownerState:d,children:s?(0,u.jsx)("span",{children:r}):n||(n=(0,u.jsx)("span",{className:"notranslate",children:""}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e,r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}}),S=(0,s.ZP)(b.rA,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:b._o})(e=>{let{theme:t,ownerState:r}=e;return(0,i.Z)({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"}}},"small"===r.size&&{padding:"8.5px 14px"},r.multiline&&{padding:0},r.startAdornment&&{paddingLeft:0},r.endAdornment&&{paddingRight:0})}),R=a.forwardRef(function(e,t){var r,n,l,s,d;let c=(0,Z.i)({props:e,name:"MuiOutlinedInput"}),{components:p={},fullWidth:m=!1,inputComponent:v="input",label:R,multiline:C=!1,notched:P,slots:k={},type:M="text"}=c,F=(0,o.Z)(c,g),I=x(c),z=(0,f.Z)(),N=(0,h.Z)({props:c,muiFormControl:z,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),O=(0,i.Z)({},c,{color:N.color||"primary",disabled:N.disabled,error:N.error,focused:N.focused,formControl:z,fullWidth:m,hiddenLabel:N.hiddenLabel,multiline:C,size:N.size,type:M}),A=null!=(r=null!=(n=k.root)?n:p.Root)?r:y,j=null!=(l=null!=(s=k.input)?s:p.Input)?l:S;return(0,u.jsx)(b.ZP,(0,i.Z)({slots:{root:A,input:j},renderSuffix:e=>(0,u.jsx)(w,{ownerState:O,className:I.notchedOutline,label:null!=R&&""!==R&&N.required?d||(d=(0,u.jsxs)(a.Fragment,{children:[R," ","*"]})):R,notched:void 0!==P?P:!!(e.startAdornment||e.filled||e.focused)}),fullWidth:m,inputComponent:v,multiline:C,ref:t,type:M},F,{classes:(0,i.Z)({},I,{notchedOutline:null})}))});R.muiName="Input";var C=R},47228:function(e,t,r){r.d(t,{e:function(){return l}});var n=r(81500),o=r(11379),i=r(9049),a=r(79254);function l(e){return(0,i.ZP)("MuiOutlinedInput",e)}let s=(0,n.Z)({},a.Z,(0,o.Z)("MuiOutlinedInput",["root","notchedOutline","input"]));t.Z=s},62328:function(e,t,r){r.d(t,{Z:function(){return eo}});var n,o=r(81500),i=r(32324),a=r(35106),l=r(70316),s=r(41499),d=r(11844),u=r(22085),c=r(65951),p=r(40552),m=r(34713),f=r(38762),h=r(88812),v=r(11379),b=r(9049);function Z(e){return(0,b.ZP)("MuiNativeSelect",e)}let g=(0,v.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var x=r(34519),y=r(15651),w=r(94655);let S=["className","disabled","error","IconComponent","inputRef","variant"],R=e=>{let{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,l={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat((0,f.Z)(r)),i&&"iconOpen",n&&"disabled"]};return(0,c.Z)(l,Z,t)},C=e=>{let{ownerState:t,theme:r}=e;return(0,o.Z)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,o.Z)({},r.vars?{backgroundColor:"rgba(".concat(r.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(g.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(r.vars||r).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(r.vars||r).shape.borderRadius,"&:focus":{borderRadius:(r.vars||r).shape.borderRadius},"&&&":{paddingRight:32}})},P=(0,x.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:y.Z,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{["&.".concat(g.multiple)]:t.multiple}]}})(C),k=e=>{let{ownerState:t,theme:r}=e;return(0,o.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(r.vars||r).palette.action.active,["&.".concat(g.disabled)]:{color:(r.vars||r).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},M=(0,x.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.icon,r.variant&&t["icon".concat((0,f.Z)(r.variant))],r.open&&t.iconOpen]}})(k),F=a.forwardRef(function(e,t){let{className:r,disabled:n,error:s,IconComponent:d,inputRef:u,variant:c="standard"}=e,p=(0,i.Z)(e,S),m=(0,o.Z)({},e,{disabled:n,variant:c,error:s}),f=R(m);return(0,w.jsxs)(a.Fragment,{children:[(0,w.jsx)(P,(0,o.Z)({ownerState:m,className:(0,l.Z)(f.select,r),disabled:n,ref:u||t},p)),e.multiple?null:(0,w.jsx)(M,{as:d,ownerState:m,className:f.icon})]})});var I=r(23424),z=r(61455),N=r(38481),O=r(18280);function A(e){return(0,b.ZP)("MuiSelect",e)}let j=(0,v.Z)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),E=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],L=(0,x.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{["&.".concat(j.select)]:t.select},{["&.".concat(j.select)]:t[r.variant]},{["&.".concat(j.error)]:t.error},{["&.".concat(j.multiple)]:t.multiple}]}})(C,{["&.".concat(j.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),B=(0,x.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.icon,r.variant&&t["icon".concat((0,f.Z)(r.variant))],r.open&&t.iconOpen]}})(k),T=(0,x.ZP)("input",{shouldForwardProp:e=>(0,z.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 W(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}let D=e=>{let{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,l={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat((0,f.Z)(r)),i&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return(0,c.Z)(l,A,t)},H=a.forwardRef(function(e,t){var r,s;let d,c,f;let{"aria-describedby":v,"aria-label":b,autoFocus:Z,autoWidth:g,children:x,className:y,defaultOpen:S,defaultValue:R,disabled:C,displayEmpty:P,error:k=!1,IconComponent:M,inputRef:F,labelId:z,MenuProps:A={},multiple:j,name:H,onBlur:q,onChange:K,onClose:U,onFocus:V,onOpen:_,open:X,readOnly:G,renderValue:$,SelectDisplayProps:J={},tabIndex:Q,value:Y,variant:ee="standard"}=e,et=(0,i.Z)(e,E),[er,en]=(0,O.Z)({controlled:Y,default:R,name:"Select"}),[eo,ei]=(0,O.Z)({controlled:X,default:S,name:"Select"}),ea=a.useRef(null),el=a.useRef(null),[es,ed]=a.useState(null),{current:eu}=a.useRef(null!=X),[ec,ep]=a.useState(),em=(0,N.Z)(t,F),ef=a.useCallback(e=>{el.current=e,e&&ed(e)},[]),eh=null==es?void 0:es.parentNode;a.useImperativeHandle(em,()=>({focus:()=>{el.current.focus()},node:ea.current,value:er}),[er]),a.useEffect(()=>{S&&eo&&es&&!eu&&(ep(g?null:eh.clientWidth),el.current.focus())},[es,g]),a.useEffect(()=>{Z&&el.current.focus()},[Z]),a.useEffect(()=>{if(!z)return;let e=(0,m.Z)(el.current).getElementById(z);if(e){let t=()=>{getSelection().isCollapsed&&el.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[z]);let ev=(e,t)=>{e?_&&_(t):U&&U(t),eu||(ep(g?null:eh.clientWidth),ei(e))},eb=a.Children.toArray(x),eZ=e=>t=>{let r;if(t.currentTarget.hasAttribute("tabindex")){if(j){r=Array.isArray(er)?er.slice():[];let t=er.indexOf(e.props.value);-1===t?r.push(e.props.value):r.splice(t,1)}else r=e.props.value;if(e.props.onClick&&e.props.onClick(t),er!==r&&(en(r),K)){let n=t.nativeEvent||t,o=new n.constructor(n.type,n);Object.defineProperty(o,"target",{writable:!0,value:{value:r,name:H}}),K(o,e)}j||ev(!1,t)}},eg=null!==es&&eo;delete et["aria-invalid"];let ex=[],ey=!1;((0,I.vd)({value:er})||P)&&($?d=$(er):ey=!0);let ew=eb.map(e=>{let t;if(!a.isValidElement(e))return null;if(j){if(!Array.isArray(er))throw Error((0,u.Z)(2));(t=er.some(t=>W(t,e.props.value)))&&ey&&ex.push(e.props.children)}else(t=W(er,e.props.value))&&ey&&(c=e.props.children);return a.cloneElement(e,{"aria-selected":t?"true":"false",onClick:eZ(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})});ey&&(d=j?0===ex.length?null:ex.reduce((e,t,r)=>(e.push(t),r<ex.length-1&&e.push(", "),e),[]):c);let eS=ec;!g&&eu&&es&&(eS=eh.clientWidth),f=void 0!==Q?Q:C?null:0;let eR=J.id||(H?"mui-component-select-".concat(H):void 0),eC=(0,o.Z)({},e,{variant:ee,value:er,open:eg,error:k}),eP=D(eC),ek=(0,o.Z)({},A.PaperProps,null==(r=A.slotProps)?void 0:r.paper),eM=(0,p.Z)();return(0,w.jsxs)(a.Fragment,{children:[(0,w.jsx)(L,(0,o.Z)({ref:ef,tabIndex:f,role:"combobox","aria-controls":eM,"aria-disabled":C?"true":void 0,"aria-expanded":eg?"true":"false","aria-haspopup":"listbox","aria-label":b,"aria-labelledby":[z,eR].filter(Boolean).join(" ")||void 0,"aria-describedby":v,onKeyDown:e=>{G||-1===[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)||(e.preventDefault(),ev(!0,e))},onMouseDown:C||G?null:e=>{0===e.button&&(e.preventDefault(),el.current.focus(),ev(!0,e))},onBlur:e=>{!eg&&q&&(Object.defineProperty(e,"target",{writable:!0,value:{value:er,name:H}}),q(e))},onFocus:V},J,{ownerState:eC,className:(0,l.Z)(J.className,eP.select,y),id:eR,children:null!=(s=d)&&("string"!=typeof s||s.trim())?d:n||(n=(0,w.jsx)("span",{className:"notranslate",children:""}))})),(0,w.jsx)(T,(0,o.Z)({"aria-invalid":k,value:Array.isArray(er)?er.join(","):er,name:H,ref:ea,"aria-hidden":!0,onChange:e=>{let t=eb.find(t=>t.props.value===e.target.value);void 0!==t&&(en(t.props.value),K&&K(e,t))},tabIndex:-1,disabled:C,className:eP.nativeInput,autoFocus:Z,ownerState:eC},et)),(0,w.jsx)(B,{as:M,className:eP.icon,ownerState:eC}),(0,w.jsx)(h.Z,(0,o.Z)({id:"menu-".concat(H||""),anchorEl:eh,open:eg,onClose:e=>{ev(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},A,{MenuListProps:(0,o.Z)({"aria-labelledby":z,role:"listbox","aria-multiselectable":j?"true":void 0,disableListWrap:!0,id:eM},A.MenuListProps),slotProps:(0,o.Z)({},A.slotProps,{paper:(0,o.Z)({},ek,{style:(0,o.Z)({minWidth:eS},null!=ek?ek.style:null)})}),children:ew}))]})});var q=r(95953),K=r(85016),U=r(12284),V=r(69011),_=r(41704),X=r(80954),G=r(28057);let $=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],J=["root"],Q=e=>{let{classes:t}=e;return t},Y={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,y.Z)(e)&&"variant"!==e,slot:"Root"},ee=(0,x.ZP)(V.Z,Y)(""),et=(0,x.ZP)(X.Z,Y)(""),er=(0,x.ZP)(_.Z,Y)(""),en=a.forwardRef(function(e,t){let r=(0,G.i)({name:"MuiSelect",props:e}),{autoWidth:n=!1,children:u,classes:c={},className:p,defaultOpen:m=!1,displayEmpty:f=!1,IconComponent:h=U.Z,id:v,input:b,inputProps:Z,label:g,labelId:x,MenuProps:y,multiple:S=!1,native:R=!1,onClose:C,onOpen:P,open:k,renderValue:M,SelectDisplayProps:I,variant:z="outlined"}=r,O=(0,i.Z)(r,$),A=R?F:H,j=(0,K.Z)(),E=(0,q.Z)({props:r,muiFormControl:j,states:["variant","error"]}),L=E.variant||z,B=(0,o.Z)({},r,{variant:L,classes:c}),T=Q(B),W=(0,i.Z)(T,J),D=b||({standard:(0,w.jsx)(ee,{ownerState:B}),outlined:(0,w.jsx)(et,{label:g,ownerState:B}),filled:(0,w.jsx)(er,{ownerState:B})})[L],V=(0,N.Z)(t,(0,d.Z)(D));return(0,w.jsx)(a.Fragment,{children:a.cloneElement(D,(0,o.Z)({inputComponent:A,inputProps:(0,o.Z)({children:u,error:E.error,IconComponent:h,variant:L,type:void 0,multiple:S},R?{id:v}:{autoWidth:n,defaultOpen:m,displayEmpty:f,labelId:x,MenuProps:y,onClose:C,onOpen:P,open:k,renderValue:M,SelectDisplayProps:(0,o.Z)({id:v},I)},Z,{classes:Z?(0,s.Z)(W,Z.classes):W},b?b.props.inputProps:{})},(S&&R||f)&&"outlined"===L?{notched:!0}:{},{ref:V,className:(0,l.Z)(D.props.className,p,T.root)},!b&&{variant:L},O))})});en.muiName="Select";var eo=en},97436:function(e,t,r){r.d(t,{Z:function(){return j}});var n,o=r(81500),i=r(32324),a=r(35106),l=r(70316),s=r(65951),d=r(40552),u=r(34519),c=r(28057),p=r(69011),m=r(41704),f=r(80954),h=r(75726),v=r(29793),b=r(95953),Z=r(85016),g=r(38762),x=r(11379),y=r(9049);function w(e){return(0,y.ZP)("MuiFormHelperText",e)}let S=(0,x.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var R=r(94655);let C=["children","className","component","disabled","error","filled","focused","margin","required","variant"],P=e=>{let{classes:t,contained:r,size:n,disabled:o,error:i,filled:a,focused:l,required:d}=e,u={root:["root",o&&"disabled",i&&"error",n&&"size".concat((0,g.Z)(n)),r&&"contained",l&&"focused",a&&"filled",d&&"required"]};return(0,s.Z)(u,w,t)},k=(0,u.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.size&&t["size".concat((0,g.Z)(r.size))],r.contained&&t.contained,r.filled&&t.filled]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(S.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(S.error)]:{color:(t.vars||t).palette.error.main}},"small"===r.size&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})}),M=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiFormHelperText"}),{children:a,className:s,component:d="p"}=r,u=(0,i.Z)(r,C),p=(0,Z.Z)(),m=(0,b.Z)({props:r,muiFormControl:p,states:["variant","size","disabled","error","filled","focused","required"]}),f=(0,o.Z)({},r,{component:d,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}),h=P(f);return(0,R.jsx)(k,(0,o.Z)({as:d,ownerState:f,className:(0,l.Z)(h.root,s),ref:t},u,{children:" "===a?n||(n=(0,R.jsx)("span",{className:"notranslate",children:""})):a}))});var F=r(62328);function I(e){return(0,y.ZP)("MuiTextField",e)}(0,x.Z)("MuiTextField",["root"]);let z=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],N={standard:p.Z,filled:m.Z,outlined:f.Z},O=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},I,t)},A=(0,u.ZP)(v.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({});var j=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:a=!1,children:s,className:u,color:p="primary",defaultValue:m,disabled:f=!1,error:v=!1,FormHelperTextProps:b,fullWidth:Z=!1,helperText:g,id:x,InputLabelProps:y,inputProps:w,InputProps:S,inputRef:C,label:P,maxRows:k,minRows:I,multiline:j=!1,name:E,onBlur:L,onChange:B,onFocus:T,placeholder:W,required:D=!1,rows:H,select:q=!1,SelectProps:K,type:U,value:V,variant:_="outlined"}=r,X=(0,i.Z)(r,z),G=(0,o.Z)({},r,{autoFocus:a,color:p,disabled:f,error:v,fullWidth:Z,multiline:j,required:D,select:q,variant:_}),$=O(G),J={};"outlined"===_&&(y&&void 0!==y.shrink&&(J.notched=y.shrink),J.label=P),q&&(K&&K.native||(J.id=void 0),J["aria-describedby"]=void 0);let Q=(0,d.Z)(x),Y=g&&Q?"".concat(Q,"-helper-text"):void 0,ee=P&&Q?"".concat(Q,"-label"):void 0,et=N[_],er=(0,R.jsx)(et,(0,o.Z)({"aria-describedby":Y,autoComplete:n,autoFocus:a,defaultValue:m,fullWidth:Z,multiline:j,name:E,rows:H,maxRows:k,minRows:I,type:U,value:V,id:Q,inputRef:C,onBlur:L,onChange:B,onFocus:T,placeholder:W,inputProps:w},J,S));return(0,R.jsxs)(A,(0,o.Z)({className:(0,l.Z)($.root,u),disabled:f,error:v,fullWidth:Z,ref:t,required:D,color:p,variant:_,ownerState:G},X,{children:[null!=P&&""!==P&&(0,R.jsx)(h.Z,(0,o.Z)({htmlFor:Q,id:ee},y,{children:P})),q?(0,R.jsx)(F.Z,(0,o.Z)({"aria-describedby":Y,id:Q,labelId:ee,value:V,input:er},K,{children:s})):er,g&&(0,R.jsx)(M,(0,o.Z)({id:Y},b,{children:g}))]}))})},12284:function(e,t,r){r(35106);var n=r(61626),o=r(94655);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},71965:function(e,t,r){r(35106);var n=r(14526),o=r(74377),i=r(32730),a=r(94655);function l(e){let t=(0,n.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}t.Z=function(e){let{styles:t,themeId:r,defaultTheme:n={}}=e,s=(0,i.Z)(n),d=r&&s[r]||s,u="function"==typeof t?t(d):t;return d.modularCssLayers&&(u=Array.isArray(u)?u.map(e=>"function"==typeof e?l(e(d)):l(e)):l(u)),(0,a.jsx)(o.Z,{styles:u})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8738],{24559:function(t,e,i){var s=i(8091);e.Z=void 0;var n=s(i(66758)),r=i(94655);e.Z=(0,n.default)((0,r.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},10449:function(t,e,i){var s=i(8091);e.Z=void 0;var n=s(i(66758)),r=i(94655);e.Z=(0,n.default)((0,r.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},5501:function(t,e,i){var s=i(8091);e.Z=void 0;var n=s(i(66758)),r=i(94655);e.Z=(0,n.default)((0,r.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},87716:function(t,e,i){i.d(e,{Z:function(){return E}});var s=i(32324),n=i(81500),r=i(35106),o=i(70316),a=i(92019),u=i(67485),h=i(65951),c=i(34519),l=i(28057),d=i(30035),p=i(56874),m=i(83855),f=i(38481),v=i(11379),y=i(9049);function g(t){return(0,y.ZP)("MuiCollapse",t)}(0,v.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=i(94655);let w=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],x=t=>{let{orientation:e,classes:i}=t;return(0,h.Z)({root:["root","".concat(e)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(e)],wrapperInner:["wrapperInner","".concat(e)]},g,i)},C=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:i}=t;return[e.root,e[i.orientation],"entered"===i.state&&e.entered,"exited"===i.state&&!i.in&&"0px"===i.collapsedSize&&e.hidden]}})(t=>{let{theme:e,ownerState:i}=t;return(0,n.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===i.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===i.state&&(0,n.Z)({height:"auto",overflow:"visible"},"horizontal"===i.orientation&&{width:"auto"}),"exited"===i.state&&!i.in&&"0px"===i.collapsedSize&&{visibility:"hidden"})}),M=(0,c.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(t=>{let{ownerState:e}=t;return(0,n.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),R=(0,c.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(t=>{let{ownerState:e}=t;return(0,n.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),Z=r.forwardRef(function(t,e){let i=(0,l.i)({props:t,name:"MuiCollapse"}),{addEndListener:h,children:c,className:v,collapsedSize:y="0px",component:g,easing:Z,in:E,onEnter:P,onEntered:S,onEntering:O,onExit:j,onExited:z,onExiting:D,orientation:k="vertical",style:I,timeout:N=d.x9.standard,TransitionComponent:A=a.ZP}=i,K=(0,s.Z)(i,w),F=(0,n.Z)({},i,{orientation:k,collapsedSize:y}),H=x(F),L=(0,m.Z)(),T=(0,u.Z)(),V=r.useRef(null),G=r.useRef(),U="number"==typeof y?"".concat(y,"px"):y,W="horizontal"===k,_=W?"width":"height",Y=r.useRef(null),q=(0,f.Z)(e,Y),B=t=>e=>{if(t){let i=Y.current;void 0===e?t(i):t(i,e)}},J=()=>V.current?V.current[W?"clientWidth":"clientHeight"]:0,Q=B((t,e)=>{V.current&&W&&(V.current.style.position="absolute"),t.style[_]=U,P&&P(t,e)}),X=B((t,e)=>{let i=J();V.current&&W&&(V.current.style.position="");let{duration:s,easing:n}=(0,p.C)({style:I,timeout:N,easing:Z},{mode:"enter"});if("auto"===N){let e=L.transitions.getAutoHeightDuration(i);t.style.transitionDuration="".concat(e,"ms"),G.current=e}else t.style.transitionDuration="string"==typeof s?s:"".concat(s,"ms");t.style[_]="".concat(i,"px"),t.style.transitionTimingFunction=n,O&&O(t,e)}),$=B((t,e)=>{t.style[_]="auto",S&&S(t,e)}),tt=B(t=>{t.style[_]="".concat(J(),"px"),j&&j(t)}),te=B(z),ti=B(t=>{let e=J(),{duration:i,easing:s}=(0,p.C)({style:I,timeout:N,easing:Z},{mode:"exit"});if("auto"===N){let i=L.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(i,"ms"),G.current=i}else t.style.transitionDuration="string"==typeof i?i:"".concat(i,"ms");t.style[_]=U,t.style.transitionTimingFunction=s,D&&D(t)});return(0,b.jsx)(A,(0,n.Z)({in:E,onEnter:Q,onEntered:$,onEntering:X,onExit:tt,onExited:te,onExiting:ti,addEndListener:t=>{"auto"===N&&T.start(G.current||0,t),h&&h(Y.current,t)},nodeRef:Y,timeout:"auto"===N?null:N},K,{children:(t,e)=>(0,b.jsx)(C,(0,n.Z)({as:g,className:(0,o.Z)(H.root,v,{entered:H.entered,exited:!E&&"0px"===U&&H.hidden}[t]),style:(0,n.Z)({[W?"minWidth":"minHeight"]:U},I),ref:q},e,{ownerState:(0,n.Z)({},F,{state:t}),children:(0,b.jsx)(M,{ownerState:(0,n.Z)({},F,{state:t}),className:H.wrapper,ref:V,children:(0,b.jsx)(R,{ownerState:(0,n.Z)({},F,{state:t}),className:H.wrapperInner,children:c})})}))}))});Z.muiSupportAuto=!0;var E=Z},98091:function(t,e,i){i.d(e,{R:function(){return a},m:function(){return o}});var s=i(11430),n=i(23620),r=i(97639),o=class extends n.F{#t;#e;#i;#s;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#i=t.mutationCache,this.#e=[],this.state=t.state||a(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#n({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#n({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let s="pending"===this.state.status,n=!this.#s.canStart();try{if(s)e();else{this.#n({type:"pending",variables:t,isPaused:n}),this.#i.config.onMutate&&await this.#i.config.onMutate(t,this,i);let e=await this.options.onMutate?.(t,i);e!==this.state.context&&this.#n({type:"pending",context:e,variables:t,isPaused:n})}let r=await this.#s.start();return await this.#i.config.onSuccess?.(r,t,this.state.context,this,i),await this.options.onSuccess?.(r,t,this.state.context,i),await this.#i.config.onSettled?.(r,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(r,null,t,this.state.context,i),this.#n({type:"success",data:r}),r}catch(e){try{await this.#i.config.onError?.(e,t,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,i)}catch(t){Promise.reject(t)}try{await this.#i.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,i)}catch(t){Promise.reject(t)}throw this.#n({type:"error",error:e}),e}finally{this.#i.runNext(this)}}#n(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),s.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#i.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},20367:function(t,e,i){i.d(e,{D:function(){return c}});var s=i(35106),n=i(98091),r=i(11430),o=i(12835),a=i(80375),u=class extends o.l{#t;#r=void 0;#o;#a;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,a.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#o,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(e.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#o?.state.status==="pending"&&this.#o.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#o?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#h(t)}getCurrentResult(){return this.#r}reset(){this.#o?.removeObserver(this),this.#o=void 0,this.#u(),this.#h()}mutate(t,e){return this.#a=e,this.#o?.removeObserver(this),this.#o=this.#t.getMutationCache().build(this.#t,this.options),this.#o.addObserver(this),this.#o.execute(t)}#u(){let t=this.#o?.state??(0,n.R)();this.#r={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#h(t){r.Vr.batch(()=>{if(this.#a&&this.hasListeners()){let e=this.#r.variables,i=this.#r.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,e,i,s)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(t.data,null,e,i,s)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,e,i,s)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(void 0,t.error,e,i,s)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#r)})})}},h=i(58919);function c(t,e){let i=(0,h.NL)(e),[n]=s.useState(()=>new u(i,t));s.useEffect(()=>{n.setOptions(t)},[n,t]);let o=s.useSyncExternalStore(s.useCallback(t=>n.subscribe(r.Vr.batchCalls(t)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),c=s.useCallback((t,e)=>{n.mutate(t,e).catch(a.ZT)},[n]);if(o.error&&(0,a.L3)(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),f=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:f=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:f,orientation:p,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});f.muiSkipListHighlight=!0,t.Z=f},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var f=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),Z=r(47001),f=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(Z.Z,{children:"Email"}),(0,i.jsx)(Z.Z,{children:"Name"}),(0,i.jsx)(Z.Z,{children:"Role"}),(0,i.jsx)(Z.Z,{children:"Status"}),(0,i.jsx)(Z.Z,{children:"Created At"})]})}),(0,i.jsx)(f.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(Z.Z,{children:e.email}),(0,i.jsx)(Z.Z,{children:e.name||"N/A"}),(0,i.jsx)(Z.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(Z.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(Z.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,6758,680,1071,540,4416,2542,880,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),f=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:f=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:f,orientation:p,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});f.muiSkipListHighlight=!0,t.Z=f},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var f=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),Z=r(47001),f=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(Z.Z,{children:"Email"}),(0,i.jsx)(Z.Z,{children:"Name"}),(0,i.jsx)(Z.Z,{children:"Role"}),(0,i.jsx)(Z.Z,{children:"Status"}),(0,i.jsx)(Z.Z,{children:"Created At"})]})}),(0,i.jsx)(f.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(Z.Z,{children:e.email}),(0,i.jsx)(Z.Z,{children:e.name||"N/A"}),(0,i.jsx)(Z.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(Z.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(Z.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,4416,2542,880,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,52791))},52791:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eS}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),R=r(30417),N=r(87716),A=r(79983),E=r(89923),I=r(10297),F=r(50880),L=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(F.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(R.Z,{size:"small",startIcon:(0,n.jsx)(L.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(R.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(N.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(21138),K=r(84811),_=r(47001),B=r(53281),V=r(11254),X=r(70366),J=r(6406),H=r(95511),G=r(81071),Q=r(89161),Y=r(60236),$=r(27171),ee=r(30114),et=r(46725);function er(e){var t,r;let{log:i,onClick:o}=e,[d,u]=(0,s.useState)("failure"===i.status),x=i.details&&Object.keys(i.details).length>0,p="failure"===i.status&&i.errorMessage,g=x||p,j=(t=i.targetType,r=i.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(X.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==o?void 0:o(i),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==o||o(i))},role:"button","aria-label":"".concat(i.action," by ").concat(i.actor," on ").concat(i.targetName),children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48},children:g&&(0,n.jsx)(A.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(!d)},"aria-label":d?"Collapse details":"Expand details",children:d?(0,n.jsx)(Y.Z,{}):(0,n.jsx)(Q.Z,{})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(H.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(i.timestamp),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(i.timestamp)})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(h.I,{action:i.action})}),(0,n.jsx)(_.Z,{children:i.actor.startsWith("cli:")?(0,n.jsx)(c.Z,{label:i.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(l.Z,{variant:"body2",children:i.actor.replace("api:","")})}),(0,n.jsx)(_.Z,{children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)($.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(ee.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(i.targetType),j?(0,n.jsx)(et.default,{href:j,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:i.targetName})}):(0,n.jsx)(l.Z,{variant:"body2",children:i.targetName})]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(m.c,{status:i.status})})]}),g&&(0,n.jsx)(X.Z,{children:(0,n.jsx)(_.Z,{sx:{py:0},colSpan:6,children:(0,n.jsx)(N.Z,{in:d,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(a.Z,{sx:{py:2,px:2},children:[p&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:i.errorMessage}),x&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(K.Z,{children:Object.entries(i.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function en(e){let{logs:t,total:r,isLoading:s,error:i,filters:a,onFiltersChange:c,onRowClick:d,onRetry:u}=e,x=Math.floor((a.offset||0)/(a.limit||50)),h=a.limit||50;return s?(0,n.jsx)(o.Z,{children:(0,n.jsx)(B.Z,{children:(0,n.jsxs)(q.Z,{children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:"Timestamp"}),(0,n.jsx)(_.Z,{children:"Action"}),(0,n.jsx)(_.Z,{children:"Actor"}),(0,n.jsx)(_.Z,{children:"Target"}),(0,n.jsx)(_.Z,{children:"Status"})]})}),(0,n.jsx)(K.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:80})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:60})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:100})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(G.Z,{severity:"error",action:u&&(0,n.jsx)(R.Z,{color:"inherit",size:"small",onClick:u,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(o.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(v.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(l.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(R.Z,{variant:"outlined",size:"small",onClick:()=>c({limit:a.limit,sort:a.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(B.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(q.Z,{size:"small",children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(_.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Actor"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(K.Z,{children:t.map(e=>(0,n.jsx)(er,{log:e,onClick:d},e.id))})]})}),(0,n.jsx)(J.Z,{component:"div",count:r,page:x,onPageChange:(e,t)=>{c({...a,offset:t*h})},rowsPerPage:h,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);c({...a,limit:t,offset:0})},rowsPerPageOptions:[25,50,100],"aria-label":"Audit log pagination"})]})}var es=r(62142),ei=r(69123),ea=r(33402),eo=r(60097),el=r(90158),ec=r(58347),ed=r(73424),eu=r(93017),ex=r(71185),eh=r(84509);function em(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(el.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)(ec.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ed.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ep(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,eh.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(es.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(ex.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",children:(0,n.jsx)(K.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(eu.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ea.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(eo.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(eo.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(em,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(em,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var eg=r(99770),ej=r(62508),ef=r(5682),ev=r(76678),eZ=r(15761);function ey(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(eg.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(ej.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(ef.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(G.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(R.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(R.Z,{variant:"contained",startIcon:u?(0,n.jsx)(eu.Z,{size:16,color:"inherit"}):(0,n.jsx)(eZ.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var eb=r(93757);function eS(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:R,refetch:N}=(0,eh.hT)(p),{data:A,isLoading:E}=(0,eh.DM)(),{isConnected:I}=(0,eb.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let F=(0,s.useCallback)(e=>{g(e),w(0)},[]),L=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),N()},[N]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:F,onExport:()=>b(!0)}),(0,n.jsx)(en,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:R,filters:p,onFiltersChange:F,onRowClick:L,onRetry:()=>N()}),(0,n.jsx)(ep,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(ey,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,5511,880,55,2844,8347,6909,4187,4240,8233,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,52791))},52791:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eS}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),R=r(30417),N=r(87716),A=r(79983),E=r(89923),I=r(10297),F=r(50880),L=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(F.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(R.Z,{size:"small",startIcon:(0,n.jsx)(L.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(R.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(N.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(21138),K=r(84811),_=r(47001),B=r(53281),V=r(11254),X=r(70366),J=r(6406),H=r(95511),G=r(81071),Q=r(89161),Y=r(60236),$=r(27171),ee=r(30114),et=r(46725);function er(e){var t,r;let{log:i,onClick:o}=e,[d,u]=(0,s.useState)("failure"===i.status),x=i.details&&Object.keys(i.details).length>0,p="failure"===i.status&&i.errorMessage,g=x||p,j=(t=i.targetType,r=i.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(X.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==o?void 0:o(i),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==o||o(i))},role:"button","aria-label":"".concat(i.action," by ").concat(i.actor," on ").concat(i.targetName),children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48},children:g&&(0,n.jsx)(A.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(!d)},"aria-label":d?"Collapse details":"Expand details",children:d?(0,n.jsx)(Y.Z,{}):(0,n.jsx)(Q.Z,{})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(H.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(i.timestamp),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(i.timestamp)})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(h.I,{action:i.action})}),(0,n.jsx)(_.Z,{children:i.actor.startsWith("cli:")?(0,n.jsx)(c.Z,{label:i.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(l.Z,{variant:"body2",children:i.actor.replace("api:","")})}),(0,n.jsx)(_.Z,{children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)($.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(ee.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(i.targetType),j?(0,n.jsx)(et.default,{href:j,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:i.targetName})}):(0,n.jsx)(l.Z,{variant:"body2",children:i.targetName})]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(m.c,{status:i.status})})]}),g&&(0,n.jsx)(X.Z,{children:(0,n.jsx)(_.Z,{sx:{py:0},colSpan:6,children:(0,n.jsx)(N.Z,{in:d,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(a.Z,{sx:{py:2,px:2},children:[p&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:i.errorMessage}),x&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(K.Z,{children:Object.entries(i.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function en(e){let{logs:t,total:r,isLoading:s,error:i,filters:a,onFiltersChange:c,onRowClick:d,onRetry:u}=e,x=Math.floor((a.offset||0)/(a.limit||50)),h=a.limit||50;return s?(0,n.jsx)(o.Z,{children:(0,n.jsx)(B.Z,{children:(0,n.jsxs)(q.Z,{children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:"Timestamp"}),(0,n.jsx)(_.Z,{children:"Action"}),(0,n.jsx)(_.Z,{children:"Actor"}),(0,n.jsx)(_.Z,{children:"Target"}),(0,n.jsx)(_.Z,{children:"Status"})]})}),(0,n.jsx)(K.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:80})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:60})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:100})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(G.Z,{severity:"error",action:u&&(0,n.jsx)(R.Z,{color:"inherit",size:"small",onClick:u,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(o.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(v.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(l.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(R.Z,{variant:"outlined",size:"small",onClick:()=>c({limit:a.limit,sort:a.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(B.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(q.Z,{size:"small",children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(_.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Actor"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(K.Z,{children:t.map(e=>(0,n.jsx)(er,{log:e,onClick:d},e.id))})]})}),(0,n.jsx)(J.Z,{component:"div",count:r,page:x,onPageChange:(e,t)=>{c({...a,offset:t*h})},rowsPerPage:h,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);c({...a,limit:t,offset:0})},rowsPerPageOptions:[25,50,100],"aria-label":"Audit log pagination"})]})}var es=r(62142),ei=r(69123),ea=r(33402),eo=r(60097),el=r(90158),ec=r(58347),ed=r(73424),eu=r(93017),ex=r(71185),eh=r(84509);function em(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(el.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)(ec.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ed.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ep(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,eh.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(es.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(ex.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",children:(0,n.jsx)(K.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(eu.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ea.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(eo.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(eo.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(em,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(em,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var eg=r(99770),ej=r(62508),ef=r(5682),ev=r(76678),eZ=r(15761);function ey(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(eg.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(ej.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(ef.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(G.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(R.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(R.Z,{variant:"contained",startIcon:u?(0,n.jsx)(eu.Z,{size:16,color:"inherit"}):(0,n.jsx)(eZ.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var eb=r(93757);function eS(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:R,refetch:N}=(0,eh.hT)(p),{data:A,isLoading:E}=(0,eh.DM)(),{isConnected:I}=(0,eb.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let F=(0,s.useCallback)(e=>{g(e),w(0)},[]),L=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),N()},[N]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:F,onExport:()=>b(!0)}),(0,n.jsx)(en,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:R,filters:p,onFiltersChange:F,onRowClick:L,onRetry:()=>N()}),(0,n.jsx)(ep,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(ey,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,5511,55,2844,8347,6909,4187,4240,8233,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,s,n){Promise.resolve().then(n.bind(n,6643))},6643:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return N}});var t=n(94655),r=n(31317),i=n(7281),a=n(69899),o=n(70115),c=n(76492),l=n(91606),d=n(628),h=n(41565),x=n(25333),u=n(46207),j=n(43436),Z=n(92666);function m(){let{data:e,isLoading:s,error:n}=(0,Z.mj)();if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:a,lastBackup:o,repository:c}=e||{};return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,t.jsx)(r.Z,{variant:"h6",children:"Backup Status"}),(0,t.jsx)(x.Z,{icon:a?(0,t.jsx)(u.Z,{}):(0,t.jsx)(j.Z,{}),label:a?"Configured":"Not Configured",color:a?"success":"error",size:"small"})]}),a?(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),o&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,t.jsx)(r.Z,{variant:"body2",children:function(e){let s=new Date,n=new Date(e),t=Math.floor((s.getTime()-n.getTime())/6e4),r=Math.floor(t/60);return t<1?"just now":t<60?"".concat(t," minutes ago"):r<24?"".concat(r," hours ago"):"".concat(Math.floor(r/24)," days ago")}(o)})]}),!o&&(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var p=n(35106),g=n(21138),y=n(84811),b=n(47001),f=n(53281),v=n(11254),k=n(70366),C=n(79983),w=n(97731),B=n(30417),S=n(99770),F=n(76678),D=n(5682),I=n(65087),T=n(62508),R=n(81071),z=n(93017);function P(e){var s;let{open:n,commit:a,onClose:o}=e,{mutate:c,isPending:l}=(0,Z.s8)(),[d,h]=(0,p.useState)(""),[x,u]=(0,p.useState)(""),j=()=>{l||(h(""),u(""),o())};return(0,t.jsxs)(S.Z,{open:n,onClose:j,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Restore Backup"}),(0,t.jsxs)(D.Z,{children:[(0,t.jsx)(R.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),d&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:d}),x&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:x}),(0,t.jsx)(I.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:a.hash})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,t.jsx)(r.Z,{variant:"body2",children:(s=a.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(s)))})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.message})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.author})]})]})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:j,disabled:l,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{h(""),u(""),c(a.hash,{onSuccess:()=>{h("Backup restored successfully from ".concat(a.hash.substring(0,7))),setTimeout(()=>{o()},2e3)},onError:e=>{u("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:l,startIcon:l?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(w.Z,{}),children:l?"Restoring...":"Restore"})]})]})}function _(){let{data:e,isLoading:s,error:n}=(0,Z.$t)(20),[i,a]=(0,p.useState)(null),o=e=>{a(e)};if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,t.jsx)(r.Z,{color:"text.secondary",children:"No backup history available"}):(0,t.jsx)(f.Z,{children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(v.Z,{children:(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:"Commit"}),(0,t.jsx)(b.Z,{children:"Date"}),(0,t.jsx)(b.Z,{children:"Message"}),(0,t.jsx)(b.Z,{children:"Author"}),(0,t.jsx)(b.Z,{align:"right",children:"Actions"})]})}),(0,t.jsx)(y.Z,{children:c.map(e=>{var s;return(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:(0,t.jsx)(x.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:(s=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(s)))})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:e.message})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,t.jsx)(b.Z,{align:"right",children:(0,t.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>o(e),title:"Restore this backup",children:(0,t.jsx)(w.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,t.jsx)(P,{open:!!i,commit:i,onClose:()=>{a(null)}})]})}var H=n(97436),M=n(34675);function E(e){let{disabled:s}=e,[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(""),[o,c]=(0,p.useState)(""),[l,d]=(0,p.useState)(""),{mutate:h,isPending:x}=(0,Z.c5)(),u=()=>{x||(r(!1),a(""),c(""),d(""))};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{variant:"contained",startIcon:(0,t.jsx)(M.Z,{}),onClick:()=>{r(!0),c(""),d(""),a("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:s||x,children:"Push Backup"}),(0,t.jsxs)(S.Z,{open:n,onClose:u,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Push Backup"}),(0,t.jsxs)(D.Z,{children:[o&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:o}),l&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:l}),(0,t.jsx)(H.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>a(e.target.value),disabled:x,helperText:"Optional message describing this backup"})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:u,disabled:x,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{c(""),d(""),h({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{u()},2e3)},onError:e=>{d("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:x,startIcon:x?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(M.Z,{}),children:x?"Pushing...":"Push"})]})]})]})}function N(){var e;let{data:s}=(0,Z.mj)(),n=null!==(e=null==s?void 0:s.configured)&&void 0!==e&&e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,t.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,t.jsx)(l.Z,{sx:{fontSize:32}})}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,t.jsx)(r.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,t.jsx)(E,{disabled:!n})]}),(0,t.jsxs)(o.Z,{spacing:3,children:[(0,t.jsx)(m,{}),n&&(0,t.jsx)(_,{})]})]})}}},function(e){e.O(0,[6812,9760,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,s,n){Promise.resolve().then(n.bind(n,6643))},6643:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return N}});var t=n(94655),r=n(31317),i=n(7281),a=n(69899),o=n(70115),c=n(76492),l=n(91606),d=n(628),h=n(41565),x=n(25333),u=n(46207),j=n(43436),Z=n(92666);function m(){let{data:e,isLoading:s,error:n}=(0,Z.mj)();if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:a,lastBackup:o,repository:c}=e||{};return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,t.jsx)(r.Z,{variant:"h6",children:"Backup Status"}),(0,t.jsx)(x.Z,{icon:a?(0,t.jsx)(u.Z,{}):(0,t.jsx)(j.Z,{}),label:a?"Configured":"Not Configured",color:a?"success":"error",size:"small"})]}),a?(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),o&&(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,t.jsx)(r.Z,{variant:"body2",children:function(e){let s=new Date,n=new Date(e),t=Math.floor((s.getTime()-n.getTime())/6e4),r=Math.floor(t/60);return t<1?"just now":t<60?"".concat(t," minutes ago"):r<24?"".concat(r," hours ago"):"".concat(Math.floor(r/24)," days ago")}(o)})]}),!o&&(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var p=n(35106),g=n(21138),y=n(84811),b=n(47001),f=n(53281),v=n(11254),k=n(70366),C=n(79983),w=n(97731),B=n(30417),S=n(99770),F=n(76678),D=n(5682),I=n(65087),T=n(62508),R=n(81071),z=n(93017);function P(e){var s;let{open:n,commit:a,onClose:o}=e,{mutate:c,isPending:l}=(0,Z.s8)(),[d,h]=(0,p.useState)(""),[x,u]=(0,p.useState)(""),j=()=>{l||(h(""),u(""),o())};return(0,t.jsxs)(S.Z,{open:n,onClose:j,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Restore Backup"}),(0,t.jsxs)(D.Z,{children:[(0,t.jsx)(R.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),d&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:d}),x&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:x}),(0,t.jsx)(I.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,t.jsx)(r.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:a.hash})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,t.jsx)(r.Z,{variant:"body2",children:(s=a.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(s)))})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.message})]}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,t.jsx)(r.Z,{variant:"body2",children:a.author})]})]})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:j,disabled:l,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{h(""),u(""),c(a.hash,{onSuccess:()=>{h("Backup restored successfully from ".concat(a.hash.substring(0,7))),setTimeout(()=>{o()},2e3)},onError:e=>{u("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:l,startIcon:l?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(w.Z,{}),children:l?"Restoring...":"Restore"})]})]})}function _(){let{data:e,isLoading:s,error:n}=(0,Z.$t)(20),[i,a]=(0,p.useState)(null),o=e=>{a(e)};if(s)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"text.secondary",children:"Loading..."})]})});if(n)return(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,t.jsx)(r.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(h.Z,{children:[(0,t.jsx)(r.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,t.jsx)(r.Z,{color:"text.secondary",children:"No backup history available"}):(0,t.jsx)(f.Z,{children:(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(v.Z,{children:(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:"Commit"}),(0,t.jsx)(b.Z,{children:"Date"}),(0,t.jsx)(b.Z,{children:"Message"}),(0,t.jsx)(b.Z,{children:"Author"}),(0,t.jsx)(b.Z,{align:"right",children:"Actions"})]})}),(0,t.jsx)(y.Z,{children:c.map(e=>{var s;return(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(b.Z,{children:(0,t.jsx)(x.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:(s=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(s)))})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",children:e.message})}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(r.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,t.jsx)(b.Z,{align:"right",children:(0,t.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>o(e),title:"Restore this backup",children:(0,t.jsx)(w.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,t.jsx)(P,{open:!!i,commit:i,onClose:()=>{a(null)}})]})}var H=n(97436),M=n(34675);function E(e){let{disabled:s}=e,[n,r]=(0,p.useState)(!1),[i,a]=(0,p.useState)(""),[o,c]=(0,p.useState)(""),[l,d]=(0,p.useState)(""),{mutate:h,isPending:x}=(0,Z.c5)(),u=()=>{x||(r(!1),a(""),c(""),d(""))};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{variant:"contained",startIcon:(0,t.jsx)(M.Z,{}),onClick:()=>{r(!0),c(""),d(""),a("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:s||x,children:"Push Backup"}),(0,t.jsxs)(S.Z,{open:n,onClose:u,maxWidth:"sm",fullWidth:!0,children:[(0,t.jsx)(T.Z,{children:"Push Backup"}),(0,t.jsxs)(D.Z,{children:[o&&(0,t.jsx)(R.Z,{severity:"success",sx:{mb:2},children:o}),l&&(0,t.jsx)(R.Z,{severity:"error",sx:{mb:2},children:l}),(0,t.jsx)(H.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>a(e.target.value),disabled:x,helperText:"Optional message describing this backup"})]}),(0,t.jsxs)(F.Z,{children:[(0,t.jsx)(B.Z,{onClick:u,disabled:x,children:"Cancel"}),(0,t.jsx)(B.Z,{onClick:()=>{c(""),d(""),h({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{u()},2e3)},onError:e=>{d("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:x,startIcon:x?(0,t.jsx)(z.Z,{size:16}):(0,t.jsx)(M.Z,{}),children:x?"Pushing...":"Push"})]})]})]})}function N(){var e;let{data:s}=(0,Z.mj)(),n=null!==(e=null==s?void 0:s.configured)&&void 0!==e&&e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,t.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,t.jsx)(l.Z,{sx:{fontSize:32}})}),(0,t.jsxs)(i.Z,{children:[(0,t.jsx)(r.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,t.jsx)(r.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,t.jsx)(E,{disabled:!n})]}),(0,t.jsxs)(o.Z,{spacing:3,children:[(0,t.jsx)(m,{}),n&&(0,t.jsx)(_,{})]})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,880,2844,8854,2666,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2248],{12121:function(e,t,r){Promise.resolve().then(r.bind(r,64924))},64924:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return B}});var n=r(94655),s=r(69899),i=r(76492),a=r(7281),l=r(31317),o=r(84840),c=r(628),d=r(41565),x=r(10721),h=r(25065),u=r(91179),p=r(11767),m=r(53832),j=r(30164),g=r(92666),f=r(59104);function Z(e){let{title:t,value:r,icon:s,color:i="primary",description:o}=e,x={primary:"#1bd96a",success:"#22c55e",info:"#3b82f6",secondary:"#7c3aed"};return(0,n.jsx)(c.Z,{"data-testid":"stat-card",sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:x[i]}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:t}),s&&(0,n.jsx)(a.Z,{sx:{color:x[i],opacity:.8},children:s})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:o?1:0},children:r}),o&&(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:o})]})})}var v=r(98406),y=r(93017),b=r(25333),w=r(46725),S=r(8690),C=r(31358),z=r(97511);function I(e){let{servers:t,statusMap:r={},isLoading:s,maxItems:i,showViewAll:o=!1,onServerClick:x}=e,h=(0,C.x)(),u=i?t.slice(0,i):t,p=e=>{x?x(e):h.push("/servers/".concat(e))},m=e=>{switch(e){case"running":return"success";case"stopped":case"exited":return"error";case"created":return"warning";default:return"default"}},j=e=>{switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}};return s?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,n.jsx)(y.Z,{})})})]}):0===t.length?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers"}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"No servers found. Create your first server to get started."})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Servers",action:o&&t.length>(i||0)?(0,n.jsxs)(w.default,{href:"/servers",onClick:()=>(0,S.Av)(),style:{textDecoration:"none",color:"inherit",fontSize:"0.875rem"},children:["View All (",t.length,")"]}):null}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:u.map(e=>{let t=r[e.name],s=(null==t?void 0:t.status)||e.status,i=(null==t?void 0:t.health)||e.health;return(0,n.jsx)(a.Z,{role:"button",onClick:()=>p(e.name),sx:{p:2,borderRadius:1,border:"1px solid",borderColor:"divider",cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"primary.main",backgroundColor:"action.hover"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"subtitle1",fontWeight:600,children:e.name}),(0,n.jsx)(z.h,{hostname:e.hostname,fontSize:12})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[(0,n.jsx)(b.Z,{label:s,color:m(s),size:"small"}),"none"!==i&&(0,n.jsx)(b.Z,{label:i,color:j(i),size:"small",variant:"outlined"})]})]})},e.name)})})})]})}var k=r(35106),P=r(41261);function F(e){let{maxVersions:t=2,title:r="Recent Updates"}=e,[s,i]=(0,k.useState)([]),[o,h]=(0,k.useState)(!0),[u,p]=(0,k.useState)(null);return((0,k.useEffect)(()=>{(async function(){try{let e=await fetch("https://api.github.com/repos/smallmiro/minecraft-server-manager/contents/CHANGELOG.md",{headers:{Accept:"application/vnd.github.v3+json"}});if(!e.ok)throw Error("Failed to fetch changelog");let r=await e.json(),n=atob(r.content),s=function(e,t){let r=[],n=e.split("\n"),s=null,i="added";for(let e of n){let n=e.match(/^## \[([^\]]+)\] - (\d{4}-\d{2}-\d{2})/);if(n){if(s&&(r.push(s),r.length>=t))break;s={version:n[1],date:n[2],items:[]};continue}let a=e.match(/^### (Added|Fixed|Changed)/i);if(a){i=a[1].toLowerCase();continue}let l=e.match(/^- \*\*([^*]+)\*\*\s*[-–]?\s*(.*)$/);l&&s&&s.items.push({type:i,message:l[1].trim()})}return s&&r.length<t&&r.push(s),r}(n,t);i(s)}catch(e){p(e instanceof Error?e.message:"Unknown error")}finally{h(!1)}})()},[t]),o)?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"}),(0,n.jsxs)(a.Z,{sx:{mt:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%",height:28}),(0,n.jsx)(x.Z,{variant:"text",width:"75%"})]})]})]}):u?(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r}),(0,n.jsx)(d.Z,{children:(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Unable to load updates"})})]}):(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:r,action:(0,n.jsx)(P.Z,{href:"https://github.com/smallmiro/minecraft-server-manager/blob/develop/CHANGELOG.md",target:"_blank",rel:"noopener",sx:{fontSize:13,mr:1},children:"View all"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:s.map((e,t)=>{let r=e.items.filter(e=>"added"===e.type),i=e.items.filter(e=>"fixed"===e.type),o=e.items.filter(e=>"changed"===e.type);return(0,n.jsxs)(a.Z,{sx:{mb:t<s.length-1?2.5:0,pb:t<s.length-1?2:0,borderBottom:t<s.length-1?"1px solid":"none",borderColor:"divider"},children:[(0,n.jsxs)(l.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"primary.main",mb:1},children:["[",e.version,"] - ",e.date]}),r.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Added",size:"small",sx:{bgcolor:"success.main",color:"success.contrastText",fontSize:11,height:20,mb:.5}}),r.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),i.length>0&&(0,n.jsxs)(a.Z,{sx:{mb:1},children:[(0,n.jsx)(b.Z,{label:"Fixed",size:"small",sx:{bgcolor:"warning.main",color:"warning.contrastText",fontSize:11,height:20,mb:.5}}),i.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]}),o.length>0&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(b.Z,{label:"Changed",size:"small",sx:{bgcolor:"info.main",color:"info.contrastText",fontSize:11,height:20,mb:.5}}),o.map((e,t)=>(0,n.jsxs)(l.Z,{variant:"body2",sx:{color:"text.secondary",pl:1},children:["• ",e.message]},t))]})]},e.version)})})]})}var T=r(30417),W=r(90158),A=r(58347),N=r(73424),q=r(95511),D=r(26577),L=r(56813),R=r(26892),E=r(84509);function O(e){var t;let{maxItems:r=5}=e,{data:s,isLoading:i,error:o}=(0,E.oL)(r),h=null!==(t=null==s?void 0:s.logs)&&void 0!==t?t:[];return(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(v.Z,{title:"Recent Activity",action:(0,n.jsx)(T.Z,{component:w.default,href:"/audit-logs",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{textTransform:"none"},children:"View All"})}),(0,n.jsx)(d.Z,{sx:{pt:0},children:i?(0,n.jsx)(W.Z,{sx:{py:0},children:[...Array(r)].map((e,t)=>(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:80}),(0,n.jsx)(x.Z,{variant:"text",width:60})]}),secondary:(0,n.jsx)(x.Z,{variant:"text",width:50})})},t))}):o?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",children:"Failed to load recent activity"}):0===h.length?(0,n.jsx)(l.Z,{color:"text.secondary",align:"center",sx:{py:2},children:"No recent activity"}):(0,n.jsx)(W.Z,{sx:{py:0},children:h.map(e=>{var t;return(0,n.jsx)(A.ZP,{sx:{px:0,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(N.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[(0,n.jsx)(L.I,{action:e.action,size:"small"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontWeight:500},children:e.targetName}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["by ",e.actor.replace("api:","").replace("cli:","")]}),"failure"===e.status&&(0,n.jsx)(R.c,{status:e.status,size:"small"})]}),secondary:(0,n.jsx)(q.Z,{title:(t=e.timestamp,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(new Date(t))),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"caption",component:"span",color:"text.disabled",children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<1?"just now":n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})})})},e.id)})})})]})}var K=r(84974),M=r(37228);function U(){let{data:e,isLoading:t}=(0,M.UW)();if(t)return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(x.Z,{variant:"circular",width:20,height:20}),(0,n.jsx)(x.Z,{variant:"text",width:120})]}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24})]}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"text.secondary"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,color:"text.secondary",children:"External Access"})]}),(0,n.jsx)(b.Z,{label:"Not configured",size:"small",variant:"outlined"})]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"playit.gg is not configured"}),(0,n.jsx)(T.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})});let r=e.agentRunning&&"running"===e.containerStatus,s=e.servers.length,i=e.servers.filter(e=>e.playitDomain).length;return(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(K.Z,{sx:{fontSize:20,color:"primary.main"}}),(0,n.jsx)(l.Z,{variant:"body2",fontWeight:500,children:"External Access"})]}),(0,n.jsx)(b.Z,{label:r?"Running":"Stopped",size:"small",color:r?"success":"default",variant:"outlined"})]}),(0,n.jsxs)(l.Z,{variant:"h6",sx:{mb:.5},children:[i," / ",s," servers"]}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"With external domains"}),(0,n.jsx)(T.Z,{component:w.default,href:"/routing",size:"small",endIcon:(0,n.jsx)(D.Z,{}),sx:{fontSize:12},children:"Manage"})]})})}function B(){let{data:e,isLoading:t}=(0,g.x$)(),{data:r,isLoading:v}=(0,g.Sr)(),{statusMap:y}=(0,f.d)(),b=t||v,w=(null==e?void 0:e.total)||0,S=(null==e?void 0:e.servers.filter(e=>{let t=y[e.name];return"running"===((null==t?void 0:t.status)||e.status)}).length)||0,C=(null==r?void 0:r.total)||0;return b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"primary.main",color:"primary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsx)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[0,1,2,3].map(e=>(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(c.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:"grey.300"}},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"circular",width:32,height:32})]}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:48}),(0,n.jsx)(x.Z,{variant:"text",width:"70%"})]})})},e))}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:7,children:(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"30%",height:32,sx:{mb:2}}),[0,1,2,3,4].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"rounded",width:60,height:24,sx:{ml:"auto"}})]},e))]})})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32,sx:{mb:2}}),[0,1,2,3].map(e=>(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1.5,py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsx)(x.Z,{variant:"text",width:"80%"}),(0,n.jsx)(x.Z,{variant:"text",width:"50%"})]})]},e))]})}),(0,n.jsx)(c.Z,{children:(0,n.jsxs)(d.Z,{children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%",height:32,sx:{mb:2}}),[0,1].map(e=>(0,n.jsxs)(a.Z,{sx:{py:1,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(x.Z,{variant:"text",width:"60%"}),(0,n.jsx)(x.Z,{variant:"text",width:"90%"})]},e))]})})]})})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,i.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,i.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,i.Fq)(e.palette.secondary.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,n.jsx)(h.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Dashboard"}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Overview of your Minecraft server infrastructure"})]})]})}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,sx:{mb:4},children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Servers",value:w,icon:(0,n.jsx)(u.Z,{fontSize:"large"}),color:"primary",description:"All configured servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Online Servers",value:S,icon:(0,n.jsx)(p.Z,{fontSize:"large"}),color:"success",description:"Currently running"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Players",value:0,icon:(0,n.jsx)(m.Z,{fontSize:"large"}),color:"info",description:"Across all servers"})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(Z,{title:"Total Worlds",value:C,icon:(0,n.jsx)(j.Z,{fontSize:"large"}),color:"secondary",description:"Available worlds"})})]}),(0,n.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:7,children:(0,n.jsx)(I,{servers:(null==e?void 0:e.servers)||[],statusMap:y,isLoading:t,maxItems:5,showViewAll:!0})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,lg:5,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(U,{}),(0,n.jsx)(O,{maxItems:5}),(0,n.jsx)(F,{maxVersions:2})]})})]})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",l=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:l,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function l(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return o},VM:function(){return l},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function l(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function o(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},37228:function(e,t,r){"use strict";r.d(t,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=r(5632),s=r(58919),i=r(20367),a=r(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,s.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return l},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],l=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,540,4416,2538,5511,55,8347,5123,2666,2701,3669,2757,1744],function(){return e(e.s=12121)}),_N_E=e.O()}]);
|