@minecraft-docker/mcctl-console 2.5.0 → 2.6.1

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 (170) hide show
  1. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +79 -79
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
  5. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  6. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js.nft.json +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +2 -2
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +5 -5
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +4 -4
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js.nft.json +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +3 -3
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +2 -2
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +3 -3
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +1 -1
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +3 -3
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +3 -3
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +3 -3
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +3 -3
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +1 -1
  65. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  66. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +3 -3
  67. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +22 -22
  68. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2743.js +54 -0
  69. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
  70. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4609.js +1 -1
  71. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
  72. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/{5845.js → 6509.js} +5 -5
  73. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7573.js +1 -0
  74. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8055.js +1 -0
  75. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8243.js +1 -1
  76. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8849.js +1 -0
  77. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9874.js +1 -0
  78. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  79. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
  80. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
  81. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  82. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  83. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  84. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2535-54681cf49f7f39e8.js +1 -0
  85. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3333-7e2d13faa47ed67e.js +1 -0
  86. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3945-7c1c5f7e488ff042.js +1 -0
  87. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4187-07672ba5a9f76f7c.js +1 -0
  88. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4240-16f6e4c7e86ef2ce.js +1 -0
  89. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4436-bf86b627021ca7ab.js +1 -0
  90. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5381-d66dae5d5171cd57.js +1 -0
  91. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7082-a03865af2ed57a67.js +1 -0
  92. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-51dfb844f8b8584c.js +1 -0
  93. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8233-0fdf0ee81a8cadce.js +1 -0
  94. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8468-8346b1d9ff3f7efa.js +1 -0
  95. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8858-e009f69745d12205.js +1 -0
  96. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/{page-2763a56ce0490dd1.js → page-90479d797d04efdb.js} +1 -1
  97. package/.next/{static/chunks/app/(main)/dashboard/page-b2677b1041311201.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js} +1 -1
  98. package/.next/{static/chunks/app/(main)/layout-9ce7f2bf657eacfa.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-e6d8aef242d7e516.js} +1 -1
  99. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/{page-785e0ce7c07f8119.js → page-4a3f72a092662e75.js} +1 -1
  100. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/page-29d4216d11c4d426.js +1 -0
  101. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-2ec271596e09c5f1.js +1 -0
  102. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/{page-c5378a7bfc6472ca.js → page-4324a833564ed326.js} +1 -1
  103. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-12a46542ea952feb.js +1 -0
  104. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-7f194148444c39f3.js +1 -0
  105. package/.next/standalone/platform/services/mcctl-console/.next/static/css/4d6bfee1e91e393d.css +1 -0
  106. package/.next/static/chunks/2535-54681cf49f7f39e8.js +1 -0
  107. package/.next/static/chunks/3333-7e2d13faa47ed67e.js +1 -0
  108. package/.next/static/chunks/3945-7c1c5f7e488ff042.js +1 -0
  109. package/.next/static/chunks/4187-07672ba5a9f76f7c.js +1 -0
  110. package/.next/static/chunks/4240-16f6e4c7e86ef2ce.js +1 -0
  111. package/.next/static/chunks/4436-bf86b627021ca7ab.js +1 -0
  112. package/.next/static/chunks/5381-d66dae5d5171cd57.js +1 -0
  113. package/.next/static/chunks/7082-a03865af2ed57a67.js +1 -0
  114. package/.next/static/chunks/7965-51dfb844f8b8584c.js +1 -0
  115. package/.next/static/chunks/8233-0fdf0ee81a8cadce.js +1 -0
  116. package/.next/static/chunks/8468-8346b1d9ff3f7efa.js +1 -0
  117. package/.next/static/chunks/8858-e009f69745d12205.js +1 -0
  118. package/.next/static/chunks/app/(main)/audit-logs/{page-2763a56ce0490dd1.js → page-90479d797d04efdb.js} +1 -1
  119. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/page-b2677b1041311201.js → static/chunks/app/(main)/dashboard/page-aa8e2d7970450b2a.js} +1 -1
  120. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-9ce7f2bf657eacfa.js → static/chunks/app/(main)/layout-e6d8aef242d7e516.js} +1 -1
  121. package/.next/static/chunks/app/(main)/players/{page-785e0ce7c07f8119.js → page-4a3f72a092662e75.js} +1 -1
  122. package/.next/static/chunks/app/(main)/routing/page-29d4216d11c4d426.js +1 -0
  123. package/.next/static/chunks/app/(main)/servers/[name]/page-2ec271596e09c5f1.js +1 -0
  124. package/.next/static/chunks/app/(main)/servers/{page-c5378a7bfc6472ca.js → page-4324a833564ed326.js} +1 -1
  125. package/.next/static/chunks/app/(main)/settings/page-12a46542ea952feb.js +1 -0
  126. package/.next/static/chunks/app/(main)/worlds/page-7f194148444c39f3.js +1 -0
  127. package/.next/static/css/4d6bfee1e91e393d.css +1 -0
  128. package/package.json +2 -2
  129. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3810.js +0 -1
  130. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4207.js +0 -1
  131. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4282.js +0 -1
  132. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7402.js +0 -54
  133. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7445.js +0 -1
  134. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9350.js +0 -1
  135. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/190-9ecdd3c2ad7fadef.js +0 -1
  136. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2698-aeed063326ab23db.js +0 -1
  137. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4474-b7d88543d50f7f58.js +0 -1
  138. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4596-fa980f5e0b65f2b7.js +0 -1
  139. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4682-61f6b7ad99cfd0c9.js +0 -1
  140. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5381-4e3aac97e0617278.js +0 -1
  141. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5386-a568e84580b1d208.js +0 -1
  142. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-a31f12b5a5f1519b.js +0 -1
  143. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8918-bae025d477685e7d.js +0 -1
  144. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9727-8e82372636a2fca6.js +0 -1
  145. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9951-34eb9e4c6b6cdd23.js +0 -1
  146. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/page-8333f2419cbdd686.js +0 -1
  147. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-b5a8d2d603b92812.js +0 -1
  148. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-af345917f438de8d.js +0 -1
  149. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-01447db96eaf75eb.js +0 -1
  150. package/.next/standalone/platform/services/mcctl-console/.next/static/css/2a015360a6bc64f3.css +0 -1
  151. package/.next/static/chunks/190-9ecdd3c2ad7fadef.js +0 -1
  152. package/.next/static/chunks/2698-aeed063326ab23db.js +0 -1
  153. package/.next/static/chunks/4474-b7d88543d50f7f58.js +0 -1
  154. package/.next/static/chunks/4596-fa980f5e0b65f2b7.js +0 -1
  155. package/.next/static/chunks/4682-61f6b7ad99cfd0c9.js +0 -1
  156. package/.next/static/chunks/5381-4e3aac97e0617278.js +0 -1
  157. package/.next/static/chunks/5386-a568e84580b1d208.js +0 -1
  158. package/.next/static/chunks/7965-a31f12b5a5f1519b.js +0 -1
  159. package/.next/static/chunks/8918-bae025d477685e7d.js +0 -1
  160. package/.next/static/chunks/9727-8e82372636a2fca6.js +0 -1
  161. package/.next/static/chunks/9951-34eb9e4c6b6cdd23.js +0 -1
  162. package/.next/static/chunks/app/(main)/routing/page-8333f2419cbdd686.js +0 -1
  163. package/.next/static/chunks/app/(main)/servers/[name]/page-b5a8d2d603b92812.js +0 -1
  164. package/.next/static/chunks/app/(main)/settings/page-af345917f438de8d.js +0 -1
  165. package/.next/static/chunks/app/(main)/worlds/page-01447db96eaf75eb.js +0 -1
  166. package/.next/static/css/2a015360a6bc64f3.css +0 -1
  167. /package/.next/standalone/platform/services/mcctl-console/.next/static/{UT1hqjjvqYlP0_6fAgVvi → vFi0GyYVE0v9zPFVmRQHq}/_buildManifest.js +0 -0
  168. /package/.next/standalone/platform/services/mcctl-console/.next/static/{UT1hqjjvqYlP0_6fAgVvi → vFi0GyYVE0v9zPFVmRQHq}/_ssgManifest.js +0 -0
  169. /package/.next/static/{UT1hqjjvqYlP0_6fAgVvi → vFi0GyYVE0v9zPFVmRQHq}/_buildManifest.js +0 -0
  170. /package/.next/static/{UT1hqjjvqYlP0_6fAgVvi → vFi0GyYVE0v9zPFVmRQHq}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[278],{59616:function(e,t,r){Promise.resolve().then(r.bind(r,46812))},46812:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return to}});var s=r(94655),n=r(35106),i=r(74228),a=r(31358),l=r(7281),o=r(30417),d=r(79983),c=r(81071),x=r(93017),u=r(10721),h=r(628),p=r(41565),m=r(31317),v=r(35694),y=r(7178),g=r(17820),j=r(73424),b=r(99770),f=r(62508),Z=r(5682),w=r(76678),C=r(97436),S=r(84840),k=r(76492),R=r(10117),T=r(5501),I=r(37809),z=r(21111),F=r(17978),P=r(89573),W=r(96292),A=r(33104),M=r(25333),D=r(52082),O=r(69123),E=r(71185),q=r(30165),N=r(97293),B=r(11259),U=r(66615),L=r(89161),H=r(34071),K=r(4405);function G(e){let{value:t,unit:r,label:n,icon:i,progress:a,progressMax:o,color:d="#1bd96a"}=e;return(0,s.jsxs)(h.Z,{"data-testid":"resource-stat-card",sx:{p:2.5,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:2},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"baseline",gap:.75,flexWrap:"wrap",minWidth:0},children:[(0,s.jsx)(m.Z,{variant:"h4",component:"span",sx:{fontWeight:700,color:"text.primary",fontFamily:"'JetBrains Mono', 'Fira Code', monospace",letterSpacing:"-0.5px"},children:t}),(0,s.jsx)(m.Z,{variant:"body2",component:"span",sx:{color:"text.secondary",fontWeight:500},children:r})]}),(0,s.jsx)(l.Z,{sx:{color:"text.secondary",flexShrink:0},children:i})]}),(0,s.jsx)(m.Z,{variant:"body2",sx:{color:"text.secondary",fontWeight:500,mt:.5},children:n}),(0,s.jsx)(K.Z,{variant:"determinate",value:Math.min(a/o*100,100),sx:{mt:1,height:6,borderRadius:1.5,bgcolor:"#2a2d3a","& .MuiLinearProgress-bar":{borderRadius:1.5,background:"linear-gradient(90deg, ".concat(d," 0%, ").concat(d,"cc 100%)")}}})]})}var V=r(163),J=r(73660),Q=r(90158),_=r(58347),X=r(95511),$=r(46725),Y=r(26577),ee=r(56813),et=r(26892),er=r(84509);function es(e){var t;let{serverName:r}=e,{data:n,isLoading:i,error:a}=(0,er.HZ)(r,{limit:20});if(i)return(0,s.jsx)(l.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:2,py:1.5},children:[(0,s.jsx)(u.Z,{variant:"rounded",width:60,height:24}),(0,s.jsx)(u.Z,{variant:"text",width:"60%"}),(0,s.jsx)(u.Z,{variant:"text",width:50})]},t))});if(a)return(0,s.jsxs)(c.Z,{severity:"error",children:["Failed to load activity: ",a.message]});let d=null!==(t=null==n?void 0:n.logs)&&void 0!==t?t:[];if(0===d.length)return(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{py:4,textAlign:"center"},children:"No activity recorded for this server yet."});let x="/audit-logs?targetType=server&targetName=".concat(encodeURIComponent(r));return(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(Q.Z,{sx:{py:0},children:d.map(e=>{var t;return(0,s.jsx)(_.ZP,{sx:{px:0,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,s.jsx)(j.Z,{primary:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,s.jsx)(ee.I,{action:e.action,size:"small"}),(0,s.jsxs)(m.Z,{variant:"body2",color:"text.secondary",children:["by ",e.actor.replace("api:","").replace("cli:","")]}),(0,s.jsx)(et.c,{status:e.status,size:"small"})]}),secondary:(0,s.jsx)(X.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,s.jsx)(m.Z,{variant:"caption",component:"span",color:"text.disabled",children:function(e){let t=new Date,r=new Date(e),s=Math.floor((t.getTime()-r.getTime())/6e4),n=Math.floor(s/60);return s<1?"just now":s<60?"".concat(s,"m ago"):n<24?"".concat(n,"h ago"):"".concat(Math.floor(n/24),"d ago")}(e.timestamp)})})})},e.id)})}),(0,s.jsx)(l.Z,{sx:{mt:2,textAlign:"center"},children:(0,s.jsx)(o.Z,{component:$.default,href:x,size:"small",endIcon:(0,s.jsx)(Y.Z,{}),sx:{textTransform:"none"},children:"View Full History"})})]})}var en=r(37530),ei=r(84420),ea=r(46121),el=r(84775),eo=r(92666),ed=r(70115),ec=r(70603),ex=r(32366),eu=r(5942),eh=r(25523);function ep(e){let{serverName:t}=e,{data:r,isLoading:i}=(0,eo.Js)(t),a=(0,eo.Bx)(),[u,v]=(0,n.useState)([]),[y,g]=(0,n.useState)(!1),[j,b]=(0,n.useState)(!1),[f,Z]=(0,n.useState)(""),[w,S]=(0,n.useState)(""),[k,R]=(0,n.useState)(!1),[T,I]=(0,n.useState)({open:!1,message:"",severity:"success"});(0,n.useEffect)(()=>{(null==r?void 0:r.customHostnames)&&(v(r.customHostnames),g(!1),R(!1))},[r]);let F=e=>{let t=e.trim().toLowerCase();return t?t.length>253?"Domain exceeds 253 characters":/^[a-z0-9]([a-z0-9\-.]*[a-z0-9])?$/.test(t)?t.endsWith(".local")?"Cannot use .local system domain":t.endsWith(".nip.io")?"Cannot use .nip.io system domain":u.includes(t)?"Domain already exists":"":"Invalid domain format":"Domain cannot be empty"},P=()=>{let e=f.trim().toLowerCase(),t=F(e);if(t){S(t);return}v(t=>[...t,e]),Z(""),S(""),b(!1),g(!0)},W=e=>{v(t=>t.filter(t=>t!==e)),g(!0)},A=async()=>{try{await a.mutateAsync({serverName:t,customHostnames:u}),g(!1),R(!0),I({open:!0,message:"Hostnames saved. Container recreation required to apply changes.",severity:"warning"})}catch(e){I({open:!0,message:e instanceof Error?e.message:"Failed to save hostnames",severity:"error"})}},D=()=>{b(!1),Z(""),S("")};return i?(0,s.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,s.jsx)(p.Z,{children:(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(x.Z,{size:24})})})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,s.jsx)(eh.Z,{color:"primary"}),(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Hostnames / Domains"})]}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Manage hostnames used by mc-router to route connections to this server."}),(0,s.jsx)(O.Z,{sx:{mb:3}}),(null==r?void 0:r.systemHostnames)&&r.systemHostnames.length>0&&(0,s.jsxs)(l.Z,{sx:{mb:3},children:[(0,s.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:"System Hostnames (read-only)"}),(0,s.jsx)(ed.Z,{direction:"row",flexWrap:"wrap",gap:1,children:r.systemHostnames.map(e=>(0,s.jsx)(M.Z,{icon:(0,s.jsx)(ec.Z,{sx:{fontSize:16}}),label:e.hostname,title:e.description,variant:"outlined",color:"default",size:"small"},e.hostname))})]}),(0,s.jsxs)(l.Z,{sx:{mb:2},children:[(0,s.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1},children:"Custom Domains"}),0===u.length&&!j&&(0,s.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mb:1},children:"No custom domains configured."}),(0,s.jsx)(ed.Z,{spacing:1,children:u.map(e=>(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:.5,px:1.5,borderRadius:1,bgcolor:"action.hover"},children:[(0,s.jsx)(m.Z,{variant:"body2",fontFamily:"monospace",children:e}),(0,s.jsx)(d.Z,{size:"small",color:"error",onClick:()=>W(e),title:"Remove domain",children:(0,s.jsx)(z.Z,{fontSize:"small"})})]},e))}),j?(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"flex-start",gap:1,mt:1},children:[(0,s.jsx)(C.Z,{size:"small",placeholder:"e.g. play.example.com",value:f,onChange:e=>{Z(e.target.value),S("")},onKeyDown:e=>{"Enter"===e.key&&P(),"Escape"===e.key&&D()},error:!!w,helperText:w,autoFocus:!0,sx:{flex:1}}),(0,s.jsx)(o.Z,{size:"small",variant:"contained",onClick:P,children:"Add"}),(0,s.jsx)(d.Z,{size:"small",onClick:D,children:(0,s.jsx)(E.Z,{fontSize:"small"})})]}):(0,s.jsx)(o.Z,{size:"small",startIcon:(0,s.jsx)(ex.Z,{}),onClick:()=>b(!0),sx:{mt:1},children:"Add Domain"})]}),k&&(0,s.jsxs)(c.Z,{severity:"warning",sx:{mb:2},children:["Container recreation is required for hostname changes to take effect. Run ",(0,s.jsx)("code",{children:"docker compose up -d"})," or restart the server from the dashboard."]}),(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,s.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(eu.Z,{}),onClick:A,disabled:!y||a.isPending,children:a.isPending?"Saving...":"Save Hostnames"})})]})}),(0,s.jsx)(en.Z,{open:T.open,autoHideDuration:6e3,onClose:()=>I({...T,open:!1}),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:(0,s.jsx)(c.Z,{onClose:()=>I({...T,open:!1}),severity:T.severity,sx:{width:"100%"},children:T.message})})]})}var em=r(87716),ev=r(81960),ey=r(62328),eg=r(29793),ej=r(75726),eb=r(40064),ef=r(38393),eZ=r(28058),ew=r(42730);function eC(e){var t;let{field:r,value:i,onChange:a}=e,[o,c]=(0,n.useState)(!1),x=null!==(t=r.columns)&&void 0!==t?t:6;return(0,s.jsx)(S.ZP,{item:!0,xs:12,sm:x,children:(()=>{var e,t,n,x,u,h;switch(r.type){case"boolean":return(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(eb.Z,{control:(0,s.jsx)(ef.Z,{checked:null!=i&&i,onChange:e=>a(r.key,e.target.checked)}),label:r.label}),r.helperText&&(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{ml:4,display:"block"},children:r.helperText})]});case"select":return(0,s.jsxs)(eg.Z,{fullWidth:!0,size:"small",children:[(0,s.jsx)(ej.Z,{children:r.label}),(0,s.jsx)(ey.Z,{value:null!==(x=null!=i?i:null===(t=r.options)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.value)&&void 0!==x?x:"",label:r.label,onChange:e=>a(r.key,e.target.value),children:null===(n=r.options)||void 0===n?void 0:n.map(e=>(0,s.jsx)(y.Z,{value:e.value,children:e.label},e.value))})]});case"number":return(0,s.jsx)(C.Z,{fullWidth:!0,size:"small",type:"number",label:r.label,value:null!=i?i:"",onChange:e=>{let t=e.target.value;a(r.key,""===t?void 0:parseInt(t,10))},inputProps:{min:null===(u=r.validation)||void 0===u?void 0:u.min,max:null===(h=r.validation)||void 0===h?void 0:h.max},helperText:r.helperText,InputProps:r.unit?{endAdornment:(0,s.jsx)(D.Z,{position:"end",children:(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:r.unit})})}:void 0});case"password":return(0,s.jsx)(C.Z,{fullWidth:!0,size:"small",type:o?"text":"password",label:r.label,value:null!=i?i:"",onChange:e=>a(r.key,e.target.value),helperText:r.helperText,InputProps:{endAdornment:(0,s.jsx)(D.Z,{position:"end",children:(0,s.jsx)(d.Z,{size:"small",onClick:()=>c(!o),edge:"end",children:o?(0,s.jsx)(ew.Z,{fontSize:"small"}):(0,s.jsx)(eZ.Z,{fontSize:"small"})})})}});default:return(0,s.jsx)(C.Z,{fullWidth:!0,size:"small",label:r.label,value:null!=i?i:"",onChange:e=>a(r.key,e.target.value),helperText:r.helperText})}})()})}function eS(e){let{section:t,values:r,onChange:i}=e,[a,d]=(0,n.useState)(!1),c=t.icon,x=t.advancedFields.length;return(0,s.jsx)(h.Z,{sx:{mb:3,borderRadius:3},children:(0,s.jsxs)(p.Z,{sx:{p:3},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,mb:1},children:[(0,s.jsx)(c,{sx:{fontSize:22,color:"primary.main"}}),(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:t.title})]}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:t.description}),(0,s.jsx)(O.Z,{sx:{mb:3}}),(0,s.jsx)(S.ZP,{container:!0,spacing:2.5,children:t.essentialFields.map(e=>(0,s.jsx)(eC,{field:e,value:r[e.key],onChange:i},e.key))}),x>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.Z,{fullWidth:!0,variant:"text",onClick:()=>d(!a),endIcon:(0,s.jsx)(ev.Z,{sx:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"}}),sx:{mt:2.5,justifyContent:"flex-start",color:"text.secondary",textTransform:"none",py:1,"&:hover":{bgcolor:"action.hover"}},children:[a?"Hide":"Show"," Advanced Settings (",x,")"]}),(0,s.jsx)(em.Z,{in:a,timeout:300,children:(0,s.jsx)(l.Z,{sx:{pt:2,borderTop:"1px dashed",borderColor:"divider"},children:(0,s.jsx)(S.ZP,{container:!0,spacing:2.5,children:t.advancedFields.map(e=>(0,s.jsx)(eC,{field:e,value:r[e.key],onChange:i},e.key))})})})]})]})})}var ek=r(12550);function eR(e){let{hasChanges:t,changedCount:r,hasRestartChanges:n,restartFields:i=[],isSaving:a,onSave:d,onDiscard:c}=e;return(0,s.jsx)(ek.Z,{direction:"up",in:t,mountOnEnter:!0,unmountOnExit:!0,children:(0,s.jsxs)(l.Z,{sx:{position:"sticky",bottom:0,zIndex:1100,bgcolor:"background.paper",borderTop:2,borderColor:"primary.main",px:3,py:2,mx:-3,mb:-3,boxShadow:"0 -4px 20px rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[n&&(0,s.jsx)(el.Z,{sx:{color:"warning.main",fontSize:20}}),(0,s.jsxs)(m.Z,{variant:"body2",fontWeight:600,children:[r," unsaved change",1!==r?"s":""]}),n&&(0,s.jsxs)(m.Z,{variant:"caption",color:"warning.main",children:["(",i.length>0?i.join(", "):"some fields"," require restart)"]})]}),(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:1},children:[(0,s.jsx)(o.Z,{variant:"text",color:"inherit",onClick:c,disabled:a,children:"Discard"}),(0,s.jsx)(o.Z,{variant:"contained",startIcon:a?(0,s.jsx)(x.Z,{size:16,color:"inherit"}):(0,s.jsx)(eu.Z,{}),onClick:d,disabled:a,children:a?"Saving...":"Save Changes (".concat(r,")")})]})]})})}function eT(e){let{open:t,changedFields:r,onSaveOnly:n,onSaveAndRestart:i,onCancel:a}=e;return(0,s.jsxs)(b.Z,{open:t,onClose:a,maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(f.Z,{children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,s.jsx)(el.Z,{color:"warning"}),(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Restart Required"})]})}),(0,s.jsxs)(Z.Z,{children:[(0,s.jsx)(m.Z,{variant:"body1",gutterBottom:!0,children:"The following changes require a server restart to take effect:"}),(0,s.jsx)(Q.Z,{dense:!0,children:r.map(e=>(0,s.jsx)(_.ZP,{sx:{py:0},children:(0,s.jsx)(j.Z,{primary:e,primaryTypographyProps:{variant:"body2",fontFamily:"monospace"}})},e))})]}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(o.Z,{onClick:a,color:"inherit",children:"Cancel"}),(0,s.jsx)(o.Z,{onClick:n,variant:"outlined",children:"Save Only"}),(0,s.jsx)(o.Z,{onClick:i,variant:"contained",color:"warning",children:"Save & Restart"})]})]})}var eI=r(1217),ez=r(84974),eF=r(23482),eP=r(61244),eW=r(87739);let eA=[{id:"gameplay",icon:eI.Z,title:"Gameplay",description:"Core game rules and player experience settings.",essentialFields:[{key:"difficulty",label:"Difficulty",type:"select",options:[{value:"peaceful",label:"Peaceful"},{value:"easy",label:"Easy"},{value:"normal",label:"Normal"},{value:"hard",label:"Hard"}]},{key:"gameMode",label:"Game Mode",type:"select",options:[{value:"survival",label:"Survival"},{value:"creative",label:"Creative"},{value:"adventure",label:"Adventure"},{value:"spectator",label:"Spectator"}]},{key:"maxPlayers",label:"Max Players",type:"number",validation:{min:1,max:1e3}},{key:"pvp",label:"Enable PvP",type:"boolean",helperText:"Allow players to damage each other"}],advancedFields:[{key:"forceGamemode",label:"Force Game Mode",type:"boolean",helperText:"Force game mode when players join"},{key:"hardcore",label:"Hardcore",type:"boolean",helperText:"One life only - world deleted on death"},{key:"allowFlight",label:"Allow Flight",type:"boolean",helperText:"Allow flight in survival mode"},{key:"allowNether",label:"Allow Nether",type:"boolean",helperText:"Enable Nether portal access"},{key:"enableCommandBlock",label:"Command Blocks",type:"boolean",helperText:"Enable command block functionality"},{key:"spawnProtection",label:"Spawn Protection",type:"number",helperText:"Radius around spawn (0 = disabled)",unit:"blocks",validation:{min:0,max:256}},{key:"spawnAnimals",label:"Spawn Animals",type:"boolean",helperText:"Spawn passive mobs (cows, pigs, etc.)"},{key:"spawnMonsters",label:"Spawn Monsters",type:"boolean",helperText:"Spawn hostile mobs (zombies, creepers, etc.)"},{key:"spawnNpcs",label:"Spawn NPCs",type:"boolean",helperText:"Spawn villagers and wandering traders"}]},{id:"world",icon:ez.Z,title:"World",description:"World generation and server identity settings.",essentialFields:[{key:"motd",label:"MOTD (Message of the Day)",type:"string",helperText:"Displayed in the server list",columns:12},{key:"level",label:"World Name",type:"string",helperText:"Save folder name",restartRequired:!0},{key:"levelType",label:"Level Type",type:"select",restartRequired:!0,options:[{value:"default",label:"Default"},{value:"flat",label:"Flat"},{value:"largeBiomes",label:"Large Biomes"},{value:"amplified",label:"Amplified"},{value:"buffet",label:"Buffet"}]},{key:"seed",label:"World Seed",type:"string",helperText:"Only affects new world generation",restartRequired:!0}],advancedFields:[{key:"generateStructures",label:"Generate Structures",type:"boolean",helperText:"Generate villages, temples, etc."},{key:"maxWorldSize",label:"Max World Size",type:"number",unit:"blocks",helperText:"Maximum world radius",validation:{min:1,max:29999984}},{key:"icon",label:"Server Icon URL",type:"string",helperText:"64x64 PNG image URL",columns:12}]},{id:"security",icon:eF.Z,title:"Security",description:"Authentication and access control settings.",essentialFields:[{key:"onlineMode",label:"Online Mode (Mojang Auth)",type:"boolean",helperText:"Disable to allow cracked clients (not recommended)",restartRequired:!0},{key:"enableWhitelist",label:"Enable Whitelist",type:"boolean",helperText:"Only whitelisted players can join",restartRequired:!0}],advancedFields:[{key:"enforceWhitelist",label:"Enforce Whitelist",type:"boolean",helperText:"Kick non-whitelisted players already online",restartRequired:!0},{key:"enforceSecureProfile",label:"Enforce Secure Profile",type:"boolean",helperText:"Require signed chat messages from players",restartRequired:!0}]},{id:"performance",icon:q.Z,title:"Performance & JVM",description:"Memory, view distance, and JVM optimization settings.",essentialFields:[{key:"memory",label:"Memory",type:"string",helperText:"e.g., 2G, 4G, 8G",restartRequired:!0},{key:"useAikarFlags",label:"Aikar's Flags",type:"boolean",helperText:"Optimized GC flags for Paper/Spigot",restartRequired:!0},{key:"viewDistance",label:"View Distance",type:"number",unit:"chunks",validation:{min:2,max:32}}],advancedFields:[{key:"simulationDistance",label:"Simulation Distance",type:"number",unit:"chunks",validation:{min:3,max:32}},{key:"maxTickTime",label:"Max Tick Time",type:"number",unit:"ms",helperText:"-1 to disable watchdog",validation:{min:-1}},{key:"initMemory",label:"Initial Heap",type:"string",helperText:"e.g., 1G (overrides Memory)",restartRequired:!0},{key:"maxMemory",label:"Max Heap",type:"string",helperText:"e.g., 8G (overrides Memory)",restartRequired:!0},{key:"jvmXxOpts",label:"JVM -XX Options",type:"string",helperText:"Additional -XX JVM flags",restartRequired:!0,columns:12}]},{id:"autopause",icon:eP.Z,title:"Auto-pause / Auto-stop",description:"Automatically pause or stop when no players are connected.",essentialFields:[{key:"enableAutopause",label:"Enable Auto-pause",type:"boolean",helperText:"Pause process when no players connected",restartRequired:!0},{key:"autopauseTimeoutEst",label:"Pause Timeout",type:"number",unit:"seconds",helperText:"Wait time after last player leaves",validation:{min:0}}],advancedFields:[{key:"autopauseTimeoutInit",label:"Init Timeout",type:"number",unit:"seconds",helperText:"Timeout after start without connections",validation:{min:0}},{key:"autopausePeriod",label:"Check Period",type:"number",unit:"seconds",helperText:"Status check interval",validation:{min:1}},{key:"enableAutostop",label:"Enable Auto-stop",type:"boolean",helperText:"Stop container when no players connected",restartRequired:!0},{key:"autostopTimeoutEst",label:"Stop Timeout",type:"number",unit:"seconds",helperText:"Wait time before stopping container",validation:{min:0}}]},{id:"system",icon:eW.Z,title:"System",description:"Timezone, resource pack, RCON, and container settings.",essentialFields:[{key:"tz",label:"Timezone",type:"string",helperText:"e.g., Asia/Seoul, UTC",restartRequired:!0},{key:"resourcePack",label:"Resource Pack URL",type:"string",helperText:"Direct download URL for resource pack",columns:12},{key:"enableRcon",label:"Enable RCON",type:"boolean",helperText:"Remote server console access",restartRequired:!0}],advancedFields:[{key:"resourcePackSha1",label:"Resource Pack SHA1",type:"string",helperText:"40-character hex checksum",columns:12},{key:"resourcePackEnforce",label:"Enforce Resource Pack",type:"boolean",helperText:"Kick players who decline"},{key:"resourcePackPrompt",label:"Resource Pack Prompt",type:"string",helperText:"Custom message for resource pack dialog",columns:12},{key:"rconPassword",label:"RCON Password",type:"password",restartRequired:!0},{key:"rconPort",label:"RCON Port",type:"number",validation:{min:1024,max:65535},restartRequired:!0},{key:"stopDuration",label:"Stop Timeout",type:"number",unit:"seconds",helperText:"Graceful shutdown wait time",restartRequired:!0,validation:{min:0}},{key:"uid",label:"User ID (UID)",type:"number",helperText:"Container process UID",restartRequired:!0,validation:{min:0}},{key:"gid",label:"Group ID (GID)",type:"number",helperText:"Container process GID",restartRequired:!0,validation:{min:0}}]}],eM=["memory","initMemory","maxMemory","useAikarFlags","jvmXxOpts","onlineMode","enableWhitelist","enforceWhitelist","enforceSecureProfile","level","seed","levelType","enableAutopause","enableAutostop","enableRcon","rconPassword","rconPort","tz","uid","gid","stopDuration"];function eD(e){let{serverName:t,isRunning:r}=e,{data:i,isLoading:a}=(0,eo.iC)(t),d=(0,eo.MH)(),u=(0,eo.gx)(),v=(0,eo._I)(),[y,g]=(0,n.useState)({}),[j,S]=(0,n.useState)({}),[k,R]=(0,n.useState)(!1),[T,I]=(0,n.useState)(""),[z,F]=(0,n.useState)(!1),[P,W]=(0,n.useState)({open:!1,message:"",severity:"info"});(0,n.useEffect)(()=>{(null==i?void 0:i.config)&&(g(i.config),S(i.config))},[i]);let A=(0,n.useMemo)(()=>{let e=[];for(let t of Object.keys(y))y[t]!==j[t]&&e.push(t);for(let t of Object.keys(j))y[t]===j[t]||e.includes(t)||e.push(t);return e},[y,j]),M=A.length>0,D=A.filter(e=>eM.includes(e)),E=D.length>0,q=(0,n.useCallback)((e,t)=>{g(r=>({...r,[e]:t}))},[]),N=(0,n.useCallback)(()=>{g(j)},[j]),B=(0,n.useCallback)(async e=>{try{let s=await d.mutateAsync({serverName:t,config:y});if(S(s.config),g(s.config),e&&r)try{await v.mutateAsync(t),W({open:!0,message:"Settings saved. Server is restarting...",severity:"warning"})}catch(e){W({open:!0,message:"Settings saved, but server restart failed. Please restart manually.",severity:"error"})}else W({open:!0,message:s.restartRequired?"Settings saved. Restart required for some changes to take effect.":"Settings saved successfully.",severity:s.restartRequired?"warning":"success"})}catch(e){W({open:!0,message:e instanceof Error?e.message:"Failed to save settings",severity:"error"})}finally{F(!1)}},[y,t,r,d,v]),U=(0,n.useCallback)(()=>{E&&r?F(!0):B(!1)},[E,r,B]),L=async()=>{if("RESET"!==T){W({open:!0,message:"Please type RESET to confirm",severity:"warning"});return}try{await u.mutateAsync(t),W({open:!0,message:"World reset successfully",severity:"success"}),R(!1),I("")}catch(e){W({open:!0,message:e instanceof Error?e.message:"Failed to reset world",severity:"error"})}};return a?(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,s.jsx)(x.Z,{})}):(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(ep,{serverName:t}),eA.map(e=>(0,s.jsx)(eS,{section:e,values:y,onChange:q},e.id)),(0,s.jsx)(h.Z,{sx:{borderRadius:3,borderColor:"error.main",borderWidth:1,borderStyle:"solid"},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,color:"error",children:"Danger Zone"}),(0,s.jsx)(O.Z,{sx:{mb:3}}),(0,s.jsxs)(l.Z,{sx:{mb:3},children:[(0,s.jsx)(m.Z,{variant:"subtitle1",fontWeight:600,gutterBottom:!0,children:"Reset World"}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"This will permanently delete the current world and generate a new one. This action cannot be undone."}),(0,s.jsx)(o.Z,{variant:"outlined",color:"error",startIcon:(0,s.jsx)(el.Z,{}),onClick:()=>R(!0),disabled:r,children:"Reset World"}),r&&(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",sx:{ml:2},children:"Stop the server first"})]})]})}),(0,s.jsx)(eR,{hasChanges:M,changedCount:A.length,hasRestartChanges:E,restartFields:D,isSaving:d.isPending,onSave:U,onDiscard:N}),(0,s.jsx)(eT,{open:z,changedFields:D,onSaveOnly:()=>B(!1),onSaveAndRestart:()=>B(!0),onCancel:()=>F(!1)}),(0,s.jsxs)(b.Z,{open:k,onClose:()=>R(!1),maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(f.Z,{children:(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,s.jsx)(ei.Z,{color:"error"}),(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Reset World"})]})}),(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(m.Z,{variant:"body1",gutterBottom:!0,children:["This will permanently delete the world for ",(0,s.jsx)("strong",{children:t})," and generate a new one."]}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"This action cannot be undone. All player progress and builds will be lost."}),(0,s.jsx)(C.Z,{fullWidth:!0,label:"Type RESET to confirm",value:T,onChange:e=>I(e.target.value),sx:{mt:3},autoFocus:!0})]}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(o.Z,{onClick:()=>R(!1),children:"Cancel"}),(0,s.jsx)(o.Z,{variant:"contained",color:"error",onClick:L,disabled:"RESET"!==T||u.isPending,startIcon:u.isPending?(0,s.jsx)(x.Z,{size:16}):(0,s.jsx)(ea.Z,{}),children:u.isPending?"Resetting...":"Reset World"})]})]}),(0,s.jsx)(en.Z,{open:P.open,autoHideDuration:6e3,onClose:()=>W({...P,open:!1}),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:(0,s.jsx)(c.Z,{onClose:()=>W({...P,open:!1}),severity:P.severity,sx:{width:"100%"},children:P.message})})]})}var eO=r(86702),eE=r(47606),eq=r(407),eN=r(56056),eB=r(11597),eU=r(59602);let eL={admin:{label:"Owner",color:"primary",variant:"filled"},manage:{label:"Operator",color:"info",variant:"outlined"},view:{label:"Viewer",color:"default",variant:"outlined"}};function eH(e){let{permission:t,size:r="medium"}=e,n=eL[t];return(0,s.jsx)(M.Z,{label:n.label,color:n.color,variant:n.variant,size:r})}var eK=r(99046),eG=r(68038),eV=r(34080),eJ=r(39181),eQ=r(5632),e_=r(58919),eX=r(20367),e$=r(42936);function eY(e){var t,r;let{open:i,onClose:a,serverId:d}=e,[u,h]=(0,n.useState)(""),[p,v]=(0,n.useState)(null),[y,g]=(0,n.useState)("view"),{data:j,isLoading:S}=(r={enabled:i},(0,eQ.a)({queryKey:["users","search",u],queryFn:()=>(0,e$.SC)("/api/users?q=".concat(encodeURIComponent(u))),enabled:(null==r?void 0:r.enabled)!==!1&&u.length>=2,staleTime:3e4})),k=function(){let e=(0,e_.NL)();return(0,eX.D)({mutationFn:e=>(0,e$.SC)("/api/user-servers",{method:"POST",body:JSON.stringify(e)}),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["user-servers",r.serverId]}),e.invalidateQueries({queryKey:["user-servers"]})}})}(),R=(0,n.useMemo)(()=>{var e;return null!==(e=null==j?void 0:j.users)&&void 0!==e?e:[]},[j]),T=()=>{h(""),v(null),g("view"),k.reset(),a()};return(0,s.jsxs)(b.Z,{open:i,onClose:T,maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:3}},children:[(0,s.jsx)(f.Z,{sx:{fontWeight:600},children:"Add User Access"}),(0,s.jsxs)(Z.Z,{sx:{display:"flex",flexDirection:"column",gap:3,pt:"8px !important"},children:[k.isError&&(0,s.jsx)(c.Z,{severity:"error",sx:{mb:1},children:(null===(t=k.error)||void 0===t?void 0:t.message)||"Failed to grant access"}),(0,s.jsx)(eK.Z,{options:R,getOptionLabel:e=>e.name||e.email,isOptionEqualToValue:(e,t)=>e.id===t.id,value:p,onChange:(e,t)=>v(t),inputValue:u,onInputChange:(e,t)=>h(t),loading:S,filterOptions:e=>e,noOptionsText:u.length<2?"Type at least 2 characters":"No users found",renderInput:e=>(0,s.jsx)(C.Z,{...e,label:"Search User",placeholder:"Search by name or email...",InputProps:{...e.InputProps,endAdornment:(0,s.jsxs)(s.Fragment,{children:[S&&(0,s.jsx)(x.Z,{size:20}),e.InputProps.endAdornment]})}}),renderOption:(e,t)=>{var r,n,i;let{key:a,...o}=e;return(0,s.jsxs)(l.Z,{component:"li",...o,sx:{display:"flex",gap:1.5,py:1},children:[(0,s.jsx)(eO.Z,{src:null!==(i=t.image)&&void 0!==i?i:void 0,sx:{width:32,height:32,bgcolor:"primary.main",fontSize:14},children:((null===(r=t.name)||void 0===r?void 0:r[0])||(null===(n=t.email)||void 0===n?void 0:n[0])||"?").toUpperCase()}),(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(m.Z,{variant:"body2",fontWeight:500,children:t.name||"Unknown"}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:t.email})]})]},a)}}),(0,s.jsxs)(eg.Z,{children:[(0,s.jsx)(eG.Z,{sx:{fontWeight:500,mb:1},children:"Permission Level"}),(0,s.jsxs)(eV.Z,{value:y,onChange:e=>g(e.target.value),children:[(0,s.jsx)(eb.Z,{value:"view",control:(0,s.jsx)(eJ.Z,{size:"small"}),label:(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Viewer"}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Can view server status and logs"})]})}),(0,s.jsx)(eb.Z,{value:"manage",control:(0,s.jsx)(eJ.Z,{size:"small"}),label:(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Operator"}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Can start, stop, and configure the server"})]})}),(0,s.jsx)(eb.Z,{value:"admin",control:(0,s.jsx)(eJ.Z,{size:"small"}),label:(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(m.Z,{variant:"body2",fontWeight:500,children:"Owner"}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",children:"Full control including managing other users"})]})})]})]})]}),(0,s.jsxs)(w.Z,{sx:{px:3,pb:2},children:[(0,s.jsx)(o.Z,{onClick:T,color:"inherit",children:"Cancel"}),(0,s.jsx)(o.Z,{onClick:()=>{p&&k.mutate({userId:p.id,serverId:d,permission:y},{onSuccess:T})},variant:"contained",disabled:!p||k.isPending,sx:{borderRadius:2},children:k.isPending?"Adding...":"Add User"})]})]})}function e0(e){var t,r;let{serverId:i}=e,{data:a,isLoading:x,error:b}=(0,eQ.a)({queryKey:["user-servers",i],queryFn:()=>(0,e$.SC)("/api/user-servers?serverId=".concat(encodeURIComponent(i))),enabled:!!i}),f=function(){let e=(0,e_.NL)();return(0,eX.D)({mutationFn:e=>{let{id:t,permission:r}=e;return(0,e$.SC)("/api/user-servers/".concat(encodeURIComponent(t)),{method:"PATCH",body:JSON.stringify({permission:r})})},onSuccess:()=>{e.invalidateQueries({queryKey:["user-servers"]})}})}(),Z=function(){let e=(0,e_.NL)();return(0,eX.D)({mutationFn:e=>(0,e$.SC)("/api/user-servers/".concat(encodeURIComponent(e)),{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["user-servers"]})}})}(),[w,C]=(0,n.useState)(!1),[S,k]=(0,n.useState)(null),[R,T]=(0,n.useState)(null),z=(e,t)=>{k(e.currentTarget),T(t)},F=()=>{k(null),T(null)},P=e=>{if(!R||R.permission===e){F();return}f.mutate({id:R.id,permission:e},{onSettled:F})},W=null!==(t=null==a?void 0:a.users.filter(e=>"admin"===e.permission).length)&&void 0!==t?t:0,A=(null==R?void 0:R.permission)==="admin"&&W<=1;if(x)return(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(u.Z,{variant:"text",width:"30%",height:32}),(0,s.jsx)(u.Z,{variant:"rounded",width:120,height:36,sx:{borderRadius:2}})]}),(0,s.jsx)(O.Z,{sx:{mb:2}}),[0,1,2].map(e=>(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:[(0,s.jsx)(u.Z,{variant:"circular",width:40,height:40}),(0,s.jsxs)(l.Z,{sx:{flex:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:"40%"}),(0,s.jsx)(u.Z,{variant:"text",width:"60%"})]}),(0,s.jsx)(u.Z,{variant:"rounded",width:80,height:28,sx:{borderRadius:10}}),(0,s.jsx)(u.Z,{variant:"circular",width:32,height:32})]},e))]})});if(b)return(0,s.jsxs)(c.Z,{severity:"error",children:["Failed to load access list: ",b.message]});let M=null!==(r=null==a?void 0:a.users)&&void 0!==r?r:[];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Server Access"}),(0,s.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(eE.Z,{}),onClick:()=>C(!0),sx:{borderRadius:2},children:"Add User"})]}),(0,s.jsx)(O.Z,{sx:{mb:1}}),0===M.length?(0,s.jsx)(l.Z,{sx:{py:4,textAlign:"center"},children:(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"No users have been granted access to this server yet."})}):M.map(e=>{var t,r,n,i,a,o,c,x;return(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,py:1.5,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:[(0,s.jsx)(eO.Z,{src:null!==(x=null===(t=e.user)||void 0===t?void 0:t.image)&&void 0!==x?x:void 0,sx:{width:40,height:40,bgcolor:"primary.main",fontSize:16},children:((null===(n=e.user)||void 0===n?void 0:null===(r=n.name)||void 0===r?void 0:r[0])||(null===(a=e.user)||void 0===a?void 0:null===(i=a.email)||void 0===i?void 0:i[0])||"?").toUpperCase()}),(0,s.jsxs)(l.Z,{sx:{flex:1,minWidth:0},children:[(0,s.jsx)(m.Z,{variant:"body2",fontWeight:500,noWrap:!0,children:(null===(o=e.user)||void 0===o?void 0:o.name)||"Unknown User"}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:(null===(c=e.user)||void 0===c?void 0:c.email)||e.userId})]}),(0,s.jsx)(eH,{permission:e.permission,size:"small"}),(0,s.jsx)(d.Z,{size:"small",onClick:t=>z(t,e),sx:{color:"text.secondary"},children:(0,s.jsx)(I.Z,{fontSize:"small"})})]},e.id)}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mt:2,pt:1},children:[(0,s.jsx)(eU.Z,{sx:{fontSize:16,color:"text.disabled"}}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.disabled",children:"Only platform admins and server owners can manage access."})]})]})}),(0,s.jsxs)(v.Z,{anchorEl:S,open:!!S,onClose:F,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},disableScrollLock:!0,children:[(0,s.jsxs)(y.Z,{onClick:()=>P("admin"),disabled:(null==R?void 0:R.permission)==="admin",children:[(0,s.jsx)(g.Z,{children:(0,s.jsx)(eq.Z,{fontSize:"small"})}),(0,s.jsx)(j.Z,{children:"Change to Owner"})]}),(0,s.jsxs)(y.Z,{onClick:()=>P("manage"),disabled:(null==R?void 0:R.permission)==="manage"||A,children:[(0,s.jsx)(g.Z,{children:(0,s.jsx)(eN.Z,{fontSize:"small"})}),(0,s.jsx)(j.Z,{children:"Change to Operator"})]}),(0,s.jsxs)(y.Z,{onClick:()=>P("view"),disabled:(null==R?void 0:R.permission)==="view"||A,children:[(0,s.jsx)(g.Z,{children:(0,s.jsx)(eZ.Z,{fontSize:"small"})}),(0,s.jsx)(j.Z,{children:"Change to Viewer"})]}),(0,s.jsx)(O.Z,{}),(0,s.jsxs)(y.Z,{onClick:()=>{R&&Z.mutate(R.id,{onSettled:F})},disabled:A,sx:{color:"error.main"},children:[(0,s.jsx)(g.Z,{children:(0,s.jsx)(eB.Z,{fontSize:"small",sx:{color:"error.main"}})}),(0,s.jsx)(j.Z,{children:"Remove Access"})]})]}),(0,s.jsx)(eY,{open:w,onClose:()=>C(!1),serverId:i})]})}var e1=r(10449),e2=r(24559),e3=r(37228);function e6(e){let{text:t}=e,[r,i]=(0,n.useState)(!1),a=async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return(0,s.jsx)(d.Z,{size:"small",onClick:a,sx:{ml:1,color:r?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":r?"Copied":"Copy to clipboard",children:r?(0,s.jsx)(e2.Z,{sx:{fontSize:16}}):(0,s.jsx)(e1.Z,{sx:{fontSize:16}})})}function e5(e){let{label:t,value:r,copyText:n}=e;return(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",py:1},children:[(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:t}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,s.jsx)(m.Z,{variant:"body2",sx:{fontFamily:n?"monospace":"inherit",color:n?"text.primary":"text.secondary"},children:r}),n&&(0,s.jsx)(e6,{text:n})]})]})}function e4(e){let{serverName:t,hostname:r}=e,{data:n,isLoading:i}=(0,e3.UW)();if(i)return(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(u.Z,{variant:"text",width:"40%",height:28,sx:{mb:1}}),(0,s.jsx)(u.Z,{variant:"rectangular",height:1,sx:{mb:2}}),(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:"30%"}),(0,s.jsx)(u.Z,{variant:"text",width:"40%"})]}),(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:"30%"}),(0,s.jsx)(u.Z,{variant:"text",width:"40%"})]})]})});let a=r?"".concat(r,":25565"):"Not configured",o=(null==n?void 0:n.enabled)&&n.servers.length>0,d=null==n?void 0:n.servers.find(e=>e.serverName===t),c=(null==d?void 0:d.playitDomain)||"Not configured",x=!!(null==d?void 0:d.playitDomain);return(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Connection"}),(0,s.jsx)(O.Z,{sx:{mb:2}}),(0,s.jsx)(e5,{label:"LAN Address",value:a,copyText:r?a:void 0}),o&&(0,s.jsx)(e5,{label:"External Address",value:c,copyText:x?c:void 0})]})})}var e8=r(42431),e7=r(76777),e9=r(15761);function te(e){let{serverName:t}=e,{data:r,isLoading:i,error:a}=(0,eQ.a)({queryKey:["servers",t,"mods"],queryFn:()=>(0,e$.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods")),enabled:!!t}),u=function(){let e=(0,e_.NL)();return(0,eX.D)({mutationFn:e=>{let{serverName:t,slugs:r,source:s}=e;return(0,e$.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods"),{method:"POST",body:JSON.stringify({slugs:r,source:s})})},onSuccess:(t,r)=>{let{serverName:s}=r;e.invalidateQueries({queryKey:["servers",s,"mods"]})}})}(),v=function(){let e=(0,e_.NL)();return(0,eX.D)({mutationFn:e=>{let{serverName:t,slug:r}=e;return(0,e$.SC)("/api/servers/".concat(encodeURIComponent(t),"/mods/").concat(encodeURIComponent(r)),{method:"DELETE"})},onSuccess:(t,r)=>{let{serverName:s}=r;e.invalidateQueries({queryKey:["servers",s,"mods"]})}})}(),[y,g]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[S,k]=(0,n.useState)(""),[R,T]=(0,n.useState)(!1),[I,F]=(0,n.useState)({open:!1,message:"",severity:"info"}),{data:P,isLoading:W}=function(e,t){let r=new URLSearchParams;return e&&r.set("q",e),(null==t?void 0:t.limit)!=null&&r.set("limit",String(t.limit)),(null==t?void 0:t.offset)!=null&&r.set("offset",String(t.offset)),(0,eQ.a)({queryKey:["mods","search",e,null==t?void 0:t.limit,null==t?void 0:t.offset],queryFn:()=>(0,e$.SC)("/api/mods/search?".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1&&!!e.trim()})}(S,{limit:10,enabled:y&&S.length>0});(0,n.useEffect)(()=>{let e=setTimeout(()=>{k(j)},300);return()=>clearTimeout(e)},[j]);let A=(0,n.useCallback)(async e=>{try{await v.mutateAsync({serverName:t,slug:e}),T(!0),F({open:!0,message:"Removed ".concat(e),severity:"success"})}catch(e){F({open:!0,message:e instanceof Error?e.message:"Failed to remove mod",severity:"error"})}},[v,t]),q=(0,n.useCallback)(async e=>{try{await u.mutateAsync({serverName:t,slugs:[e]}),T(!0),F({open:!0,message:"Added ".concat(e),severity:"success"})}catch(e){F({open:!0,message:e instanceof Error?e.message:"Failed to add mod",severity:"error"})}},[u,t]),N=new Set;if(null==r?void 0:r.mods)for(let e of Object.values(r.mods))for(let t of e)N.add(t);if(i)return(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:6},children:(0,s.jsx)(x.Z,{})});if(a)return(0,s.jsxs)(c.Z,{severity:"error",sx:{mt:2},children:["Failed to load mods: ",a.message]});let B=N.size>0;return(0,s.jsxs)(l.Z,{children:[R&&(0,s.jsx)(c.Z,{severity:"info",sx:{mb:2},children:"Restart the server to apply mod changes."}),(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,s.jsx)(m.Z,{variant:"h6",fontWeight:600,children:"Installed Mods"}),(0,s.jsx)(o.Z,{variant:"contained",size:"small",startIcon:(0,s.jsx)(ex.Z,{}),onClick:()=>{w(""),k(""),g(!0)},children:"Add Mods"})]}),(0,s.jsx)(O.Z,{sx:{mb:2}}),B?Object.entries(r.mods).map(e=>{let[t,r]=e;return(0,s.jsxs)(l.Z,{sx:{mb:2},children:[(0,s.jsx)(m.Z,{variant:"subtitle2",color:"text.secondary",sx:{mb:1,textTransform:"capitalize"},children:t}),(0,s.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:r.map(e=>(0,s.jsx)(M.Z,{label:e,icon:(0,s.jsx)(e7.Z,{}),onDelete:()=>A(e),deleteIcon:(0,s.jsx)(z.Z,{}),variant:"outlined"},e))})]},t)}):(0,s.jsxs)(l.Z,{sx:{textAlign:"center",py:4},children:[(0,s.jsx)(e7.Z,{sx:{fontSize:48,color:"text.disabled",mb:1}}),(0,s.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"No mods installed"}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.disabled",sx:{mt:.5},children:'Click "Add Mods" to search and install mods from Modrinth'})]})]})}),(0,s.jsxs)(b.Z,{open:y,onClose:()=>g(!1),maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{minHeight:400}},children:[(0,s.jsxs)(f.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Search Mods",(0,s.jsx)(d.Z,{onClick:()=>g(!1),size:"small",children:(0,s.jsx)(E.Z,{})})]}),(0,s.jsxs)(Z.Z,{children:[(0,s.jsx)(C.Z,{fullWidth:!0,autoFocus:!0,placeholder:"Search Modrinth...",value:j,onChange:e=>w(e.target.value),InputProps:{startAdornment:(0,s.jsx)(D.Z,{position:"start",children:(0,s.jsx)(e8.Z,{})})},sx:{mb:2}}),W&&(0,s.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,s.jsx)(x.Z,{size:28})}),!W&&P&&0===P.hits.length&&S&&(0,s.jsxs)(m.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",py:4},children:['No mods found for "',S,'"']}),!W&&P&&P.hits.length>0&&(0,s.jsx)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:P.hits.map(e=>{var t;let r=N.has(e.slug);return(0,s.jsx)(h.Z,{variant:"outlined",sx:{borderRadius:2},children:(0,s.jsx)(p.Z,{sx:{py:1.5,px:2,"&:last-child":{pb:1.5}},children:(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:[(0,s.jsx)(eO.Z,{src:e.iconUrl||void 0,variant:"rounded",sx:{width:40,height:40,bgcolor:"action.hover"},children:(0,s.jsx)(e7.Z,{})}),(0,s.jsxs)(l.Z,{sx:{flex:1,minWidth:0},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(m.Z,{variant:"subtitle2",noWrap:!0,children:e.title}),(0,s.jsx)(o.Z,{size:"small",variant:r?"outlined":"contained",disabled:r||u.isPending,onClick:()=>q(e.slug),sx:{ml:1,minWidth:80,flexShrink:0},children:r?"Installed":"Add"})]}),(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mt:.25,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:e.description}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,s.jsx)(e9.Z,{sx:{fontSize:14,color:"text.disabled"}}),(0,s.jsx)(m.Z,{variant:"caption",color:"text.disabled",children:(t=e.downloads)>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):String(t)})]}),e.author&&(0,s.jsxs)(m.Z,{variant:"caption",color:"text.disabled",children:["by ",e.author]})]})]})]})})},e.slug)})})]})]}),(0,s.jsx)(en.Z,{open:I.open,autoHideDuration:4e3,onClose:()=>F(e=>({...e,open:!1})),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,s.jsx)(c.Z,{onClose:()=>F(e=>({...e,open:!1})),severity:I.severity,variant:"filled",children:I.message})})]})}let tt=["Overview","Activity","Mods","Files","Backups","Access","Options"];function tr(e){return e.replace(/\x1b\[\?[\d;]*[a-zA-Z]/g,"").replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"").replace(/\x1b=/g,"").replace(/\[\?[\d;]*[a-zA-Z]/g,"").replace(/\[[0-9;]*[a-zA-Z]/g,"").replace(/\[m/g,"").replace(/>\.\.\.\.\r?/g,"").replace(/\r/g,"").trim()}function ts(e){var t,r,i,a,c;let{server:x,onSendCommand:u}=e,[v,y]=(0,n.useState)("Overview"),[g,j]=(0,n.useState)(""),[f,w]=(0,n.useState)(!0),[R,T]=(0,n.useState)(!1),I=(0,n.useRef)(null),{logs:z,isConnected:F}=(0,V.Y)({serverName:x.name}),P=(0,n.useMemo)(()=>z.filter(e=>!e.includes("RCON Listener")&&!e.includes("RCON Client")&&!e.includes("RconClient")),[z]);(0,n.useEffect)(()=>{I.current&&f&&(I.current.scrollTop=I.current.scrollHeight)},[P,f]);let W=async()=>{g.trim()&&u&&(await u(g.trim()),j(""))},A=null!==(a=null===(t=x.stats)||void 0===t?void 0:t.cpuPercent)&&void 0!==a?a:0;(null===(r=x.stats)||void 0===r?void 0:r.memoryUsage)&&x.stats.memoryUsage,function(e){if(!e)return;let t=e.match(/^(\d+)\s*(M|G)?$/i);if(t)parseInt(t[1],10),(t[2]||"M").toUpperCase()}(x.memory);let K=null!==(c=null===(i=x.stats)||void 0===i?void 0:i.memoryPercent)&&void 0!==c?c:0;return(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(l.Z,{sx:{display:"flex",gap:.5,mb:3},children:tt.map(e=>(0,s.jsx)(o.Z,{onClick:()=>y(e),sx:{px:2,py:1,borderRadius:5,fontSize:14,fontWeight:500,textTransform:"none",bgcolor:v===e?"primary.main":"transparent",color:v===e?"#0a0e14":"text.secondary","&:hover":{bgcolor:v===e?"primary.main":(0,k.Fq)("#1bd96a",.1)}},children:e},e))}),(0,s.jsxs)(l.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, 1fr)"},gap:2,mb:2.5},children:[(0,s.jsx)(G,{value:"".concat(A.toFixed(2),"%"),unit:"/ 100%",label:"CPU usage",icon:(0,s.jsx)(q.Z,{sx:{fontSize:28}}),progress:A,progressMax:100,color:"#1bd96a"}),(0,s.jsx)(G,{value:"".concat(K.toFixed(2),"%"),unit:"/ 100%",label:"Memory usage",icon:(0,s.jsx)(N.Z,{sx:{fontSize:28}}),progress:K,progressMax:100,color:"#1bd96a"}),(0,s.jsx)(G,{value:x.worldSize||"0 B",unit:"/ 10 GB",label:"World size",icon:(0,s.jsx)(B.Z,{sx:{fontSize:28}}),progress:function(e){if(!e)return 0;let t=e.match(/^([\d.]+)\s*(B|KB|MB|MiB|GB|GiB)?$/i);if(!t)return 0;let r=parseFloat(t[1]);switch((t[2]||"B").toUpperCase()){case"GB":case"GIB":return 1024*r;case"MB":case"MIB":return r;case"KB":return r/1024;default:return r/1048576}}(x.worldSize),progressMax:10240,color:"#1bd96a"})]}),(0,s.jsxs)(h.Z,{sx:{bgcolor:"background.paper",borderRadius:3,border:"1px solid",borderColor:"divider",overflow:"hidden"},children:[(0,s.jsxs)(l.Z,{sx:{px:3,py:2,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.25},children:[(0,s.jsx)(m.Z,{variant:"h6",sx:{fontWeight:700,color:"text.primary"},children:"Console"}),(0,s.jsx)(l.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:F?"primary.main":"error.main",boxShadow:F?"0 0 8px rgba(27, 217, 106, 0.4)":"0 0 8px rgba(239, 68, 68, 0.4)"}})]}),(0,s.jsxs)(l.Z,{sx:{position:"relative"},children:[(0,s.jsx)(l.Z,{ref:I,onScroll:()=>{if(!I.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:r}=I.current;w(t-e-r<30)},sx:{height:360,overflowY:"auto",px:2.5,py:2,fontFamily:"'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace",fontSize:13,lineHeight:1.85,color:"#b4b6c4",bgcolor:"#0a0a0a",scrollbarWidth:"thin",scrollbarColor:"#3a3d4e #0a0a0a","&::-webkit-scrollbar":{width:8},"&::-webkit-scrollbar-track":{bgcolor:"#0a0a0a"},"&::-webkit-scrollbar-thumb":{bgcolor:"#3a3d4e",borderRadius:4}},children:0===P.length?(0,s.jsx)(m.Z,{sx:{color:"text.secondary",textAlign:"center",py:8},children:"Waiting for logs..."}):P.map((e,t)=>{let r=function(e){let t=tr(e).match(/\[(\d{2}:\d{2}:\d{2})\]\s*\[([^/]+)\/(\w+)\]:\s*(.+)/);return t?{time:t[1],thread:t[2],level:t[3]||"INFO",msg:t[4]}:null}(e);return r?(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[(0,s.jsxs)(l.Z,{component:"span",sx:{color:"#4a4d60"},children:["[",r.time,"]"]}),(0,s.jsxs)(l.Z,{component:"span",sx:{color:"#4a4d60"},children:["\xa0[",r.thread,"/",(0,s.jsx)(l.Z,{component:"span",sx:{color:"WARN"===r.level?"#e8a848":"#6b6e80"},children:r.level}),"]:\xa0"]}),(0,s.jsx)(l.Z,{component:"span",sx:{color:"WARN"===r.level?"#c4a45a":"#b4b6c4"},children:r.msg})]},t):(0,s.jsx)(l.Z,{sx:{color:"#b4b6c4"},children:tr(e)},t)})}),(0,s.jsx)(d.Z,{onClick:()=>T(!0),sx:{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:2,bgcolor:"#282a3a",border:"1px solid #3a3d4e",color:"#8b8da0","&:hover":{bgcolor:"#313440"}},children:(0,s.jsx)(U.Z,{sx:{fontSize:18}})}),!f&&(0,s.jsx)(d.Z,{onClick:()=>{I.current&&I.current.scrollTo({top:I.current.scrollHeight,behavior:"smooth"})},sx:{position:"absolute",bottom:12,right:12,width:36,height:36,borderRadius:2,bgcolor:"#282a3a",border:"1px solid #3a3d4e",color:"#8b8da0","&:hover":{bgcolor:"#313440"}},children:(0,s.jsx)(L.Z,{sx:{fontSize:18}})})]}),(0,s.jsx)(l.Z,{sx:{px:2.5,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:(0,s.jsx)(C.Z,{fullWidth:!0,size:"small",placeholder:"Send a command",value:g,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),W())},disabled:!F,InputProps:{startAdornment:(0,s.jsx)(D.Z,{position:"start",children:(0,s.jsx)(H.Z,{sx:{fontSize:16,color:"#999"}})}),sx:{bgcolor:"#13141c",borderRadius:2,fontFamily:"'JetBrains Mono', 'Fira Code', monospace",fontSize:14,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#2a2d3e"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#3a3d4e"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}}}})})]}),"Overview"===v&&(0,s.jsxs)(S.ZP,{container:!0,spacing:3,sx:{mt:1},children:[(0,s.jsx)(S.ZP,{item:!0,xs:12,md:6,children:(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Server Information"}),(0,s.jsx)(O.Z,{sx:{mb:2}}),(0,s.jsx)(tn,{label:"Name",value:x.name}),(0,s.jsx)(tn,{label:"Container",value:x.container}),(0,s.jsx)(tn,{label:"Hostname",value:x.hostname}),(0,s.jsx)(tn,{label:"Type",value:x.type}),(0,s.jsx)(tn,{label:"Version",value:x.version}),(0,s.jsx)(tn,{label:"Memory",value:x.memory}),(0,s.jsx)(tn,{label:"Uptime",value:x.uptime||function(e){if(!e||e<0)return"0s";let t=Math.floor(e/3600),r=Math.floor(e%3600/60),s=e%60;return t>0?"".concat(t,"h ").concat(r,"m"):r>0?"".concat(r,"m ").concat(s,"s"):"".concat(s,"s")}(x.uptimeSeconds)})]})})}),(0,s.jsx)(S.ZP,{item:!0,xs:12,md:6,children:(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Players"}),(0,s.jsx)(O.Z,{sx:{mb:2}}),x.players?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tn,{label:"Online",value:"".concat(x.players.online," / ").concat(x.players.max)}),x.players.players&&x.players.players.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",sx:{mt:2,mb:1},children:"Online Players"}),(0,s.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:x.players.players.map(e=>(0,s.jsx)(M.Z,{label:e,size:"small"},e))})]})]}):(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:"Player information unavailable"})]})})}),(0,s.jsx)(S.ZP,{item:!0,xs:12,md:6,children:(0,s.jsx)(e4,{serverName:x.name,hostname:x.hostname})})]}),"Activity"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(m.Z,{variant:"h6",gutterBottom:!0,fontWeight:600,children:"Server Activity"}),(0,s.jsx)(O.Z,{sx:{mb:2}}),(0,s.jsx)(es,{serverName:x.name})]})})}),"Mods"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(te,{serverName:x.name})}),"Files"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"File browser coming soon"})}),"Backups"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(m.Z,{variant:"body1",color:"text.secondary",children:"Backup management coming soon"})}),"Access"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(e0,{serverId:x.name})}),"Options"===v&&(0,s.jsx)(l.Z,{sx:{mt:3},children:(0,s.jsx)(eD,{serverName:x.name,isRunning:"running"===x.status})}),(0,s.jsxs)(b.Z,{open:R,onClose:()=>T(!1),maxWidth:"xl",fullWidth:!0,PaperProps:{sx:{height:"90vh",bgcolor:"background.paper"}},children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2,borderBottom:1,borderColor:"divider"},children:[(0,s.jsxs)(m.Z,{variant:"h6",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,letterSpacing:"0.05em"},children:["Console - ",x.name]}),(0,s.jsx)(d.Z,{onClick:()=>T(!1),children:(0,s.jsx)(E.Z,{})})]}),(0,s.jsx)(Z.Z,{sx:{p:0,display:"flex",flexDirection:"column"},children:(0,s.jsx)(J.K,{serverName:x.name})})]})]})}function tn(e){let{label:t,value:r}=e;return r?(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,s.jsx)(m.Z,{variant:"body2",color:"text.secondary",children:t}),(0,s.jsx)(m.Z,{variant:"body2",sx:{fontWeight:500},children:r})]}):null}var ti=r(93757);function ta(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]})}function tl(){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("path",{d:"M21 2v6h-6"}),(0,s.jsx)("path",{d:"M3 12a9 9 0 0115.36-6.36L21 8"}),(0,s.jsx)("path",{d:"M3 22v-6h6"}),(0,s.jsx)("path",{d:"M21 12a9 9 0 01-15.36 6.36L3 16"})]})}function to(){var e,t,r,M;let D=(0,i.useParams)(),O=(0,a.x)(),E=decodeURIComponent(D.name),{data:q,isLoading:N,error:B}=(0,eo.Hy)(E),{status:U,health:L}=function(e){let{serverName:t,onStatusChange:r,enabled:s=!0,reconnectInterval:i=3e3}=e,[a,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(null);(0,n.useEffect)(()=>{l(null),d(null)},[t]);let c=(0,n.useCallback)(e=>{if("server-status"===e.type){let t=e.data.status,s=e.data.health;l(t),d(s),null==r||r(t,s)}},[r]),{isConnected:x,reconnect:u,retryCount:h}=(0,ti.D)({url:"/api/sse/servers/".concat(encodeURIComponent(t),"/status"),onMessage:c,enabled:s,reconnectInterval:i});return{status:a,health:o,isConnected:x,reconnect:u,retryCount:h}}({serverName:E,enabled:!!E}),[H,K]=(0,n.useState)(null),[G,V]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(""),_=(0,eo.jM)(),X=(0,eo.Aw)(),$=(0,eo._I)(),Y=(0,eo.Hq)(),ee=async()=>{try{await _.mutateAsync(E)}catch(e){console.error("Failed to start server:",e)}},et=async()=>{try{await X.mutateAsync(E)}catch(e){console.error("Failed to stop server:",e)}},er=async()=>{try{await $.mutateAsync(E)}catch(e){console.error("Failed to restart server:",e)}},es=async e=>{try{await fetch("/api/servers/".concat(encodeURIComponent(E),"/exec"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e})})}catch(e){console.error("Failed to send command:",e)}},en=U||(null==q?void 0:q.server.status),ei=_.isPending||X.isPending||$.isPending,ea=null==q?void 0:q.server;return(0,s.jsxs)(s.Fragment,{children:[B&&(0,s.jsxs)(c.Z,{severity:"error",sx:{mb:3},children:["Failed to load server: ",B.message]}),_.isError&&(0,s.jsxs)(c.Z,{severity:"error",sx:{mb:3},children:["Failed to start server: ",null===(e=_.error)||void 0===e?void 0:e.message]}),X.isError&&(0,s.jsxs)(c.Z,{severity:"error",sx:{mb:3},children:["Failed to stop server: ",null===(t=X.error)||void 0===t?void 0:t.message]}),$.isError&&(0,s.jsxs)(c.Z,{severity:"error",sx:{mb:3},children:["Failed to restart server: ",null===(r=$.error)||void 0===r?void 0:r.message]}),Y.isError&&(0,s.jsxs)(c.Z,{severity:"error",sx:{mb:3},children:["Failed to delete server: ",null===(M=Y.error)||void 0===M?void 0:M.message]}),N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,mb:2.5},children:[(0,s.jsx)(u.Z,{variant:"rounded",width:64,height:64,sx:{borderRadius:3,flexShrink:0}}),(0,s.jsxs)(l.Z,{sx:{flex:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:80,height:18,sx:{mb:.5}}),(0,s.jsx)(u.Z,{variant:"text",width:"40%",height:40}),(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:2,mt:.75},children:[(0,s.jsx)(u.Z,{variant:"text",width:100}),(0,s.jsx)(u.Z,{variant:"text",width:60}),(0,s.jsx)(u.Z,{variant:"text",width:140}),(0,s.jsx)(u.Z,{variant:"text",width:50})]})]}),(0,s.jsxs)(l.Z,{sx:{display:"flex",gap:1,flexShrink:0},children:[(0,s.jsx)(u.Z,{variant:"rounded",width:90,height:40,sx:{borderRadius:2}}),(0,s.jsx)(u.Z,{variant:"rounded",width:36,height:36,sx:{borderRadius:2}})]})]}),(0,s.jsx)(l.Z,{sx:{display:"flex",gap:.5,mb:3},children:[80,70,65,50,65,65].map((e,t)=>(0,s.jsx)(u.Z,{variant:"rounded",width:e,height:36,sx:{borderRadius:5}},t))}),(0,s.jsx)(l.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, 1fr)"},gap:2,mb:2.5},children:[0,1,2].map(e=>(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1.5},children:[(0,s.jsx)(u.Z,{variant:"text",width:"50%"}),(0,s.jsx)(u.Z,{variant:"circular",width:28,height:28})]}),(0,s.jsx)(u.Z,{variant:"text",width:"60%",height:36}),(0,s.jsx)(u.Z,{variant:"rounded",width:"100%",height:6,sx:{borderRadius:3,mt:1}})]})},e))}),(0,s.jsxs)(h.Z,{sx:{borderRadius:3,border:"1px solid",borderColor:"divider"},children:[(0,s.jsxs)(l.Z,{sx:{px:3,py:2,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.25},children:[(0,s.jsx)(u.Z,{variant:"text",width:80,height:28}),(0,s.jsx)(u.Z,{variant:"circular",width:10,height:10})]}),(0,s.jsx)(u.Z,{variant:"rectangular",height:360,sx:{bgcolor:"#0a0a0a"}}),(0,s.jsx)(l.Z,{sx:{px:2.5,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:(0,s.jsx)(u.Z,{variant:"rounded",width:"100%",height:40,sx:{borderRadius:2}})})]}),(0,s.jsxs)(S.ZP,{container:!0,spacing:3,sx:{mt:1},children:[(0,s.jsx)(S.ZP,{item:!0,xs:12,md:6,children:(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(u.Z,{variant:"text",width:"40%",height:28,sx:{mb:1}}),(0,s.jsx)(u.Z,{variant:"rectangular",height:1,sx:{mb:2}}),[0,1,2,3,4,5,6].map(e=>(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:"30%"}),(0,s.jsx)(u.Z,{variant:"text",width:"40%"})]},e))]})})}),(0,s.jsx)(S.ZP,{item:!0,xs:12,md:6,children:(0,s.jsx)(h.Z,{sx:{borderRadius:3},children:(0,s.jsxs)(p.Z,{children:[(0,s.jsx)(u.Z,{variant:"text",width:"30%",height:28,sx:{mb:1}}),(0,s.jsx)(u.Z,{variant:"rectangular",height:1,sx:{mb:2}}),(0,s.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:1},children:[(0,s.jsx)(u.Z,{variant:"text",width:"25%"}),(0,s.jsx)(u.Z,{variant:"text",width:"20%"})]})]})})})]})]}):ea?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:2,mb:2.5},children:[(0,s.jsx)(l.Z,{sx:{width:64,height:64,borderRadius:3,overflow:"hidden",bgcolor:"background.paper",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:"1px solid",borderColor:"divider",fontSize:36},children:function(e){if(!e)return"\uD83C\uDFAE";let t=e.toUpperCase();return["PAPER","SPIGOT","BUKKIT","PURPUR"].includes(t)?"\uD83D\uDD0C":["FORGE","NEOFORGE","FABRIC","QUILT"].includes(t)?"\uD83D\uDD27":"\uD83C\uDFAE"}(ea.type)}),(0,s.jsxs)(l.Z,{sx:{flex:1},children:[(0,s.jsxs)(m.Z,{onClick:()=>O.push("/servers"),sx:{fontSize:12,color:"primary.main",cursor:"pointer",mb:.25,display:"flex",alignItems:"center",gap:.5,"&:hover":{textDecoration:"underline"}},children:[(0,s.jsx)(R.Z,{sx:{fontSize:14}})," All servers"]}),(0,s.jsx)(m.Z,{variant:"h4",component:"h1",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"text.primary",letterSpacing:"0.5px",m:0,textTransform:"uppercase"},children:E}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:0,mt:.75,flexWrap:"wrap",fontSize:13,color:"text.secondary"},children:[ea.version&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,s.jsx)(F.Z,{sx:{fontSize:14}}),"Minecraft ",ea.version]}),(0,s.jsx)(l.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),ea.type&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,s.jsx)(P.Z,{sx:{fontSize:14}}),ea.type]}),(0,s.jsx)(l.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),ea.hostname&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,s.jsx)(W.Z,{sx:{fontSize:14}}),ea.hostname]}),(0,s.jsx)(l.Z,{component:"span",sx:{mx:1.25,color:"#3a3d4e"},children:"|"})]}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,s.jsx)(A.Z,{sx:{fontSize:14}}),ea.uptime||function(e){if(!e||e<0)return"0s";let t=Math.floor(e/3600),r=Math.floor(e%3600/60),s=e%60;return t>0?"".concat(t,"h ").concat(r,"m"):r>0?"".concat(r,"m ").concat(s,"s"):"".concat(s,"s")}(ea.uptimeSeconds)||"0s"]})]})]}),(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1.25,flexShrink:0},children:[("stopped"===en||"exited"===en||"not_created"===en)&&(0,s.jsx)(o.Z,{variant:"contained",color:"success",startIcon:ei?(0,s.jsx)(x.Z,{size:16,color:"inherit"}):(0,s.jsx)(T.Z,{}),onClick:ee,disabled:ei,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:600},children:"Start"}),"running"===en&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{variant:"outlined",startIcon:ei?(0,s.jsx)(x.Z,{size:16}):(0,s.jsx)(ta,{}),onClick:et,disabled:ei,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:500,borderColor:"divider",color:"text.secondary","&:hover":{borderColor:"text.secondary",bgcolor:(0,k.Fq)("#fff",.05)}},children:"Stop"}),(0,s.jsx)(o.Z,{variant:"contained",startIcon:ei?(0,s.jsx)(x.Z,{size:16,color:"inherit"}):(0,s.jsx)(tl,{}),onClick:er,disabled:ei,sx:{px:2,py:1,borderRadius:2,fontSize:14,fontWeight:600,bgcolor:"primary.main",color:"#0a0e14","&:hover":{bgcolor:"primary.dark"}},children:"Restart"})]}),(0,s.jsx)(d.Z,{onClick:e=>K(e.currentTarget),sx:{width:36,height:36,borderRadius:2,border:"1px solid",borderColor:"divider",color:"text.secondary"},children:(0,s.jsx)(I.Z,{sx:{fontSize:18}})}),(0,s.jsx)(v.Z,{anchorEl:H,open:!!H,onClose:()=>K(null),children:(0,s.jsxs)(y.Z,{onClick:()=>{K(null),V(!0),Q("")},sx:{color:"error.main"},children:[(0,s.jsx)(g.Z,{children:(0,s.jsx)(z.Z,{fontSize:"small",sx:{color:"error.main"}})}),(0,s.jsx)(j.Z,{children:"Delete Server"})]})})]})]}),(0,s.jsx)(ts,{server:ea,onSendCommand:es})]}):(0,s.jsx)(c.Z,{severity:"warning",children:"Server not found"}),(0,s.jsxs)(b.Z,{open:G,onClose:()=>{V(!1),Q("")},maxWidth:"sm",fullWidth:!0,children:[(0,s.jsx)(f.Z,{children:"Delete Server"}),(0,s.jsxs)(Z.Z,{children:[(0,s.jsxs)(m.Z,{sx:{mb:2},children:["This action cannot be undone. Type ",(0,s.jsx)("strong",{children:E})," to confirm deletion."]}),(0,s.jsx)(C.Z,{label:"Server name",value:J,onChange:e=>Q(e.target.value),fullWidth:!0,autoFocus:!0})]}),(0,s.jsxs)(w.Z,{sx:{px:3,pb:2},children:[(0,s.jsx)(o.Z,{onClick:()=>{V(!1),Q("")},children:"Cancel"}),(0,s.jsx)(o.Z,{variant:"contained",color:"error",onClick:()=>{J===E&&Y.mutate({name:E,force:!0},{onSuccess:()=>{O.push("/servers")}})},disabled:J!==E||Y.isPending,startIcon:Y.isPending?(0,s.jsx)(x.Z,{size:16}):null,children:Y.isPending?"Deleting...":"Delete"})]})]})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var s=r(94655),n=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,s.jsx)(n.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 s=r(94655),n=r(25333),i=r(46207),a=r(43436);function l(e){let{status:t,size:r="small"}=e;return(0,s.jsx)(n.Z,{icon:"success"===t?(0,s.jsx)(i.Z,{}):(0,s.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 d}});var s=r(5632),n=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,s.a)({queryKey:["audit-logs",e],queryFn:()=>(0,n.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,s.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,n.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function l(e,t){return(0,s.a)({queryKey:["audit-logs",e],queryFn:()=>(0,n.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 d(){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 d},UW:function(){return l}});var s=r(5632),n=r(58919),i=r(20367),a=r(42936);function l(){return(0,s.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,n.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function d(){let e=(0,n.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 s},Xn:function(){return a},n3:function(){return n},xg:function(){return i}});let s={"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"},n={"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,6758,680,1668,7436,1071,540,4416,2538,5511,880,55,7727,8347,1658,3945,6727,6645,2535,4219,4436,2666,5787,3669,2757,1744],function(){return e(e.s=59616)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[224],{49726:function(e,t,r){Promise.resolve().then(r.bind(r,7854))},7854:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return en}});var n=r(94655),s=r(35106),o=r(31358),i=r(7281),a=r(30417),l=r(81071),c=r(93017),d=r(69899),u=r(31317),h=r(76492),x=r(32366),m=r(78067),p=r(84840),f=r(97436),v=r(52082),g=r(89923),j=r(10297),y=r(42431),S=r(628),b=r(41565),Z=r(25935),C=r(79983),k=r(25333),w=r(95511),T=r(5501),E=r(93315),R=r(27171),I=r(96292);let P=e=>{switch(e){case"running":return"success";case"stopped":case"exited":case"not_created":return"error";case"created":return"warning";default:return"default"}},M=e=>{switch(e){case"running":return"Running";case"stopped":case"exited":return"Stopped";case"not_created":return"Not Created";case"created":return"Created";default:return e||"Unknown"}},O=e=>{if(!e)return"-";let t=e.split(",").map(e=>e.trim());return t.find(e=>e.endsWith(".local"))||t[0]||"-"};function F(e){var t;let{server:r,statusOverride:s,onClick:o,onStart:a,onStop:l,loading:c=!1}=e,d=(null==s?void 0:s.status)||r.status,h=(e,t)=>{e.stopPropagation(),t(r.name)},x="running"===d,m="stopped"===d||"exited"===d||"not_created"===d,p=O(r.hostname),f=(null===(t=r.hostname)||void 0===t?void 0:t.split(",").map(e=>e.trim()))||[];return(0,n.jsxs)(S.Z,{role:"article",onClick:()=>{o&&o(r.name)},sx:{cursor:o?"pointer":"default",transition:"all 0.2s",height:180,display:"flex",flexDirection:"column","&:hover":o?{transform:"translateY(-2px)",boxShadow:4}:{}},children:[(0,n.jsxs)(b.Z,{sx:{flex:1,pb:1},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,n.jsx)(u.Z,{variant:"h6",component:"h3",sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,mr:1},children:r.name}),(0,n.jsx)(k.Z,{label:M(d),size:"small",color:P(d),sx:{fontWeight:500,minWidth:70}})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(I.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,n.jsx)(w.Z,{title:f.length>1?f.join("\n"):"",arrow:!0,children:(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p,f.length>1&&" (+".concat(f.length-1,")")]})})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(R.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,n.jsx)(u.Z,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.container})]})]}),(0,n.jsxs)(Z.Z,{sx:{justifyContent:"flex-end",px:2,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:[m&&a&&(0,n.jsx)(C.Z,{"aria-label":"Start server",color:"success",onClick:e=>h(e,a),disabled:c,size:"small",children:(0,n.jsx)(T.Z,{})}),x&&l&&(0,n.jsx)(C.Z,{"aria-label":"Stop server",color:"error",onClick:e=>h(e,l),disabled:c,size:"small",children:(0,n.jsx)(E.Z,{})}),!m&&!x&&(0,n.jsx)(i.Z,{sx:{height:34}})]})]})}function L(e){let{servers:t,statusMap:r={},onServerClick:o,onStart:l,onStop:c,onCreate:d,loadingServers:h=[]}=e,[m,S]=(0,s.useState)(""),[b,Z]=(0,s.useState)("all"),C=(0,s.useMemo)(()=>t.filter(e=>{if(m&&!e.name.toLowerCase().includes(m.toLowerCase()))return!1;let t=r[e.name],n=(null==t?void 0:t.status)||e.status;return("running"!==b||"running"===n)&&("stopped"!==b||"stopped"===n||"exited"===n||"not_created"===n)}),[t,r,m,b]);return 0===t.length?(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",gap:2},children:[(0,n.jsx)(u.Z,{variant:"h6",color:"text.secondary",children:"No servers found"}),d&&(0,n.jsx)(a.Z,{variant:"contained",startIcon:(0,n.jsx)(x.Z,{}),onClick:d,children:"Create Server"})]}):(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,mb:3,alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between"},children:[(0,n.jsxs)(j.Z,{value:b,exclusive:!0,onChange:(e,t)=>{null!==t&&Z(t)},size:"small",sx:{flexShrink:0},children:[(0,n.jsx)(g.Z,{value:"all",children:"All"}),(0,n.jsx)(g.Z,{value:"running",children:"Running"}),(0,n.jsx)(g.Z,{value:"stopped",children:"Stopped"})]}),(0,n.jsx)(f.Z,{size:"small",placeholder:"Search servers...",value:m,onChange:e=>S(e.target.value),InputProps:{startAdornment:(0,n.jsx)(v.Z,{position:"start",children:(0,n.jsx)(y.Z,{})})},sx:{flexGrow:{xs:1,sm:0},minWidth:{sm:300}}})]}),(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:[C.length," ",1===C.length?"server":"servers"]}),0===C.length?(0,n.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",gap:2},children:(0,n.jsx)(u.Z,{variant:"h6",color:"text.secondary",children:"No servers found"})}):(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:C.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(F,{server:e,statusOverride:r[e.name],onClick:o,onStart:l,onStop:c,loading:h.includes(e.name)})},e.name))})]})}var W=r(99770),A=r(62508),N=r(5682),z=r(76678),D=r(7178),_=r(40064),G=r(45547),V=r(4405),q=r(73383),U=r(82285),H=r(13609),J=r(46207),$=r(43436),B=r(87716);let Y=["VANILLA","PAPER","FABRIC","FORGE","NEOFORGE"],K=["","forge","fabric","neoforge","quilt"],Q={name:"",type:"PAPER",version:"1.21.1",memory:"4G",autoStart:!1,sudoPassword:""},X=[{key:"initializing",label:"Initializing"},{key:"creating",label:"Creating"},{key:"configuring",label:"Configuring"},{key:"starting",label:"Starting"}];function ee(e){let t,{open:r,onClose:o,onSubmit:d,loading:h=!1,status:x="idle",progress:m=0,message:p=""}=e,[v,y]=(0,s.useState)("standard"),[S,b]=(0,s.useState)(Q),[Z,C]=(0,s.useState)({}),[k,w]=(0,s.useState)(!1),T=(0,s.useRef)(null),E=(0,s.useRef)(null),R=X.findIndex(e=>e.key===x),I="idle"!==x&&"completed"!==x&&"error"!==x;(0,s.useEffect)(()=>{r||(y("standard"),b(Q),C({}),w(!1))},[r]);let P=e=>e?/^[a-z0-9-]+$/.test(e)?null:"Only lowercase letters, numbers, and hyphens are allowed":"Server name is required",M=e=>e?null:"Modpack slug is required",O=e=>t=>{let r=t.target.value;b(t=>({...t,[e]:r})),"memory"===e&&w(!0),Z[e]&&C(t=>({...t,[e]:""}))};return(0,n.jsx)(W.Z,{open:r,onClose:I?void 0:o,maxWidth:"sm",fullWidth:!0,children:(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),C({});let t=P(S.name);if(t){C({name:t});return}if("modpack"===v){let e=M(S.modpack||"");if(e){C({modpack:e});return}}let r={name:S.name,memory:S.memory,autoStart:S.autoStart,sudoPassword:S.sudoPassword};"standard"===v?(r.type=S.type,r.version=S.version):(r.type="MODRINTH",r.modpack=S.modpack,S.modpackVersion&&(r.modpackVersion=S.modpackVersion),S.modLoader&&(r.modLoader=S.modLoader)),d(r)},children:[(0,n.jsx)(A.Z,{children:"completed"===x?(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(J.Z,{color:"success"}),"Server Created Successfully"]}):"error"===x?(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)($.Z,{color:"error"}),"Creation Failed"]}):"Create New Server"}),(0,n.jsx)(N.Z,{children:I||"completed"===x||"error"===x?(0,n.jsxs)(i.Z,{sx:{py:2},children:[(0,n.jsx)(q.Z,{activeStep:R,alternativeLabel:!0,sx:{mb:3},children:X.map(e=>(0,n.jsx)(U.Z,{children:(0,n.jsx)(H.Z,{children:e.label})},e.key))}),I&&(0,n.jsxs)(i.Z,{sx:{mb:3},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",mb:1},children:[(0,n.jsx)(u.Z,{variant:"body2",color:"text.secondary",children:p}),(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",children:[m,"%"]})]}),(0,n.jsx)(V.Z,{variant:"determinate",value:m})]}),"completed"===x&&(0,n.jsx)(u.Z,{color:"success.main",sx:{textAlign:"center"},children:p}),"error"===x&&(0,n.jsx)(u.Z,{color:"error.main",sx:{textAlign:"center"},children:p})]}):(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[(0,n.jsx)(i.Z,{ref:E,role:"status","aria-live":"polite",sx:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"}}),(0,n.jsx)(f.Z,{label:"Server Name",value:S.name,onChange:O("name"),error:!!Z.name,helperText:Z.name||"Only lowercase letters, numbers, and hyphens",fullWidth:!0,autoFocus:!0,disabled:I}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,n.jsx)(u.Z,{variant:"subtitle2",color:"text.secondary",children:"Server Type"}),(0,n.jsxs)(j.Z,{value:v,exclusive:!0,onChange:(e,t)=>{null!==t&&(y(t),E.current&&(E.current.textContent="".concat("standard"===t?"Standard Server":"Modpack"," category selected")),k||b(e=>({...e,memory:"standard"===t?"4G":"6G"})),setTimeout(()=>{"modpack"===t&&T.current&&T.current.focus()},300))},"aria-label":"Server category",fullWidth:!0,disabled:I,children:[(0,n.jsx)(g.Z,{value:"standard","aria-label":"Standard Server",children:"Standard Server"}),(0,n.jsx)(g.Z,{value:"modpack","aria-label":"Modpack",children:"Modpack"})]}),(0,n.jsx)(B.Z,{in:"standard"===v,unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[(0,n.jsx)(f.Z,{label:"Server Type",select:!0,value:S.type,onChange:O("type"),fullWidth:!0,disabled:I,children:Y.map(e=>(0,n.jsx)(D.Z,{value:e,children:e},e))}),(0,n.jsx)(f.Z,{label:"Minecraft Version",value:S.version,onChange:O("version"),helperText:"e.g., 1.21.1, 1.20.4, latest",fullWidth:!0,disabled:I})]})}),(0,n.jsx)(B.Z,{in:"modpack"===v,unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[(0,n.jsx)(l.Z,{severity:"info",children:"Minecraft version is automatically determined by the modpack"}),(0,n.jsx)(f.Z,{label:"Modpack Slug",value:S.modpack||"",onChange:O("modpack"),error:!!Z.modpack,helperText:Z.modpack||"e.g., cobblemon, adrenaserver (from modrinth.com/modpacks/SLUG)",fullWidth:!0,disabled:I,inputRef:T}),(0,n.jsxs)(f.Z,{label:"Mod Loader",select:!0,value:S.modLoader||"",onChange:O("modLoader"),helperText:"Leave empty to auto-detect from modpack",fullWidth:!0,disabled:I,children:[(0,n.jsx)(D.Z,{value:"",children:"Auto-detect"}),K.filter(e=>e).map(e=>(0,n.jsx)(D.Z,{value:e,children:e},e))]}),(0,n.jsx)(f.Z,{label:"Modpack Version",value:S.modpackVersion||"",onChange:O("modpackVersion"),helperText:"Leave empty for latest",fullWidth:!0,disabled:I})]})})]}),(0,n.jsx)(f.Z,{label:"Memory",value:S.memory,onChange:O("memory"),helperText:"e.g., 4G, 8G, 16G",fullWidth:!0,disabled:I}),(0,n.jsx)(f.Z,{label:"Sudo Password",type:"password",value:S.sudoPassword||"",onChange:O("sudoPassword"),helperText:"Required for mDNS hostname registration (avahi)",fullWidth:!0,disabled:I}),(0,n.jsx)(_.Z,{control:(0,n.jsx)(G.Z,{checked:S.autoStart||!1,onChange:(t="autoStart",e=>{b(r=>({...r,[t]:e.target.checked}))}),disabled:I}),label:"Auto-start after creation"})]})}),(0,n.jsx)(z.Z,{sx:{px:3,pb:2},children:"completed"===x||"error"===x?(0,n.jsx)(a.Z,{onClick:o,variant:"contained",fullWidth:!0,children:"Close"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{onClick:o,disabled:I,children:"Cancel"}),(0,n.jsx)(a.Z,{type:"submit",variant:"contained",disabled:I,startIcon:I?(0,n.jsx)(c.Z,{size:16}):null,children:I?"Creating...":"Create"})]})})]})})}var et=r(92666),er=r(59104);function en(){var e,t;let r=(0,o.x)(),[p,f]=(0,s.useState)(!1),[v,g]=(0,s.useState)([]),{data:j,isLoading:y,error:S}=(0,et.x$)(),{statusMap:b}=(0,er.d)(),Z=(0,et.jM)(),C=(0,et.Aw)(),k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onSuccess:t,onError:r,onProgress:n}=e,[o,i]=(0,s.useState)("idle"),[a,l]=(0,s.useState)(0),[c,d]=(0,s.useState)(""),[u,h]=(0,s.useState)(null),x=(0,s.useRef)(null),m=(0,s.useRef)(""),p=(0,s.useCallback)(()=>{i("idle"),l(0),d(""),h(null),x.current&&(x.current.close(),x.current=null)},[]),f=(0,s.useCallback)((e,t,r)=>{i(e),d(t),l(r),null==n||n(e,t,r)},[n]),v=(0,s.useCallback)(async e=>{if("idle"===o||"completed"===o||"error"===o){h(null),f("initializing","Initializing server creation...",0),m.current=e.name,x.current&&x.current.close();try{let r=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.text();throw Error(e||"Server creation failed: ".concat(r.statusText))}await r.json(),f("creating","Creating server configuration...",25),await new Promise(e=>setTimeout(e,500)),f("configuring","Configuring Docker compose...",50),await new Promise(e=>setTimeout(e,500)),f("starting","Starting server container...",75),await new Promise(e=>setTimeout(e,500)),f("completed","Server created successfully!",100),null==t||t(e.name)}catch(t){let e=t instanceof Error?t.message:"Unknown error occurred";i("error"),h(e),d("Server creation failed"),null==r||r(e)}}},[o,f,t,r]);return(0,s.useEffect)(()=>()=>{x.current&&(x.current.close(),x.current=null)},[]),{status:o,progress:a,message:c,error:u,isCreating:"idle"!==o&&"completed"!==o&&"error"!==o,createServer:v,reset:p}}({onSuccess:()=>{f(!1)},onError:e=>{console.error("Failed to create server:",e)}}),w=async e=>{g(t=>[...t,e]);try{await Z.mutateAsync(e)}catch(e){console.error("Failed to start server:",e)}finally{g(t=>t.filter(t=>t!==e))}},T=async e=>{g(t=>[...t,e]);try{await C.mutateAsync(e)}catch(e){console.error("Failed to stop server:",e)}finally{g(t=>t.filter(t=>t!==e))}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.info.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,n.jsx)(m.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(u.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Servers"}),(0,n.jsx)(u.Z,{variant:"body1",color:"text.secondary",children:"Manage your Minecraft servers"})]})]}),(0,n.jsx)(a.Z,{variant:"contained",startIcon:(0,n.jsx)(x.Z,{}),onClick:()=>f(!0),size:"large",children:"Create Server"})]}),S&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load servers: ",S.message]}),k.error&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to create server: ",k.error]}),Z.isError&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to start server: ",null===(e=Z.error)||void 0===e?void 0:e.message]}),C.isError&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to stop server: ",null===(t=C.error)||void 0===t?void 0:t.message]}),y?(0,n.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,n.jsx)(c.Z,{})}):(0,n.jsx)(L,{servers:(null==j?void 0:j.servers)||[],statusMap:b,onServerClick:e=>{r.push("/servers/".concat(encodeURIComponent(e)))},onStart:w,onStop:T,onCreate:()=>f(!0),loadingServers:v}),(0,n.jsx)(ee,{open:p,onClose:()=>{f(!1),k.reset()},onSubmit:e=>{k.createServer(e)},loading:k.isCreating,status:k.status,progress:k.progress,message:k.message})]})}},3454:function(e,t,r){"use strict";r.d(t,{LoadingProvider:function(){return l},startLoading:function(){return c},stopLoading:function(){return d}});var n=r(94655),s=r(35106),o=r(74228),i=r(31477),a=r.n(i);function l(e){let{children:t}=e,r=(0,o.usePathname)(),i=(0,o.useSearchParams)();return(0,s.useEffect)(()=>{a().done()},[r,i]),(0,n.jsx)(n.Fragment,{children:t})}function c(){a().start()}function d(){a().done()}a().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,t,r){"use strict";r.d(t,{Av:function(){return n.startLoading}});var n=r(3454)},31358:function(e,t,r){"use strict";r.d(t,{x:function(){return i}});var n=r(74228),s=r(35106),o=r(8690);function i(){let e=(0,n.useRouter)(),t=(0,s.useCallback)((t,r)=>{(0,o.Av)(),e.push(t,r)},[e]),r=(0,s.useCallback)((t,r)=>{(0,o.Av)(),e.replace(t,r)},[e]);return(0,s.useMemo)(()=>({...e,push:t,replace:r}),[e,t,r])}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});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 o(e){let{url:t,onMessage:r,onError:o,reconnectInterval:i=3e3,maxReconnectAttempts:a=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[h,x]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[f,v]=(0,n.useState)(0),g=(0,n.useRef)(null),j=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),y=(0,n.useCallback)(e=>{x(e),"connected"===e&&v(0)},[]),S=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&v(e.retryCount),null==o||o(e)},[o]),b=(0,n.useCallback)(()=>{g.current&&(g.current.reconnect(),v(g.current.getRetryCount()))},[]),Z=(0,n.useCallback)(()=>{g.current&&g.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){g.current&&(g.current.disconnect(),g.current=null);return}return g.current||(g.current=new s),g.current.connect({url:t,onMessage:j,onStateChange:y,onError:S,reconnectInterval:i,maxReconnectAttempts:a,withCredentials:c}),()=>{g.current&&(g.current.disconnect(),g.current=null)}},[t,l,i,a,c,j,y,S]),{data:d,isConnected:"connected"===h,state:h,error:m,retryCount:f,reconnect:b,disconnect:Z}}},59104:function(e,t,r){"use strict";r.d(t,{d:function(){return o}});var n=r(35106),s=r(93757);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onStatusChange:t,enabled:r=!0,reconnectInterval:o=3e3}=e,[i,a]=(0,n.useState)({}),l=(0,n.useCallback)(e=>{if("server-status"===e.type){let{serverName:r,status:n,health:s,timestamp:o}=e.data;a(e=>({...e,[r]:{status:n,health:s,timestamp:o}})),null==t||t(r,n,s)}},[t]),{isConnected:c,reconnect:d,retryCount:u}=(0,s.D)({url:"/api/sse/servers-status",onMessage:l,enabled:r,reconnectInterval:o}),h=(0,n.useCallback)(e=>i[e]||null,[i]);return(0,n.useEffect)(()=>{r||a({})},[r]),{statusMap:i,getServerStatus:h,isConnected:c,reconnect:d,retryCount:u}}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,5511,880,1658,6909,6727,190,5386,2666,3669,2757,1744],function(){return e(e.s=49726)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[224],{49726:function(e,t,r){Promise.resolve().then(r.bind(r,7854))},7854:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return en}});var n=r(94655),s=r(35106),o=r(31358),i=r(7281),a=r(30417),l=r(81071),c=r(93017),d=r(69899),u=r(31317),h=r(76492),x=r(32366),m=r(78067),p=r(84840),f=r(97436),v=r(52082),g=r(89923),j=r(10297),y=r(42431),S=r(628),b=r(41565),Z=r(25935),C=r(79983),k=r(25333),w=r(95511),T=r(5501),E=r(93315),R=r(27171),I=r(96292);let P=e=>{switch(e){case"running":return"success";case"stopped":case"exited":case"not_created":return"error";case"created":return"warning";default:return"default"}},M=e=>{switch(e){case"running":return"Running";case"stopped":case"exited":return"Stopped";case"not_created":return"Not Created";case"created":return"Created";default:return e||"Unknown"}},O=e=>{if(!e)return"-";let t=e.split(",").map(e=>e.trim());return t.find(e=>e.endsWith(".local"))||t[0]||"-"};function F(e){var t;let{server:r,statusOverride:s,onClick:o,onStart:a,onStop:l,loading:c=!1}=e,d=(null==s?void 0:s.status)||r.status,h=(e,t)=>{e.stopPropagation(),t(r.name)},x="running"===d,m="stopped"===d||"exited"===d||"not_created"===d,p=O(r.hostname),f=(null===(t=r.hostname)||void 0===t?void 0:t.split(",").map(e=>e.trim()))||[];return(0,n.jsxs)(S.Z,{role:"article",onClick:()=>{o&&o(r.name)},sx:{cursor:o?"pointer":"default",transition:"all 0.2s",height:180,display:"flex",flexDirection:"column","&:hover":o?{transform:"translateY(-2px)",boxShadow:4}:{}},children:[(0,n.jsxs)(b.Z,{sx:{flex:1,pb:1},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,n.jsx)(u.Z,{variant:"h6",component:"h3",sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,mr:1},children:r.name}),(0,n.jsx)(k.Z,{label:M(d),size:"small",color:P(d),sx:{fontWeight:500,minWidth:70}})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(I.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,n.jsx)(w.Z,{title:f.length>1?f.join("\n"):"",arrow:!0,children:(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p,f.length>1&&" (+".concat(f.length-1,")")]})})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(R.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,n.jsx)(u.Z,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.container})]})]}),(0,n.jsxs)(Z.Z,{sx:{justifyContent:"flex-end",px:2,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:[m&&a&&(0,n.jsx)(C.Z,{"aria-label":"Start server",color:"success",onClick:e=>h(e,a),disabled:c,size:"small",children:(0,n.jsx)(T.Z,{})}),x&&l&&(0,n.jsx)(C.Z,{"aria-label":"Stop server",color:"error",onClick:e=>h(e,l),disabled:c,size:"small",children:(0,n.jsx)(E.Z,{})}),!m&&!x&&(0,n.jsx)(i.Z,{sx:{height:34}})]})]})}function L(e){let{servers:t,statusMap:r={},onServerClick:o,onStart:l,onStop:c,onCreate:d,loadingServers:h=[]}=e,[m,S]=(0,s.useState)(""),[b,Z]=(0,s.useState)("all"),C=(0,s.useMemo)(()=>t.filter(e=>{if(m&&!e.name.toLowerCase().includes(m.toLowerCase()))return!1;let t=r[e.name],n=(null==t?void 0:t.status)||e.status;return("running"!==b||"running"===n)&&("stopped"!==b||"stopped"===n||"exited"===n||"not_created"===n)}),[t,r,m,b]);return 0===t.length?(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",gap:2},children:[(0,n.jsx)(u.Z,{variant:"h6",color:"text.secondary",children:"No servers found"}),d&&(0,n.jsx)(a.Z,{variant:"contained",startIcon:(0,n.jsx)(x.Z,{}),onClick:d,children:"Create Server"})]}):(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,mb:3,alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between"},children:[(0,n.jsxs)(j.Z,{value:b,exclusive:!0,onChange:(e,t)=>{null!==t&&Z(t)},size:"small",sx:{flexShrink:0},children:[(0,n.jsx)(g.Z,{value:"all",children:"All"}),(0,n.jsx)(g.Z,{value:"running",children:"Running"}),(0,n.jsx)(g.Z,{value:"stopped",children:"Stopped"})]}),(0,n.jsx)(f.Z,{size:"small",placeholder:"Search servers...",value:m,onChange:e=>S(e.target.value),InputProps:{startAdornment:(0,n.jsx)(v.Z,{position:"start",children:(0,n.jsx)(y.Z,{})})},sx:{flexGrow:{xs:1,sm:0},minWidth:{sm:300}}})]}),(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:[C.length," ",1===C.length?"server":"servers"]}),0===C.length?(0,n.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",gap:2},children:(0,n.jsx)(u.Z,{variant:"h6",color:"text.secondary",children:"No servers found"})}):(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:C.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(F,{server:e,statusOverride:r[e.name],onClick:o,onStart:l,onStop:c,loading:h.includes(e.name)})},e.name))})]})}var W=r(99770),A=r(62508),N=r(5682),z=r(76678),D=r(7178),_=r(40064),G=r(45547),V=r(4405),q=r(73383),U=r(82285),H=r(13609),J=r(46207),$=r(43436),B=r(87716);let Y=["VANILLA","PAPER","FABRIC","FORGE","NEOFORGE"],K=["","forge","fabric","neoforge","quilt"],Q={name:"",type:"PAPER",version:"1.21.1",memory:"4G",autoStart:!1,sudoPassword:""},X=[{key:"initializing",label:"Initializing"},{key:"creating",label:"Creating"},{key:"configuring",label:"Configuring"},{key:"starting",label:"Starting"}];function ee(e){let t,{open:r,onClose:o,onSubmit:d,loading:h=!1,status:x="idle",progress:m=0,message:p=""}=e,[v,y]=(0,s.useState)("standard"),[S,b]=(0,s.useState)(Q),[Z,C]=(0,s.useState)({}),[k,w]=(0,s.useState)(!1),T=(0,s.useRef)(null),E=(0,s.useRef)(null),R=X.findIndex(e=>e.key===x),I="idle"!==x&&"completed"!==x&&"error"!==x;(0,s.useEffect)(()=>{r||(y("standard"),b(Q),C({}),w(!1))},[r]);let P=e=>e?/^[a-z0-9-]+$/.test(e)?null:"Only lowercase letters, numbers, and hyphens are allowed":"Server name is required",M=e=>e?null:"Modpack slug is required",O=e=>t=>{let r=t.target.value;b(t=>({...t,[e]:r})),"memory"===e&&w(!0),Z[e]&&C(t=>({...t,[e]:""}))};return(0,n.jsx)(W.Z,{open:r,onClose:I?void 0:o,maxWidth:"sm",fullWidth:!0,children:(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),C({});let t=P(S.name);if(t){C({name:t});return}if("modpack"===v){let e=M(S.modpack||"");if(e){C({modpack:e});return}}let r={name:S.name,memory:S.memory,autoStart:S.autoStart,sudoPassword:S.sudoPassword};"standard"===v?(r.type=S.type,r.version=S.version):(r.type="MODRINTH",r.modpack=S.modpack,S.modpackVersion&&(r.modpackVersion=S.modpackVersion),S.modLoader&&(r.modLoader=S.modLoader)),d(r)},children:[(0,n.jsx)(A.Z,{children:"completed"===x?(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(J.Z,{color:"success"}),"Server Created Successfully"]}):"error"===x?(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)($.Z,{color:"error"}),"Creation Failed"]}):"Create New Server"}),(0,n.jsx)(N.Z,{children:I||"completed"===x||"error"===x?(0,n.jsxs)(i.Z,{sx:{py:2},children:[(0,n.jsx)(q.Z,{activeStep:R,alternativeLabel:!0,sx:{mb:3},children:X.map(e=>(0,n.jsx)(U.Z,{children:(0,n.jsx)(H.Z,{children:e.label})},e.key))}),I&&(0,n.jsxs)(i.Z,{sx:{mb:3},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",mb:1},children:[(0,n.jsx)(u.Z,{variant:"body2",color:"text.secondary",children:p}),(0,n.jsxs)(u.Z,{variant:"body2",color:"text.secondary",children:[m,"%"]})]}),(0,n.jsx)(V.Z,{variant:"determinate",value:m})]}),"completed"===x&&(0,n.jsx)(u.Z,{color:"success.main",sx:{textAlign:"center"},children:p}),"error"===x&&(0,n.jsx)(u.Z,{color:"error.main",sx:{textAlign:"center"},children:p})]}):(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[(0,n.jsx)(i.Z,{ref:E,role:"status","aria-live":"polite",sx:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"}}),(0,n.jsx)(f.Z,{label:"Server Name",value:S.name,onChange:O("name"),error:!!Z.name,helperText:Z.name||"Only lowercase letters, numbers, and hyphens",fullWidth:!0,autoFocus:!0,disabled:I}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,n.jsx)(u.Z,{variant:"subtitle2",color:"text.secondary",children:"Server Type"}),(0,n.jsxs)(j.Z,{value:v,exclusive:!0,onChange:(e,t)=>{null!==t&&(y(t),E.current&&(E.current.textContent="".concat("standard"===t?"Standard Server":"Modpack"," category selected")),k||b(e=>({...e,memory:"standard"===t?"4G":"6G"})),setTimeout(()=>{"modpack"===t&&T.current&&T.current.focus()},300))},"aria-label":"Server category",fullWidth:!0,disabled:I,children:[(0,n.jsx)(g.Z,{value:"standard","aria-label":"Standard Server",children:"Standard Server"}),(0,n.jsx)(g.Z,{value:"modpack","aria-label":"Modpack",children:"Modpack"})]}),(0,n.jsx)(B.Z,{in:"standard"===v,unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[(0,n.jsx)(f.Z,{label:"Server Type",select:!0,value:S.type,onChange:O("type"),fullWidth:!0,disabled:I,children:Y.map(e=>(0,n.jsx)(D.Z,{value:e,children:e},e))}),(0,n.jsx)(f.Z,{label:"Minecraft Version",value:S.version,onChange:O("version"),helperText:"e.g., 1.21.1, 1.20.4, latest",fullWidth:!0,disabled:I})]})}),(0,n.jsx)(B.Z,{in:"modpack"===v,unmountOnExit:!0,children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[(0,n.jsx)(l.Z,{severity:"info",children:"Minecraft version is automatically determined by the modpack"}),(0,n.jsx)(f.Z,{label:"Modpack Slug",value:S.modpack||"",onChange:O("modpack"),error:!!Z.modpack,helperText:Z.modpack||"e.g., cobblemon, adrenaserver (from modrinth.com/modpacks/SLUG)",fullWidth:!0,disabled:I,inputRef:T}),(0,n.jsxs)(f.Z,{label:"Mod Loader",select:!0,value:S.modLoader||"",onChange:O("modLoader"),helperText:"Leave empty to auto-detect from modpack",fullWidth:!0,disabled:I,children:[(0,n.jsx)(D.Z,{value:"",children:"Auto-detect"}),K.filter(e=>e).map(e=>(0,n.jsx)(D.Z,{value:e,children:e},e))]}),(0,n.jsx)(f.Z,{label:"Modpack Version",value:S.modpackVersion||"",onChange:O("modpackVersion"),helperText:"Leave empty for latest",fullWidth:!0,disabled:I})]})})]}),(0,n.jsx)(f.Z,{label:"Memory",value:S.memory,onChange:O("memory"),helperText:"e.g., 4G, 8G, 16G",fullWidth:!0,disabled:I}),(0,n.jsx)(f.Z,{label:"Sudo Password",type:"password",value:S.sudoPassword||"",onChange:O("sudoPassword"),helperText:"Required for mDNS hostname registration (avahi)",fullWidth:!0,disabled:I}),(0,n.jsx)(_.Z,{control:(0,n.jsx)(G.Z,{checked:S.autoStart||!1,onChange:(t="autoStart",e=>{b(r=>({...r,[t]:e.target.checked}))}),disabled:I}),label:"Auto-start after creation"})]})}),(0,n.jsx)(z.Z,{sx:{px:3,pb:2},children:"completed"===x||"error"===x?(0,n.jsx)(a.Z,{onClick:o,variant:"contained",fullWidth:!0,children:"Close"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{onClick:o,disabled:I,children:"Cancel"}),(0,n.jsx)(a.Z,{type:"submit",variant:"contained",disabled:I,startIcon:I?(0,n.jsx)(c.Z,{size:16}):null,children:I?"Creating...":"Create"})]})})]})})}var et=r(92666),er=r(59104);function en(){var e,t;let r=(0,o.x)(),[p,f]=(0,s.useState)(!1),[v,g]=(0,s.useState)([]),{data:j,isLoading:y,error:S}=(0,et.x$)(),{statusMap:b}=(0,er.d)(),Z=(0,et.jM)(),C=(0,et.Aw)(),k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onSuccess:t,onError:r,onProgress:n}=e,[o,i]=(0,s.useState)("idle"),[a,l]=(0,s.useState)(0),[c,d]=(0,s.useState)(""),[u,h]=(0,s.useState)(null),x=(0,s.useRef)(null),m=(0,s.useRef)(""),p=(0,s.useCallback)(()=>{i("idle"),l(0),d(""),h(null),x.current&&(x.current.close(),x.current=null)},[]),f=(0,s.useCallback)((e,t,r)=>{i(e),d(t),l(r),null==n||n(e,t,r)},[n]),v=(0,s.useCallback)(async e=>{if("idle"===o||"completed"===o||"error"===o){h(null),f("initializing","Initializing server creation...",0),m.current=e.name,x.current&&x.current.close();try{let r=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.text();throw Error(e||"Server creation failed: ".concat(r.statusText))}await r.json(),f("creating","Creating server configuration...",25),await new Promise(e=>setTimeout(e,500)),f("configuring","Configuring Docker compose...",50),await new Promise(e=>setTimeout(e,500)),f("starting","Starting server container...",75),await new Promise(e=>setTimeout(e,500)),f("completed","Server created successfully!",100),null==t||t(e.name)}catch(t){let e=t instanceof Error?t.message:"Unknown error occurred";i("error"),h(e),d("Server creation failed"),null==r||r(e)}}},[o,f,t,r]);return(0,s.useEffect)(()=>()=>{x.current&&(x.current.close(),x.current=null)},[]),{status:o,progress:a,message:c,error:u,isCreating:"idle"!==o&&"completed"!==o&&"error"!==o,createServer:v,reset:p}}({onSuccess:()=>{f(!1)},onError:e=>{console.error("Failed to create server:",e)}}),w=async e=>{g(t=>[...t,e]);try{await Z.mutateAsync(e)}catch(e){console.error("Failed to start server:",e)}finally{g(t=>t.filter(t=>t!==e))}},T=async e=>{g(t=>[...t,e]);try{await C.mutateAsync(e)}catch(e){console.error("Failed to stop server:",e)}finally{g(t=>t.filter(t=>t!==e))}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.info.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,n.jsx)(m.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(u.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Servers"}),(0,n.jsx)(u.Z,{variant:"body1",color:"text.secondary",children:"Manage your Minecraft servers"})]})]}),(0,n.jsx)(a.Z,{variant:"contained",startIcon:(0,n.jsx)(x.Z,{}),onClick:()=>f(!0),size:"large",children:"Create Server"})]}),S&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load servers: ",S.message]}),k.error&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to create server: ",k.error]}),Z.isError&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to start server: ",null===(e=Z.error)||void 0===e?void 0:e.message]}),C.isError&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to stop server: ",null===(t=C.error)||void 0===t?void 0:t.message]}),y?(0,n.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,n.jsx)(c.Z,{})}):(0,n.jsx)(L,{servers:(null==j?void 0:j.servers)||[],statusMap:b,onServerClick:e=>{r.push("/servers/".concat(encodeURIComponent(e)))},onStart:w,onStop:T,onCreate:()=>f(!0),loadingServers:v}),(0,n.jsx)(ee,{open:p,onClose:()=>{f(!1),k.reset()},onSubmit:e=>{k.createServer(e)},loading:k.isCreating,status:k.status,progress:k.progress,message:k.message})]})}},3454:function(e,t,r){"use strict";r.d(t,{LoadingProvider:function(){return l},startLoading:function(){return c},stopLoading:function(){return d}});var n=r(94655),s=r(35106),o=r(74228),i=r(31477),a=r.n(i);function l(e){let{children:t}=e,r=(0,o.usePathname)(),i=(0,o.useSearchParams)();return(0,s.useEffect)(()=>{a().done()},[r,i]),(0,n.jsx)(n.Fragment,{children:t})}function c(){a().start()}function d(){a().done()}a().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,t,r){"use strict";r.d(t,{Av:function(){return n.startLoading}});var n=r(3454)},31358:function(e,t,r){"use strict";r.d(t,{x:function(){return i}});var n=r(74228),s=r(35106),o=r(8690);function i(){let e=(0,n.useRouter)(),t=(0,s.useCallback)((t,r)=>{(0,o.Av)(),e.push(t,r)},[e]),r=(0,s.useCallback)((t,r)=>{(0,o.Av)(),e.replace(t,r)},[e]);return(0,s.useMemo)(()=>({...e,push:t,replace:r}),[e,t,r])}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});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 o(e){let{url:t,onMessage:r,onError:o,reconnectInterval:i=3e3,maxReconnectAttempts:a=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[h,x]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[f,v]=(0,n.useState)(0),g=(0,n.useRef)(null),j=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),y=(0,n.useCallback)(e=>{x(e),"connected"===e&&v(0)},[]),S=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&v(e.retryCount),null==o||o(e)},[o]),b=(0,n.useCallback)(()=>{g.current&&(g.current.reconnect(),v(g.current.getRetryCount()))},[]),Z=(0,n.useCallback)(()=>{g.current&&g.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){g.current&&(g.current.disconnect(),g.current=null);return}return g.current||(g.current=new s),g.current.connect({url:t,onMessage:j,onStateChange:y,onError:S,reconnectInterval:i,maxReconnectAttempts:a,withCredentials:c}),()=>{g.current&&(g.current.disconnect(),g.current=null)}},[t,l,i,a,c,j,y,S]),{data:d,isConnected:"connected"===h,state:h,error:m,retryCount:f,reconnect:b,disconnect:Z}}},59104:function(e,t,r){"use strict";r.d(t,{d:function(){return o}});var n=r(35106),s=r(93757);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onStatusChange:t,enabled:r=!0,reconnectInterval:o=3e3}=e,[i,a]=(0,n.useState)({}),l=(0,n.useCallback)(e=>{if("server-status"===e.type){let{serverName:r,status:n,health:s,timestamp:o}=e.data;a(e=>({...e,[r]:{status:n,health:s,timestamp:o}})),null==t||t(r,n,s)}},[t]),{isConnected:c,reconnect:d,retryCount:u}=(0,s.D)({url:"/api/sse/servers-status",onMessage:l,enabled:r,reconnectInterval:o}),h=(0,n.useCallback)(e=>i[e]||null,[i]);return(0,n.useEffect)(()=>{r||a({})},[r]),{statusMap:i,getServerStatus:h,isConnected:c,reconnect:d,retryCount:u}}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,5511,880,1658,3945,6909,6727,8468,2666,3669,2757,1744],function(){return e(e.s=49726)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4978],{70861:function(e,t,n){Promise.resolve().then(n.bind(n,32539))},76544:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)([(0,s.jsx)("path",{d:"m7.3 14.7 1.2-1.2c-1-1-1.5-2.3-1.5-3.5 0-1.3.5-2.6 1.5-3.5L7.3 5.3c-1.3 1.3-2 3-2 4.7s.7 3.4 2 4.7M19.1 2.9l-1.2 1.2c1.6 1.6 2.4 3.8 2.4 5.9 0 2.1-.8 4.3-2.4 5.9l1.2 1.2c2-2 2.9-4.5 2.9-7.1 0-2.6-1-5.1-2.9-7.1"},"0"),(0,s.jsx)("path",{d:"M6.1 4.1 4.9 2.9C3 4.9 2 7.4 2 10c0 2.6 1 5.1 2.9 7.1l1.2-1.2c-1.6-1.6-2.4-3.8-2.4-5.9 0-2.1.8-4.3 2.4-5.9m10.6 10.6c1.3-1.3 2-3 2-4.7-.1-1.7-.7-3.4-2-4.7l-1.2 1.2c1 1 1.5 2.3 1.5 3.5 0 1.3-.5 2.6-1.5 3.5zM14.5 10c0-1.38-1.12-2.5-2.5-2.5S9.5 8.62 9.5 10c0 .76.34 1.42.87 1.88L7 22h2l.67-2h4.67l.66 2h2l-3.37-10.12c.53-.46.87-1.12.87-1.88m-4.17 8L12 13l1.67 5z"},"1")],"CellTower")},23695:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},21605:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9m20 2 2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75m-4 4 2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97M5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88"}),"NetworkCheck")},9078:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},29983:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)((0,s.jsx)("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router")},93315:function(e,t,n){"use strict";var r=n(8091);t.Z=void 0;var i=r(n(66758)),s=n(94655);t.Z=(0,i.default)((0,s.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop")},52082:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r,i=n(32324),s=n(81500),o=n(35106),a=n(70316),c=n(65951),l=n(38762),d=n(31317),u=n(14406),h=n(85016),v=n(34519),p=n(11379),m=n(9049);function f(e){return(0,m.ZP)("MuiInputAdornment",e)}let Z=(0,p.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var x=n(28057),j=n(94655);let g=["children","className","component","disablePointerEvents","disableTypography","position","variant"],b=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:s,variant:o}=e,a={root:["root",n&&"disablePointerEvents",i&&"position".concat((0,l.Z)(i)),o,r&&"hiddenLabel",s&&"size".concat((0,l.Z)(s))]};return(0,c.Z)(a,f,t)},z=(0,v.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t["position".concat((0,l.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,s.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(Z.positionStart,"&:not(.").concat(Z.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})});var E=o.forwardRef(function(e,t){let n=(0,x.i)({props:e,name:"MuiInputAdornment"}),{children:c,className:l,component:v="div",disablePointerEvents:p=!1,disableTypography:m=!1,position:f,variant:Z}=n,E=(0,i.Z)(n,g),M=(0,h.Z)()||{},y=Z;Z&&M.variant,M&&!y&&(y=M.variant);let w=(0,s.Z)({},n,{hiddenLabel:M.hiddenLabel,size:M.size,disablePointerEvents:p,position:f,variant:y}),C=b(w);return(0,j.jsx)(u.Z.Provider,{value:null,children:(0,j.jsx)(z,(0,s.Z)({as:v,ownerState:w,className:(0,a.Z)(C.root,l),ref:t},E,{children:"string"!=typeof c||m?(0,j.jsxs)(o.Fragment,{children:["start"===f?r||(r=(0,j.jsx)("span",{className:"notranslate",children:"​"})):null,c]}):(0,j.jsx)(d.Z,{color:"text.secondary",children:c})}))})})},32539:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var r=n(94655),i=n(35106),s=n(7281),o=n(84840),a=n(31317),c=n(37530),l=n(81071),d=n(87739),u=n(57965);function h(){let[e,t]=(0,i.useState)({open:!1,message:"",severity:"success"}),n=e=>{t({open:!0,message:e,severity:"success"})},h=e=>{t({open:!0,message:e,severity:"error"})},v=()=>{t(e=>({...e,open:!1}))};return(0,r.jsxs)(s.Z,{children:[(0,r.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:1.5,mb:4},children:[(0,r.jsx)(d.Z,{sx:{fontSize:32},color:"primary"}),(0,r.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Settings"})]}),(0,r.jsxs)(o.ZP,{container:!0,spacing:3,children:[(0,r.jsx)(o.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(u.zd,{onSuccess:n,onError:h})}),(0,r.jsx)(o.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(u.eE,{})}),(0,r.jsx)(o.ZP,{item:!0,xs:12,children:(0,r.jsx)(u.ms,{onSuccess:n,onError:h})})]}),(0,r.jsx)(c.Z,{open:e.open,autoHideDuration:6e3,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:(0,r.jsx)(l.Z,{onClose:v,severity:e.severity,variant:"filled",sx:{width:"100%"},children:e.message})})]})}},42936:function(e,t,n){"use strict";async function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={...t.headers};t.body&&(n["Content-Type"]="application/json");let r=await fetch(e,{...t,headers:n});if(!r.ok){let e=await r.json().catch(()=>({error:"UnknownError",message:r.statusText})),t=Error(e.message);throw t.statusCode=r.status,t.code=e.error,t}return r.json()}n.d(t,{SC:function(){return r}})}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,5511,2542,2844,3945,5381,2535,7965,3669,2757,1744],function(){return e(e.s=70861)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7701],{6199:function(e,s,n){Promise.resolve().then(n.bind(n,36405))},36405:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return M}});var l=n(94655),r=n(35106),t=n(7281),i=n(30417),a=n(81071),o=n(93017),d=n(69899),c=n(31317),x=n(99770),h=n(62508),u=n(5682),m=n(76678),j=n(97436),Z=n(76492),g=n(32366),p=n(84974),f=n(84840),v=n(52082),y=n(89923),b=n(10297),w=n(42431),C=n(628),S=n(41565),k=n(25935),W=n(79983),z=n(25333),D=n(95511),I=n(96292),A=n(97812),F=n(21111),L=n(78067),P=n(33104);function E(e){let{world:s,onAssign:n,onRelease:r,onDelete:i,loading:a=!1}=e,o=(e,n)=>{e.stopPropagation(),n(s.name)};return(0,l.jsxs)(C.Z,{role:"article",sx:{transition:"all 0.2s",height:200,display:"flex",flexDirection:"column","&:hover":{transform:"translateY(-2px)",boxShadow:4}},children:[(0,l.jsxs)(S.Z,{sx:{flex:1,pb:1},children:[(0,l.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,l.jsx)(c.Z,{variant:"h6",component:"h3",sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,mr:1},children:s.name}),(0,l.jsx)(z.Z,{label:s.isLocked?"Locked":"Available",size:"small",color:s.isLocked?"warning":"success",sx:{fontWeight:500,minWidth:80}})]}),(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,l.jsx)(L.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,l.jsx)(c.Z,{variant:"body2",color:"text.secondary",children:s.size||"Unknown size"})]}),s.isLocked&&s.lockedBy&&(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,l.jsx)(I.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,l.jsx)(D.Z,{title:"Assigned to ".concat(s.lockedBy),arrow:!0,children:(0,l.jsx)(c.Z,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.lockedBy})})]}),(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(P.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,l.jsx)(c.Z,{variant:"body2",color:"text.secondary",children:(e=>{if(!e)return"-";try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(s){return e}})(s.lastModified)})]})]}),(0,l.jsxs)(k.Z,{sx:{justifyContent:"flex-end",px:2,py:1.5,borderTop:"1px solid",borderColor:"divider"},children:[!s.isLocked&&n&&(0,l.jsx)(D.Z,{title:"Assign to server",arrow:!0,children:(0,l.jsx)(W.Z,{"aria-label":"Assign world",color:"primary",onClick:e=>o(e,n),disabled:a,size:"small",children:(0,l.jsx)(I.Z,{})})}),s.isLocked&&r&&(0,l.jsx)(D.Z,{title:"Release from server",arrow:!0,children:(0,l.jsx)(W.Z,{"aria-label":"Release world",color:"warning",onClick:e=>o(e,r),disabled:a,size:"small",children:(0,l.jsx)(A.Z,{})})}),i&&(0,l.jsx)(D.Z,{title:"Delete world",arrow:!0,children:(0,l.jsx)(W.Z,{"aria-label":"Delete world",color:"error",onClick:e=>o(e,i),disabled:a,size:"small",children:(0,l.jsx)(F.Z,{})})})]})]})}function N(e){let{worlds:s,onAssign:n,onRelease:a,onDelete:o,onCreate:d,loadingWorlds:x=[]}=e,[h,u]=(0,r.useState)(""),[m,Z]=(0,r.useState)("all"),p=(0,r.useMemo)(()=>s.filter(e=>(!h||!!e.name.toLowerCase().includes(h.toLowerCase()))&&("available"!==m||!e.isLocked)&&("locked"!==m||!!e.isLocked)),[s,h,m]);return 0===s.length?(0,l.jsxs)(t.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",gap:2},children:[(0,l.jsx)(c.Z,{variant:"h6",color:"text.secondary",children:"No worlds found"}),d&&(0,l.jsx)(i.Z,{variant:"contained",startIcon:(0,l.jsx)(g.Z,{}),onClick:d,children:"Create World"})]}):(0,l.jsxs)(t.Z,{children:[(0,l.jsxs)(t.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:2,mb:3,alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between"},children:[(0,l.jsxs)(b.Z,{value:m,exclusive:!0,onChange:(e,s)=>{null!==s&&Z(s)},size:"small",sx:{flexShrink:0},children:[(0,l.jsx)(y.Z,{value:"all",children:"All"}),(0,l.jsx)(y.Z,{value:"available",children:"Available"}),(0,l.jsx)(y.Z,{value:"locked",children:"Locked"})]}),(0,l.jsx)(j.Z,{size:"small",placeholder:"Search worlds...",value:h,onChange:e=>u(e.target.value),InputProps:{startAdornment:(0,l.jsx)(v.Z,{position:"start",children:(0,l.jsx)(w.Z,{})})},sx:{flexGrow:{xs:1,sm:0},minWidth:{sm:300}}})]}),(0,l.jsxs)(c.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:[p.length," ",1===p.length?"world":"worlds"]}),0===p.length?(0,l.jsx)(t.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",gap:2},children:(0,l.jsx)(c.Z,{variant:"h6",color:"text.secondary",children:"No worlds found"})}):(0,l.jsx)(f.ZP,{container:!0,spacing:2,children:p.map(e=>(0,l.jsx)(f.ZP,{item:!0,xs:12,sm:6,md:4,children:(0,l.jsx)(E,{world:e,onAssign:n,onRelease:a,onDelete:o,loading:x.includes(e.name)})},e.name))})]})}let R={name:"",seed:""};function T(e){let{open:s,onClose:n,onSubmit:a,loading:d=!1}=e,[c,Z]=(0,r.useState)(R),[g,p]=(0,r.useState)({});(0,r.useEffect)(()=>{s||(Z(R),p({}))},[s]);let f=e=>e?/^[a-z0-9-]+$/.test(e)?null:"Only lowercase letters, numbers, and hyphens are allowed":"World name is required",v=e=>s=>{let n=s.target.value;Z(s=>({...s,[e]:n})),g[e]&&p(s=>({...s,[e]:""}))};return(0,l.jsx)(x.Z,{open:s,onClose:d?void 0:n,maxWidth:"sm",fullWidth:!0,children:(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p({});let s=f(c.name);if(s){p({name:s});return}a({name:c.name,...c.seed?{seed:c.seed}:{}})},children:[(0,l.jsx)(h.Z,{children:"Create New World"}),(0,l.jsx)(u.Z,{children:(0,l.jsxs)(t.Z,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[(0,l.jsx)(j.Z,{label:"World Name",value:c.name,onChange:v("name"),error:!!g.name,helperText:g.name||"Only lowercase letters, numbers, and hyphens",fullWidth:!0,autoFocus:!0,disabled:d}),(0,l.jsx)(j.Z,{label:"Seed (optional)",value:c.seed||"",onChange:v("seed"),helperText:"Leave empty for a random seed",fullWidth:!0,disabled:d})]})}),(0,l.jsxs)(m.Z,{sx:{px:3,pb:2},children:[(0,l.jsx)(i.Z,{onClick:n,disabled:d,children:"Cancel"}),(0,l.jsx)(i.Z,{type:"submit",variant:"contained",disabled:d,startIcon:d?(0,l.jsx)(o.Z,{size:16}):null,children:d?"Creating...":"Create"})]})]})})}var O=n(7178),_=n(92666);function q(e){let{open:s,worldName:n,onClose:d,onSubmit:Z,loading:g=!1}=e,[p,f]=(0,r.useState)(""),{data:v,isLoading:y}=(0,_.x$)();(0,r.useEffect)(()=>{s||f("")},[s]);let b=(null==v?void 0:v.servers)||[],w=b.filter(e=>"running"!==e.status),C=b.filter(e=>"running"===e.status);return(0,l.jsx)(x.Z,{open:s,onClose:g?void 0:d,maxWidth:"sm",fullWidth:!0,children:(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p&&Z(n,p)},children:[(0,l.jsxs)(h.Z,{children:["Assign World: ",n]}),(0,l.jsx)(u.Z,{children:(0,l.jsx)(t.Z,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:y?(0,l.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,l.jsx)(o.Z,{})}):0===b.length?(0,l.jsx)(c.Z,{color:"text.secondary",children:"No servers available. Create a server first."}):(0,l.jsxs)(l.Fragment,{children:[0===w.length&&C.length>0&&(0,l.jsx)(a.Z,{severity:"warning",children:"All servers are currently running. It is recommended to assign worlds to stopped servers."}),(0,l.jsxs)(j.Z,{label:"Select Server",select:!0,value:p,onChange:e=>f(e.target.value),fullWidth:!0,disabled:g,helperText:"Select a server to assign this world to",children:[w.length>0&&(0,l.jsx)(O.Z,{disabled:!0,children:(0,l.jsx)(c.Z,{variant:"caption",color:"text.secondary",children:"Available Servers"})}),w.map(e=>(0,l.jsx)(O.Z,{value:e.name,children:e.name},e.name)),C.length>0&&(0,l.jsx)(O.Z,{disabled:!0,children:(0,l.jsx)(c.Z,{variant:"caption",color:"text.secondary",children:"Running Servers (not recommended)"})}),C.map(e=>(0,l.jsx)(O.Z,{value:e.name,children:e.name},e.name))]})]})})}),(0,l.jsxs)(m.Z,{sx:{px:3,pb:2},children:[(0,l.jsx)(i.Z,{onClick:d,disabled:g,children:"Cancel"}),(0,l.jsx)(i.Z,{type:"submit",variant:"contained",disabled:g||!p||y,startIcon:g?(0,l.jsx)(o.Z,{size:16}):null,children:g?"Assigning...":"Assign"})]})]})})}function M(){var e,s,n,f;let[v,y]=(0,r.useState)(!1),[b,w]=(0,r.useState)(null),[C,S]=(0,r.useState)(null),[k,W]=(0,r.useState)(""),[z,D]=(0,r.useState)([]),{data:I,isLoading:A,error:F}=(0,_.Sr)(),L=(0,_.hy)(),P=(0,_.nq)(),E=(0,_.g2)(),R=(0,_.Fv)(),O=async e=>{D(s=>[...s,e]);try{await E.mutateAsync({worldName:e})}catch(e){console.error("Failed to release world:",e)}finally{D(s=>s.filter(s=>s!==e))}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(d.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,Z.Fq)(e.palette.success.main,.1)," 0%, ").concat((0,Z.Fq)(e.palette.primary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,Z.Fq)(e.palette.success.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,l.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"success.main",color:"success.contrastText"},children:(0,l.jsx)(p.Z,{sx:{fontSize:32}})}),(0,l.jsxs)(t.Z,{children:[(0,l.jsx)(c.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Worlds"}),(0,l.jsx)(c.Z,{variant:"body1",color:"text.secondary",children:"Manage your Minecraft worlds"})]})]}),(0,l.jsx)(i.Z,{variant:"contained",startIcon:(0,l.jsx)(g.Z,{}),onClick:()=>y(!0),size:"large",children:"Create World"})]}),F&&(0,l.jsxs)(a.Z,{severity:"error",sx:{mb:3},children:["Failed to load worlds: ",F.message]}),L.isError&&(0,l.jsxs)(a.Z,{severity:"error",sx:{mb:3},children:["Failed to create world: ",null===(e=L.error)||void 0===e?void 0:e.message]}),P.isError&&(0,l.jsxs)(a.Z,{severity:"error",sx:{mb:3},children:["Failed to assign world: ",null===(s=P.error)||void 0===s?void 0:s.message]}),E.isError&&(0,l.jsxs)(a.Z,{severity:"error",sx:{mb:3},children:["Failed to release world: ",null===(n=E.error)||void 0===n?void 0:n.message]}),R.isError&&(0,l.jsxs)(a.Z,{severity:"error",sx:{mb:3},children:["Failed to delete world: ",null===(f=R.error)||void 0===f?void 0:f.message]}),A?(0,l.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,l.jsx)(o.Z,{})}):(0,l.jsx)(N,{worlds:(null==I?void 0:I.worlds)||[],onAssign:e=>w(e),onRelease:O,onDelete:e=>{S(e),W("")},onCreate:()=>y(!0),loadingWorlds:z}),(0,l.jsx)(T,{open:v,onClose:()=>{y(!1),L.reset()},onSubmit:e=>{L.mutate(e,{onSuccess:()=>{y(!1)}})},loading:L.isPending}),(0,l.jsx)(q,{open:!!b,worldName:b||"",onClose:()=>w(null),onSubmit:(e,s)=>{D(s=>[...s,e]),P.mutate({worldName:e,serverName:s},{onSuccess:()=>{w(null)},onSettled:()=>{D(s=>s.filter(s=>s!==e))}})},loading:P.isPending}),(0,l.jsxs)(x.Z,{open:!!C,onClose:()=>{S(null),W("")},maxWidth:"sm",fullWidth:!0,children:[(0,l.jsx)(h.Z,{children:"Delete World"}),(0,l.jsxs)(u.Z,{children:[(0,l.jsxs)(c.Z,{sx:{mb:2},children:["This action cannot be undone. Type ",(0,l.jsx)("strong",{children:C})," to confirm deletion."]}),(0,l.jsx)(j.Z,{label:"World name",value:k,onChange:e=>W(e.target.value),fullWidth:!0,autoFocus:!0})]}),(0,l.jsxs)(m.Z,{sx:{px:3,pb:2},children:[(0,l.jsx)(i.Z,{onClick:()=>{S(null),W("")},children:"Cancel"}),(0,l.jsx)(i.Z,{variant:"contained",color:"error",onClick:()=>{C&&k===C&&(D(e=>[...e,C]),R.mutate({name:C,force:!0},{onSuccess:()=>{S(null),W("")},onSettled:()=>{D(e=>e.filter(e=>e!==C))}}))},disabled:k!==C||R.isPending,startIcon:R.isPending?(0,l.jsx)(o.Z,{size:16}):null,children:R.isPending?"Deleting...":"Delete"})]})]})]})}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,2538,5511,880,6909,3333,2666,3669,2757,1744],function(){return e(e.s=6199)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ @import url("https://fonts.cdnfonts.com/css/minecraft-4");*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}#__next .visible{visibility:visible}#__next .fixed{position:fixed}#__next .absolute{position:absolute}#__next .relative{position:relative}#__next .sticky{position:sticky}#__next .block{display:block}#__next .flex{display:flex}#__next .table{display:table}#__next .grid{display:grid}#__next .hidden{display:none}#__next .shrink{flex-shrink:1}#__next .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#__next .break-all{word-break:break-all}#__next .rounded{border-radius:.25rem}#__next .border{border-width:1px}#__next .uppercase{text-transform:uppercase}#__next .lowercase{text-transform:lowercase}#__next .capitalize{text-transform:capitalize}#__next .italic{font-style:italic}#__next .underline{text-decoration-line:underline}#__next .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#__next .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg-base:#16181c;--bg-raised:#1a1d22;--bg-surface:#26282e;--bg-elevated:#313338;--text-primary:#fff;--text-secondary:#9a9a9a;--text-tertiary:#72767d;--border-default:#2e3035;--primary:#1bd96a;--primary-light:#4de38a;--primary-dark:#15a852;--secondary:#7c3aed}body{color:var(--text-primary);background-color:var(--bg-base);min-height:100vh}html{scroll-behavior:smooth;scrollbar-gutter:stable}:focus-visible{outline:2px solid var(--primary);outline-offset:2px}#nprogress{pointer-events:none}#nprogress .bar{background:var(--primary);position:fixed;z-index:9999;top:0;left:0;width:100%;height:3px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px var(--primary),0 0 5px var(--primary);opacity:1;transform:rotate(3deg) translateY(-4px)}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/2fec16f4e3247070-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/d39dd0fe2707b73f-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/64b603a0050c6c5e-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/19bbd60ccc95b5d0-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/f882d86c499cfa5a-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:300;font-display:swap;src:url(/_next/static/media/c99b890c5ded8d2e-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/4b1cfd3867993fed-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/77f5a85cac4ea515-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/bda87828535b47a7-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/b22cdab1bc584ea3-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/eeeb642bd71d217b-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:400;font-display:swap;src:url(/_next/static/media/70d2fd2b9078a5a3-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/e8773fdd4b7ad26f-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/23822ac40846484b-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/387866ce4a39ca39-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/dbd9849a8a735d72-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/12a3e8885b69eb86-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:500;font-display:swap;src:url(/_next/static/media/3ecd40fce058ee61-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/854d2e4705543874-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/b188519314c42064-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/14d38ce06836ffee-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/cf66601165af2130-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/b664222af7dcc13c-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:__Ubuntu_1d908f;font-style:normal;font-weight:700;font-display:swap;src:url(/_next/static/media/33a864272e2b3e97-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:__Ubuntu_Fallback_1d908f;src:local("Arial");ascent-override:91.32%;descent-override:18.52%;line-gap-override:2.74%;size-adjust:102.06%}.__className_1d908f{font-family:__Ubuntu_1d908f,__Ubuntu_Fallback_1d908f;font-style:normal}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2535],{24559:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},10449:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.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")},59602:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},70603:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},84974:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public")},87739:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},28058:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},42730:function(n,e,t){var r=t(8091);e.Z=void 0;var o=r(t(66758)),i=t(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},10721:function(n,e,t){t.d(e,{Z:function(){return P}});var r=t(16295),o=t(32324),i=t(81500),a=t(35106),l=t(70316),c=t(41060),s=t(65951),u=t(76492),d=t(34519),h=t(28057),f=t(11379),v=t(9049);function m(n){return(0,v.ZP)("MuiSkeleton",n)}(0,f.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var p=t(94655);function g(){let n=(0,r._)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"]);return g=function(){return n},n}function Z(){let n=(0,r._)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"]);return Z=function(){return n},n}function b(){let n=(0,r._)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]);return b=function(){return n},n}function C(){let n=(0,r._)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]);return C=function(){return n},n}let k=["animation","className","component","height","style","variant","width"],w=n=>n,x,E,M,y,S=n=>{let{classes:e,variant:t,animation:r,hasChildren:o,width:i,height:a}=n;return(0,s.Z)({root:["root",t,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},m,e)},L=(0,c.F4)(x||(x=w(g()))),R=(0,c.F4)(E||(E=w(Z()))),O=(0,d.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(n,e)=>{let{ownerState:t}=n;return[e.root,e[t.variant],!1!==t.animation&&e[t.animation],t.hasChildren&&e.withChildren,t.hasChildren&&!t.width&&e.fitContent,t.hasChildren&&!t.height&&e.heightAuto]}})(n=>{let{theme:e,ownerState:t}=n,r=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",o=parseFloat(e.shape.borderRadius);return(0,i.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,u.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(o).concat(r,"/").concat(Math.round(o/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},n=>{let{ownerState:e}=n;return"pulse"===e.animation&&(0,c.iv)(M||(M=w(b(),0)),L)},n=>{let{ownerState:e,theme:t}=n;return"wave"===e.animation&&(0,c.iv)(y||(y=w(C(),0,0)),R,(t.vars||t).palette.action.hover)});var P=a.forwardRef(function(n,e){let t=(0,h.i)({props:n,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:c="span",height:s,style:u,variant:d="text",width:f}=t,v=(0,o.Z)(t,k),m=(0,i.Z)({},t,{animation:r,component:c,variant:d,hasChildren:!!v.children}),g=S(m);return(0,p.jsx)(O,(0,i.Z)({as:c,ref:e,className:(0,l.Z)(g.root,a),ownerState:m},v,{style:(0,i.Z)({width:f,height:s},u)}))})},37530:function(n,e,t){t.d(e,{Z:function(){return A}});var r=t(32324),o=t(81500),i=t(35106),a=t(65951),l=t(95582),c=t(67485),s=t(16987),u=t(95007),d=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{autoHideDuration:e=null,disableWindowBlurListener:t=!1,onClose:r,open:a,resumeHideDuration:l}=n,d=(0,c.Z)();i.useEffect(()=>{if(a)return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)};function n(n){n.defaultPrevented||"Escape"!==n.key&&"Esc"!==n.key||null==r||r(n,"escapeKeyDown")}},[a,r]);let h=(0,s.Z)((n,e)=>{null==r||r(n,e)}),f=(0,s.Z)(n=>{r&&null!=n&&d.start(n,()=>{h(null,"timeout")})});i.useEffect(()=>(a&&f(e),d.clear),[a,e,f,d]);let v=d.clear,m=i.useCallback(()=>{null!=e&&f(null!=l?l:.5*e)},[e,l,f]),p=n=>e=>{let t=n.onBlur;null==t||t(e),m()},g=n=>e=>{let t=n.onFocus;null==t||t(e),v()},Z=n=>e=>{let t=n.onMouseEnter;null==t||t(e),v()},b=n=>e=>{let t=n.onMouseLeave;null==t||t(e),m()};return i.useEffect(()=>{if(!t&&a)return window.addEventListener("focus",m),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",v)}},[t,a,m,v]),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.Z)({},(0,u.Z)(n),(0,u.Z)(e));return(0,o.Z)({role:"presentation"},e,t,{onBlur:p(t),onFocus:g(t),onMouseEnter:Z(t),onMouseLeave:b(t)})},onClickAway:n=>{null==r||r(n,"clickaway")}}},h=t(22429),f=t(98072),v=t(11844),m=t(94655);function p(n){return n.substring(2).toLowerCase()}function g(n){let{children:e,disableReactTree:t=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=n,l=i.useRef(!1),c=i.useRef(null),u=i.useRef(!1),d=i.useRef(!1);i.useEffect(()=>(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);let g=(0,h.Z)((0,v.Z)(e),c),Z=(0,s.Z)(n=>{let e=d.current;d.current=!1;let r=(0,f.Z)(c.current);if(u.current&&c.current&&(!("clientX"in n)||!(r.documentElement.clientWidth<n.clientX)&&!(r.documentElement.clientHeight<n.clientY))){if(l.current){l.current=!1;return}(n.composedPath?n.composedPath().indexOf(c.current)>-1:!r.documentElement.contains(n.target)||c.current.contains(n.target))||!t&&e||o(n)}}),b=n=>t=>{d.current=!0;let r=e.props[n];r&&r(t)},C={ref:g};return!1!==a&&(C[a]=b(a)),i.useEffect(()=>{if(!1!==a){let n=p(a),e=(0,f.Z)(c.current),t=()=>{l.current=!0};return e.addEventListener(n,Z),e.addEventListener("touchmove",t),()=>{e.removeEventListener(n,Z),e.removeEventListener("touchmove",t)}}},[Z,a]),!1!==r&&(C[r]=b(r)),i.useEffect(()=>{if(!1!==r){let n=p(r),e=(0,f.Z)(c.current);return e.addEventListener(n,Z),()=>{e.removeEventListener(n,Z)}}},[Z,r]),(0,m.jsx)(i.Fragment,{children:i.cloneElement(e,C)})}var Z=t(34519),b=t(83855),C=t(28057),k=t(38762),w=t(37698),x=t(70316),E=t(64577),M=t(69899),y=t(11379),S=t(9049);function L(n){return(0,S.ZP)("MuiSnackbarContent",n)}(0,y.Z)("MuiSnackbarContent",["root","message","action"]);let R=["action","className","message","role"],O=n=>{let{classes:e}=n;return(0,a.Z)({root:["root"],action:["action"],message:["message"]},L,e)},P=(0,Z.ZP)(M.Z,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(n,e)=>e.root})(n=>{let{theme:e}=n,t="light"===e.palette.mode?.8:.98,r=(0,E._4)(e.palette.background.default,t);return(0,o.Z)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(r),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),j=(0,Z.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(n,e)=>e.message})({padding:"8px 0"}),z=(0,Z.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(n,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),T=i.forwardRef(function(n,e){let t=(0,C.i)({props:n,name:"MuiSnackbarContent"}),{action:i,className:a,message:l,role:c="alert"}=t,s=(0,r.Z)(t,R),u=O(t);return(0,m.jsxs)(P,(0,o.Z)({role:c,square:!0,elevation:6,className:(0,x.Z)(u.root,a),ownerState:t,ref:e},s,{children:[(0,m.jsx)(j,{className:u.message,ownerState:t,children:l}),i?(0,m.jsx)(z,{className:u.action,ownerState:t,children:i}):null]}))});function F(n){return(0,S.ZP)("MuiSnackbar",n)}(0,y.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);let N=["onEnter","onExited"],_=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],H=n=>{let{classes:e,anchorOrigin:t}=n,r={root:["root","anchorOrigin".concat((0,k.Z)(t.vertical)).concat((0,k.Z)(t.horizontal))]};return(0,a.Z)(r,F,e)},V=(0,Z.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(n,e)=>{let{ownerState:t}=n;return[e.root,e["anchorOrigin".concat((0,k.Z)(t.anchorOrigin.vertical)).concat((0,k.Z)(t.anchorOrigin.horizontal))]]}})(n=>{let{theme:e,ownerState:t}=n;return(0,o.Z)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,o.Z)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})})});var A=i.forwardRef(function(n,e){let t=(0,C.i)({props:n,name:"MuiSnackbar"}),a=(0,b.Z)(),c={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:u,horizontal:h}={vertical:"bottom",horizontal:"left"},autoHideDuration:f=null,children:v,className:p,ClickAwayListenerProps:Z,ContentProps:k,disableWindowBlurListener:x=!1,message:E,open:M,TransitionComponent:y=w.Z,transitionDuration:S=c,TransitionProps:{onEnter:L,onExited:R}={}}=t,O=(0,r.Z)(t.TransitionProps,N),P=(0,r.Z)(t,_),j=(0,o.Z)({},t,{anchorOrigin:{vertical:u,horizontal:h},autoHideDuration:f,disableWindowBlurListener:x,TransitionComponent:y,transitionDuration:S}),z=H(j),{getRootProps:F,onClickAway:A}=d((0,o.Z)({},j)),[B,X]=i.useState(!0),I=(0,l.Z)({elementType:V,getSlotProps:F,externalForwardedProps:P,ownerState:j,additionalProps:{ref:e},className:[z.root,p]});return!M&&B?null:(0,m.jsx)(g,(0,o.Z)({onClickAway:A},Z,{children:(0,m.jsx)(V,(0,o.Z)({},I,{children:(0,m.jsx)(y,(0,o.Z)({appear:!0,in:M,timeout:S,direction:"top"===u?"down":"up",onEnter:(n,e)=>{X(!1),L&&L(n,e)},onExited:n=>{X(!0),R&&R(n)}},O,{children:v||(0,m.jsx)(T,(0,o.Z)({message:E,action:s},k))}))}))}))})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3333],{33104: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:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,r.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime")},32366: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:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},21111: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:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},96292: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:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link")},97812: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:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"}),"LinkOff")},84974: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:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public")},78067: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:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage")},25935:function(t,e,i){i.d(e,{Z:function(){return y}});var s=i(32324),n=i(81500),r=i(35106),a=i(70316),o=i(65951),u=i(34519),h=i(28057),c=i(11379),l=i(9049);function d(t){return(0,l.ZP)("MuiCardActions",t)}(0,c.Z)("MuiCardActions",["root","spacing"]);var p=i(94655);let v=["disableSpacing","className"],m=t=>{let{classes:e,disableSpacing:i}=t;return(0,o.Z)({root:["root",!i&&"spacing"]},d,e)},f=(0,u.ZP)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:i}=t;return[e.root,!i.disableSpacing&&e.spacing]}})(t=>{let{ownerState:e}=t;return(0,n.Z)({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var y=r.forwardRef(function(t,e){let i=(0,h.i)({props:t,name:"MuiCardActions"}),{disableSpacing:r=!1,className:o}=i,u=(0,s.Z)(i,v),c=(0,n.Z)({},i,{disableSpacing:r}),l=m(c);return(0,p.jsx)(f,(0,n.Z)({className:(0,a.Z)(l.root,o),ownerState:c,ref:e},u))})},52082:function(t,e,i){i.d(e,{Z:function(){return C}});var s,n=i(32324),r=i(81500),a=i(35106),o=i(70316),u=i(65951),h=i(38762),c=i(31317),l=i(14406),d=i(85016),p=i(34519),v=i(11379),m=i(9049);function f(t){return(0,m.ZP)("MuiInputAdornment",t)}let y=(0,v.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var b=i(28057),M=i(94655);let Z=["children","className","component","disablePointerEvents","disableTypography","position","variant"],g=t=>{let{classes:e,disablePointerEvents:i,hiddenLabel:s,position:n,size:r,variant:a}=t,o={root:["root",i&&"disablePointerEvents",n&&"position".concat((0,h.Z)(n)),a,s&&"hiddenLabel",r&&"size".concat((0,h.Z)(r))]};return(0,u.Z)(o,f,e)},x=(0,p.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:i}=t;return[e.root,e["position".concat((0,h.Z)(i.position))],!0===i.disablePointerEvents&&e.disablePointerEvents,e[i.variant]]}})(t=>{let{theme:e,ownerState:i}=t;return(0,r.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===i.variant&&{["&.".concat(y.positionStart,"&:not(.").concat(y.hiddenLabel,")")]:{marginTop:16}},"start"===i.position&&{marginRight:8},"end"===i.position&&{marginLeft:8},!0===i.disablePointerEvents&&{pointerEvents:"none"})});var C=a.forwardRef(function(t,e){let i=(0,b.i)({props:t,name:"MuiInputAdornment"}),{children:u,className:h,component:p="div",disablePointerEvents:v=!1,disableTypography:m=!1,position:f,variant:y}=i,C=(0,n.Z)(i,Z),P=(0,d.Z)()||{},R=y;y&&P.variant,P&&!R&&(R=P.variant);let w=(0,r.Z)({},i,{hiddenLabel:P.hiddenLabel,size:P.size,disablePointerEvents:v,position:f,variant:R}),S=g(w);return(0,M.jsx)(l.Z.Provider,{value:null,children:(0,M.jsx)(x,(0,r.Z)({as:p,ownerState:w,className:(0,o.Z)(S.root,h),ref:e},C,{children:"string"!=typeof u||m?(0,M.jsxs)(a.Fragment,{children:["start"===f?s||(s=(0,M.jsx)("span",{className:"notranslate",children:"​"})):null,u]}):(0,M.jsx)(c.Z,{color:"text.secondary",children:u})}))})})},64769:function(t,e,i){i.d(e,{L:function(){return r}});var s=i(11379),n=i(9049);function r(t){return(0,n.ZP)("MuiListItemText",t)}let a=(0,s.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);e.Z=a},98091:function(t,e,i){i.d(e,{R:function(){return o},m:function(){return a}});var s=i(11430),n=i(23620),r=i(97639),a=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||o(),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 o(){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),a=i(12835),o=i(80375),u=class extends a.l{#t;#r=void 0;#a;#o;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,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#h(t)}getCurrentResult(){return this.#r}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#u(),this.#h()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#u(){let t=this.#a?.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.#o&&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.#o.onSuccess?.(t.data,e,i,s)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,i,s)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,i,s)}catch(t){Promise.reject(t)}try{this.#o.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 a=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(o.ZT)},[n]);if(a.error&&(0,o.L3)(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:c,mutateAsync:a.mutate}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3945],{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),y=i(11379),v=i(9049);function g(t){return(0,v.ZP)("MuiCollapse",t)}(0,y.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:y,collapsedSize:v="0px",component:g,easing:Z,in:E,onEnter:P,onEntered:S,onEntering:O,onExit:j,onExited:z,onExiting:D,orientation:I="vertical",style:N,timeout:k=d.x9.standard,TransitionComponent:A=a.ZP}=i,K=(0,s.Z)(i,w),F=(0,n.Z)({},i,{orientation:I,collapsedSize:v}),T=x(F),L=(0,m.Z)(),G=(0,u.Z)(),H=r.useRef(null),U=r.useRef(),V="number"==typeof v?"".concat(v,"px"):v,W="horizontal"===I,_=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=()=>H.current?H.current[W?"clientWidth":"clientHeight"]:0,Q=B((t,e)=>{H.current&&W&&(H.current.style.position="absolute"),t.style[_]=V,P&&P(t,e)}),X=B((t,e)=>{let i=J();H.current&&W&&(H.current.style.position="");let{duration:s,easing:n}=(0,p.C)({style:N,timeout:k,easing:Z},{mode:"enter"});if("auto"===k){let e=L.transitions.getAutoHeightDuration(i);t.style.transitionDuration="".concat(e,"ms"),U.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:N,timeout:k,easing:Z},{mode:"exit"});if("auto"===k){let i=L.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(i,"ms"),U.current=i}else t.style.transitionDuration="string"==typeof i?i:"".concat(i,"ms");t.style[_]=V,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"===k&&G.start(U.current||0,t),h&&h(Y.current,t)},nodeRef:Y,timeout:"auto"===k?null:k},K,{children:(t,e)=>(0,b.jsx)(C,(0,n.Z)({as:g,className:(0,o.Z)(T.root,y,{entered:T.entered,exited:!E&&"0px"===V&&T.hidden}[t]),style:(0,n.Z)({[W?"minWidth":"minHeight"]:V},N),ref:q},e,{ownerState:(0,n.Z)({},F,{state:t}),children:(0,b.jsx)(M,{ownerState:(0,n.Z)({},F,{state:t}),className:T.wrapper,ref:H,children:(0,b.jsx)(R,{ownerState:(0,n.Z)({},F,{state:t}),className:T.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}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4187],{35847:function(e,t,r){var o=r(8091);t.Z=void 0;var l=o(r(66758)),n=r(94655);t.Z=(0,l.default)((0,n.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"People")},87716:function(e,t,r){r.d(t,{Z:function(){return B}});var o=r(32324),l=r(81500),n=r(35106),i=r(70316),a=r(92019),s=r(67485),c=r(65951),d=r(34519),u=r(28057),p=r(30035),h=r(56874),f=r(83855),b=r(38481),v=r(11379),m=r(9049);function x(e){return(0,m.ZP)("MuiCollapse",e)}(0,v.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var Z=r(94655);let g=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=e=>{let{orientation:t,classes:r}=e;return(0,c.Z)({root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]},x,r)},y=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.orientation],"entered"===r.state&&t.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&t.hidden]}})(e=>{let{theme:t,ownerState:r}=e;return(0,l.Z)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===r.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===r.state&&(0,l.Z)({height:"auto",overflow:"visible"},"horizontal"===r.orientation&&{width:"auto"}),"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&{visibility:"hidden"})}),S=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(e=>{let{ownerState:t}=e;return(0,l.Z)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),C=(0,d.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(e=>{let{ownerState:t}=e;return(0,l.Z)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),E=n.forwardRef(function(e,t){let r=(0,u.i)({props:e,name:"MuiCollapse"}),{addEndListener:c,children:d,className:v,collapsedSize:m="0px",component:x,easing:E,in:B,onEnter:M,onEntered:I,onEntering:P,onExit:R,onExited:W,onExiting:z,orientation:N="vertical",style:T,timeout:L=p.x9.standard,TransitionComponent:k=a.ZP}=r,j=(0,o.Z)(r,g),A=(0,l.Z)({},r,{orientation:N,collapsedSize:m}),H=w(A),D=(0,f.Z)(),F=(0,s.Z)(),X=n.useRef(null),O=n.useRef(),V="number"==typeof m?"".concat(m,"px"):m,Y="horizontal"===N,_=Y?"width":"height",q=n.useRef(null),K=(0,b.Z)(t,q),G=e=>t=>{if(e){let r=q.current;void 0===t?e(r):e(r,t)}},U=()=>X.current?X.current[Y?"clientWidth":"clientHeight"]:0,J=G((e,t)=>{X.current&&Y&&(X.current.style.position="absolute"),e.style[_]=V,M&&M(e,t)}),Q=G((e,t)=>{let r=U();X.current&&Y&&(X.current.style.position="");let{duration:o,easing:l}=(0,h.C)({style:T,timeout:L,easing:E},{mode:"enter"});if("auto"===L){let t=D.transitions.getAutoHeightDuration(r);e.style.transitionDuration="".concat(t,"ms"),O.current=t}else e.style.transitionDuration="string"==typeof o?o:"".concat(o,"ms");e.style[_]="".concat(r,"px"),e.style.transitionTimingFunction=l,P&&P(e,t)}),$=G((e,t)=>{e.style[_]="auto",I&&I(e,t)}),ee=G(e=>{e.style[_]="".concat(U(),"px"),R&&R(e)}),et=G(W),er=G(e=>{let t=U(),{duration:r,easing:o}=(0,h.C)({style:T,timeout:L,easing:E},{mode:"exit"});if("auto"===L){let r=D.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),O.current=r}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style[_]=V,e.style.transitionTimingFunction=o,z&&z(e)});return(0,Z.jsx)(k,(0,l.Z)({in:B,onEnter:J,onEntered:$,onEntering:Q,onExit:ee,onExited:et,onExiting:er,addEndListener:e=>{"auto"===L&&F.start(O.current||0,e),c&&c(q.current,e)},nodeRef:q,timeout:"auto"===L?null:L},j,{children:(e,t)=>(0,Z.jsx)(y,(0,l.Z)({as:x,className:(0,i.Z)(H.root,v,{entered:H.entered,exited:!B&&"0px"===V&&H.hidden}[e]),style:(0,l.Z)({[Y?"minWidth":"minHeight"]:V},T),ref:K},t,{ownerState:(0,l.Z)({},A,{state:e}),children:(0,Z.jsx)(S,{ownerState:(0,l.Z)({},A,{state:e}),className:H.wrapper,ref:X,children:(0,Z.jsx)(C,{ownerState:(0,l.Z)({},A,{state:e}),className:H.wrapperInner,children:d})})}))}))});E.muiSupportAuto=!0;var B=E},60097:function(e,t,r){r.d(t,{Z:function(){return g}});var o=r(32324),l=r(81500),n=r(35106),i=r(70316),a=r(65951),s=r(29084),c=r(38762),d=r(28057),u=r(34519),p=r(11379),h=r(9049);function f(e){return(0,h.ZP)("MuiTab",e)}let b=(0,p.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);var v=r(94655);let m=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],x=e=>{let{classes:t,textColor:r,fullWidth:o,wrapped:l,icon:n,label:i,selected:s,disabled:d}=e,u={root:["root",n&&i&&"labelIcon","textColor".concat((0,c.Z)(r)),o&&"fullWidth",l&&"wrapped",s&&"selected",d&&"disabled"],iconWrapper:["iconWrapper"]};return(0,a.Z)(u,f,t)},Z=(0,u.ZP)(s.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t["textColor".concat((0,c.Z)(r.textColor))],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{["& .".concat(b.iconWrapper)]:t.iconWrapper}]}})(e=>{let{theme:t,ownerState:r}=e;return(0,l.Z)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},r.label&&{flexDirection:"top"===r.iconPosition||"bottom"===r.iconPosition?"column":"row"},{lineHeight:1.25},r.icon&&r.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(b.iconWrapper)]:(0,l.Z)({},"top"===r.iconPosition&&{marginBottom:6},"bottom"===r.iconPosition&&{marginTop:6},"start"===r.iconPosition&&{marginRight:t.spacing(1)},"end"===r.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===r.textColor&&{color:"inherit",opacity:.6,["&.".concat(b.selected)]:{opacity:1},["&.".concat(b.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===r.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(b.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(b.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===r.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(b.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(b.disabled)]:{color:(t.vars||t).palette.text.disabled}},r.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},r.wrapped&&{fontSize:t.typography.pxToRem(12)})});var g=n.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiTab"}),{className:a,disabled:s=!1,disableFocusRipple:c=!1,fullWidth:u,icon:p,iconPosition:h="top",indicator:f,label:b,onChange:g,onClick:w,onFocus:y,selected:S,selectionFollowsFocus:C,textColor:E="inherit",value:B,wrapped:M=!1}=r,I=(0,o.Z)(r,m),P=(0,l.Z)({},r,{disabled:s,disableFocusRipple:c,selected:S,icon:!!p,iconPosition:h,label:!!b,fullWidth:u,textColor:E,wrapped:M}),R=x(P),W=p&&b&&n.isValidElement(p)?n.cloneElement(p,{className:(0,i.Z)(R.iconWrapper,p.props.className)}):p;return(0,v.jsxs)(Z,(0,l.Z)({focusRipple:!c,className:(0,i.Z)(R.root,a),ref:t,role:"tab","aria-selected":S,disabled:s,onClick:e=>{!S&&g&&g(e,B),w&&w(e)},onFocus:e=>{C&&!S&&g&&g(e,B),y&&y(e)},ownerState:P,tabIndex:S?0:-1},I,{children:["top"===h||"start"===h?(0,v.jsxs)(n.Fragment,{children:[W,b]}):(0,v.jsxs)(n.Fragment,{children:[b,W]}),f]}))})},33402:function(e,t,r){let o;r.d(t,{Z:function(){return K}});var l=r(32324),n=r(81500),i=r(35106),a=r(70316),s=r(65951),c=r(16501),d=r(95582),u=r(34519),p=r(28057),h=r(83855),f=r(19521);function b(){if(o)return o;let e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),o="reverse",e.scrollLeft>0?o="default":(e.scrollLeft=1,0===e.scrollLeft&&(o="negative")),document.body.removeChild(e),o}function v(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var m=r(65425),x=r(99466),Z=r(94655);let g=["onChange"],w={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var y=r(6858),S=r(92302),C=r(29084),E=r(11379),B=r(9049);function M(e){return(0,B.ZP)("MuiTabScrollButton",e)}let I=(0,E.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),P=["className","slots","slotProps","direction","orientation","disabled"],R=e=>{let{classes:t,orientation:r,disabled:o}=e;return(0,s.Z)({root:["root",r,o&&"disabled"]},M,t)},W=(0,u.ZP)(C.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(e=>{let{ownerState:t}=e;return(0,n.Z)({width:40,flexShrink:0,opacity:.8,["&.".concat(I.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})}),z=i.forwardRef(function(e,t){var r,o;let i=(0,p.i)({props:e,name:"MuiTabScrollButton"}),{className:s,slots:u={},slotProps:h={},direction:f}=i,b=(0,l.Z)(i,P),v=(0,c.V)(),m=(0,n.Z)({isRtl:v},i),x=R(m),g=null!=(r=u.StartScrollButtonIcon)?r:y.Z,w=null!=(o=u.EndScrollButtonIcon)?o:S.Z,C=(0,d.Z)({elementType:g,externalSlotProps:h.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),E=(0,d.Z)({elementType:w,externalSlotProps:h.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return(0,Z.jsx)(W,(0,n.Z)({component:"div",className:(0,a.Z)(x.root,s),ref:t,role:null,ownerState:m,tabIndex:null},b,{children:"left"===f?(0,Z.jsx)(g,(0,n.Z)({},C)):(0,Z.jsx)(w,(0,n.Z)({},E))}))});var N=r(10620);function T(e){return(0,B.ZP)("MuiTabs",e)}let L=(0,E.Z)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var k=r(34713);let j=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],A=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,H=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,D=(e,t,r)=>{let o=!1,l=r(e,t);for(;l;){if(l===e.firstChild){if(o)return;o=!0}let t=l.disabled||"true"===l.getAttribute("aria-disabled");if(!l.hasAttribute("tabindex")||t)l=r(e,l);else{l.focus();return}}},F=e=>{let{vertical:t,fixed:r,hideScrollbar:o,scrollableX:l,scrollableY:n,centered:i,scrollButtonsHideMobile:a,classes:c}=e;return(0,s.Z)({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",o&&"hideScrollbar",l&&"scrollableX",n&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[l&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]},T,c)},X=(0,u.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{["& .".concat(L.scrollButtons)]:t.scrollButtons},{["& .".concat(L.scrollButtons)]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(e=>{let{ownerState:t,theme:r}=e;return(0,n.Z)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(L.scrollButtons)]:{[r.breakpoints.down("sm")]:{display:"none"}}})}),O=(0,u.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(e=>{let{ownerState:t}=e;return(0,n.Z)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})}),V=(0,u.ZP)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(e=>{let{ownerState:t}=e;return(0,n.Z)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})}),Y=(0,u.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(e=>{let{ownerState:t,theme:r}=e;return(0,n.Z)({position:"absolute",height:2,bottom:0,width:"100%",transition:r.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(r.vars||r).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(r.vars||r).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})}),_=(0,u.ZP)(function(e){let{onChange:t}=e,r=(0,l.Z)(e,g),o=i.useRef(),a=i.useRef(null),s=()=>{o.current=a.current.offsetHeight-a.current.clientHeight};return(0,m.Z)(()=>{let e=(0,f.Z)(()=>{let e=o.current;s(),e!==o.current&&t(o.current)}),r=(0,x.Z)(a.current);return r.addEventListener("resize",e),()=>{e.clear(),r.removeEventListener("resize",e)}},[t]),i.useEffect(()=>{s(),t(o.current)},[t]),(0,Z.jsx)("div",(0,n.Z)({style:w},r,{ref:a}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),q={};var K=i.forwardRef(function(e,t){let r=(0,p.i)({props:e,name:"MuiTabs"}),o=(0,h.Z)(),s=(0,c.V)(),{"aria-label":u,"aria-labelledby":m,action:g,centered:w=!1,children:y,className:S,component:C="div",allowScrollButtonsMobile:E=!1,indicatorColor:B="primary",onChange:M,orientation:I="horizontal",ScrollButtonComponent:P=z,scrollButtons:R="auto",selectionFollowsFocus:W,slots:T={},slotProps:L={},TabIndicatorProps:K={},TabScrollButtonProps:G={},textColor:U="primary",value:J,variant:Q="standard",visibleScrollbar:$=!1}=r,ee=(0,l.Z)(r,j),et="scrollable"===Q,er="vertical"===I,eo=er?"scrollTop":"scrollLeft",el=er?"top":"left",en=er?"bottom":"right",ei=er?"clientHeight":"clientWidth",ea=er?"height":"width",es=(0,n.Z)({},r,{component:C,allowScrollButtonsMobile:E,indicatorColor:B,orientation:I,vertical:er,scrollButtons:R,textColor:U,variant:Q,visibleScrollbar:$,fixed:!et,hideScrollbar:et&&!$,scrollableX:et&&!er,scrollableY:et&&er,centered:w&&!et,scrollButtonsHideMobile:!E}),ec=F(es),ed=(0,d.Z)({elementType:T.StartScrollButtonIcon,externalSlotProps:L.startScrollButtonIcon,ownerState:es}),eu=(0,d.Z)({elementType:T.EndScrollButtonIcon,externalSlotProps:L.endScrollButtonIcon,ownerState:es}),[ep,eh]=i.useState(!1),[ef,eb]=i.useState(q),[ev,em]=i.useState(!1),[ex,eZ]=i.useState(!1),[eg,ew]=i.useState(!1),[ey,eS]=i.useState({overflow:"hidden",scrollbarWidth:0}),eC=new Map,eE=i.useRef(null),eB=i.useRef(null),eM=()=>{let e,t;let r=eE.current;if(r){let t=r.getBoundingClientRect();e={clientWidth:r.clientWidth,scrollLeft:r.scrollLeft,scrollTop:r.scrollTop,scrollLeftNormalized:function(e,t){let r=e.scrollLeft;if("rtl"!==t)return r;switch(b()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}(r,s?"rtl":"ltr"),scrollWidth:r.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(r&&!1!==J){let e=eB.current.children;if(e.length>0){let r=e[eC.get(J)];t=r?r.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},eI=(0,N.Z)(()=>{let e;let{tabsMeta:t,tabMeta:r}=eM(),o=0;if(er)e="top",r&&t&&(o=r.top-t.top+t.scrollTop);else if(e=s?"right":"left",r&&t){let l=s?t.scrollLeftNormalized+t.clientWidth-t.scrollWidth:t.scrollLeft;o=(s?-1:1)*(r[e]-t[e]+l)}let l={[e]:o,[ea]:r?r[ea]:0};if(isNaN(ef[e])||isNaN(ef[ea]))eb(l);else{let t=Math.abs(ef[e]-l[e]),r=Math.abs(ef[ea]-l[ea]);(t>=1||r>=1)&&eb(l)}}),eP=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{},{ease:n=v,duration:i=300}=o,a=null,s=t[e],c=!1,d=o=>{if(c){l(Error("Animation cancelled"));return}null===a&&(a=o);let u=Math.min(1,(o-a)/i);if(t[e]=n(u)*(r-s)+s,u>=1){requestAnimationFrame(()=>{l(null)});return}requestAnimationFrame(d)};return s===r?l(Error("Element already at target position")):requestAnimationFrame(d),()=>{c=!0}}(eo,eE.current,e,{duration:o.transitions.duration.standard}):eE.current[eo]=e},eR=e=>{let t=eE.current[eo];er?t+=e:(t+=e*(s?-1:1),t*=s&&"reverse"===b()?-1:1),eP(t)},eW=()=>{let e=eE.current[ei],t=0,r=Array.from(eB.current.children);for(let o=0;o<r.length;o+=1){let l=r[o];if(t+l[ei]>e){0===o&&(t=e);break}t+=l[ei]}return t},ez=()=>{eR(-1*eW())},eN=()=>{eR(eW())},eT=i.useCallback(e=>{eS({overflow:null,scrollbarWidth:e})},[]),eL=(0,N.Z)(e=>{let{tabsMeta:t,tabMeta:r}=eM();r&&t&&(r[el]<t[el]?eP(t[eo]+(r[el]-t[el]),{animation:e}):r[en]>t[en]&&eP(t[eo]+(r[en]-t[en]),{animation:e}))}),ek=(0,N.Z)(()=>{et&&!1!==R&&ew(!eg)});i.useEffect(()=>{let e,t;let r=(0,f.Z)(()=>{eE.current&&eI()}),o=(0,x.Z)(eE.current);return o.addEventListener("resize",r),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(r),Array.from(eB.current.children).forEach(t=>{e.observe(t)})),"undefined"!=typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{var r;null==(r=e)||r.unobserve(t)}),t.addedNodes.forEach(t=>{var r;null==(r=e)||r.observe(t)})}),r(),ek()})).observe(eB.current,{childList:!0}),()=>{var l,n;r.clear(),o.removeEventListener("resize",r),null==(l=t)||l.disconnect(),null==(n=e)||n.disconnect()}},[eI,ek]),i.useEffect(()=>{let e=Array.from(eB.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&et&&!1!==R){let r=e[0],o=e[t-1],l={root:eE.current,threshold:.99},n=new IntersectionObserver(e=>{em(!e[0].isIntersecting)},l);n.observe(r);let i=new IntersectionObserver(e=>{eZ(!e[0].isIntersecting)},l);return i.observe(o),()=>{n.disconnect(),i.disconnect()}}},[et,R,eg,null==y?void 0:y.length]),i.useEffect(()=>{eh(!0)},[]),i.useEffect(()=>{eI()}),i.useEffect(()=>{eL(q!==ef)},[eL,ef]),i.useImperativeHandle(g,()=>({updateIndicator:eI,updateScrollButtons:ek}),[eI,ek]);let ej=(0,Z.jsx)(Y,(0,n.Z)({},K,{className:(0,a.Z)(ec.indicator,K.className),ownerState:es,style:(0,n.Z)({},ef,K.style)})),eA=0,eH=i.Children.map(y,e=>{if(!i.isValidElement(e))return null;let t=void 0===e.props.value?eA:e.props.value;eC.set(t,eA);let r=t===J;return eA+=1,i.cloneElement(e,(0,n.Z)({fullWidth:"fullWidth"===Q,indicator:r&&!ep&&ej,selected:r,selectionFollowsFocus:W,onChange:M,textColor:U,value:t},1!==eA||!1!==J||e.props.tabIndex?{}:{tabIndex:0}))}),eD=(()=>{let e={};e.scrollbarSizeListener=et?(0,Z.jsx)(_,{onChange:eT,className:(0,a.Z)(ec.scrollableX,ec.hideScrollbar)}):null;let t=et&&("auto"===R&&(ev||ex)||!0===R);return e.scrollButtonStart=t?(0,Z.jsx)(P,(0,n.Z)({slots:{StartScrollButtonIcon:T.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ed},orientation:I,direction:s?"right":"left",onClick:ez,disabled:!ev},G,{className:(0,a.Z)(ec.scrollButtons,G.className)})):null,e.scrollButtonEnd=t?(0,Z.jsx)(P,(0,n.Z)({slots:{EndScrollButtonIcon:T.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:eu},orientation:I,direction:s?"left":"right",onClick:eN,disabled:!ex},G,{className:(0,a.Z)(ec.scrollButtons,G.className)})):null,e})();return(0,Z.jsxs)(X,(0,n.Z)({className:(0,a.Z)(ec.root,S),ownerState:es,ref:t,as:C},ee,{children:[eD.scrollButtonStart,eD.scrollbarSizeListener,(0,Z.jsxs)(O,{className:ec.scroller,ownerState:es,style:{overflow:ey.overflow,[er?"margin".concat(s?"Left":"Right"):"marginBottom"]:$?void 0:-ey.scrollbarWidth},ref:eE,children:[(0,Z.jsx)(V,{"aria-label":u,"aria-labelledby":m,"aria-orientation":"vertical"===I?"vertical":null,className:ec.flexContainer,ownerState:es,onKeyDown:e=>{let t=eB.current,r=(0,k.Z)(t).activeElement;if("tab"!==r.getAttribute("role"))return;let o="horizontal"===I?"ArrowLeft":"ArrowUp",l="horizontal"===I?"ArrowRight":"ArrowDown";switch("horizontal"===I&&s&&(o="ArrowRight",l="ArrowLeft"),e.key){case o:e.preventDefault(),D(t,r,H);break;case l:e.preventDefault(),D(t,r,A);break;case"Home":e.preventDefault(),D(t,null,A);break;case"End":e.preventDefault(),D(t,null,H)}},ref:eB,role:"tablist",children:eH}),ep&&ej]}),eD.scrollButtonEnd]}))})},6858:function(e,t,r){r(35106);var o=r(61626),l=r(94655);t.Z=(0,o.Z)((0,l.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},92302:function(e,t,r){r(35106);var o=r(61626),l=r(94655);t.Z=(0,o.Z)((0,l.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4240],{71185:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.default)((0,a.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")},27171:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"Dns")},80620:function(e,t,r){var n=r(8091);t.Z=void 0;var o=n(r(66758)),a=r(94655);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History")},62142:function(e,t,r){r.d(t,{ZP:function(){return T}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(16501),l=r(66743),p=r(12550),d=r(69899),u=r(38762),f=r(83855),h=r(28057),m=r(34519),g=r(15651),v=r(11379),Z=r(9049);function x(e){return(0,Z.ZP)("MuiDrawer",e)}(0,v.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var k=r(94655);let w=["BackdropProps"],b=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],y=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},E=e=>{let{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,u.Z)(r)),"temporary"!==n&&"paperAnchorDocked".concat((0,u.Z)(r))]};return(0,s.Z)(o,x,t)},P=(0,m.ZP)(l.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:y})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}),M=(0,m.ZP)("div",{shouldForwardProp:g.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:y})({flex:"0 0 auto"}),R=(0,m.ZP)(d.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t["paperAnchor".concat((0,u.Z)(r.anchor))],"temporary"!==r.variant&&t["paperAnchorDocked".concat((0,u.Z)(r.anchor))]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===r.anchor&&{left:0},"top"===r.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===r.anchor&&{right:0},"bottom"===r.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===r.anchor&&"temporary"!==r.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===r.anchor&&"temporary"!==r.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===r.anchor&&"temporary"!==r.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===r.anchor&&"temporary"!==r.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})}),D={left:"right",right:"left",top:"down",bottom:"up"};var T=a.forwardRef(function(e,t){let r=(0,h.i)({props:e,name:"MuiDrawer"}),s=(0,f.Z)(),l=(0,c.V)(),d={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:u="left",BackdropProps:m,children:g,className:v,elevation:Z=16,hideBackdrop:x=!1,ModalProps:{BackdropProps:y}={},onClose:T,open:C=!1,PaperProps:A={},SlideProps:S,TransitionComponent:B=p.Z,transitionDuration:j=d,variant:L="temporary"}=r,N=(0,n.Z)(r.ModalProps,w),H=(0,n.Z)(r,b),z=a.useRef(!1);a.useEffect(()=>{z.current=!0},[]);let I=function(e,t){let{direction:r}=e;return"rtl"===r&&-1!==["left","right"].indexOf(t)?D[t]:t}({direction:l?"rtl":"ltr"},u),V=(0,o.Z)({},r,{anchor:u,elevation:Z,open:C,variant:L},H),Y=E(V),X=(0,k.jsx)(R,(0,o.Z)({elevation:"temporary"===L?Z:0,square:!0},A,{className:(0,i.Z)(Y.paper,A.className),ownerState:V,children:g}));if("permanent"===L)return(0,k.jsx)(M,(0,o.Z)({className:(0,i.Z)(Y.root,Y.docked,v),ownerState:V,ref:t},H,{children:X}));let _=(0,k.jsx)(B,(0,o.Z)({in:C,direction:D[I],timeout:j,appear:z.current},S,{children:X}));return"persistent"===L?(0,k.jsx)(M,(0,o.Z)({className:(0,i.Z)(Y.root,Y.docked,v),ownerState:V,ref:t},H,{children:_})):(0,k.jsx)(P,(0,o.Z)({BackdropProps:(0,o.Z)({},m,y,{transitionDuration:j}),className:(0,i.Z)(Y.root,Y.modal,v),open:C,ownerState:V,onClose:T,hideBackdrop:x,ref:t},H,N,{children:_}))})},12550:function(e,t,r){var n=r(81500),o=r(32324),a=r(35106),i=r(92019),s=r(11844),c=r(19521),l=r(38481),p=r(83855),d=r(56874),u=r(99466),f=r(94655);let h=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function m(e,t,r){let n=function(e,t,r){let n;let o=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=(0,u.Z)(t);if(t.fakeTransform)n=t.fakeTransform;else{let e=i.getComputedStyle(t);n=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,c=0;if(n&&"none"!==n&&"string"==typeof n){let e=n.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),c=parseInt(e[5],10)}return"left"===e?a?"translateX(".concat(a.right+s-o.left,"px)"):"translateX(".concat(i.innerWidth+s-o.left,"px)"):"right"===e?a?"translateX(-".concat(o.right-a.left-s,"px)"):"translateX(-".concat(o.left+o.width-s,"px)"):"up"===e?a?"translateY(".concat(a.bottom+c-o.top,"px)"):"translateY(".concat(i.innerHeight+c-o.top,"px)"):a?"translateY(-".concat(o.top-a.top+o.height-c,"px)"):"translateY(-".concat(o.top+o.height-c,"px)")}(e,t,"function"==typeof r?r():r);n&&(t.style.webkitTransform=n,t.style.transform=n)}let g=a.forwardRef(function(e,t){let r=(0,p.Z)(),g={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},v={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:Z,appear:x=!0,children:k,container:w,direction:b="down",easing:y=g,in:E,onEnter:P,onEntered:M,onEntering:R,onExit:D,onExited:T,onExiting:C,style:A,timeout:S=v,TransitionComponent:B=i.ZP}=e,j=(0,o.Z)(e,h),L=a.useRef(null),N=(0,l.Z)((0,s.Z)(k),L,t),H=e=>t=>{e&&(void 0===t?e(L.current):e(L.current,t))},z=H((e,t)=>{m(b,e,w),(0,d.n)(e),P&&P(e,t)}),I=H((e,t)=>{let o=(0,d.C)({timeout:S,style:A,easing:y},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,n.Z)({},o)),e.style.transition=r.transitions.create("transform",(0,n.Z)({},o)),e.style.webkitTransform="none",e.style.transform="none",R&&R(e,t)}),V=H(M),Y=H(C),X=H(e=>{let t=(0,d.C)({timeout:S,style:A,easing:y},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),m(b,e,w),D&&D(e)}),_=H(e=>{e.style.webkitTransition="",e.style.transition="",T&&T(e)}),G=a.useCallback(()=>{L.current&&m(b,L.current,w)},[b,w]);return a.useEffect(()=>{if(E||"down"===b||"right"===b)return;let e=(0,c.Z)(()=>{L.current&&m(b,L.current,w)}),t=(0,u.Z)(L.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[b,E,w]),a.useEffect(()=>{E||G()},[E,G]),(0,f.jsx)(B,(0,n.Z)({nodeRef:L,onEnter:z,onEntered:V,onEntering:I,onExit:X,onExited:_,onExiting:Y,addEndListener:e=>{Z&&Z(L.current,e)},appear:x,in:E,timeout:S},j,{children:(e,t)=>a.cloneElement(k,(0,n.Z)({ref:N,style:(0,n.Z)({visibility:"exited"!==e||E?void 0:"hidden"},A,k.props.style)},t))}))});t.Z=g},62108:function(e,t,r){r.d(t,{Z:function(){return v}});var n=r(32324),o=r(81500),a=r(35106),i=r(70316),s=r(65951),c=r(28057),l=r(34519),p=r(11379),d=r(9049);function u(e){return(0,d.ZP)("MuiToolbar",e)}(0,p.Z)("MuiToolbar",["root","gutters","regular","dense"]);var f=r(94655);let h=["className","component","disableGutters","variant"],m=e=>{let{classes:t,disableGutters:r,variant:n}=e;return(0,s.Z)({root:["root",!r&&"gutters",n]},u,t)},g=(0,l.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(e=>{let{theme:t,ownerState:r}=e;return(0,o.Z)({position:"relative",display:"flex",alignItems:"center"},!r.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===r.variant&&{minHeight:48})},e=>{let{theme:t,ownerState:r}=e;return"regular"===r.variant&&t.mixins.toolbar});var v=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiToolbar"}),{className:a,component:s="div",disableGutters:l=!1,variant:p="regular"}=r,d=(0,n.Z)(r,h),u=(0,o.Z)({},r,{component:s,disableGutters:l,variant:p}),v=m(u);return(0,f.jsx)(g,(0,o.Z)({as:s,className:(0,i.Z)(v.root,a),ref:t,ownerState:u},d))})}}]);