django-cfg 1.4.86__py3-none-any.whl → 1.4.87__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 (51) hide show
  1. django_cfg/__init__.py +1 -1
  2. django_cfg/apps/frontend/views.py +31 -4
  3. django_cfg/modules/django_client/core/generator/typescript/templates/client/client.ts.jinja +18 -14
  4. django_cfg/modules/django_client/core/generator/typescript/templates/utils/http.ts.jinja +8 -3
  5. django_cfg/pyproject.toml +1 -1
  6. django_cfg/static/frontend/admin/404/index.html +1 -0
  7. django_cfg/static/frontend/admin/404.html +1 -1
  8. django_cfg/static/frontend/admin/500/index.html +1 -0
  9. django_cfg/static/frontend/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_buildManifest.js +1 -0
  10. django_cfg/static/frontend/admin/_next/static/chunks/{43076.55dd23b6cd68edb0.js → 20695.a7d37b6c40ad3f58.js} +1 -1
  11. django_cfg/static/frontend/admin/_next/static/chunks/43076-4be6a9794e9c3e8b.js +1 -0
  12. django_cfg/static/frontend/admin/_next/static/chunks/50314-48bd5701f62faf27.js +1 -0
  13. django_cfg/static/frontend/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js +1 -0
  14. django_cfg/static/frontend/admin/_next/static/chunks/pages/{404-cf71cd7b3cb005e5.js → 404-9c41b6ebfe67f15e.js} +1 -1
  15. django_cfg/static/frontend/admin/_next/static/chunks/pages/{500-ff19c7842e3df415.js → 500-906d92e10e7e65fb.js} +1 -1
  16. django_cfg/static/frontend/admin/_next/static/chunks/pages/{_app-f62e5528fbcbb6b3.js → _app-c336f254967dd101.js} +51 -51
  17. django_cfg/static/frontend/admin/_next/static/chunks/pages/{_error-87f3fdc2aa131e77.js → _error-2550e721b11b7946.js} +1 -1
  18. django_cfg/static/frontend/admin/_next/static/chunks/pages/{index-69f737d4802cc5b7.js → index-fe4802f9df0ac052.js} +1 -1
  19. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-22532c65971225eb.js +1 -0
  20. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{profile-b8045f993287f1a7.js → profile-5cd57aac826857fd.js} +1 -1
  21. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{ui-373fff8b42878e64.js → ui-383e7f474cf22a18.js} +1 -1
  22. django_cfg/static/frontend/admin/_next/static/chunks/{webpack-7c456a65e96eb97e.js → webpack-da114020a6b940f5.js} +1 -1
  23. django_cfg/static/frontend/admin/{private/profile.html → auth/index.html} +1 -1
  24. django_cfg/static/frontend/admin/index.html +1 -1
  25. django_cfg/static/frontend/admin/legal/cookies/index.html +1 -0
  26. django_cfg/static/frontend/admin/legal/privacy/index.html +1 -0
  27. django_cfg/static/frontend/admin/legal/security/index.html +1 -0
  28. django_cfg/static/frontend/admin/legal/terms/index.html +1 -0
  29. django_cfg/static/frontend/admin/private/centrifugo/index.html +1 -0
  30. django_cfg/static/frontend/admin/private/index.html +1 -0
  31. django_cfg/static/frontend/admin/private/{centrifugo.html → profile/index.html} +1 -1
  32. django_cfg/static/frontend/admin/private/ui/index.html +92 -0
  33. django_cfg/templates/admin/index.html +29 -43
  34. {django_cfg-1.4.86.dist-info → django_cfg-1.4.87.dist-info}/METADATA +1 -1
  35. {django_cfg-1.4.86.dist-info → django_cfg-1.4.87.dist-info}/RECORD +39 -37
  36. django_cfg/static/frontend/admin/500.html +0 -1
  37. django_cfg/static/frontend/admin/_next/static/chunks/50314-3b9d15242191c8bc.js +0 -1
  38. django_cfg/static/frontend/admin/_next/static/chunks/main-f9b6d451d9991f19.js +0 -1
  39. django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-f24beb6ed3955aa8.js +0 -1
  40. django_cfg/static/frontend/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_buildManifest.js +0 -1
  41. django_cfg/static/frontend/admin/auth.html +0 -1
  42. django_cfg/static/frontend/admin/legal/cookies.html +0 -1
  43. django_cfg/static/frontend/admin/legal/privacy.html +0 -1
  44. django_cfg/static/frontend/admin/legal/security.html +0 -1
  45. django_cfg/static/frontend/admin/legal/terms.html +0 -1
  46. django_cfg/static/frontend/admin/private/ui.html +0 -1
  47. django_cfg/static/frontend/admin/private.html +0 -1
  48. /django_cfg/static/frontend/admin/_next/static/{wg0mGdXjT00H_1BUxoOSH → ZJZBgOL9mO1koHrgaaLEV}/_ssgManifest.js +0 -0
  49. {django_cfg-1.4.86.dist-info → django_cfg-1.4.87.dist-info}/WHEEL +0 -0
  50. {django_cfg-1.4.86.dist-info → django_cfg-1.4.87.dist-info}/entry_points.txt +0 -0
  51. {django_cfg-1.4.86.dist-info → django_cfg-1.4.87.dist-info}/licenses/LICENSE +0 -0
django_cfg/__init__.py CHANGED
@@ -32,7 +32,7 @@ Example:
32
32
  default_app_config = "django_cfg.apps.DjangoCfgConfig"
33
33
 
34
34
  # Version information
35
- __version__ = "1.4.86"
35
+ __version__ = "1.4.87"
36
36
  __license__ = "MIT"
37
37
 
38
38
  # Import registry for organized lazy loading
@@ -19,10 +19,18 @@ class NextJSStaticView(View):
19
19
  Serve Next.js static build files with automatic JWT token injection.
20
20
 
21
21
  Features:
22
- - Serves Next.js static export files
22
+ - Serves Next.js static export files like a static file server
23
23
  - Automatically injects JWT tokens for authenticated users
24
24
  - Tokens injected into HTML responses only
25
25
  - Handles Next.js client-side routing (.html fallback)
