django-cfg 1.4.83__py3-none-any.whl → 1.4.84__py3-none-any.whl

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.

Potentially problematic release.


This version of django-cfg might be problematic. Click here for more details.

Files changed (133) hide show
  1. django_cfg/__init__.py +1 -1
  2. django_cfg/apps/dashboard/__init__.py +8 -0
  3. django_cfg/apps/dashboard/api/__init__.py +27 -0
  4. django_cfg/apps/dashboard/api/serializers.py +165 -0
  5. django_cfg/apps/dashboard/api/viewsets.py +257 -0
  6. django_cfg/apps/dashboard/apps.py +23 -0
  7. django_cfg/apps/dashboard/services/__init__.py +11 -0
  8. django_cfg/apps/dashboard/services/statistics_service.py +235 -0
  9. django_cfg/apps/dashboard/services/system_health_service.py +280 -0
  10. django_cfg/apps/dashboard/urls.py +23 -0
  11. django_cfg/apps/frontend/views.py +5 -0
  12. django_cfg/apps/urls.py +2 -1
  13. django_cfg/core/builders/apps_builder.py +1 -0
  14. django_cfg/modules/django_client/core/parser/openapi30.py +12 -5
  15. django_cfg/modules/django_client/core/parser/openapi31.py +12 -5
  16. django_cfg/pyproject.toml +1 -1
  17. django_cfg/static/frontend/admin/404.html +1 -1
  18. django_cfg/static/frontend/admin/500.html +1 -1
  19. django_cfg/static/frontend/admin/_next/static/-Zk0eDB7OJOEFrFyR5BwZ/_buildManifest.js +1 -0
  20. django_cfg/static/frontend/admin/_next/static/chunks/{43076.55dd23b6cd68edb0.js → 20695.a7d37b6c40ad3f58.js} +1 -1
  21. django_cfg/static/frontend/admin/_next/static/chunks/{25033.d626f78bc99bc4a1.js → 25033.ee3e206d5a2877b6.js} +2 -2
  22. django_cfg/static/frontend/admin/_next/static/chunks/{25892.964150a58f94ce06.js → 25892.5cbed319f9226fdc.js} +1 -1
  23. django_cfg/static/frontend/admin/_next/static/chunks/{2d7a934f.dfef67639279d59d.js → 2d7a934f.329c61f23af1a7ec.js} +1 -1
  24. django_cfg/static/frontend/admin/_next/static/chunks/{30649.00c679812a56aee3.js → 30649.963cfb7268b5864a.js} +1 -1
  25. django_cfg/static/frontend/admin/_next/static/chunks/{30875.784491146c38dbcb.js → 30875.82c3741757b8aa32.js} +1 -1
  26. django_cfg/static/frontend/admin/_next/static/chunks/{32163.ab0ca435b3f26c04.js → 32163.109a03a7252f1508.js} +1 -1
  27. django_cfg/static/frontend/admin/_next/static/chunks/43076-4be6a9794e9c3e8b.js +1 -0
  28. django_cfg/static/frontend/admin/_next/static/chunks/{49978.fb8ba7ee52ffe666.js → 49978.db5a86a8eb233f35.js} +1 -1
  29. django_cfg/static/frontend/admin/_next/static/chunks/50314-79c02212788f1ec7.js +1 -0
  30. django_cfg/static/frontend/admin/_next/static/chunks/{50319.f786248384877960.js → 50319.fd78c7f7e3f1966e.js} +1 -1
  31. django_cfg/static/frontend/admin/_next/static/chunks/{52908.b690e323d8f8efdd.js → 52908.da5b850b0bc0970c.js} +1 -1
  32. django_cfg/static/frontend/admin/_next/static/chunks/{53710.80ca863525d137db.js → 53710.7176bbee6c7b78be.js} +1 -1
  33. django_cfg/static/frontend/admin/_next/static/chunks/{57982.251fed8d58adcf53.js → 57982.2c90b33b0934522a.js} +2 -2
  34. django_cfg/static/frontend/admin/_next/static/chunks/{60181.86e18057c4caaa97.js → 60181.c94d78d10eb5da37.js} +1 -1
  35. django_cfg/static/frontend/admin/_next/static/chunks/{60374.bde0ec1249aa79c6.js → 60374.5d80cfc45439b2b0.js} +1 -1
  36. django_cfg/static/frontend/admin/_next/static/chunks/{6884.7b1db804c88280ed.js → 6884.624d563508cf6db4.js} +1 -1
  37. django_cfg/static/frontend/admin/_next/static/chunks/{69436.9515b854cdf4b57a.js → 69436.be44021e3d7c99c7.js} +1 -1
  38. django_cfg/static/frontend/admin/_next/static/chunks/{70628.00cdd98f672e684f.js → 70628.58e8c38a66543d5e.js} +1 -1
  39. django_cfg/static/frontend/admin/_next/static/chunks/{73218.a826c2248612b37f.js → 73218.d712e7bd678e23a8.js} +1 -1
  40. django_cfg/static/frontend/admin/_next/static/chunks/{76334.64fbaa923d9ac293.js → 76334.f43f2d8b4bbf8dd6.js} +1 -1
  41. django_cfg/static/frontend/admin/_next/static/chunks/{7799.2b280f8ddf067d49.js → 7799.1575cc212bc750c7.js} +1 -1
  42. django_cfg/static/frontend/admin/_next/static/chunks/{80574.620a8a5b4eb91c25.js → 80574.92638dd7b9979664.js} +1 -1
  43. django_cfg/static/frontend/admin/_next/static/chunks/{81127.a0603c3394892d4e.js → 81127.3ead500eec887152.js} +1 -1
  44. django_cfg/static/frontend/admin/_next/static/chunks/82296-a2c8d38f62224be5.js +1 -0
  45. django_cfg/static/frontend/admin/_next/static/chunks/{8383.eb6188b22c453e14.js → 8383.e25a442df26b2e26.js} +1 -1
  46. django_cfg/static/frontend/admin/_next/static/chunks/{85833.35e6ca25ac32a7d2.js → 85833.b0dead4fbcbfdd1b.js} +1 -1
  47. django_cfg/static/frontend/admin/_next/static/chunks/{95365.fc9d7653a78839d0.js → 95365.2b430045fc2e5acf.js} +1 -1
  48. django_cfg/static/frontend/admin/_next/static/chunks/{96424.0793b94836eb13a6.js → 96424.11d76570e9a94b85.js} +1 -1
  49. django_cfg/static/frontend/admin/_next/static/chunks/pages/{_app-16701a4e1bc3e6ac.js → _app-f25bec36bbdc9625.js} +46 -46
  50. django_cfg/static/frontend/admin/_next/static/chunks/pages/index-d7bc30185f52cbca.js +1 -0
  51. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{cookies-bb5507a122775f30.js → cookies-b39c7f22c066e2c6.js} +1 -1
  52. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{privacy-f8a3d8db1a197be3.js → privacy-5aedad0cf3a4f80f.js} +1 -1
  53. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{security-aba50addd2179f8f.js → security-dbd854d0d5d483e2.js} +1 -1
  54. django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{terms-4aa35cd30b5c08ad.js → terms-f3e1d2b9e5edf12f.js} +1 -1
  55. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-22532c65971225eb.js +1 -0
  56. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/ui-669e8f2a785beba2.js +1 -0
  57. django_cfg/static/frontend/admin/_next/static/chunks/pages/private-a8a9ba76f2c75354.js +1 -0
  58. django_cfg/static/frontend/admin/_next/static/chunks/{webpack-905bba30877f6490.js → webpack-92add5f95c66e349.js} +1 -1
  59. django_cfg/static/frontend/admin/_next/static/css/78d677ac1677c210.css +3 -0
  60. django_cfg/static/frontend/admin/auth.html +1 -1
  61. django_cfg/static/frontend/admin/index.html +1 -1
  62. django_cfg/static/frontend/admin/legal/cookies.html +1 -1
  63. django_cfg/static/frontend/admin/legal/privacy.html +1 -1
  64. django_cfg/static/frontend/admin/legal/security.html +1 -1
  65. django_cfg/static/frontend/admin/legal/terms.html +1 -1
  66. django_cfg/static/frontend/admin/private/centrifugo.html +1 -1
  67. django_cfg/static/frontend/admin/private/profile.html +1 -1
  68. django_cfg/static/frontend/admin/private/ui.html +1 -0
  69. django_cfg/static/frontend/admin/private.html +1 -1
  70. django_cfg/templates/admin/index.html +97 -63
  71. django_cfg/templates/admin_old/index.html +80 -0
  72. {django_cfg-1.4.83.dist-info → django_cfg-1.4.84.dist-info}/METADATA +1 -1
  73. {django_cfg-1.4.83.dist-info → django_cfg-1.4.84.dist-info}/RECORD +126 -113
  74. django_cfg/static/frontend/admin/_next/static/chunks/pages/index-88751d9f44a32105.js +0 -1
  75. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-1c5f00c26c77a47b.js +0 -1
  76. django_cfg/static/frontend/admin/_next/static/chunks/pages/private-2f58633ddf63a5bc.js +0 -1
  77. django_cfg/static/frontend/admin/_next/static/chunks/pages/ui-0e6c0e35862789ec.js +0 -1
  78. django_cfg/static/frontend/admin/_next/static/css/806300fb98c42afb.css +0 -3
  79. django_cfg/static/frontend/admin/_next/static/ibMHm1p66p0UGKsKnDWxn/_buildManifest.js +0 -1
  80. django_cfg/static/frontend/admin/ui.html +0 -92
  81. /django_cfg/static/frontend/admin/_next/static/{ibMHm1p66p0UGKsKnDWxn → -Zk0eDB7OJOEFrFyR5BwZ}/_ssgManifest.js +0 -0
  82. /django_cfg/templates/{admin → admin_old}/components/action_grid.html +0 -0
  83. /django_cfg/templates/{admin → admin_old}/components/card.html +0 -0
  84. /django_cfg/templates/{admin → admin_old}/components/data_table.html +0 -0
  85. /django_cfg/templates/{admin → admin_old}/components/metric_card.html +0 -0
  86. /django_cfg/templates/{admin → admin_old}/components/modal.html +0 -0
  87. /django_cfg/templates/{admin → admin_old}/components/progress_bar.html +0 -0
  88. /django_cfg/templates/{admin → admin_old}/components/section_header.html +0 -0
  89. /django_cfg/templates/{admin → admin_old}/components/stat_item.html +0 -0
  90. /django_cfg/templates/{admin → admin_old}/components/stats_grid.html +0 -0
  91. /django_cfg/templates/{admin → admin_old}/components/status_badge.html +0 -0
  92. /django_cfg/templates/{admin → admin_old}/components/user_avatar.html +0 -0
  93. /django_cfg/templates/{admin → admin_old}/constance/change_list.html +0 -0
  94. /django_cfg/templates/{admin → admin_old}/constance/includes/default_value.html +0 -0
  95. /django_cfg/templates/{admin → admin_old}/constance/includes/fieldset_header.html +0 -0
  96. /django_cfg/templates/{admin → admin_old}/constance/includes/results_list.html +0 -0
  97. /django_cfg/templates/{admin → admin_old}/constance/includes/setting_row.html +0 -0
  98. /django_cfg/templates/{admin → admin_old}/constance/includes/table_headers.html +0 -0
  99. /django_cfg/templates/{admin → admin_old}/examples/component_class_example.html +0 -0
  100. /django_cfg/templates/{admin → admin_old}/import_export/change_list_export.html +0 -0
  101. /django_cfg/templates/{admin → admin_old}/import_export/change_list_import.html +0 -0
  102. /django_cfg/templates/{admin → admin_old}/import_export/change_list_import_export.html +0 -0
  103. /django_cfg/templates/{admin → admin_old}/index_new.html +0 -0
  104. /django_cfg/templates/{admin → admin_old}/layouts/base_dashboard.html +0 -0
  105. /django_cfg/templates/{admin → admin_old}/layouts/dashboard_with_tabs.html +0 -0
  106. /django_cfg/templates/{admin → admin_old}/sections/commands_section.html +0 -0
  107. /django_cfg/templates/{admin → admin_old}/sections/documentation_section.html +0 -0
  108. /django_cfg/templates/{admin → admin_old}/sections/overview_section.html +0 -0
  109. /django_cfg/templates/{admin → admin_old}/sections/stats_section.html +0 -0
  110. /django_cfg/templates/{admin → admin_old}/sections/system_section.html +0 -0
  111. /django_cfg/templates/{admin → admin_old}/sections/widgets_section.html +0 -0
  112. /django_cfg/templates/{admin → admin_old}/snippets/components/activity_tracker.html +0 -0
  113. /django_cfg/templates/{admin → admin_old}/snippets/components/charts_section.html +0 -0
  114. /django_cfg/templates/{admin → admin_old}/snippets/components/django_commands.html +0 -0
  115. /django_cfg/templates/{admin → admin_old}/snippets/components/quick_actions.html +0 -0
  116. /django_cfg/templates/{admin → admin_old}/snippets/components/recent_activity_improved.html +0 -0
  117. /django_cfg/templates/{admin → admin_old}/snippets/components/recent_users_table.html +0 -0
  118. /django_cfg/templates/{admin → admin_old}/snippets/components/stats_cards.html +0 -0
  119. /django_cfg/templates/{admin → admin_old}/snippets/components/stats_tiles.html +0 -0
  120. /django_cfg/templates/{admin → admin_old}/snippets/components/system_health.html +0 -0
  121. /django_cfg/templates/{admin → admin_old}/snippets/components/system_metrics.html +0 -0
  122. /django_cfg/templates/{admin → admin_old}/snippets/components/user_permissions.html +0 -0
  123. /django_cfg/templates/{admin → admin_old}/snippets/tabs/app_stats_tab.html +0 -0
  124. /django_cfg/templates/{admin → admin_old}/snippets/tabs/commands_tab.html +0 -0
  125. /django_cfg/templates/{admin → admin_old}/snippets/tabs/documentation_tab.html +0 -0
  126. /django_cfg/templates/{admin → admin_old}/snippets/tabs/overview_tab.html +0 -0
  127. /django_cfg/templates/{admin → admin_old}/snippets/tabs/stats_tab.html +0 -0
  128. /django_cfg/templates/{admin → admin_old}/snippets/tabs/users_tab.html +0 -0
  129. /django_cfg/templates/{admin → admin_old}/snippets/tabs/widgets_tab.html +0 -0
  130. /django_cfg/templates/{admin → admin_old}/snippets/zones/zones_table.html +0 -0
  131. {django_cfg-1.4.83.dist-info → django_cfg-1.4.84.dist-info}/WHEEL +0 -0
  132. {django_cfg-1.4.83.dist-info → django_cfg-1.4.84.dist-info}/entry_points.txt +0 -0
  133. {django_cfg-1.4.83.dist-info → django_cfg-1.4.84.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93332],{6298:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var a=s(94513),i=s(56886),n=s(30512),r=s(94285),l=s(24854),u=s(58380),c=s(17134);let d=()=>{let{isAuthenticated:e}=(0,i.h7)(),t=(0,u.useRouter)();return(0,r.useEffect)(()=>{e?t.push(l.JZ.private.overview):t.push((0,n.OJ)(l.JZ))},[e,t.asPath]),(0,a.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-background",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)(c.A,{className:"animate-spin text-primary",style:{width:"48px",height:"48px"}}),(0,a.jsx)("span",{className:"text-lg font-medium text-muted-foreground",children:"Loading..."})]})})};d.pageConfig={title:"Portal"};let h=d},59409:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(6298)}])}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=59409)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68019],{8599:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/cookies",function(){return r(31661)}])},31661:(e,s,r)=>{"use strict";r.r(s),r.d(s,{default:()=>t});var o=r(94513),i=r(94647);function t(){return(0,o.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,o.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)("h1",{className:"text-4xl font-bold",children:"Cookie Policy"}),(0,o.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"What Are Cookies?"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"Cookies are small text files that are placed on your device when you visit our website. They help us provide you with a better experience by remembering your preferences and understanding how you use our site."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Types of Cookies We Use"})}),(0,o.jsxs)(i.CardContent,{className:"text-muted-foreground flex flex-col gap-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Essential Cookies:"}),(0,o.jsx)("p",{children:"These cookies are necessary for the website to function properly."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Performance Cookies:"}),(0,o.jsx)("p",{children:"These cookies help us understand how visitors interact with our website."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Functionality Cookies:"}),(0,o.jsx)("p",{children:"These cookies allow us to remember choices you make and provide enhanced features."})]})]})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Managing Cookies"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"Most web browsers allow you to control cookies through their settings. You can set your browser to refuse cookies or delete certain cookies. However, please note that if you disable cookies, some features of our website may not function properly."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Third-Party Cookies"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"We may use third-party services that also use cookies. These third parties have their own privacy policies, and we do not accept any responsibility or liability for their policies."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Updates to This Policy"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"We may update our Cookie Policy from time to time. Any changes will be posted on this page with an updated revision date."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=8599)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68019],{8599:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/cookies",function(){return r(31661)}])},31661:(e,s,r)=>{"use strict";r.r(s),r.d(s,{default:()=>t});var o=r(94513),i=r(88073);function t(){return(0,o.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,o.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)("h1",{className:"text-4xl font-bold",children:"Cookie Policy"}),(0,o.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"What Are Cookies?"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"Cookies are small text files that are placed on your device when you visit our website. They help us provide you with a better experience by remembering your preferences and understanding how you use our site."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Types of Cookies We Use"})}),(0,o.jsxs)(i.CardContent,{className:"text-muted-foreground flex flex-col gap-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Essential Cookies:"}),(0,o.jsx)("p",{children:"These cookies are necessary for the website to function properly."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Performance Cookies:"}),(0,o.jsx)("p",{children:"These cookies help us understand how visitors interact with our website."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("strong",{className:"text-foreground",children:"Functionality Cookies:"}),(0,o.jsx)("p",{children:"These cookies allow us to remember choices you make and provide enhanced features."})]})]})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Managing Cookies"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"Most web browsers allow you to control cookies through their settings. You can set your browser to refuse cookies or delete certain cookies. However, please note that if you disable cookies, some features of our website may not function properly."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Third-Party Cookies"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"We may use third-party services that also use cookies. These third parties have their own privacy policies, and we do not accept any responsibility or liability for their policies."})})]}),(0,o.jsxs)(i.Card,{children:[(0,o.jsx)(i.CardHeader,{children:(0,o.jsx)(i.CardTitle,{children:"Updates to This Policy"})}),(0,o.jsx)(i.CardContent,{className:"text-muted-foreground",children:(0,o.jsx)("p",{children:"We may update our Cookie Policy from time to time. Any changes will be posted on this page with an updated revision date."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=8599)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1446],{16427:(e,r,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/privacy",function(){return s(81600)}])},81600:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>i});var t=s(94513),n=s(94647);function i(){return(0,t.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold",children:"Privacy Policy"}),(0,t.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Information We Collect"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We collect information that you provide directly to us, including when you create an account, use our services, or communicate with us."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"How We Use Your Information"})}),(0,t.jsxs)(n.CardContent,{className:"text-muted-foreground flex flex-col gap-2",children:[(0,t.jsx)("p",{children:"We use the information we collect to:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside flex flex-col gap-1 ml-4",children:[(0,t.jsx)("li",{children:"Provide, maintain, and improve our services"}),(0,t.jsx)("li",{children:"Process transactions and send related information"}),(0,t.jsx)("li",{children:"Send technical notices and support messages"}),(0,t.jsx)("li",{children:"Respond to your comments and questions"})]})]})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Information Sharing"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We do not share your personal information with third parties except as described in this privacy policy or with your consent."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Data Security"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We take reasonable measures to help protect your personal information from loss, theft, misuse, unauthorized access, disclosure, alteration, and destruction."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Your Rights"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"You have the right to access, update, or delete your personal information at any time. Contact us if you wish to exercise these rights."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Changes to This Policy"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We may update this privacy policy from time to time. We will notify you of any changes by posting the new policy on this page."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=16427)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1446],{16427:(e,r,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/privacy",function(){return s(81600)}])},81600:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>i});var t=s(94513),n=s(88073);function i(){return(0,t.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,t.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold",children:"Privacy Policy"}),(0,t.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Information We Collect"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We collect information that you provide directly to us, including when you create an account, use our services, or communicate with us."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"How We Use Your Information"})}),(0,t.jsxs)(n.CardContent,{className:"text-muted-foreground flex flex-col gap-2",children:[(0,t.jsx)("p",{children:"We use the information we collect to:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside flex flex-col gap-1 ml-4",children:[(0,t.jsx)("li",{children:"Provide, maintain, and improve our services"}),(0,t.jsx)("li",{children:"Process transactions and send related information"}),(0,t.jsx)("li",{children:"Send technical notices and support messages"}),(0,t.jsx)("li",{children:"Respond to your comments and questions"})]})]})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Information Sharing"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We do not share your personal information with third parties except as described in this privacy policy or with your consent."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Data Security"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We take reasonable measures to help protect your personal information from loss, theft, misuse, unauthorized access, disclosure, alteration, and destruction."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Your Rights"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"You have the right to access, update, or delete your personal information at any time. Contact us if you wish to exercise these rights."})})]}),(0,t.jsxs)(n.Card,{children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Changes to This Policy"})}),(0,t.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,t.jsx)("p",{children:"We may update this privacy policy from time to time. We will notify you of any changes by posting the new policy on this page."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=16427)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69484],{15219:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/security",function(){return t(18658)}])},18658:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>i});var s=t(94513),a=t(94647);function i(){return(0,s.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("h1",{className:"text-4xl font-bold",children:"Security Policy"}),(0,s.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Our Commitment to Security"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We take the security of your data seriously. We implement industry-standard security measures to protect your personal information from unauthorized access, disclosure, alteration, and destruction."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Data Encryption"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"All data transmitted between your device and our servers is encrypted using industry-standard SSL/TLS protocols. Sensitive data stored in our databases is encrypted at rest using advanced encryption standards."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Access Controls"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"Access to user data is strictly limited to authorized personnel who require it to perform their job functions. We employ multi-factor authentication and regular access reviews to ensure that only authorized individuals can access sensitive information."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Security Monitoring"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We continuously monitor our systems for potential security threats and vulnerabilities. Our security team actively tracks and responds to any suspicious activity or potential security incidents."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Reporting Security Issues"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"If you discover a security vulnerability or have concerns about our security practices, please report it to us immediately. We appreciate responsible disclosure and will work with you to address any legitimate security concerns."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Regular Security Updates"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We regularly update our systems and software to ensure that known security vulnerabilities are patched promptly. Our infrastructure undergoes periodic security audits and penetration testing to identify and address potential weaknesses."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=15219)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69484],{15219:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/security",function(){return t(18658)}])},18658:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>i});var s=t(94513),a=t(88073);function i(){return(0,s.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("h1",{className:"text-4xl font-bold",children:"Security Policy"}),(0,s.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Our Commitment to Security"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We take the security of your data seriously. We implement industry-standard security measures to protect your personal information from unauthorized access, disclosure, alteration, and destruction."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Data Encryption"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"All data transmitted between your device and our servers is encrypted using industry-standard SSL/TLS protocols. Sensitive data stored in our databases is encrypted at rest using advanced encryption standards."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Access Controls"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"Access to user data is strictly limited to authorized personnel who require it to perform their job functions. We employ multi-factor authentication and regular access reviews to ensure that only authorized individuals can access sensitive information."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Security Monitoring"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We continuously monitor our systems for potential security threats and vulnerabilities. Our security team actively tracks and responds to any suspicious activity or potential security incidents."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Reporting Security Issues"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"If you discover a security vulnerability or have concerns about our security practices, please report it to us immediately. We appreciate responsible disclosure and will work with you to address any legitimate security concerns."})})]}),(0,s.jsxs)(a.Card,{children:[(0,s.jsx)(a.CardHeader,{children:(0,s.jsx)(a.CardTitle,{children:"Regular Security Updates"})}),(0,s.jsx)(a.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We regularly update our systems and software to ensure that known security vulnerabilities are patched promptly. Our infrastructure undergoes periodic security audits and penetration testing to identify and address potential weaknesses."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=15219)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30107],{50347:(e,r,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/terms",function(){return i(61029)}])},61029:(e,r,i)=>{"use strict";i.r(r),i.d(r,{default:()=>a});var s=i(94513),n=i(94647);function a(){return(0,s.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("h1",{className:"text-4xl font-bold",children:"Terms of Service"}),(0,s.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"1. Acceptance of Terms"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"By accessing and using this service, you accept and agree to be bound by the terms and provision of this agreement."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"2. Use License"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"Permission is granted to temporarily download one copy of the materials on our service for personal, non-commercial transitory viewing only."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"3. Disclaimer"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"The materials on our service are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"4. Limitations"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on our service."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"5. Revisions"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We may revise these terms of service at any time without notice. By using this service you are agreeing to be bound by the then current version of these terms of service."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=50347)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30107],{50347:(e,r,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/legal/terms",function(){return i(61029)}])},61029:(e,r,i)=>{"use strict";i.r(r),i.d(r,{default:()=>a});var s=i(94513),n=i(88073);function a(){return(0,s.jsx)("div",{className:"container mx-auto max-w-4xl py-16 px-4",children:(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("h1",{className:"text-4xl font-bold",children:"Terms of Service"}),(0,s.jsxs)("p",{className:"text-lg text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString()]})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"1. Acceptance of Terms"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"By accessing and using this service, you accept and agree to be bound by the terms and provision of this agreement."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"2. Use License"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"Permission is granted to temporarily download one copy of the materials on our service for personal, non-commercial transitory viewing only."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"3. Disclaimer"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"The materials on our service are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"4. Limitations"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on our service."})})]}),(0,s.jsxs)(n.Card,{children:[(0,s.jsx)(n.CardHeader,{children:(0,s.jsx)(n.CardTitle,{children:"5. Revisions"})}),(0,s.jsx)(n.CardContent,{className:"text-muted-foreground",children:(0,s.jsx)("p",{children:"We may revise these terms of service at any time without notice. By using this service you are agreeing to be bound by the then current version of these terms of service."})})]})]})})}}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=50347)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43164],{48747:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/private/centrifugo",function(){return a(54893)}])},54893:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>ey});var n=a(94513),t=a(94285),r=a(77625),l=a(7737),i=a(21936),c=a(55833),d=a(60299),o=a(26457),x=a(50314),m=a(71174);let h=(0,t.createContext)(void 0);function u(e){let{children:s}=e,a=(0,m.NG)(),t=(0,m.kG)(),r=(0,m.UI)(),l=(0,m.AS)(),i=(0,m.hn)(),c=(0,m.IO)(),d=async()=>await a(x.FH),o=async e=>await t(e||{},x.FH),u=async e=>await r(e,x.FH),g=async()=>await l(x.FH),j=async e=>await i(e,x.FH),p=async e=>await c(e,x.FH);return(0,n.jsx)(h.Provider,{value:{getAuthToken:d,listChannels:o,getChannelHistory:u,getServerInfo:g,getPresence:j,getPresenceStats:p},children:s})}function g(){let e=(0,t.useContext)(h);if(!e)throw Error("useCentrifugoAdminApiContext must be used within CentrifugoAdminApiProvider");return e}var j=a(10200);let p=(0,t.createContext)(void 0);function b(e){let{children:s}=e,{data:a,error:t,isLoading:r,mutate:l}=(0,j.xv)(x.FH),{data:i,error:c,isLoading:d,mutate:o}=(0,j.w4)(void 0,x.FH),{data:m,error:h,isLoading:u,mutate:g}=(0,j.uL)(void 0,x.FH),{data:b,error:f,isLoading:N,mutate:v}=(0,j.EF)(void 0,x.FH),w=async()=>{await l()},y=async e=>{await o()},C=async e=>{await g()},k=async e=>{await v()};return(0,n.jsx)(p.Provider,{value:{health:a,isLoadingHealth:r,healthError:t,refreshHealth:w,overview:i,isLoadingOverview:d,overviewError:c,refreshOverview:y,timeline:m,isLoadingTimeline:u,timelineError:h,refreshTimeline:C,publishes:b,isLoadingPublishes:N,publishesError:f,refreshPublishes:k},children:s})}function f(){let e=(0,t.useContext)(p);if(!e)throw Error("useCentrifugoMonitoringContext must be used within CentrifugoMonitoringProvider");return e}var N=a(50638);let v=(0,t.createContext)(void 0);function w(e){let{children:s}=e,a=(0,N.Sq)(),t=(0,N.CH)(),r=(0,N.VD)(),l=(0,N.oE)(),i=async e=>await a(e,x.FH),c=async e=>await t(e,x.FH),d=async e=>await r(e,x.FH),o=async e=>await l(e,x.FH);return(0,n.jsx)(v.Provider,{value:{generateConnectionToken:i,publishTest:c,publishWithLogging:d,sendAck:o},children:s})}function y(){let e=(0,t.useContext)(v);if(!e)throw Error("useCentrifugoTestingContext must be used within CentrifugoTestingProvider");return e}var C=a(71964);let k=(0,t.createContext)(void 0);function A(e){let{children:s}=e,{generateConnectionToken:a,publishTest:l}=y(),[i,c]=(0,t.useState)(!1),[d,o]=(0,t.useState)(!1),[x,m]=(0,t.useState)(null),[h,u]=(0,t.useState)(null),[g,j]=(0,t.useState)([]),[p,b]=(0,t.useState)(new Map),[f,N]=(0,t.useState)(0),v=(0,t.useRef)(null),w=(0,t.useRef)(0),A=(0,t.useCallback)(e=>{j(s=>[{...e,id:"event-".concat(w.current++),timestamp:new Date},...s].slice(0,100))},[]),S=(0,t.useCallback)(async()=>{if(!v.current&&!d){o(!0),m(null);try{let e=await a({user_id:"test-user",channels:[]}),s=e.centrifugo_url,n=new C.Ft(s,{token:e.token});n.on("connected",e=>{console.log("✅ Connected to Centrifugo:",e),c(!0),o(!1),u(new Date),A({type:"connected",message:"Connected to Centrifugo server",data:e})}),n.on("disconnected",e=>{console.warn("⚠️ Disconnected from Centrifugo:",e),c(!1),o(!1),u(null),N(0),A({type:"disconnected",message:"Disconnected: ".concat(e.reason),data:e})}),n.on("error",e=>{console.error("❌ Centrifugo error:",e),m(e.error.message),A({type:"error",message:"Error: ".concat(e.error.message),data:e})}),n.connect(),v.current=n,A({type:"info",message:"Connecting to Centrifugo..."})}catch(e){console.error("Failed to connect:",e),o(!1),m(e.message),A({type:"error",message:"Connection failed: ".concat(e.message)})}}},[d,a,A]),E=(0,t.useCallback)(()=>{v.current&&(p.forEach(e=>{e.subscription.unsubscribe()}),b(new Map),v.current.disconnect(),v.current=null,c(!1),A({type:"info",message:"Disconnected from Centrifugo"}))},[p,A]),_=(0,t.useCallback)(async e=>{let s=v.current;if(!s||!i)throw Error("Not connected to Centrifugo");if(p.has(e))return void A({type:"info",channel:e,message:"Already subscribed to ".concat(e)});let a=s.newSubscription(e);a.on("subscribed",s=>{console.log("✅ Subscribed to ".concat(e,":"),s),A({type:"subscribed",channel:e,message:"Subscribed to ".concat(e),data:s})}),a.on("unsubscribed",s=>{console.log("⚠️ Unsubscribed from ".concat(e,":"),s),A({type:"unsubscribed",channel:e,message:"Unsubscribed from ".concat(e),data:s})}),a.on("publication",s=>{console.log("\uD83D\uDCE9 Message on ".concat(e,":"),s.data),N(e=>e+1),b(a=>{let n=new Map(a),t=n.get(e);return t&&(t.lastMessage=s.data,t.messageCount++),n}),A({type:"publication",channel:e,message:"Received message on ".concat(e),data:s.data})}),a.on("error",s=>{console.error("❌ Subscription error on ".concat(e,":"),s),A({type:"error",channel:e,message:"Subscription error: ".concat(s.error.message),data:s})}),a.subscribe(),b(s=>{let n=new Map(s);return n.set(e,{channel:e,subscription:a,messageCount:0}),n})},[i,p,A]),F=(0,t.useCallback)(e=>{let s=p.get(e);s&&(s.subscription.unsubscribe(),b(s=>{let a=new Map(s);return a.delete(e),a}),A({type:"info",channel:e,message:"Unsubscribed from ".concat(e)}))},[p,A]),D=(0,t.useCallback)(()=>{p.forEach(e=>{e.subscription.unsubscribe()}),b(new Map),A({type:"info",message:"Unsubscribed from all channels"})},[p,A]),M=(0,t.useCallback)(async(e,s)=>{if(!i)throw Error("Not connected to Centrifugo");await l({channel:e,data:s,wait_for_ack:!1,ack_timeout:5}),A({type:"info",channel:e,message:"Published message to ".concat(e),data:s})},[i,l,A]),L=(0,t.useCallback)(()=>{j([])},[]),P=[{id:"simple-notification",name:"Simple Notification",description:"Fire-and-forget notification to user#test-123",channel:"user#test-123",icon:"notifications",color:"blue",action:async()=>{await _("user#test-123"),await M("user#test-123",{type:"notification",title:"Test Notification",message:"This is a simple test notification"})}},{id:"ack-notification",name:"ACK Required",description:"Message with acknowledgment tracking",channel:"user#test-123",icon:"check_circle",color:"green",action:async()=>{await _("user#test-123"),await l({channel:"user#test-123",data:{type:"notification",title:"ACK Test",message:"Please acknowledge this message"},wait_for_ack:!0,ack_timeout:10})}},{id:"broadcast",name:"Team Broadcast",description:"Broadcast to team#developers channel",channel:"team#developers",icon:"campaign",color:"orange",action:async()=>{await _("team#developers"),await M("team#developers",{type:"announcement",title:"Team Update",message:"New deployment is ready!"})}}],T=(0,t.useCallback)(async e=>{if(!i)return void(0,r.oRP)({title:"Not Connected",description:"Please connect to Centrifugo first",variant:"destructive"});let s=P.find(s=>s.id===e);if(!s)return void(0,r.oRP)({title:"Scenario Not Found",description:"Scenario not found: ".concat(e),variant:"destructive"});A({type:"info",message:"Running scenario: ".concat(s.name)}),await s.action()},[i,A,P]),I={isConnected:i,isConnecting:d,connectionError:x,connectionTime:h,centrifuge:v.current,connect:S,disconnect:E,subscriptions:p,subscribe:_,unsubscribe:F,unsubscribeAll:D,publish:M,events:g,clearEvents:L,totalMessagesReceived:f,quickScenarios:P,runScenario:T};return(0,n.jsx)(k.Provider,{value:I,children:s})}function S(){let e=(0,t.useContext)(k);if(!e)throw Error("useCentrifugoLiveTestingContext must be used within CentrifugoLiveTestingProvider");return e}var E=a(47857),_=a(83322),F=a(47019);let D=()=>{let{health:e,isLoadingHealth:s,healthError:a}=f();if(s)return(0,n.jsx)(r.FcD,{children:(0,n.jsx)(r.EAD,{className:"h-4 w-full"})});if(a)return(0,n.jsxs)(r.FcD,{variant:"destructive",children:[(0,n.jsx)(E.A,{className:"h-4 w-4"}),(0,n.jsx)(r.XL1,{children:"Health Check Failed"}),(0,n.jsx)(r.TND,{children:"Unable to connect to Centrifugo monitoring service."})]});if(!e)return null;let t="healthy"===e.status;return(0,n.jsxs)(r.FcD,{variant:t?"default":"destructive",children:[t?(0,n.jsx)(_.A,{className:"h-4 w-4 text-green-600"}):(0,n.jsx)(F.A,{className:"h-4 w-4"}),(0,n.jsxs)(r.XL1,{className:"flex items-center gap-2",children:["System Status",t?(0,n.jsx)(r.Exy,{variant:"default",className:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",children:"Healthy"}):(0,n.jsx)(r.Exy,{variant:"destructive",children:"Issues Detected"})]}),(0,n.jsxs)(r.TND,{className:"mt-2 space-y-2",children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium",children:"Wrapper URL:"}),(0,n.jsx)("span",{className:"text-sm text-muted-foreground",children:e.wrapper_url||"Not configured"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium",children:"API Key:"}),e.has_api_key?(0,n.jsx)(r.Exy,{variant:"default",className:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",children:"Configured"}):(0,n.jsx)(r.Exy,{variant:"destructive",children:"Not configured"})]})]}),(0,n.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Last checked: ",new Date(e.timestamp).toLocaleString()]})]})]})};var M=a(13330),L=a(80574);let P=()=>{let{overview:e,isLoadingOverview:s}=f(),a=(0,t.useMemo)(()=>{if(!e)return{total:0,successful:0,failed:0,timeout:0,successRate:0,avgDuration:0};let{total:s,successful:a,failed:n,timeout:t,success_rate:r,avg_duration_ms:l}=e;return{total:s,successful:a,failed:n+t,timeout:t,successRate:Math.round(r||0),avgDuration:Math.round(l||0)}},[e]);return s?(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[void 0,void 0,void 0,void 0].map((e,s)=>(0,n.jsx)(r.ZpM,{children:(0,n.jsx)(r.Wux,{className:"p-6",children:(0,n.jsx)(r.EAD,{className:"h-20 w-full"})})},s))}):(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(M.A,{className:"h-8 w-8 text-purple-500"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"Today"})]}),(0,n.jsx)("h3",{className:"text-2xl font-bold mb-1",children:a.total.toLocaleString()}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Total Publishes"})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(_.A,{className:"h-8 w-8 text-green-500"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"Rate"})]}),(0,n.jsxs)("h3",{className:"text-2xl font-bold mb-1",children:[a.successRate,(0,n.jsx)("span",{className:"text-lg text-muted-foreground",children:"%"})]}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Success Rate"})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(L.A,{className:"h-8 w-8 text-yellow-500"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"Average"})]}),(0,n.jsxs)("h3",{className:"text-2xl font-bold mb-1",children:[a.avgDuration,(0,n.jsx)("span",{className:"text-lg text-muted-foreground",children:"ms"})]}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Avg Duration"})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(E.A,{className:"h-8 w-8 text-red-500"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"Issues"})]}),(0,n.jsx)("h3",{className:"text-2xl font-bold mb-1",children:a.failed.toLocaleString()}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Failed/Timeout"})]})})]})};var T=a(79145),I=a(84963),O=a(69673);let R=()=>{var e;let{overview:s,timeline:a,isLoadingOverview:l,isLoadingTimeline:i}=f(),c=(0,t.useMemo)(()=>{if(!s)return{totalAcks:0,avgAcks:"0.0",ackRate:0};let e=s.avg_acks_received||0,a=s.total||0,n=Math.round(e*a);return{totalAcks:n,avgAcks:e.toFixed(1),ackRate:a>0?Math.round(e/a*100):0}},[s]);return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)(r.ZBx,{className:"flex items-center gap-2",children:[(0,n.jsx)(T.A,{className:"h-5 w-5 text-purple-500"}),"Publish Timeline (24h)"]})}),(0,n.jsx)(r.Wux,{children:i?(0,n.jsx)(r.EAD,{className:"h-[200px] w-full"}):(0,n.jsxs)("div",{className:"h-[200px] flex items-center justify-center text-muted-foreground",children:["Chart visualization placeholder",(0,n.jsx)("br",{}),(0,n.jsxs)("span",{className:"text-xs mt-2",children:[(null==a||null==(e=a.channels)?void 0:e.length)||0," channels available"]})]})})]}),(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)(r.ZBx,{className:"flex items-center gap-2",children:[(0,n.jsx)(I.A,{className:"h-5 w-5 text-purple-500"}),"Success/Failure Breakdown"]})}),(0,n.jsx)(r.Wux,{children:l?(0,n.jsx)(r.EAD,{className:"h-[200px] w-full"}):(0,n.jsx)("div",{className:"h-[200px] flex items-center justify-center",children:(0,n.jsx)("div",{className:"text-center",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-3xl font-bold text-green-600",children:(null==s?void 0:s.successful)||0}),(0,n.jsx)("div",{className:"text-sm text-muted-foreground",children:"Success"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-3xl font-bold text-red-600",children:((null==s?void 0:s.failed)||0)+((null==s?void 0:s.timeout)||0)}),(0,n.jsx)("div",{className:"text-sm text-muted-foreground",children:"Failed"})]})]})})})})]})]}),(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)(r.ZBx,{className:"flex items-center gap-2",children:[(0,n.jsx)(O.A,{className:"h-5 w-5 text-purple-500"}),"ACK Statistics"]})}),(0,n.jsx)(r.Wux,{children:l?(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[void 0,void 0,void 0].map((e,s)=>(0,n.jsx)(r.EAD,{className:"h-20 w-full"},s))}):(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-4",children:[(0,n.jsx)("div",{className:"text-sm text-muted-foreground mb-1",children:"Total ACKs Received"}),(0,n.jsx)("div",{className:"text-2xl font-bold",children:c.totalAcks.toLocaleString()})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-4",children:[(0,n.jsx)("div",{className:"text-sm text-muted-foreground mb-1",children:"Avg ACKs per Publish"}),(0,n.jsx)("div",{className:"text-2xl font-bold",children:c.avgAcks})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-4",children:[(0,n.jsx)("div",{className:"text-sm text-muted-foreground mb-1",children:"ACK Tracking Rate"}),(0,n.jsxs)("div",{className:"text-2xl font-bold",children:[c.ackRate,"%"]})]})})]})})]})]})};var H=a(51352);let B=()=>{var e,s;let{publishes:a,isLoadingPublishes:l,refreshPublishes:i}=f(),[c,d]=(0,t.useState)("all"),[o,x]=(0,t.useState)("all"),[m,h]=(0,t.useState)(0),u=(0,t.useMemo)(()=>(null==a?void 0:a.publishes)?Array.from(new Set(a.publishes.map(e=>e.channel))):[],[a]),g=()=>{i({channel:"all"!==c?c:void 0,status:"all"!==o?o:void 0,offset:m,count:50})};return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(r.ZBx,{children:"Recent Publishes"}),(0,n.jsxs)(r.$nd,{onClick:g,variant:"outline",size:"sm",disabled:l,children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})]})}),(0,n.jsxs)(r.Wux,{children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 mb-4",children:[(0,n.jsxs)("div",{className:"flex-1 min-w-[200px]",children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Filter by Channel"}),(0,n.jsxs)(r.l6P,{value:c,onValueChange:d,children:[(0,n.jsx)(r.bqE,{children:(0,n.jsx)(r.yvm,{placeholder:"All Channels"})}),(0,n.jsxs)(r.gCo,{children:[(0,n.jsx)(r.ebT,{value:"all",children:"All Channels"}),u.map(e=>(0,n.jsx)(r.ebT,{value:e,children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"flex-1 min-w-[200px]",children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"Filter by Status"}),(0,n.jsxs)(r.l6P,{value:o,onValueChange:x,children:[(0,n.jsx)(r.bqE,{children:(0,n.jsx)(r.yvm,{placeholder:"All Statuses"})}),(0,n.jsxs)(r.gCo,{children:[(0,n.jsx)(r.ebT,{value:"all",children:"All Statuses"}),(0,n.jsx)(r.ebT,{value:"success",children:"Success"}),(0,n.jsx)(r.ebT,{value:"failed",children:"Failed"}),(0,n.jsx)(r.ebT,{value:"timeout",children:"Timeout"})]})]})]}),(0,n.jsx)("div",{className:"flex items-end",children:(0,n.jsx)(r.$nd,{onClick:g,children:"Apply Filters"})})]}),l?(0,n.jsx)(r.EAD,{className:"h-[400px] w-full"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.XIK,{children:[(0,n.jsx)(r.A0N,{children:(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.ndF,{children:"Timestamp"}),(0,n.jsx)(r.ndF,{children:"Message ID"}),(0,n.jsx)(r.ndF,{children:"Channel"}),(0,n.jsx)(r.ndF,{children:"Status"}),(0,n.jsx)(r.ndF,{children:"ACKs"}),(0,n.jsx)(r.ndF,{children:"Duration"})]})}),(0,n.jsx)(r.BFY,{children:(null==a||null==(e=a.publishes)?void 0:e.length)===0?(0,n.jsx)(r.Hjg,{children:(0,n.jsx)(r.nA6,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"No publishes found"})}):null==a||null==(s=a.publishes)?void 0:s.map(e=>{var s;return(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.nA6,{children:new Date(e.created_at).toLocaleString()}),(0,n.jsxs)(r.nA6,{className:"font-mono text-xs",children:[null==(s=e.message_id)?void 0:s.substring(0,8),"..."]}),(0,n.jsx)(r.nA6,{children:e.channel}),(0,n.jsx)(r.nA6,{children:(e=>{switch(e){case"success":return(0,n.jsx)(r.Exy,{variant:"default",className:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",children:"Success"});case"failed":return(0,n.jsx)(r.Exy,{variant:"destructive",children:"Failed"});case"timeout":return(0,n.jsx)(r.Exy,{variant:"secondary",children:"Timeout"});default:return(0,n.jsx)(r.Exy,{children:e})}})(e.status)}),(0,n.jsx)(r.nA6,{children:e.acks_received||0}),(0,n.jsxs)(r.nA6,{children:[e.duration_ms,"ms"]})]},e.id)})})]}),(0,n.jsxs)("div",{className:"flex justify-between items-center mt-4",children:[(0,n.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Showing ",(null==a?void 0:a.count)||0," of ",(null==a?void 0:a.total_available)||0," publishes"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(r.$nd,{onClick:()=>{let e=Math.max(0,m-50);h(e),i({channel:"all"!==c?c:void 0,status:"all"!==o?o:void 0,offset:e,count:50})},variant:"outline",size:"sm",disabled:0===m,children:"Previous"}),(0,n.jsx)(r.$nd,{onClick:()=>{let e=m+50;h(e),i({channel:"all"!==c?c:void 0,status:"all"!==o?o:void 0,offset:e,count:50})},variant:"outline",size:"sm",disabled:!(null==a?void 0:a.has_more),children:"Next"})]})]})]})]})]})};var Z=a(83708),G=a(73548);let z={OPEN_PUBLISH_TEST_DIALOG:"OPEN_PUBLISH_TEST_DIALOG",OPEN_PUBLISH_WITH_LOGGING_DIALOG:"OPEN_PUBLISH_WITH_LOGGING_DIALOG",OPEN_SEND_ACK_DIALOG:"OPEN_SEND_ACK_DIALOG",OPEN_CHANNEL_HISTORY_DIALOG:"OPEN_CHANNEL_HISTORY_DIALOG",OPEN_CHANNEL_PRESENCE_DIALOG:"OPEN_CHANNEL_PRESENCE_DIALOG",REFRESH_PUBLISHES:"REFRESH_PUBLISHES"},W=()=>{let{timeline:e,isLoadingTimeline:s,refreshTimeline:a}=f(),t=(null==e?void 0:e.channels)||[];return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(r.ZBx,{children:"Channel Statistics"}),(0,n.jsxs)(r.$nd,{onClick:()=>a(),variant:"outline",size:"sm",disabled:s,children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})]})}),(0,n.jsx)(r.Wux,{children:s?(0,n.jsx)(r.EAD,{className:"h-[400px] w-full"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.XIK,{children:[(0,n.jsx)(r.A0N,{children:(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.ndF,{children:"Channel"}),(0,n.jsx)(r.ndF,{children:"Total Publishes"}),(0,n.jsx)(r.ndF,{children:"Success Rate"}),(0,n.jsx)(r.ndF,{children:"Avg Duration"}),(0,n.jsx)(r.ndF,{children:"Avg ACKs"}),(0,n.jsx)(r.ndF,{children:"Last Activity"}),(0,n.jsx)(r.ndF,{className:"text-right",children:"Actions"})]})}),(0,n.jsx)(r.BFY,{children:0===t.length?(0,n.jsx)(r.Hjg,{children:(0,n.jsx)(r.nA6,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"No channel data available"})}):t.map(e=>{var s;let a=e.total>0?Math.round(e.successful/e.total*100):0;return(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.nA6,{className:"font-medium",children:e.channel}),(0,n.jsx)(r.nA6,{children:e.total.toLocaleString()}),(0,n.jsxs)(r.nA6,{children:[a,"%"]}),(0,n.jsxs)(r.nA6,{children:[Math.round(e.avg_duration_ms),"ms"]}),(0,n.jsx)(r.nA6,{children:(null==(s=e.avg_acks)?void 0:s.toFixed(1))||"0.0"}),(0,n.jsx)(r.nA6,{children:e.last_activity_at?new Date(e.last_activity_at).toLocaleString():"N/A"}),(0,n.jsxs)(r.nA6,{className:"text-right space-x-2",children:[(0,n.jsx)(r.$nd,{variant:"ghost",size:"sm",onClick:()=>{var s;return s={channel:e.channel},void r.AZP.publish({type:z.OPEN_CHANNEL_HISTORY_DIALOG,payload:s})},children:(0,n.jsx)(Z.A,{className:"h-4 w-4"})}),(0,n.jsx)(r.$nd,{variant:"ghost",size:"sm",onClick:()=>{var s;return s={channel:e.channel},void r.AZP.publish({type:z.OPEN_CHANNEL_PRESENCE_DIALOG,payload:s})},children:(0,n.jsx)(G.A,{className:"h-4 w-4"})})]})]},e.channel)})})]}),(0,n.jsx)("div",{className:"mt-4 text-sm text-muted-foreground",children:"Showing statistics for the last 24 hours"})]})})]})};var K=a(74564);let U=()=>{var e;let{listChannels:s}=g(),[a,l]=(0,t.useState)(null),[i,c]=(0,t.useState)(""),[d,o]=(0,t.useState)(!1),x=async()=>{o(!0);try{let e=await s(i?{pattern:i}:void 0);l(e)}catch(e){console.error("Failed to load channels:",e)}finally{o(!1)}};return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsx)(r.ZBx,{children:"Live Channels"})}),(0,n.jsx)(r.Wux,{children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(r.pde,{placeholder:"Channel pattern (e.g., user:*)",value:i,onChange:e=>c(e.target.value),className:"flex-1"}),(0,n.jsxs)(r.$nd,{onClick:x,disabled:d,children:[(0,n.jsx)(K.A,{className:"h-4 w-4 mr-2"}),"Load Channels"]})]}),a&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Found ",(null==(e=a.channels)?void 0:e.length)||0," active channels"]}),(0,n.jsxs)(r.$nd,{onClick:x,variant:"outline",size:"sm",disabled:d,children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})]}),a.channels&&a.channels.length>0?(0,n.jsxs)(r.XIK,{children:[(0,n.jsx)(r.A0N,{children:(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.ndF,{children:"Channel"}),(0,n.jsx)(r.ndF,{children:"Status"})]})}),(0,n.jsx)(r.BFY,{children:a.channels.map(e=>(0,n.jsxs)(r.Hjg,{children:[(0,n.jsx)(r.nA6,{className:"font-medium",children:e}),(0,n.jsx)(r.nA6,{children:(0,n.jsx)(r.Exy,{variant:"default",className:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",children:"Active"})})]},e))})]}):(0,n.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No active channels found"})]}),!a&&(0,n.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:'Click "Load Channels" to view active channels'})]})})]})};var V=a(58526),$=a(57147);let X=()=>{let{quickScenarios:e,runScenario:s,isConnected:a}=S(),[l,i]=(0,t.useState)(null),c=async e=>{i(e);try{await s(e)}catch(e){console.error("Failed to run scenario:",e)}finally{i(null)}};return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)($.A,{className:"h-5 w-5 text-yellow-500"}),(0,n.jsx)(r.ZBx,{children:"Quick Test Scenarios"})]}),a&&(0,n.jsx)(r.Exy,{variant:"outline",className:"bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-300 border-green-200 dark:border-green-800",children:"Connected"})]})}),(0,n.jsxs)(r.Wux,{children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"One-click test scenarios that automatically connect, subscribe, and publish test messages."}),(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>{let s=(e=>{let s={blue:{bg:"bg-blue-50 dark:bg-blue-950/20",border:"border-blue-200 dark:border-blue-800",icon:"text-blue-500",button:"bg-blue-600 hover:bg-blue-700"},green:{bg:"bg-green-50 dark:bg-green-950/20",border:"border-green-200 dark:border-green-800",icon:"text-green-500",button:"bg-green-600 hover:bg-green-700"},orange:{bg:"bg-orange-50 dark:bg-orange-950/20",border:"border-orange-200 dark:border-orange-800",icon:"text-orange-500",button:"bg-orange-600 hover:bg-orange-700"},purple:{bg:"bg-purple-50 dark:bg-purple-950/20",border:"border-purple-200 dark:border-purple-800",icon:"text-purple-500",button:"bg-purple-600 hover:bg-purple-700"}};return s[e]||s.blue})(e.color),a=l===e.id;return(0,n.jsx)(r.ZpM,{className:"".concat(s.bg," border ").concat(s.border),children:(0,n.jsxs)(r.Wux,{className:"p-4",children:[(0,n.jsx)("div",{className:"flex items-start justify-between mb-3",children:(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h4",{className:"font-semibold mb-1",children:e.name}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]})}),(0,n.jsx)("div",{className:"bg-background/50 rounded p-2 mb-3 border border-border",children:(0,n.jsxs)("code",{className:"text-xs",children:["→ Connect",(0,n.jsx)("br",{}),"→ Subscribe to ",e.channel,(0,n.jsx)("br",{}),"→ Publish message",(0,n.jsx)("br",{}),"→ Receive immediately"]})}),(0,n.jsxs)(r.$nd,{onClick:()=>c(e.id),disabled:a,className:"w-full ".concat(s.button," text-white"),size:"sm",children:[(0,n.jsx)(V.A,{className:"h-4 w-4 mr-2"}),a?"Running...":"Run Scenario"]})]})},e.id)})})]})]})};var Y=a(68332),J=a(13121);let q=()=>{let{events:e,clearEvents:s}=S(),a=(0,t.useRef)(null),[i,c]=(0,t.useState)(!0),[d,o]=(0,t.useState)(""),[x,m]=(0,t.useState)([]);(0,t.useEffect)(()=>{i&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[e,i]);let h=(0,t.useMemo)(()=>{let s=[...e].reverse();if(x.length>0&&(s=s.filter(e=>x.includes(e.type))),d.trim()){let e=d.toLowerCase();s=s.filter(s=>{var a;return s.message.toLowerCase().includes(e)||(null==(a=s.channel)?void 0:a.toLowerCase().includes(e))||JSON.stringify(s.data).toLowerCase().includes(e)})}return s},[e,x,d]),u=e=>e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsxs)(r.aRn,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.A,{className:"h-5 w-5 text-purple-500"}),(0,n.jsx)(r.ZBx,{children:"Live Event Log"}),(0,n.jsxs)(r.Exy,{variant:"outline",children:[e.length," total"]}),h.length!==e.length&&(0,n.jsxs)(r.Exy,{variant:"outline",className:"bg-blue-50 dark:bg-blue-950/20 text-blue-700 dark:text-blue-300",children:[h.length," filtered"]})]}),(0,n.jsx)("div",{className:"flex gap-2",children:e.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.$nd,{variant:"outline",size:"sm",onClick:()=>{let e=new Blob([h.map(e=>"[".concat(u(e.timestamp),"] ").concat(e.type.toUpperCase()).concat(e.channel?" [".concat(e.channel,"]"):"",": ").concat(e.message)).join("\n")],{type:"text/plain"}),s=URL.createObjectURL(e),a=document.createElement("a");a.href=s,a.download="centrifugo-logs-".concat(Date.now(),".txt"),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},children:[(0,n.jsx)(Y.A,{className:"h-4 w-4 mr-2"}),"Export"]}),(0,n.jsxs)(r.$nd,{variant:"outline",size:"sm",onClick:s,children:[(0,n.jsx)(J.A,{className:"h-4 w-4 mr-2"}),"Clear"]})]})})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(K.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,n.jsx)(r.pde,{placeholder:"Search events...",value:d,onChange:e=>o(e.target.value),className:"pl-9"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsxs)(r.OY8,{type:"multiple",value:x,onValueChange:e=>{m(e)},className:"flex-wrap justify-start",children:[(0,n.jsx)(r.dzE,{value:"error",size:"sm",className:"text-xs",children:"❌ Error"}),(0,n.jsx)(r.dzE,{value:"publication",size:"sm",className:"text-xs",children:"\uD83D\uDCE9 Pub"}),(0,n.jsx)(r.dzE,{value:"connected",size:"sm",className:"text-xs",children:"\uD83D\uDFE2 Conn"}),(0,n.jsx)(r.dzE,{value:"disconnected",size:"sm",className:"text-xs",children:"\uD83D\uDD34 Disc"}),(0,n.jsx)(r.dzE,{value:"subscribed",size:"sm",className:"text-xs",children:"\uD83D\uDCE1 Sub"}),(0,n.jsx)(r.dzE,{value:"unsubscribed",size:"sm",className:"text-xs",children:"\uD83D\uDCF4 Unsub"}),(0,n.jsx)(r.dzE,{value:"info",size:"sm",className:"text-xs",children:"ℹ️ Info"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,n.jsx)(r.dOG,{id:"auto-scroll",checked:i,onCheckedChange:c}),(0,n.jsx)("label",{htmlFor:"auto-scroll",className:"text-sm text-muted-foreground whitespace-nowrap cursor-pointer",children:"Auto-scroll"})]})]})]})]}),(0,n.jsx)(r.Wux,{children:(0,n.jsx)(r.FKN,{className:"h-[400px] w-full rounded-md border border-border bg-muted/20 p-4",ref:a,children:0===h.length?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[(0,n.jsx)(l.A,{className:"h-12 w-12 mb-2 opacity-20"}),(0,n.jsx)("p",{className:"text-sm",children:0===e.length?"No events yet. Connect to Centrifugo to see real-time events.":"No events match your filters."})]}):(0,n.jsx)("div",{className:"space-y-2 font-mono text-xs",children:h.map(e=>{let s={connected:{badge:"bg-green-100 dark:bg-green-950/50 text-green-700 dark:text-green-300 border-green-300 dark:border-green-800",icon:"\uD83D\uDFE2",text:"text-green-700 dark:text-green-300"},disconnected:{badge:"bg-red-100 dark:bg-red-950/50 text-red-700 dark:text-red-300 border-red-300 dark:border-red-800",icon:"\uD83D\uDD34",text:"text-red-700 dark:text-red-300"},subscribed:{badge:"bg-blue-100 dark:bg-blue-950/50 text-blue-700 dark:text-blue-300 border-blue-300 dark:border-blue-800",icon:"\uD83D\uDCE1",text:"text-blue-700 dark:text-blue-300"},unsubscribed:{badge:"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-700",icon:"\uD83D\uDCF4",text:"text-gray-700 dark:text-gray-300"},publication:{badge:"bg-purple-100 dark:bg-purple-950/50 text-purple-700 dark:text-purple-300 border-purple-300 dark:border-purple-800",icon:"\uD83D\uDCE9",text:"text-purple-700 dark:text-purple-300"},error:{badge:"bg-red-100 dark:bg-red-950/50 text-red-700 dark:text-red-300 border-red-300 dark:border-red-800",icon:"❌",text:"text-red-700 dark:text-red-300"},info:{badge:"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-700",icon:"ℹ️",text:"text-gray-700 dark:text-gray-300"}}[e.type];return(0,n.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded bg-background/50 border border-border hover:bg-background/80 transition-colors",children:[(0,n.jsx)("span",{className:"text-base flex-shrink-0",children:s.icon}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,n.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:u(e.timestamp)}),(0,n.jsx)(r.Exy,{variant:"outline",className:"".concat(s.badge," text-xs flex-shrink-0"),children:e.type}),e.channel&&(0,n.jsx)(r.Exy,{variant:"outline",className:"text-xs flex-shrink-0",children:e.channel})]}),(0,n.jsx)("p",{className:"".concat(s.text," break-words"),children:e.message}),e.data&&(0,n.jsxs)("details",{className:"mt-1",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-xs text-muted-foreground hover:text-foreground",children:"View data"}),(0,n.jsx)("pre",{className:"mt-1 p-2 bg-muted rounded text-[10px] overflow-x-auto",children:JSON.stringify(e.data,null,2)})]})]})]},e.id)})})})})]})};var Q=a(3032),ee=a(35685);let es=()=>{let{subscriptions:e,subscribe:s,unsubscribe:a,unsubscribeAll:l,publish:i,isConnected:c}=S(),[o,x]=(0,t.useState)(""),[m,h]=(0,t.useState)(!1),[u,g]=(0,t.useState)(null),[j,p]=(0,t.useState)({}),b=async()=>{if(o.trim()){h(!0);try{await s(o.trim()),x("")}catch(e){console.error("Failed to subscribe:",e)}finally{h(!1)}}},f=async e=>{let s=j[e]||"";if(s.trim()){g(e);try{let a;try{a=JSON.parse(s)}catch(e){a=s}await i(e,a),p(s=>({...s,[e]:""}))}catch(e){console.error("Failed to publish:",e)}finally{g(null)}}},N=Array.from(e.values());return(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.A,{className:"h-5 w-5 text-blue-500"}),(0,n.jsx)(r.ZBx,{children:"Active Subscriptions"}),(0,n.jsxs)(r.Exy,{variant:"outline",children:[N.length," channels"]})]}),N.length>0&&(0,n.jsxs)(r.$nd,{variant:"outline",size:"sm",onClick:l,children:[(0,n.jsx)(J.A,{className:"h-4 w-4 mr-2"}),"Unsubscribe All"]})]})}),(0,n.jsxs)(r.Wux,{children:[(0,n.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,n.jsx)(r.pde,{placeholder:"Channel name (e.g., user#123, team#dev)",value:o,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"!==e.key||m||b()},disabled:!c||m,className:"flex-1"}),(0,n.jsxs)(r.$nd,{onClick:b,disabled:!c||m||!o.trim(),size:"sm",children:[(0,n.jsx)(Q.A,{className:"h-4 w-4 mr-2"}),"Subscribe"]})]}),!c&&(0,n.jsxs)("div",{className:"flex items-center justify-center p-6 text-muted-foreground text-sm bg-muted/20 rounded border border-border",children:[(0,n.jsx)(d.A,{className:"h-8 w-8 mr-2 opacity-20"}),(0,n.jsx)("p",{children:"Connect to Centrifugo to manage subscriptions"})]}),c&&0===N.length&&(0,n.jsxs)("div",{className:"flex items-center justify-center p-6 text-muted-foreground text-sm bg-muted/20 rounded border border-border",children:[(0,n.jsx)(ee.A,{className:"h-8 w-8 mr-2 opacity-20"}),(0,n.jsx)("p",{children:"No active subscriptions. Subscribe to a channel to start receiving messages."})]}),N.length>0&&(0,n.jsx)("div",{className:"space-y-2",children:N.map(e=>{var s;return(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 rounded border border-border bg-background/50 hover:bg-background transition-colors",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,n.jsx)(d.A,{className:"h-4 w-4 text-green-500 flex-shrink-0 animate-pulse"}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,n.jsx)("code",{className:"text-sm font-mono font-semibold truncate",children:e.channel}),(0,n.jsxs)(r.Exy,{variant:"outline",className:"text-xs flex-shrink-0",children:[e.messageCount," ",1===e.messageCount?"message":"messages"]})]}),e.lastMessage&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground truncate",children:["Last: ","string"==typeof e.lastMessage?e.lastMessage:JSON.stringify(e.lastMessage).slice(0,50),"..."]})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,n.jsxs)(r.AMh,{children:[(0,n.jsx)(r.Wvm,{asChild:!0,children:(0,n.jsx)(r.$nd,{variant:"ghost",size:"sm",children:(0,n.jsx)(M.A,{className:"h-4 w-4"})})}),(0,n.jsx)(r.hlN,{className:"w-80",children:(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-sm mb-1",children:"Quick Publish"}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Send a message to ",(0,n.jsx)("code",{className:"text-xs",children:e.channel})]})]}),(0,n.jsx)(r.TMX,{placeholder:'{"type": "notification", "message": "Hello!"}',value:j[e.channel]||"",onChange:s=>p(a=>({...a,[e.channel]:s.target.value})),rows:4,className:"font-mono text-xs"}),(0,n.jsxs)(r.$nd,{onClick:()=>f(e.channel),disabled:!(null==(s=j[e.channel])?void 0:s.trim())||u===e.channel,className:"w-full",size:"sm",children:[(0,n.jsx)(M.A,{className:"h-4 w-4 mr-2"}),u===e.channel?"Sending...":"Send Message"]})]})})]}),(0,n.jsx)(r.$nd,{variant:"ghost",size:"sm",onClick:()=>{a(e.channel)},children:(0,n.jsx)(J.A,{className:"h-4 w-4"})})]})]},e.channel)})})]})]})};var ea=a(69489),en=a(53765);let et=()=>{let{isConnected:e,isConnecting:s,connectionTime:a,subscriptions:l,totalMessagesReceived:i}=S(),[c,o]=(0,t.useState)("--:--:--");return(0,t.useEffect)(()=>{if(!a||!e)return void o("--:--:--");let s=()=>{let e=Math.floor((new Date().getTime()-a.getTime())/1e3),s=Math.floor(e/3600),n=Math.floor(e%3600/60);o("".concat(s.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0"),":").concat((e%60).toString().padStart(2,"0")))};s();let n=setInterval(s,1e3);return()=>clearInterval(n)},[a,e]),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,n.jsx)(ea.A,{className:"h-4 w-4 animate-pulse"}):e?(0,n.jsx)(ea.A,{className:"h-4 w-4"}):(0,n.jsx)(en.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"font-semibold text-sm",children:"Connection Status"})]}),(0,n.jsxs)(r.Exy,{variant:"outline",className:"".concat(e?"bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-300 border-green-300 dark:border-green-800":"bg-red-50 dark:bg-red-950/20 text-red-700 dark:text-red-300 border-red-300 dark:border-red-800"),children:[(0,n.jsx)("div",{className:"w-2 h-2 rounded-full ".concat(s?"bg-yellow-500":e?"bg-green-500":"bg-red-500"," mr-2 ").concat(e?"animate-pulse":"")}),s?"Connecting...":e?"Connected":"Disconnected"]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center p-3 rounded-lg bg-muted/30 border border-border",children:[(0,n.jsx)(L.A,{className:"h-5 w-5 text-blue-500 mb-1"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground mb-1",children:"Uptime"}),(0,n.jsx)("span",{className:"text-lg font-mono font-semibold",children:c})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center p-3 rounded-lg bg-muted/30 border border-border",children:[(0,n.jsx)(ee.A,{className:"h-5 w-5 text-purple-500 mb-1"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground mb-1",children:"Messages"}),(0,n.jsx)("span",{className:"text-lg font-mono font-semibold",children:i})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center p-3 rounded-lg bg-muted/30 border border-border",children:[(0,n.jsx)(d.A,{className:"h-5 w-5 text-green-500 mb-1"}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground mb-1",children:"Channels"}),(0,n.jsx)("span",{className:"text-lg font-mono font-semibold",children:l.size})]})]})]})})},er=()=>{let{isConnected:e,isConnecting:s,connect:a,disconnect:t}=S();return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,n.jsx)("div",{className:"lg:col-span-2",children:(0,n.jsx)(et,{})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-4 flex flex-col items-center justify-center h-full gap-3",children:[(0,n.jsx)("p",{className:"text-sm text-center text-muted-foreground",children:e?"Connected to WebSocket server":"Start testing real-time features"}),(0,n.jsxs)(r.$nd,{onClick:e?t:a,disabled:s,variant:e?"destructive":"default",size:"lg",className:"w-full",children:[(0,n.jsx)(V.A,{className:"h-4 w-4 mr-2"}),s?"Connecting...":e?"Disconnect":"Connect"]})]})})]}),(0,n.jsx)(X,{}),(0,n.jsx)(es,{}),(0,n.jsx)(q,{}),(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsx)(r.ZBx,{children:"Advanced Testing Tools"})}),(0,n.jsx)(r.Wux,{children:(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsx)(M.A,{className:"h-8 w-8 text-purple-500 mb-4"}),(0,n.jsx)("h3",{className:"font-semibold mb-2",children:"Publish Test"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Send a test message to a channel with optional ACK tracking"}),(0,n.jsx)(r.$nd,{onClick:()=>{r.AZP.publish({type:z.OPEN_PUBLISH_TEST_DIALOG,payload:{}})},className:"w-full",children:"Open Test Publisher"})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsx)(c.A,{className:"h-8 w-8 text-blue-500 mb-4"}),(0,n.jsx)("h3",{className:"font-semibold mb-2",children:"Publish with Logging"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Send a message and save to database for tracking"}),(0,n.jsx)(r.$nd,{onClick:()=>{r.AZP.publish({type:z.OPEN_PUBLISH_WITH_LOGGING_DIALOG,payload:{}})},className:"w-full",children:"Open Logger"})]})}),(0,n.jsx)(r.ZpM,{children:(0,n.jsxs)(r.Wux,{className:"p-6",children:[(0,n.jsx)(_.A,{className:"h-8 w-8 text-green-500 mb-4"}),(0,n.jsx)("h3",{className:"font-semibold mb-2",children:"Send ACK"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Manually send acknowledgment for a message"}),(0,n.jsx)(r.$nd,{onClick:()=>{r.AZP.publish({type:z.OPEN_SEND_ACK_DIALOG,payload:{}})},className:"w-full",children:"Send ACK"})]})})]})})]}),(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsx)(r.ZBx,{children:"Usage Guide"})}),(0,n.jsx)(r.Wux,{children:(0,n.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2",children:"Live Testing"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Connect to the WebSocket server to test real-time features. Use Quick Scenarios for one-click testing, or manually subscribe to channels and publish messages. All events are logged in real-time for debugging."})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2",children:"Publish Test"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Use this tool to send test messages to specific channels. You can enable ACK tracking to monitor message delivery confirmations."})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2",children:"Publish with Logging"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Similar to Publish Test, but creates a CentrifugoLog record in the database for persistent tracking and monitoring."})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2",children:"Send ACK"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Manually send an acknowledgment for a specific message. Useful for testing ACK handling and debugging delivery issues."})]})]})})]})]})},el=()=>(0,n.jsx)(A,{children:(0,n.jsx)(er,{})});var ei=a(19140),ec=a(91416),ed=a(23309);let eo=ed.Ikc({channel:ed.YjP().min(1,"Channel is required"),message:ed.YjP().min(1,"Message is required"),wait_for_ack:ed.zMY().optional(),ack_timeout:ed.aig().int().min(1).max(60).optional()}),ex=()=>{let[e,s]=t.useState(!1),{publishTest:a}=y(),{refreshPublishes:l,refreshOverview:i}=f(),{toast:c}=(0,r.djX)(),d=(0,ei.mN)({resolver:(0,ec.u)(eo),defaultValues:{channel:"",message:'{"type": "test", "content": "Hello from admin"}',wait_for_ack:!1,ack_timeout:5}});(0,r.MLh)(z.OPEN_PUBLISH_TEST_DIALOG,e=>{var a,n;(null==(a=e.payload)?void 0:a.channel)&&d.setValue("channel",e.payload.channel),(null==(n=e.payload)?void 0:n.message)&&d.setValue("message",JSON.stringify(e.payload.message,null,2)),s(!0)});let o=()=>{s(!1),d.reset()},m=async e=>{try{let s={message:e.message};try{let a=JSON.parse(e.message);s="object"==typeof a&&null!==a?a:{message:a}}catch(e){}await a({channel:e.channel,data:s,wait_for_ack:e.wait_for_ack,ack_timeout:e.ack_timeout}),c({title:"Message Published",description:'Successfully published to channel "'.concat(e.channel,'"')}),await l(),await i(),o()}catch(a){let e="Publishing Failed",s="Failed to publish message";a instanceof x.LG?a.isPermissionError?(e="Permission Denied",s=a.errorMessage||"You do not have permission to publish messages"):a.isAuthError?(e="Authentication Required",s="Please log in to publish messages"):a.isValidationError?(e="Validation Error",s=a.errorMessage):a.isServerError?(e="Server Error",s=a.errorMessage||"Internal server error occurred"):s=a.errorMessage:a instanceof Error&&(s=a.message),c({title:e,description:s,variant:"destructive"})}};return(0,n.jsx)(r.lGe,{open:e,onOpenChange:e=>!e&&o(),children:(0,n.jsxs)(r.Cff,{className:"max-w-2xl",children:[(0,n.jsxs)(r.c75,{children:[(0,n.jsx)(r.L33,{children:"Publish Test Message"}),(0,n.jsx)(r.rrK,{children:"Publish a test message to a Centrifugo channel via the wrapper"})]}),(0,n.jsx)(r.lVW,{...d,children:(0,n.jsxs)("form",{onSubmit:d.handleSubmit(m),className:"space-y-4",children:[(0,n.jsx)(r.zBI,{control:d.control,name:"channel",render:e=>{let{field:s}=e;return(0,n.jsxs)(r.eIh,{children:[(0,n.jsx)(r.lRv,{children:"Channel *"}),(0,n.jsx)(r.MJN,{children:(0,n.jsx)(r.pde,{placeholder:"test:channel",...s})}),(0,n.jsx)(r.Rrd,{children:'Target channel name (e.g., "test:channel")'}),(0,n.jsx)(r.C5h,{})]})}}),(0,n.jsx)(r.zBI,{control:d.control,name:"message",render:e=>{let{field:s}=e;return(0,n.jsxs)(r.eIh,{children:[(0,n.jsx)(r.lRv,{children:"Message *"}),(0,n.jsx)(r.MJN,{children:(0,n.jsx)(r.TMX,{placeholder:'{"type": "test", "content": "Hello"}',rows:6,...s})}),(0,n.jsx)(r.Rrd,{children:"JSON object or string (will be auto-wrapped if needed)"}),(0,n.jsx)(r.C5h,{})]})}}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsx)(r.zBI,{control:d.control,name:"wait_for_ack",render:e=>{let{field:s}=e;return(0,n.jsxs)(r.eIh,{className:"flex flex-row items-center justify-between rounded-lg border p-3",children:[(0,n.jsxs)("div",{className:"space-y-0.5",children:[(0,n.jsx)(r.lRv,{children:"Wait for ACK"}),(0,n.jsx)(r.Rrd,{className:"text-xs",children:"Track client acknowledgments"})]}),(0,n.jsx)(r.MJN,{children:(0,n.jsx)(r.dOG,{checked:s.value,onCheckedChange:s.onChange})})]})}}),(0,n.jsx)(r.zBI,{control:d.control,name:"ack_timeout",render:e=>{let{field:s}=e;return(0,n.jsxs)(r.eIh,{children:[(0,n.jsx)(r.lRv,{children:"ACK Timeout (seconds)"}),(0,n.jsx)(r.MJN,{children:(0,n.jsx)(r.pde,{type:"number",min:"1",max:"60",...s,onChange:e=>s.onChange(parseInt(e.target.value)||5)})}),(0,n.jsx)(r.C5h,{})]})}})]}),(0,n.jsxs)(r.Esm,{children:[(0,n.jsx)(r.$nd,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),(0,n.jsx)(r.$nd,{type:"submit",disabled:d.formState.isSubmitting,children:d.formState.isSubmitting?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Publishing..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(M.A,{className:"h-4 w-4 mr-2"}),"Publish"]})})]})]})})]})})};var em=a(88073),eh=a(20495);let eu=ed.Ikc({channel:ed.YjP().min(1,"Channel is required"),data:ed.YjP().min(1,"Message data is required"),wait_for_ack:ed.zMY().optional(),ack_timeout:ed.aig().int().min(1).max(60).optional()}),eg=()=>{let[e,s]=t.useState(!1),{publishWithLogging:a}=y(),{refreshPublishes:l,refreshOverview:i}=f(),{toast:d}=(0,eh.dj)(),o=(0,ei.mN)({resolver:(0,ec.u)(eu),defaultValues:{channel:"",data:"{}",wait_for_ack:!0,ack_timeout:5}});(0,eh.ML)(z.OPEN_PUBLISH_WITH_LOGGING_DIALOG,e=>{var a,n;(null==(a=e.payload)?void 0:a.channel)&&o.setValue("channel",e.payload.channel),(null==(n=e.payload)?void 0:n.message)&&o.setValue("data",JSON.stringify(e.payload.message,null,2)),s(!0)});let m=()=>{s(!1),o.reset()},h=async e=>{try{let s={};try{let a=JSON.parse(e.data);s="object"==typeof a&&null!==a?a:{message:a}}catch(a){s={message:e.data}}await a({channel:e.channel.trim(),data:s,wait_for_ack:e.wait_for_ack,ack_timeout:e.ack_timeout}),d({title:"Success",description:"Message published to ".concat(e.channel," and saved to database")}),r.AZP.publish({type:z.REFRESH_PUBLISHES,payload:{}}),await l(),await i(),m()}catch(a){let e="Publishing Failed",s="Failed to publish message";a instanceof x.LG?a.isPermissionError?(e="Permission Denied",s=a.errorMessage||"You do not have permission to publish messages"):a.isAuthError?(e="Authentication Required",s="Please log in to publish messages"):a.isValidationError?(e="Validation Error",s=a.errorMessage):a.isServerError?(e="Server Error",s=a.errorMessage||"Internal server error occurred"):s=a.errorMessage:a instanceof Error&&(s=a.message),d({title:e,description:s,variant:"destructive"})}};return(0,n.jsx)(em.Dialog,{open:e,onOpenChange:e=>!e&&m(),children:(0,n.jsxs)(em.DialogContent,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,n.jsxs)(em.DialogHeader,{children:[(0,n.jsx)(em.DialogTitle,{children:"Publish with Database Logging"}),(0,n.jsx)(em.DialogDescription,{children:"Publish a message and save it to the database for tracking"})]}),(0,n.jsx)(em.Form,{...o,children:(0,n.jsxs)("form",{onSubmit:o.handleSubmit(h),className:"space-y-6",children:[(0,n.jsx)(em.FormField,{control:o.control,name:"channel",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{children:[(0,n.jsx)(em.FormLabel,{children:"Channel *"}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Input,{placeholder:"e.g., user:123",...s})}),(0,n.jsx)(em.FormDescription,{children:"The channel to publish the message to"}),(0,n.jsx)(em.FormMessage,{})]})}}),(0,n.jsx)(em.FormField,{control:o.control,name:"data",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{children:[(0,n.jsx)(em.FormLabel,{children:"Message Data (JSON)"}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Textarea,{placeholder:'{"type": "notification", "message": "Test"}',rows:8,className:"font-mono text-sm",...s})}),(0,n.jsx)(em.FormDescription,{children:"Enter JSON data or plain text (will be auto-wrapped)"}),(0,n.jsx)(em.FormMessage,{})]})}}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("h3",{className:"text-sm font-medium",children:"ACK Options"}),(0,n.jsx)(em.FormField,{control:o.control,name:"wait_for_ack",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{className:"flex flex-row items-center justify-between rounded-lg border p-3",children:[(0,n.jsxs)("div",{className:"space-y-0.5",children:[(0,n.jsx)(em.FormLabel,{children:"Wait for ACK"}),(0,n.jsx)(em.FormDescription,{children:"Track acknowledgment responses from subscribers"})]}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Switch,{checked:s.value,onCheckedChange:s.onChange})})]})}}),o.watch("wait_for_ack")&&(0,n.jsx)(em.FormField,{control:o.control,name:"ack_timeout",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{children:[(0,n.jsx)(em.FormLabel,{children:"ACK Timeout (seconds)"}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Input,{type:"number",min:1,max:60,...s,onChange:e=>s.onChange(parseInt(e.target.value)||5)})}),(0,n.jsx)(em.FormDescription,{children:"Maximum time to wait for acknowledgments (1-60 seconds)"}),(0,n.jsx)(em.FormMessage,{})]})}})]}),(0,n.jsxs)(em.DialogFooter,{children:[(0,n.jsx)(em.Button,{type:"button",variant:"outline",onClick:m,children:"Cancel"}),(0,n.jsx)(em.Button,{type:"submit",disabled:o.formState.isSubmitting,children:o.formState.isSubmitting?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Publishing..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.A,{className:"h-4 w-4 mr-2"}),"Publish & Log"]})})]})]})})]})})};var ej=a(98315);let ep=()=>{let[e,s]=t.useState(!1),{sendAck:a}=y(),{toast:r}=(0,eh.dj)(),l=(0,ei.mN)({resolver:(0,ec.u)(ej.R),defaultValues:{message_id:"",client_id:""}});(0,eh.ML)(z.OPEN_SEND_ACK_DIALOG,e=>{var a,n;(null==(a=e.payload)?void 0:a.messageId)&&l.setValue("message_id",e.payload.messageId),(null==(n=e.payload)?void 0:n.channel)&&l.setValue("client_id",e.payload.channel),s(!0)});let i=()=>{s(!1),l.reset()},c=async e=>{try{await a({message_id:e.message_id.trim(),client_id:e.client_id.trim()}),r({title:"Success",description:"ACK sent for message ".concat(e.message_id)}),i()}catch(a){let e="Failed to Send ACK",s="Failed to send acknowledgment";a instanceof x.LG?a.isPermissionError?(e="Permission Denied",s=a.errorMessage||"You do not have permission to send ACKs"):a.isAuthError?(e="Authentication Required",s="Please log in to send ACKs"):a.isValidationError?(e="Validation Error",s=a.errorMessage):a.isServerError?(e="Server Error",s=a.errorMessage||"Internal server error occurred"):s=a.errorMessage:a instanceof Error&&(s=a.message),r({title:e,description:s,variant:"destructive"})}};return(0,n.jsx)(em.Dialog,{open:e,onOpenChange:e=>!e&&i(),children:(0,n.jsxs)(em.DialogContent,{className:"max-w-lg",children:[(0,n.jsxs)(em.DialogHeader,{children:[(0,n.jsx)(em.DialogTitle,{children:"Send Manual ACK"}),(0,n.jsx)(em.DialogDescription,{children:"Manually send acknowledgment for a specific message"})]}),(0,n.jsx)(em.Form,{...l,children:(0,n.jsxs)("form",{onSubmit:l.handleSubmit(c),className:"space-y-6",children:[(0,n.jsx)(em.FormField,{control:l.control,name:"message_id",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{children:[(0,n.jsx)(em.FormLabel,{children:"Message ID *"}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Input,{placeholder:"Enter message ID",className:"font-mono",...s})}),(0,n.jsx)(em.FormDescription,{children:"The unique identifier of the message to acknowledge"}),(0,n.jsx)(em.FormMessage,{})]})}}),(0,n.jsx)(em.FormField,{control:l.control,name:"client_id",render:e=>{let{field:s}=e;return(0,n.jsxs)(em.FormItem,{children:[(0,n.jsx)(em.FormLabel,{children:"Client ID *"}),(0,n.jsx)(em.FormControl,{children:(0,n.jsx)(em.Input,{placeholder:"e.g., client-123",className:"font-mono",...s})}),(0,n.jsx)(em.FormDescription,{children:"The client ID that should acknowledge the message"}),(0,n.jsx)(em.FormMessage,{})]})}}),(0,n.jsxs)(em.DialogFooter,{children:[(0,n.jsx)(em.Button,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,n.jsx)(em.Button,{type:"submit",disabled:l.formState.isSubmitting,children:l.formState.isSubmitting?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Sending..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.A,{className:"h-4 w-4 mr-2"}),"Send ACK"]})})]})]})})]})})},eb=()=>{let[e,s]=t.useState(!1),[a,r]=t.useState(""),[l,i]=t.useState(null),[c,d]=t.useState(!1),{getChannelHistory:o}=g(),{toast:m}=(0,eh.dj)();(0,eh.ML)(z.OPEN_CHANNEL_HISTORY_DIALOG,async e=>{r(e.payload.channel),s(!0),await h(e.payload.channel)});let h=async e=>{d(!0),i(null);try{let s=await o({channel:e});i(s)}catch(n){let s="Failed to Load History",a="Failed to load channel history";n instanceof x.LG?n.isPermissionError?(s="Permission Denied",a=n.errorMessage||"You do not have permission to view channel history"):n.isAuthError?(s="Authentication Required",a="Please log in to view channel history"):n.isNotFoundError?(s="Channel Not Found",a='Channel "'.concat(e,'" not found or has no history')):n.isServerError?(s="Server Error",a=n.errorMessage||"Internal server error occurred"):a=n.errorMessage:n instanceof Error&&(a=n.message),m({title:s,description:a,variant:"destructive"})}finally{d(!1)}},u=()=>{s(!1),r(""),i(null)};return(0,n.jsx)(em.Dialog,{open:e,onOpenChange:e=>!e&&u(),children:(0,n.jsxs)(em.DialogContent,{className:"max-w-6xl max-h-[90vh]",children:[(0,n.jsxs)(em.DialogHeader,{children:[(0,n.jsxs)(em.DialogTitle,{className:"flex items-center gap-2",children:[(0,n.jsx)(Z.A,{className:"h-5 w-5"}),"Channel History: ",a,(null==l?void 0:l.publications)&&(0,n.jsxs)(em.Badge,{variant:"secondary",children:[l.publications.length," messages"]})]}),(0,n.jsx)(em.DialogDescription,{children:"View message history for this channel"})]}),(0,n.jsx)(em.ScrollArea,{className:"h-[60vh] w-full",children:c?(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)(em.Skeleton,{className:"h-[100px] w-full"}),(0,n.jsx)(em.Skeleton,{className:"h-[100px] w-full"}),(0,n.jsx)(em.Skeleton,{className:"h-[100px] w-full"})]}):(null==l?void 0:l.publications)&&l.publications.length>0?(0,n.jsxs)(em.Table,{children:[(0,n.jsx)(em.TableHeader,{children:(0,n.jsxs)(em.TableRow,{children:[(0,n.jsx)(em.TableHead,{className:"w-[100px]",children:"Offset"}),(0,n.jsx)(em.TableHead,{children:"Data"}),(0,n.jsx)(em.TableHead,{className:"w-[200px]",children:"Info"})]})}),(0,n.jsx)(em.TableBody,{children:l.publications.map((e,s)=>(0,n.jsxs)(em.TableRow,{children:[(0,n.jsx)(em.TableCell,{className:"font-mono text-xs align-top",children:e.offset||"N/A"}),(0,n.jsx)(em.TableCell,{className:"align-top",children:(0,n.jsx)("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto max-w-2xl",children:JSON.stringify(e.data,null,2)})}),(0,n.jsx)(em.TableCell,{className:"text-xs align-top",children:e.info?(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"font-semibold",children:"Client:"}),(0,n.jsx)("code",{className:"text-xs bg-muted px-1 rounded",children:e.info.client||"N/A"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"font-semibold",children:"User:"}),(0,n.jsx)("code",{className:"text-xs bg-muted px-1 rounded",children:e.info.user||"N/A"})]})]}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"No info"})})]},s))})]}):(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,n.jsx)(Z.A,{className:"h-12 w-12 text-muted-foreground mb-3"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"No history available for this channel"})]})}),(0,n.jsxs)(em.DialogFooter,{children:[(0,n.jsx)(em.Button,{variant:"outline",onClick:()=>{a&&h(a)},disabled:c,children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})}),(0,n.jsx)(em.Button,{variant:"outline",onClick:u,children:"Close"})]})]})})},ef=()=>{let[e,s]=t.useState(!1),[a,r]=t.useState(""),[l,i]=t.useState(null),[c,d]=t.useState(!1),{getPresence:o}=g(),{toast:m}=(0,eh.dj)();(0,eh.ML)(z.OPEN_CHANNEL_PRESENCE_DIALOG,async e=>{r(e.payload.channel),s(!0),await h(e.payload.channel)});let h=async e=>{d(!0),i(null);try{let s=await o({channel:e});i(s)}catch(n){let s="Failed to Load Presence",a="Failed to load channel presence";n instanceof x.LG?n.isPermissionError?(s="Permission Denied",a=n.errorMessage||"You do not have permission to view channel presence"):n.isAuthError?(s="Authentication Required",a="Please log in to view channel presence"):n.isNotFoundError?(s="Channel Not Found",a='Channel "'.concat(e,'" not found')):n.isServerError?(s="Server Error",a=n.errorMessage||"Internal server error occurred"):a=n.errorMessage:n instanceof Error&&(a=n.message),m({title:s,description:a,variant:"destructive"})}finally{d(!1)}},u=()=>{s(!1),r(""),i(null)},j=(null==l?void 0:l.presence)?Object.keys(l.presence).length:0;return(0,n.jsx)(em.Dialog,{open:e,onOpenChange:e=>!e&&u(),children:(0,n.jsxs)(em.DialogContent,{className:"max-w-5xl max-h-[90vh]",children:[(0,n.jsxs)(em.DialogHeader,{children:[(0,n.jsxs)(em.DialogTitle,{className:"flex items-center gap-2",children:[(0,n.jsx)(G.A,{className:"h-5 w-5"}),"Channel Presence: ",a,l&&(0,n.jsxs)(em.Badge,{variant:"secondary",children:[j," ",1===j?"client":"clients"]})]}),(0,n.jsx)(em.DialogDescription,{children:"View currently subscribed clients for this channel"})]}),(0,n.jsx)(em.ScrollArea,{className:"h-[60vh] w-full",children:c?(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)(em.Skeleton,{className:"h-[80px] w-full"}),(0,n.jsx)(em.Skeleton,{className:"h-[80px] w-full"}),(0,n.jsx)(em.Skeleton,{className:"h-[80px] w-full"})]}):(null==l?void 0:l.presence)&&Object.keys(l.presence).length>0?(0,n.jsxs)(em.Table,{children:[(0,n.jsx)(em.TableHeader,{children:(0,n.jsxs)(em.TableRow,{children:[(0,n.jsx)(em.TableHead,{className:"w-[250px]",children:"Client ID"}),(0,n.jsx)(em.TableHead,{className:"w-[150px]",children:"User"}),(0,n.jsx)(em.TableHead,{children:"Connection Info"})]})}),(0,n.jsx)(em.TableBody,{children:Object.entries(l.presence).map(e=>{let[s,a]=e;return(0,n.jsxs)(em.TableRow,{children:[(0,n.jsx)(em.TableCell,{className:"font-mono text-xs align-top",children:(0,n.jsx)("code",{className:"text-xs bg-muted px-2 py-1 rounded",children:s})}),(0,n.jsx)(em.TableCell,{className:"align-top",children:(0,n.jsx)(em.Badge,{variant:"outline",children:a.user||"Anonymous"})}),(0,n.jsx)(em.TableCell,{className:"text-xs align-top",children:a.conn_info?(0,n.jsx)("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto max-w-xl",children:JSON.stringify(a.conn_info,null,2)}):(0,n.jsx)("span",{className:"text-muted-foreground",children:"No connection info"})})]},s)})})]}):(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,n.jsx)(G.A,{className:"h-12 w-12 text-muted-foreground mb-3"}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"No clients currently subscribed to this channel"})]})}),(0,n.jsxs)(em.DialogFooter,{children:[(0,n.jsx)(em.Button,{variant:"outline",onClick:()=>{a&&h(a)},disabled:c,children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})}),(0,n.jsx)(em.Button,{variant:"outline",onClick:u,children:"Close"})]})]})})},eN=()=>{let[e,s]=(0,t.useState)("overview");return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)(D,{}),(0,n.jsx)(P,{}),(0,n.jsxs)(r.ZpM,{children:[(0,n.jsx)(r.aRn,{children:(0,n.jsx)(r.ZBx,{children:"Centrifugo Monitor Dashboard"})}),(0,n.jsx)(r.Wux,{children:(0,n.jsxs)(r.tUM,{value:e,onValueChange:e=>s(e),children:[(0,n.jsxs)(r.j7C,{className:"grid w-full grid-cols-5",children:[(0,n.jsxs)(r.Xib,{value:"overview",className:"flex items-center gap-2",children:[(0,n.jsx)(l.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Overview"})]}),(0,n.jsxs)(r.Xib,{value:"publishes",className:"flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Recent Publishes"})]}),(0,n.jsxs)(r.Xib,{value:"channels",className:"flex items-center gap-2",children:[(0,n.jsx)(c.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Channels"})]}),(0,n.jsxs)(r.Xib,{value:"live-channels",className:"flex items-center gap-2",children:[(0,n.jsx)(d.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Live Channels"})]}),(0,n.jsxs)(r.Xib,{value:"testing",className:"flex items-center gap-2",children:[(0,n.jsx)(o.A,{className:"h-4 w-4"}),(0,n.jsx)("span",{children:"Live Testing"})]})]}),(0,n.jsx)(r.avX,{value:"overview",className:"mt-6",children:(0,n.jsx)(R,{})}),(0,n.jsx)(r.avX,{value:"publishes",className:"mt-6",children:(0,n.jsx)(B,{})}),(0,n.jsx)(r.avX,{value:"channels",className:"mt-6",children:(0,n.jsx)(W,{})}),(0,n.jsx)(r.avX,{value:"live-channels",className:"mt-6",children:(0,n.jsx)(U,{})}),(0,n.jsx)(r.avX,{value:"testing",className:"mt-6",children:(0,n.jsx)(el,{})})]})})]}),(0,n.jsx)(ex,{}),(0,n.jsx)(eg,{}),(0,n.jsx)(ep,{}),(0,n.jsx)(eb,{}),(0,n.jsx)(ef,{})]})},ev=()=>(0,n.jsx)(b,{children:(0,n.jsx)(u,{children:(0,n.jsx)(w,{children:(0,n.jsx)(eN,{})})})}),ew=()=>(0,n.jsx)(ev,{});ew.pageConfig={title:"Centrifugo Monitor",description:"Real-time monitoring and management interface for Centrifugo",protected:!0};let ey=ew}},e=>{e.O(0,[43076,50314,90636,46593,38792],()=>e(e.s=48747)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99266],{19428:(e,o,n)=>{"use strict";n.r(o),n.d(o,{default:()=>_});var t=n(94513),i=n(56886);let s=()=>(0,t.jsx)(i.QP,{});s.pageConfig={title:"Component Showcase",description:"Explore our comprehensive collection of React components"};let _=s},23003:(e,o,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/private/ui",function(){return n(19428)}])}},e=>{e.O(0,[90636,46593,38792],()=>e(e.s=23003)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[61137],{46743:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>ek});var t=a(94513),r=a(94285),l=a(77625),c=a(51352),i=a(88051),n=a(7647),d=a(73548),x=a(7737),o=a(49829),h=a(50314),m=a(62125);let j=(0,r.createContext)(void 0);function u(e){let{children:s}=e,{data:a,error:r,isLoading:l,mutate:c}=(0,m.HW)(h.FH),{data:i,error:n,isLoading:d,mutate:x}=(0,m.Kf)(h.FH),{data:o,error:u,isLoading:p,mutate:g}=(0,m._P)(h.FH),{data:f,error:N,isLoading:v,mutate:y}=(0,m.Jn)(h.FH),{data:w,error:A,isLoading:b,mutate:k}=(0,m.J)(void 0,h.FH),{data:D,error:_,isLoading:E,mutate:M}=(0,m.lm)(h.FH),{data:L,error:S,isLoading:Z,mutate:W}=(0,m.pC)(h.FH),{data:R,error:C,isLoading:B,mutate:H}=(0,m.FD)(h.FH),T=async()=>{await c()},U=async()=>{await x()},F=async()=>{await g()},P=async()=>{await y()},O=async()=>{await k()},X=async()=>{await M()},J=async()=>{await W()},K=async()=>{await H()};return(0,t.jsx)(j.Provider,{value:{overview:a,isLoadingOverview:l,overviewError:r,refreshOverview:T,statCards:i,isLoadingStatCards:d,statCardsError:n,refreshStatCards:U,systemHealth:o,isLoadingSystemHealth:p,systemHealthError:u,refreshSystemHealth:F,quickActions:f,isLoadingQuickActions:v,quickActionsError:N,refreshQuickActions:P,recentActivity:w,isLoadingRecentActivity:b,recentActivityError:A,refreshRecentActivity:O,systemMetrics:D,isLoadingSystemMetrics:E,systemMetricsError:_,refreshSystemMetrics:X,userStatistics:L,isLoadingUserStatistics:Z,userStatisticsError:S,refreshUserStatistics:J,appStatistics:R,isLoadingAppStatistics:B,appStatisticsError:C,refreshAppStatistics:K},children:s})}var p=a(79145),g=a(69620),f=a(69997),N=a(20024),v=a(9376);function y(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,t.jsx)(l.EAD,{className:"h-4 w-24"}),(0,t.jsx)(l.EAD,{className:"h-4 w-4 rounded-full"})]}),(0,t.jsxs)(l.Wux,{children:[(0,t.jsx)(l.EAD,{className:"h-8 w-20 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-3 w-full"})]})]})}function w(e){let{cards:s,isLoading:a}=e;if(a)return(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((e,s)=>(0,t.jsx)(y,{},s))});if(!s)return(0,t.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No statistics available"});let r=Array.isArray(s)?s:[s];return(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",children:r.map((e,s)=>{var a;return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,t.jsx)(l.ZBx,{className:"text-sm font-medium",children:e.title}),(0,t.jsx)("div",{className:"text-muted-foreground",children:(a=e.icon,({trending_up:(0,t.jsx)(p.A,{className:"h-4 w-4"}),people:(0,t.jsx)(d.A,{className:"h-4 w-4"}),activity:(0,t.jsx)(x.A,{className:"h-4 w-4"}),attach_money:(0,t.jsx)(g.A,{className:"h-4 w-4"})})[a]||(0,t.jsx)(x.A,{className:"h-4 w-4"}))})]}),(0,t.jsxs)(l.Wux,{children:[(0,t.jsx)("div",{className:"text-2xl font-bold",children:e.value}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[e.change&&(0,t.jsxs)(l.Exy,{variant:(e=>{switch(e){case"positive":return"default";case"negative":return"destructive";default:return"secondary"}})(e.change_type),className:"flex items-center gap-1 text-xs",children:[(e=>{switch(e){case"positive":return(0,t.jsx)(f.A,{className:"h-3 w-3"});case"negative":return(0,t.jsx)(N.A,{className:"h-3 w-3"});default:return(0,t.jsx)(v.A,{className:"h-3 w-3"})}})(e.change_type),e.change]}),e.description&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]})]})]},s)})})}var A=a(57147),b=a(20254);function k(){return(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4 border rounded-lg",children:[(0,t.jsx)(l.EAD,{className:"h-10 w-10 rounded"}),(0,t.jsx)(l.EAD,{className:"h-5 w-3/4"}),(0,t.jsx)(l.EAD,{className:"h-4 w-full"})]})}function D(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-32 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-48"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2",children:Array.from({length:4}).map((e,s)=>(0,t.jsx)(k,{},s))})})]})}function _(e){let{actions:s,isLoading:a}=e;if(a)return(0,t.jsx)(D,{});let r=s?Array.isArray(s)?s:[s]:[];return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.ZBx,{children:"Quick Actions"}),(0,t.jsx)(l.BTJ,{children:"Common tasks and shortcuts"})]}),(0,t.jsx)(l.Wux,{children:0===r.length?(0,t.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,t.jsx)(A.A,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),(0,t.jsx)("p",{className:"text-sm",children:"No quick actions available"})]}):(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2",children:r.map((e,s)=>(0,t.jsx)("a",{href:e.link,className:"group block",target:e.link.startsWith("http")?"_blank":void 0,rel:e.link.startsWith("http")?"noopener noreferrer":void 0,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4 border rounded-lg hover:border-primary hover:shadow-md transition-all duration-200",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("div",{className:"h-10 w-10 rounded-md bg-primary/10 flex items-center justify-center text-primary",children:(e.icon,(0,t.jsx)(A.A,{className:"h-5 w-5"}))}),e.link.startsWith("http")&&(0,t.jsx)(b.A,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h3",{className:"font-semibold text-sm",children:e.title}),e.category&&(0,t.jsx)(l.Exy,{variant:"secondary",className:"text-xs",children:e.category})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.description})]})]})},s))})})]})}var E=a(91553);let{ZB:M,DP:L,rS:S}=E,Z=e=>e>=80?"hsl(var(--chart-1))":e>=50?"hsl(var(--chart-3))":"hsl(var(--chart-5))",W={health:{label:"Health"}};function R(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-40 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-56"})]}),(0,t.jsx)(l.Wux,{className:"flex items-center justify-center",children:(0,t.jsx)(l.EAD,{className:"h-[250px] w-[250px] rounded-full"})})]})}function C(e){let{health:s,isLoading:a}=e;if(a)return(0,t.jsx)(R,{});if(!s)return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)(l.ZBx,{children:"System Health"})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No health data available"})})]});let r=[{name:"health",value:s.overall_health_percentage,fill:Z(s.overall_health_percentage)}];return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.ZBx,{children:"System Health"}),(0,t.jsx)(l.BTJ,{children:"Overall health status"})]}),(0,t.jsx)(l.Exy,{variant:(e=>{switch(e){case"healthy":return"default";case"warning":case"unknown":default:return"secondary";case"error":return"destructive"}})(s.overall_status),children:s.overall_status.toUpperCase()})]})}),(0,t.jsxs)(l.Wux,{className:"flex flex-col items-center justify-center pb-8",children:[(0,t.jsx)(l.atp,{config:W,className:"h-[250px] w-full",children:(0,t.jsxs)(L,{data:r,startAngle:90,endAngle:90+s.overall_health_percentage/100*360,innerRadius:"80%",outerRadius:"100%",children:[(0,t.jsx)(S,{type:"number",domain:[0,100],angleAxisId:0,tick:!1}),(0,t.jsx)(M,{background:!0,dataKey:"value",cornerRadius:10,fill:Z(s.overall_health_percentage)}),(0,t.jsxs)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",className:"fill-foreground",children:[(0,t.jsxs)("tspan",{x:"50%",dy:"-0.5em",fontSize:"48",fontWeight:"bold",children:[s.overall_health_percentage,"%"]}),(0,t.jsx)("tspan",{x:"50%",dy:"1.5em",fontSize:"14",className:"fill-muted-foreground",children:"System Health"})]})]})}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-3 gap-4 w-full text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-2xl font-bold text-green-500",children:s.components.filter(e=>"healthy"===e.status).length}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Healthy"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-2xl font-bold text-yellow-500",children:s.components.filter(e=>"warning"===e.status).length}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Warning"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-2xl font-bold text-red-500",children:s.components.filter(e=>"error"===e.status).length}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Error"})]})]})]})]})}let{Gk:B,QF:H,dC:T,WX:U,h8:F}=E,P={cpu:{label:"CPU Usage",color:"hsl(var(--chart-1))"},memory:{label:"Memory Usage",color:"hsl(var(--chart-2))"},disk:{label:"Disk Usage",color:"hsl(var(--chart-3))"}};function O(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-48 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-64"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)(l.EAD,{className:"h-[300px] w-full"})})]})}function X(e){let{metrics:s,isLoading:a,historicalData:c}=e;if(a)return(0,t.jsx)(O,{});if(!s)return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)(l.ZBx,{children:"System Metrics Trend"})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No metrics data available"})})]});let i=(0,r.useMemo)(()=>c&&c.length>0?c.map((e,s)=>({time:"T-".concat(c.length-s),cpu:e.cpu_usage,memory:e.memory_usage,disk:e.disk_usage})):function(e){if(!e)return[];let s=[],a=Date.now();for(let t=11;t>=0;t--){let r=new Date(a-3e5*t),l=r.getHours(),c=r.getMinutes(),i="".concat(l.toString().padStart(2,"0"),":").concat(c.toString().padStart(2,"0")),n=()=>10*Math.random()-5;s.push({time:i,cpu:Math.max(0,Math.min(100,e.cpu_usage+n())),memory:Math.max(0,Math.min(100,e.memory_usage+n())),disk:Math.max(0,Math.min(100,e.disk_usage+n()))})}return s}(s),[s,c]);return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.ZBx,{children:"System Metrics Trend"}),(0,t.jsx)(l.BTJ,{children:"Resource usage over time"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)(l.atp,{config:P,className:"h-[300px] w-full",children:(0,t.jsxs)(H,{data:i,children:[(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"colorCpu",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:"var(--color-cpu)",stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:"var(--color-cpu)",stopOpacity:0})]}),(0,t.jsxs)("linearGradient",{id:"colorMemory",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:"var(--color-memory)",stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:"var(--color-memory)",stopOpacity:0})]}),(0,t.jsxs)("linearGradient",{id:"colorDisk",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:"var(--color-disk)",stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:"var(--color-disk)",stopOpacity:0})]})]}),(0,t.jsx)(T,{strokeDasharray:"3 3",className:"stroke-muted"}),(0,t.jsx)(U,{dataKey:"time",tickLine:!1,axisLine:!1,tickMargin:8,className:"text-xs"}),(0,t.jsx)(F,{tickLine:!1,axisLine:!1,tickMargin:8,className:"text-xs",domain:[0,100],tickFormatter:e=>"".concat(e,"%")}),(0,t.jsx)(l.IIn,{content:(0,t.jsx)(l.NtK,{})}),(0,t.jsx)(l._3D,{content:(0,t.jsx)(l.Hm2,{})}),(0,t.jsx)(B,{type:"monotone",dataKey:"cpu",stroke:"var(--color-cpu)",fill:"url(#colorCpu)",strokeWidth:2}),(0,t.jsx)(B,{type:"monotone",dataKey:"memory",stroke:"var(--color-memory)",fill:"url(#colorMemory)",strokeWidth:2}),(0,t.jsx)(B,{type:"monotone",dataKey:"disk",stroke:"var(--color-disk)",fill:"url(#colorDisk)",strokeWidth:2})]})})})]})}function J(e){let{statCards:s,isLoadingStatCards:a,systemHealth:r,isLoadingSystemHealth:l,quickActions:c,isLoadingQuickActions:i,systemMetrics:n,isLoadingSystemMetrics:d}=e;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(w,{cards:s,isLoading:a}),(0,t.jsxs)("div",{className:"grid gap-6 grid-cols-1 lg:grid-cols-3",children:[(0,t.jsx)(C,{health:r,isLoading:l}),(0,t.jsx)("div",{className:"lg:col-span-2",children:(0,t.jsx)(X,{metrics:n,isLoading:d})})]}),(0,t.jsx)(_,{actions:c,isLoading:i})]})}var K=a(81129),I=a(75608),z=a(13121);function G(){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(l.EAD,{className:"h-10 w-10 rounded-full"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)(l.EAD,{className:"h-4 w-3/4"}),(0,t.jsx)(l.EAD,{className:"h-3 w-1/2"})]})]})}function q(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-32 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-48"})]}),(0,t.jsx)(l.Wux,{className:"space-y-4",children:Array.from({length:5}).map((e,s)=>(0,t.jsx)(G,{},s))})]})}function Q(e){let{activities:s,isLoading:a,maxItems:r=10}=e;if(a)return(0,t.jsx)(q,{});let c=(s?Array.isArray(s)?s:[s]:[]).slice(0,r);return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.ZBx,{children:"Recent Activity"}),(0,t.jsx)(l.BTJ,{children:"Latest actions across the system"})]}),(0,t.jsx)(l.Wux,{children:0===c.length?(0,t.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,t.jsx)(x.A,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),(0,t.jsx)("p",{className:"text-sm",children:"No recent activity"})]}):(0,t.jsx)("div",{className:"space-y-6 max-h-[400px] overflow-y-auto pr-2",children:c.map(e=>{var s;return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(l.euF,{className:"h-10 w-10",children:(0,t.jsx)(l.q5E,{className:"text-xs",children:(e=>{let s=e.split(" ");return s.length>=2?"".concat(s[0][0]).concat(s[1][0]).toUpperCase():e.substring(0,2).toUpperCase()})(e.user)})}),(0,t.jsx)("div",{className:"absolute -bottom-1 -right-1 h-5 w-5 rounded-full border-2 border-background flex items-center justify-center",style:{backgroundColor:e.color},children:(0,t.jsx)("div",{className:"text-white",children:(s=e.action,({created:(0,t.jsx)(K.A,{className:"h-4 w-4"}),updated:(0,t.jsx)(I.A,{className:"h-4 w-4"}),deleted:(0,t.jsx)(z.A,{className:"h-4 w-4"})})[s.toLowerCase()]||(0,t.jsx)(x.A,{className:"h-4 w-4"}))})})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-sm",children:[(0,t.jsx)("span",{className:"font-medium",children:e.user})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:e.action})," ",(0,t.jsx)("span",{className:"font-medium",children:e.resource})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:(e=>{try{let s=new Date(e),a=new Date().getTime()-s.getTime(),t=Math.floor(a/6e4),r=Math.floor(t/60),l=Math.floor(r/24);if(t<1)return"Just now";if(t<60)return"".concat(t,"m ago");if(r<24)return"".concat(r,"h ago");if(l<7)return"".concat(l,"d ago");return s.toLocaleDateString()}catch(s){return e}})(e.timestamp)})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(l.Exy,{variant:"secondary",className:"text-xs",children:e.action})})]})]},e.id)})})})]})}let{yP:V,Es:$,dC:Y,WX:ee,h8:es}=E,ea={count:{label:"Users",color:"hsl(var(--chart-1))"}};function et(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-40 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-56"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)(l.EAD,{className:"h-[300px] w-full"})})]})}function er(e){let{statistics:s,isLoading:a}=e;if(a)return(0,t.jsx)(et,{});if(!s)return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)(l.ZBx,{children:"User Statistics"})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No user statistics available"})})]});let r=[{category:"Total Users",count:s.total_users,fill:"hsl(var(--chart-1))"},{category:"Active Users",count:s.active_users,fill:"hsl(var(--chart-2))"},{category:"New Users",count:s.new_users,fill:"hsl(var(--chart-3))"},{category:"Superusers",count:s.superusers,fill:"hsl(var(--chart-4))"}];return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.ZBx,{children:"User Statistics"}),(0,t.jsx)(l.BTJ,{children:"Breakdown of user accounts"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)(l.atp,{config:ea,className:"h-[300px] w-full",children:(0,t.jsxs)($,{data:r,children:[(0,t.jsx)(Y,{strokeDasharray:"3 3",className:"stroke-muted"}),(0,t.jsx)(ee,{dataKey:"category",tickLine:!1,axisLine:!1,tickMargin:8,className:"text-xs",angle:-45,textAnchor:"end",height:80}),(0,t.jsx)(es,{tickLine:!1,axisLine:!1,tickMargin:8,className:"text-xs"}),(0,t.jsx)(l.IIn,{content:(0,t.jsx)(l.NtK,{})}),(0,t.jsx)(V,{dataKey:"count",radius:[8,8,0,0]})]})})})]})}function el(e){let{userStatistics:s,isLoadingUserStatistics:a,recentActivity:r,isLoadingRecentActivity:l}=e;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(er,{statistics:s,isLoading:a}),(0,t.jsx)(Q,{activities:r,isLoading:l,maxItems:20})]})}var ec=a(69673),ei=a(47019),en=a(47857),ed=a(80587);let ex=e=>{try{return new Date(e).toLocaleTimeString()}catch(s){return e}};function eo(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-32 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-48"})]}),(0,t.jsx)(l.EAD,{className:"h-6 w-20"})]})}),(0,t.jsx)(l.Wux,{className:"space-y-4",children:Array.from({length:3}).map((e,s)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(l.EAD,{className:"h-4 w-24"}),(0,t.jsx)(l.EAD,{className:"h-4 w-16"})]}),(0,t.jsx)(l.EAD,{className:"h-2 w-full"})]},s))})]})}function eh(e){let{health:s,isLoading:a}=e;return a?(0,t.jsx)(eo,{}):s?(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.ZBx,{children:"System Health"}),(0,t.jsxs)(l.BTJ,{children:["Last check: ",ex(s.timestamp)]})]}),(0,t.jsx)(l.Exy,{variant:(e=>{switch(e){case"healthy":return"default";case"warning":case"unknown":default:return"secondary";case"error":return"destructive"}})(s.overall_status),children:s.overall_status.toUpperCase()})]})}),(0,t.jsxs)(l.Wux,{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Overall Health"}),(0,t.jsxs)("span",{className:"text-sm font-bold",children:[s.overall_health_percentage,"%"]})]}),(0,t.jsx)(l.kej,{value:s.overall_health_percentage,className:"h-2"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h4",{className:"text-sm font-medium",children:"Components"}),s.components.map((e,s)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(e=>{switch(e){case"healthy":return(0,t.jsx)(ec.A,{className:"h-4 w-4 text-green-500"});case"warning":return(0,t.jsx)(ei.A,{className:"h-4 w-4 text-yellow-500"});case"error":return(0,t.jsx)(en.A,{className:"h-4 w-4 text-red-500"});default:return(0,t.jsx)(ed.A,{className:"h-4 w-4 text-muted-foreground"})}})(e.status),(0,t.jsx)("span",{className:"text-sm font-medium",children:e.component})]}),(0,t.jsx)("span",{className:"text-xs font-medium ".concat((e=>{switch(e){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-muted-foreground"}})(e.status)),children:e.status})]}),null!==e.health_percentage&&void 0!==e.health_percentage&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("span",{className:"text-xs font-medium",children:[e.health_percentage,"%"]})]}),(0,t.jsx)(l.kej,{value:e.health_percentage,className:"h-1.5"})]}),(null===e.health_percentage||void 0===e.health_percentage)&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last check: ",ex(e.last_check)]})]},s))]})]})]}):(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)(l.ZBx,{children:"System Health"})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)(l.FcD,{children:(0,t.jsx)(l.TND,{children:"No health data available"})})})]})}var em=a(98958),ej=a(86240),eu=a(97818),ep=a(80574);function eg(e){let{icon:s,label:a,value:r,percentage:c,showProgress:i=!1}=e,n="number"==typeof r?"".concat(r,"%"):r;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"text-muted-foreground",children:s}),(0,t.jsx)("span",{className:"text-sm font-medium",children:a})]}),i&&"number"==typeof c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-2xl font-bold",children:n}),(0,t.jsx)(l.Exy,{variant:c>=90?"destructive":c>=70?"secondary":"default",className:"ml-2",children:c>=90?"Critical":c>=70?"High":"Normal"})]}),(0,t.jsx)(l.kej,{value:c,className:"h-2"})]}):(0,t.jsx)("span",{className:"text-2xl font-bold",children:n})]})}function ef(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-40 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-56"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("div",{className:"grid gap-6 grid-cols-1 sm:grid-cols-2",children:Array.from({length:6}).map((e,s)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.EAD,{className:"h-4 w-24"}),(0,t.jsx)(l.EAD,{className:"h-8 w-20"}),(0,t.jsx)(l.EAD,{className:"h-2 w-full"})]},s))})})]})}function eN(e){let{metrics:s,isLoading:a}=e;return a?(0,t.jsx)(ef,{}):s?(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.ZBx,{children:"System Metrics"}),(0,t.jsx)(l.BTJ,{children:"Real-time system performance"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsxs)("div",{className:"grid gap-6 grid-cols-1 sm:grid-cols-2",children:[(0,t.jsx)(eg,{icon:(0,t.jsx)(em.A,{className:"h-4 w-4"}),label:"CPU Usage",value:s.cpu_usage,percentage:s.cpu_usage,showProgress:!0}),(0,t.jsx)(eg,{icon:(0,t.jsx)(x.A,{className:"h-4 w-4"}),label:"Memory Usage",value:s.memory_usage,percentage:s.memory_usage,showProgress:!0}),(0,t.jsx)(eg,{icon:(0,t.jsx)(ej.A,{className:"h-4 w-4"}),label:"Disk Usage",value:s.disk_usage,percentage:s.disk_usage,showProgress:!0}),(0,t.jsx)(eg,{icon:(0,t.jsx)(eu.A,{className:"h-4 w-4"}),label:"Network In",value:s.network_in}),(0,t.jsx)(eg,{icon:(0,t.jsx)(eu.A,{className:"h-4 w-4"}),label:"Network Out",value:s.network_out}),(0,t.jsx)(eg,{icon:(0,t.jsx)(A.A,{className:"h-4 w-4"}),label:"Response Time",value:s.response_time}),(0,t.jsx)("div",{className:"sm:col-span-2",children:(0,t.jsx)(eg,{icon:(0,t.jsx)(ep.A,{className:"h-4 w-4"}),label:"System Uptime",value:s.uptime})})]})})]}):(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)(l.ZBx,{children:"System Metrics"})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No metrics data available"})})]})}function ev(e){let{systemHealth:s,isLoadingSystemHealth:a,systemMetrics:r,isLoadingSystemMetrics:l,recentActivity:c,isLoadingRecentActivity:i}=e;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(X,{metrics:r,isLoading:l}),(0,t.jsxs)("div",{className:"grid gap-6 grid-cols-1 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(eh,{health:s,isLoading:a}),(0,t.jsx)(eN,{metrics:r,isLoading:l})]}),(0,t.jsx)("div",{className:"space-y-6",children:(0,t.jsx)(Q,{activities:c,isLoading:i,maxItems:20})})]})]})}var ey=a(32436);function ew(){return(0,t.jsxs)(l.ZpM,{children:[(0,t.jsxs)(l.aRn,{children:[(0,t.jsx)(l.EAD,{className:"h-6 w-40 mb-2"}),(0,t.jsx)(l.EAD,{className:"h-4 w-32"})]}),(0,t.jsx)(l.Wux,{children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(l.EAD,{className:"h-4 w-full"}),(0,t.jsx)(l.EAD,{className:"h-4 w-3/4"}),(0,t.jsx)(l.EAD,{className:"h-4 w-1/2"})]})})]})}function eA(e){let{appStatistics:s,isLoadingAppStatistics:a}=e;return a?(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((e,s)=>(0,t.jsx)(ew,{},s))}):s&&0!==s.length?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:"Application Statistics"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Statistics for all enabled django-cfg applications"})]}),(0,t.jsx)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:s.map((e,s)=>(0,t.jsxs)(l.ZpM,{children:[(0,t.jsx)(l.aRn,{children:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.ZBx,{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.A,{className:"h-5 w-5"}),e.app_name]}),(0,t.jsx)(l.BTJ,{className:"mt-1",children:"Application metrics"})]})})}),(0,t.jsx)(l.Wux,{children:(0,t.jsx)("div",{className:"space-y-2",children:e.statistics&&"object"==typeof e.statistics?Object.entries(e.statistics).map(e=>{let[s,a]=e;return(0,t.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground capitalize",children:s.replace(/_/g," ")}),(0,t.jsx)("span",{className:"font-medium",children:"number"==typeof a?a.toLocaleString():String(a)})]},s)}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No statistics available"})})})]},s))})]}):(0,t.jsxs)(l.FcD,{children:[(0,t.jsx)(ei.A,{className:"h-4 w-4"}),(0,t.jsx)(l.TND,{children:"No application statistics available. This may indicate that no django-cfg apps are enabled or configured."})]})}function eb(){let{statCards:e,isLoadingStatCards:s,statCardsError:a,refreshStatCards:h,systemHealth:m,isLoadingSystemHealth:u,systemHealthError:p,refreshSystemHealth:g,systemMetrics:f,isLoadingSystemMetrics:N,systemMetricsError:v,refreshSystemMetrics:y,recentActivity:w,isLoadingRecentActivity:A,recentActivityError:b,refreshRecentActivity:k,quickActions:D,isLoadingQuickActions:_,quickActionsError:E,refreshQuickActions:M,userStatistics:L,isLoadingUserStatistics:S,userStatisticsError:Z,refreshUserStatistics:W,appStatistics:R,isLoadingAppStatistics:C,appStatisticsError:B,refreshAppStatistics:H}=function(){let e=(0,r.useContext)(j);if(!e)throw Error("useDashboardContext must be used within DashboardProvider");return e}(),T=async()=>{await Promise.all([h(),g(),y(),k(),M(),W(),H()])},U=a||p||v||b||E||Z||B,F=s&&u&&N&&A&&_&&S&&C;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"Welcome back! Here's your system overview."})]}),(0,t.jsxs)(l.$nd,{onClick:T,disabled:F,variant:"outline",size:"sm",children:[(0,t.jsx)(c.A,{className:"h-4 w-4 mr-2 ".concat(F?"animate-spin":"")}),"Refresh"]})]}),U&&(0,t.jsxs)(l.FcD,{variant:"destructive",children:[(0,t.jsx)(i.A,{className:"h-4 w-4"}),(0,t.jsx)(l.XL1,{children:"Error Loading Dashboard Data"}),(0,t.jsx)(l.TND,{children:"Some dashboard components failed to load. Please try refreshing."})]}),(0,t.jsxs)(l.tUM,{defaultValue:"overview",className:"space-y-6",children:[(0,t.jsxs)(l.j7C,{className:"grid w-full grid-cols-4",children:[(0,t.jsxs)(l.Xib,{value:"overview",className:"flex items-center gap-2",children:[(0,t.jsx)(n.A,{className:"h-4 w-4"}),"Overview"]}),(0,t.jsxs)(l.Xib,{value:"users",className:"flex items-center gap-2",children:[(0,t.jsx)(d.A,{className:"h-4 w-4"}),"Users"]}),(0,t.jsxs)(l.Xib,{value:"system",className:"flex items-center gap-2",children:[(0,t.jsx)(x.A,{className:"h-4 w-4"}),"System"]}),(0,t.jsxs)(l.Xib,{value:"app-stats",className:"flex items-center gap-2",children:[(0,t.jsx)(o.A,{className:"h-4 w-4"}),"App Stats"]})]}),(0,t.jsx)(l.avX,{value:"overview",className:"space-y-6",children:(0,t.jsx)(J,{statCards:e,isLoadingStatCards:s,systemHealth:m,isLoadingSystemHealth:u,quickActions:D,isLoadingQuickActions:_,systemMetrics:f,isLoadingSystemMetrics:N})}),(0,t.jsx)(l.avX,{value:"users",className:"space-y-6",children:(0,t.jsx)(el,{userStatistics:L,isLoadingUserStatistics:S,recentActivity:w,isLoadingRecentActivity:A})}),(0,t.jsx)(l.avX,{value:"system",className:"space-y-6",children:(0,t.jsx)(ev,{systemHealth:m,isLoadingSystemHealth:u,systemMetrics:f,isLoadingSystemMetrics:N,recentActivity:w,isLoadingRecentActivity:A})}),(0,t.jsx)(l.avX,{value:"app-stats",className:"space-y-6",children:(0,t.jsx)(eA,{appStatistics:R,isLoadingAppStatistics:C})})]})]})}function ek(){return(0,t.jsx)(u,{children:(0,t.jsx)(eb,{})})}},96482:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/private",function(){return a(46743)}])}},e=>{e.O(0,[82296,50314,90636,46593,38792],()=>e(e.s=96482)),_N_E=e.O()}]);