@minecraft-docker/mcctl-console 2.16.0 → 2.17.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.
Files changed (106) hide show
  1. package/.next/standalone/package.json +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +35 -34
  4. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
  6. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +3 -3
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +3 -3
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +2 -2
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +2 -2
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +2 -2
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +2 -2
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +2 -2
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +25 -25
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5841.js +1 -0
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/pages-manifest.json +1 -1
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  58. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2019-01a1009a77c3dccd.js +1 -0
  59. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3724-3dc138f24633b931.js +1 -0
  60. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4848-443d44225e2a1136.js +1 -0
  61. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5560-5451f43d5921310c.js +1 -0
  62. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5892-314539460769272f.js +1 -0
  63. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6831-3fe5e1273ac38e5f.js +1 -0
  64. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7438-5931d51bb2efa484.js +1 -0
  65. package/.next/{static/chunks/app/(main)/audit-logs/page-abfe3bbfaa7eb99b.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-4b9a4dac74fde96c.js} +1 -1
  66. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-3a92cd25792a1162.js +1 -0
  67. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-26e37b29ee07fc8c.js → layout-25723393b563b0b5.js} +1 -1
  68. package/.next/{static/chunks/app/(main)/players/page-08dd972363e964d9.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-382ee2761391923b.js} +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-8d16a3b92a29027e.js +1 -0
  70. package/.next/standalone/platform/services/mcctl-console/package.json +1 -1
  71. package/.next/static/chunks/2019-01a1009a77c3dccd.js +1 -0
  72. package/.next/static/chunks/3724-3dc138f24633b931.js +1 -0
  73. package/.next/static/chunks/4848-443d44225e2a1136.js +1 -0
  74. package/.next/static/chunks/5560-5451f43d5921310c.js +1 -0
  75. package/.next/static/chunks/5892-314539460769272f.js +1 -0
  76. package/.next/static/chunks/6831-3fe5e1273ac38e5f.js +1 -0
  77. package/.next/static/chunks/7438-5931d51bb2efa484.js +1 -0
  78. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-abfe3bbfaa7eb99b.js → static/chunks/app/(main)/audit-logs/page-4b9a4dac74fde96c.js} +1 -1
  79. package/.next/static/chunks/app/(main)/backups/page-3a92cd25792a1162.js +1 -0
  80. package/.next/static/chunks/app/(main)/{layout-26e37b29ee07fc8c.js → layout-25723393b563b0b5.js} +1 -1
  81. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-08dd972363e964d9.js → static/chunks/app/(main)/players/page-382ee2761391923b.js} +1 -1
  82. package/.next/static/chunks/app/(main)/servers/[name]/page-8d16a3b92a29027e.js +1 -0
  83. package/package.json +2 -2
  84. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1258.js +0 -1
  85. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1116-90e393e11322b96b.js +0 -1
  86. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2603-4e610b5895784491.js +0 -1
  87. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/310-1ce88ce372edcd70.js +0 -1
  88. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5618-bf7fd85c91f76e0d.js +0 -1
  89. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6368-737efbaafd70bcba.js +0 -1
  90. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6648-4f261adfced5c408.js +0 -1
  91. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7632-4cd7961537874121.js +0 -1
  92. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-50eec2b821445eee.js +0 -1
  93. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-32309b73a831aa9b.js +0 -1
  94. package/.next/static/chunks/1116-90e393e11322b96b.js +0 -1
  95. package/.next/static/chunks/2603-4e610b5895784491.js +0 -1
  96. package/.next/static/chunks/310-1ce88ce372edcd70.js +0 -1
  97. package/.next/static/chunks/5618-bf7fd85c91f76e0d.js +0 -1
  98. package/.next/static/chunks/6368-737efbaafd70bcba.js +0 -1
  99. package/.next/static/chunks/6648-4f261adfced5c408.js +0 -1
  100. package/.next/static/chunks/7632-4cd7961537874121.js +0 -1
  101. package/.next/static/chunks/app/(main)/backups/page-50eec2b821445eee.js +0 -1
  102. package/.next/static/chunks/app/(main)/servers/[name]/page-32309b73a831aa9b.js +0 -1
  103. /package/.next/standalone/platform/services/mcctl-console/.next/static/{EANeiraUW-eUpqLSPNGwp → _lCpnSIhv_UepMxo_WX7z}/_buildManifest.js +0 -0
  104. /package/.next/standalone/platform/services/mcctl-console/.next/static/{EANeiraUW-eUpqLSPNGwp → _lCpnSIhv_UepMxo_WX7z}/_ssgManifest.js +0 -0
  105. /package/.next/static/{EANeiraUW-eUpqLSPNGwp → _lCpnSIhv_UepMxo_WX7z}/_buildManifest.js +0 -0
  106. /package/.next/static/{EANeiraUW-eUpqLSPNGwp → _lCpnSIhv_UepMxo_WX7z}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,n,s){Promise.resolve().then(s.bind(s,41201))},41201:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return x}});var a=s(94655),t=s(35106),r=s(31317),c=s(7281),o=s(69899),i=s(70115),l=s(76492),d=s(91606),u=s(56831),p=s(92666),b=s(74228);function x(){var e;let{data:n}=(0,p.mj)(),s=null!==(e=null==n?void 0:n.configured)&&void 0!==e&&e,x=(0,b.useSearchParams)(),h=(0,b.useRouter)(),f=x.get("tab")||"world-backups",g=(0,t.useCallback)(e=>{let n=new URLSearchParams(x.toString());"world-backups"===e?n.delete("tab"):n.set("tab",e);let s=n.toString();h.push(s?"/backups?".concat(s):"/backups")},[x,h]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,l.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,l.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,l.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,a.jsx)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,a.jsx)(d.Z,{sx:{fontSize:32}})}),(0,a.jsxs)(c.Z,{children:[(0,a.jsx)(r.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,a.jsx)(r.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and config snapshots"})]})]}),"world-backups"===f&&(0,a.jsx)(u.JZ,{disabled:!s})]}),(0,a.jsx)(u.Fb,{value:f,onChange:g}),"world-backups"===f&&(0,a.jsxs)(i.Z,{spacing:3,children:[(0,a.jsx)(u.Xj,{}),(0,a.jsx)(u.Ff,{}),s&&(0,a.jsx)(u.zO,{})]}),"config-snapshots"===f&&(0,a.jsx)(u.gE,{})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,9986,5511,3938,2844,4920,4302,4848,3724,7438,2666,6831,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,4219,8347,7632,1400,5618,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,4219,8347,4848,1400,5560,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,r){Promise.resolve().then(r.bind(r,12192))},12192:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return G}});var s=r(94655),a=r(35106),l=r(7281),t=r(31317),i=r(84840),o=r(33402),c=r(60097),d=r(29793),x=r(75726),h=r(62328),p=r(7178),u=r(69899),j=r(76492),y=r(35847),m=r(628),Z=r(41565),b=r(90158),v=r(58347),g=r(73424),f=r(69783),k=r(86702),C=r(79983),P=r(30417),w=r(25333),S=r(99770),O=r(62508),E=r(5682),N=r(65087),B=r(76678),F=r(97436),A=r(93017),R=r(81071),W=r(66561),I=r(12795),L=r(96407),_=r(69366),T=r(11597),K=r(81960),q=r(30114);function z(e){let{onPlayerKicked:n}=e,[r,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),[d,x]=(0,a.useState)([]),[h,p]=(0,a.useState)(!1),[u,j]=(0,a.useState)(null),[y,z]=(0,a.useState)(""),[M,J]=(0,a.useState)(!1),Y=(0,a.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();x(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,a.useEffect)(()=>{Y()},[Y]);let $=(e,n)=>{j({player:e,server:n}),z(""),p(!0)},D=async()=>{if(u){J(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:u.player.name,server:u.server,reason:y||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");p(!1),j(null),null==n||n(u.player,u.server),await Y()}catch(e){console.error("Error kicking player:",e)}finally{J(!1)}}},G=d.some(e=>e.players.length>0);return(0,s.jsx)(m.Z,{"data-testid":"player-list",children:(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(t.Z,{variant:"h6",children:"Online Players"}),(0,s.jsx)(C.Z,{onClick:Y,disabled:r,"aria-label":"Refresh",children:(0,s.jsx)(_.Z,{})})]}),r&&(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(A.Z,{})}),o&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:o}),!r&&!o&&!G&&(0,s.jsx)(t.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!r&&!o&&G&&(0,s.jsx)(l.Z,{children:d.map(e=>(0,s.jsxs)(W.Z,{defaultExpanded:e.players.length>0,children:[(0,s.jsx)(I.Z,{expandIcon:(0,s.jsx)(K.Z,{}),children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,s.jsx)(t.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,s.jsx)(w.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,s.jsx)(L.Z,{children:0===e.players.length?(0,s.jsx)(t.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,s.jsx)(b.Z,{dense:!0,children:e.players.map(n=>(0,s.jsxs)(v.ZP,{secondaryAction:(0,s.jsx)(C.Z,{edge:"end","aria-label":"Kick player",onClick:()=>$(n,e.name),color:"error",children:(0,s.jsx)(T.Z,{})}),children:[(0,s.jsx)(f.Z,{children:(0,s.jsx)(k.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,s.jsx)(q.Z,{})})}),(0,s.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,s.jsxs)(S.Z,{open:h,onClose:()=>p(!1),children:[(0,s.jsx)(O.Z,{children:"Kick Player"}),(0,s.jsxs)(E.Z,{children:[(0,s.jsxs)(N.Z,{children:["Are you sure you want to kick ",null==u?void 0:u.player.name," from ",null==u?void 0:u.server,"?"]}),(0,s.jsx)(F.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:y,onChange:e=>z(e.target.value),placeholder:"Kicked by administrator"})]}),(0,s.jsxs)(B.Z,{children:[(0,s.jsx)(P.Z,{onClick:()=>p(!1),disabled:M,children:"Cancel"}),(0,s.jsx)(P.Z,{onClick:D,color:"error",variant:"contained",disabled:M,"aria-label":"Confirm kick",children:M?(0,s.jsx)(A.Z,{size:20}):"Confirm"})]})]})]})})}var M=r(61650),J=r(73729),Y=r(41189),$=r(92666);function D(e){let{children:n,value:r,index:a}=e;return(0,s.jsx)("div",{role:"tabpanel",hidden:r!==a,children:r===a&&(0,s.jsx)(l.Z,{sx:{py:3},children:n})})}function G(){let[e,n]=(0,a.useState)(0),[r,m]=(0,a.useState)(""),{data:Z,isLoading:b}=(0,$.x$)(),v=null==Z?void 0:Z.servers;return(0,a.useEffect)(()=>{!r&&v&&v.length>0&&m(v[0].name)},[v,r]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,j.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,j.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,j.Fq)(e.palette.info.main,.2))},children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,s.jsx)(y.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(t.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,s.jsx)(t.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,s.jsx)(l.Z,{sx:{mb:3},children:(0,s.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,s.jsx)(x.Z,{id:"server-select-label",children:"Server"}),(0,s.jsx)(h.Z,{labelId:"server-select-label",value:r,label:"Server",onChange:e=>m(e.target.value),disabled:b,children:null==v?void 0:v.map(e=>(0,s.jsx)(p.Z,{value:e.name,children:e.name},e.name))})]})}),(0,s.jsx)(l.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,s.jsxs)(o.Z,{value:e,onChange:(e,r)=>{n(r)},"aria-label":"Player management tabs",children:[(0,s.jsx)(c.Z,{label:"Online Players"}),(0,s.jsx)(c.Z,{label:"Whitelist",disabled:!r}),(0,s.jsx)(c.Z,{label:"Operators",disabled:!r}),(0,s.jsx)(c.Z,{label:"Ban List",disabled:!r})]})}),(0,s.jsx)(D,{value:e,index:0,children:(0,s.jsx)(z,{})}),(0,s.jsx)(D,{value:e,index:1,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(M.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,s.jsx)(D,{value:e,index:2,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(J.d,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,s.jsxs)(l.Z,{sx:{mt:2},children:[(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,s.jsx)(D,{value:e,index:3,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(Y.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,9986,2538,3938,4219,8347,4841,1658,4302,6798,2666,5498,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,n,r){Promise.resolve().then(r.bind(r,12192))},12192:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return G}});var s=r(94655),a=r(35106),l=r(7281),t=r(31317),i=r(84840),o=r(33402),c=r(60097),d=r(29793),x=r(75726),h=r(62328),p=r(7178),u=r(69899),j=r(76492),y=r(35847),m=r(628),Z=r(41565),b=r(90158),v=r(58347),g=r(73424),f=r(69783),k=r(86702),C=r(79983),P=r(30417),w=r(25333),S=r(99770),O=r(62508),E=r(5682),N=r(65087),B=r(76678),F=r(97436),A=r(93017),R=r(81071),W=r(66561),I=r(12795),L=r(96407),_=r(69366),T=r(11597),K=r(81960),q=r(30114);function z(e){let{onPlayerKicked:n}=e,[r,i]=(0,a.useState)(!0),[o,c]=(0,a.useState)(null),[d,x]=(0,a.useState)([]),[h,p]=(0,a.useState)(!1),[u,j]=(0,a.useState)(null),[y,z]=(0,a.useState)(""),[M,J]=(0,a.useState)(!1),Y=(0,a.useCallback)(async()=>{i(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let n=await e.json();x(n.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{i(!1)}},[]);(0,a.useEffect)(()=>{Y()},[Y]);let $=(e,n)=>{j({player:e,server:n}),z(""),p(!0)},D=async()=>{if(u){J(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:u.player.name,server:u.server,reason:y||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");p(!1),j(null),null==n||n(u.player,u.server),await Y()}catch(e){console.error("Error kicking player:",e)}finally{J(!1)}}},G=d.some(e=>e.players.length>0);return(0,s.jsx)(m.Z,{"data-testid":"player-list",children:(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(t.Z,{variant:"h6",children:"Online Players"}),(0,s.jsx)(C.Z,{onClick:Y,disabled:r,"aria-label":"Refresh",children:(0,s.jsx)(_.Z,{})})]}),r&&(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(A.Z,{})}),o&&(0,s.jsx)(R.Z,{severity:"error",sx:{mb:2},children:o}),!r&&!o&&!G&&(0,s.jsx)(t.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!r&&!o&&G&&(0,s.jsx)(l.Z,{children:d.map(e=>(0,s.jsxs)(W.Z,{defaultExpanded:e.players.length>0,children:[(0,s.jsx)(I.Z,{expandIcon:(0,s.jsx)(K.Z,{}),children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,s.jsx)(t.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,s.jsx)(w.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,s.jsx)(L.Z,{children:0===e.players.length?(0,s.jsx)(t.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,s.jsx)(b.Z,{dense:!0,children:e.players.map(n=>(0,s.jsxs)(v.ZP,{secondaryAction:(0,s.jsx)(C.Z,{edge:"end","aria-label":"Kick player",onClick:()=>$(n,e.name),color:"error",children:(0,s.jsx)(T.Z,{})}),children:[(0,s.jsx)(f.Z,{children:(0,s.jsx)(k.Z,{src:"https://mc-heads.net/avatar/".concat(n.uuid,"/40"),alt:n.name,children:(0,s.jsx)(q.Z,{})})}),(0,s.jsx)(g.Z,{primary:n.name,secondary:n.uuid.substring(0,8)+"..."})]},n.uuid))})})]},e.name))}),(0,s.jsxs)(S.Z,{open:h,onClose:()=>p(!1),children:[(0,s.jsx)(O.Z,{children:"Kick Player"}),(0,s.jsxs)(E.Z,{children:[(0,s.jsxs)(N.Z,{children:["Are you sure you want to kick ",null==u?void 0:u.player.name," from ",null==u?void 0:u.server,"?"]}),(0,s.jsx)(F.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:y,onChange:e=>z(e.target.value),placeholder:"Kicked by administrator"})]}),(0,s.jsxs)(B.Z,{children:[(0,s.jsx)(P.Z,{onClick:()=>p(!1),disabled:M,children:"Cancel"}),(0,s.jsx)(P.Z,{onClick:D,color:"error",variant:"contained",disabled:M,"aria-label":"Confirm kick",children:M?(0,s.jsx)(A.Z,{size:20}):"Confirm"})]})]})]})})}var M=r(61650),J=r(73729),Y=r(41189),$=r(92666);function D(e){let{children:n,value:r,index:a}=e;return(0,s.jsx)("div",{role:"tabpanel",hidden:r!==a,children:r===a&&(0,s.jsx)(l.Z,{sx:{py:3},children:n})})}function G(){let[e,n]=(0,a.useState)(0),[r,m]=(0,a.useState)(""),{data:Z,isLoading:b}=(0,$.x$)(),v=null==Z?void 0:Z.servers;return(0,a.useEffect)(()=>{!r&&v&&v.length>0&&m(v[0].name)},[v,r]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,j.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,j.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,j.Fq)(e.palette.info.main,.2))},children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,s.jsx)(y.Z,{sx:{fontSize:32}})}),(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(t.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,s.jsx)(t.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,s.jsx)(l.Z,{sx:{mb:3},children:(0,s.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,s.jsx)(x.Z,{id:"server-select-label",children:"Server"}),(0,s.jsx)(h.Z,{labelId:"server-select-label",value:r,label:"Server",onChange:e=>m(e.target.value),disabled:b,children:null==v?void 0:v.map(e=>(0,s.jsx)(p.Z,{value:e.name,children:e.name},e.name))})]})}),(0,s.jsx)(l.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,s.jsxs)(o.Z,{value:e,onChange:(e,r)=>{n(r)},"aria-label":"Player management tabs",children:[(0,s.jsx)(c.Z,{label:"Online Players"}),(0,s.jsx)(c.Z,{label:"Whitelist",disabled:!r}),(0,s.jsx)(c.Z,{label:"Operators",disabled:!r}),(0,s.jsx)(c.Z,{label:"Ban List",disabled:!r})]})}),(0,s.jsx)(D,{value:e,index:0,children:(0,s.jsx)(z,{})}),(0,s.jsx)(D,{value:e,index:1,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(M.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,s.jsx)(D,{value:e,index:2,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(J.d,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,s.jsxs)(l.Z,{sx:{mt:2},children:[(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,s.jsx)(t.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,s.jsx)(D,{value:e,index:3,children:r&&(0,s.jsxs)(i.ZP,{container:!0,spacing:3,children:[(0,s.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,s.jsx)(Y.Z,{serverName:r})}),(0,s.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,s.jsxs)(l.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,s.jsx)(t.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,s.jsx)(t.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,9986,2538,3938,4219,8347,4302,4841,1658,6798,2666,5498,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);