26
+ - Automatically serves index.html for directory paths
27
+
28
+ Path resolution examples:
29
+ - /cfg/admin/ → /cfg/admin/index.html
30
+ - /cfg/admin/private/ → /cfg/admin/private/index.html (if exists)
31
+ - /cfg/admin/private/ → /cfg/admin/private.html (fallback)
32
+ - /cfg/admin/tasks → /cfg/admin/tasks.html
33
+ - /cfg/admin/tasks → /cfg/admin/tasks/index.html (fallback)
26
34
  """
27
35
 
28
36
  app_name = 'admin'
@@ -36,14 +44,27 @@ class NextJSStaticView(View):
36
44
  if not base_dir.exists():
37
45
  raise Http404(f"Frontend app '{self.app_name}' not found. Run 'make build-admin' to build it.")
38
46
 
47
+ original_path = path # Store for logging
48
+
39
49
  # Default to index.html for root path
40
50
  if not path or path == '/':
41
51
  path = 'index.html'
52
+ logger.debug(f"Root path requested, serving: {path}")
42
53
 
43
- # Handle trailing slash (Next.js static export behavior)
44
- # /private/ -> private.html
54
+ # Handle trailing slash - try multiple strategies like a static file server
45
55
  if path.endswith('/') and path != '/':
46
- path = path.rstrip('/') + '.html'
56
+ path_without_slash = path.rstrip('/')
57
+
58
+ # Strategy 1: Try directory/index.html (most common for static servers)
59
+ index_path = path + 'index.html'
60
+ if (base_dir / index_path).exists():
61
+ path = index_path
62
+ # Strategy 2: Try path.html (Next.js static export behavior)
63
+ elif (base_dir / (path_without_slash + '.html')).exists():
64
+ path = path_without_slash + '.html'
65
+ # Strategy 3: Keep as directory path (will fail later if directory doesn't exist)
66
+ else:
67
+ path = index_path # Default to index.html in directory
47
68
 
48
69
  # For routes without extension, try .html (Next.js static export behavior)
49
70
  file_path = base_dir / path
@@ -52,6 +73,12 @@ class NextJSStaticView(View):
52
73
  html_file = base_dir / html_path
53
74
  if html_file.exists():
54
75
  path = html_path
76
+ else:
77
+ # Try path/index.html as fallback
78
+ index_path = path + '/index.html'
79
+ index_file = base_dir / index_path
80
+ if index_file.exists():
81
+ path = index_path
55
82
 
56
83
  # For HTML files, remove conditional GET headers to force full response
57
84
  # This allows JWT token injection (can't inject into 304 Not Modified responses)
@@ -129,7 +129,9 @@ export class APIClient {
129
129
  headers?: Record<string, string>;
130
130
  }
131
131
  ): Promise<T> {
132
- const url = new URL(path, this.baseUrl);
132
+ // Build URL - handle both absolute and relative paths
133
+ // When baseUrl is empty (static builds), path is used as-is (relative to current origin)
134
+ const url = this.baseUrl ? `${this.baseUrl}${path}` : path;
133
135
  const startTime = Date.now();
134
136
 
135
137
  // Build headers - start with custom headers from options
@@ -159,7 +161,7 @@ export class APIClient {
159
161
  if (this.logger) {
160
162
  this.logger.logRequest({
161
163
  method,
162
- url: url.toString(),
164
+ url: url,
163
165
  headers,
164
166
  body: options?.formData || options?.body,
165
167
  timestamp: startTime,
@@ -170,7 +172,7 @@ export class APIClient {
170
172
  // Make request via HTTP adapter
171
173
  const response = await this.httpClient.request<T>({
172
174
  method,
173
- url: url.toString(),
175
+ url: url,
174
176
  headers,
175
177
  params: options?.params,
176
178
  body: options?.body,
@@ -185,7 +187,7 @@ export class APIClient {
185
187
  response.status,
186
188
  response.statusText,
187
189
  response.data,
188
- url.toString()
190
+ url
189
191
  );
190
192
 
191
193
  // Log error
@@ -193,7 +195,7 @@ export class APIClient {
193
195
  this.logger.logError(
194
196
  {
195
197
  method,
196
- url: url.toString(),
198
+ url: url,
197
199
  headers,
198
200
  body: options?.formData || options?.body,
199
201
  timestamp: startTime,
@@ -215,7 +217,7 @@ export class APIClient {
215
217
  this.logger.logResponse(
216
218
  {
217
219
  method,
218
- url: url.toString(),
220
+ url: url,
219
221
  headers,
220
222
  body: options?.formData || options?.body,
221
223
  timestamp: startTime,
@@ -241,15 +243,15 @@ export class APIClient {
241
243
 
242
244
  // Wrap other errors as NetworkError
243
245
  const networkError = error instanceof Error
244
- ? new NetworkError(error.message, url.toString(), error)
245
- : new NetworkError('Unknown error', url.toString());
246
+ ? new NetworkError(error.message, url, error)
247
+ : new NetworkError('Unknown error', url);
246
248
 
247
249
  // Log network error
248
250
  if (this.logger) {
249
251
  this.logger.logError(
250
252
  {
251
253
  method,
252
- url: url.toString(),
254
+ url: url,
253
255
  headers,
254
256
  body: options?.formData || options?.body,
255
257
  timestamp: startTime,
@@ -358,7 +360,9 @@ export class APIClient {
358
360
  headers?: Record<string, string>;
359
361
  }
360
362
  ): Promise<T> {
361
- const url = new URL(path, this.baseUrl);
363
+ // Build URL - handle both absolute and relative paths
364
+ // When baseUrl is empty (static builds), path is used as-is (relative to current origin)
365
+ const url = this.baseUrl ? `${this.baseUrl}${path}` : path;
362
366
 
363
367
  // Build headers - start with custom headers from options
364
368
  const headers: Record<string, string> = {
@@ -387,7 +391,7 @@ export class APIClient {
387
391
  // Make request via HTTP adapter
388
392
  const response = await this.httpClient.request<T>({
389
393
  method,
390
- url: url.toString(),
394
+ url: url,
391
395
  headers,
392
396
  params: options?.params,
393
397
  body: options?.body,
@@ -400,7 +404,7 @@ export class APIClient {
400
404
  response.status,
401
405
  response.statusText,
402
406
  response.data,
403
- url.toString()
407
+ url
404
408
  );
405
409
  }
406
410
 
@@ -413,8 +417,8 @@ export class APIClient {
413
417
 
414
418
  // Wrap other errors as NetworkError
415
419
  throw error instanceof Error
416
- ? new NetworkError(error.message, url.toString(), error)
417
- : new NetworkError('Unknown error', url.toString());
420
+ ? new NetworkError(error.message, url, error)
421
+ : new NetworkError('Unknown error', url);
418
422
  }
419
423
  }
420
424
 
@@ -39,13 +39,18 @@ export class FetchAdapter implements HttpClientAdapter {
39
39
  const { method, url, headers, body, params, formData } = request;
40
40
 
41
41
  // Build URL with query params
42
- const finalUrl = new URL(url);
42
+ let finalUrl = url;
43
43
  if (params) {
44
+ const searchParams = new URLSearchParams();
44
45
  Object.entries(params).forEach(([key, value]) => {
45
46
  if (value !== null && value !== undefined) {
46
- finalUrl.searchParams.append(key, String(value));
47
+ searchParams.append(key, String(value));
47
48
  }
48
49
  });
50
+ const queryString = searchParams.toString();
51
+ if (queryString) {
52
+ finalUrl = url.includes('?') ? `${url}&${queryString}` : `${url}?${queryString}`;
53
+ }
49
54
  }
50
55
 
51
56
  // Build headers
@@ -65,7 +70,7 @@ export class FetchAdapter implements HttpClientAdapter {
65
70
  }
66
71
 
67
72
  // Make request
68
- const response = await fetch(finalUrl.toString(), {
73
+ const response = await fetch(finalUrl, {
69
74
  method,
70
75
  headers: finalHeaders,
71
76
  body: requestBody,
django_cfg/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "django-cfg"
7
- version = "1.4.86"
7
+ version = "1.4.87"
8
8
  description = "Django AI framework with built-in agents, type-safe Pydantic v2 configuration, and 8 enterprise apps. Replace settings.py, validate at startup, 90% less code. Production-ready AI workflows for Django."
9
9
  readme = "README.md"
10
10
  keywords = [ "django", "configuration", "pydantic", "settings", "type-safety", "pydantic-settings", "django-environ", "startup-validation", "ide-autocomplete", "ai-agents", "enterprise-django", "django-settings", "type-safe-config",]
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/875ae681bfde4580-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-da114020a6b940f5.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-c336f254967dd101.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-9c41b6ebfe67f15e.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Manrope', 'Manrope Fallback'; }</style><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you&#x27;re looking for doesn&#x27;t exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"ZJZBgOL9mO1koHrgaaLEV","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/875ae681bfde4580-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-7c456a65e96eb97e.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-f9b6d451d9991f19.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-f62e5528fbcbb6b3.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-cf71cd7b3cb005e5.js" defer=""></script><script src="/cfg/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_ssgManifest.js" defer=""></script></head><body><link rel="preload" as="image" href="/cfg/admin/static/logos/vector.svg"/><div id="__next"><style>html { font-family: 'Manrope', 'Manrope Fallback'; }</style><div class="min-h-screen flex flex-col"><nav class="sticky top-0 w-full border-b backdrop-blur-xl z-[100] bg-background/80 border-border/30 isolate"><div class="w-full px-4 sm:px-6 lg:px-8"><div class="flex items-center justify-between py-2 min-h-[40px]"><div class="flex items-center gap-6"><a class="flex items-center gap-3 group" href="/cfg/admin"><img src="/cfg/admin/static/logos/vector.svg" alt="Django CFG Logo" class="h-8 w-auto object-contain transition-transform duration-300 group-hover:scale-105"/><span class="text-xl font-bold transition-colors duration-300 text-foreground group-hover:text-primary">Django CFG</span></a><div class="flex items-center gap-1"><a class="inline-flex h-9 items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50" href="/cfg/admin">Home</a><div><button type="button" id="radix-«Rklr6»" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="inline-flex h-9 items-center justify-center gap-1 rounded-md px-4 py-2 text-sm font-medium transition-colors focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground">Resources<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-180"><path d="m6 9 6 6 6-6"></path></svg></button></div><div><button type="button" id="radix-«Rslr6»" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="inline-flex h-9 items-center justify-center gap-1 rounded-md px-4 py-2 text-sm font-medium transition-colors focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground">Security<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-180"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></div><div class="flex items-center gap-2"><div class="flex items-center gap-3"><a class="inline-flex cursor-pointer items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 rounded-md px-3 text-sm h-9 gap-1.5" href="/cfg/admin/auth"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user w-4 h-4"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>Sign In</a></div></div></div></div></nav><main class="flex-1"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you&#x27;re looking for doesn&#x27;t exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div></main><footer class="max-lg:hidden bg-background border-t border-border mt-auto"><div class="w-full px-8 lg:px-16 xl:px-24 py-12"><div class="flex flex-col gap-8"><div class="flex gap-8"><div class="space-y-4" style="width:30%;min-width:300px"><div class="flex items-center gap-2"><div class="w-8 h-8 flex items-center justify-center"><img src="/cfg/admin/static/logos/vector.svg" alt="Django CFG Logo" class="w-full h-full object-contain"/></div><span class="text-xl font-bold text-foreground">Django CFG</span></div><p class="text-muted-foreground text-sm leading-relaxed">Django CFG Admin Panel</p><div class="pt-2"><span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-sm bg-primary/10 hover:bg-primary/15 border border-primary/20 text-xs font-medium text-primary transition-colors"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-car w-3.5 h-3.5" aria-hidden="true"><path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"></path><circle cx="7" cy="17" r="2"></circle><path d="M9 17h6"></path><circle cx="17" cy="17" r="2"></circle></svg>Django CFG</span></div></div><div class="grid grid-cols-2 md:grid-cols-4 gap-8 flex-1"><div><h3 class="text-sm font-semibold text-foreground mb-3">Legal</h3><ul class="space-y-2"><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/docs">Documentation</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/privacy">Privacy Policy</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/terms">Terms of Service</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/security">Security Policy</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/cookies">Cookie Policy</a></li></ul></div></div></div><div class="border-t border-border" style="margin-top:2rem;padding-top:2rem"><div class="flex justify-between items-center gap-4"><div class="text-xs text-muted-foreground">© <!-- -->2025<!-- --> <!-- -->Django CFG<!-- -->. All rights reserved.</div><div class="text-xs text-muted-foreground flex items-center gap-1">Made with ❤️ by<!-- --> <a href="https://reforms.ai" target="_blank" rel="noopener noreferrer" class="hover:text-primary transition-colors">ReformsAI</a></div><div class="flex flex-wrap items-center gap-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 hover:bg-accent h-auto w-auto p-1 text-muted-foreground hover:text-primary transition-colors" title="Package Versions" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-«R3rr6»" data-state="closed"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info h-3 w-3"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></button><a href="/docs" target="_blank" rel="noopener noreferrer" class="text-xs text-muted-foreground hover:text-primary transition-colors" title="Documentation">Docs</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/privacy">Privacy Policy</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/terms">Terms of Service</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/security">Security</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/cookies">Cookies</a></div></div></div></div></div></footer></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"wg0mGdXjT00H_1BUxoOSH","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/875ae681bfde4580-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-da114020a6b940f5.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-c336f254967dd101.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-9c41b6ebfe67f15e.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Manrope', 'Manrope Fallback'; }</style><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you&#x27;re looking for doesn&#x27;t exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"ZJZBgOL9mO1koHrgaaLEV","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/875ae681bfde4580-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-da114020a6b940f5.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-c336f254967dd101.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/500-906d92e10e7e65fb.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/ZJZBgOL9mO1koHrgaaLEV/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Manrope', 'Manrope Fallback'; }</style><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">500</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server-crash w-24 h-24 text-destructive/50"><path d="M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2"></path><path d="M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2"></path><path d="M6 6h.01"></path><path d="M6 18h.01"></path><path d="m13 6-4 6h6l-4 6"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Server Error</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">Something went wrong on our end. We&#x27;re working to fix it.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/500","query":{},"buildId":"ZJZBgOL9mO1koHrgaaLEV","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST=function(e,a,s,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:s,bitArray:[]},__routerFilterDynamic:{numItems:e,errorRate:1e-4,numBits:e,numHashes:s,bitArray:[]},"/":["static/chunks/pages/index-fe4802f9df0ac052.js"],"/404":["static/chunks/pages/404-9c41b6ebfe67f15e.js"],"/500":["static/chunks/pages/500-906d92e10e7e65fb.js"],"/_error":["static/chunks/pages/_error-2550e721b11b7946.js"],"/auth":["static/chunks/pages/auth-a872607f98742e5a.js"],"/legal/cookies":["static/chunks/pages/legal/cookies-b39c7f22c066e2c6.js"],"/legal/privacy":["static/chunks/pages/legal/privacy-5aedad0cf3a4f80f.js"],"/legal/security":["static/chunks/pages/legal/security-dbd854d0d5d483e2.js"],"/legal/terms":["static/chunks/pages/legal/terms-f3e1d2b9e5edf12f.js"],"/private":["static/chunks/23004-faae121bbfecc163.js",t,"static/chunks/pages/private-fe9faa86ecdb0ce6.js"],"/private/centrifugo":["static/chunks/43076-4be6a9794e9c3e8b.js",t,"static/chunks/pages/private/centrifugo-22532c65971225eb.js"],"/private/profile":["static/chunks/pages/private/profile-5cd57aac826857fd.js"],"/private/ui":["static/chunks/pages/private/ui-383e7f474cf22a18.js"],sortedPages:["/","/404","/500","/_app","/_error","/auth","/legal/cookies","/legal/privacy","/legal/security","/legal/terms","/private","/private/centrifugo","/private/profile","/private/ui"]}}(0,1e-4,NaN,"static/chunks/50314-48bd5701f62faf27.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43076],{43076:(e,l,r)=>{r.r(l),r.d(l,{default:()=>i});var s=r(34226),a=r(94285),d=r(94513),h=(0,a.forwardRef)(({variant:e="branded",fallback:l,...r},a)=>(0,d.jsx)(s.h_,{fallback:l,...r,ref:a,children:"branded"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"#01C853",d:"m6.578 11.063 5.475-2.235 5.294 2.295L12.037 3zm.014 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"mono"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"currentColor",d:"m6.577 11.063 5.476-2.235 5.294 2.295L12.037 3zm.015 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"background"===e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("g",{clipPath:"url(#ethereum-classic__a)",children:[(0,d.jsx)("path",{fill:"#01C853",d:"M24 0H0v24h24z"}),(0,d.jsx)("path",{fill:"#fff",d:"m7.18 11.167 4.867-1.987 4.706 2.04L12.033 4zm.013 2.206 4.854 2.734L17 13.373 12.093 20zm4.867-3.22 4.927 2.127-4.927 2.667L7 12.22l5.067-2.067z"})]}),(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"ethereum-classic__a",children:(0,d.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}));h.displayName="NetworkEthereumClassic";var i=h}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20695],{43076:(e,l,r)=>{r.r(l),r.d(l,{default:()=>i});var s=r(34226),a=r(94285),d=r(94513),h=(0,a.forwardRef)(({variant:e="branded",fallback:l,...r},a)=>(0,d.jsx)(s.h_,{fallback:l,...r,ref:a,children:"branded"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"#01C853",d:"m6.578 11.063 5.475-2.235 5.294 2.295L12.037 3zm.014 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"mono"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"currentColor",d:"m6.577 11.063 5.476-2.235 5.294 2.295L12.037 3zm.015 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"background"===e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("g",{clipPath:"url(#ethereum-classic__a)",children:[(0,d.jsx)("path",{fill:"#01C853",d:"M24 0H0v24h24z"}),(0,d.jsx)("path",{fill:"#fff",d:"m7.18 11.167 4.867-1.987 4.706 2.04L12.033 4zm.013 2.206 4.854 2.734L17 13.373 12.093 20zm4.867-3.22 4.927 2.127-4.927 2.667L7 12.22l5.067-2.067z"})]}),(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"ethereum-classic__a",children:(0,d.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}));h.displayName="NetworkEthereumClassic";var i=h}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43076],{3032:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7737:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},13121:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},13330:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},21936:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},26457:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("test-tube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]])},35685:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},47019:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},47857:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},51352:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},53765:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},55833:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},57147:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},58526:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},68332:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},69489:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]])},69673:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},71964:(e,t,s)=>{function i(e,t,s,i){return new(s||(s=Promise))(function(n,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,a)}c((i=i.apply(e,t||[])).next())})}s.d(t,{Ft:()=>B}),"function"==typeof SuppressedError&&SuppressedError;var n,r,o,a,c,h,l,u,d,_={exports:{}},p="object"==typeof Reflect?Reflect:null,f=p&&"function"==typeof p.apply?p.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)};n=p&&"function"==typeof p.ownKeys?p.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var b=Number.isNaN||function(e){return e!=e};function g(){g.init.call(this)}_.exports=g,_.exports.once=function(e,t){return new Promise(function(s,i){var n,r,o;function a(s){e.removeListener(t,c),i(s)}function c(){"function"==typeof e.removeListener&&e.removeListener("error",a),s([].slice.call(arguments))}x(e,t,c,{once:!0}),"error"!==t&&(n=e,r=a,o={once:!0},"function"==typeof n.on&&x(n,"error",r,o))})},g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var m=10;function v(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function y(e){return void 0===e._maxListeners?g.defaultMaxListeners:e._maxListeners}function k(e,t,s,i){if(v(s),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,s.listener?s.listener:s),r=e._events),o=r[t]),void 0===o)o=r[t]=s,++e._eventsCount;else if("function"==typeof o?o=r[t]=i?[s,o]:[o,s]:i?o.unshift(s):o.push(s),(n=y(e))>0&&o.length>n&&!o.warned){o.warned=!0;var n,r,o,a=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=o.length,console&&console.warn&&console.warn(a)}return e}function T(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(e,t,s){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:s},n=T.bind(i);return n.listener=s,i.wrapFn=n,n}function w(e,t,s){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?s?[n.listener||n]:[n]:s?function(e){for(var t=Array(e.length),s=0;s<t.length;++s)t[s]=e[s].listener||e[s];return t}(n):E(n,n.length)}function C(e){var t=this._events;if(void 0!==t){var s=t[e];if("function"==typeof s)return 1;if(void 0!==s)return s.length}return 0}function E(e,t){for(var s=Array(t),i=0;i<t;++i)s[i]=e[i];return s}function x(e,t,s,i){if("function"==typeof e.on)i.once?e.once(t,s):e.on(t,s);else if("function"==typeof e.addEventListener)e.addEventListener(t,function n(r){i.once&&e.removeEventListener(t,n),s(r)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return m},set:function(e){if("number"!=typeof e||e<0||b(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");m=e}}),g.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},g.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||b(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},g.prototype.getMaxListeners=function(){return y(this)},g.prototype.emit=function(e){for(var t=[],s=1;s<arguments.length;s++)t.push(arguments[s]);var i="error"===e,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var r,o=Error("Unhandled error."+(r?" ("+r.message+")":""));throw o.context=r,o}var a=n[e];if(void 0===a)return!1;if("function"==typeof a)f(a,this,t);else for(var c=a.length,h=E(a,c),s=0;s<c;++s)f(h[s],this,t);return!0},g.prototype.addListener=function(e,t){return k(this,e,t,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(e,t){return k(this,e,t,!0)},g.prototype.once=function(e,t){return v(t),this.on(e,S(this,e,t)),this},g.prototype.prependOnceListener=function(e,t){return v(t),this.prependListener(e,S(this,e,t)),this},g.prototype.removeListener=function(e,t){var s,i,n,r,o;if(v(t),void 0===(i=this._events)||void 0===(s=i[e]))return this;if(s===t||s.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,s.listener||t));else if("function"!=typeof s){for(n=-1,r=s.length-1;r>=0;r--)if(s[r]===t||s[r].listener===t){o=s[r].listener,n=r;break}if(n<0)return this;0===n?s.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(s,n),1===s.length&&(i[e]=s[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(e){var t,s,i;if(void 0===(s=this._events))return this;if(void 0===s.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==s[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete s[e]),this;if(0==arguments.length){var n,r=Object.keys(s);for(i=0;i<r.length;++i)"removeListener"!==(n=r[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=s[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},g.prototype.listeners=function(e){return w(this,e,!0)},g.prototype.rawListeners=function(e){return w(this,e,!1)},g.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},g.prototype.listenerCount=C,g.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};var P=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(_.exports);function R(e){return null!=e&&"function"==typeof e}function O(e,t,s){e>31&&(e=31);let i=Math.floor(Math.random()*(Math.min(s,t*Math.pow(2,e))-0+1)+0);return Math.min(s,t+i)}function A(e){return Math.min(1e3*e,0x7fffffff)}!function(e){e[e.timeout=1]="timeout",e[e.transportClosed=2]="transportClosed",e[e.clientDisconnected=3]="clientDisconnected",e[e.clientClosed=4]="clientClosed",e[e.clientConnectToken=5]="clientConnectToken",e[e.clientRefreshToken=6]="clientRefreshToken",e[e.subscriptionUnsubscribed=7]="subscriptionUnsubscribed",e[e.subscriptionSubscribeToken=8]="subscriptionSubscribeToken",e[e.subscriptionRefreshToken=9]="subscriptionRefreshToken",e[e.transportWriteError=10]="transportWriteError",e[e.connectionClosed=11]="connectionClosed",e[e.badConfiguration=12]="badConfiguration"}(r||(r={})),function(e){e[e.connectCalled=0]="connectCalled",e[e.transportClosed=1]="transportClosed",e[e.noPing=2]="noPing",e[e.subscribeTimeout=3]="subscribeTimeout",e[e.unsubscribeError=4]="unsubscribeError"}(o||(o={})),function(e){e[e.disconnectCalled=0]="disconnectCalled",e[e.unauthorized=1]="unauthorized",e[e.badProtocol=2]="badProtocol",e[e.messageSizeLimit=3]="messageSizeLimit"}(a||(a={})),function(e){e[e.subscribeCalled=0]="subscribeCalled",e[e.transportClosed=1]="transportClosed"}(c||(c={})),function(e){e[e.unsubscribeCalled=0]="unsubscribeCalled",e[e.unauthorized=1]="unauthorized",e[e.clientClosed=2]="clientClosed"}(h||(h={})),function(e){e[e.channelCompaction=1]="channelCompaction"}(l||(l={})),function(e){e.Disconnected="disconnected",e.Connecting="connecting",e.Connected="connected"}(u||(u={})),function(e){e.Unsubscribed="unsubscribed",e.Subscribing="subscribing",e.Subscribed="subscribed"}(d||(d={}));class j extends P{constructor(e,t,s){super(),this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=t,this.state=d.Unsubscribed,this._centrifuge=e,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=2e4,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(s),this._centrifuge._debugEnabled?(this.on("state",e=>{this._debug("subscription state",t,e.oldState,"->",e.newState)}),this.on("error",e=>{this._debug("subscription error",t,e)})):this.on("error",function(){Function.prototype()})}ready(e){return this.state===d.Unsubscribed?Promise.reject({code:r.subscriptionUnsubscribed,message:this.state}):this.state===d.Subscribed?Promise.resolve():new Promise((t,s)=>{let i={resolve:t,reject:s};e&&(i.timeout=setTimeout(function(){s({code:r.timeout,message:"timeout"})},e)),this._promises[this._nextPromiseId()]=i})}subscribe(){this._isSubscribed()||(this._resubscribeAttempts=0,this._setSubscribing(c.subscribeCalled,"subscribe called"))}unsubscribe(){this._unsubPromise=this._setUnsubscribed(h.unsubscribeCalled,"unsubscribe called",!0)}publish(e){return i(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.publish(this.channel,e)})}presence(){return i(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return i(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}history(e){return i(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,e)})}setTagsFilter(e){if(e&&this._delta)throw Error("cannot use delta and tagsFilter together");this._tagsFilter=e}setData(e){this._data=e}_methodCall(){return this._isSubscribed()?Promise.resolve():this._isUnsubscribed()?Promise.reject({code:r.subscriptionUnsubscribed,message:this.state}):new Promise((e,t)=>{let s=setTimeout(()=>{t({code:r.timeout,message:"timeout"})},this._centrifuge._config.timeout);this._promises[this._nextPromiseId()]={timeout:s,resolve:e,reject:t}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return!0===this._recover}_isUnsubscribed(){return this.state===d.Unsubscribed}_isSubscribing(){return this.state===d.Subscribing}_isSubscribed(){return this.state===d.Subscribed}_setState(e){if(this.state!==e){let t=this.state;return this.state=e,this.emit("state",{newState:e,oldState:t,channel:this.channel}),!0}return!1}_usesToken(){return""!==this._token||null!==this._getToken}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed(e){if(!this._isSubscribing())return;this._clearSubscribingState(),e.id&&(this._id=e.id),e.recoverable&&(this._recover=!0,this._offset=e.offset||0,this._epoch=e.epoch||""),e.delta?this._delta_negotiated=!0:this._delta_negotiated=!1,this._setState(d.Subscribed);let t=this._centrifuge._getSubscribeContext(this.channel,e);this.emit("subscribed",t),this._resolvePromises();let s=e.publications;if(s&&s.length>0)for(let e in s)s.hasOwnProperty(e)&&this._handlePublication(s[e]);!0===e.expires&&(this._refreshTimeout=setTimeout(()=>this._refresh(),A(e.ttl)))}_setSubscribing(e,t){return i(this,void 0,void 0,function*(){!this._isSubscribing()&&(this._isSubscribed()&&this._clearSubscribedState(),this._setState(d.Subscribing)&&this.emit("subscribing",{channel:this.channel,code:e,reason:t}),this._centrifuge._transport&&this._centrifuge._transport.emulation()&&(yield this._unsubPromise),this._isSubscribing()&&this._subscribe())})}_subscribe(){return(this._debug("subscribing on",this.channel),this._isTransportOpen())?this._inflight?null:(this._inflight=!0,this._canSubscribeWithoutGettingToken())?this._subscribeWithoutToken():(this._getSubscriptionToken().then(e=>this._handleTokenResponse(e)).catch(e=>this._handleTokenError(e)),null):(this._debug("delay subscribe on",this.channel,"till connected"),null)}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){return this._getData?(this._getDataAndSubscribe(this._token),null):this._sendSubscribe(this._token)}_getDataAndSubscribe(e){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then(t=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=t,this._sendSubscribe(e)}).catch(e=>this._handleGetDataError(e))}_handleGetDataError(e){if(!this._isSubscribing()){this._inflight=!1;return}if(e instanceof q){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:r.badConfiguration,message:(null==e?void 0:e.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse(e){if(!this._isSubscribing()){this._inflight=!1;return}if(!e){this._inflight=!1,this._failUnauthorized();return}this._token=e,this._getData?this._getDataAndSubscribe(e):this._sendSubscribe(e)}_handleTokenError(e){if(!this._isSubscribing()){this._inflight=!1;return}if(e instanceof q){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:r.subscriptionSubscribeToken,message:(null==e?void 0:e.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe(e){if(!this._isTransportOpen())return this._inflight=!1,null;let t=this._buildSubscribeCommand(e);return this._centrifuge._call(t).then(e=>{this._inflight=!1;let t=e.reply.subscribe;this._handleSubscribeResponse(t),e.next&&e.next()},e=>{this._inflight=!1,this._handleSubscribeError(e.error),e.next&&e.next()}),t}_buildSubscribeCommand(e){let t={channel:this.channel};if(e&&(t.token=e),this._data&&(t.data=this._data),this._positioned&&(t.positioned=!0),this._recoverable&&(t.recoverable=!0),this._joinLeave&&(t.join_leave=!0),t.flag=l.channelCompaction,this._needRecover()){t.recover=!0;let e=this._getOffset();e&&(t.offset=e);let s=this._getEpoch();s&&(t.epoch=s)}return this._delta&&(t.delta=this._delta),this._tagsFilter&&(t.tf=this._tagsFilter),{subscribe:t}}_debug(...e){this._centrifuge._debug(...e)}_handleSubscribeError(e){if(this._isSubscribing()){if(e.code===r.timeout)return void this._centrifuge._disconnect(o.subscribeTimeout,"subscribe timeout",!0);this._subscribeError(e)}}_handleSubscribeResponse(e){this._isSubscribing()&&this._setSubscribed(e)}_setUnsubscribed(e,t,s){if(this._isUnsubscribed())return Promise.resolve();let i=Promise.resolve();return this._isSubscribed()?(s&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribedState()):this._isSubscribing()&&(this._inflight&&s&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribingState()),this._inflight=!1,this._setState(d.Unsubscribed)&&this.emit("unsubscribed",{channel:this.channel,code:e,reason:t}),this._rejectPromises({code:r.subscriptionUnsubscribed,message:this.state}),i}_handlePublication(e){if(this._delta&&this._delta_negotiated){let{newData:t,newPrevValue:s}=this._centrifuge._codec.applyDeltaIfNeeded(e,this._prevValue);e.data=t,this._prevValue=s}let t=this._centrifuge._getPublicationContext(this.channel,e);this.emit("publication",t),e.offset&&(this._offset=e.offset)}_handleJoin(e){let t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("join",{channel:this.channel,info:t})}_handleLeave(e){let t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("leave",{channel:this.channel,info:t})}_resolvePromises(){for(let e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(let t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}_scheduleResubscribe(){if(!this._isSubscribing())return void this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);let e=this,t=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){e._isSubscribing()&&e._subscribe()},t),this._debug("resubscribe scheduled after "+t,this.channel)}_subscribeError(e){if(this._isSubscribing())if(e.code<100||109===e.code||!0===e.temporary){109===e.code&&(this._token="");let t={channel:this.channel,type:"subscribe",error:e};this._centrifuge.state===u.Connected&&this.emit("error",t),this._scheduleResubscribe()}else this._setUnsubscribed(e.code,e.message,!1)}_getResubscribeDelay(){let e=O(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,e}_setOptions(e){if(e){if(e.since&&(this._offset=e.since.offset||0,this._epoch=e.since.epoch||"",this._recover=!0),e.data&&(this._data=e.data),e.getData&&(this._getData=e.getData),void 0!==e.minResubscribeDelay&&(this._minResubscribeDelay=e.minResubscribeDelay),void 0!==e.maxResubscribeDelay&&(this._maxResubscribeDelay=e.maxResubscribeDelay),e.token&&(this._token=e.token),e.getToken&&(this._getToken=e.getToken),!0===e.positioned&&(this._positioned=!0),!0===e.recoverable&&(this._recoverable=!0),!0===e.joinLeave&&(this._joinLeave=!0),e.delta){if("fossil"!==e.delta)throw Error("unsupported delta format");this._delta=e.delta}if(e.tagsFilter&&(this._tagsFilter=e.tagsFilter),this._tagsFilter&&this._delta)throw Error("cannot use delta and tagsFilter together")}}_getOffset(){let e=this._offset;return null!==e?e:0}_getEpoch(){let e=this._epoch;return null!==e?e:""}_clearRefreshTimeout(){null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearResubscribeTimeout(){null!==this._resubscribeTimeout&&(clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null)}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);let e={channel:this.channel},t=this._getToken;return null===t?(this.emit("error",{type:"configuration",channel:this.channel,error:{code:r.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new q(""))):t(e)}_refresh(){this._clearRefreshTimeout();let e=this;this._getSubscriptionToken().then(function(t){if(!e._isSubscribed())return;if(!t)return void e._failUnauthorized();e._token=t;let s={channel:e.channel,token:t};e._centrifuge._call({sub_refresh:s}).then(t=>{let s=t.reply.sub_refresh;e._refreshResponse(s),t.next&&t.next()},t=>{e._refreshError(t.error),t.next&&t.next()})}).catch(function(t){if(t instanceof q)return void e._failUnauthorized();e.emit("error",{type:"refreshToken",channel:e.channel,error:{code:r.subscriptionRefreshToken,message:void 0!==t?t.toString():""}}),e._refreshTimeout=setTimeout(()=>e._refresh(),e._getRefreshRetryDelay())})}_refreshResponse(e){this._isSubscribed()&&(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),!0===e.expires&&(this._refreshTimeout=setTimeout(()=>this._refresh(),A(e.ttl))))}_refreshError(e){this._isSubscribed()&&(e.code<100||!0===e.temporary?(this.emit("error",{type:"refresh",channel:this.channel,error:e}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._setUnsubscribed(e.code,e.message,!0))}_getRefreshRetryDelay(){return O(0,1e4,2e4)}_failUnauthorized(){this._setUnsubscribed(h.unauthorized,"unauthorized",!0)}}class L{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return null!==this.options.sockjs}initialize(e,t){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=e=>{t.onError(e)},this._transport.onclose=e=>{t.onClose(e)},this._transport.onmessage=e=>{t.onMessage(e.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class M{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return void 0!==this.options.websocket&&null!==this.options.websocket}initialize(e,t){let s="";"protobuf"===e&&(s="centrifuge-protobuf"),""!==s?this._transport=new this.options.websocket(this.endpoint,s):this._transport=new this.options.websocket(this.endpoint),"protobuf"===e&&(this._transport.binaryType="arraybuffer"),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=e=>{t.onError(e)},this._transport.onclose=e=>{t.onClose(e)},this._transport.onmessage=e=>{t.onMessage(e.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class D{constructor(e,t){this.endpoint=e,this.options=t,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors(e){if(!e.ok)throw Error(e.status);return e}_fetchEventTarget(e,t,s){let i=new EventTarget;return(0,e.options.fetch)(t,s).then(e._handleErrors).then(t=>{i.dispatchEvent(new Event("open"));let s="",n=0,r=new Uint8Array,o=t.body.getReader();return new e.options.readableStream({start:t=>(function a(){return o.read().then(({done:o,value:c})=>{if(o){i.dispatchEvent(new Event("close")),t.close();return}try{if("json"===e._protocol)for(s+=e._utf8decoder.decode(c);n<s.length;)if("\n"===s[n]){let e=s.substring(0,n);i.dispatchEvent(new MessageEvent("message",{data:e})),s=s.substring(n+1),n=0}else++n;else{let t=new Uint8Array(r.length+c.length);for(t.set(r),t.set(c,r.length),r=t;;){let t=e.options.decoder.decodeReply(r);if(t.ok){let e=r.slice(0,t.pos);i.dispatchEvent(new MessageEvent("message",{data:e})),r=r.slice(t.pos);continue}break}}}catch(e){i.dispatchEvent(new Event("error",{detail:e})),i.dispatchEvent(new Event("close")),t.close();return}a()}).catch(function(e){i.dispatchEvent(new Event("error",{detail:e})),i.dispatchEvent(new Event("close")),t.close()})})()})}).catch(e=>{i.dispatchEvent(new Event("error",{detail:e})),i.dispatchEvent(new Event("close"))}),i}supported(){return null!==this.options.fetch&&null!==this.options.readableStream&&"undefined"!=typeof TextDecoder&&"undefined"!=typeof AbortController&&"undefined"!=typeof EventTarget&&"undefined"!=typeof Event&&"undefined"!=typeof MessageEvent&&"undefined"!=typeof Error}initialize(e,t,s){let i;this._protocol=e,this._abortController=new AbortController;let n={method:"POST",headers:i="json"===e?{Accept:"application/json","Content-Type":"application/json"}:{Accept:"application/octet-stream","Content-Type":"application/octet-stream"},body:s,mode:"cors",credentials:"same-origin",signal:this._abortController.signal},r=this._fetchEventTarget(this,this.endpoint,n);r.addEventListener("open",()=>{t.onOpen()}),r.addEventListener("error",e=>{this._abortController.abort(),t.onError(e)}),r.addEventListener("close",()=>{this._abortController.abort(),t.onClose({code:4,reason:"connection closed"})}),r.addEventListener("message",e=>{t.onMessage(e.data)})}close(){this._abortController.abort()}send(e,t,s){let i,n,r={session:t,node:s,data:e};"json"===this._protocol?(i={"Content-Type":"application/json"},n=JSON.stringify(r)):(i={"Content-Type":"application/octet-stream"},n=this.options.encoder.encodeEmulationRequest(r));let o=this.options.fetch,a={method:"POST",headers:i,body:n,mode:"cors",credentials:"same-origin"};o(this.options.emulationEndpoint,a)}}class z{constructor(e,t){this.endpoint=e,this.options=t,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return null!==this.options.eventsource&&null!==this.options.fetch}initialize(e,t,s){let i;(i=globalThis&&globalThis.document&&globalThis.document.baseURI?new URL(this.endpoint,globalThis.document.baseURI):new URL(this.endpoint)).searchParams.append("cf_connect",s);let n=new this.options.eventsource(i.toString(),{});this._transport=n,n.onopen=function(){t.onOpen()},n.onerror=function(e){n.close(),t.onError(e),t.onClose({code:4,reason:"connection closed"})},n.onmessage=function(e){t.onMessage(e.data)},this._onClose=function(){t.onClose({code:4,reason:"connection closed"})}}close(){this._transport.close(),null!==this._onClose&&this._onClose()}send(e,t,s){let i=JSON.stringify({session:t,node:s,data:e});(0,this.options.fetch)(this.options.emulationEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:i,mode:"cors",credentials:"same-origin"})}}class I{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return void 0!==this.options.webtransport&&null!==this.options.webtransport}initialize(e,t){return i(this,void 0,void 0,function*(){let s,i;s=globalThis&&globalThis.document&&globalThis.document.baseURI?new URL(this.endpoint,globalThis.document.baseURI):new URL(this.endpoint),"protobuf"===e&&s.searchParams.append("cf_protocol","protobuf"),this._protocol=e;let n=new EventTarget;this._transport=new this.options.webtransport(s.toString()),this._transport.closed.then(()=>{t.onClose({code:4,reason:"connection closed"})}).catch(()=>{t.onClose({code:4,reason:"connection closed"})});try{yield this._transport.ready}catch(e){this.close();return}try{i=yield this._transport.createBidirectionalStream()}catch(e){this.close();return}this._stream=i,this._writer=this._stream.writable.getWriter(),n.addEventListener("close",()=>{t.onClose({code:4,reason:"connection closed"})}),n.addEventListener("message",e=>{t.onMessage(e.data)}),this._startReading(n),t.onOpen()})}_startReading(e){return i(this,void 0,void 0,function*(){let t=this._stream.readable.getReader(),s="",i=0,n=new Uint8Array;try{for(;;){let{done:r,value:o}=yield t.read();if(o.length>0)if("json"===this._protocol)for(s+=this._utf8decoder.decode(o);i<s.length;)if("\n"===s[i]){let t=s.substring(0,i);e.dispatchEvent(new MessageEvent("message",{data:t})),s=s.substring(i+1),i=0}else++i;else{let t=new Uint8Array(n.length+o.length);for(t.set(n),t.set(o,n.length),n=t;;){let t=this.options.decoder.decodeReply(n);if(t.ok){let s=n.slice(0,t.pos);e.dispatchEvent(new MessageEvent("message",{data:s})),n=n.slice(t.pos);continue}break}}if(r)break}}catch(t){e.dispatchEvent(new Event("close"))}})}close(){return i(this,void 0,void 0,function*(){try{this._writer&&(yield this._writer.close()),this._transport.close()}catch(e){}})}send(e){return i(this,void 0,void 0,function*(){let t;t="json"===this._protocol?new TextEncoder().encode(e+"\n"):e;try{yield this._writer.write(t)}catch(e){this.close()}})}}let U=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];class N{constructor(e){this.a=e,this.pos=0}haveBytes(){return this.pos<this.a.length}getByte(){let e=this.a[this.pos];if(this.pos++,this.pos>this.a.length)throw RangeError("out of bounds");return e}getChar(){return String.fromCharCode(this.getByte())}getInt(){let e,t=0;for(;this.haveBytes()&&(e=U[127&this.getByte()])>=0;)t=(t<<6)+e;return this.pos--,t>>>0}}class W{constructor(){this.a=[]}toByteArray(e){return Array.isArray(e)?this.a:new Uint8Array(this.a)}putArray(e,t,s){for(let i=t;i<s;i++)this.a.push(e[i])}}class F{name(){return"json"}encodeCommands(e){return e.map(e=>JSON.stringify(e)).join("\n")}decodeReplies(e){return e.trim().split("\n").map(e=>JSON.parse(e))}applyDeltaIfNeeded(e,t){let s,i;if(e.delta){let n=function(e,t){let s=0,i=new N(t),n=e.length,r=t.length,o=i.getInt();if("\n"!==i.getChar())throw Error("size integer not terminated by '\\n'");let a=new W;for(;i.haveBytes();){let t,c=i.getInt();switch(i.getChar()){case"@":if(t=i.getInt(),i.haveBytes()&&","!==i.getChar())throw Error("copy command not terminated by ','");if((s+=c)>o)throw Error("copy exceeds output file size");if(t+c>n)throw Error("copy extends past end of input");a.putArray(e,t,t+c);break;case":":if((s+=c)>o)throw Error("insert command gives an output larger than predicted");if(c>r)throw Error("insert count exceeds size of delta");a.putArray(i.a,i.pos,i.pos+c),i.pos+=c;break;case";":{let t=a.toByteArray(e);if(c!==function(e){let t=0,s=0,i=0,n=0,r=0,o=e.length;for(;o>=16;)t=t+e[r+0]|0,s=s+e[r+1]|0,i=i+e[r+2]|0,n=n+e[r+3]|0,t=t+e[r+4]|0,s=s+e[r+5]|0,i=i+e[r+6]|0,n=n+e[r+7]|0,t=t+e[r+8]|0,s=s+e[r+9]|0,i=i+e[r+10]|0,n=n+e[r+11]|0,t=t+e[r+12]|0,s=s+e[r+13]|0,i=i+e[r+14]|0,n=n+e[r+15]|0,r+=16,o-=16;for(;o>=4;)t=t+e[r+0]|0,s=s+e[r+1]|0,i=i+e[r+2]|0,n=n+e[r+3]|0,r+=4,o-=4;switch(n=((n+(i<<8)|0)+(s<<16)|0)+(t<<24)|0,o){case 3:n=n+(e[r+2]<<8)|0;case 2:n=n+(e[r+1]<<16)|0;case 1:n=n+(e[r+0]<<24)|0}return n>>>0}(t))throw Error("bad checksum");if(s!==o)throw Error("generated size does not match predicted size");return t}default:throw Error("unknown delta operator")}}throw Error("unterminated delta")}(t,new TextEncoder().encode(e.data));s=JSON.parse(new TextDecoder().decode(n)),i=n}else s=JSON.parse(e.data),i=new TextEncoder().encode(e.data);return{newData:s,newPrevValue:i}}}let J={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:2e4,timeout:5e3,maxServerPingDelay:1e4,networkEventTarget:null};class q extends Error{constructor(e){super(e),this.name=this.constructor.name}}class B extends P{constructor(e,t){super(),this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=u.Disconnected,this._transportIsOpen=!1,this._endpoint=e,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new F,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},J),t),this._configure(),this._debugEnabled?(this.on("state",e=>{this._debug("client state",e.oldState,"->",e.newState)}),this.on("error",e=>{this._debug("client error",e)})):this.on("error",function(){Function.prototype()})}newSubscription(e,t){if(null!==this.getSubscription(e))throw Error("Subscription to the channel "+e+" already exists");let s=new j(this,e,t);return this._subs[e]=s,s}getSubscription(e){return this._getSub(e)}removeSubscription(e){e&&(e.state!==d.Unsubscribed&&e.unsubscribe(),this._removeSubscription(e))}subscriptions(){return this._subs}ready(e){return i(this,void 0,void 0,function*(){switch(this.state){case u.Disconnected:throw{code:r.clientDisconnected,message:"client disconnected"};case u.Connected:return;default:return new Promise((t,s)=>{let i={resolve:t,reject:s};e&&(i.timeout=setTimeout(()=>{s({code:r.timeout,message:"timeout"})},e)),this._promises[this._nextPromiseId()]=i})}})}connect(){return this._isConnected()?void this._debug("connect called when already connected"):this._isConnecting()?void this._debug("connect called when already connecting"):void(this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting())}disconnect(){this._disconnect(a.disconnectCalled,"disconnect called",!1)}setToken(e){this._token=e}setData(e){this._data=e}setHeaders(e){this._config.headers=e}send(e){return i(this,void 0,void 0,function*(){if(yield this._methodCall(),!this._transportSendCommands([{send:{data:e}}]))throw this._createErrorObject(r.transportWriteError,"transport write error")})}rpc(e,t){return i(this,void 0,void 0,function*(){return yield this._methodCall(),{data:(yield this._callPromise({rpc:{method:e,data:t}},e=>e.rpc)).data}})}publish(e,t){return i(this,void 0,void 0,function*(){return yield this._methodCall(),yield this._callPromise({publish:{channel:e,data:t}},()=>({})),{}})}history(e,t){return i(this,void 0,void 0,function*(){let s={history:this._getHistoryRequest(e,t)};yield this._methodCall();let i=yield this._callPromise(s,e=>e.history),n=[];if(i.publications)for(let t=0;t<i.publications.length;t++)n.push(this._getPublicationContext(e,i.publications[t]));return{publications:n,epoch:i.epoch||"",offset:i.offset||0}})}presence(e){return i(this,void 0,void 0,function*(){yield this._methodCall();let t=(yield this._callPromise({presence:{channel:e}},e=>e.presence)).presence;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let s=t[e],i=s.conn_info,n=s.chan_info;i&&(s.connInfo=i),n&&(s.chanInfo=n)}return{clients:t}})}presenceStats(e){return i(this,void 0,void 0,function*(){yield this._methodCall();let t=yield this._callPromise({presence_stats:{channel:e}},e=>e.presence_stats);return{numUsers:t.num_users,numClients:t.num_clients}})}startBatching(){this._batching=!0}stopBatching(){let e=this;Promise.resolve().then(function(){Promise.resolve().then(function(){e._batching=!1,e._flush()})})}_debug(...e){if(this._debugEnabled&&globalThis.console){let t=globalThis.console.debug;R(t)&&t.apply(globalThis.console,e)}}_codecName(){return this._codec.name()}_formatOverride(){}_configure(){if(!("Promise"in globalThis))throw Error("Promise polyfill required");if(!this._endpoint)throw Error("endpoint configuration required");if(null!==this._config.token&&(this._token=this._config.token),null!==this._config.data&&(this._data=this._config.data),this._codec=new F,this._formatOverride(),(!0===this._config.debug||"undefined"!=typeof localStorage&&"function"==typeof localStorage.getItem&&localStorage.getItem("centrifuge.debug"))&&(this._debugEnabled=!0),this._debug("config",this._config),"string"==typeof this._endpoint);else if(Array.isArray(this._endpoint)){for(let e in this._transports=this._endpoint,this._emulation=!0,this._transports)if(this._transports.hasOwnProperty(e)){let t=this._transports[e];if(!t.endpoint||!t.transport)throw Error("malformed transport configuration");let s=t.transport;if(0>["websocket","http_stream","sse","sockjs","webtransport"].indexOf(s))throw Error("unsupported transport name: "+s)}}else throw Error("unsupported url configuration type: only string or array of objects are supported")}_setState(e){if(this.state!==e){this._reconnecting=!1;let t=this.state;return this.state=e,this.emit("state",{newState:e,oldState:t}),!0}return!1}_isDisconnected(){return this.state===u.Disconnected}_isConnecting(){return this.state===u.Connecting}_isConnected(){return this.state===u.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let e=null;null!==this._config.networkEventTarget?e=this._config.networkEventTarget:void 0!==globalThis.addEventListener&&(e=globalThis),e&&(e.addEventListener("offline",()=>{this._debug("offline event triggered"),(this.state===u.Connected||this.state===u.Connecting)&&(this._disconnect(o.transportClosed,"transport closed",!0),this._deviceWentOffline=!0)}),e.addEventListener("online",()=>{this._debug("online event triggered"),this.state===u.Connecting&&(this._deviceWentOffline&&!this._transportClosed&&(this._deviceWentOffline=!1,this._transportClosed=!0),this._clearReconnectTimeout(),this._startReconnecting())}),this._networkEventsSet=!0)}_getReconnectDelay(){let e=O(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,e}_clearOutgoingRequests(){for(let e in this._callbacks)if(this._callbacks.hasOwnProperty(e)){let t=this._callbacks[e];clearTimeout(t.timeout);let s=t.errback;if(!s)continue;s({error:this._createErrorObject(r.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){for(let e in this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout(),this._subs){if(!this._subs.hasOwnProperty(e))continue;let t=this._subs[e];t.state===d.Subscribed&&t._setSubscribing(c.transportClosed,"transport closed")}for(let e in this._serverSubs)this._serverSubs.hasOwnProperty(e)&&this.emit("subscribing",{channel:e})}_handleWriteError(e){for(let t of e){let e=t.id;if(!(e in this._callbacks))continue;let s=this._callbacks[e];clearTimeout(this._callbacks[e].timeout),delete this._callbacks[e],(0,s.errback)({error:this._createErrorObject(r.transportWriteError,"transport write error")})}}_transportSendCommands(e){if(!e.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands(e),this._session,this._node)}catch(t){return this._debug("error writing commands",t),this._handleWriteError(e),!1}return!0}_initializeTransport(){let e,t;null!==this._config.websocket?e=this._config.websocket:("function"==typeof globalThis.WebSocket||"object"==typeof globalThis.WebSocket)&&(e=globalThis.WebSocket);let s=null;null!==this._config.sockjs?s=this._config.sockjs:void 0!==globalThis.SockJS&&(s=globalThis.SockJS);let i=null;null!==this._config.eventsource?i=this._config.eventsource:void 0!==globalThis.EventSource&&(i=globalThis.EventSource);let n=null;null!==this._config.fetch?n=this._config.fetch:void 0!==globalThis.fetch&&(n=globalThis.fetch);let c=null;if(null!==this._config.readableStream?c=this._config.readableStream:void 0!==globalThis.ReadableStream&&(c=globalThis.ReadableStream),this._emulation){this._currentTransportIndex>=this._transports.length&&(this._triedAllTransports=!0,this._currentTransportIndex=0);let t=0;for(;;){if(t>=this._transports.length)throw Error("no supported transport found");let r=this._transports[this._currentTransportIndex],o=r.transport,a=r.endpoint;if("websocket"===o){if(this._debug("trying websocket transport"),this._transport=new M(a,{websocket:e}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,t++;continue}}else if("webtransport"===o){if(this._debug("trying webtransport transport"),this._transport=new I(a,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,t++;continue}}else if("http_stream"===o){if(this._debug("trying http_stream transport"),this._transport=new D(a,{fetch:n,readableStream:c,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,t++;continue}}else if("sse"===o){if(this._debug("trying sse transport"),this._transport=new z(a,{eventsource:i,fetch:n,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,t++;continue}}else if("sockjs"===o){if(this._debug("trying sockjs"),this._transport=new L(a,{sockjs:s,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,t++;continue}}else throw Error("unknown transport "+o);break}}else{var h;if(h=this._endpoint,0===h.lastIndexOf("http",0))throw Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");if(this._debug("client will use websocket"),this._transport=new M(this._endpoint,{websocket:e}),!this._transport.supported())throw Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}let l=this,u=this._transport,d=this._nextTransportId();l._debug("id of transport",d);let _=!1,p=[];if(this._transport.emulation()){let e=l._sendConnect(!0);p.push(e)}this._setNetworkEvents();let f=this._codec.encodeCommands(p);this._transportClosed=!1,t=setTimeout(function(){u.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(t&&(clearTimeout(t),t=null),l._transportId!=d){l._debug("open callback from non-actual transport"),u.close();return}_=!0,l._debug(u.subName(),"transport open"),u.emulation()||(l._transportIsOpen=!0,l._transportWasOpen=!0,l.startBatching(),l._sendConnect(!1),l._sendSubscribeCommands(),l.stopBatching(),l.emit("__centrifuge_debug:connect_frame_sent",{}))},onError:function(e){if(l._transportId!=d)return void l._debug("error callback from non-actual transport");l._debug("transport level error",e)},onClose:function(e){if(t&&(clearTimeout(t),t=null),l._transportId!=d)return void l._debug("close callback from non-actual transport");l._debug(u.subName(),"transport closed"),l._transportClosed=!0,l._transportIsOpen=!1;let s="connection closed",i=!0,n=0;if(e&&"code"in e&&e.code&&(n=e.code),e&&e.reason)try{let t=JSON.parse(e.reason);s=t.reason,i=t.reconnect}catch(t){s=e.reason,(n>=3500&&n<4e3||n>=4500&&n<5e3)&&(i=!1)}n<3e3?(1009===n?(n=a.messageSizeLimit,s="message size limit exceeded",i=!1):(n=o.transportClosed,s="transport closed"),l._emulation&&!l._transportWasOpen&&(l._currentTransportIndex++,l._currentTransportIndex>=l._transports.length&&(l._triedAllTransports=!0,l._currentTransportIndex=0))):l._transportWasOpen=!0,l._isConnecting()&&!_&&l.emit("error",{type:"transport",error:{code:r.transportClosed,message:"transport closed"},transport:u.name()}),l._reconnecting=!1,l._disconnect(n,s,i)},onMessage:function(e){l._dataReceived(e)}},f),l.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect(e){let t=this._constructConnectCommand(),s=this;return this._call(t,e).then(e=>{let t=e.reply.connect;s._connectResponse(t),e.next&&e.next()},e=>{s._connectError(e.error),e.next&&e.next()}),t}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting())return void this._debug("stop reconnecting: client not in connecting state");if(this._reconnecting)return void this._debug("reconnect already in progress, return from reconnect routine");if(!1===this._transportClosed)return void this._debug("waiting for transport close");this._reconnecting=!0;let e=""===this._token;if(!(this._refreshRequired||e&&null!==this._config.getToken))return void(this._config.getData?this._config.getData().then(e=>{this._isConnecting()&&(this._data=e,this._initializeTransport())}).catch(e=>this._handleGetDataError(e)):this._initializeTransport());let t=this;this._getToken().then(function(e){if(t._isConnecting()){if(null==e||void 0==e)return void t._failUnauthorized();t._token=e,t._debug("connection token refreshed"),t._config.getData?t._config.getData().then(function(e){t._isConnecting()&&(t._data=e,t._initializeTransport())}).catch(e=>t._handleGetDataError(e)):t._initializeTransport()}}).catch(function(e){if(!t._isConnecting())return;if(e instanceof q)return void t._failUnauthorized();t.emit("error",{type:"connectToken",error:{code:r.clientConnectToken,message:void 0!==e?e.toString():""}});let s=t._getReconnectDelay();t._debug("error on getting connection token, reconnect after "+s+" milliseconds",e),t._reconnecting=!1,t._reconnectTimeout=setTimeout(()=>{t._startReconnecting()},s)})}_handleGetDataError(e){if(e instanceof q)return void this._failUnauthorized();this.emit("error",{type:"connectData",error:{code:r.badConfiguration,message:(null==e?void 0:e.toString())||""}});let t=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+t+" milliseconds",e),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},t)}_connectError(e){this.state===u.Connecting&&(109===e.code&&(this._refreshRequired=!0),e.code<100||!0===e.temporary||109===e.code?(this.emit("error",{type:"connect",error:e}),this._debug("closing transport due to connect error"),this._disconnect(e.code,e.message,!0)):this._disconnect(e.code,e.message,!1))}_scheduleReconnect(){if(!this._isConnecting())return;let e=!1;!this._emulation||this._transportWasOpen||this._triedAllTransports||(e=!0);let t=this._getReconnectDelay();e&&(t=0),this._debug("reconnect after "+t+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},t)}_constructConnectCommand(){let e={};this._token&&(e.token=this._token),this._data&&(e.data=this._data),this._config.name&&(e.name=this._config.name),this._config.version&&(e.version=this._config.version),Object.keys(this._config.headers).length>0&&(e.headers=this._config.headers);let t={},s=!1;for(let e in this._serverSubs)if(this._serverSubs.hasOwnProperty(e)&&this._serverSubs[e].recoverable){s=!0;let i={recover:!0};this._serverSubs[e].offset&&(i.offset=this._serverSubs[e].offset),this._serverSubs[e].epoch&&(i.epoch=this._serverSubs[e].epoch),t[e]=i}return s&&(e.subs=t),{connect:e}}_getHistoryRequest(e,t){let s={channel:e};return void 0!==t&&(t.since&&(s.since={offset:t.since.offset},t.since.epoch&&(s.since.epoch=t.since.epoch)),void 0!==t.limit&&(s.limit=t.limit),!0===t.reverse&&(s.reverse=!0)),s}_methodCall(){return this._isConnected()?Promise.resolve():new Promise((e,t)=>{let s=setTimeout(function(){t({code:r.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:s,resolve:e,reject:t}})}_callPromise(e,t){return new Promise((s,i)=>{this._call(e,!1).then(e=>{var i;s(t(e.reply)),null==(i=e.next)||i.call(e)},e=>{var t;i(e.error),null==(t=e.next)||t.call(e)})})}_dataReceived(e){this._serverPing>0&&this._waitServerPing();let t=this._codec.decodeReplies(e);this._dispatchPromise=this._dispatchPromise.then(()=>{let e;this._dispatchPromise=new Promise(t=>{e=t}),this._dispatchSynchronized(t,e)})}_dispatchSynchronized(e,t){let s=Promise.resolve();for(let t in e)e.hasOwnProperty(t)&&(s=s.then(()=>this._dispatchReply(e[t])));s.then(()=>{t()})}_dispatchReply(e){let t,s=new Promise(e=>{t=e});if(null==e)return this._debug("dispatch: got undefined or null reply"),t(),s;let i=e.id;return i&&i>0?this._handleReply(e,t):e.push?this._handlePush(e.push,t):this._handleServerPing(t),s}_call(e,t){return new Promise((s,i)=>{e.id=this._nextCommandId(),this._registerCall(e.id,s,i),t||this._addCommand(e)})}_startConnecting(){this._debug("start connecting"),this._setState(u.Connecting)&&this.emit("connecting",{code:o.connectCalled,reason:"connect called"}),this._client=null,this._startReconnecting()}_disconnect(e,t,s){if(this._isDisconnected())return;this._transportIsOpen=!1;let i=this.state;this._reconnecting=!1;let n={code:e,reason:t},o=!1;if(s?o=this._setState(u.Connecting):(o=this._setState(u.Disconnected),this._rejectPromises({code:r.clientDisconnected,message:"disconnected"})),this._clearOutgoingRequests(),i===u.Connecting&&this._clearReconnectTimeout(),i===u.Connected&&this._clearConnectedState(),o&&(this._isConnecting()?this.emit("connecting",n):this.emit("disconnected",n)),this._transport){this._debug("closing existing transport");let e=this._transport;this._transport=null,e.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(a.unauthorized,"unauthorized",!1)}_getToken(){return(this._debug("get connection token"),this._config.getToken)?this._config.getToken({}):(this.emit("error",{type:"configuration",error:{code:r.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new q("")))}_refresh(){let e=this._client,t=this;this._getToken().then(function(s){if(e!==t._client)return;if(!s)return void t._failUnauthorized();if(t._token=s,t._debug("connection token refreshed"),!t._isConnected())return;let i={refresh:{token:t._token}};t._call(i,!1).then(e=>{let s=e.reply.refresh;t._refreshResponse(s),e.next&&e.next()},e=>{t._refreshError(e.error),e.next&&e.next()})}).catch(function(e){if(t._isConnected()){if(e instanceof q)return void t._failUnauthorized();t.emit("error",{type:"refreshToken",error:{code:r.clientRefreshToken,message:void 0!==e?e.toString():""}}),t._refreshTimeout=setTimeout(()=>t._refresh(),t._getRefreshRetryDelay())}})}_refreshError(e){e.code<100||!0===e.temporary?(this.emit("error",{type:"refresh",error:e}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._disconnect(e.code,e.message,!1)}_getRefreshRetryDelay(){return O(0,5e3,1e4)}_refreshResponse(e){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),e.expires&&(this._client=e.client,this._refreshTimeout=setTimeout(()=>this._refresh(),A(e.ttl)))}_removeSubscription(e){null!==e&&delete this._subs[e.channel]}_unsubscribe(e){if(!this._transportIsOpen)return Promise.resolve();let t={unsubscribe:{channel:e.channel}},s=this;return new Promise((e,i)=>{this._call(t,!1).then(t=>{e(),t.next&&t.next()},t=>{e(),t.next&&t.next(),s._disconnect(o.unsubscribeError,"unsubscribe error",!0)})})}_getSub(e,t){if(t&&t>0){for(let e in this._subs)if(this._subs.hasOwnProperty(e)){let s=this._subs[e];if(s._id===t)return s}return null}let s=this._subs[e];return s||null}_isServerSub(e){return void 0!==this._serverSubs[e]}_sendSubscribeCommands(){let e=[];for(let t in this._subs){if(!this._subs.hasOwnProperty(t))continue;let s=this._subs[t];if(!0!==s._inflight&&s.state===d.Subscribing){let t=s._subscribe();t&&e.push(t)}}return e}_connectResponse(e){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;this._client=e.client,this._setState(u.Connected),this._refreshTimeout&&clearTimeout(this._refreshTimeout),e.expires&&(this._refreshTimeout=setTimeout(()=>this._refresh(),A(e.ttl))),this._session=e.session,this._node=e.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();let t={client:e.client,transport:this._transport.subName()};e.data&&(t.data=e.data),this.emit("connected",t),this._resolvePromises(),this._processServerSubs(e.subs||{}),e.ping&&e.ping>0?(this._serverPing=1e3*e.ping,this._sendPong=!0===e.pong,this._waitServerPing()):this._serverPing=0}_processServerSubs(e){for(let t in e){if(!e.hasOwnProperty(t))continue;let s=e[t];this._serverSubs[t]={offset:s.offset,epoch:s.epoch,recoverable:s.recoverable||!1};let i=this._getSubscribeContext(t,s);this.emit("subscribed",i)}for(let t in e){if(!e.hasOwnProperty(t))continue;let s=e[t];if(s.recovered){let e=s.publications;if(e&&e.length>0)for(let s in e)e.hasOwnProperty(s)&&this._handlePublication(t,e[s])}}for(let t in this._serverSubs)this._serverSubs.hasOwnProperty(t)&&(e[t]||(this.emit("unsubscribed",{channel:t}),delete this._serverSubs[t]))}_clearRefreshTimeout(){null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearReconnectTimeout(){null!==this._reconnectTimeout&&(clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null)}_clearServerPingTimeout(){null!==this._serverPingTimeout&&(clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null)}_waitServerPing(){0!==this._config.maxServerPingDelay&&this._isConnected()&&(this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{this._isConnected()&&this._disconnect(o.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay))}_getSubscribeContext(e,t){let s={channel:e,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};t.recovered&&(s.recovered=!0),t.positioned&&(s.positioned=!0),t.recoverable&&(s.recoverable=!0),t.was_recovering&&(s.wasRecovering=!0);let i="";"epoch"in t&&(i=t.epoch);let n=0;return"offset"in t&&(n=t.offset),(s.positioned||s.recoverable)&&(s.streamPosition={offset:n,epoch:i}),Array.isArray(t.publications)&&t.publications.length>0&&(s.hasRecoveredPublications=!0),t.data&&(s.data=t.data),s}_handleReply(e,t){let s=e.id;if(!(s in this._callbacks))return void t();let i=this._callbacks[s];if(clearTimeout(this._callbacks[s].timeout),delete this._callbacks[s],"error"in e&&null!==e.error){let s=i.errback;if(!s)return void t();s({error:{code:e.error.code,message:e.error.message||"",temporary:e.error.temporary||!1},next:t})}else{let s=i.callback;if(!s)return;s({reply:e,next:t})}}_handleJoin(e,t,s){let i=this._getSub(e,s);if(!i&&e){if(this._isServerSub(e)){let s={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("join",s)}return}i._handleJoin(t)}_handleLeave(e,t,s){let i=this._getSub(e,s);if(!i&&e){if(this._isServerSub(e)){let s={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("leave",s)}return}i._handleLeave(t)}_handleUnsubscribe(e,t){let s=this._getSub(e,0);if(!s&&e){this._isServerSub(e)&&(delete this._serverSubs[e],this.emit("unsubscribed",{channel:e}));return}t.code<2500?s._setUnsubscribed(t.code,t.reason,!1):s._setSubscribing(t.code,t.reason)}_handleSubscribe(e,t){this._serverSubs[e]={offset:t.offset,epoch:t.epoch,recoverable:t.recoverable||!1},this.emit("subscribed",this._getSubscribeContext(e,t))}_handleDisconnect(e){let t=e.code,s=!0;(t>=3500&&t<4e3||t>=4500&&t<5e3)&&(s=!1),this._disconnect(t,e.reason,s)}_getPublicationContext(e,t){let s={channel:e,data:t.data};return t.offset&&(s.offset=t.offset),t.info&&(s.info=this._getJoinLeaveContext(t.info)),t.tags&&(s.tags=t.tags),s}_getJoinLeaveContext(e){let t={client:e.client,user:e.user},s=e.conn_info;s&&(t.connInfo=s);let i=e.chan_info;return i&&(t.chanInfo=i),t}_handlePublication(e,t,s){let i=this._getSub(e,s);if(!i&&e){if(this._isServerSub(e)){let s=this._getPublicationContext(e,t);this.emit("publication",s),void 0!==t.offset&&(this._serverSubs[e].offset=t.offset)}return}i._handlePublication(t)}_handleMessage(e){this.emit("message",{data:e.data})}_handleServerPing(e){this._sendPong&&this._transportSendCommands([{}]),e()}_handlePush(e,t){let s=e.channel,i=e.id;e.pub?this._handlePublication(s,e.pub,i):e.message?this._handleMessage(e.message):e.join?this._handleJoin(s,e.join,i):e.leave?this._handleLeave(s,e.leave,i):e.unsubscribe?this._handleUnsubscribe(s,e.unsubscribe):e.subscribe?this._handleSubscribe(s,e.subscribe):e.disconnect&&this._handleDisconnect(e.disconnect),t()}_flush(){let e=this._commands.slice(0);this._commands=[],this._transportSendCommands(e)}_createErrorObject(e,t,s){let i={code:e,message:t};return s&&(i.temporary=!0),i}_registerCall(e,t,s){this._callbacks[e]={callback:t,errback:s,timeout:null},this._callbacks[e].timeout=setTimeout(()=>{delete this._callbacks[e],R(s)&&s({error:this._createErrorObject(r.timeout,"timeout")})},this._config.timeout)}_addCommand(e){this._batching?this._commands.push(e):this._transportSendCommands([e])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(let e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(let t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}}B.SubscriptionState=d,B.State=u,B.UnauthorizedError=q},73548:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},79145:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},80574:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},83322:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},83708:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},84963:(e,t,s)=>{s.d(t,{A:()=>i});let i=(0,s(25365).A)("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]])}}]);