From 7bb7ca542f65b8d9c2c2650ffbe440af64b64a0c Mon Sep 17 00:00:00 2001 From: Debasis Ghosh <65386308+debdevops@users.noreply.github.com> Date: Sun, 26 Apr 2026 21:48:48 +0530 Subject: [PATCH 1/3] feat: update asset files and references in index.html - Added new vendor UI script: vendor-ui-BdRTM8UJ.js - Updated index script reference to index-DN7BlXe4.js - Replaced old module preload links with new ones for page-correlation, page-dashboard, vendor-ui, and page-dlq-history - Updated stylesheet reference to index-CBDQEUCY.css - Updated spa-token meta tag --- apps/web/src/lib/api/intentHeaders.ts | 15 ++ apps/web/src/lib/api/messages.ts | 13 +- apps/web/src/lib/api/namespaces.ts | 5 +- apps/web/src/lib/api/rules.ts | 2 + apps/web/src/lib/api/scheduled.ts | 6 +- .../Controllers/V1/MessagesController.cs | 77 ++++++- .../Controllers/V1/NamespacesController.cs | 53 ++++- .../Controllers/V1/QueuesController.cs | 49 ++++- .../Controllers/V1/RulesController.cs | 87 +++++++- .../Controllers/V1/TopicsController.cs | 35 +++- .../Extensions/ServiceCollectionExtensions.cs | 3 + .../Middleware/RequestLoggingMiddleware.cs | 4 +- .../ServiceHub.Api/Security/IAuditLogger.cs | 46 +++++ .../ServiceHub.Api/Security/IntentHeaders.cs | 47 +++++ .../Security/SecurityAuditLogger.cs | 48 +++++ ...e-B56HoFxL.js => InsightsPage-CBZxGweF.js} | 2 +- ...{index-DWpk54Sg.css => index-CBDQEUCY.css} | 2 +- .../wwwroot/assets/index-DN7BlXe4.js | 79 ++++++++ .../wwwroot/assets/index-ahHEHxCY.js | 79 -------- .../assets/page-correlation-ByerC9Nt.js | 188 ------------------ .../assets/page-correlation-o8uE5lXV.js | 188 ++++++++++++++++++ ...CPa1Ep2L.js => page-dashboard-D0tsEnG-.js} | 6 +- .../assets/page-dlq-history-Bi3Gp6Ul.js | 1 - .../assets/page-dlq-history-CPp6jKYl.js | 1 + ...r-ui-BR_f26pW.js => vendor-ui-BdRTM8UJ.js} | 2 +- .../api/src/ServiceHub.Api/wwwroot/index.html | 14 +- 26 files changed, 753 insertions(+), 299 deletions(-) create mode 100644 apps/web/src/lib/api/intentHeaders.ts create mode 100644 services/api/src/ServiceHub.Api/Security/IAuditLogger.cs create mode 100644 services/api/src/ServiceHub.Api/Security/IntentHeaders.cs create mode 100644 services/api/src/ServiceHub.Api/Security/SecurityAuditLogger.cs rename services/api/src/ServiceHub.Api/wwwroot/assets/{InsightsPage-B56HoFxL.js => InsightsPage-CBZxGweF.js} (98%) rename services/api/src/ServiceHub.Api/wwwroot/assets/{index-DWpk54Sg.css => index-CBDQEUCY.css} (56%) create mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/index-DN7BlXe4.js delete mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/index-ahHEHxCY.js delete mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/page-correlation-ByerC9Nt.js create mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/page-correlation-o8uE5lXV.js rename services/api/src/ServiceHub.Api/wwwroot/assets/{page-dashboard-CPa1Ep2L.js => page-dashboard-D0tsEnG-.js} (72%) delete mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/page-dlq-history-Bi3Gp6Ul.js create mode 100644 services/api/src/ServiceHub.Api/wwwroot/assets/page-dlq-history-CPp6jKYl.js rename services/api/src/ServiceHub.Api/wwwroot/assets/{vendor-ui-BR_f26pW.js => vendor-ui-BdRTM8UJ.js} (98%) diff --git a/apps/web/src/lib/api/intentHeaders.ts b/apps/web/src/lib/api/intentHeaders.ts new file mode 100644 index 0000000..9b49352 --- /dev/null +++ b/apps/web/src/lib/api/intentHeaders.ts @@ -0,0 +1,15 @@ +export const riskIntent = { + sendMessage: 'messages:send', + deadLetter: 'messages:deadletter', + replayMessage: 'messages:replay', + cancelScheduled: 'messages:cancel-scheduled', + deleteNamespace: 'namespaces:delete', + replayAllRules: 'rules:replay-all', +} as const; + +export function withRiskIntent(intent: string): Record { + return { + 'X-ServiceHub-Intent': intent, + 'X-ServiceHub-Confirm': 'true', + }; +} diff --git a/apps/web/src/lib/api/messages.ts b/apps/web/src/lib/api/messages.ts index 9ce677c..3de591d 100644 --- a/apps/web/src/lib/api/messages.ts +++ b/apps/web/src/lib/api/messages.ts @@ -1,4 +1,5 @@ import { apiClient } from './client'; +import { riskIntent, withRiskIntent } from './intentHeaders'; import { Message, PaginatedResponse, GetMessagesParams } from './types'; /** @@ -77,7 +78,10 @@ export const messagesApi = { await apiClient.post( `/namespaces/${namespaceId}/${entityPath}/${queueOrTopicName}/messages`, - payload + payload, + { + headers: withRiskIntent(riskIntent.sendMessage), + } ); }, @@ -89,6 +93,7 @@ export const messagesApi = { subscriptionName?: string ): Promise => { await apiClient.post('/messages/replay', null, { + headers: withRiskIntent(riskIntent.replayMessage), params: { namespaceId, sequenceNumber, @@ -147,7 +152,11 @@ export const messagesApi = { } const response = await apiClient.post<{ deadLetteredCount: number; reason: string }>( - `${url}?${params.toString()}` + `${url}?${params.toString()}`, + null, + { + headers: withRiskIntent(riskIntent.deadLetter), + } ); return response.data; }, diff --git a/apps/web/src/lib/api/namespaces.ts b/apps/web/src/lib/api/namespaces.ts index d5374c2..35f3d52 100644 --- a/apps/web/src/lib/api/namespaces.ts +++ b/apps/web/src/lib/api/namespaces.ts @@ -1,4 +1,5 @@ import { apiClient } from './client'; +import { riskIntent, withRiskIntent } from './intentHeaders'; import { Namespace, CreateNamespaceRequest } from './types'; export interface NamespaceStats { @@ -31,7 +32,9 @@ export const namespacesApi = { // DELETE /api/v1/namespaces/{id} delete: async (id: string): Promise => { - await apiClient.delete(`/namespaces/${id}`); + await apiClient.delete(`/namespaces/${id}`, { + headers: withRiskIntent(riskIntent.deleteNamespace), + }); }, // POST /api/v1/namespaces/{id}/test-connection diff --git a/apps/web/src/lib/api/rules.ts b/apps/web/src/lib/api/rules.ts index b10b56f..bec5d51 100644 --- a/apps/web/src/lib/api/rules.ts +++ b/apps/web/src/lib/api/rules.ts @@ -1,4 +1,5 @@ import { apiClient } from './client'; +import { riskIntent, withRiskIntent } from './intentHeaders'; // ─── Types ───────────────────────────────────────────────────────── @@ -146,6 +147,7 @@ export const rulesApi = { replayAll: async (ruleId: number): Promise => { // Use extended timeout — bulk replay can take time for many messages const { data } = await apiClient.post(`${BASE}/${ruleId}/replay-all`, null, { + headers: withRiskIntent(riskIntent.replayAllRules), timeout: 120_000, // 2 minutes (override default 30s) }); return data; diff --git a/apps/web/src/lib/api/scheduled.ts b/apps/web/src/lib/api/scheduled.ts index 7d91231..1dca549 100644 --- a/apps/web/src/lib/api/scheduled.ts +++ b/apps/web/src/lib/api/scheduled.ts @@ -1,4 +1,5 @@ import { apiClient } from './client'; +import { riskIntent, withRiskIntent } from './intentHeaders'; import { Message, PaginatedResponse } from './types'; export const scheduledApi = { @@ -29,7 +30,10 @@ export const scheduledApi = { sequenceNumber: number ): Promise => { await apiClient.delete( - `/namespaces/${namespaceId}/queues/${queueName}/scheduled/${sequenceNumber}` + `/namespaces/${namespaceId}/queues/${queueName}/scheduled/${sequenceNumber}`, + { + headers: withRiskIntent(riskIntent.cancelScheduled), + } ); }, }; diff --git a/services/api/src/ServiceHub.Api/Controllers/V1/MessagesController.cs b/services/api/src/ServiceHub.Api/Controllers/V1/MessagesController.cs index 372363e..8b61c51 100644 --- a/services/api/src/ServiceHub.Api/Controllers/V1/MessagesController.cs +++ b/services/api/src/ServiceHub.Api/Controllers/V1/MessagesController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using ServiceHub.Api.Authorization; +using ServiceHub.Api.Security; using ServiceHub.Infrastructure.Security; using ServiceHub.Core.DTOs.Requests; using ServiceHub.Core.DTOs.Responses; @@ -22,6 +23,7 @@ public sealed class MessagesController : ApiControllerBase private readonly IMessageSender _messageSender; private readonly IMessageReceiver _messageReceiver; private readonly INamespaceRepository _namespaceRepository; + private readonly IAuditLogger _auditLogger; private readonly ILogger _logger; /// @@ -31,15 +33,18 @@ public sealed class MessagesController : ApiControllerBase /// The message receiver service. /// The namespace repository. /// The logger. + /// The security audit logger. public MessagesController( IMessageSender messageSender, IMessageReceiver messageReceiver, INamespaceRepository namespaceRepository, - ILogger logger) + ILogger logger, + IAuditLogger? auditLogger = null) { _messageSender = messageSender ?? throw new ArgumentNullException(nameof(messageSender)); _messageReceiver = messageReceiver ?? throw new ArgumentNullException(nameof(messageReceiver)); _namespaceRepository = namespaceRepository ?? throw new ArgumentNullException(nameof(namespaceRepository)); + _auditLogger = auditLogger ?? NoOpAuditLogger.Instance; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } @@ -361,6 +366,24 @@ public async Task ReplayMessage( [FromQuery] string? subscriptionName = null, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentReplayMessage)) + { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayMessage, + outcome: "Denied", + namespaceId: namespaceId, + resourceName: entityName, + sequenceNumber: sequenceNumber, + detail: "Missing explicit intent headers"); + + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("message replay")); + } + _logger.LogInformation( "Replaying message {SequenceNumber} from {EntityName} in namespace {NamespaceId}", sequenceNumber, @@ -382,6 +405,17 @@ public async Task ReplayMessage( // Check if namespace has Send permission if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayMessage, + outcome: "Denied", + namespaceId: namespaceId, + environment: ns.Environment, + resourceName: entityName, + sequenceNumber: sequenceNumber, + detail: "Namespace lacks Send permission"); + return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Insufficient Permissions", @@ -391,6 +425,26 @@ public async Task ReplayMessage( type: "https://docs.microsoft.com/azure/service-bus-messaging/service-bus-sas"); } + // Safety-by-default guard: destructive replay is blocked in production. + if (ns.Environment == EnvironmentType.Prod) + { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayMessage, + outcome: "Denied", + namespaceId: namespaceId, + environment: ns.Environment, + resourceName: entityName, + sequenceNumber: sequenceNumber, + detail: "Replay blocked in production environment"); + + return Problem( + statusCode: StatusCodes.Status403Forbidden, + title: "Production Restriction", + detail: "Replay is blocked for production namespaces. Validate in DEV and UAT first."); + } + var result = await _messageReceiver.ReplayMessageAsync( namespaceId, entityName, @@ -400,9 +454,30 @@ public async Task ReplayMessage( if (result.IsFailure) { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayMessage, + outcome: "Failed", + namespaceId: namespaceId, + environment: ns.Environment, + resourceName: entityName, + sequenceNumber: sequenceNumber, + detail: result.Error.Message); return ToActionResult(result); } + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayMessage, + outcome: "Succeeded", + namespaceId: namespaceId, + environment: ns.Environment, + resourceName: entityName, + sequenceNumber: sequenceNumber, + detail: "Replay completed"); + _logger.LogInformation("Message {SequenceNumber} replayed successfully", sequenceNumber); return Accepted(); } diff --git a/services/api/src/ServiceHub.Api/Controllers/V1/NamespacesController.cs b/services/api/src/ServiceHub.Api/Controllers/V1/NamespacesController.cs index a1e73af..3631855 100644 --- a/services/api/src/ServiceHub.Api/Controllers/V1/NamespacesController.cs +++ b/services/api/src/ServiceHub.Api/Controllers/V1/NamespacesController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using ServiceHub.Api.Authorization; +using ServiceHub.Api.Security; using ServiceHub.Infrastructure.Security; using ServiceHub.Core.DTOs.Requests; using ServiceHub.Core.DTOs.Responses; @@ -23,6 +24,7 @@ public sealed class NamespacesController : ApiControllerBase private readonly IServiceBusClientFactory _clientFactory; private readonly IServiceBusClientCache _clientCache; private readonly IConnectionStringProtector _connectionStringProtector; + private readonly IAuditLogger _auditLogger; private readonly ILogger _logger; /// @@ -33,17 +35,20 @@ public sealed class NamespacesController : ApiControllerBase /// The Service Bus client cache. /// The connection string protector. /// The logger. + /// The security audit logger. public NamespacesController( INamespaceRepository namespaceRepository, IServiceBusClientFactory clientFactory, IServiceBusClientCache clientCache, IConnectionStringProtector connectionStringProtector, - ILogger logger) + ILogger logger, + IAuditLogger? auditLogger = null) { _namespaceRepository = namespaceRepository ?? throw new ArgumentNullException(nameof(namespaceRepository)); _clientFactory = clientFactory ?? throw new ArgumentNullException(nameof(clientFactory)); _clientCache = clientCache ?? throw new ArgumentNullException(nameof(clientCache)); _connectionStringProtector = connectionStringProtector ?? throw new ArgumentNullException(nameof(connectionStringProtector)); + _auditLogger = auditLogger ?? NoOpAuditLogger.Instance; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } @@ -378,6 +383,22 @@ public async Task Delete( [FromRoute] Guid id, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentDeleteNamespace)) + { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentDeleteNamespace, + outcome: "Denied", + namespaceId: id, + detail: "Missing explicit intent headers"); + + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("namespace deletion")); + } + // When authentication is enabled, enforce write scope in-method in addition to // the [RequireScope] filter, so the check is visible to static-analysis tools. // SPA token auth gets full access — scope restrictions only apply to API keys. @@ -407,13 +428,43 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || } _logger.LogInformation("Deleting namespace {NamespaceId}", ns.Id); + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentDeleteNamespace, + outcome: "Attempt", + namespaceId: ns.Id, + environment: ns.Environment, + resourceName: ns.Name, + detail: "Namespace deletion requested"); if (_clientCache.Contains(ns.Id)) await _clientCache.RemoveAsync(ns.Id, cancellationToken); var result = await _namespaceRepository.DeleteAsync(ns.Id, cancellationToken); if (result.IsFailure) + { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentDeleteNamespace, + outcome: "Failed", + namespaceId: ns.Id, + environment: ns.Environment, + resourceName: ns.Name, + detail: result.Error.Message); return ToActionResult(result); + } + + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentDeleteNamespace, + outcome: "Succeeded", + namespaceId: ns.Id, + environment: ns.Environment, + resourceName: ns.Name, + detail: "Namespace deleted"); _logger.LogInformation("Namespace {NamespaceId} deleted successfully", ns.Id); return NoContent(); diff --git a/services/api/src/ServiceHub.Api/Controllers/V1/QueuesController.cs b/services/api/src/ServiceHub.Api/Controllers/V1/QueuesController.cs index fc4095e..d63c703 100644 --- a/services/api/src/ServiceHub.Api/Controllers/V1/QueuesController.cs +++ b/services/api/src/ServiceHub.Api/Controllers/V1/QueuesController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using ServiceHub.Api.Authorization; +using ServiceHub.Api.Security; using ServiceHub.Infrastructure.Security; using ServiceHub.Core.DTOs.Requests; using ServiceHub.Core.DTOs.Responses; @@ -22,6 +23,7 @@ public sealed class QueuesController : ApiControllerBase private readonly IConnectionStringProtector _connectionStringProtector; private readonly IMessageSender _messageSender; private readonly IMessageReceiver _messageReceiver; + private readonly IAuditLogger _auditLogger; private readonly ILogger _logger; /// @@ -33,19 +35,22 @@ public sealed class QueuesController : ApiControllerBase /// The message sender service. /// The message receiver service. /// The logger. + /// The security audit logger. public QueuesController( INamespaceRepository namespaceRepository, IServiceBusClientCache clientCache, IConnectionStringProtector connectionStringProtector, IMessageSender messageSender, IMessageReceiver messageReceiver, - ILogger logger) + ILogger logger, + IAuditLogger? auditLogger = null) { _namespaceRepository = namespaceRepository ?? throw new ArgumentNullException(nameof(namespaceRepository)); _clientCache = clientCache ?? throw new ArgumentNullException(nameof(clientCache)); _connectionStringProtector = connectionStringProtector ?? throw new ArgumentNullException(nameof(connectionStringProtector)); _messageSender = messageSender ?? throw new ArgumentNullException(nameof(messageSender)); _messageReceiver = messageReceiver ?? throw new ArgumentNullException(nameof(messageReceiver)); + _auditLogger = auditLogger ?? NoOpAuditLogger.Instance; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } @@ -191,6 +196,15 @@ public async Task SendMessage( [FromBody] SendMessageRequest request, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentSendMessage)) + { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, resourceName: queueName, detail: "Missing explicit intent headers"); + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("sending messages")); + } + _logger.LogInformation( "Sending message to queue {QueueName} in namespace {NamespaceId}", LogRedactor.SanitiseForLog(queueName), @@ -212,6 +226,7 @@ public async Task SendMessage( // Check if namespace has Send permission (required to send messages) if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, ns.Environment, queueName, detail: "Namespace lacks Send permission"); return StatusCode( StatusCodes.Status403Forbidden, new ProblemDetails @@ -226,6 +241,7 @@ public async Task SendMessage( // Production safety guard — block direct message sends to production namespaces if (ns.Environment == EnvironmentType.Prod) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, ns.Environment, queueName, detail: "Send blocked in production environment"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Production Restriction", @@ -243,9 +259,12 @@ public async Task SendMessage( var result = await _messageSender.SendAsync(sendRequest, cancellationToken); if (result.IsFailure) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Failed", namespaceId, ns.Environment, queueName, detail: result.Error.Message); return ToActionResult(result); } + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Succeeded", namespaceId, ns.Environment, queueName, detail: "Message accepted for delivery"); + _logger.LogInformation("Message sent to queue {QueueName}", LogRedactor.SanitiseForLog(queueName)); return Accepted(); } @@ -381,6 +400,15 @@ public async Task> DeadLetterMessages( [FromQuery] string? errorDescription = null, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentDeadLetter)) + { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, resourceName: queueName, detail: "Missing explicit intent headers"); + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("dead-letter operations")); + } + _logger.LogInformation( "Dead-lettering {Count} messages from queue {QueueName} in namespace {NamespaceId} with reason: {Reason}", messageCount, @@ -404,6 +432,7 @@ public async Task> DeadLetterMessages( // Check if namespace has Send permission (required to dead-letter messages) if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, ns.Environment, queueName, detail: "Namespace lacks Send permission"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Insufficient Permissions", @@ -416,6 +445,7 @@ public async Task> DeadLetterMessages( // Production safety guard — block dead-lettering in production namespaces if (ns.Environment == EnvironmentType.Prod) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, ns.Environment, queueName, detail: "Dead-letter blocked in production environment"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Production Restriction", @@ -435,9 +465,12 @@ public async Task> DeadLetterMessages( if (result.IsFailure) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Failed", namespaceId, ns.Environment, queueName, detail: result.Error.Message); return ToActionResult(result.Error); } + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Succeeded", namespaceId, ns.Environment, queueName, detail: $"Dead-lettered {result.Value} messages"); + _logger.LogInformation( "Successfully dead-lettered {Count} messages from queue {QueueName}", result.Value, @@ -574,6 +607,15 @@ public async Task CancelScheduledMessage( [FromRoute] long sequenceNumber, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentCancelScheduled)) + { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentCancelScheduled, "Denied", namespaceId, resourceName: queueName, sequenceNumber: sequenceNumber, detail: "Missing explicit intent headers"); + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("scheduled-message cancellation")); + } + _logger.LogInformation( "Cancelling scheduled message {SequenceNumber} in queue {QueueName} for namespace {NamespaceId}", sequenceNumber, @@ -595,6 +637,7 @@ public async Task CancelScheduledMessage( // Cancelling a scheduled message requires Send permission if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentCancelScheduled, "Denied", namespaceId, ns.Environment, queueName, sequenceNumber, "Namespace lacks Send permission"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Insufficient Permissions", @@ -604,6 +647,7 @@ public async Task CancelScheduledMessage( // Production safety guard if (ns.Environment == EnvironmentType.Prod) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentCancelScheduled, "Denied", namespaceId, ns.Environment, queueName, sequenceNumber, "Cancel scheduled blocked in production environment"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Production Restriction", @@ -626,9 +670,12 @@ public async Task CancelScheduledMessage( if (result.IsFailure) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentCancelScheduled, "Failed", namespaceId, ns.Environment, queueName, sequenceNumber, result.Error.Message); return ToActionResult(result); } + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentCancelScheduled, "Succeeded", namespaceId, ns.Environment, queueName, sequenceNumber, "Scheduled message cancelled"); + _logger.LogInformation( "Cancelled scheduled message {SequenceNumber} in queue {QueueName}", sequenceNumber, diff --git a/services/api/src/ServiceHub.Api/Controllers/V1/RulesController.cs b/services/api/src/ServiceHub.Api/Controllers/V1/RulesController.cs index 4999bc2..4dbc287 100644 --- a/services/api/src/ServiceHub.Api/Controllers/V1/RulesController.cs +++ b/services/api/src/ServiceHub.Api/Controllers/V1/RulesController.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using ServiceHub.Api.Authorization; +using ServiceHub.Api.Security; using ServiceHub.Infrastructure.Security; using ServiceHub.Core.DTOs.Requests; using ServiceHub.Core.DTOs.Responses; @@ -25,6 +26,7 @@ public sealed class RulesController : ApiControllerBase { private readonly DlqDbContext _dbContext; private readonly IRuleEngine _ruleEngine; + private readonly IAuditLogger _auditLogger; private readonly ILogger _logger; private static readonly JsonSerializerOptions JsonOptions = new() @@ -39,10 +41,12 @@ public sealed class RulesController : ApiControllerBase public RulesController( DlqDbContext dbContext, IRuleEngine ruleEngine, - ILogger logger) + ILogger logger, + IAuditLogger? auditLogger = null) { _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); _ruleEngine = ruleEngine ?? throw new ArgumentNullException(nameof(ruleEngine)); + _auditLogger = auditLogger ?? NoOpAuditLogger.Instance; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } @@ -78,7 +82,7 @@ public async Task>> GetAll( // Compute live pending match counts for each rule var activeMessages = await _dbContext.DlqMessages .AsNoTracking() - .Where(m => m.Status == DlqMessageStatus.Active) + .Where(m => m.Status == DlqMessageStatus.Active && m.OwnerId == OwnerId) .ToListAsync(cancellationToken); var response = rules.Select(rule => @@ -150,7 +154,7 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || { var activeMessages = await _dbContext.DlqMessages .AsNoTracking() - .Where(m => m.Status == DlqMessageStatus.Active) + .Where(m => m.Status == DlqMessageStatus.Active && m.OwnerId == OwnerId) .ToListAsync(cancellationToken); foreach (var msg in activeMessages) { @@ -410,6 +414,21 @@ public async Task> ReplayAll( long id, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentReplayAllRules)) + { + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayAllRules, + outcome: "Denied", + detail: "Missing explicit intent headers"); + + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("rule-based replay-all operations")); + } + // Apply a 30-second timeout to prevent the endpoint from hanging indefinitely using var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); timeoutCts.CancelAfter(TimeSpan.FromSeconds(30)); @@ -440,6 +459,13 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || return ToActionResult( Error.Validation("Rule.Disabled", "Cannot replay-all with a disabled rule. Enable it first.")); + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayAllRules, + outcome: "Attempt", + detail: $"Replay-all requested for rule {rule.Id}"); + var conditions = DeserializeOrDefault>(rule.ConditionsJson) ?? []; var action = DeserializeOrDefault(rule.ActionsJson) ?? new RuleAction(); @@ -448,7 +474,7 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || // Load all Active DLQ messages var activeMessages = await _dbContext.DlqMessages - .Where(m => m.Status == DlqMessageStatus.Active) + .Where(m => m.Status == DlqMessageStatus.Active && m.OwnerId == OwnerId) .OrderBy(m => m.DetectedAtUtc) .ToListAsync(ct); @@ -531,7 +557,7 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || ct.ThrowIfCancellationRequested(); // Resolve namespace connection once per group - var nsResult = await nsRepo.GetByIdAsync(group.Key.NamespaceId); + var nsResult = await nsRepo.GetByIdAsync(group.Key.NamespaceId, ct); if (nsResult.IsFailure) { foreach (var msg in group) @@ -545,6 +571,33 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || } var ns = nsResult.Value; + + // Defense-in-depth tenant isolation for namespace lookups. + if (!string.Equals(ns.OwnerId, OwnerId, StringComparison.Ordinal)) + { + foreach (var msg in group) + { + skipped++; + results.Add(new ReplayAllItemResponse( + DlqRecordId: msg.Id, MessageId: msg.MessageId, EntityName: msg.EntityName, + Outcome: "Skipped", Error: "Namespace is outside caller scope")); + } + continue; + } + + // Safety-by-default guard: never replay in production. + if (ns.Environment == EnvironmentType.Prod) + { + foreach (var msg in group) + { + skipped++; + results.Add(new ReplayAllItemResponse( + DlqRecordId: msg.Id, MessageId: msg.MessageId, EntityName: msg.EntityName, + Outcome: "Skipped", Error: "Replay-all is blocked for production namespaces")); + } + continue; + } + if (string.IsNullOrWhiteSpace(ns.ConnectionString)) { foreach (var msg in group) @@ -635,6 +688,13 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || "Replay-all for rule {RuleId}/{RuleName}: {Matched} matched, {Replayed} replayed, {Failed} failed, {Skipped} skipped", id, LogRedactor.SanitiseForLog(rule.Name), matched.Count, replayed, failed, skipped); + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayAllRules, + outcome: "Succeeded", + detail: $"rule={rule.Id}; matched={matched.Count}; replayed={replayed}; failed={failed}; skipped={skipped}"); + return Ok(new ReplayAllResponse( TotalMatched: matched.Count, Replayed: replayed, @@ -646,6 +706,12 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || { // Timeout from our 30-second CTS, not client disconnect _logger.LogWarning("Replay-all for rule {RuleId} timed out after 30 seconds", id); + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayAllRules, + outcome: "Failed", + detail: "Replay-all timed out after 30 seconds"); return StatusCode(StatusCodes.Status504GatewayTimeout, new ProblemDetails { Title = "Replay operation timed out", @@ -660,6 +726,12 @@ keyConfigObj is not ApiKeyConfiguration keyConfig || catch (Exception ex) { _logger.LogError(ex, "Failed to execute replay-all for rule {RuleId}", id); + _auditLogger.LogCriticalAction( + HttpContext, + OwnerId, + action: IntentHeaders.IntentReplayAllRules, + outcome: "Failed", + detail: ex.Message); return ToActionResult( Error.Internal(ErrorCodes.Rule.TestFailed, "Failed to execute replay-all")); } @@ -712,7 +784,7 @@ public async Task> TestRule( // Get active messages to test against var query = _dbContext.DlqMessages .AsNoTracking() - .Where(m => m.Status == DlqMessageStatus.Active); + .Where(m => m.Status == DlqMessageStatus.Active && m.OwnerId == OwnerId); if (request.NamespaceId.HasValue) query = query.Where(m => m.NamespaceId == request.NamespaceId.Value); @@ -929,7 +1001,7 @@ public async Task> GenerateRules( // Load active DLQ messages, optionally filtered by namespace var query = _dbContext.DlqMessages .AsNoTracking() - .Where(m => m.Status == DlqMessageStatus.Active); + .Where(m => m.Status == DlqMessageStatus.Active && m.OwnerId == OwnerId); if (namespaceId.HasValue) query = query.Where(m => m.NamespaceId == namespaceId.Value); @@ -951,6 +1023,7 @@ public async Task> GenerateRules( // Load existing rules to avoid duplicates var existingRules = await _dbContext.AutoReplayRules .AsNoTracking() + .Where(r => r.OwnerId == OwnerId) .ToListAsync(cancellationToken); var existingConditionSets = new HashSet( diff --git a/services/api/src/ServiceHub.Api/Controllers/V1/TopicsController.cs b/services/api/src/ServiceHub.Api/Controllers/V1/TopicsController.cs index d551f30..21e6d08 100644 --- a/services/api/src/ServiceHub.Api/Controllers/V1/TopicsController.cs +++ b/services/api/src/ServiceHub.Api/Controllers/V1/TopicsController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using ServiceHub.Api.Authorization; +using ServiceHub.Api.Security; using ServiceHub.Infrastructure.Security; using ServiceHub.Core.DTOs.Requests; using ServiceHub.Core.DTOs.Responses; @@ -22,6 +23,7 @@ public sealed class TopicsController : ApiControllerBase private readonly IConnectionStringProtector _connectionStringProtector; private readonly IMessageSender _messageSender; private readonly IMessageReceiver _messageReceiver; + private readonly IAuditLogger _auditLogger; private readonly ILogger _logger; /// @@ -33,19 +35,22 @@ public sealed class TopicsController : ApiControllerBase /// The message sender service. /// The message receiver service. /// The logger. + /// The security audit logger. public TopicsController( INamespaceRepository namespaceRepository, IServiceBusClientCache clientCache, IConnectionStringProtector connectionStringProtector, IMessageSender messageSender, IMessageReceiver messageReceiver, - ILogger logger) + ILogger logger, + IAuditLogger? auditLogger = null) { _namespaceRepository = namespaceRepository ?? throw new ArgumentNullException(nameof(namespaceRepository)); _clientCache = clientCache ?? throw new ArgumentNullException(nameof(clientCache)); _connectionStringProtector = connectionStringProtector ?? throw new ArgumentNullException(nameof(connectionStringProtector)); _messageSender = messageSender ?? throw new ArgumentNullException(nameof(messageSender)); _messageReceiver = messageReceiver ?? throw new ArgumentNullException(nameof(messageReceiver)); + _auditLogger = auditLogger ?? NoOpAuditLogger.Instance; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } @@ -191,6 +196,15 @@ public async Task SendMessage( [FromBody] SendMessageRequest request, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentSendMessage)) + { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, resourceName: topicName, detail: "Missing explicit intent headers"); + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("sending messages")); + } + _logger.LogInformation( "Sending message to topic {TopicName} in namespace {NamespaceId}", LogRedactor.SanitiseForLog(topicName), @@ -212,6 +226,7 @@ public async Task SendMessage( // Check if namespace has Send permission (required to send messages) if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, ns.Environment, topicName, detail: "Namespace lacks Send permission"); return StatusCode( StatusCodes.Status403Forbidden, new ProblemDetails @@ -226,6 +241,7 @@ public async Task SendMessage( // Production safety guard — block direct message sends to production namespaces if (ns.Environment == EnvironmentType.Prod) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Denied", namespaceId, ns.Environment, topicName, detail: "Send blocked in production environment"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Production Restriction", @@ -243,9 +259,12 @@ public async Task SendMessage( var result = await _messageSender.SendAsync(sendRequest, cancellationToken); if (result.IsFailure) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Failed", namespaceId, ns.Environment, topicName, detail: result.Error.Message); return ToActionResult(result); } + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentSendMessage, "Succeeded", namespaceId, ns.Environment, topicName, detail: "Message accepted for delivery"); + _logger.LogInformation("Message sent to topic {TopicName}", LogRedactor.SanitiseForLog(topicName)); return Accepted(); } @@ -387,6 +406,15 @@ public async Task> DeadLetterSubscriptionMessag [FromQuery] string? errorDescription = null, CancellationToken cancellationToken = default) { + if (!IntentHeaders.HasExplicitIntent(HttpContext, IntentHeaders.IntentDeadLetter)) + { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, resourceName: $"{topicName}/subscriptions/{subscriptionName}", detail: "Missing explicit intent headers"); + return Problem( + statusCode: StatusCodes.Status428PreconditionRequired, + title: "Explicit Intent Required", + detail: IntentHeaders.BuildIntentRequiredDetail("dead-letter operations")); + } + _logger.LogInformation( "Dead-lettering {Count} messages from subscription {SubscriptionName} on topic {TopicName} in namespace {NamespaceId} with reason: {Reason}", messageCount, @@ -411,6 +439,7 @@ public async Task> DeadLetterSubscriptionMessag // Check if namespace has Send permission (required to dead-letter messages) if (!ns.HasSendPermission) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, ns.Environment, $"{topicName}/subscriptions/{subscriptionName}", detail: "Namespace lacks Send permission"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Insufficient Permissions", @@ -423,6 +452,7 @@ public async Task> DeadLetterSubscriptionMessag // Production safety guard — block dead-lettering in production namespaces if (ns.Environment == EnvironmentType.Prod) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Denied", namespaceId, ns.Environment, $"{topicName}/subscriptions/{subscriptionName}", detail: "Dead-letter blocked in production environment"); return Problem( statusCode: StatusCodes.Status403Forbidden, title: "Production Restriction", @@ -442,9 +472,12 @@ public async Task> DeadLetterSubscriptionMessag if (result.IsFailure) { + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Failed", namespaceId, ns.Environment, $"{topicName}/subscriptions/{subscriptionName}", detail: result.Error.Message); return ToActionResult(result.Error); } + _auditLogger.LogCriticalAction(HttpContext, OwnerId, IntentHeaders.IntentDeadLetter, "Succeeded", namespaceId, ns.Environment, $"{topicName}/subscriptions/{subscriptionName}", detail: $"Dead-lettered {result.Value} messages"); + _logger.LogInformation( "Successfully dead-lettered {Count} messages from subscription {SubscriptionName} on topic {TopicName}", result.Value, diff --git a/services/api/src/ServiceHub.Api/Extensions/ServiceCollectionExtensions.cs b/services/api/src/ServiceHub.Api/Extensions/ServiceCollectionExtensions.cs index d38fd47..1c6d880 100644 --- a/services/api/src/ServiceHub.Api/Extensions/ServiceCollectionExtensions.cs +++ b/services/api/src/ServiceHub.Api/Extensions/ServiceCollectionExtensions.cs @@ -87,6 +87,9 @@ public static IServiceCollection AddApiServices(this IServiceCollection services // SPA token provider for co-hosted browser authentication services.AddSingleton(); + // Security audit trail for critical operations + services.AddSingleton(); + // Rate limit options (read from RateLimit config section) services.Configure(configuration.GetSection("RateLimit")); diff --git a/services/api/src/ServiceHub.Api/Middleware/RequestLoggingMiddleware.cs b/services/api/src/ServiceHub.Api/Middleware/RequestLoggingMiddleware.cs index 8d9cce0..5213f70 100644 --- a/services/api/src/ServiceHub.Api/Middleware/RequestLoggingMiddleware.cs +++ b/services/api/src/ServiceHub.Api/Middleware/RequestLoggingMiddleware.cs @@ -50,13 +50,11 @@ public async Task InvokeAsync(HttpContext context) var correlationId = context.Items["CorrelationId"]?.ToString() ?? "unknown"; var method = context.Request.Method; - var queryString = context.Request.QueryString.HasValue ? context.Request.QueryString.Value : string.Empty; _logger.LogInformation( - "Request started: {Method} {Path}{QueryString} | CorrelationId: {CorrelationId}", + "Request started: {Method} {Path} | CorrelationId: {CorrelationId}", LogRedactor.SanitiseForLog(method), LogRedactor.SanitiseForLog(path), - LogRedactor.SanitiseForLog(queryString), correlationId); var stopwatch = Stopwatch.StartNew(); diff --git a/services/api/src/ServiceHub.Api/Security/IAuditLogger.cs b/services/api/src/ServiceHub.Api/Security/IAuditLogger.cs new file mode 100644 index 0000000..7316e3f --- /dev/null +++ b/services/api/src/ServiceHub.Api/Security/IAuditLogger.cs @@ -0,0 +1,46 @@ +using ServiceHub.Core.Enums; + +namespace ServiceHub.Api.Security; + +/// +/// Records structured security audit events for critical operations. +/// +public interface IAuditLogger +{ + void LogCriticalAction( + HttpContext httpContext, + string ownerId, + string action, + string outcome, + Guid? namespaceId = null, + EnvironmentType? environment = null, + string? resourceName = null, + long? sequenceNumber = null, + string? detail = null); +} + +/// +/// No-op fallback implementation used by tests that construct controllers directly. +/// +public sealed class NoOpAuditLogger : IAuditLogger +{ + public static readonly NoOpAuditLogger Instance = new(); + + private NoOpAuditLogger() + { + } + + public void LogCriticalAction( + HttpContext httpContext, + string ownerId, + string action, + string outcome, + Guid? namespaceId = null, + EnvironmentType? environment = null, + string? resourceName = null, + long? sequenceNumber = null, + string? detail = null) + { + // Intentionally no-op. + } +} diff --git a/services/api/src/ServiceHub.Api/Security/IntentHeaders.cs b/services/api/src/ServiceHub.Api/Security/IntentHeaders.cs new file mode 100644 index 0000000..6094e0d --- /dev/null +++ b/services/api/src/ServiceHub.Api/Security/IntentHeaders.cs @@ -0,0 +1,47 @@ +namespace ServiceHub.Api.Security; + +/// +/// Centralized explicit-intent header validation for risky operations. +/// +public static class IntentHeaders +{ + public const string IntentHeaderName = "X-ServiceHub-Intent"; + public const string ConfirmHeaderName = "X-ServiceHub-Confirm"; + + public const string IntentReplayMessage = "messages:replay"; + public const string IntentSendMessage = "messages:send"; + public const string IntentDeadLetter = "messages:deadletter"; + public const string IntentCancelScheduled = "messages:cancel-scheduled"; + public const string IntentDeleteNamespace = "namespaces:delete"; + public const string IntentReplayAllRules = "rules:replay-all"; + + /// + /// Validates that the caller supplied explicit intent headers for a risky operation. + /// + public static bool HasExplicitIntent(HttpContext context, string expectedIntent) + { + if (!context.Request.Headers.TryGetValue(IntentHeaderName, out var intentValues)) + { + return false; + } + + if (!context.Request.Headers.TryGetValue(ConfirmHeaderName, out var confirmValues)) + { + return false; + } + + var providedIntent = intentValues.ToString().Trim(); + var confirmed = bool.TryParse(confirmValues.ToString(), out var parsed) && parsed; + + return confirmed && string.Equals(providedIntent, expectedIntent, StringComparison.Ordinal); + } + + /// + /// Standard problem-detail message for missing explicit-intent headers. + /// + public static string BuildIntentRequiredDetail(string operationDescription) + { + return $"Explicit user intent is required for {operationDescription}. " + + $"Include headers '{IntentHeaderName}' and '{ConfirmHeaderName}: true'."; + } +} diff --git a/services/api/src/ServiceHub.Api/Security/SecurityAuditLogger.cs b/services/api/src/ServiceHub.Api/Security/SecurityAuditLogger.cs new file mode 100644 index 0000000..cda8d12 --- /dev/null +++ b/services/api/src/ServiceHub.Api/Security/SecurityAuditLogger.cs @@ -0,0 +1,48 @@ +using ServiceHub.Core.Enums; +using ServiceHub.Infrastructure.Security; + +namespace ServiceHub.Api.Security; + +/// +/// Emits structured, redacted audit logs for critical operations. +/// +public sealed class SecurityAuditLogger : IAuditLogger +{ + private readonly ILogger _logger; + + public SecurityAuditLogger(ILogger logger) + { + _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + } + + public void LogCriticalAction( + HttpContext httpContext, + string ownerId, + string action, + string outcome, + Guid? namespaceId = null, + EnvironmentType? environment = null, + string? resourceName = null, + long? sequenceNumber = null, + string? detail = null) + { + var correlationId = httpContext.Items["CorrelationId"]?.ToString() ?? "unknown"; + var method = httpContext.Request.Method; + var path = httpContext.Request.Path.Value ?? string.Empty; + + // SECURITY_AUDIT prefix enables deterministic SIEM filtering. + _logger.LogWarning( + "SECURITY_AUDIT action={Action} outcome={Outcome} owner={OwnerId} namespace={NamespaceId} environment={Environment} resource={ResourceName} sequence={SequenceNumber} method={Method} path={Path} correlationId={CorrelationId} detail={Detail}", + LogRedactor.SanitiseForLog(action), + LogRedactor.SanitiseForLog(outcome), + LogRedactor.SanitiseForLog(ownerId), + namespaceId?.ToString() ?? "n/a", + environment?.ToString() ?? "n/a", + LogRedactor.SanitiseForLog(resourceName ?? "n/a"), + sequenceNumber?.ToString() ?? "n/a", + LogRedactor.SanitiseForLog(method), + LogRedactor.SanitiseForLog(path), + LogRedactor.SanitiseForLog(correlationId), + LogRedactor.SanitiseForLog(detail ?? "n/a")); + } +} diff --git a/services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-B56HoFxL.js b/services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-CBZxGweF.js similarity index 98% rename from services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-B56HoFxL.js rename to services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-CBZxGweF.js index b95937a..f3e7baf 100644 --- a/services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-B56HoFxL.js +++ b/services/api/src/ServiceHub.Api/wwwroot/assets/InsightsPage-CBZxGweF.js @@ -1,4 +1,4 @@ -import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{F as t,b as n,l as r,mt as i,o as a}from"./page-correlation-ByerC9Nt.js";import{r as o}from"./page-dashboard-CPa1Ep2L.js";import{g as s,l as c}from"./page-dlq-history-Bi3Gp6Ul.js";import{t as l}from"./index-ahHEHxCY.js";var u=n(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),d=e(i(),1),f=t(),p={critical:u,warnings:r,patterns:s,performance:o,security:c},m={critical:{label:`Critical Issues`,description:`Requires immediate attention`},warnings:{label:`Warnings`,description:`Performance degradation`},patterns:{label:`Patterns Detected`,description:`Recurring behaviors`},performance:{label:`Performance`,description:`Optimization opportunities`},security:{label:`Security`,description:`No issues detected`}},h={critical:{text:`text-red-600`,bg:`bg-red-50`,count:`bg-red-100 text-red-700`},warnings:{text:`text-amber-600`,bg:`bg-amber-50`,count:`bg-amber-100 text-amber-700`},patterns:{text:`text-primary-600`,bg:`bg-primary-50`,count:`bg-primary-100 text-primary-700`},performance:{text:`text-primary-700`,bg:`bg-primary-50`,count:`bg-primary-100 text-primary-700`},security:{text:`text-green-600`,bg:`bg-green-50`,count:`bg-green-100 text-green-700`}},g=[`critical`,`warnings`,`patterns`,`performance`,`security`];function _({selectedCategory:e,onSelectCategory:t,categoryCounts:n}){return(0,f.jsxs)(`div`,{className:`w-72 bg-white border-r border-gray-200 flex flex-col shrink-0`,children:[(0,f.jsxs)(`div`,{className:`p-4 border-b border-gray-200 bg-white`,children:[(0,f.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Issue Categories`}),(0,f.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`AI-detected patterns & anomalies`})]}),(0,f.jsx)(`nav`,{className:`flex-1 overflow-y-auto p-2`,children:g.map(r=>{let i=e===r,a=p[r],o=m[r],s=h[r],c=n[r];return(0,f.jsx)(`button`,{onClick:()=>t(r),className:` +import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{L as t,S as n,d as r,gt as i,o as a}from"./page-correlation-o8uE5lXV.js";import{r as o}from"./page-dashboard-D0tsEnG-.js";import{g as s,l as c}from"./page-dlq-history-CPp6jKYl.js";import{t as l}from"./index-DN7BlXe4.js";var u=n(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),d=e(i(),1),f=t(),p={critical:u,warnings:r,patterns:s,performance:o,security:c},m={critical:{label:`Critical Issues`,description:`Requires immediate attention`},warnings:{label:`Warnings`,description:`Performance degradation`},patterns:{label:`Patterns Detected`,description:`Recurring behaviors`},performance:{label:`Performance`,description:`Optimization opportunities`},security:{label:`Security`,description:`No issues detected`}},h={critical:{text:`text-red-600`,bg:`bg-red-50`,count:`bg-red-100 text-red-700`},warnings:{text:`text-amber-600`,bg:`bg-amber-50`,count:`bg-amber-100 text-amber-700`},patterns:{text:`text-primary-600`,bg:`bg-primary-50`,count:`bg-primary-100 text-primary-700`},performance:{text:`text-primary-700`,bg:`bg-primary-50`,count:`bg-primary-100 text-primary-700`},security:{text:`text-green-600`,bg:`bg-green-50`,count:`bg-green-100 text-green-700`}},g=[`critical`,`warnings`,`patterns`,`performance`,`security`];function _({selectedCategory:e,onSelectCategory:t,categoryCounts:n}){return(0,f.jsxs)(`div`,{className:`w-72 bg-white border-r border-gray-200 flex flex-col shrink-0`,children:[(0,f.jsxs)(`div`,{className:`p-4 border-b border-gray-200 bg-white`,children:[(0,f.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Issue Categories`}),(0,f.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`AI-detected patterns & anomalies`})]}),(0,f.jsx)(`nav`,{className:`flex-1 overflow-y-auto p-2`,children:g.map(r=>{let i=e===r,a=p[r],o=m[r],s=h[r],c=n[r];return(0,f.jsx)(`button`,{onClick:()=>t(r),className:` w-full text-left px-3 py-3 rounded-lg mb-1 transition-all ${i?`bg-gray-50 border border-gray-200`:`hover:bg-gray-50 border border-transparent`} `,children:(0,f.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,f.jsx)(a,{size:20,className:i?s.text:`text-gray-400`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`text-sm font-medium ${i?s.text:`text-gray-900`}`,children:o.label}),(0,f.jsx)(`div`,{className:`text-xs text-gray-500`,children:o.description})]})]}),(0,f.jsx)(`span`,{className:` diff --git a/services/api/src/ServiceHub.Api/wwwroot/assets/index-DWpk54Sg.css b/services/api/src/ServiceHub.Api/wwwroot/assets/index-CBDQEUCY.css similarity index 56% rename from services/api/src/ServiceHub.Api/wwwroot/assets/index-DWpk54Sg.css rename to services/api/src/ServiceHub.Api/wwwroot/assets/index-CBDQEUCY.css index a27fa14..02ae068 100644 --- a/services/api/src/ServiceHub.Api/wwwroot/assets/index-DWpk54Sg.css +++ b/services/api/src/ServiceHub.Api/wwwroot/assets/index-CBDQEUCY.css @@ -1,2 +1,2 @@ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono:"JetBrains Mono", "Fira Code", "Consolas", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-700:oklch(52.5% .223 3.958);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary-50:#f0f9ff;--color-primary-100:#e0f2fe;--color-primary-200:#bae6fd;--color-primary-300:#7dd3fc;--color-primary-400:#38bdf8;--color-primary-500:#0ea5e9;--color-primary-600:#0284c7;--color-primary-700:#0369a1;--color-primary-800:#075985;--color-primary-900:#0c4a6e}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-7{top:calc(var(--spacing) * 7)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-7{right:calc(var(--spacing) * 7)}.right-8{right:calc(var(--spacing) * 8)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-full{bottom:100%}.-left-3{left:calc(var(--spacing) * -3)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-7{left:calc(var(--spacing) * 7)}.left-full{left:100%}.isolate{isolation:isolate}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.z-\[10000\]{z-index:10000}.order-123{order:123}.order-12345{order:12345}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-14{margin-top:calc(var(--spacing) * 14)}.-mr-4{margin-right:calc(var(--spacing) * -4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.mb-14{margin-bottom:calc(var(--spacing) * 14)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-\[68px\]{margin-left:68px}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[400px\]{max-height:400px}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[260px\]{width:260px}.w-\[420px\]{width:420px}.w-\[520px\]{width:520px}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[90vw\]{max-width:90vw}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[300px\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[80px\]{min-width:80px}.min-w-\[180px\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/2{--tw-translate-x:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\[1\.02\]{scale:1.02}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-4{border-right-style:var(--tw-border-style);border-right-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-50{border-color:var(--color-gray-50)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-orange-200{border-color:var(--color-orange-200)}.border-primary-100{border-color:var(--color-primary-100)}.border-primary-200{border-color:var(--color-primary-200)}.border-primary-300{border-color:var(--color-primary-300)}.border-primary-400{border-color:var(--color-primary-400)}.border-primary-500{border-color:var(--color-primary-500)}.border-primary-600{border-color:var(--color-primary-600)}.border-purple-100{border-color:var(--color-purple-100)}.border-red-100{border-color:var(--color-red-100)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-sky-100{border-color:var(--color-sky-100)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-400{border-color:var(--color-sky-400)}.border-sky-500{border-color:var(--color-sky-500)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-300{border-color:var(--color-violet-300)}.border-violet-400{border-color:var(--color-violet-400)}.border-white{border-color:var(--color-white)}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\/20{border-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.border-white\/25{border-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.border-white\/30{border-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.border-white\/40{border-color:#fff6}@supports (color:color-mix(in lab, red, red)){.border-white\/40{border-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-t-gray-800{border-top-color:var(--color-gray-800)}.border-t-primary-500{border-top-color:var(--color-primary-500)}.border-t-primary-600{border-top-color:var(--color-primary-600)}.border-t-violet-600{border-top-color:var(--color-violet-600)}.border-t-white{border-top-color:var(--color-white)}.border-b-gray-800{border-bottom-color:var(--color-gray-800)}.border-l-amber-500{border-left-color:var(--color-amber-500)}.border-l-primary-500{border-left-color:var(--color-primary-500)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-transparent{border-left-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/20{background-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-black{background-color:var(--color-black)}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/40{background-color:#ecfdf566}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\/40{background-color:color-mix(in oklab, var(--color-emerald-50) 40%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\/40{background-color:#f9fafb66}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/40{background-color:color-mix(in oklab, var(--color-gray-50) 40%, transparent)}}.bg-gray-50\/50{background-color:#f9fafb80}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/50{background-color:color-mix(in oklab, var(--color-gray-50) 50%, transparent)}}.bg-gray-50\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/60{background-color:color-mix(in oklab, var(--color-gray-50) 60%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-primary-50{background-color:var(--color-primary-50)}.bg-primary-100{background-color:var(--color-primary-100)}.bg-primary-200{background-color:var(--color-primary-200)}.bg-primary-500{background-color:var(--color-primary-500)}.bg-primary-600{background-color:var(--color-primary-600)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab, red, red)){.bg-red-50\/40{background-color:color-mix(in oklab, var(--color-red-50) 40%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/90{background-color:#fb2c36e6}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/90{background-color:color-mix(in oklab, var(--color-red-500) 90%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.bg-white\/15{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.bg-white\/70{background-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-50{--tw-gradient-from:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-50{--tw-gradient-from:var(--color-primary-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-500{--tw-gradient-from:var(--color-primary-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-600{--tw-gradient-from:var(--color-primary-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-50{--tw-gradient-from:var(--color-red-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-50{--tw-gradient-from:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500{--tw-gradient-from:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-600{--tw-gradient-from:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-800{--tw-gradient-from:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-900{--tw-gradient-from:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-blue-50{--tw-gradient-via:var(--color-blue-50);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-primary-50\/20{--tw-gradient-via:#f0f9ff33}@supports (color:color-mix(in lab, red, red)){.via-primary-50\/20{--tw-gradient-via:color-mix(in oklab, var(--color-primary-50) 20%, transparent)}}.via-primary-50\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-primary-700{--tw-gradient-via:var(--color-primary-700);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-500{--tw-gradient-via:var(--color-sky-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-700{--tw-gradient-to:var(--color-blue-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-500{--tw-gradient-to:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-500{--tw-gradient-to:var(--color-primary-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-600{--tw-gradient-to:var(--color-primary-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-700{--tw-gradient-to:var(--color-primary-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-900{--tw-gradient-to:var(--color-primary-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-50{--tw-gradient-to:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600{--tw-gradient-to:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-800{--tw-gradient-to:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-500{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-amber-400{fill:var(--color-amber-400)}.fill-current{fill:currentColor}.fill-red-300{fill:var(--color-red-300)}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-36{padding-top:calc(var(--spacing) * 36)}.pt-\[15vh\]{padding-top:15vh}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-100{color:var(--color-indigo-100)}.text-indigo-400{color:var(--color-indigo-400)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-pink-700{color:var(--color-pink-700)}.text-primary-100{color:var(--color-primary-100)}.text-primary-400{color:var(--color-primary-400)}.text-primary-500{color:var(--color-primary-500)}.text-primary-600{color:var(--color-primary-600)}.text-primary-700{color:var(--color-primary-700)}.text-primary-800{color:var(--color-primary-800)}.text-primary-900{color:var(--color-primary-900)}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-700{color:var(--color-rose-700)}.text-sky-100{color:var(--color-sky-100)}.text-sky-300{color:var(--color-sky-300)}.text-sky-400{color:var(--color-sky-400)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-900{color:var(--color-slate-900)}.text-transparent{color:#0000}.text-violet-100{color:var(--color-violet-100)}.text-violet-300{color:var(--color-violet-300)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.text-white\/30{color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.text-white\/95{color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.accent-amber-500{accent-color:var(--color-amber-500)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-primary-400{--tw-ring-color:var(--color-primary-400)}.ring-sky-200{--tw-ring-color:var(--color-sky-200)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\:border-primary-200:is(:where(.group):hover *){border-color:var(--color-primary-200)}.group-hover\:bg-amber-200:is(:where(.group):hover *){background-color:var(--color-amber-200)}.group-hover\:bg-green-200:is(:where(.group):hover *){background-color:var(--color-green-200)}.group-hover\:bg-primary-50:is(:where(.group):hover *){background-color:var(--color-primary-50)}.group-hover\:bg-red-200:is(:where(.group):hover *){background-color:var(--color-red-200)}.group-hover\:bg-sky-200:is(:where(.group):hover *){background-color:var(--color-sky-200)}.group-hover\:text-primary-500:is(:where(.group):hover *){color:var(--color-primary-500)}.group-hover\:text-primary-600:is(:where(.group):hover *){color:var(--color-primary-600)}.group-hover\:text-primary-700:is(:where(.group):hover *){color:var(--color-primary-700)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.focus-within\:border-violet-400:focus-within{border-color:var(--color-violet-400)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-violet-400:focus-within{--tw-ring-color:var(--color-violet-400)}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-amber-300:hover{border-color:var(--color-amber-300)}.hover\:border-emerald-300:hover{border-color:var(--color-emerald-300)}.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-green-300:hover{border-color:var(--color-green-300)}.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:border-primary-200:hover{border-color:var(--color-primary-200)}.hover\:border-primary-300:hover{border-color:var(--color-primary-300)}.hover\:border-primary-400:hover{border-color:var(--color-primary-400)}.hover\:border-purple-300:hover{border-color:var(--color-purple-300)}.hover\:border-red-200:hover{border-color:var(--color-red-200)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-sky-300:hover{border-color:var(--color-sky-300)}.hover\:border-violet-300:hover{border-color:var(--color-violet-300)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-primary-50:hover{background-color:var(--color-primary-50)}.hover\:bg-primary-50\/30:hover{background-color:#f0f9ff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary-50\/30:hover{background-color:color-mix(in oklab, var(--color-primary-50) 30%, transparent)}}.hover\:bg-primary-100:hover{background-color:var(--color-primary-100)}.hover\:bg-primary-600:hover{background-color:var(--color-primary-600)}.hover\:bg-primary-700:hover{background-color:var(--color-primary-700)}.hover\:bg-primary-800:hover{background-color:var(--color-primary-800)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-50\/50:hover{background-color:#fef2f280}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-50\/50:hover{background-color:color-mix(in oklab, var(--color-red-50) 50%, transparent)}}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-sky-50:hover{background-color:var(--color-sky-50)}.hover\:bg-sky-50\/30:hover{background-color:#f0f9ff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-sky-50\/30:hover{background-color:color-mix(in oklab, var(--color-sky-50) 30%, transparent)}}.hover\:bg-sky-100:hover{background-color:var(--color-sky-100)}.hover\:bg-sky-100\/50:hover{background-color:#dff2fe80}@supports (color:color-mix(in lab, red, red)){.hover\:bg-sky-100\/50:hover{background-color:color-mix(in oklab, var(--color-sky-100) 50%, transparent)}}.hover\:bg-sky-600:hover{background-color:var(--color-sky-600)}.hover\:bg-sky-700:hover{background-color:var(--color-sky-700)}.hover\:bg-violet-50:hover{background-color:var(--color-violet-50)}.hover\:bg-violet-100:hover{background-color:var(--color-violet-100)}.hover\:bg-violet-600:hover{background-color:var(--color-violet-600)}.hover\:bg-violet-700:hover{background-color:var(--color-violet-700)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\:bg-white\/25:hover{background-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/25:hover{background-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:bg-gradient-to-r:hover{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-primary-700:hover{--tw-gradient-from:var(--color-primary-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-sky-600:hover{--tw-gradient-from:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-primary-800:hover{--tw-gradient-to:var(--color-primary-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-sky-700:hover{--tw-gradient-to:var(--color-sky-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-transparent:hover{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-amber-700:hover{color:var(--color-amber-700)}.hover\:text-amber-900:hover{color:var(--color-amber-900)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-blue-900:hover{color:var(--color-blue-900)}.hover\:text-emerald-700:hover{color:var(--color-emerald-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-green-700:hover{color:var(--color-green-700)}.hover\:text-green-900:hover{color:var(--color-green-900)}.hover\:text-indigo-700:hover{color:var(--color-indigo-700)}.hover\:text-primary-500:hover{color:var(--color-primary-500)}.hover\:text-primary-600:hover{color:var(--color-primary-600)}.hover\:text-primary-700:hover{color:var(--color-primary-700)}.hover\:text-primary-900:hover{color:var(--color-primary-900)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-sky-700:hover{color:var(--color-sky-700)}.hover\:text-violet-700:hover{color:var(--color-violet-700)}.hover\:text-violet-800:hover{color:var(--color-violet-800)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\:border-primary-300:focus{border-color:var(--color-primary-300)}.focus\:border-primary-500:focus{border-color:var(--color-primary-500)}.focus\:border-sky-500:focus{border-color:var(--color-sky-500)}.focus\:border-transparent:focus{border-color:#0000}.focus\:border-violet-400:focus{border-color:var(--color-violet-400)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-primary-400:focus{--tw-ring-color:var(--color-primary-400)}.focus\:ring-primary-500:focus{--tw-ring-color:var(--color-primary-500)}.focus\:ring-sky-400:focus{--tw-ring-color:var(--color-sky-400)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:ring-violet-400:focus{--tw-ring-color:var(--color-violet-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:var(--color-primary-500)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{background-color:var(--color-gray-50)}.disabled\:bg-gray-100:disabled{background-color:var(--color-gray-100)}.disabled\:bg-gray-200:disabled{background-color:var(--color-gray-200)}.disabled\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.disabled\:bg-primary-300:disabled{background-color:var(--color-primary-300)}.disabled\:bg-sky-300:disabled{background-color:var(--color-sky-300)}.disabled\:bg-violet-300:disabled{background-color:var(--color-violet-300)}.disabled\:text-gray-400:disabled{color:var(--color-gray-400)}.disabled\:text-gray-500:disabled{color:var(--color-gray-500)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:ml-2{margin-left:calc(var(--spacing) * 2)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:rotate-0{rotate:0deg}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:py-5{padding-block:calc(var(--spacing) * 5)}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=48rem){.md\:flex{display:flex}.md\:inline{display:inline}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.md\:text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-6{padding-inline:calc(var(--spacing) * 6)}.lg\:text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}html{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:var(--color-gray-50);color:var(--color-gray-900)}.cloud-container{border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);box-shadow:0 1px 3px #0000000d,0 1px 2px #00000008}.card-shadow{box-shadow:0 4px 12px #00000014}.glass-panel{border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);box-shadow:0 1px 3px #0000000d,0 1px 2px #00000008}.glass-toolbar{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:var(--color-gray-100)}::-webkit-scrollbar-thumb{background-color:var(--color-gray-300);border-radius:.25rem}::-webkit-scrollbar-thumb:hover{background-color:var(--color-gray-400)}:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);--tw-ring-color:var(--color-primary-500);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}::selection{background-color:var(--color-primary-100);color:var(--color-primary-900)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono:"JetBrains Mono", "Fira Code", "Consolas", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-700:oklch(52.5% .223 3.958);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary-50:#f0f9ff;--color-primary-100:#e0f2fe;--color-primary-200:#bae6fd;--color-primary-300:#7dd3fc;--color-primary-400:#38bdf8;--color-primary-500:#0ea5e9;--color-primary-600:#0284c7;--color-primary-700:#0369a1;--color-primary-800:#075985;--color-primary-900:#0c4a6e}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-7{top:calc(var(--spacing) * 7)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-7{right:calc(var(--spacing) * 7)}.right-8{right:calc(var(--spacing) * 8)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-full{bottom:100%}.-left-3{left:calc(var(--spacing) * -3)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-7{left:calc(var(--spacing) * 7)}.left-full{left:100%}.isolate{isolation:isolate}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.z-\[10000\]{z-index:10000}.order-123{order:123}.order-12345{order:12345}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-14{margin-top:calc(var(--spacing) * 14)}.-mr-4{margin-right:calc(var(--spacing) * -4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.mb-14{margin-bottom:calc(var(--spacing) * 14)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-\[68px\]{margin-left:68px}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[400px\]{max-height:400px}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[260px\]{width:260px}.w-\[420px\]{width:420px}.w-\[520px\]{width:520px}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[90vw\]{max-width:90vw}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[300px\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[80px\]{min-width:80px}.min-w-\[180px\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/2{--tw-translate-x:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\[1\.02\]{scale:1.02}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-4{border-right-style:var(--tw-border-style);border-right-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-50{border-color:var(--color-gray-50)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-orange-200{border-color:var(--color-orange-200)}.border-primary-100{border-color:var(--color-primary-100)}.border-primary-200{border-color:var(--color-primary-200)}.border-primary-300{border-color:var(--color-primary-300)}.border-primary-400{border-color:var(--color-primary-400)}.border-primary-500{border-color:var(--color-primary-500)}.border-primary-600{border-color:var(--color-primary-600)}.border-purple-100{border-color:var(--color-purple-100)}.border-red-100{border-color:var(--color-red-100)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-sky-100{border-color:var(--color-sky-100)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-400{border-color:var(--color-sky-400)}.border-sky-500{border-color:var(--color-sky-500)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-300{border-color:var(--color-violet-300)}.border-violet-400{border-color:var(--color-violet-400)}.border-white{border-color:var(--color-white)}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\/20{border-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.border-white\/25{border-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.border-white\/30{border-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.border-white\/40{border-color:#fff6}@supports (color:color-mix(in lab, red, red)){.border-white\/40{border-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-t-gray-800{border-top-color:var(--color-gray-800)}.border-t-primary-500{border-top-color:var(--color-primary-500)}.border-t-primary-600{border-top-color:var(--color-primary-600)}.border-t-violet-600{border-top-color:var(--color-violet-600)}.border-t-white{border-top-color:var(--color-white)}.border-b-gray-800{border-bottom-color:var(--color-gray-800)}.border-l-amber-500{border-left-color:var(--color-amber-500)}.border-l-primary-500{border-left-color:var(--color-primary-500)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-transparent{border-left-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/20{background-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-black{background-color:var(--color-black)}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/40{background-color:#ecfdf566}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\/40{background-color:color-mix(in oklab, var(--color-emerald-50) 40%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\/40{background-color:#f9fafb66}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/40{background-color:color-mix(in oklab, var(--color-gray-50) 40%, transparent)}}.bg-gray-50\/50{background-color:#f9fafb80}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/50{background-color:color-mix(in oklab, var(--color-gray-50) 50%, transparent)}}.bg-gray-50\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\/60{background-color:color-mix(in oklab, var(--color-gray-50) 60%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-primary-50{background-color:var(--color-primary-50)}.bg-primary-100{background-color:var(--color-primary-100)}.bg-primary-200{background-color:var(--color-primary-200)}.bg-primary-500{background-color:var(--color-primary-500)}.bg-primary-600{background-color:var(--color-primary-600)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab, red, red)){.bg-red-50\/40{background-color:color-mix(in oklab, var(--color-red-50) 40%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/90{background-color:#fb2c36e6}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/90{background-color:color-mix(in oklab, var(--color-red-500) 90%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.bg-white\/15{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.bg-white\/70{background-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-50{--tw-gradient-from:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-50{--tw-gradient-from:var(--color-primary-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-500{--tw-gradient-from:var(--color-primary-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-600{--tw-gradient-from:var(--color-primary-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-50{--tw-gradient-from:var(--color-red-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-50{--tw-gradient-from:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500{--tw-gradient-from:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-600{--tw-gradient-from:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-800{--tw-gradient-from:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-900{--tw-gradient-from:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-blue-50{--tw-gradient-via:var(--color-blue-50);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-primary-50\/20{--tw-gradient-via:#f0f9ff33}@supports (color:color-mix(in lab, red, red)){.via-primary-50\/20{--tw-gradient-via:color-mix(in oklab, var(--color-primary-50) 20%, transparent)}}.via-primary-50\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-primary-700{--tw-gradient-via:var(--color-primary-700);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-500{--tw-gradient-via:var(--color-sky-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-700{--tw-gradient-to:var(--color-blue-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-500{--tw-gradient-to:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-500{--tw-gradient-to:var(--color-primary-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-600{--tw-gradient-to:var(--color-primary-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-700{--tw-gradient-to:var(--color-primary-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary-900{--tw-gradient-to:var(--color-primary-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-50{--tw-gradient-to:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600{--tw-gradient-to:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-800{--tw-gradient-to:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-500{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-amber-400{fill:var(--color-amber-400)}.fill-current{fill:currentColor}.fill-red-300{fill:var(--color-red-300)}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-36{padding-top:calc(var(--spacing) * 36)}.pt-\[15vh\]{padding-top:15vh}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-100{color:var(--color-indigo-100)}.text-indigo-400{color:var(--color-indigo-400)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-pink-700{color:var(--color-pink-700)}.text-primary-100{color:var(--color-primary-100)}.text-primary-400{color:var(--color-primary-400)}.text-primary-500{color:var(--color-primary-500)}.text-primary-600{color:var(--color-primary-600)}.text-primary-700{color:var(--color-primary-700)}.text-primary-800{color:var(--color-primary-800)}.text-primary-900{color:var(--color-primary-900)}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-700{color:var(--color-rose-700)}.text-sky-100{color:var(--color-sky-100)}.text-sky-300{color:var(--color-sky-300)}.text-sky-400{color:var(--color-sky-400)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-900{color:var(--color-slate-900)}.text-transparent{color:#0000}.text-violet-100{color:var(--color-violet-100)}.text-violet-300{color:var(--color-violet-300)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.text-white\/30{color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.text-white\/95{color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.accent-amber-500{accent-color:var(--color-amber-500)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-primary-400{--tw-ring-color:var(--color-primary-400)}.ring-sky-200{--tw-ring-color:var(--color-sky-200)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\:border-primary-200:is(:where(.group):hover *){border-color:var(--color-primary-200)}.group-hover\:bg-amber-200:is(:where(.group):hover *){background-color:var(--color-amber-200)}.group-hover\:bg-green-200:is(:where(.group):hover *){background-color:var(--color-green-200)}.group-hover\:bg-primary-50:is(:where(.group):hover *){background-color:var(--color-primary-50)}.group-hover\:bg-red-200:is(:where(.group):hover *){background-color:var(--color-red-200)}.group-hover\:bg-sky-200:is(:where(.group):hover *){background-color:var(--color-sky-200)}.group-hover\:text-primary-500:is(:where(.group):hover *){color:var(--color-primary-500)}.group-hover\:text-primary-600:is(:where(.group):hover *){color:var(--color-primary-600)}.group-hover\:text-primary-700:is(:where(.group):hover *){color:var(--color-primary-700)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.focus-within\:border-violet-400:focus-within{border-color:var(--color-violet-400)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-violet-400:focus-within{--tw-ring-color:var(--color-violet-400)}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-amber-300:hover{border-color:var(--color-amber-300)}.hover\:border-emerald-300:hover{border-color:var(--color-emerald-300)}.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-green-300:hover{border-color:var(--color-green-300)}.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:border-primary-200:hover{border-color:var(--color-primary-200)}.hover\:border-primary-300:hover{border-color:var(--color-primary-300)}.hover\:border-primary-400:hover{border-color:var(--color-primary-400)}.hover\:border-purple-300:hover{border-color:var(--color-purple-300)}.hover\:border-red-200:hover{border-color:var(--color-red-200)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-sky-300:hover{border-color:var(--color-sky-300)}.hover\:border-violet-300:hover{border-color:var(--color-violet-300)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-primary-50:hover{background-color:var(--color-primary-50)}.hover\:bg-primary-50\/30:hover{background-color:#f0f9ff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary-50\/30:hover{background-color:color-mix(in oklab, var(--color-primary-50) 30%, transparent)}}.hover\:bg-primary-100:hover{background-color:var(--color-primary-100)}.hover\:bg-primary-600:hover{background-color:var(--color-primary-600)}.hover\:bg-primary-700:hover{background-color:var(--color-primary-700)}.hover\:bg-primary-800:hover{background-color:var(--color-primary-800)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-50\/50:hover{background-color:#fef2f280}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-50\/50:hover{background-color:color-mix(in oklab, var(--color-red-50) 50%, transparent)}}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-sky-50:hover{background-color:var(--color-sky-50)}.hover\:bg-sky-50\/30:hover{background-color:#f0f9ff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-sky-50\/30:hover{background-color:color-mix(in oklab, var(--color-sky-50) 30%, transparent)}}.hover\:bg-sky-100:hover{background-color:var(--color-sky-100)}.hover\:bg-sky-100\/50:hover{background-color:#dff2fe80}@supports (color:color-mix(in lab, red, red)){.hover\:bg-sky-100\/50:hover{background-color:color-mix(in oklab, var(--color-sky-100) 50%, transparent)}}.hover\:bg-sky-600:hover{background-color:var(--color-sky-600)}.hover\:bg-sky-700:hover{background-color:var(--color-sky-700)}.hover\:bg-violet-50:hover{background-color:var(--color-violet-50)}.hover\:bg-violet-100:hover{background-color:var(--color-violet-100)}.hover\:bg-violet-600:hover{background-color:var(--color-violet-600)}.hover\:bg-violet-700:hover{background-color:var(--color-violet-700)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\:bg-white\/25:hover{background-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/25:hover{background-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:bg-gradient-to-r:hover{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-primary-700:hover{--tw-gradient-from:var(--color-primary-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-sky-600:hover{--tw-gradient-from:var(--color-sky-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-primary-800:hover{--tw-gradient-to:var(--color-primary-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-sky-700:hover{--tw-gradient-to:var(--color-sky-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-transparent:hover{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-amber-700:hover{color:var(--color-amber-700)}.hover\:text-amber-900:hover{color:var(--color-amber-900)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-blue-900:hover{color:var(--color-blue-900)}.hover\:text-emerald-700:hover{color:var(--color-emerald-700)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-green-700:hover{color:var(--color-green-700)}.hover\:text-green-900:hover{color:var(--color-green-900)}.hover\:text-indigo-700:hover{color:var(--color-indigo-700)}.hover\:text-primary-500:hover{color:var(--color-primary-500)}.hover\:text-primary-600:hover{color:var(--color-primary-600)}.hover\:text-primary-700:hover{color:var(--color-primary-700)}.hover\:text-primary-900:hover{color:var(--color-primary-900)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-sky-700:hover{color:var(--color-sky-700)}.hover\:text-violet-700:hover{color:var(--color-violet-700)}.hover\:text-violet-800:hover{color:var(--color-violet-800)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\:border-primary-300:focus{border-color:var(--color-primary-300)}.focus\:border-primary-500:focus{border-color:var(--color-primary-500)}.focus\:border-sky-500:focus{border-color:var(--color-sky-500)}.focus\:border-transparent:focus{border-color:#0000}.focus\:border-violet-400:focus{border-color:var(--color-violet-400)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-primary-400:focus{--tw-ring-color:var(--color-primary-400)}.focus\:ring-primary-500:focus{--tw-ring-color:var(--color-primary-500)}.focus\:ring-sky-400:focus{--tw-ring-color:var(--color-sky-400)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:ring-violet-400:focus{--tw-ring-color:var(--color-violet-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:var(--color-primary-500)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{background-color:var(--color-gray-50)}.disabled\:bg-gray-100:disabled{background-color:var(--color-gray-100)}.disabled\:bg-gray-200:disabled{background-color:var(--color-gray-200)}.disabled\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.disabled\:bg-primary-300:disabled{background-color:var(--color-primary-300)}.disabled\:bg-sky-300:disabled{background-color:var(--color-sky-300)}.disabled\:bg-violet-300:disabled{background-color:var(--color-violet-300)}.disabled\:text-gray-400:disabled{color:var(--color-gray-400)}.disabled\:text-gray-500:disabled{color:var(--color-gray-500)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:ml-2{margin-left:calc(var(--spacing) * 2)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:rotate-0{rotate:0deg}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:py-5{padding-block:calc(var(--spacing) * 5)}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=48rem){.md\:flex{display:flex}.md\:inline{display:inline}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.md\:text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-6{padding-inline:calc(var(--spacing) * 6)}.lg\:text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}html{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:var(--color-gray-50);color:var(--color-gray-900)}.cloud-container{border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);box-shadow:0 1px 3px #0000000d,0 1px 2px #00000008}.card-shadow{box-shadow:0 4px 12px #00000014}.glass-panel{border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);box-shadow:0 1px 3px #0000000d,0 1px 2px #00000008}.glass-toolbar{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:var(--color-gray-100)}::-webkit-scrollbar-thumb{background-color:var(--color-gray-300);border-radius:.25rem}::-webkit-scrollbar-thumb:hover{background-color:var(--color-gray-400)}:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);--tw-ring-color:var(--color-primary-500);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}::selection{background-color:var(--color-primary-100);color:var(--color-primary-900)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/services/api/src/ServiceHub.Api/wwwroot/assets/index-DN7BlXe4.js b/services/api/src/ServiceHub.Api/wwwroot/assets/index-DN7BlXe4.js new file mode 100644 index 0000000..5d9fb6a --- /dev/null +++ b/services/api/src/ServiceHub.Api/wwwroot/assets/index-DN7BlXe4.js @@ -0,0 +1,79 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-dashboard-D0tsEnG-.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/page-correlation-o8uE5lXV.js","assets/page-dlq-history-CPp6jKYl.js","assets/InsightsPage-CBZxGweF.js"])))=>i.map(i=>d[i]); +import{r as e,t}from"./rolldown-runtime-S-ySWqyJ.js";import{$ as n,B as r,C as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,Q as p,R as m,S as h,T as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,a as w,at as T,b as E,c as D,ct as ee,d as O,dt as te,f as k,ft as ne,g as A,gt as re,h as j,ht as M,i as ie,it as ae,l as N,lt as oe,m as P,mt as se,n as ce,o as le,ot as ue,p as de,pt as fe,q as pe,r as me,rt as he,s as ge,st as _e,tt as ve,u as ye,ut as be,v as xe,w as F,x as Se,y as Ce}from"./page-correlation-o8uE5lXV.js";import{a as we,c as Te,i as Ee,l as De,n as Oe,o as ke,r as Ae,s as je,u as Me}from"./page-dashboard-D0tsEnG-.js";import{_ as Ne,a as Pe,c as Fe,d as Ie,f as Le,g as Re,h as ze,i as Be,l as Ve,m as He,n as Ue,o as We,p as Ge,r as Ke,s as qe,u as Je}from"./page-dlq-history-CPp6jKYl.js";import{t as Ye}from"./vendor-ui-BdRTM8UJ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Xe=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=D,ee=function(){te.postMessage(null)}}else ee=function(){_(D,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ze=t(((e,t)=>{t.exports=Xe()})),Qe=t((e=>{var t=Ze(),n=re(),r=Me();function i(e){var t=`https://react.dev/errors/`+e;if(1ae||(e.current=ie[ae],ie[ae]=null,ae--)}function P(e,t){ae++,ie[ae]=e.current,e.current=t}var se=N(null),ce=N(null),le=N(null),ue=N(null);function de(e,t){switch(P(le,t),P(ce,e),P(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),P(se,e)}function fe(){oe(se),oe(ce),oe(le)}function pe(e){e.memoizedState!==null&&P(ue,e);var t=se.current,n=Gd(t,e.type);t!==n&&(P(ce,e),P(se,n))}function me(e){ce.current===e&&(oe(se),oe(ce)),ue.current===e&&(oe(ue),tp._currentValue=M)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var F=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function I(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var V={};Object.defineProperty(V,`passive`,{get:function(){cn=!0}}),window.addEventListener(`test`,V,V),window.removeEventListener(`test`,V,V)}catch{cn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=fn(),dn=un=ln=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=sn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==Rt(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Od(Tr,`onSelect`),0>=o,i-=o,bi=1<<32-ze(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ki&&Si(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ki&&Si(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ki&&Si(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ne(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Rl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(J&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};A.T=s,js(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,da(c,r),hu(e)):As(e,t,r,hu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,M,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:M},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},hu())}function ws(){return Xi(tp)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Ra(n);var r=za(t,e,n);r!==null&&(_u(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Xr(e,t,n,r),n!==null&&(_u(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,hu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),zl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return _u(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&_u(t,e,2)}function Ms(e){var t=e.alternate;return e===K||t!==null&&t===K}function Ns(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Fs={readContext:Xi,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Fs.useEffectEvent=_o;var Is={readContext:Xi,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,K,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,K,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=K,a=Eo();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),zl===null)throw Error(i(349));J&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(zo.bind(null,r,o,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=zl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Ni(t,!0)}else e=Ud(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ro(t),t):(ro(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ro(t),t):(ro(t),null)}return ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return fe(),e===null&&wd(t.stateNode.containerInfo),Fc(t),null;case 10:return Wi(t.type),Fc(t),null;case 19:if(oe(io),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ao(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return P(io,io.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>ru&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ao(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Fc(t),null}else 2*Ee()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=io.current,P(io,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return ro(t),Xa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&oe(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(ro(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(io),null;case 4:return fe(),null;case 10:return Wi(t.type),null;case 22:case 23:return ro(t),Xa(),e!==null&&oe(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Rc(e,t){switch(Ti(t),t.tag){case 3:Wi(na),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ro(t);break;case 13:ro(t);break;case 19:oe(io);break;case 10:Wi(t.type);break;case 22:case 23:ro(t),Xa(),e!==null&&oe(pa);break;case 24:Wi(na)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Ku(e,e.return,t)}}}function Hc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[lt]=t}catch(t){Ku(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=B));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[ct]=e,t[lt]=n}catch(t){Ku(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Vd=up,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ld(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Rl&6)throw Error(i(331));var c=Rl;if(Rl|=4,Nl(o.current),Tl(o,o.current,s,n),Rl=c,od(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{j.p=a,A.T=r,Hu(e,t)}}function Gu(e,t,n){t=fi(n,t),t=Ys(e.stateNode,t,2),e=za(e,t,2),e!==null&&($e(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=fi(n,e),n=Xs(2),r=za(t,n,2),r!==null&&(Zs(n,r,t,e),$e(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,zl===e&&(J&n)===n&&(Kl===4||Kl===3&&(J&62914560)===J&&300>Ee()-tu?!(Rl&2)&&wu(e,0):Yl|=n,Zl===J&&(Zl=0)),ad(e)}function Yu(e,t){t===0&&(t=Xe()),e=Zr(e,t),e!==null&&($e(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return Se(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=J,a=qe(r,r===zl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=Ee(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}ou!==0&&ou!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),xt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=bt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);xt(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=bt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),xt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=bt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),xt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=le.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+Bt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),xt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Bt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,xt(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Qe()})),I=e(re(),1),et=e(Me(),1);function tt(e){return I.createElement(be,{flushSync:et.flushSync,...e})}ne();function nt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,u=async()=>{let n=!1,u=e=>{_(e,()=>t.signal,()=>n=!0)},f=d(t.options,t.fetchOptions),p=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await f((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})()),{maxPages:o}=t.options,c=i?s:y;return{pages:c(e.pages,a,o),pageParams:c(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?it:rt,n={pages:a,pageParams:o};c=await p(n,t(r,n),e)}else{let t=e??a.length;do{let e=l===0?o[0]??r.initialPageParam:rt(r,c);if(l>0&&e==null)break;c=await p(c,e),l++}while(lt.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function rt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function it(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var at=class extends T{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new m({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ot(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){c.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>b(t,e))}findAll(e={}){return this.getAll().filter(t=>b(e,t))}notify(e){c.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return c.batch(()=>Promise.all(e.map(e=>e.continue().catch(p))))}};function ot(e){return e.options.scope?.id}var st=class extends T{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let i=t.queryKey,a=t.queryHash??x(i,t),o=this.get(a);return o||(o=new r({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){c.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>S(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>S(e,t)):t}notify(e){c.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){c.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){c.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ct=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new st,this.#t=e.mutationCache||new at,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ae.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=v.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ve(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=pe(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return c.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;c.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return c.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=c.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(p).catch(p)}invalidateQueries(e,t={}){return c.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=c.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(p)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(p)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(ve(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(p).catch(p)}fetchInfiniteQuery(e){return e.behavior=nt(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(p).catch(p)}ensureInfiniteQueryData(e){return e.behavior=nt(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return v.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(u(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],r={};return t.forEach(t=>{n(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#i.set(u(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],r={};return t.forEach(t=>{n(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=x(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===he&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},lt=`undefined`,ut=`prototype`,dt=Object,ft=dt[ut];function pt(e,t){return e||t}function mt(e,t){return e[t]}var ht=void 0,gt=null,_t=``,vt=`function`,yt=`object`,bt=`prototype`,xt=`__proto__`,St=`undefined`,Ct=`constructor`,wt=`Symbol`,Tt=`length`,Et=`name`,Dt=`call`,Ot=`toString`,kt=`getOwnPropertyDescriptor`,At=pt(Object),jt=mt(At,bt),Mt=pt(String),Nt=mt(Mt,bt),Pt=pt(Math),Ft=pt(Array),It=mt(Ft,bt),Lt=mt(It,`slice`),Rt=`_polyfill`,zt=`__nw21$polytype__`;function Bt(e,t){try{return{v:e.apply(this,t)}}catch(e){return{e}}}function Vt(e,t,n){var r=Bt(e,n);return r.e?t:r.v}var Ht;function Ut(e){return function(t){return typeof t===e}}function Wt(e){var t=`[object `+e+`]`;return function(e){return!!(e&&Gt(e)===t)}}function Gt(e){return jt[Ot].call(e)}function Kt(e){return typeof e===St||e===St}function qt(e){return e===ht}function L(e){return e===gt||Kt(e)}function Jt(e){return e===gt||e===ht}function Yt(e){return!!e||e!==ht}function Xt(e){return!Ht&&(Ht=[`string`,`number`,`boolean`,St,`symbol`,`bigint`]),e!==yt&&Ht.indexOf(e)!==-1}var R=Ut(`string`),z=Ut(vt);function Zt(e){return!e&&L(e)?!1:!!e&&typeof e===yt}var B=mt(Ft,`isArray`),Qt=Wt(`Date`),$t=Ut(`number`),en=Ut(`boolean`),tn=Wt(`Error`);function nn(e){return!!(e&&e.then&&z(e.then))}function rn(e){return!(!e||Vt(function(){return!(e&&0+e)},!e))}function an(){}function on(){return!1}var sn=pt(Mt),cn=`[object Error]`;function V(e,t){var n=_t,r=jt[Ot][Dt](e);r===cn&&(e={stack:sn(e.stack),message:sn(e.message),name:sn(e.name)});try{n=JSON.stringify(e,gt,t?typeof t==`number`?t:4:ht),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,`$1: `):gt)||sn(e)}catch(e){n=` - `+V(e,t)}return r+`: `+n}function ln(e){throw Error(e)}function un(e){throw TypeError(e)}function dn(e){Jt(e)&&un(`Cannot convert undefined or null to object`)}function fn(e){R(e)||un(`'`+V(e)+`' is not a string`)}function pn(e,t){return!!e&&jt.hasOwnProperty[Dt](e,t)}var mn=pt(mt(At,kt),an),hn=pt(mt(At,`hasOwn`),gn);function gn(e,t){return dn(e),pn(e,t)||!!mn(e,t)}function H(e,t,n){if(e&&(Zt(e)||z(e))){for(var r in e)if(hn(e,r)&&t[Dt](n||e,r,e[r])===-1)break}}function U(e,t,n){if(e)for(var r=e[Tt]>>>0,i=0;i0&&z(n[0])&&(t=n[0])}return t||setTimeout}function qi(e){var t=z(e)?e:Gi;if(!t){var n=Kn().tmOut||[];B(n)&&n.length>1&&z(n[1])&&(t=n[1])}return t||clearTimeout}function Ji(e,t,n){var r=B(t),i=r?t.length:0,a=Ki(i>0?t[0]:r?ht:t),o=qi(i>1?t[1]:ht),s=n[0];n[0]=function(){c.dn(),ar(s,ht,Lt[Dt](arguments))};var c=Ui(e,function(e){if(e){if(e.refresh)return e.refresh(),e;ar(o,ht,[e])}return ar(a,ht,n)},function(e){ar(o,ht,[e])});return c.h}function Yi(e,t){return Ji(!0,ht,Lt[Dt](arguments))}function Xi(e,t){return Ji(!1,ht,Lt[Dt](arguments))}(wr()||{}).Symbol,(wr()||{}).Reflect;var Zi=`hasOwnProperty`,Qi=Mn||function(e){for(var t,n=1,r=arguments.length;n0)for(var i=0;i=0;n--)if(e[n]===t)return!0;return!1}function Na(e,t,n,r){function i(e,t,n){var i=t[n];if(i[sa]&&r){var a=e[oa]||{};a[da]!==!1&&(i=(a[t[ca]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var a=tr(null);Oa(n,function(e){a[e]=i(t,n,e)});for(var o=Da(e),s=[];o&&!Ea(o)&&!Ma(s,o);)Oa(o,function(e){!a[e]&&ka(o,e,!xa)&&(a[e]=i(t,o,e))}),s.push(o),o=Da(o);return a}function Pa(e,t,n,r){var i=null;if(e&&pn(n,ca)){var a=e[oa]||tr(null);if(i=(a[n[ca]]||tr(null))[t],i||Aa(`Missing [`+t+`] `+aa),!i[ua]&&a[da]!==!1){for(var o=!pn(e,t),s=Da(e),c=[];o&&s&&!Ea(s)&&!Ma(c,s);){var l=s[t];if(l){o=l===r;break}c.push(s),s=Da(s)}try{o&&(e[t]=i),i[ua]=1}catch{a[da]=!1}}}return i}function Fa(e,t,n){var r=t[e];return r===n&&(r=Da(t)[e]),typeof r!==aa&&Aa(`[`+e+`] is not a `+aa),r}function Ia(e,t,n,r,i){function a(e,t){var n=function(){return(Pa(this,t,e,n)||Fa(t,e,n)).apply(this,arguments)};return n[sa]=1,n}if(!Ta(e)){var o=n[oa]=n[oa]||tr(null);if(!Ta(o)){var s=o[t]=o[t]||tr(null);o[da]!==!1&&(o[da]=!!i),Ta(s)||Oa(n,function(t){ka(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!pn(e,t)||e[t]&&!e[t][sa])&&(e[t]=a(e,t)))})}}}function La(e,t){if(xa){for(var n=[],r=Da(t);r&&!Ea(r)&&!Ma(n,r);){if(r===e)return!0;n.push(r),r=Da(r)}return!1}return!0}function Ra(e,t){return pn(e,ia)?e.name||t||pa:((e||{})[ra]||{}).name||t||pa}function za(e,t,n,r){pn(e,ia)||Aa(`theClass is an invalid class definition.`);var i=e[ia];La(i,t)||Aa(`[`+Ra(e)+`] not in hierarchy of [`+Ra(t)+`]`);var a=null;pn(i,ca)?a=i[ca]:(a=la+Ra(e,`_`)+`$`+wa.n,wa.n++,i[ca]=a);var o=za[fa],s=!!o[va];s&&r&&r[va]!==void 0&&(s=!!r[va]);var c=ja(t);n(t,Na(i,t,c,s));var l=!!xa&&!!o[ya];l&&r&&(l=!!r[ya]),Ia(i,a,t,c,l!==!1)}za[fa]=wa.o;var Ba=Rn,Va=Vn,Ha=Ba({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Ua=`toLowerCase`,Wa=`length`,Ga=`warnToConsole`,Ka=`throwInternal`,qa=`watch`,Ja=`apply`,G=`push`,Ya=`splice`,Xa=`logger`,Za=`cancel`,Qa=`initialize`,$a=`identifier`,eo=`removeNotificationListener`,to=`addNotificationListener`,no=`isInitialized`,ro=`getNotifyMgr`,io=`getPlugin`,ao=`name`,oo=`processNext`,K=`getProcessTelContext`,so=`value`,co=`enabled`,lo=`stopPollingInternalLogs`,uo=`unload`,fo=`onComplete`,po=`version`,mo=`loggingLevelConsole`,ho=`createNew`,go=`teardown`,_o=`messageId`,vo=`message`,yo=`diagLog`,bo=`_doTeardown`,xo=`update`,So=`getNext`,Co=`setNextPlugin`,wo=`userAgent`,To=`split`,Eo=`replace`,Do=`substring`,Oo=`indexOf`,ko=`type`,Ao=`evtName`,jo=`status`,Mo=`getAllResponseHeaders`,No=`isChildEvt`,Po=`data`,Fo=`getCtx`,Io=`setCtx`,Lo=`headers`,Ro=`urlString`,zo=`timeout`,Bo=`traceFlags`,Vo=`getAttribute`,Ho;function Uo(e,t){Ho||=ai(`AggregationError`,function(e,t){t.length>1&&(e.errors=t[1])});var n=e||`One or more errors occurred.`;throw U(t,function(e,t){n+=` +${t} > ${V(e)}`}),new Ho(n,t||[])}var Wo=`Promise`,Go=`rejected`;function Ko(e,t){return qo(e,function(e){return t?t({status:`fulfilled`,rejected:!1,value:e}):e},function(e){return t?t({status:Go,rejected:!0,reason:e}):e})}function qo(e,t,n,r){var i=e;try{if(nn(e))(t||n)&&(i=e.then(t,n));else try{t&&(i=t(e))}catch(e){if(n)i=n(e);else throw e}}finally{r&&Jo(i,r)}return i}function Jo(e,t){var n=e;return t&&(nn(e)?n=e.finally?e.finally(t):e.then(function(e){return t(),e},function(e){throw t(),e}):t()),n}var Yo,Xo,Zo,Qo=!1;function $o(e,t,n,r){Yo||={toString:function(){return`[[PromiseState]]`}},Xo||={toString:function(){return`[[PromiseResult]]`}},Zo||={toString:function(){return`[[PromiseIsHandled]]`}};var i={};i[Yo]={get:t},i[Xo]={get:n},i[Zo]={get:r},wn(e,i)}var es=[`pending`,`resolving`,`resolved`,Go],ts=`dispatchEvent`,ns;function rs(e){var t;return e&&e.createEvent&&(t=e.createEvent(`Event`)),!!t&&t.initEvent}function is(e,t,n,r){var i=Dr();!ns&&(ns=br(!!Bt(rs,[i]).v));var a=ns.v?i.createEvent(`Event`):r?new Event(t):{};if(n&&n(a),ns.v&&a.initEvent(t,!1,!0),a&&e[ts])e[ts](a);else{var o=e[`on`+t];if(o)o(a);else{var s=Tr(`console`);s&&(s.error||s.log)(t,V(a))}}}var as=`unhandledRejection`,os=as.toLowerCase(),ss=[],cs=0,ls=10,us;function ds(e){return z(e)?e.toString():V(e)}function fs(e,t,n){var r=Qr(arguments,3),i=0,a=!1,o,s=[],c=cs++,l=ss.length>0?ss[ss.length-1]:void 0,u=!1,d=null,f;function p(t,n){try{return ss.push(c),u=!0,d&&d.cancel(),d=null,e(function(e,r){s.push(function(){try{var a=i===2?t:n,s=Kt(a)?o:z(a)?a(o):a;nn(s)?s.then(e,r):a?e(s):i===3?r(s):e(s)}catch(e){r(e)}}),a&&_()},r)}finally{ss.pop()}}function m(e){return p(void 0,e)}function h(e){var t=e,n=e;return z(e)&&(t=function(t){return e&&e(),t},n=function(t){throw e&&e(),t}),p(t,n)}function g(){return es[i]}function _(){if(s.length>0){var e=s.slice();s=[],u=!0,d&&d.cancel(),d=null,t(e)}}function v(e,t){return function(n){if(i===t){if(e===2&&nn(n)){i=1,n.then(v(2,1),v(3,1));return}i=e,a=!0,o=n,_(),!u&&e===3&&!d&&(d=Yi(y,ls))}}}function y(){if(!u)if(u=!0,Pr())process.emit(as,o,f);else{var e=kr()||wr();!us&&(us=br(Bt(Tr,[Wo+`RejectionEvent`]).v)),is(e,os,function(e){return W(e,`promise`,{g:function(){return f}}),e.reason=o,e},!!us.v)}}f={then:p,catch:m,finally:h},Cn(f,`state`,{get:g}),Qo&&$o(f,g,function(){return Gt(o)},function(){return u}),Br()&&(f[Hr(11)]=`IPromise`);function b(){return`IPromise`+(Qo?`[`+c+(Kt(l)?``:`:`+l)+`]`:``)+` `+g()+(a?` - `+ds(o):``)}return f.toString=b,(function(){z(n)||un(Wo+`: executor is not a function - `+ds(n));var e=v(3,0);try{n.call(f,v(2,0),e)}catch(t){e(t)}})(),f}function ps(e){return function(t){return e(function(e,n){try{var r=[],i=1;Jr(t,function(t,a){t&&(i++,qo(t,function(t){r[a]=t,--i===0&&e(r)},n))}),i--,i===0&&e(r)}catch(e){n(e)}},Qr(arguments,1))}}function ms(e){return br(function(t){return e(function(e,n){var r=[],i=1;function a(t,n){i++,Ko(t,function(t){t.rejected?r[n]={status:Go,reason:t.reason}:r[n]={status:`fulfilled`,value:t.value},--i===0&&e(r)})}try{B(t)?U(t,a):Kr(t)?Jr(t,a):un(`Input is not an iterable`),i--,i===0&&e(r)}catch(e){n(e)}},Qr(arguments,1))})}function hs(e){U(e,function(e){try{e()}catch{}})}function gs(e){var t=$t(e)?e:0;return function(e){Yi(function(){hs(e)},t)}}function _s(e,t){return fs(_s,gs(t),e,t)}var vs;function ys(e,t){!vs&&(vs=br(Bt(Tr,[Wo]).v||null));var n=vs.v;if(!n)return _s(e);z(e)||un(Wo+`: executor is not a function - `+V(e));var r=0;function i(){return es[r]}var a=new n(function(t,n){function i(e){r=2,t(e)}function a(e){r=3,n(e)}e(i,a)});return Cn(a,`state`,{get:i}),a}var bs;function xs(e){return fs(xs,hs,e)}function Ss(e,t){return!bs&&(bs=ms(xs)),bs.v(e,t)}var Cs;function ws(e,t){return!Cs&&(Cs=br(ys)),Cs.v.call(this,e,t)}var Ts=ps(ws),Es=`channels`,Ds=`core`,Os=`createPerfMgr`,ks=`disabled`,As=`extensionConfig`,js=`extensions`,Ms=`processTelemetry`,Ns=`priority`,Ps=`eventsSent`,Fs=`eventsDiscarded`,Is=`eventsSendRequest`,Ls=`perfEvent`,Rs=`offlineEventsStored`,zs=`offlineBatchSent`,Bs=`offlineBatchDrop`,Vs=`getPerfMgr`,Hs=`domain`,Us=`path`,Ws=`Not dynamic - `,Gs=`REDACTED`,Ks=[`sig`,`Signature`,`AWSAccessKeyId`,`X-Goog-Signature`],qs=`getPrototypeOf`,Js=/-([a-z])/g,Ys=/([^\w\d_$])/g,Xs=/^(\d+[\w\d_$])/,Zs=Object[qs];function Qs(e){return!L(e)}function $s(e){var t=e;return t&&R(t)&&(t=t[Eo](Js,function(e,t){return t.toUpperCase()}),t=t[Eo](Ys,`_`),t=t[Eo](Xs,function(e,t){return`_`+t})),t}function ec(e,t){return e&&t?Ri(e,t)!==-1:!1}function tc(e){return e&&e.toISOString()||``}function nc(e){return tn(e)?e[ao]:``}function rc(e,t,n,r,i){var a=n;return e&&(a=e[t],a!==n&&(!i||i(a))&&(!r||r(n))&&(a=n,e[t]=a)),a}function ic(e,t,n){var r;return e?(r=e[t],!r&&L(r)&&(r=Kt(n)?{}:n,e[t]=r)):r=Kt(n)?{}:n,r}function ac(e,t){var n=null,r=null;return z(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t][Ja](r,e)}}function oc(e,t,n){if(e&&t&&Zt(e)&&Zt(t)){var r=function(r){if(R(r)){var i=t[r];z(i)?(!n||n(r,!0,t,e))&&(e[r]=ac(t,r)):(!n||n(r,!1,t,e))&&(hn(e,r)&&delete e[r],W(e,r,{g:function(){return t[r]},s:function(e){t[r]=e}}))}};for(var i in t)r(i)}return e}function sc(e,t,n,r,i){e&&t&&n&&(i!==!1||Kt(e[t]))&&(e[t]=ac(n,r))}function cc(e,t,n,r){return e&&t&&Zt(e)&&B(n)&&U(n,function(n){R(n)&&sc(e,n,t,n,r)}),e}function lc(e){return function(){function t(){var t=this;e&&H(e,function(e,n){t[e]=n})}return t}()}function uc(e){return e&&Mn&&(e=dt(Mn({},e))),e}function dc(e,t,n,r,i,a){var o=arguments,s=o[0]||{},c=o[Wa],l=!1,u=1;for(c>0&&en(s)&&(l=s,s=o[u]||{},u++),Zt(s)||(s={});u>>=0),pl=ul+e&ll,ml=dl-e&ll,fl=!0}function gl(){try{var e=rr()&2147483647;hl((Math.random()*cl^e)+e)}catch{}}function _l(e){return e>0?ui(vl()/ll*(e+1))>>>0:0}function vl(e){var t=0,n=qc()||Jc();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&ll),t===0&&Xc()&&(fl||gl(),t=yl()&ll),t===0&&(t=ui(cl*Math.random()|0)),e||(t>>>=0),t}function yl(e){ml=36969*(ml&65535)+(ml>>16)&ll,pl=18e3*(pl&65535)+(pl>>16)≪var t=(ml<<16)+(pl&65535)>>>0&ll|0;return e||(t>>>=0),t}function bl(e){e===void 0&&(e=22);for(var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n=vl()>>>0,r=0,i=``;i[Wa]>>=6,r===5&&(n=(vl()<<2&4294967295|n&3)>>>0,r=0);return i}var xl=`3.3.11`,Sl=`.`+bl(6),Cl=0;function wl(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType}function Tl(e,t){var n=t[e.id];if(!n){n={};try{wl(t)&&W(t,e.id,{e:!1,v:n})}catch{}}return n}function El(e,t){return t===void 0&&(t=!1),$s(e+ Cl+++(t?`.`+xl:``)+Sl)}function Dl(e){var t={id:El(`_aiData-`+(e||``)+`.`+xl),accept:function(e){return wl(e)},get:function(e,n,r,i){var a=e[t.id];return a?a[$s(n)]:(i&&(a=Tl(t,e),a[$s(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch{}}};return t}function Ol(e){return e&&Zt(e)&&!B(e)&&(e.isVal||e.fb||hn(e,`v`)||hn(e,`mrg`)||hn(e,`ref`)||e.set)}function kl(e,t,n){var r,i=n.dfVal||Yt;if(t&&n.fb){var a=n.fb;B(a)||(a=[a]);for(var o=0;o0&&Uo(`Watcher error(s): `,t)}}function d(e){if(e&&e.h.length>0){o||=[],s||=Yi(function(){s=null,u()},0);for(var t=0;t0?Ko(eu(e[0],t),function(){tu(Qr(e,1),t,n)}):n(),r}var nu=`Microsoft_ApplicationInsights_BypassAjaxInstrumentation`;function ru(e,t,n){return!e&&L(e)?t:en(e)?e:sn(e)[Ua]()===`true`}function iu(e){return{mrg:!0,v:e}}function au(e,t){return{set:e,v:t}}function ou(e,t,n){return{fb:n,isVal:e,v:t}}function su(e,t){return{fb:t,set:ru,v:!!e}}function cu(e){return{isVal:R,v:sn(e||``)}}var lu=[Ps,Fs,Is,Ls],uu=null,du;function fu(e,t){return function(){var n=arguments,r=mu(t);if(r){var i=r.listener;i&&i[e]&&i[e][Ja](i,n)}}}function pu(){var e=Tr(`Microsoft`);return e&&(uu=e.ApplicationInsights),uu}function mu(e){var t=uu;return!t&&e.disableDbgExt!==!0&&(t=uu||pu()),t?t.ChromeDbgExt:null}function hu(e){if(!du){du={};for(var t=0;t=t&&(e[d](u[vo]),r[p]=!0)}else i>=t&&e[d](u[vo]);l(t,u)}},e.debugToConsole=function(e){wu(`debug`,e),f(`warning`,e)},e[Ga]=function(e){wu(`warn`,e),f(`warning`,e)},e.errorToConsole=function(e){wu(`error`,e),f(`error`,e)},e.resetInternalMessageCount=function(){n=0,r={}},e.logInternalMessage=l,e[uo]=function(e){c&&c.rm(),c=null};function l(t,i){if(!d()){var s=!0,c=bu+i[_o];if(r[c]?s=!1:r[c]=!0,s&&(t<=a&&(e.queue[G](i),n++,f(t===1?`error`:`warn`,i)),n===o)){var l=`Internal events throttle limit per PageView reached for this app.`,u=new Tu(23,l,!1);e.queue[G](u),t===1?e.errorToConsole(l):e[Ga](l)}}}function u(t){return $l(Ql(t,xu,e).cfg,function(e){var t=e.cfg;i=t[mo],a=t.loggingLevelTelemetry,o=t.maxMessageLimit,s=t.enableDebug})}function d(){return n>=o}function f(e,n){var r=mu(t||{});r&&r.diagLog&&r[yo](e,n)}})}return e.__ieDyn=1,e}();function Ou(e){return e||new Du}function Y(e,t,n,r,i,a){a===void 0&&(a=!1),Ou(e)[Ka](t,n,r,i,a)}function ku(e,t){Ou(e)[Ga](t)}function Au(e,t,n){Ou(e).logInternalMessage(t,n)}var ju,Mu,Nu=`toGMTString`,Pu=`toUTCString`,Fu=`cookie`,Iu=`expires`,Lu=`isCookieUseDisabled`,Ru=`disableCookiesUsage`,zu=`_ckMgr`,Bu=null,Vu=null,Hu=null,Uu,Wu={},Gu={},Ku=(ju={cookieCfg:iu((Mu={},Mu[Hs]={fb:`cookieDomain`,dfVal:Qs},Mu.path={fb:`cookiePath`,dfVal:Qs},Mu.enabled=void 0,Mu.ignoreCookies=void 0,Mu.blockedCookies=void 0,Mu.disableCookieDefer=!1,Mu)),cookieDomain:void 0,cookiePath:void 0},ju[Ru]=void 0,ju);function qu(){!Uu&&(Uu=cr(function(){return Dr()}))}function Ju(e,t){var n=ed[zu]||Gu[zu];return n||(n=ed[zu]=ed(e,t),Gu[zu]=n),n}function Yu(e){return e?e.isEnabled():!0}function Xu(e,t){return t&&e&&B(e.ignoreCookies)?Xr(e.ignoreCookies,t)!==-1:!1}function Zu(e,t){return t&&e&&B(e.blockedCookies)&&Xr(e.blockedCookies,t)!==-1?!0:Xu(e,t)}function Qu(e,t){var n=t[co];if(L(n)){var r=void 0;Kt(e[Lu])||(r=!e[Lu]),Kt(e[Ru])||(r=!e[Ru]),n=r}return n}function $u(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var r=t.cookieCfg;n=r&&r[zu]?r[zu]:ed(t)}return n||=Ju(t,(e||{})[Xa]),n}function ed(e,t){var n,r,i,a,o,s,c,l,u=[];function d(e){var t,n=(t={},t[Us]=e||`/`,t[Iu]=`Thu, 01 Jan 1970 00:00:01 GMT`,t);return Xc()||(n[`max-age`]=`0`),id(``,n)}function f(e,t,n,a){var o={},s=li(e||``),c=Ri(s,`;`);if(c!==-1&&(s=li($n(e,c)),o=nd(Xn(e,c+1))),rc(o,Hs,n||i,rn,Kt),!L(t)){var l=Xc();if(Kt(o[Iu])){var u=rr()+t*1e3;if(u>0){var d=new Date;d.setTime(u),rc(o,Iu,rd(d,l?Nu:Pu)||rd(d,l?Nu:Pu)||``,rn)}}l||rc(o,`max-age`,``+t,null,Kt)}var f=Uc();return f&&f.protocol===`https:`&&(rc(o,`secure`,null,null,Kt),Vu===null&&(Vu=!sd((jr()||{})[wo])),Vu&&rc(o,`SameSite`,`None`,null,Kt)),rc(o,Us,a||r,null,Kt),id(s,o)}function p(e){if(u)for(var t=u[Wa]-1;t>=0;t--)u[t].n===e&&u[Ya](t,1)}function m(){td(t)&&u&&(U(u,function(e){Zu(n,e.n)||(e.o===0?c(e.n,e.v):e.o===1&&l(e.n,e.v))}),u=[])}e=Ql(e||Gu,null,t).cfg,a=$l(e,function(t){t.setDf(t.cfg,Ku),n=t.ref(t.cfg,`cookieCfg`),r=n.path||`/`,i=n[Hs],n.disableCookieDefer?u=null:u===null&&(u=[]);var a=o;o=Qu(e,n)!==!1,s=n.getCookie||ad,c=n.setCookie||od,l=n.delCookie||od,!a&&o&&u&&m()},t);var h={isEnabled:function(){var r=Qu(e,n)!==!1&&o&&td(t),i=Gu[zu];return r&&i&&h!==i&&(r=Yu(i)),r},setEnabled:function(t){n[co]=t,Kt(e[Ru])||(e[Ru]=!t)},set:function(e,t,r,i,a){var o=!1;if(!Zu(n,e)){var s=f(t,r,i,a);Yu(h)?(c(e,s),o=!0):u&&(p(e),u[G]({n:e,o:0,v:s}),o=!0)}return o},get:function(e){var t=``;if(!Xu(n,e)){if(Yu(h))t=s(e);else if(u)for(var r=u[Wa]-1;r>=0;r--){var i=u[r];if(i.n===e){if(i.o===0){var a=i.v,o=Ri(a,`;`);t=li(o===-1?a:$n(a,o))}break}}}return t},del:function(e,t){var n=!1;return Yu(h)?n=h.purge(e,t):u&&(p(e),u[G]({n:e,o:1,v:d(t)}),n=!0),n},purge:function(e,n){var r=!1;return td(t)&&(l(e,d(n)),r=!0),r},unload:function(e){a&&a.rm(),a=null,u=null}};return h[zu]=h,h}function td(e){if(Bu===null){Bu=!1,!Uu&&qu();try{Bu=(Uu.v||{})[Fu]!==void 0}catch(t){Y(e,2,68,`Cannot access document.cookie - `+nc(t),{exception:V(t)})}}return Bu}function nd(e){var t={};return e&&e.length&&U(li(e)[To](`;`),function(e){if(e=li(e||``),e){var n=Ri(e,`=`);n===-1?t[e]=null:t[li($n(e,n))]=li(Xn(e,n+1))}}),t}function rd(e,t){return z(e[t])?e[t]():null}function id(e,t){var n=e||``;return H(t,function(e,t){n+=`; `+e+(L(t)?``:`=`+t)}),n}function ad(e){var t=``;if(!Uu&&qu(),Uu.v){var n=Uu.v[Fu]||``;Hu!==n&&(Wu=nd(n),Hu=n),t=li(Wu[e]||``)}return t}function od(e,t){!Uu&&qu(),Uu.v&&(Uu.v[Fu]=e+`=`+t)}function sd(e){return R(e)?!!(ec(e,`CPU iPhone OS 12`)||ec(e,`iPad; CPU OS 12`)||ec(e,`Macintosh; Intel Mac OS X 10_14`)&&ec(e,`Version/`)&&ec(e,`Safari`)||ec(e,`Macintosh; Intel Mac OS X 10_14`)&&Ii(e,`AppleWebKit/605.1.15 (KHTML, like Gecko)`)||ec(e,`Chrome/5`)||ec(e,`Chrome/6`)||ec(e,`UnrealEngine`)&&!ec(e,`Chrome`)||ec(e,`UCBrowser/12`)||ec(e,`UCBrowser/11`)):!1}var cd={perfEvtsSendAll:!1};function ld(e){e.h=null;var t=e.cb;e.cb=[],U(t,function(e){Bt(e.fn,[e.arg])})}function ud(e,t,n,r){U(e,function(e){e&&e[t]&&(n?(n.cb[G]({fn:r,arg:e}),n.h=n.h||Yi(ld,0,n)):Bt(r,[e]))})}var dd=function(){function e(t){this.listeners=[];var n,r,i=[],a={h:null,cb:[]};r=Ql(t,cd)[qa](function(e){n=!!e.cfg.perfEvtsSendAll}),za(e,this,function(e){W(e,`listeners`,{g:function(){return i}}),e[to]=function(e){i[G](e)},e[eo]=function(e){for(var t=Xr(i,e);t>-1;)i[Ya](t,1),t=Xr(i,e)},e[Ps]=function(e){ud(i,Ps,a,function(t){t[Ps](e)})},e[Fs]=function(e,t,n){ud(i,Fs,a,function(r){r[Fs](e,t,n)})},e[Is]=function(e,t){ud(i,Is,t?a:null,function(n){n[Is](e,t)})},e[Ls]=function(e){e&&(n||!e.isChildEvt())&&ud(i,Ls,null,function(t){e.isAsync?Yi(function(){return t[Ls](e)},0):t[Ls](e)})},e[Rs]=function(e){e&&e.length&&ud(i,Rs,a,function(t){t[Rs](e)})},e[zs]=function(e){e&&e.data&&ud(i,zs,a,function(t){t[zs](e)})},e[Bs]=function(e,t){if(e>0){var n=t||0;ud(i,Bs,a,function(t){t[Bs](e,n)})}},e[uo]=function(e){var t=function(){r&&r.rm(),r=null,i=[],a.h&&a.h.cancel(),a.h=null,a.cb=[]},n;if(ud(i,`unload`,null,function(t){var r=t[uo](e);r&&(n||=[],n[G](r))}),n)return ws(function(e){return Ko(Ts(n),function(){t(),e()})});t()}})}return e.__ieDyn=1,e}(),fd=`ctx`,pd=`ParentContextKey`,md=`ChildrenContextKey`,hd=null,gd=function(){function e(t,n,r){var i=this;if(i.start=rr(),i[ao]=t,i.isAsync=r,i[No]=function(){return!1},z(n)){var a;W(i,`payload`,{g:function(){return!a&&z(n)&&(a=n(),n=null),a}})}i[Fo]=function(t){return t?t===e[pd]||t===e[md]?i[t]:(i[fd]||{})[t]:null},i[Io]=function(t,n){if(t)if(t===e[pd])i[t]||(i[No]=function(){return!0}),i[t]=n;else if(t===e[md])i[t]=n;else{var r=i[fd]=i[fd]||{};r[t]=n}},i.complete=function(){var t=0,n=i[Fo](e[md]);if(B(n))for(var r=0;r>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var i=e[8+(vl()&3)|0];return Zn(t,0,8)+Zn(t,9,4)+`4`+Zn(t,13,3)+i+Zn(t,16,3)+Zn(t,19,12)}var X=`00`,Sd=`ff`,Cd=`00000000000000000000000000000000`,wd=`0000000000000000`;function Td(e,t,n){return e&&e.length===t&&e!==n?!!e.match(/^[\da-f]*$/i):!1}function Ed(e,t,n){return Td(e,t)?e:n}function Dd(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[Wa]<2;)t=`0`+t;return t}function Od(e,t,n,r){return{version:Td(r,2,Sd)?r:X,traceId:kd(e)?e:xd(),spanId:Ad(t)?t:$n(xd(),16),traceFlags:n>=0&&n<=255?n:1}}function kd(e){return Td(e,32,Cd)}function Ad(e){return Td(e,16,wd)}function jd(e){if(e){var t=Dd(e[Bo]);Td(t,2)||(t=`01`);var n=e.version||X;return n!==`00`&&n!==`ff`&&(n=X),`${n.toLowerCase()}-${Ed(e.traceId,32,Cd).toLowerCase()}-${Ed(e.spanId,16,wd).toLowerCase()}-${t.toLowerCase()}`}return``}function Md(e){var t=e.getElementsByTagName(`script`),n=[];return U(t,function(e){var t=e[Vo](`src`);if(t){var r=e[Vo](`crossorigin`),i=e.hasAttribute(`async`)===!0,a=e.hasAttribute(`defer`)===!0,o=e[Vo](`referrerpolicy`),s={url:t};r&&(s.crossOrigin=r),i&&(s.async=i),a&&(s.defer=a),o&&(s.referrerPolicy=o),n[G](s)}}),n}var Nd=Dl(`plugin`);function Pd(e){return Nd.get(e,`state`,{},!0)}function Fd(e,t){for(var n=[],r=null,i=e[So](),a;i;){var o=i[io]();if(o){r&&r.setNextPlugin&&o.processTelemetry&&r[Co](o),a=Pd(o);var s=!!a[no];o.isInitialized&&(s=o[no]()),s||n[G](o),r=o,i=i[So]()}}U(n,function(n){var r=e[Ds]();n[Qa](e.getCfg(),r,t,e[So]()),a=Pd(n),!n.core&&!a.core&&(a[Ds]=r),a[no]=!0,delete a[go]})}function Id(e){return e.sort(function(e,t){var n=0;if(t){var r=t[Ms];e.processTelemetry?n=r?e[Ns]-t[Ns]:1:r&&(n=-1)}else n=e?1:-1;return n})}function Ld(e){var t={};return{getName:function(){return t[ao]},setName:function(n){e&&e.setName(n),t[ao]=n},getTraceId:function(){return t.traceId},setTraceId:function(n){e&&e.setTraceId(n),kd(n)&&(t.traceId=n)},getSpanId:function(){return t.spanId},setSpanId:function(n){e&&e.setSpanId(n),Ad(n)&&(t.spanId=n)},getTraceFlags:function(){return t[Bo]},setTraceFlags:function(n){e&&e.setTraceFlags(n),t[Bo]=n}}}var Rd=`TelemetryPluginChain`,zd=`_hasRun`,Bd=`_getTelCtx`,Vd=0;function Hd(e,t,n){for(;e;){if(e.getPlugin()===n)return e;e=e[So]()}return qd([n],t.config||{},t)}function Ud(e,t,n,r){var i=null,a=[];t||=Ql({},null,n[Xa]),r!==null&&(i=r?Hd(e,n,r):e);var o={_next:c,ctx:{core:function(){return n},diagLog:function(){return Eu(n,t.cfg)},getCfg:function(){return t.cfg},getExtCfg:u,getConfig:d,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(e){i=e},iterate:f,onComplete:s}};function s(e,t){var n=[...arguments].slice(2);e&&a[G]({func:e,self:Kt(t)?o.ctx:t,args:n})}function c(){var e=i;if(i=e?e[So]():null,!e){var t=a;t&&t.length>0&&(U(t,function(e){try{e.func.call(e.self,e.args)}catch(e){Y(n[Xa],2,73,`Unexpected Exception during onComplete - `+V(e))}}),a=[])}return e}function l(e,n){var r=null,i=t.cfg;if(i&&e){var a=i[As];!a&&n&&(a={}),i[As]=a,a=t.ref(i,As),a&&(r=a[e],!r&&n&&(r={}),a[e]=r,r=t.ref(a,e))}return r}function u(e,n){var r=l(e,!0);return n&&H(n,function(e,n){if(L(r[e])){var i=t.cfg[e];(i||!L(i))&&(r[e]=i)}jl(t,r,e,n)}),t.setDf(r,n)}function d(e,n,r){r===void 0&&(r=!1);var i,a=l(e,!1),o=t.cfg;return a&&(a[n]||!L(a[n]))?i=a[n]:(o[n]||!L(o[n]))&&(i=o[n]),i||!L(i)?i:r}function f(e){for(var t;t=o._next();){var n=t[io]();n&&e(n)}}return o}function Wd(e,t,n,r){var i=Ql(t),a=Ud(e,i,n,r),o=a.ctx;function s(e){var t=a._next();return t&&t[Ms](e,o),!t}function c(e,t){return e===void 0&&(e=null),B(e)&&(e=qd(e,i.cfg,n,t)),Wd(e||o.getNext(),i.cfg,n,t)}return o[oo]=s,o[ho]=c,o}function Gd(e,t,n){var r=Ql(t.config),i=Ud(e,r,t,n),a=i.ctx;function o(e){var t=i._next();return t&&t.unload(a,e),!t}function s(e,n){return e===void 0&&(e=null),B(e)&&(e=qd(e,r.cfg,t,n)),Gd(e||a.getNext(),t,n)}return a[oo]=o,a[ho]=s,a}function Kd(e,t,n){var r=Ql(t.config),i=Ud(e,r,t,n).ctx;function a(e){return i.iterate(function(t){z(t.update)&&t[xo](i,e)})}function o(e,n){return e===void 0&&(e=null),B(e)&&(e=qd(e,r.cfg,t,n)),Kd(e||i.getNext(),t,n)}return i[oo]=a,i[ho]=o,i}function qd(e,t,n,r){var i=null,a=!r;if(B(e)&&e.length>0){var o=null;U(e,function(e){if(!a&&r===e&&(a=!0),a&&e&&z(e.processTelemetry)){var s=Jd(e,t,n);i||=s,o&&o._setNext(s),o=s}})}return r&&!i?qd([r],t,n):i}function Jd(e,t,n){var r=null,i=z(e[Ms]),a=z(e[Co]),o=e?e[$a]+`-`+e[Ns]+`-`+ Vd++:`Unknown-0-`+ Vd++,s={getPlugin:function(){return e},getNext:function(){return r},processTelemetry:u,unload:d,update:f,_id:o,_setNext:function(e){r=e}};function c(){var r;return e&&z(e[Bd])&&(r=e[Bd]()),r||=Wd(s,t,n),r}function l(t,n,i,a,s){var c=!1,l=e?e[$a]:Rd,u=t[zd];return u||=t[zd]={},t.setNext(r),e&&yd(t[Ds](),function(){return l+`:`+i},function(){u[o]=!0;try{var e=r?r._id:``;e&&(u[e]=!1),c=n(t)}catch(e){var a=r?u[r._id]:!0;a&&(c=!0),(!r||!a)&&Y(t[yo](),1,73,`Plugin [`+l+`] failed during `+i+` - `+V(e)+`, run flags: `+V(u))}},a,s),c}function u(t,n){n||=c();function o(n){if(!e||!i)return!1;var o=Pd(e);return o.teardown||o.disabled?!1:(a&&e[Co](r),e[Ms](t,n),!0)}l(n,o,`processTelemetry`,function(){return{item:t}},!t.sync)||n[oo](t)}function d(t,n){function r(){var r=!1;if(e){var i=Pd(e),a=e.core||i.core;e&&(!a||a===t.core())&&!i.teardown&&(i[Ds]=null,i[go]=!0,i[no]=!1,e.teardown&&e.teardown(t,n)===!0&&(r=!0))}return r}l(t,r,`unload`,function(){},n.isAsync)||t[oo](n)}function f(t,n){function r(){var r=!1;if(e){var i=Pd(e),a=e.core||i.core;e&&(!a||a===t.core())&&!i.teardown&&e.update&&e.update(t,n)===!0&&(r=!0)}return r}l(t,r,`update`,function(){},!1)||t[oo](n)}return In(s)}(function(){function e(e,t,n,r){var i=this,a=Wd(e,t,n,r);cc(i,a,Nn(a))}return e})();function Yd(){var e=[];function t(t){t&&e[G](t)}function n(t,n){U(e,function(e){try{e(t,n)}catch(e){Y(t[yo](),2,73,`Unexpected error calling unload handler - `+V(e))}}),e=[]}return{add:t,run:n}}var Xd,Zd;function Qd(){var e=[];function t(t){var n=e;e=[],U(n,function(e){try{(e.rm||e.remove).call(e)}catch(e){Y(t,2,73,`Unloading:`+V(e))}}),Xd&&n.length>Xd&&(Zd?Zd(`doUnload`,n):Y(null,1,48,`Max unload hooks exceeded. An excessive number of unload hooks has been detected.`))}function n(t){t&&(Yr(e,t),Xd&&e.length>Xd&&(Zd?Zd(`Add`,e):Y(null,1,48,`Max unload hooks exceeded. An excessive number of unload hooks has been detected.`)))}return{run:t,add:n}}var $d,ef=`getPlugin`,tf=($d={},$d[As]={isVal:Qs,v:{}},$d),nf=function(){function e(){var t=this,n,r,i,a,o;l(),za(e,t,function(e){e[Qa]=function(e,t,r,i){c(e,t,i),n=!0},e[go]=function(t,n){var r=e[Ds];if(!r||t&&r!==t.core())return;var s,c=!1,u=t||Gd(null,r,i&&i[ef]?i[ef]():i),d=n||{reason:0,isAsync:!1};function f(){c||(c=!0,a.run(u,n),o.run(u[yo]()),s===!0&&u[oo](d),l())}return!e._doTeardown||e._doTeardown(u,d,f)!==!0?f():s=!0,s},e[xo]=function(t,n){var r=e[Ds];if(!r||t&&r!==t.core())return;var a,o=!1,s=t||Kd(null,r,i&&i[ef]?i[ef]():i),l=n||{reason:0};function u(){o||(o=!0,c(s.getCfg(),s.core(),s[So]()))}return!e._doUpdate||e._doUpdate(s,l,u)!==!0?u():a=!0,a},sc(e,`_addUnloadCb`,function(){return a},`add`),sc(e,`_addHook`,function(){return o},`add`),W(e,`_unloadHooks`,{g:function(){return o}})}),t[yo]=function(e){return s(e)[yo]()},t[no]=function(){return n},t.setInitialized=function(e){n=e},t[Co]=function(e){i=e},t[oo]=function(e,t){t?t[oo](e):i&&z(i.processTelemetry)&&i[Ms](e,null)},t._getTelCtx=s;function s(e){e===void 0&&(e=null);var n=e;if(!n){var a=r||Wd(null,{},t.core);n=i&&i[ef]?a[ho](null,i[ef]):a[ho](null,i)}return n}function c(e,n,a){Ql(e,tf,Eu(n)),!a&&n&&(a=n[K]()[So]());var o=i;i&&i[ef]&&(o=i[ef]()),t[Ds]=n,r=Wd(a,e,n,o)}function l(){n=!1,t[Ds]=null,r=null,i=null,o=Qd(),a=Yd()}}return e.__ieDyn=1,e}();function rf(e,t,n){var r={id:t,fn:n};return Yr(e,r),{remove:function(){U(e,function(t,n){if(t.id===r.id)return e[Ya](n,1),-1})}}}function af(e,t,n){for(var r=!1,i=e[Wa],a=0;a`}})}var wf=function(){function e(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,O,te,k,ne,A;za(e,this,function(e){oe(),e._getDbgPlgTargets=function(){return[C,i]},e[no]=function(){return n},e.activeStatus=function(){return E},e._setPendingStatus=function(){E=3},e[Qa]=function(i,o,s,c){p&&ln(uf),e.isInitialized()&&ln(`Core cannot be initialized more than once`),t=Ql(i,mf,s||e.logger,!1),i=t.cfg,_e(t[qa](function(e){var t=e.cfg;ee=t.initInMemoMaxSize||ff,re(t);var n=e.ref(e.cfg,As);H(n,function(t){e.ref(n,t)})})),a=c,y=Sf(t,v,a&&e.getNotifyMgr(),y),pe(),e[Xa]=s;var l=i[js];if(u=[],u[G].apply(u,ta(ta([],o,!1),l,!1)),d=i[Es],se(null),(!f||f.length===0)&&ln(`No `+Es+` available`),d&&d.length>1){var m=e[io](`TeeChannelController`);(!m||!m.plugin)&&Y(r,1,28,`TeeChannel required`)}xf(i,S,r),S=null,n=!0,E===Ha.ACTIVE&&ie()},e.getChannels=function(){var e=[];return f&&U(f,function(t){e[G](t)}),In(e)},e.track=function(t){yd(e[Vs](),function(){return`AppInsightsCore:track`},function(){t===null&&(ge(t),ln(`Invalid telemetry item`)),!t.name&&L(t.name)&&(ge(t),ln(`telemetry name required`)),t.iKey=t.iKey||x,t.time=t.time||tc(new Date),t.ver=t.ver||`4.0`,!p&&e.isInitialized()&&E===Ha.ACTIVE?P()[oo](t):E!==Ha.INACTIVE&&i.length<=ee&&i[G](t)},function(){return{item:t}},!t.sync)},e[K]=P,e[ro]=function(){return a||(a=new dd(t.cfg),e[lf]=a),a},e[to]=function(t){e.getNotifyMgr()[to](t)},e[eo]=function(e){a&&a[eo](e)},e.getCookieMgr=function(){return c||=ed(t.cfg,e[Xa]),c},e.setCookieMgr=function(e){c!==e&&(eu(c,!1),c=e)},e[Vs]=function(){return o||s||bd()},e.setPerfMgr=function(e){o=e},e.eventCnt=function(){return i[Wa]},e.releaseQueue=function(){if(n&&i.length>0){var e=i;i=[],E===2?U(e,function(e){e.iKey=e.iKey||x,P()[oo](e)}):Y(r,2,20,`core init status is not active`)}},e.pollInternalLogs=function(e){return h=e||null,A=!1,k&&k.cancel(),ae(!0)};function re(e){var t=e.instrumentationKey,i=e.endpointUrl;if(E!==3){if(L(t)){x=null,E=Ha.INACTIVE;var a=`Please provide instrumentation key`;n?(Y(r,1,100,a),ie()):ln(a);return}var o=[];nn(t)?(o[G](t),x=null):x=t,nn(i)?(o[G](i),D=null):D=i,o.length?j(e,o):M()}}function j(e,t){O=!1,E=3;var n=Qs(e.initTimeOut)?e.initTimeOut:pf,r=Ss(t);te&&te[Za](),te=Yi(function(){te=null,O||M()},n),Ko(r,function(t){try{if(O)return;if(!t.rejected){var n=t[so];if(n&&n.length){var r=n[0];if(x=r&&r.value,n.length>1){var i=n[1];D=i&&i.value}}x&&(e.instrumentationKey=x,e.endpointUrl=D)}M()}catch{O||M()}})}function M(){O=!0,L(x)?(E=Ha.INACTIVE,Y(r,1,112,`ikey can't be resolved from promises`)):E=Ha.ACTIVE,ie()}function ie(){n&&(e.releaseQueue(),e.pollInternalLogs())}function ae(e){return(!k||!k.enabled)&&!A&&(e||r&&r.queue.length>0)&&(ne||(ne=!0,_e(t[qa](function(e){var t=e.cfg.diagnosticLogInterval;(!t||!(t>0))&&(t=1e4);var n=!1;k&&(n=k[co],k[Za]()),k=Xi(de,t),k.unref(),k[co]=n}))),k[co]=!0),k}e[lo]=function(){A=!0,k&&k.cancel(),de()},cc(e,function(){return m},[`addTelemetryInitializer`]),e[uo]=function(t,i,o){t===void 0&&(t=!0),n||ln(df),p&&ln(uf);var s={reason:50,isAsync:t,flushComplete:!1},l;t&&!i&&(l=ws(function(e){i=e}));var u=Gd(le(),e);u[fo](function(){v.run(e[Xa]),tu([c,a,r],t,function(){oe(),i&&i(s)})},e);function d(t){s.flushComplete=t,p=!0,_.run(u,s),e[lo](),u[oo](s)}return de(),fe(t,d,6,o)||d(!1),l},e[io]=ce,e.addPlugin=function(e,t,n,r){if(!e){r&&r(!1),he(cf);return}var i=ce(e[$a]);if(i&&!t){r&&r(!1),he(`Plugin [`+e[$a]+`] is already loaded!`);return}var a={reason:16};function o(t){u[G](e),a.added=[e],se(a),r&&r(!0)}if(i){var s=[i.plugin];ue(s,{reason:2,isAsync:!!n},function(e){e?(a.removed=s,a.reason|=32,o(!0)):r&&r(!1)})}else o(!1)},e.updateCfg=function(n,r){r===void 0&&(r=!0);var i;if(e.isInitialized()){i={reason:1,cfg:t.cfg,oldCfg:Di({},t.cfg),newConfig:Di({},n),merge:r},n=i.newConfig;var a=t.cfg;n[js]=a[js],n[Es]=a[Es]}t._block(function(e){var t=e.cfg;vf(e,t,n,r),r||H(t,function(r){hn(n,r)||e.set(t,r,void 0)}),e.setDf(t,mf)},!0),t.notify(),i&&me(i)},e.evtNamespace=function(){return g},e.flush=fe,e.getTraceCtx=function(e){return b||=Ld(),b},e.setTraceCtx=function(e){b=e||null},e.addUnloadHook=_e,sc(e,`addUnloadCb`,function(){return _},`add`),e.onCfgChange=function(r){return Cf(n?$l(t.cfg,r,e[Xa]):bf(S,r))},e.getWParam=function(){return Er()||t.cfg.enableWParam?0:-1};function N(){var e={};w=[];var t=function(t){t&&U(t,function(t){if(t.identifier&&t.version&&!e[t.identifier]){var n=t[$a]+`=`+t[po];w[G](n),e[t.identifier]=t}})};t(f),d&&U(d,function(e){t(e)}),t(u)}function oe(){n=!1,t=Ql({},mf,e[Xa]),t.cfg[mo]=1,W(e,`config`,{g:function(){return t.cfg},s:function(t){e.updateCfg(t,!1)}}),W(e,`pluginVersionStringArr`,{g:function(){return w||N(),w}}),W(e,`pluginVersionString`,{g:function(){return T||=(w||N(),w.join(`;`)),T||``}}),W(e,`logger`,{g:function(){return r||(r=new Du(t.cfg),t[Xa]=r),r},s:function(e){t[Xa]=e,r!==e&&(eu(r,!1),r=e)}}),e[Xa]=new Du(t.cfg),C=[];var y=e.config.extensions||[];y.splice(0,y[Wa]),Yr(y,C),m=new of,i=[],eu(a,!1),a=null,o=null,s=null,eu(c,!1),c=null,l=null,u=[],d=null,f=null,p=!1,h=null,g=El(`AIBaseCore`,!0),_=Yd(),b=null,x=null,v=Qd(),S=[],T=null,w=null,A=!1,k=null,ne=!1,E=0,D=null,ee=null,O=!1,te=null}function P(){var n=Wd(le(),t.cfg,e);return n[fo](ae),n}function se(t){var n=gf(e[Xa],500,u);l=null,T=null,w=null,f=(d||[])[0]||[],f=Id(Yr(f,n[Es]));var r=Yr(Id(n[Ds]),f);C=In(r);var i=e.config.extensions||[];i.splice(0,i[Wa]),Yr(i,C);var a=P();f&&f.length>0&&Fd(a[ho](f),r),Fd(a,r),t&&me(t)}function ce(e){var t=null,n=null,r=[];return U(C,function(t){if(t.identifier===e&&t!==m)return n=t,-1;t.getChannel&&r[G](t)}),!n&&r.length>0&&U(r,function(t){if(n=t.getChannel(e),!n)return-1}),n&&(t={plugin:n,setEnabled:function(e){Pd(n)[ks]=!e},isEnabled:function(){var e=Pd(n);return!e.teardown&&!e.disabled},remove:function(e,t){e===void 0&&(e=!0);var r=[n];ue(r,{reason:1,isAsync:e},function(e){e&&se({reason:32,removed:r}),t&&t(e)})}}),t}function le(){if(!l){var n=(C||[]).slice();Xr(n,m)===-1&&n[G](m),l=qd(Id(n),t.cfg,e)}return l}function ue(n,r,i){if(n&&n.length>0){var a=Gd(qd(n,t.cfg,e),e);a[fo](function(){var e=!1,t=[];U(u,function(r,i){_f(r,n)?e=!0:t[G](r)}),u=t,T=null,w=null;var r=[];d&&=(U(d,function(t,i){var a=[];U(t,function(t){_f(t,n)?e=!0:a[G](t)}),r[G](a)}),r),i&&i(e),ae()}),a[oo](r)}else i(!1)}function de(){if(r&&r.queue){var t=r.queue.slice(0);r.queue[Wa]=0,U(t,function(t){var n={name:h||`InternalMessageId: `+t[_o],iKey:x,time:tc(new Date),baseType:Tu.dataType,baseData:{message:t[vo]}};e.track(n)})}}function fe(e,t,n,r){var i=1,a=!1,o=null;r||=5e3;function s(){i--,a&&i===0&&(o&&o.cancel(),o=null,t&&t(a),t=null)}return f&&f.length>0&&P()[ho](f).iterate(function(t){if(t.flush){i++;var a=!1;t.flush(e,function(){a=!0,s()},n)||a||(e&&o==null?o=Yi(function(){o=null,s()},r):s())}}),a=!0,s(),!0}function pe(){var n;_e(t[qa](function(t){if(t.cfg.enablePerfMgr){var r=t.cfg[Os];(n!==r||!n)&&(r||=hf,ic(t.cfg,Os,r),n=r,s=null),!o&&!s&&z(r)&&(s=r(e,e[ro]()))}else s=null,n=null}))}function me(t){var n=Kd(le(),e);n[fo](ae),(!e._updateHook||e._updateHook(n,t)!==!0)&&n[oo](t)}function he(t){var n=e[Xa];n?(Y(n,2,73,t),ae()):ln(t)}function ge(t){var n=e[ro]();n&&n[Fs]([t],2)}function _e(e){v.add(e)}})}return e.__ieDyn=1,e}();function Tf(e,t){try{if(e&&e!==``){var n=Kc().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){Y(t,1,43,`Cannot parse the response. `+(n.name||V(n)),{response:e})}return null}var Ef=``,Df=`&NoResponseBody=true`,Of=`POST`,kf=function(){function e(){var t=0,n,r,i,a,o,s,c,l,u,d,f,p,m,h;za(e,this,function(e,g){var _=!0;ee(),e[Qa]=function(t,n){i=n,r&&Y(i,1,28,`Sender is already initialized`),e.SetConfig(t),r=!0},e._getDbgPlgTargets=function(){return[r,a,s,n]},e.SetConfig=function(e){try{if(o=e.senderOnCompleteCallBack||{},s=!!e.disableCredentials,c=e.fetchCredentials,a=!!e.isOneDs,n=!!e.enableSendPromise,u=!!e.disableXhr,d=!!e.disableBeacon,f=!!e.disableBeaconSync,h=e.timeWrapper,m=!!e.addNoResponse,p=!!e.disableFetchKeepAlive,l={sendPOST:T},a||(_=!1),s){var t=Uc();t&&t.protocol&&t.protocol.toLowerCase()===`file:`&&(_=!1)}return!0}catch{}return!1},e.getSyncFetchPayload=function(){return t},e.getSenderInst=function(e,t){return e&&e.length?x(e,t):null},e.getFallbackInst=function(){return l},e[bo]=function(e,t){ee()},e.preparePayload=function(e,t,n,r){if(!t||r||!n.data){e(n);return}try{var i=Tr(`CompressionStream`);if(!z(i)){e(n);return}var a=new ReadableStream({start:function(e){e.enqueue(R(n.data)?new TextEncoder().encode(n[Po]):n[Po]),e.close()}}).pipeThrough(new i(`gzip`)).getReader(),o=[],s=0,c=!1;return Ko(a.read(),function t(r){if(!c&&!r.rejected){var i=r[so];if(!i.done)return o[G](i[so]),s+=i.value[Wa],Ko(a.read(),t);for(var l=new Uint8Array(s),u=0,d=0,f=o;d0&&(U(Nn(w),function(e){v.append(e,w[e])}),T[Lo]=v),c?T.credentials=c:_&&a&&(T.credentials=`include`),i&&(T.keepalive=!0,t+=y,a?e._sendReason===2&&(x=!0,m&&(l+=Df)):x=!0);var E=new Request(l,T);try{E[nu]=!0}catch{}if(!i&&n&&(f=ws(function(e,t){p=e,g=t})),!l){b(r),p&&p(!1);return}function D(e,t){t?S(r,a?0:t,{},a?Ef:e):S(r,a?0:400,{},a?Ef:e)}function ee(e,t,n){var i=e[jo],a=o.fetchOnComplete;a&&z(a)?a(e,r,n||Ef,t):S(r,i,{},n||Ef)}try{Ko(fetch(a?l:E,a?T:null),function(n){if(i&&(t-=y,y=0),!C)if(C=!0,n.rejected)D(n.reason&&n.reason.message,499),g&&g(n.reason);else{var r=n[so];try{!a&&!r.ok?(r.status?D(r.statusText,r[jo]):D(r.statusText,499),p&&p(!1)):a&&!r.body?(ee(r,null,Ef),p&&p(!0)):Ko(r.text(),function(t){ee(r,e,t[so]),p&&p(!0)})}catch(e){r&&r.status?D(V(e),r[jo]):D(V(e),499),g&&g(e)}}})}catch(e){C||(D(V(e),499),g&&g(e))}return x&&!C&&(C=!0,S(r,200,{}),p&&p(!0)),a&&!C&&e.timeout>0&&h&&h.set(function(){C||(C=!0,S(r,500,{}),p&&p(!0))},e.timeout),f}function D(e,t,n){var r=kr(),s=new XDomainRequest,c=e[Po];s.onload=function(){var n=pc(s),r=o&&o.xdrOnComplete;r&&z(r)?r(s,t,e):S(t,200,{},n)},s.onerror=function(){S(t,400,{},a?Ef:mc(s))},s.ontimeout=function(){S(t,500,{})},s.onprogress=function(){};var l=r&&r.location&&r.location.protocol||``,u=e[Ro];if(!u){b(t);return}if(!a&&u.lastIndexOf(l,0)!==0){var d=`Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.`;Y(i,2,40,`. `+d),y(d,t);return}var f=a?u:u[Eo](/^(https?:)/,``);s.open(Of,f),e.timeout&&(s[zo]=e[zo]),s.send(c),a&&n?h&&h.set(function(){s.send(c)},0):s.send(c)}function ee(){t=0,r=!1,n=!1,i=null,a=null,o=null,s=null,c=null,l=null,u=!1,d=!1,f=!1,p=!1,m=!1,h=null}})}return e.__ieDyn=1,e}(),Af=`on`,jf=`attachEvent`,Mf=`addEventListener`,Nf=`detachEvent`,Pf=`removeEventListener`,Ff=`events`,If=`visibilitychange`,Lf=`pagehide`,Rf=`unload`,zf=`beforeunload`,Bf=El(`aiEvtPageHide`);El(`aiEvtPageShow`);var Vf=/\.[\.]+/g,Hf=/[\.]+$/,Uf=1,Wf=Dl(`events`),Gf=/^([^.]*)(?:\.(.+)|)/;function Kf(e){return e&&e.replace?e[Eo](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,``):e}function qf(e,t){if(t){var n=``;B(t)?(n=``,U(t,function(e){e=Kf(e),e&&(e[0]!==`.`&&(e=`.`+e),n+=e)})):n=Kf(t),n&&(n[0]!==`.`&&(n=`.`+n),e=(e||``)+n)}var r=Gf.exec(e||``)||[];return{type:r[1],ns:(r[2]||``).replace(Vf,`.`).replace(Hf,``)[To](`.`).sort().join(`.`)}}function Jf(e,t,n){n===void 0&&(n=!0);var r=Wf.get(e,Ff,{},n),i=r[t];return i||=r[t]=[],i}function Yf(e,t,n,r){e&&t&&t.type&&(e[Pf]?e[Pf](t[ko],n,r):e[Nf]&&e[Nf](Af+t[ko],n))}function Xf(e,t,n,r){var i=!1;return e&&t&&t.type&&n&&(e[Mf]?(e[Mf](t[ko],n,r),i=!0):e[jf]&&(e[jf](Af+t[ko],n),i=!0)),i}function Zf(e,t,n,r){for(var i=t[Wa];i--;){var a=t[i];a&&(!n.ns||n.ns===a.evtName.ns)&&(!r||r(a))&&(Yf(e,a[Ao],a.handler,a.capture),t[Ya](i,1))}}function Qf(e,t,n){if(t.type)Zf(e,Jf(e,t[ko]),t,n);else{var r=Wf.get(e,Ff,{});H(r,function(r,i){Zf(e,i,t,n)}),Nn(r).length===0&&Wf.kill(e,Ff)}}function $f(e,t){var n;return t?(n=B(t)?[e].concat(t):[e,t],n=qf(`xx`,n).ns[To](`.`)):n=e,n}function ep(e,t,n,r,i){i===void 0&&(i=!1);var a=!1;if(e)try{var o=qf(t,r);if(a=Xf(e,o,n,i),a&&Wf.accept(e)){var s={guid:Uf++,evtName:o,handler:n,capture:i};Jf(e,o.type)[G](s)}}catch{}return a}function tp(e,t,n,r,i){if(i===void 0&&(i=!1),e)try{var a=qf(t,r),o=!1;Qf(e,a,function(e){return a.ns&&!n||e.handler===n?(o=!0,!0):!1}),o||Yf(e,a,n,i)}catch{}}function np(e,t,n){var r=!1,i=kr();i&&(r=ep(i,e,t,n),r=ep(i.body,e,t,n)||r);var a=Dr();return a&&(r=ep(a,e,t,n)||r),r}function rp(e,t,n){var r=kr();r&&(tp(r,e,t,n),tp(r.body,e,t,n));var i=Dr();i&&tp(i,e,t,n)}function ip(e,t,n,r){var i=!1;return t&&e&&e.length>0&&U(e,function(e){e&&(!n||Xr(n,e)===-1)&&(i=np(e,t,r)||i)}),i}function ap(e,t,n,r){var i=!1;return t&&e&&B(e)&&(i=ip(e,t,n,r),!i&&n&&n.length>0&&(i=ip(e,t,null,r))),i}function op(e,t,n){e&&B(e)&&U(e,function(e){e&&rp(e,t,n)})}function sp(e,t,n){return ap([zf,Rf,Lf],e,t,n)}function cp(e,t){op([zf,Rf,Lf],e,t)}function lp(e,t,n){function r(t){var n=Dr();e&&n&&n.visibilityState===`hidden`&&e(t)}var i=$f(Bf,n),a=ip([Lf],e,t,i);return(!t||Xr(t,If)===-1)&&(a=ip([If],r,t,i)||a),!a&&t&&(a=lp(e,null,n)),a}function up(e,t){var n=$f(Bf,t);op([Lf],e,n),op([If],null,n)}var dp=`_aiHooks`,fp=[`req`,`rsp`,`hkErr`,`fnErr`];function pp(e,t){if(e)for(var n=0;n=0&&i<=2&&pp(e,function(e,a){var o=e.cbks,s=o[fp[i]];if(s){t.ctx=function(){return r[a]=r[a]||{}};try{s[Ja](t.inst,n)}catch(e){var c=t.err;try{var l=o[fp[2]];l&&(t.err=e,l[Ja](t.inst,n))}catch{}finally{t.err=c}}}})}function hp(e){return function(){var t=this,n=arguments,r=e.h,i={name:e.n,inst:t,ctx:null,set:c},a=[],o=s([i],n);i.evt=Tr(`event`);function s(e,t){return pp(t,function(t){e[G](t)}),e}function c(e,t){n=s([],n),n[e]=t,o=s([i],n)}mp(r,i,o,a,0);var l=e.f;if(l)try{i.rslt=l[Ja](t,n)}catch(e){throw i.err=e,mp(r,i,o,a,3),e}return mp(r,i,o,a,1),i.rslt}}function gp(e,t,n,r){var i=null;return e&&(pn(e,t)?i=e:n&&(i=gp(Zs(e),t,r,!1))),i}function _p(e,t,n){return e?yp(e[ut],t,n,!1):null}function vp(e,t,n,r){var i=n&&n[dp];if(!i){i={i:0,n:t,f:n,h:[]};var a=hp(i);a[dp]=i,e[t]=a}var o={id:i.i,cbks:r,rm:function(){var e=this.id;pp(i.h,function(t,n){if(t.id===e)return i.h[Ya](n,1),1})}};return i.i++,i.h[G](o),o}function yp(e,t,n,r,i){if(r===void 0&&(r=!0),e&&t&&n){var a=gp(e,t,r,i);if(a){var o=a[t];if(typeof o==`function`)return vp(a,t,o,n)}}return null}function bp(e,t,n,r,i){if(e&&t&&n){var a=gp(e,t,r,i)||e;if(a)return vp(a,t,a[t],n)}return null}var xp=`Microsoft_ApplicationInsights_BypassAjaxInstrumentation`,Sp=`sampleRate`,Cp=`ProcessLegacy`,wp=`http.method`,Tp=`https://dc.services.visualstudio.com`,Ep=`/v2/track`,Dp=`iKey`,Op=Va({requestContextHeader:[0,`Request-Context`],requestContextTargetKey:[1,`appId`],requestContextAppIdFormat:[2,`appId=cid-v1:`],requestIdHeader:[3,`Request-Id`],traceParentHeader:[4,`traceparent`],traceStateHeader:[5,`tracestate`],sdkContextHeader:[6,`Sdk-Context`],sdkContextHeaderAppIdRequest:[7,`appId`],requestContextHeaderLowerCase:[8,`request-context`]}),kp=`split`,Ap=`length`,jp=`toLowerCase`,Mp=`ingestionendpoint`,Np=`toString`,Pp=`removeItem`,Fp=`message`,Ip=`count`,Lp=`preTriggerDate`,Rp=`getUTCDate`,zp=`stringify`,Bp=`pathname`,Vp=`match`,Hp=`name`,Up=`properties`,Wp=`measurements`,Gp=`sizeInBytes`,Kp=`typeName`,qp=`exceptions`,Jp=`severityLevel`,Yp=`problemGroup`,Xp=`hasFullStack`,Zp=`assembly`,Qp=`fileName`,$p=`line`,em=`aiDataContract`,tm=`duration`;function nm(e,t,n){var r=t[Ap],i=rm(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==void 0;)a++,o=Xn(i,0,147)+fm(a);i=o}return i}function rm(e,t){var n;return t&&(t=li(sn(t)),t.length>150&&(n=Xn(t,0,150),Y(e,2,57,`name is too long. It has been truncated to 150 characters.`,{name:t},!0))),n||t}function im(e,t,n){n===void 0&&(n=1024);var r;return t&&(n||=1024,t=li(sn(t)),t.length>n&&(r=Xn(t,0,n),Y(e,2,61,`string value is too long. It has been truncated to `+n+` characters.`,{value:t},!0))),r||t}function am(e,t,n){return R(t)&&(t=sl(t,n)),dm(e,t,2048,66)}function om(e,t){var n;return t&&t.length>32768&&(n=Xn(t,0,32768),Y(e,2,56,`message is too long, it has been truncated to 32768 characters.`,{message:t},!0)),n||t}function sm(e,t){var n;if(t){var r=``+t;r.length>32768&&(n=Xn(r,0,32768),Y(e,2,52,`exception is too long, it has been truncated to 32768 characters.`,{exception:t},!0))}return n||t}function cm(e,t){if(t){var n={};H(t,function(t,r){if(Zt(r)&&Gc())try{r=Kc()[zp](r)}catch(t){Y(e,2,49,`custom property is not valid`,{exception:t},!0)}r=im(e,r,8192),t=nm(e,t,n),n[t]=r}),t=n}return t}function lm(e,t){if(t){var n={};H(t,function(t,r){t=nm(e,t,n),n[t]=r}),t=n}return t}function um(e,t){return t&&dm(e,t,128,69)[Np]()}function dm(e,t,n,r){var i;return t&&(t=li(sn(t)),t.length>n&&(i=Xn(t,0,n),Y(e,2,r,`input is too long, it has been truncated to `+n+` characters.`,{data:t},!0))),i||t}function fm(e){var t=`00`+e;return Zn(t,t[Ap]-3)}var pm=Dr()||{},mm=0,hm=[null,null,null,null,null];function gm(e){var t=mm,n=hm,r=n[t];return pm.createElement?n[t]||(r=n[t]=pm.createElement(`a`)):r={host:ym(e,!0)},r.href=e,t++,t>=n.length&&(t=0),mm=t,r}function _m(e){var t,n=gm(e);return n&&(t=n.href),t}function vm(e,t){return e?e.toUpperCase()+` `+t:t}function ym(e,t){var n=bm(e,t)||``;if(n){var r=n[Vp](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r.length>3&&R(r[2])&&r[2].length>0)return r[2]+(r[3]||``)}return n}function bm(e,t){var n=null;if(e){var r=e[Vp](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r.length>2&&R(r[2])&&r[2].length>0&&(n=r[2]||``,t&&r.length>2)){var i=(r[1]||``)[jp](),a=r[3]||``;(i===`http`&&a===`:80`||i===`https`&&a===`:443`)&&(a=``),n+=a}}return n}var xm=[Tp+Ep,`https://breeze.aimon.applicationinsights.io`+Ep,`https://dc-int.services.visualstudio.com`+Ep],Sm=`cid-v1:`;function Cm(e){return Xr(xm,e[jp]())!==-1}function wm(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns){for(var r=0;r0}function Tm(e){if(e){var t=Em(e,Op[1]);if(t&&t!==Sm)return t}}function Em(e,t){if(e)for(var n=e[kp](`,`),r=0;r0){var s=gm(t);if(i=s.host,!a)if(s.pathname!=null){var c=s.pathname.length===0?`/`:s[Bp];c.charAt(0)!==`/`&&(c=`/`+c),o=s[Bp],a=im(e,n?n+` `+c:c)}else a=im(e,t)}else i=r,a=r;return{target:i,name:a,data:o}}function Om(){var e=Ni();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0)return t}return rr()}function km(e,t){var n=null;return e!==0&&t!==0&&!L(e)&&!L(t)&&(n=t-e),n}function Am(e,t){var n=e||{};return{getName:function(){return n[Hp]},setName:function(e){t&&t.setName(e),n[Hp]=e},getTraceId:function(){return n.traceID},setTraceId:function(e){t&&t.setTraceId(e),kd(e)&&(n.traceID=e)},getSpanId:function(){return n.parentID},setSpanId:function(e){t&&t.setSpanId(e),Ad(e)&&(n.parentID=e)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(e){t&&t.setTraceFlags(e),n.traceFlags=e}}}var jm=Ba({LocalStorage:0,SessionStorage:1}),Mm=void 0,Nm=void 0,Pm=``;function Fm(){return Vm()?Im(jm.LocalStorage):null}function Im(e){try{if(L(wr()))return null;var t=new Date()[Np](),n=Tr(e===jm.LocalStorage?`localStorage`:`sessionStorage`),r=Pm+t;n.setItem(r,t);var i=n.getItem(r)!==t;if(n[Pp](r),!i)return n}catch{}return null}function Lm(){return Gm()?Im(jm.SessionStorage):null}function Rm(){Mm=!1,Nm=!1}function zm(e){Pm=e||``}function Bm(){Mm=Vm(!0),Nm=Gm(!0)}function Vm(e){return(e||Mm===void 0)&&(Mm=!!Im(jm.LocalStorage)),Mm}function Hm(e,t){var n=Fm();if(n!==null)try{return n.getItem(t)}catch(t){Mm=!1,Y(e,2,1,`Browser failed read of local storage. `+nc(t),{exception:V(t)})}return null}function Um(e,t,n){var r=Fm();if(r!==null)try{return r.setItem(t,n),!0}catch(t){Mm=!1,Y(e,2,3,`Browser failed write to local storage. `+nc(t),{exception:V(t)})}return!1}function Wm(e,t){var n=Fm();if(n!==null)try{return n[Pp](t),!0}catch(t){Mm=!1,Y(e,2,5,`Browser failed removal of local storage item. `+nc(t),{exception:V(t)})}return!1}function Gm(e){return(e||Nm===void 0)&&(Nm=!!Im(jm.SessionStorage)),Nm}function Km(e,t){var n=Lm();if(n!==null)try{return n.getItem(t)}catch(t){Nm=!1,Y(e,2,2,`Browser failed read of session storage. `+nc(t),{exception:V(t)})}return null}function qm(e,t,n){var r=Lm();if(r!==null)try{return r.setItem(t,n),!0}catch(t){Nm=!1,Y(e,2,4,`Browser failed write to session storage. `+nc(t),{exception:V(t)})}return!1}function Jm(e,t){var n=Lm();if(n!==null)try{return n[Pp](t),!0}catch(t){Nm=!1,Y(e,2,6,`Browser failed removal of session storage item. `+nc(t),{exception:V(t)})}return!1}var Ym=`appInsightsThrottle`,Xm=function(){function e(e,t){var n=this,r,i,a,o,s,c,l,u=!1,d=!1;p(),n._getDbgPlgTargets=function(){return[l]},n.getConfig=function(){return a},n.canThrottle=function(e){var t=E(e);return _(m(e),r,t)},n.isTriggered=function(e){return D(e)},n.isReady=function(){return u},n.flush=function(e){try{var t=ee(e);if(t&&t.length>0){var n=t.slice(0);return l[e]=[],U(n,function(e){f(e.msgID,e[Fp],e.severity,!1)}),!0}}catch{}return!1},n.flushAll=function(){try{if(l){var e=!0;return H(l,function(t){var r=n.flush(parseInt(t));e&&=r}),e}}catch{}return!1},n.onReadyState=function(e,t){return t===void 0&&(t=!0),u=L(e)?!0:e,u&&t?n.flushAll():null},n.sendMessage=function(e,t,n){return f(e,t,n,!0)};function f(e,t,n,a){if(u){if(!T(e))return;var o=m(e),c=E(e),l=_(o,r,c),d=!1,f=0,p=D(e);try{l&&!p?(f=qn(o.limit.maxSendNumber,c[Ip]+1),c[Ip]=0,d=!0,s[e]=!0,c[Lp]=new Date):(s[e]=l,c[Ip]+=1);var h=v(e);S(i,h,c);for(var g=0;g0,r.interval=g(i),r.limit={samplingRate:n.limit?.samplingRate||100,maxSendNumber:n.limit?.maxSendNumber||1},a[e]=r}catch{}}function g(e){e||={};var t=e?.monthInterval,n=e?.dayInterval;return L(t)&&L(n)&&(e.monthInterval=3,d||=(e.daysOfMonth=[28],!0)),e={monthInterval:e?.monthInterval,dayInterval:e?.dayInterval,daysOfMonth:e?.daysOfMonth},e}function _(e,t,n){if(e&&!e.disabled&&t&&Qs(n)){var r=x(),i=n.date,a=e.interval,o=1;if(a?.monthInterval){var s=(r.getUTCFullYear()-i.getUTCFullYear())*12+r.getUTCMonth()-i.getUTCMonth();o=C(a.monthInterval,0,s)}var c=1;if(d)c=Xr(a.daysOfMonth,r[Rp]());else if(a?.dayInterval){var l=ui((r.getTime()-i.getTime())/864e5);c=C(a.dayInterval,0,l)}return o>=0&&c>=0}return!1}function v(e,t){var n=Qs(t)?t:``;return e?Ym+n+`-`+e:null}function y(e){try{if(e){var t=new Date;return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}}catch{}return!1}function b(e,t,n){try{var r={date:x(),count:0};if(e){var i=JSON.parse(e);return{date:x(i.date)||r.date,count:i.count||r.count,preTriggerDate:i.preTriggerDate?x(i[Lp]):void 0}}else return S(t,n,r),r}catch{}return null}function x(e){try{if(e){var t=new Date(e);if(!isNaN(t.getDate()))return t}else return new Date}catch{}return null}function S(e,t,n){try{return Um(e,t,li(JSON[zp](n)))}catch{}return!1}function C(e,t,n){return e<=0?1:n>=t&&(n-t)%e==0?ui((n-t)/e)+1:-1}function w(e,t,n,r){Y(t,r||1,e,n)}function T(e){try{var t=m(e);return _l(1e6)<=t.limit.samplingRate}catch{}return!1}function E(e){try{var t=o[e];if(!t){var n=v(e,c);t=b(Hm(i,n),i,n),o[e]=t}return o[e]}catch{}return null}function D(e){var t=s[e];if(L(t)){t=!1;var n=E(e);n&&(t=y(n[Lp])),s[e]=t}return s[e]}function ee(e){return l||={},L(l[e])&&(l[e]=[]),l[e]}}return e}(),Zm=`;`,Qm=`=`;function $m(e){if(!e)return{};var t=$r(e[kp](Zm),function(e,t){var n=t[kp](Qm);if(n.length===2){var r=n[0][jp]();e[r]=n[1]}return e},{});if(Nn(t).length>0){if(t.endpointsuffix){var n=t.location?t.location+`.`:``;t[Mp]=t.ingestionendpoint||`https://`+n+`dc.`+t.endpointsuffix}t[Mp]=t.ingestionendpoint||`https://dc.services.visualstudio.com`,Ii(t.ingestionendpoint,`/`)&&(t[Mp]=t[Mp].slice(0,-1))}return t}var eh=function(){function e(e,t,n){var r=this,i=this;i.ver=1,i.sampleRate=100,i.tags={},i[Hp]=im(e,n)||`not_specified`,i.data=t,i.time=tc(new Date),i[em]={time:1,iKey:1,name:1,sampleRate:function(){return r.sampleRate===100?4:1},tags:1,data:1}}return e}(),th=function(){function e(e,t,n,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var i=this;i.ver=2,i[Hp]=im(e,t)||`not_specified`,i[Up]=cm(e,n),i[Wp]=lm(e,r)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Event`,e.dataType=`EventData`,e}(),nh=58,rh=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,ih=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,ah=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,oh=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,sh=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,ch=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,lh=/([^\(\s\n]+):([0-9]+)$/,uh=``,dh=`error`,fh=`stack`,ph=`stackDetails`,mh=`errorSrc`,hh=`message`,gh=`description`,_h=[{re:ih,len:5,m:1,fn:2,ln:3,col:4},{chk:yh,pre:vh,re:ah,len:4,m:1,fn:2,ln:3},{re:oh,len:3,m:1,fn:2,hdl:Rh},{re:sh,len:2,fn:1,hdl:Rh}];function vh(e){return e.replace(/(\(anonymous\))/,``)}function yh(e){return Ri(e,`[native`)<0}function bh(e,t){var n=e;return n&&!R(n)&&(JSON&&JSON.stringify?(n=JSON[zp](e),t&&(!n||n===`{}`)&&(n=z(e.toString)?e[Np]():``+e)):n=``+e+` - (Missing JSON.stringify)`),n||``}function xh(e,t){var n=e;return e&&(n&&!R(n)&&(n=e[hh]||e[gh]||n),n&&!R(n)&&(n=bh(n,!0)),e.filename&&(n=n+` @`+(e.filename||``)+`:`+(e.lineno||`?`)+`:`+(e.colno||`?`))),t&&t!==`String`&&t!==`Object`&&t!==`Error`&&Ri(n||``,t)===-1&&(n=t+`: `+n),n||``}function Sh(e){try{if(Zt(e))return`hasFullStack`in e&&`typeName`in e}catch{}return!1}function Ch(e){try{if(Zt(e))return`ver`in e&&`exceptions`in e&&`properties`in e}catch{}return!1}function wh(e){return e&&e.src&&R(e.src)&&e.obj&&B(e.obj)}function Th(e){var t=e||``;R(t)||(t=R(t[fh])?t[fh]:``+t);var n=t[kp](` +`);return{src:t,obj:n}}function Eh(e){for(var t=[],n=e[kp](` +`),r=0;r0){t=[];var r=0,i=!1,a=0;U(n,function(e){if(i||zh(e)){var n=sn(e);i=!0;var o=Vh(n,r);o&&(a+=o[Gp],t.push(o),r++)}});var o=32*1024;if(a>o)for(var s=0,c=t[Ap]-1,l=0,u=s,d=c;so){var m=d-u+1;t.splice(u,m);break}u=s,d=c,s++,c--}}return t}function Ah(e){var t=``;if(e&&(t=e.typeName||e.name||``,!t))try{var n=/function (.{1,200})\(/.exec(e.constructor[Np]());t=n&&n.length>1?n[1]:``}catch{}return t}function jh(e){if(e)try{if(!R(e)){var t=Ah(e),n=bh(e,!1);return(!n||n===`{}`)&&(e[dh]&&(e=e[dh],t=Ah(e)),n=bh(e,!0)),Ri(n,t)!==0&&t!==`String`?t+`:`+n:n}}catch{}return``+(e||``)}var Mh=function(){function e(e,t,n,r,i,a){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var o=this;o.ver=2,Ch(t)?(o[qp]=t.exceptions||[],o[Up]=t[Up],o[Wp]=t[Wp],t.severityLevel&&(o[Jp]=t[Jp]),t.id&&(o.id=t.id,t[Up].id=t.id),t.problemGroup&&(o[Yp]=t[Yp]),L(t.isManual)||(o.isManual=t.isManual)):(n||={},a&&(n.id=a),o[qp]=[Fh(e,t,n)],o[Up]=cm(e,n),o[Wp]=lm(e,r),i&&(o[Jp]=i),a&&(o.id=a))}return e.CreateAutoException=function(e,t,n,r,i,a,o,s){var c=Ah(i||a||e);return{message:xh(e,c),url:t,lineNumber:n,columnNumber:r,error:jh(i||a||e),evt:jh(a||e),typeName:c,stackDetails:Dh(o||i||a),errorSrc:s}},e.CreateFromInterface=function(t,n,r,i){var a=n.exceptions&&Zr(n.exceptions,function(e){return Ih(t,e)});return new e(t,Qi(Qi({},n),{exceptions:a}),r,i)},e.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,s=e.isManual;return{ver:`4.0`,exceptions:t instanceof Array&&Zr(t,function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},e.CreateSimpleException=function(e,t,n,r,i,a){var o;return{exceptions:[(o={},o[Xp]=!0,o.message=e,o.stack=i,o.typeName=t,o)]}},e.envelopeType=`Microsoft.ApplicationInsights.{0}.Exception`,e.dataType=`ExceptionData`,e.formatError=jh,e}(),Nh=In({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function Ph(){var e=this,t=B(e.parsedStack)&&Zr(e.parsedStack,function(e){return Wh(e)});return{id:e.id,outerId:e.outerId,typeName:e[Kp],message:e[Fp],hasFullStack:e[Xp],stack:e[fh],parsedStack:t||void 0}}function Fh(e,t,n){var r,i,a,o,s,c,l,u;if(Sh(t))o=t[Kp],s=t[Fp],l=t[fh],u=t.parsedStack||[],c=t[Xp];else{var d=t,f=d&&d.evt;tn(d)||(d=d[dh]||f||d),o=im(e,Ah(d))||`not_specified`,s=om(e,xh(t||d,o))||`not_specified`;var p=t[ph]||Dh(t);u=kh(p),B(u)&&Zr(u,function(t){t[Zp]=im(e,t[Zp]),t[Qp]=im(e,t[Qp])}),l=sm(e,Oh(p)),c=B(u)&&u.length>0,n&&(n[Kp]=n.typeName||o)}return r={},r[em]=Nh,r.id=i,r.outerId=a,r.typeName=o,r.message=s,r[Xp]=c,r.stack=l,r.parsedStack=u,r.toInterface=Ph,r}function Ih(e,t){var n=B(t.parsedStack)&&Zr(t.parsedStack,function(e){return Hh(e)})||t.parsedStack;return Fh(e,Qi(Qi({},t),{parsedStack:n}))}function Lh(e,t){var n=t[Vp](ch);if(n&&n.length>=4)e[Qp]=n[1],e[$p]=parseInt(n[2]);else{var r=t[Vp](lh);r&&r.length>=3?(e[Qp]=r[1],e[$p]=parseInt(r[2])):e[Qp]=t}}function Rh(e,t,n){var r=e[Qp];t.fn&&n&&n.length>t.fn&&(t.ln&&n.length>t.ln?(r=li(n[t.fn]||``),e[$p]=parseInt(li(n[t.ln]||``))||0):r=li(n[t.fn]||``)),r&&Lh(e,r)}function zh(e){var t=!1;if(e&&R(e)){var n=li(e);n&&(t=rh.test(n))}return t}var Bh=In({level:1,method:1,assembly:0,fileName:0,line:0});function Vh(e,t){var n,r;if(e&&R(e)&&li(e)){r=(n={},n[em]=Bh,n.level=t,n.assembly=li(e),n.method=uh,n.fileName=``,n.line=0,n.sizeInBytes=0,n);for(var i=0;i<_h[Ap];){var a=_h[i];if(a.chk&&!a.chk(e))break;a.pre&&(e=a.pre(e));var o=e[Vp](a.re);if(o&&o.length>=a.len){a.m&&(r.method=li(o[a.m]||uh)),a.hdl?a.hdl(r,a,o):a.fn&&(a.ln?(r[Qp]=li(o[a.fn]||``),r[$p]=parseInt(li(o[a.ln]||``))||0):Lh(r,o[a.fn]||``));break}i++}}return Uh(r)}function Hh(e){var t;return Uh((t={},t[em]=Bh,t.level=e.level,t.method=e.method,t.assembly=e[Zp],t.fileName=e[Qp],t.line=e[$p],t.sizeInBytes=0,t))}function Uh(e){var t=nh;return e&&(t+=e.method[Ap],t+=e.assembly[Ap],t+=e.fileName[Ap],t+=e.level.toString()[Ap],t+=e.line.toString()[Ap],e[Gp]=t),e}function Wh(e){return{level:e.level,method:e.method,assembly:e[Zp],fileName:e[Qp],line:e[$p]}}var Gh=function(){function e(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return e}(),Kh=function(){function e(e,t,n,r,i,a,o,s,c){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var u=new Gh;u[Ip]=r>0?r:void 0,u.max=isNaN(a)||a===null?void 0:a,u.min=isNaN(i)||i===null?void 0:i,u[Hp]=im(e,t)||`not_specified`,u.value=n,u.stdDev=isNaN(o)||o===null?void 0:o,l.metrics=[u],l[Up]=cm(e,s),l[Wp]=lm(e,c)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Metric`,e.dataType=`MetricData`,e}(),qh=``;function Jh(e){(isNaN(e)||e<0)&&(e=0),e=Pi(e);var t=qh+e%1e3,n=qh+ui(e/1e3)%60,r=qh+ui(e/(1e3*60))%60,i=qh+ui(e/(1e3*60*60))%24,a=ui(e/(1e3*60*60*24));return t=t.length===1?`00`+t:t.length===2?`0`+t:t,n=n.length<2?`0`+n:n,r=r.length<2?`0`+r:r,i=i.length<2?`0`+i:i,(a>0?a+`.`:qh)+i+`:`+r+`:`+n+`.`+t}function Yh(e,t,n,r,i){return!i&&R(e)&&(e===`Script error.`||e===`Script error`)}var Xh=function(){function e(e,t,n,r,i,a,o){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var s=this;s.ver=2,s.id=um(e,o),s.url=am(e,n),s[Hp]=im(e,t)||`not_specified`,isNaN(r)||(s[tm]=Jh(r)),s[Up]=cm(e,i),s[Wp]=lm(e,a)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Pageview`,e.dataType=`PageviewData`,e}(),Zh=function(){function e(e,t,n,r,i,a,o,s,c,l,u,d){c===void 0&&(c=`Ajax`),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var f=this;f.ver=2,f.id=t,f[tm]=Jh(i),f.success=a,f.resultCode=o+``,f.type=im(e,c);var p=Dm(e,n,s,r);f.data=am(e,r)||p.data,f.target=im(e,p.target),l&&(f.target=`${f.target} | ${l}`),f[Hp]=im(e,p[Hp]),f[Up]=cm(e,u),f[Wp]=lm(e,d)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.RemoteDependency`,e.dataType=`RemoteDependencyData`,e}(),Qh=function(){function e(e,t,n,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var a=this;a.ver=2,t||=`not_specified`,a[Fp]=om(e,t),a[Up]=cm(e,r),a[Wp]=lm(e,i),n&&(a[Jp]=n)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Message`,e.dataType=`MessageData`,e}(),$h=function(){function e(e,t,n,r,i,a,o){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var s=this;s.ver=2,s.url=am(e,n),s[Hp]=im(e,t)||`not_specified`,s[Up]=cm(e,i),s[Wp]=lm(e,a),o&&(s.domProcessing=o.domProcessing,s[tm]=o[tm],s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.PageviewPerformance`,e.dataType=`PageviewPerformanceData`,e}(),eg=function(){function e(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}return e}();function tg(e){var t=`ai.`+e+`.`;return function(e){return t+e}}var ng=tg(`application`),rg=tg(`device`),ig=tg(`location`),ag=tg(`operation`),og=tg(`session`),sg=tg(`user`),cg=tg(`cloud`),lg=tg(`internal`),ug=function(e){ea(t,e);function t(){return e.call(this)||this}return t}(lc({applicationVersion:ng(`ver`),applicationBuild:ng(`build`),applicationTypeId:ng(`typeId`),applicationId:ng(`applicationId`),applicationLayer:ng(`layer`),deviceId:rg(`id`),deviceIp:rg(`ip`),deviceLanguage:rg(`language`),deviceLocale:rg(`locale`),deviceModel:rg(`model`),deviceFriendlyName:rg(`friendlyName`),deviceNetwork:rg(`network`),deviceNetworkName:rg(`networkName`),deviceOEMName:rg(`oemName`),deviceOS:rg(`os`),deviceOSVersion:rg(`osVersion`),deviceRoleInstance:rg(`roleInstance`),deviceRoleName:rg(`roleName`),deviceScreenResolution:rg(`screenResolution`),deviceType:rg(`type`),deviceMachineName:rg(`machineName`),deviceVMName:rg(`vmName`),deviceBrowser:rg(`browser`),deviceBrowserVersion:rg(`browserVersion`),locationIp:ig(`ip`),locationCountry:ig(`country`),locationProvince:ig(`province`),locationCity:ig(`city`),operationId:ag(`id`),operationName:ag(`name`),operationParentId:ag(`parentId`),operationRootId:ag(`rootId`),operationSyntheticSource:ag(`syntheticSource`),operationCorrelationVector:ag(`correlationVector`),sessionId:og(`id`),sessionIsFirst:og(`isFirst`),sessionIsNew:og(`isNew`),userAccountAcquisitionDate:sg(`accountAcquisitionDate`),userAccountId:sg(`accountId`),userAgent:sg(`userAgent`),userId:sg(`id`),userStoreRegion:sg(`storeRegion`),userAuthUserId:sg(`authUserId`),userAnonymousUserAcquisitionDate:sg(`anonUserAcquisitionDate`),userAuthenticatedUserAcquisitionDate:sg(`authUserAcquisitionDate`),cloudName:cg(`name`),cloudRole:cg(`role`),cloudRoleVer:cg(`roleVer`),cloudRoleInstance:cg(`roleInstance`),cloudEnvironment:cg(`environment`),cloudLocation:cg(`location`),cloudDeploymentUnit:cg(`deploymentUnit`),internalNodeName:lg(`nodeName`),internalSdkVersion:lg(`sdkVersion`),internalAgentVersion:lg(`agentVersion`),internalSnippet:lg(`snippet`),internalSdkSrc:lg(`sdkSrc`)}));function dg(e,t,n,r,i,a){n=im(r,n)||`not_specified`,(L(e)||L(t)||L(n))&&ln(`Input doesn't contain all required fields`);var o=``;e.iKey&&(o=e[Dp],delete e[Dp]);var s={name:n,time:tc(new Date),iKey:o,ext:a||{},tags:[],data:{},baseType:t,baseData:e};return L(i)||H(i,function(e,t){s.data[e]=t}),s}(function(){function e(){}return e.create=dg,e})();var fg={UserExt:`user`,DeviceExt:`device`,TraceExt:`trace`,WebExt:`web`,AppExt:`app`,OSExt:`os`,SessionExt:`ses`,SDKExt:`sdk`},pg=new ug;function mg(e){var t=null;if(z(Event))t=new Event(e);else{var n=Dr();n&&n.createEvent&&(t=n.createEvent(`Event`),t.initEvent(e,!0,!0))}return t}function hg(e,t){tp(e,null,null,t)}function gg(e){var t=Dr(),n=jr(),r=!1,i=[],a=1;n&&!L(n.onLine)&&!n.onLine&&(a=2);var o=0,s=f(),c=$f(El(`OfflineListener`),e);try{if(u(kr())&&(r=!0),t){var l=t.body||t;l.ononline&&u(l)&&(r=!0)}}catch{r=!1}function u(e){var t=!1;return e&&(t=ep(e,`online`,h,c),t&&ep(e,`offline`,g,c)),t}function d(){return s}function f(){return!(o===2||a===2)}function p(){var e=f();s!==e&&(s=e,U(i,function(e){var t={isOnline:s,rState:a,uState:o};try{e(t)}catch{}}))}function m(e){o=e,p()}function h(){a=1,p()}function g(){a=2,p()}function _(){var e=kr();if(e&&r){if(hg(e,c),t){var n=t.body||t;Kt(n.ononline)||hg(n,c)}r=!1}}function v(e){return i.push(e),{rm:function(){var t=i.indexOf(e);if(t>-1)return i.splice(t,1)}}}return{isOnline:d,isListening:function(){return r},unload:_,addListener:v,setOnlineState:m}}var _g=`AppInsightsPropertiesPlugin`,vg=`AppInsightsChannelPlugin`,yg=`ApplicationInsightsAnalytics`,bg=Fn({history:{blkVal:!0,v:void 0}}),xg=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=185,n.identifier=`ReactPlugin`;var r,i,a,o,s,c;return za(t,n,function(t,l){u(),t.initialize=function(o,l,u,d){e.prototype.initialize.call(n,o,l,u,d);var p=l.getPlugin(_g);p&&(c=p.plugin),W(t,`context`,{g:function(){return c?c.context:null}}),t._addHook($l(o,function(e){if(i=t._getTelCtx().getExtCfg(n.identifier,bg),r=l.getPlugin(`ApplicationInsightsAnalytics`)?.plugin,z(a)&&(a(),a=null),i.history&&(f(i.history),!s)){var o={uri:i.history.location.pathname};t.trackPageView(o),s=!0}}))},t.getCookieMgr=function(){return $u(t.core)},t.getAppInsights=d,t.processTelemetry=function(e,n){t.processNext(e,n)},t._doTeardown=function(e,t,n){z(a)&&a(),o&&clearTimeout(o),u()},cc(t,d,[`trackMetric`,`trackPageView`,`trackEvent`,`trackException`,`trackTrace`]);function u(){r=null,i=null,a=null,o=null,s=!1,c=null}function d(){return r||Y(t.diagLog(),1,64,`Analytics plugin is not available, React plugin telemetry will not be sent: `),r}function f(e){a=e.listen(function(e){var n=null;n=`location`in e?e.location:e,o=setTimeout(function(){o=null;var e={uri:n.pathname};t.trackPageView(e)},500)})}Tn(t,`_extensionConfig`,function(){return i})}),n}return t.__ieDyn=1,t}(nf),Sg=(0,I.createContext)(void 0),Cg=h(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),wg=h(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Tg=h(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Eg=h(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Dg=h(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Og=h(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),kg=h(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Ag=h(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),jg=h(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Mg=h(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),Ng=h(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Pg=h(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Fg=h(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Ig=h(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),Lg=h(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Rg=h(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),zg=h(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Bg=h(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),Vg=h(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),Hg=h(`github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),Ug=h(`hard-drive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),Wg=h(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Gg=h(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Kg=h(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),qg=h(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Jg=h(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Yg=h(`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`}]]),Xg=h(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Zg=h(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Qg=h(`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`}]]),$g=h(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),e_=h(`newspaper`,[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]),t_=h(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),n_=h(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),r_=h(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),i_=h(`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`}]]),a_=h(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),o_=h(`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`}]]),s_=h(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),c_=h(`skull`,[[`path`,{d:`m12.5 17-.5-1-.5 1h1z`,key:`3me087`}],[`path`,{d:`M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z`,key:`1o5pge`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}]]),l_=h(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),u_=h(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),d_=h(`toggle-left`,[[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),f_=h(`toggle-right`,[[`circle`,{cx:`15`,cy:`12`,r:`3`,key:`1afu0r`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),p_=h(`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`}]]),m_=h(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),h_=h(`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`}]]),g_=h(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),__=$e(),Z=f();function v_(){let[e]=se(),t=e.get(`namespace`),{data:n}=le(),r=n?.find(e=>e.id===t);return(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)(`header`,{className:`h-14 bg-primary-500 text-white flex items-center justify-between px-4 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,Z.jsxs)(ue,{to:`/`,className:`flex items-center gap-2 font-semibold text-lg`,"aria-label":`ServiceHub Home`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-white/20 rounded-xl flex items-center justify-center border border-white/25`,children:(0,Z.jsx)(Ng,{className:`w-4 h-4`})}),(0,Z.jsxs)(`span`,{className:`tracking-tight`,children:[(0,Z.jsx)(`span`,{className:`text-white/95`,children:`Service`}),(0,Z.jsx)(`span`,{className:`text-white font-bold`,children:`Hub`})]})]})}),(0,Z.jsx)(`div`,{className:`flex items-center gap-2 text-sm`,"data-tour":`header-connection`,children:r?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/10 px-3 py-1.5 rounded-full`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 bg-green-400 rounded-full animate-pulse`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`text-white/90`,children:`Connected:`}),(0,Z.jsx)(`span`,{className:`font-medium`,children:r.displayName||r.name}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] font-bold rounded uppercase leading-none ${r.environment===`prod`?`bg-red-500 text-white`:r.environment===`uat`?`bg-amber-400 text-amber-900`:`bg-green-400 text-green-900`}`,children:(r.environment??`dev`).toUpperCase()})]}):(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/10 px-3 py-1.5 rounded-full`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 bg-gray-400 rounded-full`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`text-white/70`,children:`No namespace selected`})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>window.dispatchEvent(new Event(`servicehub:open-palette`)),className:`hidden sm:flex items-center gap-1.5 px-2.5 py-1.5 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-white/80 text-xs transition-colors`,title:`Open command palette (⌘K)`,"aria-label":`Open command palette`,children:[(0,Z.jsx)(k,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Search…`}),(0,Z.jsx)(`kbd`,{className:`ml-1 text-[10px] font-mono bg-white/10 px-1 rounded`,children:`⌘K`})]}),(0,Z.jsx)(`button`,{onClick:()=>window.dispatchEvent(new Event(`servicehub:open-palette`)),className:`sm:hidden p-2 hover:bg-white/10 rounded-lg transition-colors`,title:`Open command palette (⌘K)`,"aria-label":`Open command palette`,children:(0,Z.jsx)(k,{className:`w-5 h-5`})}),(0,Z.jsx)(ue,{to:`/help`,className:`p-2 hover:bg-white/10 rounded-lg transition-colors`,title:`Help & Quick Reference`,"aria-label":`Help`,"data-tour":`header-help`,children:(0,Z.jsx)(Ge,{className:`w-5 h-5`})}),(0,Z.jsx)(`button`,{className:`w-8 h-8 bg-white/20 rounded-full flex items-center justify-center hover:bg-white/30 transition-colors`,"aria-label":`User menu`,title:`ServiceHub User`,children:(0,Z.jsx)(m_,{className:`w-4 h-4`})})]})]})})}function y_(e,t=!0){return a({queryKey:[`topics`,e],queryFn:async()=>(await N.get(`/namespaces/${e}/topics`,{_silent:!0})).data,enabled:!!e,staleTime:15e3,refetchInterval:t?3e4:!1,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2})}function b_(e,t,n=!0){return a({queryKey:[`subscriptions`,e,t],queryFn:async()=>(await N.get(`/namespaces/${e}/topics/${t}/subscriptions`,{_silent:!0})).data,enabled:!!e&&!!t,staleTime:15e3,refetchInterval:n?3e4:!1,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2})}var x_={list:async e=>[],get:async(e,t)=>{throw Error(`AI insights backend is not enabled. Client-side insights do not support individual lookup.`)},dismiss:async(e,t)=>{},resolve:async(e,t)=>{},getSummary:async(e,t)=>({activeCount:0,insights:[]}),isAvailable:async()=>!0},S_={MIN_MESSAGES_FOR_PATTERN:3,HIGH_DELIVERY_COUNT:5,POISON_MESSAGE_THRESHOLD:10,MIN_CLUSTER_PERCENTAGE:.1,ANALYSIS_WINDOW_MS:3600*1e3,HIGH_CONFIDENCE_THRESHOLD:80,MEDIUM_CONFIDENCE_THRESHOLD:50};function C_(e){let t=e.filter(e=>e.isFromDeadLetter||e.deadLetterReason);if(t.length=S_.MIN_MESSAGES_FOR_PATTERN){let n=Math.round(i.length/t.length*100);r.push({type:`dlq-pattern`,messages:i,signature:e,metrics:{affectedCount:i.length,totalDLQ:t.length,matchPercentage:n}})}return r}function w_(e){let t=e.filter(e=>e.deliveryCount>=S_.HIGH_DELIVERY_COUNT&&!e.isFromDeadLetter);if(t.lengthe+t.deliveryCount,0)/t.length);return[{type:`retry-loop`,messages:t,signature:`High retry count (avg: ${n})`,metrics:{affectedCount:t.length,avgDeliveryCount:n,maxDeliveryCount:Math.max(...t.map(e=>e.deliveryCount))}}]}function T_(e){let t=e.filter(e=>e.deliveryCount>=S_.POISON_MESSAGE_THRESHOLD);return t.length===0?[]:[{type:`poison-message`,messages:t,signature:`Exceeded ${S_.POISON_MESSAGE_THRESHOLD} delivery attempts`,metrics:{affectedCount:t.length,avgDeliveryCount:Math.round(t.reduce((e,t)=>e+t.deliveryCount,0)/t.length)}}]}function E_(e){let t=e.filter(e=>{let t=e.body?.toLowerCase()||``;return t.includes(`error`)||t.includes(`exception`)||t.includes(`failed`)||t.includes(`timeout`)||e.isFromDeadLetter});if(t.length=S_.MIN_MESSAGES_FOR_PATTERN&&r.push({type:`error-cluster`,messages:t,signature:e,metrics:{affectedCount:t.length,errorType:e}});return r}function D_(e){return e.replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/g,`[timestamp]`).replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,`[uuid]`).replace(/\d+\.\d+\.\d+\.\d+/g,`[ip]`).replace(/\d{10,}/g,`[number]`).trim().substring(0,100)}function O_(e){let t=e.body||``;for(let e of[/(?:Exception|Error):\s*([A-Za-z]+(?:Exception|Error))/i,/"(?:error|exception|type)":\s*"([^"]+)"/i,/(?:failed|error|exception)\s+(?:with|:)\s+([A-Za-z]+)/i]){let n=t.match(e);if(n)return n[1].trim()}return e.deadLetterReason?D_(e.deadLetterReason):null}function k_(e,t,n){let r=t>0?e/t*100:0,i=Math.min(99,Math.round(r*.6+n*.4)),a,o;return i>=S_.HIGH_CONFIDENCE_THRESHOLD?(a=`high`,o=`Strong pattern match: ${e} messages (${r.toFixed(0)}%) share this characteristic`):i>=S_.MEDIUM_CONFIDENCE_THRESHOLD?(a=`medium`,o=`Moderate pattern: ${e} messages show this behavior, but other factors may be involved`):(a=`low`,o=`Weak pattern: Only ${e} messages detected. More data needed for confident assessment`),{level:a,score:i,reasoning:o}}function A_(e){let t=[];switch(e.type){case`dlq-pattern`:t.push({title:`Review dead-letter error signatures`,description:`Examine the ${e.metrics.affectedCount} messages for common failure patterns`,priority:`immediate`}),t.push({title:`Check message schema validation`,description:`Ensure producers are sending correctly formatted messages`,priority:`short-term`}),t.push({title:`Consider replay after root cause fix`,description:`Once the issue is resolved, replay affected messages`,priority:`investigative`});break;case`retry-loop`:t.push({title:`Investigate consumer processing failures`,description:`Check logs for why messages are failing after ${e.metrics.avgDeliveryCount} attempts`,priority:`immediate`}),t.push({title:`Review max delivery count settings`,description:`Consider dead-lettering messages that exceed retry thresholds`,priority:`short-term`});break;case`poison-message`:t.push({title:`Move poison messages to DLQ`,description:`These messages are unlikely to process successfully`,priority:`immediate`}),t.push({title:`Add poison message detection logic`,description:`Implement early detection to prevent retry storms`,priority:`short-term`});break;case`error-cluster`:t.push({title:`Analyze error cluster root cause`,description:`${e.metrics.affectedCount} messages share error pattern: ${e.signature}`,priority:`immediate`}),t.push({title:`Check downstream service health`,description:`Clustered errors often indicate external dependencies issues`,priority:`investigative`});break}return t}function j_(e){switch(e.type){case`dlq-pattern`:return`DLQ Pattern: ${e.signature?.substring(0,50)||`Unknown Failure`}`;case`retry-loop`:return`Retry Loop: ${e.messages.length} Messages Stuck`;case`poison-message`:return`Poison Messages: ${e.messages.length} Unprocessable`;case`error-cluster`:return`Error Cluster: ${e.signature||`Common Failures`}`;case`latency-anomaly`:return`Latency Anomaly Detected`;default:return`Unknown Pattern`}}function M_(e){let t=e.messages.length;switch(e.type){case`dlq-pattern`:return`${t} messages dead-lettered with similar error: "${e.signature}". This represents ${e.metrics.matchPercentage}% of DLQ messages.`;case`retry-loop`:return`${t} messages in retry loop with average ${e.metrics.avgDeliveryCount} delivery attempts. Messages are not progressing to completion.`;case`poison-message`:return`${t} message${t>1?`s`:``} exceeded ${S_.POISON_MESSAGE_THRESHOLD} delivery attempts. These messages are likely unprocessable without intervention.`;case`error-cluster`:return`${t} messages share error pattern: ${e.signature}. This may indicate a systematic issue.`;default:return`${t} messages match this pattern.`}}function N_(e,t){if(!e||e.length===0)return[];let n=[],r=new Date,i=new Date(r.getTime()-S_.ANALYSIS_WINDOW_MS),a=[...C_(e),...w_(e),...T_(e),...E_(e)];for(let o=0;oe.messageId||`seq-${e.sequenceNumber}`);n.push({id:`insight-${t.entityName}-${s.type}-${o}`,type:s.type,title:j_(s),description:M_(s),confidence:c,evidence:{sampleSize:s.messages.length,affectedMessageIds:l,exampleMessageIds:l.slice(0,3),metrics:[{label:`Affected Messages`,value:s.messages.length,isAnomaly:s.messages.length>5},{label:`Pattern Match`,value:`${c.score}%`,isAnomaly:c.level===`high`},{label:`Analysis Window`,value:`1 hour`,isAnomaly:!1}],patternSignature:s.signature},recommendations:A_(s),timeWindow:{start:i.toISOString(),end:r.toISOString(),analysisTimestamp:r.toISOString()},scope:{namespaceId:t.namespaceId,queueOrTopicName:t.entityName,subscriptionName:t.subscriptionName},status:`active`})}return n}function P_(){return!0}function F_(e,t){return a({queryKey:[`insights`,`summary`,e,t],queryFn:()=>x_.getSummary(e,t),enabled:!!e&&!!t,retry:!1,staleTime:3e4,meta:{errorMessage:!1}})}function I_(e,t,n=!0){return a({queryKey:[`insights`,`client-side`,t.namespaceId,t.entityName,e?.length],queryFn:()=>!e||e.length===0?[]:N_(e,t),enabled:n&&!!e&&e.length>0&&P_(),staleTime:6e4,meta:{errorMessage:!1}})}function L_({queue:e,namespaceId:t}){let{data:n}=F_(t,e.name),r=(n?.activeCount||0)>0;return(0,Z.jsx)(_e,{to:`/messages?namespace=${t}&queue=${e.name}`,className:({isActive:n})=>{let r=new URLSearchParams(window.location.search),i=r.get(`namespace`),a=r.get(`queue`),o=r.get(`topic`);return`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm transition-all duration-200 ${n&&i===t&&a===e.name&&!o?`bg-sky-600 text-white shadow-xl border-2 border-sky-400 font-bold transform scale-[1.02] -ml-1 mr-1`:`bg-white text-gray-700 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300`}`},children:()=>{let n=new URLSearchParams(window.location.search),i=n.get(`namespace`),a=n.get(`queue`),o=n.get(`topic`),s=i===t&&a===e.name&&!o;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[s&&(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 bg-white rounded-full animate-pulse`}),e.name,r&&(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full animate-pulse ${s?`bg-yellow-300`:`bg-primary-500`}`,title:`AI patterns detected`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-white text-sky-700`:`bg-green-100 text-green-700`}`,children:e.activeMessageCount}),e.deadLetterMessageCount>0&&(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-red-200 text-red-800`:`bg-red-100 text-red-700`}`,children:e.deadLetterMessageCount})]})]})}},e.name)}function R_({topic:e,namespaceId:t}){let[n,r]=(0,I.useState)(!1),{data:i,isLoading:a}=b_(t,e.name);return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{onClick:()=>r(!n),className:`w-full flex items-center justify-between px-3 py-1.5 rounded text-sm text-gray-600 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5 text-gray-500`,children:[n?(0,Z.jsx)(E,{className:`w-3 h-3 shrink-0`}):(0,Z.jsx)(ze,{className:`w-3 h-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e.name})]}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 bg-gray-100 text-gray-600 text-xs font-medium rounded shrink-0`,children:e.subscriptionCount})]}),n&&(0,Z.jsx)(`div`,{className:`ml-4 mt-0.5 space-y-0.5`,children:a?(0,Z.jsx)(`div`,{className:`px-3 py-1 text-xs text-gray-500`,children:`Loading...`}):i&&i.length>0?i.map(n=>(0,Z.jsx)(z_,{subscription:n,namespaceId:t,topicName:e.name},n.name)):(0,Z.jsx)(`div`,{className:`px-3 py-1 text-xs text-gray-500`,children:`No subscriptions`})})]})}function z_({subscription:e,namespaceId:t,topicName:n}){return(0,Z.jsx)(_e,{to:`/messages?namespace=${t}&topic=${n}&subscription=${e.name}`,className:({isActive:r})=>{let i=new URLSearchParams(window.location.search),a=i.get(`namespace`),o=i.get(`subscription`),s=i.get(`topic`);return`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm transition-all duration-200 ${r&&a===t&&o===e.name&&s===n?`bg-sky-600 text-white shadow-xl border-2 border-sky-400 font-bold transform scale-[1.02] -ml-1 mr-1`:`bg-white text-gray-600 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300`}`},children:()=>{let r=new URLSearchParams(window.location.search),i=r.get(`namespace`),a=r.get(`subscription`),o=r.get(`topic`),s=i===t&&a===e.name&&o===n;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[s&&(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 bg-white rounded-full animate-pulse`}),e.name]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-white text-sky-700`:`bg-green-100 text-green-700`}`,children:e.activeMessageCount}),e.deadLetterMessageCount>0&&(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-red-200 text-red-800`:`bg-red-100 text-red-700`}`,children:e.deadLetterMessageCount})]})]})}})}function B_({namespace:e}){let{data:t,isLoading:n,isError:r}=Oe(e.id),{data:i,isLoading:a,isError:o}=y_(e.id),[s,c]=(0,I.useState)(e.isActive),[l,u]=(0,I.useState)(!0),[d,f]=(0,I.useState)(!0);return(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>c(!s),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-all ${e.isActive?`bg-gray-50 border border-gray-200`:`hover:bg-gray-50 border border-transparent`}`,children:[s?(0,Z.jsx)(E,{className:`w-4 h-4 text-gray-500 shrink-0`}):(0,Z.jsx)(ze,{className:`w-4 h-4 text-gray-500 shrink-0`}),(0,Z.jsx)(`div`,{className:`w-2 h-2 rounded-full shrink-0 ${e.isActive?`bg-green-500`:`bg-gray-200`}`,title:e.isActive?`Active namespace`:`Inactive namespace`}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-sm text-gray-900 truncate`,children:e.displayName||e.name}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 truncate`,children:e.name})]})]}),s&&e.isActive&&(0,Z.jsxs)(`div`,{className:`mt-1 ml-4 space-y-1`,children:[(0,Z.jsxs)(`button`,{onClick:()=>u(!l),className:`w-full flex items-center gap-2 px-2 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:text-gray-700`,children:[l?(0,Z.jsx)(E,{className:`w-3 h-3`}):(0,Z.jsx)(ze,{className:`w-3 h-3`}),(0,Z.jsx)(ke,{className:`w-3 h-3`}),`Queues (`,t?.length||0,`)`]}),l&&(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:r?(0,Z.jsxs)(`div`,{className:`px-3 py-2 text-xs text-amber-600 flex items-center gap-1`,children:[(0,Z.jsx)(He,{className:`w-3 h-3`}),`Connection unavailable`]}):n?(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`Loading...`}):t&&t.length>0?t.map(t=>(0,Z.jsx)(L_,{queue:t,namespaceId:e.id},t.name)):(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`No queues found`})}),(0,Z.jsxs)(`button`,{onClick:()=>f(!d),className:`w-full flex items-center gap-2 px-2 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:text-gray-700`,children:[d?(0,Z.jsx)(E,{className:`w-3 h-3`}):(0,Z.jsx)(ze,{className:`w-3 h-3`}),(0,Z.jsx)(e_,{className:`w-3 h-3`}),`Topics (`,i?.length||0,`)`]}),d&&(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:o?(0,Z.jsxs)(`div`,{className:`px-3 py-2 text-xs text-amber-600 flex items-center gap-1`,children:[(0,Z.jsx)(He,{className:`w-3 h-3`}),`Connection unavailable`]}):a?(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`Loading...`}):i&&i.length>0?i.map(t=>(0,Z.jsx)(R_,{topic:t,namespaceId:e.id},t.name)):(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`No topics found`})})]})]})}function V_(){let e=fe(),{data:t,isLoading:n,refetch:r}=le(),[i,a]=(0,I.useState)(!1),o=new URLSearchParams(window.location.search).get(`demo`)===`true`,s=t?.find(e=>e.isActive),{data:c}=Oe(s?.id||``),{data:l}=y_(s?.id||``),u=De({queries:(t?.map(e=>e.id)??[]).map(e=>({queryKey:[`namespace-stats`,e],queryFn:async()=>(await N.get(`/namespaces/${e}/stats`,{_silent:!0})).data,enabled:!!e,staleTime:3e4,refetchInterval:6e4,refetchIntervalInBackground:!1}))}).reduce((e,t)=>t.data?e+t.data.totalDlq:e,0);return(0,Z.jsxs)(`aside`,{className:`w-[260px] bg-white border-r border-gray-200 flex flex-col overflow-hidden`,"data-tour":`sidebar`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`h2`,{className:`text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Namespaces`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(`button`,{onClick:()=>r(),className:`p-1 hover:bg-primary-50 rounded transition-colors group`,title:`Refresh Namespaces`,"aria-label":`Refresh namespaces list`,children:(0,Z.jsx)(Ee,{className:`w-4 h-4 text-primary-500 group-hover:rotate-180 transition-transform duration-300`})}),(0,Z.jsx)(_e,{to:`/connect`,className:`p-1 hover:bg-gray-100 rounded transition-colors`,title:`Add Connection`,"aria-label":`Add new connection`,"data-tour":`add-connection`,children:(0,Z.jsx)(we,{className:`w-4 h-4 text-gray-500`})})]})]}),n?(0,Z.jsx)(`div`,{className:`px-3 py-4 text-sm text-gray-500 text-center`,children:`Loading namespaces...`}):t&&t.length>0?t.map(e=>(0,Z.jsx)(B_,{namespace:e},e.id)):(0,Z.jsxs)(`div`,{className:`px-3 py-4 text-sm text-gray-500 text-center`,children:[(0,Z.jsx)(`p`,{className:`mb-2`,children:`No connections yet`}),(0,Z.jsx)(_e,{to:`/connect`,className:`text-primary-600 hover:text-primary-700 font-medium`,children:`Add your first connection`})]}),o&&(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsxs)(`div`,{className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-50 border border-blue-200`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-blue-500`}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-sm text-blue-900`,children:`Demo Namespace`}),(0,Z.jsx)(`div`,{className:`text-xs text-blue-500`,children:`Sample data`})]})]}),(0,Z.jsx)(`div`,{className:`mt-1 ml-4 space-y-0.5`,children:[`orders-queue`,`payment-queue`,`notification-queue`].map(e=>(0,Z.jsx)(_e,{to:`/messages?demo=true&queue=${e}`,className:`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm bg-white text-gray-700 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300 transition-all duration-200`,children:(0,Z.jsx)(`span`,{className:`truncate`,children:e})},e))})]})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 bg-gradient-to-b from-sky-50 to-white`,"data-tour":`quick-access`,children:[(0,Z.jsxs)(`button`,{onClick:()=>a(e=>!e),className:`w-full flex items-center justify-between px-3 py-2 text-xs font-semibold text-sky-700 uppercase tracking-wider hover:bg-sky-100/50 transition-colors`,"aria-expanded":i,children:[`Quick Access`,(0,Z.jsx)(E,{className:`w-3.5 h-3.5 transition-transform ${i?``:`-rotate-90`}`})]}),i&&(0,Z.jsxs)(`nav`,{className:`space-y-1 px-3 pb-3`,children:[(0,Z.jsxs)(_e,{to:`/dashboard`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-indigo-50 text-indigo-700 border-indigo-300 font-medium`:`bg-white hover:bg-indigo-50 text-gray-700 hover:text-indigo-700 border-gray-200 hover:border-indigo-300`}`,children:[(0,Z.jsx)(Jg,{className:`w-4 h-4 text-indigo-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Dashboard`}),u>0&&(0,Z.jsx)(`span`,{className:`text-xs bg-red-100 text-red-700 px-1.5 py-0.5 rounded-full font-medium`,children:u})]}),(0,Z.jsxs)(`button`,{onClick:()=>{let n=t?.find(e=>e.isActive);if(!n){F.error(`No active namespace selected`);return}let r=c?.[0];if(r){e(`/messages?namespace=${n.id}&queue=${r.name}&queueType=active`);return}if(l?.[0]){F(`Select a subscription from the topic to view messages`,{icon:`ℹ️`});return}F(`No queues or topics available`,{icon:`ℹ️`})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-sky-50 text-gray-700 hover:text-sky-700 border border-gray-200 hover:border-sky-300 shadow-sm`,children:[(0,Z.jsx)(A,{className:`w-4 h-4 text-sky-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Active Messages`}),(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:`View All`})]}),(0,Z.jsxs)(`button`,{onClick:()=>{let n=t?.find(e=>e.isActive);if(!n){F.error(`No active namespace selected`);return}let r=c?.[0];if(r){e(`/messages?namespace=${n.id}&queue=${r.name}&queueType=deadletter`);return}if(l?.[0]){F(`Select a subscription from the topic to view DLQ`,{icon:`⚠️`});return}F(`No queues or topics available for DLQ view`,{icon:`⚠️`})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-red-50 text-gray-700 hover:text-red-700 border border-gray-200 hover:border-red-300 shadow-sm`,children:[(0,Z.jsx)(He,{className:`w-4 h-4 text-red-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Dead-Letter`}),(0,Z.jsx)(`span`,{className:`text-xs text-red-600 font-medium`,children:`DLQ`})]}),(0,Z.jsxs)(_e,{to:s?`/dlq-history?namespace=${s.id}`:`/dlq-history`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-purple-50 text-gray-700 hover:text-purple-700 border border-gray-200 hover:border-purple-300 shadow-sm`,children:[(0,Z.jsx)(Re,{className:`w-4 h-4 text-purple-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`DLQ Intelligence`}),(0,Z.jsx)(`span`,{className:`text-xs text-purple-600 font-medium`,children:`History`})]}),(0,Z.jsxs)(_e,{to:`/rules`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-amber-50 text-gray-700 hover:text-amber-700 border border-gray-200 hover:border-amber-300 shadow-sm`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Auto-Replay`}),(0,Z.jsx)(`span`,{className:`text-xs text-amber-600 font-medium`,children:`Rules`})]}),(0,Z.jsxs)(_e,{to:`/health`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-emerald-50 text-gray-700 hover:text-emerald-700 border border-gray-200 hover:border-emerald-300 shadow-sm`,children:[(0,Z.jsx)(Te,{className:`w-4 h-4 text-emerald-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`System Health`}),(0,Z.jsx)(`span`,{className:`text-xs text-emerald-600 font-medium`,children:`Status`})]}),(0,Z.jsxs)(_e,{to:`/scheduled`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-sky-50 text-sky-700 border-sky-300 font-medium`:`bg-white hover:bg-sky-50 text-gray-700 hover:text-sky-700 border-gray-200 hover:border-sky-300`}`,children:[(0,Z.jsx)(xe,{className:`w-4 h-4 text-sky-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Scheduled`}),(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:`View`})]}),(0,Z.jsxs)(_e,{to:`/correlation`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-violet-50 text-violet-700 border-violet-300`:`bg-white hover:bg-violet-50 text-gray-700 hover:text-violet-700 border-gray-200 hover:border-violet-300`}`,children:[(0,Z.jsx)(de,{className:`w-4 h-4 text-violet-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Correlation`})]}),(0,Z.jsxs)(_e,{to:`/help`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-primary-50 text-gray-700 hover:text-primary-700 border border-gray-200 hover:border-primary-300 shadow-sm`,children:[(0,Z.jsx)(Ge,{className:`w-4 h-4 text-primary-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Help & Guide`}),(0,Z.jsx)(`span`,{className:`text-xs text-primary-600 font-medium`,children:`?`})]}),(0,Z.jsxs)(_e,{to:`/security`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-green-50 text-green-700 border-green-300`:`bg-white hover:bg-green-50 text-gray-700 hover:text-green-700 border-gray-200 hover:border-green-300`}`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-green-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Security & Privacy`})]})]})]}),(0,Z.jsx)(`div`,{className:`border-t border-gray-200 p-3 bg-white`,children:(0,Z.jsxs)(_e,{to:`/connect`,className:`flex items-center justify-center gap-2 w-full px-4 py-2.5 bg-sky-500 hover:bg-sky-600 text-white rounded-lg text-sm font-medium transition-all shadow-md hover:shadow-lg`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Add Connection`]})})]})}function H_(){let e=new Date().getFullYear();return(0,Z.jsx)(`footer`,{className:`h-12 bg-primary-500 text-white border-t border-primary-600 shadow-sm`,children:(0,Z.jsxs)(`div`,{className:`h-full px-4 flex items-center justify-between text-xs`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`text-white/70`,children:`ServiceHub v3.1.0`}),(0,Z.jsx)(`span`,{className:`text-white/50`,children:`•`}),(0,Z.jsx)(`span`,{className:`text-white/70`,children:`.NET 10 • React 19`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-white/70`,children:[(0,Z.jsx)(`span`,{children:`Made with`}),(0,Z.jsx)(Wg,{className:`w-3.5 h-3.5 text-red-300 fill-red-300`}),(0,Z.jsxs)(`span`,{children:[`© `,e]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`text-white/70 hover:text-white transition-colors flex items-center gap-1`,title:`GitHub`,children:[(0,Z.jsx)(Hg,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`GitHub`})]}),(0,Z.jsx)(`span`,{className:`text-white/30`,children:`|`}),(0,Z.jsxs)(`a`,{href:`#help`,className:`text-white/70 hover:text-white transition-colors flex items-center gap-1`,title:`Help`,children:[(0,Z.jsx)(wg,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Help`})]})]})]})})}function U_(e){return e.replace(/\/?\$deadletterqueue$/i,``)}var W_={list:async e=>{let{namespaceId:t,entityType:n=`queue`,...r}=e,i=U_(e.queueOrTopicName);if(n===`topic`&&i.includes(`/subscriptions/`)){let[e,n]=i.split(`/subscriptions/`);return(await N.get(`/namespaces/${t}/topics/${e}/subscriptions/${n}/messages`,{params:r})).data}let a=n===`topic`?`topics`:`queues`;return(await N.get(`/namespaces/${t}/${a}/${i}/messages`,{params:r})).data},get:async(e,t)=>(await N.get(`/namespaces/${e}/messages/${t}`)).data,send:async(e,t,n,r=`queue`)=>{let i=r===`topic`?`topics`:`queues`,a={body:n.body,contentType:n.contentType,applicationProperties:n.properties,sessionId:n.sessionId,correlationId:n.correlationId,timeToLiveSeconds:n.timeToLive,scheduledEnqueueTimeUtc:n.scheduledEnqueueTime};await N.post(`/namespaces/${e}/${i}/${t}/messages`,a,{headers:D(ge.sendMessage)})},replay:async(e,t,n,r)=>{await N.post(`/messages/replay`,null,{headers:D(ge.replayMessage),params:{namespaceId:e,sequenceNumber:t,entityName:n,subscriptionName:r}})},deadLetter:async(e,t,n=1,r=`ManualDeadLetter`,i,a=`queue`,o)=>{let s=new URLSearchParams({messageCount:n.toString(),reason:r,...i&&{errorDescription:i}}),c;return c=a===`topic`&&o?`/namespaces/${e}/topics/${t}/subscriptions/${o}/deadletter`:`/namespaces/${e}/queues/${t}/deadletter`,(await N.post(`${c}?${s.toString()}`,null,{headers:D(ge.deadLetter)})).data}};function G_(e){return e.replace(/\/?\$deadletterqueue$/i,``)}function K_(e){let t={...e,queueOrTopicName:G_(e.queueOrTopicName)};return a({queryKey:[`messages`,t],queryFn:async()=>{try{return await W_.list(t)}catch(e){let t=e?.response?.status;if(t===404||t===502||t===503)return{items:[],totalCount:0,hasMore:!1};throw e}},enabled:!!t.namespaceId&&!!t.queueOrTopicName,staleTime:1e4,refetchInterval:e.autoRefresh===!1?!1:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===401||t?.response?.status===403||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2,meta:{errorMessage:!1}})}function q_(){let e=l();return g({mutationFn:({namespaceId:e,queueOrTopicName:t,message:n,entityType:r=`queue`})=>W_.send(e,t,n,r),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:[`messages`,{namespaceId:n.namespaceId,queueOrTopicName:n.queueOrTopicName}],exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId],refetchType:`active`}),e.invalidateQueries({queryKey:[`subscriptions`,n.namespaceId],refetchType:`active`})]),F.success(`Message sent successfully`)},onError:e=>{let t=e?.response?.data?.message||e?.message||`Failed to send message`;F.error(t,{duration:1/0})}})}function J_(){let e=l();return g({mutationFn:({namespaceId:e,sequenceNumber:t,entityName:n,subscriptionName:r})=>W_.replay(e,t,n,r),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:[`messages`,{namespaceId:n.namespaceId,queueOrTopicName:n.entityName}],exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId],refetchType:`active`}),e.invalidateQueries({queryKey:[`subscriptions`,n.namespaceId],refetchType:`active`})]),F.success(`Message replayed successfully`)},onError:e=>{if(e?.response?.status===404)F.error(`Replay feature is not yet available in the API`,{duration:4e3,icon:`🚧`});else{let t=e?.response?.data?.message||e?.message||`Failed to replay message`;F.error(t,{duration:1/0})}}})}function Y_({isOpen:e,onClose:t,onSend:n,defaultNamespaceId:r,defaultQueueName:i}){let{data:a}=le(),[o,s]=(0,I.useState)(r||``),{data:c}=Oe(o),{data:l}=y_(o),u=q_(),[d,f]=(0,I.useState)(`queue`),[p,m]=(0,I.useState)(i||``),[h,g]=(0,I.useState)(`{ + "orderId": "ORD-2026-12345", + "amount": 99.99, + "currency": "USD" +}`),[_,v]=(0,I.useState)(`application/json`),[y,b]=(0,I.useState)([{key:`source`,value:`ServiceHub`}]),[x,S]=(0,I.useState)(!1),[C,w]=(0,I.useState)(``),[T,E]=(0,I.useState)(``),[D,ee]=(0,I.useState)(``),[O,te]=(0,I.useState)(`now`),[k,ne]=(0,I.useState)(``),[A,re]=(0,I.useState)(!1),[j,M]=(0,I.useState)(1);if((0,I.useEffect)(()=>{r&&s(r),i&&m(i)},[r,i]),(0,I.useEffect)(()=>{let n=n=>{n.key===`Escape`&&e&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),!e)return null;let ie=()=>{b([...y,{key:``,value:``}])},ae=e=>{b(y.filter((t,n)=>n!==e))},N=(e,t,n)=>{let r=[...y];r[e][t]=n,b(r)},oe=async()=>{if(!o||!p)return;let e={};y.forEach(t=>{t.key.trim()&&(e[t.key.trim()]=t.value)});try{let t=A?j:1;for(let n=0;n{if(_!==`application/json`)return!0;try{return JSON.parse(h),!0}catch{return!1}},se=o&&p&&h.trim().length>0&&P()&&(O===`now`||O===`scheduled`&&!!k);return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Send Message`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-6`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace...`}),a?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Entity Type`}),(0,Z.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,Z.jsx)(`button`,{onClick:()=>{f(`queue`),m(``)},className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`queue`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📥 Queue`}),(0,Z.jsx)(`button`,{onClick:()=>{f(`topic`),m(``)},className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`topic`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📢 Topic`})]}),(0,Z.jsxs)(`select`,{value:p,onChange:e=>m(e.target.value),disabled:!o,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsxs)(`option`,{value:``,children:[`Select `,d,`...`]}),d===`queue`?c?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[`📥 `,e.name]},e.name)):l?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[`📢 `,e.name]},e.name))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Content Type`}),(0,Z.jsxs)(`select`,{value:_,onChange:e=>v(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:`application/json`,children:`application/json`}),(0,Z.jsx)(`option`,{value:`text/plain`,children:`text/plain`}),(0,Z.jsx)(`option`,{value:`application/xml`,children:`application/xml`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Message Body`}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`textarea`,{value:h,onChange:e=>g(e.target.value),rows:8,className:`w-full px-3 py-2 border rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 ${!P()&&_===`application/json`?`border-red-300 bg-red-50`:`border-gray-200`}`,placeholder:`Enter message body...`}),!P()&&_===`application/json`&&(0,Z.jsx)(`p`,{className:`text-xs text-red-600 mt-1`,children:`Invalid JSON format`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-700`,children:`Custom Properties`}),(0,Z.jsxs)(`button`,{onClick:ie,className:`flex items-center gap-1 text-xs text-primary-600 hover:text-primary-700`,children:[(0,Z.jsx)(we,{className:`w-3 h-3`}),`Add Property`]})]}),(0,Z.jsx)(`div`,{className:`space-y-2`,children:y.map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`input`,{type:`text`,value:e.key,onChange:e=>N(t,`key`,e.target.value),placeholder:`Key`,className:`flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>N(t,`value`,e.target.value),placeholder:`Value`,className:`flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`button`,{onClick:()=>ae(t),className:`p-2 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-lg transition-colors`,children:(0,Z.jsx)(p_,{className:`w-4 h-4`})})]},t))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Delivery Mode`}),(0,Z.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,Z.jsxs)(`button`,{onClick:()=>{te(`now`),ne(``)},className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors border ${O===`now`?`bg-primary-500 text-white border-primary-500`:`bg-white text-gray-700 border-gray-200 hover:bg-gray-50`}`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4`}),`Send Now`]}),(0,Z.jsxs)(`button`,{onClick:()=>te(`scheduled`),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors border ${O===`scheduled`?`bg-sky-500 text-white border-sky-500`:`bg-white text-gray-700 border-gray-200 hover:bg-sky-50 hover:border-sky-300 hover:text-sky-700`}`,children:[(0,Z.jsx)(xe,{className:`w-4 h-4`}),`Schedule`]})]}),O===`scheduled`&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`input`,{type:`datetime-local`,value:k,onChange:e=>ne(e.target.value),min:new Date(Date.now()+6e4).toISOString().slice(0,16),className:`w-full px-3 py-2 border border-sky-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 bg-sky-50`}),k&&(0,Z.jsxs)(`p`,{className:`text-xs text-sky-600 mt-1`,children:[`⏰ Message will be delivered at `,new Date(k).toLocaleString()]}),!k&&(0,Z.jsx)(`p`,{className:`text-xs text-amber-600 mt-1`,children:`Select a future date and time`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>S(!x),className:`text-sm text-primary-600 hover:text-primary-700 font-medium`,children:[x?`▼`:`▶`,` Advanced Options`]}),x&&(0,Z.jsxs)(`div`,{className:`space-y-4 pl-4 border-l-2 border-gray-100`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Correlation ID`}),(0,Z.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`Optional`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Session ID`}),(0,Z.jsx)(`input`,{type:`text`,value:T,onChange:e=>E(e.target.value),placeholder:`Optional`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Time To Live (seconds)`}),(0,Z.jsx)(`input`,{type:`number`,value:D,onChange:e=>ee(e.target.value),placeholder:`Optional — leave blank for entity default`,min:1,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 rounded-lg p-4`,children:[(0,Z.jsxs)(`label`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:A,onChange:e=>re(e.target.checked),className:`w-4 h-4 text-primary-500 rounded focus:ring-primary-400`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Send multiple copies`})]}),A&&(0,Z.jsxs)(`div`,{className:`mt-3 flex items-center gap-3`,children:[(0,Z.jsx)(`label`,{className:`text-sm text-gray-600`,children:`How many?`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:1e3,value:j,onChange:e=>M(Math.min(1e3,Math.max(1,parseInt(e.target.value)||1))),className:`w-24 px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-500`,children:`(max 1000)`})]}),A&&j>1&&(0,Z.jsxs)(`p`,{className:`mt-2 text-sm text-amber-600`,children:[`⚠️ This will send `,(0,Z.jsx)(`strong`,{children:j}),` messages to `,(0,Z.jsx)(`strong`,{children:p})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:oe,disabled:!se||u.isPending,className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-500 hover:bg-primary-600 disabled:bg-gray-300 disabled:cursor-not-allowed rounded-lg transition-colors`,children:u.isPending?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin`}),`Sending...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(o_,{className:`w-4 h-4`}),A&&j>1?`Send ${j} Messages`:`Send Message`]})})]})]})]}),document.body)}function X_(){return crypto.randomUUID()}var Z_=`ServiceHub-Generated`,Q_=`1.0.0`,$_=[`Contoso`,`Fabrikam`,`Northwind`,`AdventureWorks`,`TailSpin`,`WideWorld`,`GraphicDesign`,`LitWare`,`Proseware`,`VanArsdel`],ev=[`us-east-1`,`us-west-2`,`eu-west-1`,`ap-southeast-1`,`eu-central-1`],tv=[`production`,`staging`,`development`];function nv(e,t){let n=`ORD-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`CUST-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=$_[Math.floor(Math.random()*$_.length)],a=X_(),o=Array.from({length:Math.floor(Math.random()*5)+1},()=>({sku:`SKU-${Math.random().toString(36).substring(2,8).toUpperCase()}`,name:[`Wireless Mouse`,`USB-C Hub`,`Mechanical Keyboard`,`Monitor Stand`,`4K Webcam`,`Desk Lamp`,`Ergonomic Chair`][Math.floor(Math.random()*7)],quantity:Math.floor(Math.random()*5)+1,unitPrice:parseFloat((Math.random()*200+10).toFixed(2))})),s=o.reduce((e,t)=>e+t.quantity*t.unitPrice,0),c=s*.08,l=s+c,u=`pending`,d=null,f=1;if(e)switch(t){case`dlq-candidate`:u=`validation-failed`,d={code:`INVALID_SHIPPING_ADDRESS`,message:`The shipping address could not be validated. ZIP code does not match city/state combination.`,timestamp:new Date().toISOString(),retryable:!1};break;case`retry-loop`:u=`processing`,f=Math.floor(Math.random()*8)+3,d={code:`INVENTORY_LOCK_TIMEOUT`,message:`Failed to acquire inventory lock for SKU ${o[0].sku}. Concurrent update detected.`,timestamp:new Date().toISOString(),retryable:!0,attemptNumber:f};break;case`poison-message`:u=`corrupted`,d={code:`SCHEMA_VALIDATION_FAILED`,message:`Message body contains malformed JSON. Expected number for "quantity", received string.`,timestamp:new Date().toISOString(),retryable:!1};break;case`latency-spike`:u=`processing-slow`,d={code:`DOWNSTREAM_LATENCY`,message:`Payment gateway response time exceeded 30s threshold. Circuit breaker triggered.`,timestamp:new Date().toISOString(),latencyMs:Math.floor(Math.random()*45e3)+3e4};break}return{body:JSON.stringify({eventType:`OrderCreated`,eventVersion:`2.1`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-order-service`,data:{orderId:n,customerId:r,customerEmail:`customer.${r.toLowerCase()}@${i.toLowerCase()}.com`,status:u,items:o,pricing:{subtotal:parseFloat(s.toFixed(2)),tax:parseFloat(c.toFixed(2)),total:parseFloat(l.toFixed(2)),currency:`USD`},shipping:{method:[`standard`,`express`,`overnight`][Math.floor(Math.random()*3)],address:{street:`${Math.floor(Math.random()*9999)+1} ${[`Main`,`Oak`,`Pine`,`Maple`,`Cedar`][Math.floor(Math.random()*5)]} Street`,city:[`Seattle`,`Portland`,`San Francisco`,`Los Angeles`,`Denver`][Math.floor(Math.random()*5)],state:[`WA`,`OR`,`CA`,`CA`,`CO`][Math.floor(Math.random()*5)],zipCode:String(Math.floor(Math.random()*9e4)+1e4),country:`US`},estimatedDelivery:new Date(Date.now()+(Math.random()*7+3)*24*60*60*1e3).toISOString()},metadata:{userAgent:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36`,ipAddress:`${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}`,sessionId:X_()},...d&&{error:d}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`order-processing`,anomalyType:t,messageType:`OrderCreated`,source:`${i.toLowerCase()}-order-service`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],priority:o.some(e=>e.unitPrice>100)?`high`:`normal`,customerId:r,orderId:n},correlationId:a,sessionId:r,scenario:`order-processing`,anomalyType:t}}function rv(e,t){let n=`TXN-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`ORD-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=X_(),a=$_[Math.floor(Math.random()*$_.length)],o=parseFloat((Math.random()*2e3+10).toFixed(2)),s=[`credit_card`,`debit_card`,`paypal`,`bank_transfer`,`apple_pay`][Math.floor(Math.random()*5)],c=`completed`,l=null;if(e)switch(t){case`dlq-candidate`:c=`declined`,l={code:`CARD_DECLINED`,message:`The card was declined by the issuing bank. Reason: insufficient funds.`,declineCode:`insufficient_funds`,timestamp:new Date().toISOString()};break;case`retry-loop`:c=`pending`,l={code:`GATEWAY_TIMEOUT`,message:`Payment gateway did not respond within timeout period. Request will be retried.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*5)+2};break;case`poison-message`:c=`error`,l={code:`INVALID_CARD_NUMBER`,message:`Card number failed Luhn check validation. Possible data corruption.`,timestamp:new Date().toISOString()};break;case`latency-spike`:c=`processing`,l={code:`FRAUD_CHECK_DELAY`,message:`Extended fraud analysis required for high-value transaction.`,timestamp:new Date().toISOString(),analysisTimeMs:Math.floor(Math.random()*6e4)+3e4};break}return{body:JSON.stringify({eventType:`PaymentProcessed`,eventVersion:`1.3`,timestamp:new Date().toISOString(),source:`${a.toLowerCase()}-payment-gateway`,data:{transactionId:n,orderId:r,amount:o,currency:`USD`,paymentMethod:s,status:c,processorResponse:{code:c===`completed`?`APPROVED`:`DECLINED`,message:c===`completed`?`Transaction approved`:l?.message,authorizationCode:c===`completed`?Math.random().toString(36).substring(2,8).toUpperCase():null,avsResult:`Y`,cvvResult:`M`},billing:{name:`${[`John`,`Jane`,`Michael`,`Sarah`,`David`][Math.floor(Math.random()*5)]} ${[`Smith`,`Johnson`,`Williams`,`Brown`,`Jones`][Math.floor(Math.random()*5)]}`,email:`billing@${a.toLowerCase()}.com`,phone:`+1-${Math.floor(Math.random()*900)+100}-${Math.floor(Math.random()*900)+100}-${Math.floor(Math.random()*9e3)+1e3}`},riskScore:Math.floor(Math.random()*100),...l&&{error:l}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`payment-gateway`,anomalyType:t,messageType:`PaymentProcessed`,source:`${a.toLowerCase()}-payment-gateway`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],transactionId:n,orderId:r,paymentStatus:c,amount:String(o)},correlationId:i,scenario:`payment-gateway`,anomalyType:t}}function iv(e,t){let n=`NOTIF-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=X_(),i=$_[Math.floor(Math.random()*$_.length)],a=[`email`,`sms`,`push`,`webhook`],o=a[Math.floor(Math.random()*a.length)],s={email:[`order-confirmation`,`shipping-update`,`password-reset`,`welcome`,`invoice`],sms:[`otp-verification`,`delivery-alert`,`payment-confirmation`,`appointment-reminder`],push:[`new-message`,`price-drop`,`back-in-stock`,`flash-sale`],webhook:[`order-status`,`inventory-update`,`customer-event`,`refund-processed`]},c=s[o][Math.floor(Math.random()*s[o].length)],l=`delivered`,u=null;if(e)switch(t){case`dlq-candidate`:l=`bounced`,u={code:`RECIPIENT_NOT_FOUND`,message:`Email address does not exist or mailbox is full.`,bounceType:`hard`,timestamp:new Date().toISOString()};break;case`retry-loop`:l=`retrying`,u={code:`SMTP_TEMPORARY_FAILURE`,message:`Recipient server temporarily unavailable. Will retry.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*6)+2};break;case`poison-message`:l=`failed`,u={code:`TEMPLATE_RENDER_ERROR`,message:`Failed to render notification template. Missing required variable: {{customerName}}`,timestamp:new Date().toISOString()};break;case`latency-spike`:l=`queued`,u={code:`RATE_LIMITED`,message:`Notification rate limit exceeded. Message queued for delayed delivery.`,timestamp:new Date().toISOString(),estimatedDeliveryMs:Math.floor(Math.random()*3e5)+6e4};break}let d=Array.from({length:Math.floor(Math.random()*3)+1},()=>`user${Math.floor(Math.random()*1e4)}@${i.toLowerCase()}.com`);return{body:JSON.stringify({eventType:`NotificationSent`,eventVersion:`1.0`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-notification-service`,data:{notificationId:n,type:o,template:c,status:l,recipients:d,subject:o===`email`?`[${i}] Your ${c.replace(`-`,` `)} notification`:void 0,content:{preview:`This is a ${c} notification from ${i}. Your recent activity has triggered this automated message.`,variables:{companyName:i,timestamp:new Date().toISOString(),actionUrl:`https://${i.toLowerCase()}.com/action/${n}`}},delivery:{attempts:l===`delivered`?1:Math.floor(Math.random()*5)+1,provider:[`sendgrid`,`mailgun`,`twilio`,`firebase`][Math.floor(Math.random()*4)],sentAt:new Date().toISOString(),deliveredAt:l===`delivered`?new Date().toISOString():null},...u&&{error:u}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`notification-service`,anomalyType:t,messageType:`NotificationSent`,source:`${i.toLowerCase()}-notification-service`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],notificationType:o,template:c,notificationStatus:l},correlationId:r,scenario:`notification-service`,anomalyType:t}}function av(e,t){let n=`INV-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=X_(),i=$_[Math.floor(Math.random()*$_.length)],a=Array.from({length:Math.floor(Math.random()*3)+1},()=>({sku:`SKU-${Math.random().toString(36).substring(2,8).toUpperCase()}`,productName:[`Laptop`,`Tablet`,`Headphones`,`Smartwatch`,`Camera`,`Speaker`][Math.floor(Math.random()*6)],warehouse:[`WH-EAST`,`WH-WEST`,`WH-CENTRAL`,`WH-SOUTH`][Math.floor(Math.random()*4)],previousQuantity:Math.floor(Math.random()*100),newQuantity:Math.floor(Math.random()*100),changeType:[`receipt`,`shipment`,`adjustment`,`transfer`][Math.floor(Math.random()*4)]})),o=`committed`,s=null;if(e)switch(t){case`dlq-candidate`:o=`rejected`,s={code:`NEGATIVE_INVENTORY`,message:`Cannot reduce inventory below zero for SKU ${a[0].sku}. Current: ${a[0].previousQuantity}, Requested change: -${a[0].previousQuantity+10}`,timestamp:new Date().toISOString()};break;case`retry-loop`:o=`pending`,s={code:`WAREHOUSE_SYNC_CONFLICT`,message:`Optimistic locking failure. Inventory was modified by another process.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*7)+3};break;case`poison-message`:o=`invalid`,s={code:`UNKNOWN_SKU`,message:`SKU ${a[0].sku} does not exist in the product catalog.`,timestamp:new Date().toISOString()};break;case`latency-spike`:o=`processing`,s={code:`CROSS_REGION_SYNC`,message:`Multi-region inventory synchronization in progress.`,timestamp:new Date().toISOString(),syncDurationMs:Math.floor(Math.random()*12e4)+6e4};break}return{body:JSON.stringify({eventType:`InventoryUpdated`,eventVersion:`2.0`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-inventory-service`,data:{eventId:n,status:o,items:a.map(e=>({...e,delta:e.newQuantity-e.previousQuantity,timestamp:new Date().toISOString()})),summary:{totalItemsAffected:a.length,totalUnitsChanged:a.reduce((e,t)=>e+Math.abs(t.newQuantity-t.previousQuantity),0)},audit:{initiatedBy:`system@${i.toLowerCase()}.com`,reason:[`customer-order`,`supplier-delivery`,`inventory-count`,`damaged-goods`][Math.floor(Math.random()*4)],referenceNumber:`REF-${Math.random().toString(36).substring(2,10).toUpperCase()}`},...s&&{error:s}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`inventory-update`,anomalyType:t,messageType:`InventoryUpdated`,source:`${i.toLowerCase()}-inventory-service`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],inventoryStatus:o,warehouseId:a[0].warehouse},correlationId:r,scenario:`inventory-update`,anomalyType:t}}function ov(e,t){let n=`UA-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`USER-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=X_(),a=$_[Math.floor(Math.random()*$_.length)],o=[`login`,`logout`,`page_view`,`button_click`,`form_submit`,`search`,`purchase`],s=o[Math.floor(Math.random()*o.length)],c=`recorded`,l=null;if(e)switch(t){case`dlq-candidate`:c=`invalid`,l={code:`USER_NOT_FOUND`,message:`User ${r} does not exist in the system.`,timestamp:new Date().toISOString()};break;case`retry-loop`:c=`pending`,l={code:`ANALYTICS_UNAVAILABLE`,message:`Analytics ingestion service temporarily unavailable.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*4)+2};break;case`poison-message`:c=`corrupted`,l={code:`INVALID_TIMESTAMP`,message:`Event timestamp is in the future or malformed.`,timestamp:new Date().toISOString()};break;case`latency-spike`:c=`buffered`,l={code:`HIGH_VOLUME_PERIOD`,message:`Event buffered due to high ingestion volume.`,timestamp:new Date().toISOString(),bufferTimeMs:Math.floor(Math.random()*3e4)+1e4};break}return{body:JSON.stringify({eventType:`UserActivityTracked`,eventVersion:`1.2`,timestamp:new Date().toISOString(),source:`${a.toLowerCase()}-analytics-service`,data:{eventId:n,userId:r,sessionId:X_(),activityType:s,status:c,context:{page:`/${[`home`,`products`,`cart`,`checkout`,`account`,`orders`][Math.floor(Math.random()*6)]}`,referrer:[`google.com`,`facebook.com`,`direct`,`email-campaign`,`partner-site`][Math.floor(Math.random()*5)],device:{type:[`desktop`,`mobile`,`tablet`][Math.floor(Math.random()*3)],os:[`Windows`,`macOS`,`iOS`,`Android`][Math.floor(Math.random()*4)],browser:[`Chrome`,`Firefox`,`Safari`,`Edge`][Math.floor(Math.random()*4)]},geo:{country:`US`,region:[`California`,`Texas`,`New York`,`Florida`,`Washington`][Math.floor(Math.random()*5)],city:[`Los Angeles`,`Houston`,`New York`,`Miami`,`Seattle`][Math.floor(Math.random()*5)]}},metrics:{timeOnPage:Math.floor(Math.random()*300),scrollDepth:Math.floor(Math.random()*100),interactionCount:Math.floor(Math.random()*20)},...l&&{error:l}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`user-activity`,anomalyType:t,messageType:`UserActivityTracked`,source:`${a.toLowerCase()}-analytics-service`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],activityType:s,userId:r},correlationId:i,scenario:`user-activity`,anomalyType:t}}function sv(e,t){let n=`ERR-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=X_(),i=$_[Math.floor(Math.random()*$_.length)],a=[{code:`DATABASE_CONNECTION_FAILED`,severity:`critical`,service:`database-proxy`},{code:`EXTERNAL_API_TIMEOUT`,severity:`warning`,service:`integration-gateway`},{code:`VALIDATION_ERROR`,severity:`info`,service:`api-gateway`},{code:`RATE_LIMIT_EXCEEDED`,severity:`warning`,service:`rate-limiter`},{code:`AUTHENTICATION_FAILED`,severity:`warning`,service:`auth-service`},{code:`RESOURCE_EXHAUSTED`,severity:`critical`,service:`compute-service`}],o=a[Math.floor(Math.random()*a.length)],s=`logged`,c=null;if(e)switch(t){case`dlq-candidate`:s=`unrecoverable`,c={level:`P1`,team:`platform-oncall`,escalatedAt:new Date().toISOString()};break;case`retry-loop`:s=`recurring`,c={occurrenceCount:Math.floor(Math.random()*50)+10,firstSeen:new Date(Date.now()-Math.random()*36e5).toISOString(),lastSeen:new Date().toISOString()};break;case`poison-message`:s=`circuit-breaker-open`,c={circuitBreakerId:`CB-${o.service}`,openedAt:new Date().toISOString(),failureThreshold:5,currentFailures:Math.floor(Math.random()*10)+5};break;case`latency-spike`:s=`degraded`,c={p99Latency:Math.floor(Math.random()*1e4)+5e3,normalP99:200,degradationFactor:Math.floor(Math.random()*50)+10};break}return{body:JSON.stringify({eventType:`ErrorOccurred`,eventVersion:`1.1`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-${o.service}`,data:{errorId:n,code:o.code,severity:o.severity,service:o.service,status:s,message:`${o.code.replace(/_/g,` `).toLowerCase()}: The ${o.service} encountered an issue while processing the request.`,stackTrace:`Error: ${o.code}\n at processRequest (/app/src/handlers/${o.service}.ts:142:15)\n at handleMessage (/app/src/core/messageProcessor.ts:87:22)\n at async ServiceBusReceiver.processMessage (/app/node_modules/@azure/service-bus/src/receivers/receiver.ts:234:9)`,context:{requestId:X_(),traceId:X_().replace(/-/g,``),spanId:Math.random().toString(16).substring(2,18),userId:Math.random()>.5?`USER-${Math.random().toString(36).substring(2,10).toUpperCase()}`:null},metadata:{hostname:`${o.service}-${Math.floor(Math.random()*10)}.${i.toLowerCase()}.internal`,podId:`${o.service}-${Math.random().toString(36).substring(2,10)}`,containerId:Math.random().toString(16).substring(2,14),kubernetesNamespace:`production`},...c&&{escalation:c}}},null,2),contentType:`application/json`,properties:{[Z_]:`true`,generatorVersion:Q_,generatedAt:new Date().toISOString(),scenario:`error-handling`,anomalyType:t,messageType:`ErrorOccurred`,source:`${i.toLowerCase()}-${o.service}`,environment:tv[Math.floor(Math.random()*tv.length)],region:ev[Math.floor(Math.random()*ev.length)],errorCode:o.code,severity:o.severity,errorStatus:s},correlationId:r,scenario:`error-handling`,anomalyType:t}}var cv={"order-processing":nv,"payment-gateway":rv,"notification-service":iv,"inventory-update":av,"user-activity":ov,"error-handling":sv};function lv(e){let{volume:t,scenarios:n,anomalyRate:r}=e,i=[],a=[`dlq-candidate`,`retry-loop`,`poison-message`,`latency-spike`];for(let e=0;e{n&&c(n),r&&h(r)},[n,r]),(0,I.useEffect)(()=>{r||h(``)},[s,r]),!e)return null;let E=f===`queue`?u:d,D=e=>{y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ee=async()=>{if(!s||!m||v.length===0){F.error(`Please select a namespace, entity, and at least one scenario`);return}C(!0);let e=F.loading(`Generating messages...`);try{let n=lv({targetType:f,queueName:f===`queue`?m:void 0,topicName:f===`topic`?m:void 0,volume:g,scenarios:v,anomalyRate:b,includeStructuredData:!0}),r=0,a=0,c=[];for(let t=0;t{await W_.send(s,m,{body:e.body,contentType:e.contentType,properties:e.properties,correlationId:e.correlationId,sessionId:e.sessionId},f)}))).forEach(e=>{if(e.status===`fulfilled`)r++;else{a++;let t=e.reason,n=t?.response?.data?.message||t?.message||`Unknown error`;c.push(n)}}),t+10setTimeout(e,100))}F.dismiss(e),r>0&&await Promise.all([o.invalidateQueries({queryKey:[`messages`],refetchType:`active`}),o.invalidateQueries({queryKey:[`queues`,s],refetchType:`active`}),o.invalidateQueries({queryKey:[`topics`,s],refetchType:`active`}),o.invalidateQueries({queryKey:[`subscriptions`,s],refetchType:`active`})]),a===0?F.success(`✅ Generated ${r} messages successfully!`,{duration:4e3}):r>0?F.success(`Generated ${r} messages (${a} failed).\nCheck console for details.`,{duration:5e3}):F.error(`Failed to generate messages. ${c[0]||`Unknown error`}`,{duration:5e3}),r>0&&i?.(),(a===0||r>0)&&t()}catch(t){F.dismiss(e);let n=t instanceof Error?t.message:`Unknown error`;F.error(`Failed to generate messages: ${n}`,{duration:5e3})}finally{C(!1)}},te=s&&m&&v.length>0;return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-gradient-to-r from-primary-50 to-blue-50`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-primary-100 rounded-lg`,children:(0,Z.jsx)(g_,{className:`w-5 h-5 text-primary-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Message Generator`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Generate realistic test messages for demo & validation`})]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-3 p-4 bg-primary-50 border border-primary-200 rounded-lg`,children:[(0,Z.jsx)(Gg,{className:`w-5 h-5 text-primary-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-primary-800`,children:[(0,Z.jsx)(`p`,{className:`font-medium mb-1`,children:`About Generated Messages`}),(0,Z.jsxs)(`p`,{className:`text-primary-700`,children:[`All generated messages are tagged with `,(0,Z.jsx)(`code`,{className:`bg-primary-100 px-1 rounded`,children:uv}),` property for easy identification. Messages include realistic business scenarios with structured JSON bodies, headers, and configurable anomalies for AI Insights testing.`]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Target`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace...`}),a?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Entity Type`}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>p(`queue`),className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${f===`queue`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📥 Queue`}),(0,Z.jsx)(`button`,{onClick:()=>p(`topic`),className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${f===`topic`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📢 Topic`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:f===`queue`?`Queue`:`Topic`}),(0,Z.jsxs)(`select`,{value:m,onChange:e=>h(e.target.value),disabled:!s,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsxs)(`option`,{value:``,children:[`Select `,f,`...`]}),E?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[f===`queue`?`📥`:`📢`,` `,e.name]},e.name))]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Volume`}),(0,Z.jsx)(`div`,{className:`flex gap-2`,children:fv.map(e=>(0,Z.jsx)(`button`,{onClick:()=>_(e),className:`flex-1 px-4 py-3 rounded-lg text-sm font-semibold transition-colors ${g===e?`bg-primary-500 text-white shadow-md`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:e},e))}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`Messages will be generated with varied timestamps and content`})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Scenarios`}),(0,Z.jsx)(`button`,{onClick:()=>y(v.length===Object.keys(pv).length?[]:dv()),className:`text-xs text-primary-600 hover:text-primary-700 font-medium`,children:v.length===Object.keys(pv).length?`Deselect All`:`Select All`})]}),(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:Object.entries(pv).map(([e,t])=>{let n=t.icon,r=v.includes(e);return(0,Z.jsxs)(`button`,{onClick:()=>D(e),className:`flex items-start gap-3 p-3 rounded-lg text-left transition-all ${r?`bg-primary-50 border-2 border-primary-400 shadow-sm`:`bg-gray-50 border-2 border-transparent hover:bg-gray-100`}`,children:[(0,Z.jsx)(`div`,{className:`p-1.5 rounded-md ${r?`bg-primary-100`:`bg-gray-200`}`,children:(0,Z.jsx)(n,{className:`w-4 h-4 ${r?`text-primary-600`:`text-gray-500`}`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium ${r?`text-primary-700`:`text-gray-700`}`,children:t.label}),r&&(0,Z.jsx)(Se,{className:`w-3.5 h-3.5 text-primary-600`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 truncate`,children:t.description})]})]},e)})})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider flex items-center gap-2`,children:[(0,Z.jsx)(O,{className:`w-4 h-4 text-amber-500`}),`Anomaly Rate`]}),(0,Z.jsxs)(`span`,{className:`text-sm font-semibold text-amber-600`,children:[b,`%`]})]}),(0,Z.jsx)(`input`,{type:`range`,min:`0`,max:`50`,value:b,onChange:e=>x(parseInt(e.target.value)),className:`w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-amber-500`}),(0,Z.jsxs)(`div`,{className:`flex justify-between text-xs text-gray-500`,children:[(0,Z.jsx)(`span`,{children:`0% (Normal)`}),(0,Z.jsx)(`span`,{children:`25% (Moderate)`}),(0,Z.jsx)(`span`,{children:`50% (Stress Test)`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`Anomalous messages simulate: DLQ candidates, retry loops, poison messages, and latency spikes. These help test AI Insights pattern detection.`})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 pt-4`,children:[(0,Z.jsxs)(`button`,{onClick:()=>T(!w),className:`flex items-center gap-2 text-sm text-gray-600 hover:text-gray-800`,children:[(0,Z.jsx)(p_,{className:`w-4 h-4`}),w?`Hide Cleanup Options`:`Show Cleanup Options`]}),w&&(0,Z.jsxs)(`div`,{className:`mt-3 p-4 bg-red-50 border border-red-200 rounded-lg`,children:[(0,Z.jsxs)(`p`,{className:`text-sm text-red-800 mb-3`,children:[(0,Z.jsx)(`strong`,{children:`Cleanup Generated Messages`}),(0,Z.jsx)(`br`,{}),`This will purge all messages with the `,(0,Z.jsx)(`code`,{className:`bg-red-100 px-1 rounded`,children:`ServiceHub-Generated`}),` property. Real messages will NOT be affected.`]}),(0,Z.jsx)(`button`,{className:`px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm font-medium rounded-lg transition-colors`,onClick:()=>{F(`Cleanup feature requires backend support. Messages can be identified by the ServiceHub-Generated property.`,{icon:`🧹`,duration:5e3})},children:`Purge Generated Messages`})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[v.length,` scenario(s) × `,g,` messages = `,(0,Z.jsx)(`strong`,{children:v.length>0?g:0}),` total`]}),(0,Z.jsxs)(`div`,{className:`flex gap-3`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:ee,disabled:!te||S,className:`flex items-center gap-2 px-6 py-2 text-sm font-medium rounded-lg transition-colors ${te&&!S?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-gray-200 text-gray-400 cursor-not-allowed`}`,children:S?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Xg,{className:`w-4 h-4 animate-spin`}),`Generating...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(g_,{className:`w-4 h-4`}),`Generate Messages`]})})]})]})]})]}),document.body)}function hv({namespaceId:e,queueName:t,entityType:n=`queue`,topicName:r,subscriptionName:i,environment:a,onMessageSent:o,onMessagesGenerated:s}){let c=a?.toLowerCase()===`prod`,[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)(null),[m,h]=(0,I.useState)(!1),g=(0,I.useRef)(null),_=l(),v=e&&(t||r&&i);(0,I.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&d(!1)};return u&&document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[u]);let y=()=>{_.invalidateQueries({queryKey:[`messages`]}),_.invalidateQueries({queryKey:[`queues`]}),_.invalidateQueries({queryKey:[`topics`]}),_.invalidateQueries({queryKey:[`subscriptions`]}),F.success(`Data refreshed`)};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`fixed bottom-8 right-8 z-50`,ref:g,children:[(0,Z.jsxs)(`div`,{className:` + absolute bottom-16 right-0 + flex flex-col gap-2 + transition-all duration-200 ease-out + ${u?`opacity-100 translate-y-0`:`opacity-0 translate-y-4 pointer-events-none`} + `,children:[(0,Z.jsxs)(`button`,{onClick:()=>{d(!1),y()},className:` + flex items-center gap-3 + px-4 py-3 + bg-white hover:bg-green-50 + border border-gray-200 hover:border-green-300 + rounded-xl shadow-lg hover:shadow-xl + transition-all duration-150 + group + `,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-green-100 rounded-lg group-hover:bg-green-200 transition-colors`,children:(0,Z.jsx)(Ee,{className:`w-5 h-5 text-green-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Refresh All`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Update queues & messages`})]})]}),c&&(0,Z.jsxs)(`div`,{className:`px-3 py-1.5 text-[11px] font-medium text-amber-700 bg-amber-50 border border-amber-200 rounded-lg mb-2 flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{children:`⚠`}),` Production — destructive actions disabled`]}),(0,Z.jsxs)(`button`,{onClick:c?void 0:async()=>{if(!e){F.error(`Please select a namespace first`);return}if(n===`topic`){if(!r||!i){F.error(`Please select a subscription to dead-letter messages`);return}}else if(!t){F.error(`Please select a queue first`);return}h(!0),d(!1);try{let a;n===`topic`&&r&&i?(a=await W_.deadLetter(e,r,3,`TestingDLQ`,`Manually moved to DLQ for testing purposes via ServiceHub UI`,`topic`,i),F.success(`✅ Moved ${a.deadLetteredCount} messages to DLQ from ${r}/${i}`)):t&&(a=await W_.deadLetter(e,t,3,`TestingDLQ`,`Manually moved to DLQ for testing purposes via ServiceHub UI`,`queue`),F.success(`✅ Moved ${a.deadLetteredCount} messages to DLQ from ${t}`)),a&&a.deadLetteredCount>0?await Promise.all([_.invalidateQueries({queryKey:[`messages`],refetchType:`active`}),_.invalidateQueries({queryKey:[`queues`,e],refetchType:`active`}),_.invalidateQueries({queryKey:[`topics`,e],refetchType:`active`}),_.invalidateQueries({queryKey:[`subscriptions`,e],refetchType:`active`})]):a&&a.deadLetteredCount===0&&F(`No messages available to dead-letter`,{icon:`ℹ️`})}catch(e){let t=e,n=t?.response?.data?.detail||t?.response?.data?.message||t?.message||`Failed to dead-letter messages`;F.error(`DLQ Error: ${n}`)}finally{h(!1)}},disabled:!v||m||c,className:` + flex items-center gap-3 + px-4 py-3 + border rounded-xl shadow-lg + transition-all duration-150 + group + ${!v||c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-red-50 border-gray-200 hover:border-red-300 hover:shadow-xl`} + `,title:c?`Quick Actions are disabled for Production namespaces`:`For testing: moves up to 3 messages from the active queue to the dead-letter queue`,children:[(0,Z.jsx)(`div`,{className:`p-2 rounded-lg transition-colors ${!v||c?`bg-gray-200`:`bg-red-100 group-hover:bg-red-200`}`,children:(0,Z.jsx)(c_,{className:`w-5 h-5 ${!v||c?`text-gray-400`:`text-red-600`}`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold ${!v||c?`text-gray-400`:`text-gray-800`}`,children:m?`Moving...`:`Test DLQ`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 max-w-[180px]`,children:e?n===`topic`?!r||!i?`Select a subscription first`:`Move up to 3 test msgs to DLQ`:t?`Move up to 3 test msgs to DLQ`:`Select a queue first`:`Select a namespace first`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>{d(!1),p(`generate`)},disabled:c,className:` + flex items-center gap-3 + px-4 py-3 + border rounded-xl shadow-lg + transition-all duration-150 + group + ${c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-amber-50 border-gray-200 hover:border-amber-300 hover:shadow-xl`} + `,title:c?`Quick Actions are disabled for Production namespaces`:void 0,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-amber-100 rounded-lg group-hover:bg-amber-200 transition-colors`,children:(0,Z.jsx)(g_,{className:`w-5 h-5 text-amber-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Generate Messages`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Create realistic test data`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>{d(!1),p(`send`)},disabled:c,className:` + flex items-center gap-3 + px-4 py-3 + border rounded-xl shadow-lg + transition-all duration-150 + group + ${c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-sky-50 border-gray-200 hover:border-sky-300 hover:shadow-xl`} + `,title:c?`Quick Actions are disabled for Production namespaces`:void 0,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-sky-100 rounded-lg group-hover:bg-sky-200 transition-colors`,children:(0,Z.jsx)(o_,{className:`w-5 h-5 text-sky-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Send Message`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Send a single message`})]})]})]}),(0,Z.jsx)(`button`,{onClick:()=>d(!u),className:` + flex items-center justify-center + w-14 h-14 + bg-gradient-to-br from-sky-500 to-sky-600 hover:from-sky-600 hover:to-sky-700 + text-white + rounded-full shadow-lg hover:shadow-xl + transition-all duration-200 ease-out + ring-4 ring-sky-200 ring-offset-2 + ${u?`rotate-45`:`rotate-0`} + `,title:u?`Close menu`:`Open message menu`,children:u?(0,Z.jsx)(Fe,{className:`w-6 h-6`}):(0,Z.jsx)(we,{className:`w-6 h-6`})})]}),(0,Z.jsx)(Y_,{isOpen:f===`send`,onClose:()=>p(null),onSend:e=>{let t=e.messageCount,n=`${e.entityType===`topic`?`📢`:`📥`} ${e.entity}`;F.success(t>1?`Sent ${t} messages to ${n}`:`Message sent to ${n}`),o?.(e),p(null)},defaultNamespaceId:e,defaultQueueName:t}),(0,Z.jsx)(mv,{isOpen:f===`generate`,onClose:()=>p(null),defaultNamespaceId:e,defaultEntityName:n===`topic`?r:t,onGenerated:()=>{s?.()}})]})}var gv=[{id:`page-dashboard`,label:`Dashboard`,description:`Multi-namespace overview`,group:`Pages`,icon:(0,Z.jsx)(Jg,{className:`w-4 h-4`}),keywords:`home overview`},{id:`page-messages`,label:`Messages`,description:`Browse and send messages`,group:`Pages`,icon:(0,Z.jsx)(Qg,{className:`w-4 h-4`}),keywords:`queue browse send`},{id:`page-scheduled`,label:`Scheduled Messages`,description:`View and cancel scheduled deliveries`,group:`Pages`,icon:(0,Z.jsx)(xe,{className:`w-4 h-4`}),keywords:`future timed deliver`},{id:`page-correlation`,label:`Correlation Explorer`,description:`Trace messages by correlation ID`,group:`Pages`,icon:(0,Z.jsx)(de,{className:`w-4 h-4`}),keywords:`trace journey timeline correlation`},{id:`page-dlq`,label:`DLQ History`,description:`Dead-letter queue audit trail`,group:`Pages`,icon:(0,Z.jsx)(He,{className:`w-4 h-4`}),keywords:`dead letter poisoned failed`},{id:`page-rules`,label:`Auto-Replay Rules`,description:`Manage auto-replay configuration`,group:`Pages`,icon:(0,Z.jsx)(Ee,{className:`w-4 h-4`}),keywords:`replay retry automation`},{id:`page-health`,label:`Health`,description:`API and service health status`,group:`Pages`,icon:(0,Z.jsx)(je,{className:`w-4 h-4`}),keywords:`status ping uptime`},{id:`page-connect`,label:`Connect`,description:`Add or manage Service Bus namespaces`,group:`Pages`,icon:(0,Z.jsx)(a_,{className:`w-4 h-4`}),keywords:`namespace add connection string`},{id:`page-help`,label:`Help`,description:`Quick reference and shortcuts`,group:`Pages`,icon:(0,Z.jsx)(Ge,{className:`w-4 h-4`}),keywords:`docs guide keyboard`}],_v={"page-dashboard":`/dashboard`,"page-messages":`/messages`,"page-scheduled":`/scheduled`,"page-correlation":`/correlation`,"page-dlq":`/dlq-history`,"page-rules":`/rules`,"page-health":`/health`,"page-connect":`/connect`,"page-help":`/help`};function vv(e,t){if(!e)return!0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0;for(let e=0;e{e&&(a(``),s(0),setTimeout(()=>c.current?.focus(),30))},[e]);let u=(0,I.useMemo)(()=>{let e=gv.map(e=>({...e,action:()=>{n(_v[e.id]),t()}})),i=r.map(e=>({id:`ns-${e.id}`,label:e.displayName||e.name,description:e.environment?`${e.environment} namespace`:`Namespace`,group:`Namespaces`,icon:(0,Z.jsx)(A,{className:`w-4 h-4 text-blue-500`}),keywords:e.name+` `+(e.environment||``),action:()=>{n(`/?namespace=${e.id}`),t()}})),a=r.flatMap(e=>[{id:`action-dlq-${e.id}`,label:`Browse DLQ — ${e.displayName||e.name}`,description:`View dead-letter messages`,group:`Actions`,icon:(0,Z.jsx)(He,{className:`w-4 h-4 text-red-500`}),keywords:`dead letter queue`,action:()=>{n(`/messages?namespace=${e.id}&tab=dlq`),t()}},{id:`action-scheduled-${e.id}`,label:`Scheduled — ${e.displayName||e.name}`,description:`View scheduled messages`,group:`Actions`,icon:(0,Z.jsx)(xe,{className:`w-4 h-4 text-purple-500`}),keywords:`future timed`,action:()=>{n(`/scheduled?namespace=${e.id}`),t()}}]);return[...e,...i,...a]},[r,n,t]),d=(0,I.useMemo)(()=>i?u.map(e=>({item:e,score:yv(i,e)})).filter(({score:e})=>e>0).sort((e,t)=>t.score-e.score).map(({item:e})=>e):u,[u,i]),f=(0,I.useMemo)(()=>{let e=[],t=new Set;for(let n of d)t.has(n.group)||(t.add(n.group),e.push({label:n.group,items:[]})),e[e.length-1].items.push(n);return e},[d]),p=(0,I.useMemo)(()=>d,[d]);(0,I.useEffect)(()=>{s(e=>Math.max(0,Math.min(e,p.length-1)))},[p.length]),(0,I.useEffect)(()=>{l.current&&l.current.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[o]);let m=(0,I.useCallback)(e=>{e.key===`ArrowDown`?(e.preventDefault(),s(e=>Math.min(e+1,p.length-1))):e.key===`ArrowUp`?(e.preventDefault(),s(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),p[o]?.action()):e.key===`Escape`&&t()},[p,o,t]);if(!e)return null;let h=0;return(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/40 backdrop-blur-sm`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative w-full max-w-xl mx-4 bg-white rounded-2xl shadow-2xl overflow-hidden border border-gray-200 flex flex-col max-h-[60vh]`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3 border-b border-gray-100`,children:[(0,Z.jsx)(k,{className:`w-4 h-4 text-gray-400 shrink-0`}),(0,Z.jsx)(`input`,{ref:c,type:`text`,value:i,onChange:e=>{a(e.target.value),s(0)},onKeyDown:m,placeholder:`Search pages, namespaces, actions…`,className:`flex-1 bg-transparent text-sm text-gray-900 placeholder-gray-400 outline-none`,autoComplete:`off`,spellCheck:!1}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-400 shrink-0 hidden sm:block`,children:`ESC to close`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors sm:hidden`,"aria-label":`Close`,children:(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5 text-gray-400`})})]}),(0,Z.jsxs)(`ul`,{ref:l,className:`overflow-y-auto flex-1 py-2`,role:`listbox`,children:[f.length===0&&(0,Z.jsxs)(`li`,{className:`px-4 py-8 text-center text-sm text-gray-400`,children:[`No results for “`,i,`”`]}),f.map(e=>(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`div`,{className:`px-4 py-1.5 text-[10px] font-semibold uppercase tracking-widest ${xv[e.label]}`,children:e.label}),(0,Z.jsx)(`ul`,{children:e.items.map(e=>{let t=h++,n=t===o;return(0,Z.jsxs)(`li`,{"data-active":n,role:`option`,"aria-selected":n,className:`flex items-center gap-3 px-4 py-2.5 cursor-pointer transition-colors ${n?`bg-primary-50`:`hover:bg-gray-50`}`,onClick:e.action,onMouseEnter:()=>s(t),children:[(0,Z.jsx)(`span`,{className:`shrink-0 ${n?`text-primary-600`:`text-gray-400`}`,children:e.icon}),(0,Z.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`span`,{className:`block text-sm font-medium truncate ${n?`text-primary-700`:`text-gray-800`}`,children:(0,Z.jsx)(bv,{text:e.label,query:i})}),e.description&&(0,Z.jsx)(`span`,{className:`block text-xs text-gray-400 truncate`,children:e.description})]}),n&&(0,Z.jsx)(ze,{className:`w-3.5 h-3.5 text-primary-400 shrink-0`})]},e.id)})})]},e.label))]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-100 px-4 py-2 flex items-center gap-4 text-[11px] text-gray-400`,children:[(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`↑↓`}),` navigate`]}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`↵`}),` select`]}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`Esc`}),` close`]})]})]})]})}var Cv=[{group:`Navigation`,items:[{keys:[`⌘`,`K`],label:`Open command palette`},{keys:[`?`],label:`Show this shortcuts list`}]},{group:`Message List`,items:[{keys:[`J`],label:`Next message`},{keys:[`K`],label:`Previous message`},{keys:[`Enter`],label:`Open message detail`},{keys:[`Esc`],label:`Close detail panel`}]},{group:`Global`,items:[{keys:[`Esc`],label:`Close any open dialog or panel`}]}];function wv({open:e,onClose:t}){return(0,I.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,role:`dialog`,"aria-modal":`true`,"aria-label":`Keyboard shortcuts`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/30 backdrop-blur-[2px]`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-2xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden border border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-4 border-b border-gray-100`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-800 font-semibold text-sm`,children:[(0,Z.jsx)(Kg,{className:`w-4 h-4 text-gray-500`}),`Keyboard Shortcuts`]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,"aria-label":`Close`,children:(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`px-5 py-4 space-y-4`,children:Cv.map(e=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-2`,children:e.group}),(0,Z.jsx)(`ul`,{className:`space-y-1.5`,children:e.items.map(e=>(0,Z.jsxs)(`li`,{className:`flex items-center justify-between text-sm`,children:[(0,Z.jsx)(`span`,{className:`text-gray-600`,children:e.label}),(0,Z.jsx)(`span`,{className:`flex items-center gap-1`,children:e.keys.map(e=>(0,Z.jsx)(`kbd`,{className:`px-1.5 py-0.5 text-xs font-mono bg-gray-100 border border-gray-200 rounded text-gray-700 leading-none`,children:e},e))})]},e.label))})]},e.group))}),(0,Z.jsxs)(`div`,{className:`px-5 py-3 border-t border-gray-100 text-center text-xs text-gray-400`,children:[`Press `,(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`?`}),` anywhere to toggle`]})]})]}):null}function Tv(){let[e]=se(),t=l(),[n,r]=(0,I.useState)(!1),[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(!1);(0,I.useEffect)(()=>{if(!Be()){let e=setTimeout(()=>r(!0),800);return()=>clearTimeout(e)}},[]);let c=(0,I.useCallback)(()=>r(!0),[]);(0,I.useEffect)(()=>(window.addEventListener(`servicehub:start-tour`,c),()=>window.removeEventListener(`servicehub:start-tour`,c)),[c]),(0,I.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),a(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,I.useEffect)(()=>{let e=()=>a(!0);return window.addEventListener(`servicehub:open-palette`,e),()=>window.removeEventListener(`servicehub:open-palette`,e)},[]),(0,I.useEffect)(()=>{let e=e=>{let t=e.target?.tagName;t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.key===`?`&&(e.preventDefault(),s(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let u=e.get(`namespace`),d=e.get(`queue`),f=e.get(`topic`),p=e.get(`subscription`),m=window.location.pathname===`/messages`,{data:h}=le(),g=h?.find(e=>e.id===u),_=g?.environment===`dev`&&g?.hasManagePermission===!0,v=f?`topic`:`queue`,y=d||f||``;return(0,Z.jsxs)(`div`,{className:`h-screen flex flex-col bg-gray-50`,children:[(0,Z.jsx)(v_,{}),(0,Z.jsxs)(`div`,{className:`flex flex-1 overflow-hidden`,children:[(0,Z.jsx)(V_,{}),(0,Z.jsx)(`main`,{className:`flex-1 overflow-hidden flex flex-col`,children:(0,Z.jsx)(oe,{})})]}),m&&_&&(0,Z.jsx)(hv,{namespaceId:u,queueName:y,entityType:v,topicName:f,subscriptionName:p,environment:g?.environment,onMessageSent:()=>{t.invalidateQueries({queryKey:[`messages`],refetchType:`none`}),t.invalidateQueries({queryKey:[`queues`],refetchType:`none`}),t.invalidateQueries({queryKey:[`topics`],refetchType:`none`}),t.invalidateQueries({queryKey:[`subscriptions`],refetchType:`none`})},onMessagesGenerated:()=>{t.invalidateQueries({queryKey:[`messages`],refetchType:`none`}),t.invalidateQueries({queryKey:[`queues`],refetchType:`none`}),t.invalidateQueries({queryKey:[`topics`],refetchType:`none`}),t.invalidateQueries({queryKey:[`subscriptions`],refetchType:`none`})}}),(0,Z.jsx)(Ke,{isActive:n,onComplete:()=>r(!1)}),(0,Z.jsx)(Sv,{open:i,onClose:()=>a(!1)}),(0,Z.jsx)(wv,{open:o,onClose:()=>s(!1)}),(0,Z.jsx)(H_,{})]})}function Ev(e){let t=new Date().getTime()-e.getTime(),n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24);return n<60?`just now`:r<60?`${r}m ago`:i<24?`${i}h ago`:`${a}d ago`}var Dv={success:{icon:Ce,label:`Normal`,tooltip:`First delivery attempt (delivery count = 1)`,bgColor:`bg-green-100`,textColor:`text-green-700`,iconColor:`text-green-600`},warning:{icon:O,label:`Retried`,tooltip:`Message has been retried (delivery count > 1)`,bgColor:`bg-amber-100`,textColor:`text-amber-700`,iconColor:`text-amber-600`},error:{icon:Le,label:`Dead-Letter`,tooltip:`Message is in the dead-letter queue`,bgColor:`bg-red-100`,textColor:`text-red-700`,iconColor:`text-red-600`}};function Ov({status:e,deliveryCount:t}){let n=Dv[e],r=n.icon,i=t!==void 0&&e!==`success`?`ServiceHub Assessment: ${n.tooltip} — Delivery count: ${t}`:n.tooltip;return(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${n.bgColor} ${n.textColor} cursor-pointer transition-opacity hover:opacity-80`,title:i,children:[(0,Z.jsx)(r,{size:12,className:n.iconColor}),n.label]})}function kv(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_.-]+/g,` `).trim()}var Av=(0,I.memo)(function({message:e,isSelected:t,onClick:n}){let r=(0,I.useMemo)(()=>e.eventType?kv(e.eventType):e.displayTitle?kv(e.displayTitle):`Message`,[e.eventType,e.displayTitle]);return(0,Z.jsxs)(`div`,{onClick:n,className:` + px-4 py-4 cursor-pointer transition-colors border-b border-gray-100 + ${t?`bg-primary-50 border-l-4 border-l-primary-500`:`bg-transparent hover:bg-gray-50 border-l-4 border-l-transparent`} + `,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`span`,{className:`font-bold text-base text-gray-900 truncate flex-1 mr-2`,children:r}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-400 cursor-help whitespace-nowrap`,title:e.enqueuedTime.toISOString(),children:Ev(e.enqueuedTime)})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(Ov,{status:e.status,deliveryCount:e.deliveryCount}),e.scheduledEnqueueTime&&(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-700`,title:`Scheduled for ${new Date(e.scheduledEnqueueTime).toLocaleString()}`,children:[(0,Z.jsx)(xe,{size:12}),`Scheduled`]}),e.hasAIInsight&&(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-primary-100 text-primary-700`,children:[(0,Z.jsx)(Tg,{size:12}),`AI`]})]}),(0,Z.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600 leading-relaxed overflow-hidden`,style:{display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`},children:e.preview})]})});function jv({messages:e,selectedId:t,onSelectMessage:n,queueTab:r,onQueueTabChange:i,activeCounts:a,hasMoreMessages:o=!1,isLoadingMore:s=!1,onLoadMore:c}){let l=(0,I.useRef)(null),u=(0,I.useMemo)(()=>e.filter(e=>e.queueType===r),[e,r]),d=(0,I.useCallback)(e=>{e>=0&&e{let e=e=>{if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||!u.length)return;let n=u.findIndex(e=>e.id===t),r=-1;e.key===`j`||e.key===`ArrowDown`?(e.preventDefault(),r=n0?n-1:n),r!==-1&&r!==n&&d(r)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u,t,d]);let f=Ye({count:u.length,getScrollElement:()=>l.current,estimateSize:()=>148,measureElement:e=>e.getBoundingClientRect().height,overscan:10}),p=f.getVirtualItems();return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full border-r border-gray-200 bg-white`,style:{width:420},children:[(0,Z.jsxs)(`div`,{className:`flex border-b border-gray-200 bg-white shrink-0`,children:[(0,Z.jsxs)(`button`,{onClick:()=>i(`active`),className:` + flex-1 px-4 py-3 text-sm font-medium transition-colors relative + ${r===`active`?`text-primary-600 border-b-2 border-primary-500`:`text-gray-500 hover:text-gray-700`} + `,children:[`Active (`,a.active.toLocaleString(),`)`]}),(0,Z.jsx)(`button`,{onClick:()=>i(`deadletter`),className:` + flex-1 px-4 py-3 text-sm font-medium transition-colors relative + ${r===`deadletter`?`text-primary-600 border-b-2 border-primary-500`:`text-gray-500 hover:text-gray-700`} + `,children:(0,Z.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[`Dead-Letter (`,a.deadletter.toLocaleString(),`)`,a.deadletter>0&&(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-red-500`})]})})]}),(0,Z.jsxs)(`div`,{ref:l,className:`flex-1 overflow-auto`,children:[(0,Z.jsx)(`div`,{style:{height:f.getTotalSize(),width:`100%`,position:`relative`},children:p.map(e=>{let r=u[e.index];return(0,Z.jsx)(`div`,{ref:f.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:(0,Z.jsx)(Av,{message:r,isSelected:r.id===t,onClick:()=>n(r.id)})},e.key)})}),u.length===0&&(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-gray-500 p-8`,children:[(0,Z.jsx)(Ce,{size:48,className:`text-gray-300 mb-4`}),(0,Z.jsx)(`p`,{className:`text-lg font-medium`,children:`No messages`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 text-center max-w-xs`,children:r===`deadletter`?`Dead-letter queue is empty — no messages have been dead-lettered`:`Active queue is empty — no messages are currently pending`})]})]}),o&&u.length>0&&c&&(0,Z.jsx)(`div`,{className:`border-t border-gray-200 bg-white p-3 shrink-0`,children:(0,Z.jsx)(`button`,{onClick:c,disabled:s,className:`w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors ${s?`bg-gray-100 text-gray-500 cursor-not-allowed`:`bg-primary-50 text-primary-700 hover:bg-primary-100 border border-primary-200`}`,children:s?(0,Z.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-primary-300 border-t-primary-600 rounded-full animate-spin`}),`Loading more...`]}):`📥 Load More Messages`})})]})}var Mv=`servicehub:detail-tab`,Nv=[`properties`,`body`,`ai`,`headers`],Pv=`properties`;function Fv(){let[e,t]=(0,I.useState)(()=>{if(typeof window>`u`)return Pv;try{let e=localStorage.getItem(Mv);if(e&&Nv.includes(e))return e}catch{}return Pv}),n=(0,I.useCallback)(e=>{Nv.includes(e)||(e=Pv),t(e);try{localStorage.setItem(Mv,e)}catch{}},[]);return(0,I.useEffect)(()=>{let e=e=>{e.key===Mv&&e.newValue&&Nv.includes(e.newValue)&&t(e.newValue)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),[e,n]}function Iv({label:e,value:t,mono:n=!1}){return(0,Z.jsxs)(`div`,{className:`py-3 grid grid-cols-[180px_1fr] gap-4 border-b border-gray-100 last:border-0`,children:[(0,Z.jsx)(`dt`,{className:`text-sm font-medium text-gray-500`,children:e}),(0,Z.jsx)(`dd`,{className:`text-sm text-gray-900 break-all ${n?`font-mono`:``}`,children:t||`-`})]})}var Lv={test:{label:`Test/Manual`,description:`This message was manually moved to DLQ for testing or inspection purposes. Not a production failure.`,color:`gray`},warning:{label:`Warning`,description:`Real dead-letter message with normal retry behavior (delivery count ≤ 5).`,color:`amber`},critical:{label:`Critical`,description:`Message failed 6+ delivery attempts - indicates persistent processing failure.`,color:`red`}};function Rv(e){let t=(e.deadLetterReason||``).toLowerCase(),n=(e.deadLetterSource||``).toLowerCase();return t.includes(`test`)||t.includes(`demo`)||t.includes(`manual`)||n.includes(`servicehub`)||n.includes(`testing`)?`test`:e.deliveryCount>5?`critical`:`warning`}function zv(e){if(!(e.queueType===`deadletter`||e.deadLetterReason))return null;let t=e.deadLetterReason?.trim(),n=e.deadLetterSource?.trim(),r=t||`Not provided by Azure Service Bus`,i=n||`Not provided by Azure Service Bus`,a=!t||!n,o=Rv(e),s=``,c=[];return a?(s=`Azure Service Bus did not provide complete dead-letter metadata. The message state information is incomplete.`,c.push(`Check Azure Portal for additional message properties`),c.push(`Verify Service Bus SDK version supports complete metadata`),c.push(`Consider checking application logs for the original failure context`),{reason:r,description:i,interpretation:s,guidance:c,severity:`warning`,hasIncompleteData:a}):(o===`test`?(s=`This appears to be a test or manually dead-lettered message, likely used for inspection or system validation.`,c.push(`Review whether this test message should be purged or kept for reference`),c.push(`Verify test data is not mixed with production messages`)):e.deliveryCount>5?(s=`This message failed multiple delivery attempts, indicating a persistent processing issue.`,c.push(`Check application logs for repeated failure patterns`),c.push(`Review error details in the message body`),c.push(`Verify downstream service availability and health`)):e.deliveryCount>1?(s=`This message was retried before being dead-lettered, suggesting a transient or resolvable issue.`,c.push(`Review the message body for error details`),c.push(`Check if the underlying issue has been resolved before replaying`)):(s=`This message was dead-lettered on the first delivery attempt.`,c.push(`Review the message body for validation or schema errors`),c.push(`Check application logs for the original processing failure`)),{reason:r,description:i,interpretation:s,guidance:c,severity:o,hasIncompleteData:a})}function Bv({message:e}){let t=fe(),[n]=se(),r=n.get(`namespace`)??``,i=e.properties?.correlationId,a=zv(e),o=a?Lv[a.severity]:null;return(0,Z.jsxs)(`div`,{className:`p-4 space-y-4`,children:[a&&o&&(0,Z.jsxs)(Z.Fragment,{children:[a.hasIncompleteData&&(0,Z.jsxs)(`div`,{className:`mb-3 rounded-lg border-2 border-yellow-300 bg-yellow-50 px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-yellow-800 text-sm font-medium`,children:[(0,Z.jsx)(O,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{children:`Incomplete Azure Data`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-yellow-700 mt-1`,children:`Azure Service Bus did not provide complete dead-letter metadata. Analysis may be limited.`})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg overflow-hidden border-2 ${a.severity===`test`?`bg-gray-50 border-gray-200`:a.severity===`critical`?`bg-red-50 border-red-300`:`bg-amber-50 border-amber-300`}`,children:[(0,Z.jsxs)(`div`,{className:`px-4 py-3 border-b flex items-center gap-2 ${a.severity===`test`?`bg-gray-100 border-gray-200`:a.severity===`critical`?`bg-red-100 border-red-200`:`bg-amber-100 border-amber-200`}`,children:[(0,Z.jsx)(O,{className:`w-5 h-5 ${a.severity===`test`?`text-gray-500`:a.severity===`critical`?`text-red-600`:`text-amber-600`}`}),(0,Z.jsx)(`span`,{className:`font-semibold ${a.severity===`test`?`text-gray-700`:a.severity===`critical`?`text-red-800`:`text-amber-800`}`,children:`Dead-Letter Queue Message`}),(0,Z.jsxs)(`span`,{className:`ml-auto text-xs px-2 py-1 rounded-full font-medium cursor-help flex items-center gap-1 ${a.severity===`test`?`bg-gray-200 text-gray-700`:a.severity===`critical`?`bg-red-200 text-red-800`:`bg-amber-200 text-amber-800`}`,title:`⚠️ ServiceHub Assessment (Not Azure Data): ${o.description}`,children:[o.label,(0,Z.jsx)(Ge,{className:`w-3 h-3 opacity-70`})]})]}),(0,Z.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`text-xs font-semibold uppercase tracking-wide mb-2 flex items-center gap-1 text-gray-700`,children:[(0,Z.jsx)(`span`,{className:`bg-green-100 text-green-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`FACT`}),`Azure Service Bus Data`]}),(0,Z.jsxs)(`div`,{className:`bg-white border border-gray-200 rounded-lg p-3 space-y-2`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`DeadLetterReason`}),(0,Z.jsx)(`div`,{className:`text-sm font-mono text-gray-900 break-all`,children:a.reason})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`DeadLetterErrorDescription`}),(0,Z.jsx)(`div`,{className:`text-sm font-mono text-gray-900 break-all`,children:a.description})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`Delivery Count`}),(0,Z.jsx)(`div`,{className:`text-sm text-gray-900`,children:e.deliveryCount})]})]})]}),(0,Z.jsx)(`div`,{className:`border-t-2 border-dashed border-gray-300 my-4`}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 rounded-lg p-3 border border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`text-xs font-semibold uppercase tracking-wide mb-2 flex items-center gap-1 text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`ASSESSMENT`}),(0,Z.jsx)(Gg,{className:`w-3 h-3`}),`ServiceHub Interpretation`]}),(0,Z.jsx)(`div`,{className:`text-sm text-gray-700 leading-relaxed`,children:a.interpretation})]}),(0,Z.jsxs)(`details`,{className:`group bg-gray-50 rounded-lg border border-gray-200 overflow-hidden`,open:a.severity!==`test`,children:[(0,Z.jsx)(`summary`,{className:`px-3 py-2 text-xs font-semibold uppercase tracking-wide cursor-pointer select-none list-none text-gray-600 bg-gray-100 hover:bg-gray-150`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,Z.jsx)(ze,{className:`w-3 h-3 transition-transform group-open:rotate-90`}),(0,Z.jsx)(`span`,{className:`bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`GUIDANCE`}),`Suggested Actions`]})}),(0,Z.jsx)(`ul`,{className:`p-3 space-y-1.5 text-sm text-gray-700`,children:a.guidance.map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400 mt-0.5`,children:`•`}),(0,Z.jsx)(`span`,{children:e})]},t))})]})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border-2 border-sky-100 shadow-sm overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-sky-500 to-sky-600 px-4 py-2.5`,children:(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-white`,children:`Complete Message Properties`})}),(0,Z.jsxs)(`dl`,{className:`p-4`,children:[(0,Z.jsx)(Iv,{label:`Message ID`,value:e.id,mono:!0}),(0,Z.jsx)(Iv,{label:`Enqueued Time`,value:e.enqueuedTime.toISOString(),mono:!0}),(0,Z.jsx)(Iv,{label:`Delivery Count`,value:`${e.deliveryCount} (current session)`}),(0,Z.jsx)(`div`,{className:`py-2 px-3 bg-gray-50 rounded border-l-2 border-gray-300 my-2`,children:(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600 leading-relaxed`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Note:`}),` Delivery count reflects attempts in the current session. This value resets when messages move between queues, sessions expire, or manual intervention occurs. Total historical delivery attempts may be higher.`]})}),(0,Z.jsx)(Iv,{label:`Time To Live`,value:e.timeToLive}),(0,Z.jsx)(Iv,{label:`Sequence Number`,value:e.sequenceNumber.toLocaleString(),mono:!0}),(0,Z.jsx)(Iv,{label:`Content Type`,value:e.contentType}),(0,Z.jsx)(Iv,{label:`Lock Token`,value:e.lockToken,mono:!0}),e.queueType===`deadletter`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`pt-4 pb-2 border-t border-gray-200 mt-2`,children:(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-red-600 uppercase tracking-wide`,children:`Dead-Letter Information`})}),e.deadLetterReason&&(0,Z.jsx)(Iv,{label:`Dead-Letter Reason`,value:e.deadLetterReason}),e.deadLetterSource&&(0,Z.jsx)(Iv,{label:`Dead-Letter Source`,value:e.deadLetterSource})]})]})]}),Object.keys(e.properties||{}).length>0&&(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border-2 border-sky-100 shadow-sm overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-sky-400 to-sky-500 px-4 py-2.5 flex items-center gap-2`,children:[(0,Z.jsx)(Gg,{className:`w-4 h-4 text-white`}),(0,Z.jsx)(`h4`,{className:`text-sm font-semibold text-white`,children:`Custom Application Properties`})]}),(0,Z.jsx)(`dl`,{className:`p-4`,children:Object.entries(e.properties).map(([e,t])=>(0,Z.jsx)(Iv,{label:e,value:String(t),mono:!0},e))})]}),i&&(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsxs)(`button`,{onClick:()=>t(`/correlation?correlationId=${encodeURIComponent(i)}${r?`&namespaceId=${encodeURIComponent(r)}`:``}`),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-violet-700 bg-violet-50 hover:bg-violet-100 border border-violet-200 rounded-lg transition-colors`,children:[(0,Z.jsx)(de,{className:`w-4 h-4`}),`🔍 Trace Correlation`]})}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsxs)(`button`,{onClick:async()=>{let t=n.get(`queue`)||n.get(`topic`)||``,r=[`## Message Incident Report`,`**Generated by ServiceHub** · ${new Date().toISOString()}`,``,`| Field | Value |`,`|---|---|`,`| Message ID | ${e.id} |`,`| Queue/Entity | ${t} |`,`| Enqueued | ${e.enqueuedTime?new Date(e.enqueuedTime).toISOString():`-`} |`,`| Delivery Count | ${e.deliveryCount} |`,`| State | ${e.queueType} |`];e.deadLetterReason&&r.push(`| DLQ Reason | ${e.deadLetterReason} |`),e.deadLetterSource&&r.push(`| DLQ Description | ${e.deadLetterSource} |`),i&&r.push(`| Correlation ID | ${i} |`),r.push(``,`**Body Preview:**`,``,e.body?e.body.substring(0,500):`-`),r.push(``,`**Tool:** https://app-servicehub-prod.azurewebsites.net`),await me(r.join(` +`))?F.success(`Report copied to clipboard`):F.error(`Failed to copy report`)},className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-violet-700 bg-violet-50 hover:bg-violet-100 border border-violet-200 rounded-lg transition-colors`,children:[(0,Z.jsx)(jg,{className:`w-4 h-4`}),`📋 Copy as Report`]})})]})}function Vv(e){try{let t=JSON.parse(e);return JSON.stringify(t,null,2)}catch{return e}}function Hv(e){try{return(0,Z.jsx)(`div`,{className:`font-mono`,style:{whiteSpace:`pre`},children:e.split(` +`).map((e,t)=>{let n=e.trim();if(!n)return(0,Z.jsx)(`div`,{className:`leading-6`,style:{height:`1.5rem`},children:`\xA0`},t);let r=e.match(/^(\s*)/)?.[1].length||0,i=`\xA0`.repeat(r),a=()=>{if(/^[{}[\],]*$/.test(n))return(0,Z.jsxs)(Z.Fragment,{children:[i,(0,Z.jsx)(`span`,{className:`text-gray-400`,children:n})]});if(n.includes(`:`)){let e=-1,t=!1;for(let r=0;r-1){let t=n.substring(0,e),r=n.substring(e+1);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{children:i}),(0,Z.jsx)(`span`,{className:`text-blue-400`,children:t}),(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`:`}),o(r)]})}}return(0,Z.jsxs)(Z.Fragment,{children:[i,(0,Z.jsx)(`span`,{className:`text-gray-300`,children:n})]})},o=e=>{let t=e.trim();return t.startsWith(`"`)?(0,Z.jsx)(`span`,{className:`text-green-400`,children:e}):/^-?\d+\.?\d*,?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-orange-400`,children:e}):/^(true|false),?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-purple-400`,children:e}):/^null,?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-gray-500`,children:e}):t.match(/^[[{]/)?(0,Z.jsx)(`span`,{className:`text-gray-400`,children:e}):(0,Z.jsx)(`span`,{className:`text-gray-300`,children:e})};return(0,Z.jsx)(`div`,{className:`leading-6`,children:a()},t)})})}catch{return(0,Z.jsx)(`span`,{className:`text-gray-300`,children:e})}}function Uv({body:e,contentType:t}){let[n,r]=(0,I.useState)(!1),i=t.includes(`json`),a=(0,I.useMemo)(()=>i?Vv(e):e,[e,i]);return(0,Z.jsx)(`div`,{className:`h-full flex flex-col`,children:(0,Z.jsxs)(`div`,{className:`relative flex-1 flex flex-col overflow-hidden p-4`,children:[(0,Z.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(a),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},className:`absolute top-7 right-7 p-2 rounded-md bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors z-10`,title:`Copy formatted JSON to clipboard`,children:n?(0,Z.jsx)(Se,{size:16,className:`text-green-400`}):(0,Z.jsx)(C,{size:16})}),(0,Z.jsx)(`div`,{className:`absolute top-7 left-7 z-10`,children:(0,Z.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded bg-gray-700 text-gray-300`,children:t})}),(0,Z.jsx)(`div`,{className:`bg-gray-900 rounded-lg p-4 pt-12 overflow-y-auto flex-1`,children:(0,Z.jsx)(`div`,{className:`text-sm text-gray-100`,children:i?Hv(a):(0,Z.jsx)(`pre`,{className:`font-mono whitespace-pre-wrap break-words`,children:e})})})]})})}var Wv={immediate:`bg-red-100 text-red-700`,"short-term":`bg-amber-100 text-amber-700`,investigative:`bg-primary-100 text-primary-700`};function Gv({pattern:e,messageId:t,onViewPattern:n}){let r=e.evidence.exampleMessageIds.includes(t),i=e.evidence.affectedMessageIds;return(0,Z.jsxs)(`div`,{className:`bg-primary-50 border border-primary-200 rounded-xl p-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-primary-900`,children:e.title}),(0,Z.jsx)(`span`,{className:`text-xs px-2 py-1 bg-white rounded-lg border border-primary-200 font-medium`,children:r?`📌 Example`:`🔗 Affected`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-primary-700 mb-4 leading-relaxed`,children:e.description}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-primary-600 mb-4`,children:[(0,Z.jsxs)(`span`,{children:[`Confidence: `,(0,Z.jsxs)(`strong`,{children:[e.confidence.score,`%`]})]}),(0,Z.jsx)(`span`,{children:`•`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`strong`,{children:i.length}),` affected messages`]})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-lg p-4 mb-4`,children:[(0,Z.jsx)(`h5`,{className:`text-xs font-semibold text-gray-700 mb-2 flex items-center gap-1`,children:`💡 Recommendations`}),(0,Z.jsx)(`ul`,{className:`space-y-2`,children:e.recommendations.slice(0,3).map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`shrink-0 text-xs px-2 py-0.5 rounded font-medium ${Wv[e.priority]||Wv[`short-term`]}`,children:e.priority}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:e.title})]},t))})]}),(0,Z.jsxs)(`button`,{onClick:()=>n?.(i),className:`text-sm text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1`,children:[`View all `,i.length,` affected messages`,(0,Z.jsx)(`span`,{children:`→`})]})]})}function Kv({message:e,onViewPattern:t,insights:n}){let[r]=se(),i=r.get(`namespace`),a=r.get(`queue`),o=r.get(`topic`),s=r.get(`subscription`),c=a||(o&&s?`${o}/subscriptions/${s}`:o)||``,l=o?`topic`:`queue`,{data:u,isLoading:d}=K_({namespaceId:i||``,queueOrTopicName:c,entityType:l,queueType:e.queueType||`active`,skip:0,take:1e3,autoRefresh:!1}),{data:f,isLoading:p,isError:m}=I_(u?.items,{namespaceId:i||``,entityName:c,subscriptionName:s||void 0,entityType:l},!!i&&!!c&&!d&&n===void 0);if(n!==void 0){let r=(n||[]).filter(t=>{let n=t.evidence.affectedMessageIds,r=t.evidence.exampleMessageIds;return n.includes(e.id)||r.includes(e.id)});return r.length===0?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(l_,{size:32,className:`text-green-400`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`No Patterns Detected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`This message is not part of any AI-detected patterns. It appears to be processing normally.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center max-w-xs`,children:`AI analysis found no anomalies or recurring issues associated with this message.`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Gg,{size:14,className:`text-blue-500 mt-0.5 shrink-0`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700`,children:[(0,Z.jsx)(`strong`,{children:`⚠️ ServiceHub Interpretation (Not Azure Data):`}),` These patterns are heuristic analysis based on message characteristics. They represent possible explanations, not confirmed facts. Always verify findings in Azure Portal before taking operational action.`]})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4 text-sm text-gray-600`,children:[(0,Z.jsx)(He,{size:16,className:`text-primary-500`}),(0,Z.jsxs)(`span`,{children:[`This message is part of `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:r.length}),` detected pattern`,r.length>1?`s`:``]})]}),(0,Z.jsx)(`div`,{className:`space-y-4`,children:r.map(n=>(0,Z.jsx)(Gv,{pattern:n,messageId:e.id,onViewPattern:t},n.id))})]})}let h=d||p,g=(f||[]).filter(t=>{let n=t.evidence.affectedMessageIds,r=t.evidence.exampleMessageIds;return n.includes(e.id)||r.includes(e.id)});return h?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-primary-500`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-4`,children:`Loading AI insights...`})]})}):m||!f?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(l_,{size:32,className:`text-gray-300`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`AI Insights Not Available`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`AI pattern analysis is not enabled for this namespace, or the AI service is currently unavailable.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center`,children:`The application works normally without AI features.`})]})}):g.length===0?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(l_,{size:32,className:`text-green-400`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`No Patterns Detected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`This message is not part of any AI-detected patterns. It appears to be processing normally.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center max-w-xs`,children:`AI analysis found no anomalies or recurring issues associated with this message.`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Gg,{size:14,className:`text-blue-500 mt-0.5 shrink-0`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700`,children:[(0,Z.jsx)(`strong`,{children:`⚠️ ServiceHub Interpretation (Not Azure Data):`}),` These patterns are heuristic analysis based on message characteristics. They represent possible explanations, not confirmed facts. Always verify findings in Azure Portal before taking operational action.`]})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4 text-sm text-gray-600`,children:[(0,Z.jsx)(He,{size:16,className:`text-primary-500`}),(0,Z.jsxs)(`span`,{children:[`This message is part of `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:g.length}),` detected pattern`,g.length>1?`s`:``]})]}),(0,Z.jsx)(`div`,{className:`space-y-4`,children:g.map(n=>(0,Z.jsx)(Gv,{pattern:n,messageId:e.id,onViewPattern:t},n.id))})]})}function qv({name:e,value:t,isEven:n}){let[r,i]=(0,I.useState)(!1);return(0,Z.jsxs)(`tr`,{className:n?`bg-gray-50`:`bg-white`,children:[(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono font-medium text-gray-700 whitespace-nowrap`,children:e}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono text-gray-600`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 group`,children:[(0,Z.jsx)(`span`,{className:`truncate max-w-md`,title:t,children:t}),(0,Z.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},className:`p-1 rounded opacity-0 group-hover:opacity-100 hover:bg-gray-200 transition-all`,title:`Copy value`,children:r?(0,Z.jsx)(Se,{size:14,className:`text-green-600`}):(0,Z.jsx)(C,{size:14,className:`text-gray-400`})})]})})]})}function Jv({headers:e}){let t=Object.entries(e);return t.length===0?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`p`,{className:`text-lg font-medium`,children:`No Headers`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1`,children:`This message has no custom headers`})]})}):(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsx)(`div`,{className:`bg-white rounded-lg border border-gray-200 overflow-hidden`,children:(0,Z.jsxs)(`table`,{className:`w-full`,children:[(0,Z.jsx)(`thead`,{className:`bg-gray-100 border-b border-gray-200`,children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider`,children:`Header Name`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider`,children:`Value`})]})}),(0,Z.jsx)(`tbody`,{className:`divide-y divide-gray-100`,children:t.map(([e,t],n)=>(0,Z.jsx)(qv,{name:e,value:t,isEven:n%2==0},e))})]})})})}function Yv({isOpen:e,title:t,message:n,confirmLabel:r=`Confirm`,cancelLabel:i=`Cancel`,variant:a=`default`,onConfirm:o,onCancel:s}){if((0,I.useEffect)(()=>{let t=t=>{t.key===`Escape`&&e&&s()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,s]),!e)return null;let c=a===`danger`;return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:s,"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`confirm-dialog-title`,"aria-describedby":`confirm-dialog-description`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[c&&(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-red-100 rounded-full flex items-center justify-center`,children:(0,Z.jsx)(O,{className:`w-5 h-5 text-red-600`})}),(0,Z.jsx)(`h2`,{id:`confirm-dialog-title`,className:`text-lg font-semibold text-gray-900`,children:t})]}),(0,Z.jsx)(`button`,{onClick:s,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,"aria-label":`Close dialog`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`px-6 py-4`,children:(0,Z.jsx)(`p`,{id:`confirm-dialog-description`,className:`text-sm text-gray-600 whitespace-pre-line`,children:n})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:s,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,autoFocus:c,children:i}),(0,Z.jsx)(`button`,{onClick:o,className:`px-4 py-2 text-sm font-medium text-white rounded-lg transition-colors ${c?`bg-red-500 hover:bg-red-600`:`bg-primary-500 hover:bg-primary-600`}`,autoFocus:!c,children:r})]})]})]}),document.body)}var Xv=[{id:`properties`,label:`Properties`,icon:Je},{id:`body`,label:`Body`,icon:Pg},{id:`ai`,label:`AI Insights`,icon:Tg},{id:`headers`,label:`Headers`,icon:Yg}];function Zv(){return(0,Z.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-gray-500 bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm px-10 py-12 text-center`,style:{maxWidth:520},children:[(0,Z.jsx)(ke,{size:64,className:`text-gray-300 mx-auto mb-4`}),(0,Z.jsx)(`h3`,{className:`text-xl font-semibold text-gray-700`,children:`No Message Selected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-2`,children:`Select a message from the list to view its details, body content, and AI insights.`})]})})}function Qv({tab:e,message:t,onViewPattern:n,insights:r}){switch(e){case`properties`:return(0,Z.jsx)(Bv,{message:t});case`body`:return(0,Z.jsx)(Uv,{body:t.body,contentType:t.contentType});case`ai`:return(0,Z.jsx)(Kv,{message:t,onViewPattern:n,insights:r});case`headers`:return(0,Z.jsx)(Jv,{headers:t.headers});default:return null}}function $v({message:e,namespaceId:t}){let n=J_(),{data:r}=le(),i=r?.find(e=>e.id===t),a=i?.environment===`prod`,o=i?.hasSendPermission!==!1,[s]=se(),[c,l]=(0,I.useState)({isOpen:!1,title:``,message:``,variant:`default`,action:null}),u=s.get(`queue`),d=s.get(`topic`),f=s.get(`subscription`),p=d||u||``,m=e.queueType===`deadletter`||!!e.deadLetterReason,h=t=>{let n=e.id?.split(`-`).slice(0,2).join(`-`)||`#${e.sequenceNumber}`;t===`replay`&&l({isOpen:!0,title:`Replay Message`,message:`Are you sure you want to replay message ${n}?\n\nThis will re-send the message to the queue for processing.\n\n💡 Best practice: validate replay in DEV or UAT before using in PROD. Production namespaces block this action.\n\n⚠️ Replay is best-effort and not atomic. If a transient error occurs after the message is sent but before it is removed from the DLQ, both the original DLQ entry and the new copy may briefly coexist. Check ApplicationProperties for "Replayed=true" if you see unexpected duplicates.`,variant:`default`,action:`replay`})};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 p-4 border-t border-gray-200 bg-white`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:a?(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay is disabled for production namespaces. Use your CI/CD pipeline for production message operations.`,className:`inline-flex items-center gap-2 px-4 py-2 bg-red-100 text-red-400 rounded-lg font-medium cursor-not-allowed border border-red-200`,"aria-label":`Replay blocked in production`,children:[(0,Z.jsx)(i_,{size:16}),`PROD — Replay Blocked`]}):o?m?(0,Z.jsxs)(`button`,{className:`inline-flex items-center gap-2 px-4 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg font-medium transition-colors disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed`,onClick:()=>h(`replay`),disabled:n.isPending||!t,title:`Re-send this message from DLQ back to the main queue for reprocessing`,"aria-label":`Replay message`,children:[(0,Z.jsx)(i_,{size:16}),n.isPending?`Replaying...`:`Replay`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay is only available for dead-letter messages — active messages are already being processed`,className:`inline-flex items-center gap-2 px-4 py-2 bg-gray-300 text-gray-500 rounded-lg font-medium cursor-not-allowed`,"aria-label":`Replay message`,children:[(0,Z.jsx)(i_,{size:16}),`Replay`]}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-500 italic max-w-[160px]`,title:`Active messages are already queued for processing. Replay is for returning dead-letter messages to the main queue.`,children:`Active messages cannot be replayed`})]}):(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay requires a SAS policy with Manage permission. Update your connection string to enable replay.`,className:`inline-flex items-center gap-2 px-4 py-2 bg-amber-100 text-amber-400 rounded-lg font-medium cursor-not-allowed border border-amber-200`,"aria-label":`Replay blocked — insufficient permissions`,children:[(0,Z.jsx)(i_,{size:16}),`Replay — Manage Required`]})}),(0,Z.jsxs)(`button`,{className:`inline-flex items-center gap-2 px-4 py-2 bg-white hover:bg-gray-50 text-gray-700 border border-gray-200 rounded-lg font-medium transition-colors`,onClick:async()=>{try{await navigator.clipboard.writeText(e.id),F.success(`Message ID copied to clipboard`)}catch{F.error(`Failed to copy ID`)}},"aria-label":`Copy message ID to clipboard`,children:[(0,Z.jsx)(Mg,{size:16}),`Copy ID`]})]}),(0,Z.jsx)(Yv,{isOpen:c.isOpen,title:c.title,message:c.message,variant:c.variant,confirmLabel:`Confirm`,onConfirm:async()=>{if(!t){F.error(`Namespace context missing`);return}if(!p){F.error(`Queue or topic name is missing`);return}try{c.action===`replay`&&await n.mutateAsync({namespaceId:t,sequenceNumber:e.sequenceNumber,entityName:p,subscriptionName:f||void 0})}catch{}finally{l(e=>({...e,isOpen:!1,action:null}))}},onCancel:()=>{l(e=>({...e,isOpen:!1,action:null}))}})]})}function ey(e){try{let t=typeof e.body==`string`?JSON.parse(e.body):e.body,n=t?.eventType||t?.type||t?.event,r=t?.data?.orderId||t?.orderId,i=t?.data?.transactionId||t?.transactionId,a=t?.data?.notificationId||t?.notificationId,o=t?.data?.userId||t?.userId,s=t?.data?.error?.code||t?.error?.code||t?.errorCode,c=t?.data?.status||t?.status;if(n){let e=n.replace(/([A-Z])/g,` $1`).trim(),t=``;return r?t=`Order: ${r}`:i?t=`Transaction: ${i}`:a?t=`Notification: ${a}`:s?t=`Error: ${s}`:c&&(t=`Status: ${c}`),{title:e,subtitle:t}}if(r)return{title:`Order Message`,subtitle:r};if(i)return{title:`Payment Transaction`,subtitle:i};if(a)return{title:`Notification`,subtitle:a};if(s)return{title:`Error Event`,subtitle:s};if(o)return{title:`User Activity`,subtitle:`User: ${o}`}}catch{}return{title:`Message`,subtitle:e.id?e.id.includes(`-`)?e.id.split(`-`).slice(0,2).join(`-`):e.id.substring(0,12):`#${e.sequenceNumber}`}}function ty({message:e,onViewPattern:t,insights:n}){let[r,i]=Fv(),[a]=se(),o=a.get(`namespace`);if(!e)return(0,Z.jsx)(Zv,{});let{title:s,subtitle:c}=ey(e),l=e.queueType===`deadletter`||!!e.deadLetterReason,u=l?(e=>{let t=(e.deadLetterReason||``).toLowerCase(),n=(e.deadLetterSource||``).toLowerCase();return t.includes(`test`)||t.includes(`demo`)||t.includes(`manual`)||n.includes(`servicehub`)||n.includes(`testing`)?`test`:e.deliveryCount>5?`critical`:`warning`})(e):null;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col bg-gray-50 overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`shrink-0 px-6 py-4 border-b border-gray-200 ${l&&u===`critical`?`bg-red-50`:`bg-white`}`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900`,children:s}),c&&(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1 font-mono`,children:c})]}),(0,Z.jsx)(ce,{text:(()=>{let t=`${window.location.origin}/messages?namespace=${o||``}`,n=a.get(`queue`),r=a.get(`topic`),i=a.get(`subscription`);return`${t}${n?`&queue=${n}`:r?`&topic=${r}${i?`&subscription=${i}`:``}`:``}&messageId=${e.id}`})(),label:`Copy Link`,className:`shrink-0 ml-3 px-2 py-1 border border-gray-200 rounded-lg`,iconSize:`w-4 h-4`})]}),l&&(0,Z.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium ${u===`critical`?`bg-red-100 text-red-800`:`bg-amber-100 text-amber-800`}`,children:[(0,Z.jsx)(O,{size:12,className:u===`critical`?`text-red-600`:`text-amber-600`}),`ServiceHub Assessment: `,u===`critical`?`Critical`:`Warning`]}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-600`,title:`The reason provided by Azure Service Bus.`,children:e.deadLetterReason})]})]}),(0,Z.jsx)(`div`,{className:`shrink-0 flex border-b border-gray-200 bg-white`,children:Xv.map(({id:e,label:t,icon:n})=>(0,Z.jsxs)(`button`,{onClick:()=>i(e),className:` + flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors relative + ${r===e?`text-primary-600 border-b-2 border-primary-500 -mb-px`:`text-gray-500 hover:text-gray-700 hover:bg-gray-50`} + `,children:[(0,Z.jsx)(n,{size:16}),t]},e))}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gray-50`,children:(0,Z.jsx)(Qv,{tab:r,message:e,onViewPattern:t,insights:n})}),(0,Z.jsx)($v,{message:e,namespaceId:o})]})}var ny={"dlq-pattern":`📥`,"retry-loop":`🔄`,"error-cluster":`⚠️`,"latency-anomaly":`⏱️`,"poison-message":`☠️`},ry={high:`bg-green-100 text-green-700`,medium:`bg-amber-100 text-amber-700`,low:`bg-gray-100 text-gray-600`};function iy({insights:e,onClose:t,onViewEvidence:n}){let r=e.filter(e=>e.status===`active`);return(0,I.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:t}),(0,Z.jsxs)(`div`,{className:`absolute top-full right-0 mt-2 w-[420px] bg-white rounded-xl shadow-xl border border-gray-200 z-50 overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`Active AI Patterns`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:[r.length,` pattern`,r.length===1?``:`s`,` detected`]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-200 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-4 h-4 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto`,children:r.length===0?(0,Z.jsxs)(`div`,{className:`p-8 text-center text-gray-500`,children:[(0,Z.jsx)(`p`,{className:`text-sm`,children:`No active patterns detected`}),(0,Z.jsx)(`p`,{className:`text-xs mt-1`,children:`AI is monitoring your queues`})]}):r.map(e=>(0,Z.jsxs)(`div`,{className:`p-4 border-b border-gray-100 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-lg`,title:e.type,children:ny[e.type]||`🔍`}),(0,Z.jsx)(`h4`,{className:`font-medium text-sm text-gray-900 leading-tight`,children:e.title})]}),(0,Z.jsxs)(`span`,{className:`shrink-0 text-xs px-2 py-0.5 rounded-full font-medium ${ry[e.confidence.level]}`,children:[e.confidence.score,`%`]})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-3 leading-relaxed`,children:e.description}),(0,Z.jsx)(`div`,{className:`flex items-center gap-4 text-xs text-gray-500 mb-3`,children:e.evidence.metrics.slice(0,3).map((e,t)=>(0,Z.jsxs)(`span`,{className:e.isAnomaly?`text-red-600 font-medium`:``,children:[e.label,`: `,(0,Z.jsx)(`strong`,{children:e.value})]},t))}),(0,Z.jsxs)(`button`,{onClick:()=>n(e.evidence.affectedMessageIds),className:`text-sm text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1`,children:[`View `,e.evidence.affectedMessageIds.length,` affected messages`,(0,Z.jsx)(`span`,{children:`→`})]})]},e.id))}),r.length>0&&(0,Z.jsxs)(`div`,{className:`px-4 py-3 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`💡 Click a pattern to filter messages and investigate`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-1 italic`,children:`ServiceHub Interpretation — AI-assisted patterns, not Azure data`})]})]})]})}function ay(){return(0,Z.jsx)(`div`,{className:`p-4 space-y-4`,children:Array.from({length:10}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`animate-pulse bg-white border border-gray-200 rounded-lg p-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`div`,{className:`h-4 bg-gray-200 rounded w-32`}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-20`})]}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-3/4 mb-2`}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-1/2`})]},t))})}var oy=[`Northwind Trading Ltd`,`Fabrikam Corporation`,`Adventure Works LLC`,`Blue Yonder Airlines`,`Tailspin Toys Inc`,`Wide World Importers`,`Datum Corp`,`Wingtip Toys`,`Contoso Manufacturing`,`Litware Global`,`Proseware Inc`,`A. Datum Corporation`,`Alpine Ski House`],sy={"Northwind Trading Ltd":`NW`,"Fabrikam Corporation":`FAB`,"Adventure Works LLC":`AW`,"Blue Yonder Airlines":`BYA`,"Tailspin Toys Inc":`TST`,"Wide World Importers":`WWI`,"Datum Corp":`DAT`,"Wingtip Toys":`WTT`,"Contoso Manufacturing":`CM`,"Litware Global":`LWG`,"Proseware Inc":`PRW`,"A. Datum Corporation":`ADC`,"Alpine Ski House":`ASH`},cy=[{product:`Enterprise Analytics Suite (Annual)`,unitPrice:4800,category:`software`},{product:`Cloud API Gateway Pro — 10M calls/mo`,unitPrice:1250,category:`infrastructure`},{product:`Business Intelligence Dashboard (3 seats)`,unitPrice:2400,category:`software`},{product:`Managed SQL Database — Standard S4`,unitPrice:890,category:`database`},{product:`IoT Device Management Platform (500 devices)`,unitPrice:3200,category:`iot`},{product:`Security & Compliance Module`,unitPrice:1800,category:`security`},{product:`Automated Workflow Engine — 50k runs/mo`,unitPrice:750,category:`automation`},{product:`Distributed Cache Cluster (16-node)`,unitPrice:5400,category:`infrastructure`},{product:`Real-time Event Streaming (10 partitions)`,unitPrice:2100,category:`streaming`},{product:`Identity & Access Management Suite`,unitPrice:1650,category:`security`}],ly=[{gateway:`Stripe`,code:`STR`},{gateway:`PayPal Commerce`,code:`PPL`},{gateway:`Adyen`,code:`ADY`},{gateway:`Braintree`,code:`BRT`},{gateway:`Square`,code:`SQR`},{gateway:`Worldpay`,code:`WPY`}],uy={insufficient_funds:`Card declined — insufficient funds`,do_not_honor:`Card declined — do_not_honor (bank refused)`,gateway_timeout:`Gateway timeout after 30s — connection reset by peer`,duplicate_transaction:`Duplicate transaction detected — idempotency key collision`,card_velocity_exceeded:`Card velocity limit exceeded — 3 transactions in 60s`,invalid_cvv:`CVV validation failed — card not present verification error`,expired_card:`Card expired — expiry date 03/24 is in the past`,stolen_card:`Card flagged as stolen — issuer declined with code 41`},dy=[{id:`WH-LHR-01`,location:`London Heathrow Logistics Hub`,region:`EMEA`},{id:`WH-JFK-02`,location:`Newark Distribution Centre`,region:`AMER`},{id:`WH-SIN-03`,location:`Singapore Changi Fulfilment`,region:`APAC`},{id:`WH-FRA-04`,location:`Frankfurt Rhine Warehouse`,region:`EMEA`},{id:`WH-SEA-05`,location:`Seattle West Coast Hub`,region:`AMER`}],fy=[{type:`email`,provider:`SendGrid`,template:`order_confirmation_v3`},{type:`email`,provider:`SendGrid`,template:`invoice_ready_v2`},{type:`sms`,provider:`Twilio`,template:`shipping_update`},{type:`push`,provider:`Firebase FCM`,template:`payment_received`},{type:`webhook`,provider:`Partner ERP`,template:`inventory_sync_v2`},{type:`teams`,provider:`Microsoft Teams`,template:`ops_alert`}],py=[[`unusual_geo`,`high_velocity`],[`card_testing_pattern`],[`multiple_failed_attempts`],[`ip_mismatch`,`device_fingerprint_anomaly`],[`account_age_low`,`high_order_value`],[`vpn_detected`,`unusual_geo`],[`chargeback_history`,`velocity_exceeded`]],my=[{name:`FedEx Priority`,code:`FEDEX`,prefix:`FX`},{name:`DHL Express`,code:`DHL`,prefix:`DE`},{name:`UPS Next Day Air`,code:`UPS`,prefix:`UPS`},{name:`Royal Mail Special`,code:`RMSPL`,prefix:`RM`},{name:`Parcelforce 48`,code:`PF48`,prefix:`PF`}],hy=[`awaiting_approval`,`approved`,`queued_for_payment`,`paid`,`disputed`],gy=[`L1_Manager`,`L2_Finance`,`L3_CFO`,`Procurement_Committee`],_y=[`Order ORD-2026-%s processed — Northwind Trading Ltd, £14,850 — payment confirmed via Stripe`,`Payment TXN-%s captured — Fabrikam Corporation, $6,240 — Adyen gateway, 0.8s latency`,`Invoice INV-2026-%s approved by L2_Finance — Wide World Importers, £22,400 — queued for payment`,`Inventory sync complete — WH-LHR-01 → WH-JFK-02 — 1,240 units of Enterprise Analytics Suite`,`Shipping label generated — Blue Yonder Airlines, FedEx FX%s, estimated delivery D+2`,`Fraud check cleared — Datum Corp, risk score 12/100 — all 6 factors within threshold`,`Auto-replay rule triggered — 28 payment messages replayed successfully, 0 failures`,`Webhook delivered — Tailspin Toys ERP (v2.1), 204ms, all 142 line items synced`,`Order ORD-2026-%s shipped — Adventure Works LLC — DHL DE%s, in transit via Frankfurt`,`Consumer group caught up — adventure-works-consumer lag 0ms after processing 3,241 messages`],vy=[`Payment retry #2 — TXN-%s — Fabrikam Corp, Worldpay gateway, timeout after 30s (retry 3 of 5)`,`Invoice INV-2026-%s pending — awaiting L3_CFO approval for 18h — SLA breach in 6h`,`Inventory low stock alert — SKU:EDS-PRO-2026 — 12 units remain, 9 open orders pending`,`Shipping delay — UPS UPS%s — customs hold at Frankfurt (HS code mismatch on 3 of 8 items)`,`Duplicate order detected — ORD-2026-%s submitted twice in same customer session (60s apart)`,`Consumer lag growing — notification-queue — 1,843 unprocessed messages, 12min behind real-time`,`Fraud score elevated — Litware Global — riskScore 68/100 (vpn_detected, unusual_geo) — review`,`Webhook delivering slowly — Proseware ERP — attempt 3 of 5, 5.2s timeout, retrying in 30s`,`Schema warning — NotificationService received order body missing new "recipientTimezone" field`,`Rate limit approaching — Stripe API at 87% of 100 req/s quota — throttling risk in ~8 min`],yy=[`DLQ flood — payment-queue — 847 messages dead-lettered: MaxDeliveryCountExceeded after 5 retries`,`Payment declined — TXN-%s — Northwind Trading Ltd £14,850 — do_not_honor (bank code 05)`,`Order validation failed — ORD-2026-%s — OrderService rejected: "shippingAddress.postcode" null`,`Fraud alert — Wingtip Toys — riskScore 94/100 — card_testing_pattern, 11 attempts in 4 minutes`,`Shipping failed — DHL DE%s — address undeliverable: postcode SW1A 2AA not valid for carrier zone`,`Invoice processing error — INV-2026-%s — Accounts Payable API returned 503 Service Unavailable`,`TTL expired — ORD-2026-%s — message in queue 14 days without consumer pickup — moved to DLQ`,`Schema mismatch — NotificationService v2.1 cannot deserialise OrderCreated v3.0 payload`,`Database deadlock — OrderService.ProcessAsync() — 3 concurrent writes to Orders table, tx aborted`,`Session lock expired — checkout-session-%s held 5 min — consumer reconnecting, message re-enqueued`],by=[{issue:`DLQ flood — 847 of 862 dead-lettered messages share the identical error signature: null reference in OrderValidationService.ProcessAsync() at line 312. Root cause: "shippingAddress.postcode" field introduced in order-schema v3.0 but consumer still running v2.8.`,recommendations:[`Deploy OrderValidationService v2.9+ (null-safe postcode handling) — ETA 15 min`,`After deployment, use Auto-Replay to bulk-replay the 847 affected messages`,`Add schema version negotiation to prevent cross-version incompatibility in future`]},{issue:`Payment gateway cascade failure — Worldpay returning 504 Gateway Timeout consistently since 14:32 UTC. Retry backoff not working: all 5 retry attempts fire within 2 seconds instead of exponential spacing. This is flooding the retry queue.`,recommendations:[`Fix retry backoff: implement exponential delay (2s, 4s, 8s, 16s, 32s) not fixed 0.5s`,`Add circuit breaker: after 3 consecutive failures, route to Stripe fallback gateway`,`Dead-letter after 5 attempts with DeadLetterReason="GatewayDown" for targeted replay later`]},{issue:`Message ordering violation in orders-queue — 23 messages processed out-of-sequence. OrderUpdated events arriving before OrderCreated for the same OrderId, causing foreign key violations in the Orders database.`,recommendations:[`Enable Azure Service Bus Sessions keyed on OrderId to guarantee FIFO per customer order`,`Add idempotency check in consumer: skip if OrderCreated not yet in DB, re-enqueue with delay`,`Review partition key strategy — currently random, should be set to customerId`]},{issue:`Consumer group saturation — notification-queue has 1,843 backlogged messages. Single consumer instance processing at 2.3 msg/sec; at current rate backlog will clear in 13 minutes. However a new DLQ spike at 15:20 UTC could overwhelm it.`,recommendations:[`Scale notification consumer to 3 instances immediately (Azure Container Apps: min replicas 3)`,`Set queue max delivery count to 3 (currently 10) to reduce retry amplification`,`Add dead-letter monitoring alert: notify #ops-alerts if DLQ count exceeds 50`]},{issue:`Fraud detection bypassed — 11 high-risk transactions from Wingtip Toys processed without fraud check completion. FraudCheckService timed out (60s) and the order pipeline proceeded without awaiting the fraud verdict. Risk exposure: £47,230.`,recommendations:[`Make fraud check synchronous in the critical payment path — do not proceed on timeout`,`Add compensating transaction: if FraudCheck times out, place order in "pending_review" state`,`Increase FraudCheckService timeout budget from 60s to 120s and add dedicated node pool`]},{issue:`Shipping address validation failures concentrated in UK postcodes — Royal Mail API rejecting 38 of 42 UK addresses. Root cause: postcode format changed in service update (space stripped), "SW1A2AA" failing Royal Mail format validation expecting "SW1A 2AA".`,recommendations:[`Fix postcode normalisation: add space before last 3 chars for UK postcodes before API call`,`Replay the 38 failed shipping label messages after deploying the fix`,`Add postcode format unit test with all Royal Mail edge-case formats`]},{issue:`Invoice approval SLA breach risk — 14 invoices from Wide World Importers and Fabrikam Corporation awaiting L3_CFO approval for 18+ hours. SLA requires approval within 24h. Breach in < 6h for 9 of them.`,recommendations:[`Trigger escalation webhook to CFO TEAMS channel immediately (auto-alert rule)`,`Configure approval reminder automation: resend after 12h, 20h, 23h intervals`,`Review L3_CFO approval delegation — apply L2_Finance auto-approve for amounts < £25,000`]},{issue:`Duplicate message delivery — message deduplication window expired (60s) causing 34 OrderCreated events to be processed twice. Orders created for customers Datum Corp and Proseware Inc have duplicate line items. Billing impact: £18,400 over-charged.`,recommendations:[`Extend deduplication window to 10 minutes (Service Bus property: DuplicateDetectionHistoryTimeWindow)`,`Add idempotency guard in OrderService — check order exists before insert (upsert pattern)`,`Reconcile and reverse the 34 duplicate charges before end of business today`]}],xy=[`MaxDeliveryCountExceeded`,`TTLExpiredException`,`MessageSizeExceeded`,`SessionIdMismatch`,`HeaderSizeExceeded`,`FilterEvaluationException`,`GatewayTimeout_RetryExhausted`,`SchemaValidationFailure`,`DownstreamServiceUnavailable`];function Q(e){return e[Math.floor(Math.random()*e.length)]}function $(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Sy(){return String($(1e4,99999))}function Cy(){let e=Q(oy),t=sy[e]||`CTM`,n=Q(cy),r=$(1,5),i=Math.round(n.unitPrice*r*100)/100,a=Q([`USD`,`GBP`,`EUR`]),o={eventType:`OrderCreated`,schemaVersion:`3.1`,orderId:`ORD-2026-${String($(1e5,999999))}`,customerRef:`${t}-PO-2026-${String($(1e3,9999))}`,customer:{company:e,accountId:`ACC-${$(1e4,99999)}`,billingRegion:Q([`EMEA`,`AMER`,`APAC`]),accountManager:Q([`Sarah Chen`,`James Okafor`,`Priya Nair`,`Tom Bergström`,`Maria Santos`])},lineItems:[{lineId:1,product:n.product,category:n.category,quantity:r,unitPrice:n.unitPrice,currency:a,total:i}],orderTotal:{amount:i,currency:a,vatIncluded:a===`GBP`||a===`EUR`},paymentMethod:Q([`bank_transfer`,`credit_card`,`purchase_order`,`direct_debit`]),status:Q([`pending_validation`,`validated`,`processing`,`shipped`,`delivered`]),timestamps:{created:new Date(Date.now()-$(6e4,864e5)).toISOString(),lastUpdated:new Date().toISOString()},sourceService:`OrderManagementService`,correlationId:`corr-${Math.random().toString(36).substring(2,11)}`};return{body:JSON.stringify(o,null,2),contentType:`application/json`,eventType:`OrderCreated`}}function wy(){let e=Q(ly),t=Q(oy),n=Math.round($(500,5e4)*100)/100,r=Q([`USD`,`GBP`,`EUR`]),i=Q(Object.keys(uy)),a={eventType:`PaymentProcessed`,schemaVersion:`2.4`,transactionId:`${e.code}-TXN-${String($(1e9,9999999999))}`,externalRef:`${e.code}-${String($(1e8,999999999))}`,payer:{company:t,accountId:`ACC-${$(1e4,99999)}`},amount:{value:n,currency:r},gateway:{provider:e.gateway,environment:`production`,processingTimeMs:$(120,8500)},status:Q([`authorized`,`captured`,`declined`,`pending_3ds`,`refunded`]),failureDetail:Math.random()<.4?{errorCode:i,message:uy[i],retryCount:$(1,5),retryable:![`stolen_card`,`do_not_honor`].includes(i)}:void 0,timestamps:{initiated:new Date(Date.now()-$(3e4,36e5)).toISOString(),completed:new Date().toISOString()},sourceService:`PaymentProcessingService`};return{body:JSON.stringify(a,null,2),contentType:`application/json`,eventType:`PaymentProcessed`}}function Ty(){let e=Q(dy),t=Q(cy),n=$(0,2e3),r=$(50,200),i={eventType:`InventoryUpdated`,schemaVersion:`1.8`,warehouseId:e.id,warehouseName:e.location,region:e.region,product:{sku:`SKU-${t.category.toUpperCase().substring(0,3)}-${String($(1e3,9999))}`,name:t.product,category:t.category},stockLevel:{current:n,threshold:r,unit:`licenses`},alert:n===0?`out_of_stock`:n80?`HIGH_RISK`:t>50?`MEDIUM_RISK`:`LOW_RISK`,riskFactors:n,modelVersion:`fraud-ml-v4.2`,processingTimeMs:$(200,2e3)},action:t>80?`block_and_review`:t>50?`review_required`:`approve`,sourceService:`FraudDetectionService`,timestamp:new Date().toISOString()};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`FraudCheckResult`}}function Oy(){let e=Q(oy),t=sy[e]||`CTM`,n=$(5e3,15e4),r=Q(gy),i={eventType:`InvoiceProcessing`,schemaVersion:`1.5`,invoiceId:`INV-2026-${String($(1e4,99999))}`,vendor:e,purchaseOrder:`${t}-PO-2026-${String($(1e3,9999))}`,amount:{value:n,currency:Q([`GBP`,`USD`,`EUR`])},approvalWorkflow:{requiredTier:r,currentStatus:Q(hy),submittedAt:new Date(Date.now()-$(36e5,864e5*3)).toISOString(),slaHours:$(8,48),hoursElapsed:$(1,50),escalated:Math.random()<.3},lineItems:$(1,12),attachmentCount:$(1,4),sourceService:`InvoiceProcessingService`};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`InvoiceProcessing`}}function ky(){let e=Q(my),t=Q(dy),n=Q(oy),r=`${e.prefix}${$(1e9,9999999999)}`,i={eventType:`ShipmentCreated`,schemaVersion:`2.2`,shipmentId:`SHIP-2026-${String($(1e4,99999))}`,orderId:`ORD-2026-${String($(1e5,999999))}`,recipient:{company:n,deliveryContact:Q([`Goods_In`,`Reception`,`IT_Department`,`Finance`])},carrier:{name:e.name,code:e.code,trackingNumber:r},origin:{warehouseId:t.id,name:t.location,region:t.region},destination:{country:Q([`GB`,`US`,`DE`,`FR`,`NL`,`SG`,`AU`]),postcode:Q([`EC2A 4NE`,`W1D 3QZ`,`10001`,`75001`,`60311`,`048624`,`2000`])},estimatedDelivery:new Date(Date.now()+$(864e5,864e5*5)).toISOString().split(`T`)[0],status:Q([`label_created`,`collected`,`in_transit`,`customs_hold`,`out_for_delivery`,`delivered`]),packageDetails:{count:$(1,8),totalWeightKg:Math.round($(1,200)*.5)/1},sourceService:`LogisticsService`};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`ShipmentCreated`}}function Ay(){let e=Math.random();return e<.3?Cy():e<.5?wy():e<.62?Ty():e<.72?Ey():e<.82?Dy():e<.91?Oy():ky()}function jy(e){let t={},n={OrderCreated:`OrderManagementService`,PaymentProcessed:`PaymentProcessingService`,InventoryUpdated:`InventoryManagementService`,NotificationDispatched:`CustomerEngagementService`,FraudCheckResult:`FraudDetectionService`,InvoiceProcessing:`InvoiceProcessingService`,ShipmentCreated:`LogisticsService`}[e]||`ContosoCommerceBackend`;return t[`Content-Type`]=`application/json; charset=utf-8`,t[`Message-Id`]=crypto.randomUUID?.()||`msg-${Math.random().toString(36).substring(2,15)}`,t[`Correlation-Id`]=`corr-${Math.random().toString(36).substring(2,11)}`,t[`x-contoso-source-service`]=n,t[`x-contoso-schema-version`]=Q([`1.0`,`2.0`,`2.4`,`3.0`,`3.1`]),t[`x-contoso-event-version`]=`1`,t.Label=e,t[`Partition-Key`]=`partition-${$(0,15)}`,Math.random()<.6&&(t[`Session-Id`]=`session-${$(1e4,99999)}`),Math.random()<.4&&(t[`Reply-To`]=`response-processed-queue`),t}function My(){return Q([`1d 0h 0m 0s`,`7d 0h 0m 0s`,`14d 0h 0m 0s`,`0d 4h 0m 0s`,`0d 12h 0m 0s`])}function Ny(e){let t=Sy();return Q(e===`success`?_y:e===`warning`?vy:yy).replace(/%s/g,t)}function Py(e){let t=[.55,.3,.15],n=[],r=new Date;for(let i=0;it.enqueuedTime.getTime()-e.enqueuedTime.getTime()),n}Py(1e5);function Fy(e,t=[],n=`active`){let r=e.messageId||`seq-${e.sequenceNumber}`,i=e.body,a,o;try{if(i&&typeof i==`string`){let e=JSON.parse(i);a=e.eventType||e.event||e.type,a||(e.messageType?o=e.messageType:e.name?o=e.name:e.action&&(o=e.action))}}catch{}let s=`success`;return e.isFromDeadLetter||e.deadLetterReason?s=`error`:(e.deliveryCount||0)>1&&(s=`warning`),{id:r,enqueuedTime:new Date(e.enqueuedTime),status:s,preview:i?i.substring(0,100):`[Body unavailable - may exceed size limit or API throttled]`,contentType:e.contentType||`application/json`,deliveryCount:e.deliveryCount||0,hasAIInsight:t.includes(r),sequenceNumber:e.sequenceNumber||0,properties:e.applicationProperties||{},queueType:n,body:i||``,headers:{"Content-Type":e.contentType||`application/json`,...e.correlationId?{"Correlation-Id":e.correlationId}:{},...e.sessionId?{"Session-Id":e.sessionId}:{}},timeToLive:e.timeToLive||``,lockToken:``,eventType:a,displayTitle:o||a,deadLetterReason:e.deadLetterReason||void 0,deadLetterSource:e.deadLetterSource||void 0,scheduledEnqueueTime:e.scheduledEnqueueTime??void 0}}function Iy(){let[e,t]=se(),n=l(),r=fe(),i=e.get(`demo`)===`true`,a=e.get(`namespace`),o=e.get(`queue`),s=e.get(`topic`),c=e.get(`subscription`),u=e.get(`queueType`),d=s?`topic`:`queue`,f=o||(s&&c?`${s}/subscriptions/${c}`:s)||``,{data:p}=le();(0,I.useEffect)(()=>{if(p&&p.length>0&&a&&!i&&!p.some(e=>e.id===a)){let n=p[0],r=new URLSearchParams(e);r.set(`namespace`,n.id),t(r,{replace:!0}),F.success(`Reconnected to ${n.displayName||n.name}`,{duration:3e3})}},[p,a,e,t,i]);let[m,h]=(0,I.useState)(null),[g,_]=(0,I.useState)(`active`),[v,y]=(0,I.useState)(!0),[b,x]=(0,I.useState)({skip:0,allMessages:[]}),[S,C]=(0,I.useState)(!1);(0,I.useEffect)(()=>{u===`deadletter`?_(`deadletter`):u===`active`&&_(`active`)},[u]),(0,I.useEffect)(()=>{h(null)},[a,o,s,c]),(0,I.useEffect)(()=>{x({skip:0,allMessages:[]})},[a,o,s,c,g]),(0,I.useEffect)(()=>{if(!i)return;let e=`servicehub_demo_nudge_shown`;if(sessionStorage.getItem(e))return;let t=setTimeout(()=>{sessionStorage.setItem(e,`true`),F(e=>(0,Z.jsxs)(`div`,{className:`max-w-xs`,children:[(0,Z.jsx)(`p`,{className:`font-semibold text-gray-900 mb-0.5`,children:`Ready to connect your real Service Bus?`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-3`,children:`See your actual messages, DLQ data, and AI insights on live traffic.`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>{r(`/connect`),F.dismiss(e.id)},className:`px-3 py-1.5 bg-primary-600 hover:bg-primary-700 text-white text-xs font-semibold rounded-lg transition-colors`,children:`Connect now →`}),(0,Z.jsx)(`button`,{onClick:()=>F.dismiss(e.id),className:`px-3 py-1.5 text-gray-500 hover:text-gray-700 text-xs transition-colors`,children:`Keep exploring`})]})]}),{duration:15e3,id:`demo-nudge`,style:{maxWidth:`320px`,padding:`16px`},position:`bottom-right`})},9e4);return()=>clearTimeout(t)},[i]);let{data:w,isLoading:T,error:E,refetch:D,isFetching:ee,dataUpdatedAt:O}=K_({namespaceId:a||``,queueOrTopicName:f,entityType:d,queueType:g,skip:b.skip,take:50,autoRefresh:v&&b.skip===0}),{data:te,refetch:ne}=Oe(a||``,v),{data:A,refetch:re}=b_(a||``,s||``,v);(0,I.useEffect)(()=>{w?.items&&(x(e=>{if(e.skip===0)return{...e,allMessages:w.items};{let t=new Set(e.allMessages.map(e=>e.messageId)),n=w.items.filter(e=>!t.has(e.messageId));return{...e,allMessages:[...e.allMessages,...n]}}}),C(!1))},[w?.items,b.skip]),(0,I.useEffect)(()=>{d===`queue`&&a&&o?ne():d===`topic`&&a&&s&&c&&re()},[a,o,s,c,d,ne,re]);let j=()=>{if(i&&M.length>0)return{active:M.filter(e=>e.queueType===`active`).length,deadletter:M.filter(e=>e.queueType===`deadletter`).length};if(d===`queue`&&o){let e=te?.find(e=>e.name===o);return{active:e?.activeMessageCount||0,deadletter:e?.deadLetterMessageCount||0}}else if(d===`topic`&&c&&s){let e=A?.find(e=>e.name===c);return{active:e?.activeMessageCount||0,deadletter:e?.deadLetterMessageCount||0}}return{active:0,deadletter:0}},M=(0,I.useMemo)(()=>i?Py(50).map((e,t)=>{let n={...e};if(t<10&&e.queueType!==`deadletter`)if(n.status=`error`,n.queueType=`deadletter`,n.deadLetterReason=e.deadLetterReason||`MaxDeliveryCountExceeded`,n.deadLetterSource=e.deadLetterSource||`PaymentService`,n.preview=`[ERROR] ${e.preview.substring(0,60)}`,Math.random()<.8){let r=by[t%by.length];n.hasAIInsight=!0,n.aiAnalysis={issue:r.issue,recommendations:[...r.recommendations],detectedAt:new Date(e.enqueuedTime.getTime()+6e4)}}else n.hasAIInsight=!1,n.aiAnalysis=void 0;if(n.queueType===`active`&&!n.aiAnalysis&&Math.random()<.5){let t=by[Math.floor(Math.random()*by.length)];n.hasAIInsight=!0,n.aiAnalysis={issue:t.issue,recommendations:[...t.recommendations],detectedAt:new Date(e.enqueuedTime.getTime()+Math.floor(Math.random()*3e5+3e4))}}return n}):[],[i]),ie=j(),{data:ae}=I_(w?.items,{namespaceId:a||``,entityName:f,subscriptionName:c||void 0,entityType:d},!!a&&!!f&&!T&&!i),N=(0,I.useMemo)(()=>{if(!i||M.length===0)return[];let e=M.filter(e=>e.aiAnalysis);return e.map((t,n)=>({id:`demo-insight-${n}`,type:`error-cluster`,title:t.aiAnalysis.issue.substring(0,100),description:t.aiAnalysis.issue,confidence:{level:`high`,score:.95,reasoning:`Detected from message patterns in demo dataset`},evidence:{sampleSize:e.length,affectedMessageIds:[t.id],exampleMessageIds:[t.id],metrics:[{label:`Confidence`,value:`95%`,comparison:`High confidence pattern match`,isAnomaly:!1}],patternSignature:t.aiAnalysis.issue.substring(0,50)},recommendations:t.aiAnalysis.recommendations.map(e=>({title:e.substring(0,50),description:e,priority:`immediate`})),timeWindow:{start:t.enqueuedTime.toISOString(),end:new Date().toISOString(),analysisTimestamp:t.aiAnalysis.detectedAt.toISOString()},scope:{namespaceId:`demo`,queueOrTopicName:`demo-queue`},status:`active`}))},[i,M]),oe=(0,I.useMemo)(()=>i?N:ae||[],[i,N,ae]),{data:ce}=F_(a||``,f||``),[ue,de]=(0,I.useState)(!1),[pe,me]=(0,I.useState)(``),he=(0,I.useDeferredValue)(pe),[ge,_e]=(0,I.useState)(!1),[ve,ye]=(0,I.useState)(`all`),[be,xe]=(0,I.useState)(null),Se=(0,I.useMemo)(()=>{if(!oe)return[];let e=new Set;return oe.forEach(t=>{t.evidence.affectedMessageIds.forEach(t=>e.add(t))}),Array.from(e)},[oe]),Ce=i?M.filter(e=>e.queueType===g).sort((e,t)=>t.enqueuedTime.getTime()-e.enqueuedTime.getTime()):b.allMessages.map(e=>Fy(e,Se,g)).sort((e,t)=>t.enqueuedTime.getTime()-e.enqueuedTime.getTime()),we=(0,I.useMemo)(()=>Ce.find(e=>e.id===m)??null,[Ce,m]),Te=(0,I.useMemo)(()=>{let e=Ce;if(be&&(e=e.filter(e=>be.includes(e.id))),he.trim()){let t=he.toLowerCase();e=e.filter(e=>e.id.toLowerCase().includes(t)||e.preview.toLowerCase().includes(t)||typeof e.body==`string`&&e.body.toLowerCase().includes(t)||JSON.stringify(e.properties).toLowerCase().includes(t))}return ve!==`all`&&(e=e.filter(e=>e.status===ve)),e},[Ce,be,he,ve]),De=oe?.length||ce?.activeCount||0,ke=w?.totalCount||0,Ae=b.skip+50{C(!0),x(e=>({...e,skip:e.skip+50}))},Me=e=>{h(e)},Ne=n=>{_(n),h(null);let r=new URLSearchParams(e);r.set(`queueType`,n),t(r,{replace:!0}),d===`queue`?ne():d===`topic`&&re()},Pe=e=>{xe(e),de(!1),F.success(`Showing ${e.length} affected messages`)},Ie=()=>{xe(null),F.success(`Filter cleared`)},Le=()=>{D(),n.invalidateQueries({queryKey:[`queues`]}),n.invalidateQueries({queryKey:[`topics`]}),n.invalidateQueries({queryKey:[`subscriptions`]}),F.success(`Messages refreshed`)},Re=()=>{y(e=>{let t=!e;return F.success(t?`🔄 Auto-refresh enabled (7s)`:`⏸️ Auto-refresh paused`,{duration:2e3}),t})},ze=()=>{if(!O)return``;let e=Math.floor((Date.now()-O)/1e3);return e<5?`just now`:e<60?`${e}s ago`:`${Math.floor(e/60)}m ago`};if(T)return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-white border-b border-gray-200 px-4 py-3 flex items-center gap-3 shrink-0`,children:(0,Z.jsx)(`div`,{className:`flex-1 text-sm text-gray-500`,children:`Loading messages...`})}),(0,Z.jsx)(ay,{})]});if(E){let e=E instanceof Error?E.message:`An error occurred`,t=e.toLowerCase().includes(`network`)||e.toLowerCase().includes(`connection`)||e.toLowerCase().includes(`timeout`);return(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`⚠️`}),(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900 mb-2`,children:`Failed to load messages`}),(0,Z.jsx)(`p`,{className:`text-gray-600 mb-2`,children:e}),t&&(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`Check if the API server is running and Azure Service Bus is accessible.`}),(0,Z.jsx)(`button`,{onClick:()=>D(),className:`px-4 py-2 bg-primary-500 text-white rounded-lg hover:bg-primary-600`,children:`Try Again`})]})})}return!i&&(!a||!f)?(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`📬`}),(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900 mb-2`,children:`No entity selected`}),(0,Z.jsx)(`p`,{className:`text-gray-600`,children:`Select a queue or topic subscription from the sidebar to view messages`})]})}):(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative`,"data-tour":`messages-area`,children:[i&&(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-blue-200 px-4 py-3 flex items-center justify-between shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`inline-flex items-center justify-center w-5 h-5 bg-blue-600 rounded-full text-white text-xs font-bold`,children:`▶`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-blue-900`,children:`🎬 Interactive Demo — 50 Production-Realistic Messages`}),(0,Z.jsx)(`p`,{className:`text-xs text-blue-700 mt-0.5`,children:`Try the DLQ tab to see error patterns • Click AI Insights for root-cause analysis • Use filters to pinpoint issues`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>r(`/messages?demo=true&queueType=deadletter`),className:`text-xs font-medium text-blue-700 hover:bg-blue-100 px-2.5 py-1 rounded transition-colors`,title:`View Dead-Letter Queue`,children:`📬 View DLQ`}),(0,Z.jsxs)(`button`,{onClick:()=>r(`/connect`),className:`flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium text-blue-700 hover:bg-blue-100 rounded transition-colors`,title:`Return to Connect page`,children:[(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Exit Demo`})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-white border-b border-gray-200 px-4 py-3 flex items-center gap-3 shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 max-w-md relative`,children:[(0,Z.jsx)(k,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400`}),(0,Z.jsx)(`input`,{type:`text`,placeholder:`Search messages by ID, properties, or content...`,value:pe,onChange:e=>me(e.target.value),className:`w-full pl-10 pr-4 py-2.5 rounded-lg text-sm bg-white border border-gray-300 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-sky-500 transition-all`}),pe&&(0,Z.jsx)(`button`,{onClick:()=>me(``),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,children:(0,Z.jsx)(Fe,{className:`w-4 h-4`})})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsxs)(`button`,{onClick:()=>_e(!ge),className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm transition-colors ${ve!==`all`||ge?`border-sky-300 bg-sky-50 text-sky-700`:`border-gray-200 hover:bg-gray-50 text-gray-700`}`,children:[(0,Z.jsx)(P,{className:`w-4 h-4`}),`Filter`,ve!==`all`&&(0,Z.jsx)(`span`,{className:`w-2 h-2 bg-sky-500 rounded-full`})]}),ge&&(0,Z.jsxs)(`div`,{className:`absolute top-full right-0 mt-1 w-48 bg-white border border-gray-200 rounded-lg shadow-lg z-50 py-1`,children:[(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 uppercase`,children:`Status`}),[`all`,`success`,`warning`,`error`].map(e=>(0,Z.jsxs)(`button`,{onClick:()=>{ye(e),_e(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 flex items-center gap-2 ${ve===e?`bg-sky-50 text-sky-700`:`text-gray-700`}`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full ${e===`all`?`bg-gray-400`:e===`success`?`bg-green-500`:e===`warning`?`bg-amber-500`:`bg-red-500`}`}),e===`all`?`All Messages`:e===`error`?`Dead-Letter`:e.charAt(0).toUpperCase()+e.slice(1)]},e))]})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsxs)(`button`,{onClick:()=>de(!ue),className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm font-medium transition-colors ${ue?`border-primary-300 bg-primary-50 text-primary-700`:`border-gray-200 hover:bg-gray-50 text-gray-700`}`,children:[(0,Z.jsx)(l_,{className:`w-4 h-4 text-primary-500`}),`AI Findings: `,De,(0,Z.jsx)(Ue,{...qe.messages.aiFindings,position:`bottom`,className:`ml-0.5`})]}),ue&&(0,Z.jsx)(iy,{insights:oe||[],onClose:()=>de(!1),onViewEvidence:Pe})]}),(0,Z.jsx)(`button`,{onClick:Re,className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm font-medium transition-colors ${v?`border-green-300 bg-green-50 text-green-700 hover:bg-green-100`:`border-gray-300 bg-gray-50 text-gray-600 hover:bg-gray-100`}`,"aria-label":v?`Pause auto-refresh`:`Resume auto-refresh`,title:v?`Auto-refresh every 7 seconds`:`Auto-refresh paused`,children:v?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(n_,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Auto: ON`}),(0,Z.jsx)(Ue,{...qe.messages.autoRefresh,position:`bottom`,className:`ml-0.5`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(i_,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Auto: OFF`})]})}),(0,Z.jsxs)(`button`,{onClick:Le,className:`flex items-center gap-2 px-3 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg text-sm font-medium transition-colors relative`,"aria-label":`Refresh message list`,disabled:ee&&!T,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 ${ee&&!T?`animate-spin`:``}`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`}),O&&(0,Z.jsxs)(`span`,{className:`hidden md:inline text-xs opacity-75 ml-1`,children:[`(`,ze(),`)`]})]})]}),be&&(0,Z.jsxs)(`div`,{className:`bg-primary-50 border-b border-primary-200 px-4 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(l_,{className:`w-4 h-4 text-primary-500`}),(0,Z.jsxs)(`span`,{className:`text-sm text-primary-700`,children:[`Showing `,(0,Z.jsx)(`strong`,{children:be.length}),` of `,Ce.length.toLocaleString(),` messages`,(0,Z.jsx)(`span`,{className:`text-primary-500 ml-1`,children:`(AI pattern filter active)`})]})]}),(0,Z.jsxs)(`button`,{onClick:Ie,className:`flex items-center gap-1 text-sm text-primary-600 hover:text-primary-700 font-medium`,children:[`Clear filter`,(0,Z.jsx)(Fe,{className:`w-4 h-4`})]})]}),Ae&&!be&&(0,Z.jsxs)(`div`,{className:`bg-blue-50 border-b border-blue-200 px-4 py-2.5 flex items-center gap-2`,children:[(0,Z.jsx)(He,{className:`w-4 h-4 text-blue-600 shrink-0`}),(0,Z.jsxs)(`span`,{className:`text-xs text-blue-800 flex-1`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`More messages available:`}),` Showing `,Ce.length.toLocaleString(),` of `,ke.toLocaleString(),` messages. Scroll down or click "Load More" to view additional messages.`]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,Z.jsx)(jv,{messages:Te,selectedId:m,onSelectMessage:Me,queueTab:g,onQueueTabChange:Ne,activeCounts:{active:ie.active,deadletter:ie.deadletter},hasMoreMessages:Ae,isLoadingMore:S,onLoadMore:je}),(0,Z.jsx)(ty,{message:we,onViewPattern:Pe,insights:oe})]})]})}function Ly(){let e=fe(),[t,n]=(0,I.useState)(!1),[r,i]=(0,I.useState)(``),[a,o]=(0,I.useState)(``),[s,c]=(0,I.useState)(`dev`),[l,u]=(0,I.useState)(()=>localStorage.getItem(`servicehub_v310_hkdf_notice_dismissed`)!==`true`),d=()=>{localStorage.setItem(`servicehub_v310_hkdf_notice_dismissed`,`true`),u(!1)},[f,p]=(0,I.useState)({isOpen:!1,id:``,name:``}),{data:m,isLoading:h}=le(),g=ie(),_=w(),v=e=>{try{let t=e.match(/Endpoint=sb:\/\/([^.]+)\.servicebus\./i);return t&&t[1]?t[1]:null}catch{return null}},y=async e=>{if(e.preventDefault(),!r.trim()||!a.trim())return;let t=v(a.trim());if(!t){F.error(`Could not extract namespace from connection string. Please verify the format.`,{duration:5e3});return}try{let e=await g.mutateAsync({name:t,connectionString:a.trim(),displayName:r.trim(),environment:s});e.hasManagePermission===!1&&e.hasSendPermission===!1?F.success(`✓ Connected with Listen-only access. Perfect for DLQ inspection and message browsing. Quick Actions (FAB) require a Manage policy for send, generate, and dead-letter operations.`,{duration:8e3}):e.hasManagePermission===!1&&F(`✓ Connected with Send + Listen access. Replay and send operations are available. Some Quick Actions may require Manage permission.`,{duration:6e3,style:{background:`#f0fdf4`,color:`#166534`,border:`1px solid #86efac`}}),i(``),o(``),n(!1),c(`dev`)}catch{}},b=(e,t)=>{p({isOpen:!0,id:e,name:t})},x=async()=>{await _.mutateAsync(f.id),p({isOpen:!1,id:``,name:``})},S=()=>{p({isOpen:!1,id:``,name:``})};return h?(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-screen`,children:(0,Z.jsxs)(`div`,{className:`text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 border-4 border-primary-200 border-t-primary-600 rounded-full animate-spin mx-auto mb-4`}),(0,Z.jsx)(`p`,{className:`text-gray-600`,children:`Loading connections...`})]})}):(0,Z.jsxs)(`div`,{className:`flex-1 overflow-auto bg-gradient-to-b from-white to-gray-50 p-6 md:p-8`,children:[(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsxs)(`div`,{className:`mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-sky-500 animate-pulse`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-sky-700`,children:`Free · Open Source · No installation`})]}),(0,Z.jsxs)(`h1`,{className:`text-2xl font-bold text-gray-900 leading-tight`,children:[`Debug Azure Service Bus`,` `,(0,Z.jsx)(`span`,{className:`text-primary-600`,children:`in seconds.`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`Browse messages, pinpoint DLQ failures, replay dead-lettered events — all from your browser.`})]}),l&&(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-amber-50 border border-amber-200 p-3 flex items-start justify-between gap-3`,children:[(0,Z.jsxs)(`p`,{className:`text-xs text-amber-800`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`ServiceHub v3.1.0`}),` upgrades encryption key derivation (HKDF).`,` `,`If you have existing saved connections, they must be re-added — delete them and add them again with your connection string.`]}),(0,Z.jsx)(`button`,{type:`button`,onClick:d,className:`shrink-0 text-xs font-medium text-amber-700 hover:text-amber-900 whitespace-nowrap`,children:`I understand, don't show again`})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-sky-50 border border-sky-200 p-3 flex items-start gap-2.5`,children:[(0,Z.jsx)(O,{className:`w-4 h-4 text-sky-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-sky-800`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`Single-instance storage:`}),` Namespace connections are stored locally on the server running ServiceHub.`,` `,`If you are running `,(0,Z.jsx)(`strong`,{children:`multiple instances`}),` (e.g., Azure App Service with scale-out), each instance has its own connection list.`,` `,`Use `,(0,Z.jsx)(`strong`,{children:`sticky sessions`}),` or ensure all instances share the same storage path to avoid inconsistent connection lists across page refreshes.`]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-6 items-start mb-6`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-5`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(`span`,{className:`text-base`,children:`☁️`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:`Connect to Service Bus`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`A Listen-only SAS policy is all you need.`})]})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-green-50 border border-green-100 p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-green-600 flex-shrink-0`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-green-800`,children:`Your data stays yours`})]}),(0,Z.jsx)(`div`,{className:`space-y-1`,children:[{label:`Connection string`,value:`AES-256-GCM encrypted before saving — never returned to browser`},{label:`Message content`,value:`Never logged or stored by ServiceHub`}].map(({label:e,value:t})=>(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,Z.jsx)(`span`,{className:`text-green-500 mt-0.5 flex-shrink-0`,children:`✓`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsxs)(`span`,{className:`font-medium text-green-800`,children:[e,`:`]}),` `,(0,Z.jsx)(`span`,{className:`text-green-700`,children:t})]})]},e))}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mt-2 pt-2 border-t border-green-100`,children:[(0,Z.jsx)(`a`,{href:`https://github.com/debdevops/servicehub/blob/main/services/api/src/ServiceHub.Infrastructure/Security/ConnectionStringProtector.cs`,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs text-green-700 hover:text-green-900 underline underline-offset-2`,children:`Verify encryption code →`}),(0,Z.jsx)(ue,{to:`/security`,className:`text-xs text-green-700 hover:text-green-900 underline underline-offset-2`,children:`Security overview →`})]})]}),(0,Z.jsxs)(`form`,{onSubmit:y,children:[(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Display Name `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.displayName,position:`right`,className:`ml-1`})]}),(0,Z.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.target.value),placeholder:`e.g., Production Service Bus`,required:!0,className:`w-full px-3 py-2 rounded-lg text-sm bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`})]}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Connection String `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.connectionString,position:`right`,className:`ml-1`})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`input`,{type:t?`text`:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Endpoint=sb://...;SharedAccessKey=...`,required:!0,className:`w-full px-3 py-2 pr-10 rounded-lg text-sm font-mono bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`}),(0,Z.jsx)(`button`,{type:`button`,onClick:()=>n(!t),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,children:t?(0,Z.jsx)(Rg,{className:`w-4 h-4`}):(0,Z.jsx)(Ie,{className:`w-4 h-4`})})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 mt-1.5 text-xs text-green-700`,children:[(0,Z.jsx)(Ve,{className:`w-3 h-3 text-green-600 shrink-0`}),`AES-GCM encrypted at rest — never stored in plaintext.`]})]}),(0,Z.jsxs)(`div`,{className:`mb-4`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Environment `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.environment,position:`right`,className:`ml-1`})]}),(0,Z.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),className:`w-full px-3 py-2 rounded-lg text-sm bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:`dev`,children:`DEV — Development`}),(0,Z.jsx)(`option`,{value:`uat`,children:`UAT — User Acceptance Testing`}),(0,Z.jsx)(`option`,{value:`prod`,children:`PROD — Production`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:s===`prod`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-amber-600 font-semibold`,children:`⚠️ Production namespace:`}),` `,`Quick Actions (replay, send, generate) are disabled for safety. Validate your workflow in DEV and UAT first.`]}):s===`uat`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-amber-700 font-medium`,children:`UAT namespace:`}),` `,`Validate replay rules and DLQ behaviour here before connecting to PROD.`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-green-700 font-medium`,children:`Recommended: start with a DEV namespace.`}),` `,`Test DLQ inspection, replay rules, and message operations safely before moving to UAT or PROD.`]})})]}),(0,Z.jsx)(`button`,{type:`submit`,disabled:g.isPending,className:`w-full px-4 py-2.5 rounded-lg font-medium transition-colors flex items-center justify-center gap-2 text-white bg-primary-500 hover:bg-primary-600 disabled:bg-primary-300`,children:g.isPending?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin`}),`Connecting...`]}):(0,Z.jsx)(Z.Fragment,{children:`Connect`})})]}),(0,Z.jsxs)(`div`,{className:`mt-3 rounded-r-lg border-l-2 border-blue-300 bg-blue-50 pl-3 pr-2 py-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-blue-800 mb-1`,children:`💡 A Listen-only key is all you need — and it's the safest option`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700 mb-1`,children:[`A Listen-only policy can `,(0,Z.jsx)(`strong`,{children:`only read`}),` messages. It cannot delete, send, or modify anything. Even if this key were ever exposed, your data remains safe.`]}),(0,Z.jsxs)(`ol`,{className:`text-xs text-blue-700 space-y-0.5 list-decimal list-inside`,children:[(0,Z.jsx)(`li`,{children:`Azure Portal → your Service Bus namespace`}),(0,Z.jsx)(`li`,{children:`Shared access policies → + Add policy`}),(0,Z.jsxs)(`li`,{children:[`Name it `,(0,Z.jsx)(`code`,{className:`bg-blue-100 px-1 rounded`,children:`servicehub`}),`, tick `,(0,Z.jsx)(`strong`,{children:`Listen only`})]}),(0,Z.jsx)(`li`,{children:`Save → copy Primary Connection String → paste above`})]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-5`,children:[(0,Z.jsxs)(`h2`,{className:`text-sm font-semibold text-gray-900 mb-3 flex items-center gap-1.5`,children:[`Saved Connections`,(0,Z.jsx)(Ue,{...qe.connect.savedConnections,position:`bottom`,className:`ml-1`})]}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:m&&m.length>0?m.map(t=>(0,Z.jsxs)(`div`,{className:`flex items-center justify-between p-4 rounded-lg transition-colors cursor-pointer bg-gray-50 border border-gray-200 hover:bg-gray-100 hover:border-gray-300`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full ${t.isActive?`bg-green-500`:`bg-gray-300`}`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h3`,{className:`font-medium text-gray-900`,children:t.displayName||t.name}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] font-semibold rounded uppercase ${t.environment===`prod`?`bg-red-100 text-red-700`:t.environment===`uat`?`bg-amber-100 text-amber-700`:`bg-green-100 text-green-700`}`,children:t.environment||`dev`})]}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500`,children:[t.name,t.lastUsedAt&&` • Last used: ${new Date(t.lastUsedAt).toLocaleDateString()}`]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>e(`/messages?namespace=${t.id}`),className:`px-3 py-1.5 text-white text-sm font-medium rounded-lg transition-colors bg-primary-500 hover:bg-primary-600`,"aria-label":`Open ${t.displayName||t.name} namespace`,children:`Open`}),(0,Z.jsx)(`button`,{onClick:()=>b(t.id,t.displayName||t.name),className:`p-1.5 hover:bg-red-100 text-red-600 rounded-lg transition-colors`,type:`button`,"aria-label":`Delete ${t.displayName||t.name} connection`,children:(0,Z.jsx)(p_,{className:`w-4 h-4`})})]})]},t.id)):(0,Z.jsxs)(`div`,{className:`text-center py-8`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-gray-100 border border-gray-200 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-2xl`,children:`📭`})}),(0,Z.jsx)(`h3`,{className:`font-medium text-gray-900 mb-1`,children:`No saved connections yet`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Add your first Service Bus to get started`})]})})]}),(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-slate-800 to-primary-900 rounded-xl border border-slate-700 p-4 flex items-center gap-4`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-amber-400/20 border border-amber-400/30 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(i_,{className:`w-4 h-4 text-amber-300 fill-current`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-white`,children:`No Service Bus? Try the live demo`}),(0,Z.jsx)(`p`,{className:`text-[11px] text-slate-400 mt-0.5`,children:`50 production-realistic messages, DLQ scenarios, AI root-cause analysis — no credentials needed.`})]}),(0,Z.jsxs)(`button`,{onClick:()=>e(`/messages?demo=true`),className:`shrink-0 px-3 py-1.5 bg-amber-400 hover:bg-amber-300 text-slate-900 font-semibold text-xs rounded-lg transition-colors flex items-center gap-1.5`,children:[`Launch`,(0,Z.jsx)(Ne,{className:`w-3 h-3`})]})]}),(0,Z.jsx)(`div`,{className:`bg-white rounded-xl border border-blue-100 p-4`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-blue-50 rounded-lg flex items-center justify-center flex-shrink-0`,children:(0,Z.jsx)(Ve,{className:`w-4 h-4 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-gray-900 mb-0.5`,children:`Prefer zero-trust? Run it yourself.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-2`,children:`Deploy ServiceHub inside your own Azure subscription in under 10 minutes. Your data never leaves your infrastructure.`}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub/blob/main/self-hosting/README.md`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-xs font-medium text-blue-600 hover:text-blue-800`,children:[`Self-hosting guide `,(0,Z.jsx)(Ne,{className:`w-3 h-3`})]})]})]})})]})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 text-center mb-2`,children:`How it works`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 text-center mb-6`,children:`From zero to full message visibility in under 60 seconds`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`1`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`60 seconds to your first message view`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Paste a Listen-only connection string — no admin rights, no Azure Portal clutter, no SDK to install`})]}),(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`2`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`Find the failing message in seconds, not hours`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Filter by status, search by content, jump to the DLQ, and let AI pinpoint the root cause automatically`})]}),(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`3`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`Fix and replay without switching tools`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Bulk-replay dead-lettered messages, set auto-replay rules, and trace correlation chains — all in one browser tab`})]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-12`,children:[(0,Z.jsx)(`h3`,{className:`text-xl font-semibold text-gray-900 text-center mb-2`,children:`Built for these exact scenarios`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 text-center mb-8`,children:`Real problems that ServiceHub solves in minutes, not hours`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6`,children:[(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-red-50 border border-red-200 text-red-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-red-500`}),` Dead-Letter Flood`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`847 messages failing? Find the pattern in 30 seconds.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`Group by error, spot the duplicate root cause (null ref, version mismatch, timeout), apply a fix, 1-click bulk replay. Azure Portal: 30 min. ServiceHub: 2 min.`})]}),(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-amber-50 border border-amber-200 text-amber-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber-500`}),` Retry Loop`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Message stuck reprocessing infinitely? Diagnose in 20 seconds.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`View retry count, delivery history, peek the exact error, check for circuit-breaker miss or config bug. Dead-letter before it cascades.`})]}),(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-blue-500`}),` Correlation Tracing`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Payment failed → trace all downstream effects in one view.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`Jump from OrderCreated → PaymentProcessed → InventoryReserved. See what order #12847 touched. Replay the chain together.`})]})]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8 mb-12`,children:[(0,Z.jsxs)(`div`,{className:`bg-gradient-to-br from-gray-50 to-white rounded-xl border border-gray-200 p-6`,children:[(0,Z.jsxs)(`h4`,{className:`text-sm font-bold text-gray-800 mb-4 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-base`,children:`⚡`}),`ServiceHub vs Azure Portal`]}),(0,Z.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[[{task:`Find a failed message`,portal:`8–15 min`,hub:`< 30 sec`,hubClass:`text-green-700 font-semibold`},{task:`Replay DLQ batch`,portal:`Not possible`,hub:`1 click`,hubClass:`text-green-700 font-semibold`},{task:`AI root-cause analysis`,portal:`Not available`,hub:`Automatic`,hubClass:`text-green-700 font-semibold`},{task:`Share message link`,portal:`Not possible`,hub:`Deep link`,hubClass:`text-green-700 font-semibold`},{task:`Works on Mac/Linux`,portal:`✓`,hub:`✓`,hubClass:`text-gray-700`}].map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center text-xs`,children:[(0,Z.jsx)(`span`,{className:`flex-1 text-gray-700`,children:e.task}),(0,Z.jsx)(`span`,{className:`w-24 text-center text-gray-400`,children:e.portal}),(0,Z.jsx)(`span`,{className:`w-24 text-center ${e.hubClass}`,children:e.hub})]},e.task)),(0,Z.jsxs)(`div`,{className:`flex items-center text-[10px] text-gray-400 pt-1 border-t border-gray-100`,children:[(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsx)(`span`,{className:`w-24 text-center`,children:`Azure Portal`}),(0,Z.jsx)(`span`,{className:`w-24 text-center text-primary-600 font-semibold`,children:`ServiceHub`})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gradient-to-br from-slate-900 to-slate-800 rounded-xl border border-slate-700 p-6 flex flex-col justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(u_,{className:`w-5 h-5 text-amber-400 fill-current`}),(0,Z.jsx)(`span`,{className:`text-sm font-bold text-white`,children:`Open Source`})]}),(0,Z.jsx)(`p`,{className:`text-slate-300 text-sm leading-relaxed mb-4`,children:`ServiceHub is free, open-source, and built by engineers for engineers. If it saved your 2 AM, consider starring the repo — it takes 3 seconds and helps other developers find it.`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-slate-500 mb-5`,children:[(0,Z.jsx)(Ve,{className:`w-3.5 h-3.5`}),`Connection strings encrypted · No telemetry on message content · Self-hostable`]})]}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2 px-4 py-2.5 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-white text-sm font-medium transition-colors`,children:[(0,Z.jsx)(Hg,{className:`w-4 h-4`}),`View on GitHub · ⭐ Star`]})]})]})]}),(0,Z.jsx)(Yv,{isOpen:f.isOpen,title:`Delete Connection`,message:`Are you sure you want to delete the connection "${f.name}"?\n\nThis will remove the saved connection but will not affect your Azure Service Bus namespace.`,variant:`danger`,confirmLabel:`Delete`,onConfirm:x,onCancel:S})]})}var Ry=[{value:`DeadLetterReason`,label:`Dead Letter Reason`},{value:`DeadLetterErrorDescription`,label:`Error Description`},{value:`FailureCategory`,label:`Failure Category`},{value:`EntityName`,label:`Entity Name`},{value:`DeliveryCount`,label:`Delivery Count`},{value:`ContentType`,label:`Content Type`},{value:`TopicName`,label:`Topic Name`},{value:`CorrelationId`,label:`Correlation ID`},{value:`BodyPreview`,label:`Body Preview`},{value:`ApplicationProperty`,label:`Application Property`}],zy=[{value:`Contains`,label:`Contains`},{value:`NotContains`,label:`Does not contain`},{value:`Equals`,label:`Equals`},{value:`NotEquals`,label:`Does not equal`},{value:`StartsWith`,label:`Starts with`},{value:`EndsWith`,label:`Ends with`},{value:`Regex`,label:`Matches regex`},{value:`GreaterThan`,label:`Greater than`},{value:`LessThan`,label:`Less than`},{value:`In`,label:`In (comma-separated)`}],By={field:`DeadLetterReason`,operator:`Contains`,value:``},Vy={autoReplay:!0,delaySeconds:60,maxRetries:3,exponentialBackoff:!1};function Hy({open:e,onClose:t,onSave:n,editRule:r,initialConditions:i,initialAction:a,isSaving:o}){let[s,c]=(0,I.useState)(``),[l,u]=(0,I.useState)(``),[d,f]=(0,I.useState)(!0),[p,m]=(0,I.useState)([{...By}]),[h,g]=(0,I.useState)({...Vy}),[_,v]=(0,I.useState)(100);(0,I.useEffect)(()=>{r?(c(r.name),u(r.description??``),f(r.enabled),m(r.conditions.length>0?r.conditions:[{...By}]),g(r.action),v(r.maxReplaysPerHour)):i||a?(c(``),u(``),f(!0),m(i?.length?i:[{...By}]),g(a??{...Vy}),v(100)):y()},[r,i,a,e]);let y=()=>{c(``),u(``),f(!0),m([{...By}]),g({...Vy}),v(100)},b=()=>{m(e=>[...e,{...By}])},x=e=>{m(t=>t.filter((t,n)=>n!==e))},S=(e,t)=>{m(n=>n.map((n,r)=>r===e?{...n,...t}:n))},C=()=>{s.trim()&&(p.some(e=>!e.value.trim())||n({name:s.trim(),description:l.trim()||void 0,enabled:d,conditions:p,action:h,maxReplaysPerHour:_}))},w=s.trim().length>0&&p.every(e=>e.value.trim().length>0);return e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:r?`Edit Auto-Replay Rule`:`Create Auto-Replay Rule`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-sm text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:C,disabled:!w||o,className:`px-4 py-1.5 text-sm font-medium text-white bg-primary-500 rounded-lg hover:bg-primary-600 disabled:opacity-50 transition-colors`,children:o?`Saving...`:`Save`})]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-5 space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Rule Name`}),(0,Z.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., Database Timeouts`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary-500 focus:border-primary-500`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Description`}),(0,Z.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),placeholder:`Describe what this rule does...`,rows:2,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none`})]}),(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:d,onChange:e=>f(e.target.checked),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Enable this rule`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,Z.jsx)(`label`,{className:`text-xs font-semibold text-gray-600 uppercase`,children:`Conditions (all must match)`}),(0,Z.jsxs)(`button`,{onClick:b,className:`flex items-center gap-1 text-xs text-primary-600 hover:text-primary-700 font-medium`,children:[(0,Z.jsx)(we,{className:`w-3.5 h-3.5`}),`Add Condition`]})]}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:p.map((e,t)=>(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-3 bg-gray-50 space-y-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 grid grid-cols-3 gap-2`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Field`}),(0,Z.jsx)(`select`,{value:e.field,onChange:e=>S(t,{field:e.target.value}),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm bg-white`,children:Ry.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Operator`}),(0,Z.jsx)(`select`,{value:e.operator,onChange:e=>S(t,{operator:e.target.value}),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm bg-white`,children:zy.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Value`}),(0,Z.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>S(t,{value:e.target.value}),placeholder:`Value...`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]}),p.length>1&&(0,Z.jsx)(`button`,{onClick:()=>x(t),className:`p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors mt-4`,title:`Remove condition`,children:(0,Z.jsx)(p_,{className:`w-4 h-4`})})]}),e.field===`ApplicationProperty`&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Property Key`}),(0,Z.jsx)(`input`,{type:`text`,value:e.propertyKey??``,onChange:e=>S(t,{propertyKey:e.target.value}),placeholder:`e.g., x-retry-count`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]},t))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-2`,children:`Actions`}),(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-4 bg-gray-50 space-y-3`,children:[(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:h.autoReplay,onChange:e=>g(t=>({...t,autoReplay:e.target.checked})),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700 font-medium`,children:`Auto-replay messages that match`})]}),h.autoReplay&&(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 pl-6`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Delay (seconds)`}),(0,Z.jsx)(`input`,{type:`number`,min:0,max:86400,value:h.delaySeconds,onChange:e=>g(t=>({...t,delaySeconds:parseInt(e.target.value)||0})),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Max Retries`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:10,value:h.maxRetries,onChange:e=>g(t=>({...t,maxRetries:parseInt(e.target.value)||1})),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer col-span-2`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:h.exponentialBackoff,onChange:e=>g(t=>({...t,exponentialBackoff:e.target.checked})),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Exponential backoff`})]}),(0,Z.jsxs)(`div`,{className:`col-span-2`,children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Target Entity (optional — leave blank for original)`}),(0,Z.jsx)(`input`,{type:`text`,value:h.targetEntity??``,onChange:e=>g(t=>({...t,targetEntity:e.target.value||void 0})),placeholder:`e.g., fallback-queue`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Max Replays Per Hour`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:1e4,value:_,onChange:e=>v(parseInt(e.target.value)||100),className:`w-32 px-3 py-2 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 p-3 bg-amber-50 border border-amber-200 rounded-xl text-xs text-amber-800`,children:[(0,Z.jsx)(Gg,{className:`w-4 h-4 shrink-0 mt-0.5`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`strong`,{children:`Safety:`}),` Circuit breaker will automatically disable this rule if the success rate drops below 30% over the last 50 replays.`]})]})]})]})}):null}var Uy=`/dlq/rules`,Wy={getAll:async e=>{let t=e==null?void 0:{enabledOnly:e},{data:n}=await N.get(Uy,{params:t});return n},getById:async e=>{let{data:t}=await N.get(`${Uy}/${e}`);return t},create:async e=>{let{data:t}=await N.post(Uy,e);return t},update:async(e,t)=>{let{data:n}=await N.put(`${Uy}/${e}`,t);return n},delete:async e=>{await N.delete(`${Uy}/${e}`)},toggle:async e=>{let{data:t}=await N.post(`${Uy}/${e}/toggle`);return t},replayAll:async e=>{let{data:t}=await N.post(`${Uy}/${e}/replay-all`,null,{headers:D(ge.replayAllRules),timeout:12e4});return t},test:async e=>{let{data:t}=await N.post(`${Uy}/test`,e);return t},getTemplates:async()=>{let{data:e}=await N.get(`${Uy}/templates`);return e},generateRules:async e=>{let t=e?{namespaceId:e}:void 0,{data:n}=await N.post(`${Uy}/generate`,null,{params:t});return n}},Gy=[`rules`],Ky=[`dlq-history`,`dlq-summary`];function qy(e){return a({queryKey:[...Gy,{enabledOnly:e}],queryFn:()=>Wy.getAll(e),staleTime:3e4,refetchInterval:e=>e.state.status===`error`?!1:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===429||t?.response?.status===404||(t?.response?.status??0)>=500?!1:e<2})}function Jy(){return a({queryKey:[`rule-templates`],queryFn:()=>Wy.getTemplates(),staleTime:6e4*5})}function Yy(){let e=l();return g({mutationFn:e=>Wy.create(e),onSuccess:t=>{e.invalidateQueries({queryKey:Gy}),F.success(`Rule "${t.name}" created`)},onError:()=>F.error(`Failed to create rule`)})}function Xy(){let e=l();return g({mutationFn:({id:e,request:t})=>Wy.update(e,t),onSuccess:t=>{e.invalidateQueries({queryKey:Gy}),F.success(`Rule "${t.name}" updated`)},onError:()=>F.error(`Failed to update rule`)})}function Zy(){let e=l();return g({mutationFn:e=>Wy.delete(e),onSuccess:()=>{e.invalidateQueries({queryKey:Gy}),F.success(`Rule deleted`)},onError:()=>F.error(`Failed to delete rule`)})}function Qy(){let e=l();return g({mutationFn:e=>Wy.toggle(e),onSuccess:t=>{e.invalidateQueries({queryKey:Gy}),F.success(`Rule "${t.name}" ${t.enabled?`enabled`:`disabled`}`)},onError:()=>F.error(`Failed to toggle rule`)})}function $y(){return g({mutationFn:e=>Wy.test(e),onError:()=>F.error(`Failed to test rule`)})}function eb(){let e=l();return g({mutationFn:e=>Wy.replayAll(e),onSuccess:t=>{e.invalidateQueries({queryKey:Gy}),Ky.forEach(t=>e.invalidateQueries({queryKey:[t]})),t.replayed>0?F.success(`Replayed ${t.replayed} of ${t.totalMatched} matched messages`+(t.failed>0?` (${t.failed} failed)`:``)):t.totalMatched===0?F(`No messages matched this rule's conditions`,{icon:`ℹ️`}):F.error(`All ${t.totalMatched} matched messages failed to replay`)},onError:()=>F.error(`Failed to execute replay-all`)})}function tb(){let e=l();return g({mutationFn:e=>Wy.generateRules(e),onSuccess:t=>{e.invalidateQueries({queryKey:Gy}),t.rulesCreated>0?F.success(`Analysed ${t.analysedMessages} messages — created ${t.rulesCreated} intelligent rules`):t.analysedMessages===0?F(`No active DLQ messages to analyse`,{icon:`ℹ️`}):F(`All detected patterns already have rules`,{icon:`ℹ️`})},onError:()=>F.error(`Failed to generate intelligent rules`)})}var nb={Transient:`bg-green-100 text-green-700`,MaxDelivery:`bg-orange-100 text-orange-700`,Expired:`bg-yellow-100 text-yellow-700`,ResourceNotFound:`bg-blue-100 text-blue-700`,QuotaExceeded:`bg-red-100 text-red-700`},rb={Transient:`🟢`,MaxDelivery:`🔶`,Expired:`⏳`,ResourceNotFound:`🔍`,QuotaExceeded:`🚫`};function ib({open:e,onClose:t,onSelect:n}){let{data:r,isLoading:i}=Jy();return e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-2xl max-h-[85vh] flex flex-col mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Ae,{className:`w-5 h-5 text-primary-500`}),(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:`Choose a Rule Template`})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-4`,children:i?(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`Loading templates...`}):r&&r.length>0?r.map(e=>(0,Z.jsx)(ab,{template:e,onSelect:()=>n(e)},e.id)):(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`No templates available`})})]})}):null}function ab({template:e,onSelect:t}){let n=nb[e.category]??`bg-gray-100 text-gray-700`;return(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-4 hover:border-primary-300 hover:shadow-sm transition-all`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-lg`,children:rb[e.category]??`📋`}),(0,Z.jsx)(`h3`,{className:`text-sm font-bold text-gray-900`,children:e.name})]}),(0,Z.jsx)(`span`,{className:`px-2 py-0.5 rounded-full text-xs font-medium ${n}`,children:e.category})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-3`,children:e.description}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-gray-500`,children:[(0,Z.jsxs)(`span`,{children:[`Used `,e.usageCount,` times`]}),(0,Z.jsxs)(`span`,{className:`flex items-center gap-0.5`,children:[(0,Z.jsx)(u_,{className:`w-3.5 h-3.5 text-amber-400 fill-amber-400`}),e.rating.toFixed(1)]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-xs font-medium text-primary-700 bg-primary-50 border border-primary-200 rounded-lg hover:bg-primary-100 transition-colors`,children:`Use This Template`})]})]})}function ob({open:e,onClose:t,rule:n,conditions:r,namespaceId:i}){let a=$y(),[o,s]=(0,I.useState)(null),c=()=>{s(null),a.mutate({ruleId:n?.id,conditions:n?void 0:r,namespaceId:i,maxMessages:100},{onSuccess:s})},[l,u]=(0,I.useState)(!1);return e&&!l&&(u(!0),c()),!e&&l&&(u(!1),s(null)),e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-lg mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:n?`Test Rule: ${n.name}`:`Test Rule Conditions`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`px-6 py-5`,children:[a.isPending&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-8 text-gray-500`,children:[(0,Z.jsx)(Xg,{className:`w-5 h-5 animate-spin`}),(0,Z.jsx)(`span`,{className:`text-sm`,children:`Testing against active DLQ messages...`})]}),a.isError&&!o&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-6 text-red-600`,children:[(0,Z.jsx)(O,{className:`w-5 h-5`}),(0,Z.jsx)(`span`,{className:`text-sm`,children:`Failed to run test. Please try again.`})]}),o&&(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Ce,{className:`w-5 h-5 text-green-500`}),(0,Z.jsx)(`span`,{className:`text-sm font-semibold text-gray-900`,children:`Test Results`})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,Z.jsx)(sb,{label:`Tested`,value:o.totalTested}),(0,Z.jsx)(sb,{label:`Matched`,value:o.matchedCount,highlight:!0}),(0,Z.jsx)(sb,{label:`Est. Success`,value:`${o.estimatedSuccessRate}%`})]}),(0,Z.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Would match`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:o.matchedCount}),` of`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:o.totalTested}),` messages`]}),o.sampleMatches.length>0&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`text-xs font-semibold text-gray-600 uppercase mb-2`,children:`Sample Matched Messages`}),(0,Z.jsx)(`div`,{className:`space-y-1.5 max-h-40 overflow-y-auto`,children:o.sampleMatches.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 text-xs p-2 bg-green-50 rounded-lg`,children:[(0,Z.jsx)(`span`,{className:`shrink-0 text-green-500 mt-0.5`,children:`•`}),(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsxs)(`span`,{className:`font-mono text-gray-700`,children:[e.serviceBusMessageId.slice(0,12),`...`]}),e.deadLetterReason&&(0,Z.jsxs)(`span`,{className:`text-gray-500 ml-1.5`,children:[`— `,e.deadLetterReason]})]})]},e.messageId))})]}),o.sampleMatches.length===0&&o.matchedCount===0&&(0,Z.jsx)(`div`,{className:`py-3 text-center text-sm text-gray-500`,children:`No messages matched the conditions. Try adjusting the rule.`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-6 py-3 border-t border-gray-200`,children:[(0,Z.jsx)(`button`,{onClick:c,disabled:a.isPending,className:`px-3 py-1.5 text-sm text-primary-700 border border-primary-200 rounded-lg hover:bg-primary-50 transition-colors disabled:opacity-50`,children:`Re-test`}),(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-1.5 text-sm font-medium text-white bg-primary-500 rounded-lg hover:bg-primary-600 transition-colors`,children:`Close`})]})]})}):null}function sb({label:e,value:t,highlight:n}){return(0,Z.jsxs)(`div`,{className:`rounded-xl p-3 text-center ${n?`bg-primary-50`:`bg-gray-50`}`,children:[(0,Z.jsx)(`div`,{className:`text-xl font-bold ${n?`text-primary-700`:`text-gray-900`}`,children:typeof t==`number`?t.toLocaleString():t}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:e})]})}function cb(){let{data:e,isLoading:t,refetch:n,isFetching:r}=qy(),i=Yy(),a=Xy(),o=Zy(),s=Qy(),c=eb(),l=tb(),[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)(!1),[m,h]=(0,I.useState)(!1),[g,_]=(0,I.useState)(null),[v,y]=(0,I.useState)(null),[b,x]=(0,I.useState)(null),[S,C]=(0,I.useState)(null),[w,T]=(0,I.useState)(null),E=()=>{_(null),T(null),d(!0)},D=e=>{_(e),T(null),d(!0)},ee=e=>{p(!1),_(null),T({conditions:e.conditions,action:e.action}),d(!0)},O=e=>{y(e),h(!0)},te=e=>{g?a.mutate({id:g.id,request:e},{onSuccess:()=>d(!1)}):i.mutate(e,{onSuccess:()=>d(!1)})},k=e=>{C(e)},ne=()=>{S&&o.mutate(S.id,{onSettled:()=>C(null)})},A=e=>{x(e)},re=()=>{b&&c.mutate(b.id,{onSettled:()=>x(null)})};return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-white border-b border-gray-200 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h1`,{className:`text-xl font-bold text-gray-900`,children:[`Auto-Replay Rules`,(0,Z.jsx)(Ue,{...qe.rules.ruleBuilder,position:`bottom`,className:`ml-1.5`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-0.5`,children:`Define rules that automatically replay dead-letter messages matching specific conditions`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>l.mutate(void 0),disabled:l.isPending,className:`flex items-center gap-1.5 px-3 py-2 bg-violet-50 border border-violet-200 rounded-lg text-sm text-violet-700 hover:bg-violet-100 transition-colors disabled:opacity-50`,title:`Analyse DLQ patterns and automatically create smart rules`,children:[(0,Z.jsx)(Dg,{className:`w-4 h-4 ${l.isPending?`animate-pulse`:``}`}),l.isPending?`Analysing...`:`Generate Intelligent Rules`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(!0),className:`flex items-center gap-1.5 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),`Browse Templates`]}),(0,Z.jsxs)(`button`,{onClick:E,className:`flex items-center gap-1.5 px-3 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg text-sm font-medium transition-colors`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Create Rule`]}),(0,Z.jsx)(`button`,{onClick:()=>n(),disabled:r,className:`p-2 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,title:`Refresh`,children:(0,Z.jsx)(Ee,{className:`w-4 h-4 text-gray-500 ${r?`animate-spin`:``}`})})]})]})}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto p-6`,children:t?(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`Loading rules...`}):e&&e.length>0?(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4`,children:e.map(e=>(0,Z.jsx)(lb,{rule:e,onEdit:()=>D(e),onDelete:()=>k(e),onToggle:()=>s.mutate(e.id),onTest:()=>O(e),onReplayAll:()=>A(e),isReplayingAll:c.isPending&&b?.id===e.id},e.id))}):(0,Z.jsx)(ub,{onCreate:E,onBrowseTemplates:()=>p(!0),onGenerateRules:()=>l.mutate(void 0),isGenerating:l.isPending})}),(0,Z.jsx)(Hy,{open:u,onClose:()=>d(!1),onSave:te,editRule:g,initialConditions:w?.conditions,initialAction:w?.action,isSaving:i.isPending||a.isPending}),(0,Z.jsx)(ib,{open:f,onClose:()=>p(!1),onSelect:ee}),(0,Z.jsx)(ob,{open:m,onClose:()=>{h(!1),y(null)},rule:v}),(0,Z.jsx)(db,{rule:b,isExecuting:c.isPending,onConfirm:re,onCancel:()=>x(null)}),(0,Z.jsx)(Yv,{isOpen:S!==null,title:`Delete Rule`,message:`Delete rule "${S?.name}"? This cannot be undone. Rules that have already matched messages will lose their history statistics.`,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:ne,onCancel:()=>C(null)})]})}function lb({rule:e,onEdit:t,onDelete:n,onToggle:r,onTest:i,onReplayAll:a,isReplayingAll:o}){let s=e.matchCount>0?Math.round(e.successCount/e.matchCount*100):0;return(0,Z.jsxs)(`div`,{className:`border rounded-xl p-4 transition-all ${e.enabled?`border-gray-200 bg-white hover:shadow-md`:`border-gray-100 bg-gray-50 opacity-75`}`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,Z.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full shrink-0 ${e.enabled?`bg-green-400`:`bg-gray-300`}`}),e.name.startsWith(`Auto:`)&&(0,Z.jsx)(`span`,{className:`shrink-0 px-1.5 py-0.5 text-[10px] font-bold text-violet-700 bg-violet-100 border border-violet-200 rounded`,children:`AI`}),(0,Z.jsx)(`h3`,{className:`text-sm font-bold text-gray-900 truncate`,children:e.name})]}),(0,Z.jsx)(`button`,{onClick:r,className:`shrink-0 p-1 hover:bg-gray-100 rounded transition-colors`,title:e.enabled?`Disable rule`:`Enable rule`,children:e.enabled?(0,Z.jsx)(f_,{className:`w-5 h-5 text-green-500`}):(0,Z.jsx)(d_,{className:`w-5 h-5 text-gray-400`})})]}),e.description&&(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-3 line-clamp-2`,children:e.description}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsx)(`h4`,{className:`text-[10px] font-semibold text-gray-500 uppercase mb-1`,children:`Conditions`}),(0,Z.jsxs)(`div`,{className:`space-y-0.5`,children:[e.conditions.slice(0,3).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`•`}),(0,Z.jsxs)(`span`,{className:`lowercase`,children:[mb(e.field),` `,hb(e.operator),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-gray-800`,children:[`"`,e.value,`"`]})]})]},t)),e.conditions.length>3&&(0,Z.jsxs)(`span`,{className:`text-[10px] text-gray-400`,children:[`+`,e.conditions.length-3,` more`]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsx)(`h4`,{className:`text-[10px] font-semibold text-gray-500 uppercase mb-1`,children:`Action`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-600`,children:e.action.autoReplay?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-green-600`,children:`✓`}),` Auto-replay after`,` `,e.action.delaySeconds,`s`,e.action.exponentialBackoff&&(0,Z.jsx)(`span`,{className:`text-gray-400 ml-1`,children:`(backoff)`})]}):(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`No automatic action`})})]}),(0,Z.jsxs)(`div`,{className:`mb-4 flex items-center gap-4 text-xs text-gray-500`,children:[(0,Z.jsxs)(`span`,{children:[`Pending:`,` `,(0,Z.jsx)(`strong`,{className:e.pendingMatchCount>0?`text-amber-600`:`text-gray-700`,children:e.pendingMatchCount})]}),(0,Z.jsxs)(`span`,{children:[`Replayed:`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-700`,children:e.matchCount})]}),(0,Z.jsxs)(`span`,{children:[`Success:`,` `,(0,Z.jsxs)(`strong`,{className:`text-gray-700`,children:[e.successCount,` (`,s,`%)`]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 border-t border-gray-100 pt-3`,children:[(0,Z.jsxs)(`button`,{onClick:i,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Bg,{className:`w-3.5 h-3.5`}),`Test`]}),(0,Z.jsxs)(`button`,{onClick:a,disabled:!e.enabled||o,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded-lg hover:bg-amber-100 transition-colors disabled:opacity-40 disabled:cursor-not-allowed`,title:e.enabled?e.pendingMatchCount===0?`No pending DLQ messages match this rule`:`Replay ${e.pendingMatchCount} matching DLQ messages`:`Enable rule first`,children:[(0,Z.jsx)(i_,{className:`w-3.5 h-3.5 ${o?`animate-pulse`:``}`}),o?`Replaying...`:`Replay All`]}),(0,Z.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(r_,{className:`w-3.5 h-3.5`}),`Edit`]}),(0,Z.jsx)(`button`,{onClick:n,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-red-500 border border-gray-200 rounded-lg hover:bg-red-50 hover:border-red-200 transition-colors ml-auto`,children:(0,Z.jsx)(p_,{className:`w-3.5 h-3.5`})})]})]})}function ub({onCreate:e,onBrowseTemplates:t,onGenerateRules:n,isGenerating:r}){return(0,Z.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,Z.jsx)(Dg,{className:`w-12 h-12 text-violet-300 mx-auto mb-4`}),(0,Z.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 mb-1`,children:`No auto-replay rules yet`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-6 max-w-md mx-auto`,children:`Let ServiceHub analyse your DLQ messages and automatically create intelligent replay rules, or create rules manually from scratch or templates.`}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,Z.jsxs)(`button`,{onClick:n,disabled:r,className:`flex items-center gap-1.5 px-4 py-2 bg-violet-500 hover:bg-violet-600 text-white rounded-lg text-sm font-medium transition-colors disabled:opacity-50`,children:[(0,Z.jsx)(Dg,{className:`w-4 h-4 ${r?`animate-pulse`:``}`}),r?`Analysing DLQ Patterns...`:`Generate Intelligent Rules`]}),(0,Z.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 px-4 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),`Browse Templates`]}),(0,Z.jsxs)(`button`,{onClick:e,className:`flex items-center gap-1.5 px-4 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Create Rule`]})]})]})}function db({rule:e,isExecuting:t,onConfirm:n,onCancel:r}){return e?(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:t?void 0:r}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-lg overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-red-100 bg-red-50`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-red-100 border border-red-200 rounded-full flex items-center justify-center`,children:(0,Z.jsx)(O,{className:`w-5 h-5 text-red-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Replay All Matching Messages`}),(0,Z.jsx)(`p`,{className:`text-xs text-red-600 font-medium mt-0.5`,children:`Destructive Operation`})]})]}),!t&&(0,Z.jsx)(`button`,{onClick:r,className:`p-1 hover:bg-red-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`px-6 py-5 space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`bg-gray-50 border border-gray-200 rounded-lg px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`text-sm font-semibold text-gray-900 mb-1`,children:[`Rule: `,e.name]}),(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:e.conditions.map((e,t)=>(0,Z.jsxs)(`div`,{className:`text-xs text-gray-600 flex items-center gap-1`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`•`}),(0,Z.jsxs)(`span`,{children:[mb(e.field),` `,hb(e.operator),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-gray-800`,children:[`"`,e.value,`"`]})]})]},t))}),e.action.targetEntity&&(0,Z.jsxs)(`div`,{className:`mt-2 text-xs text-amber-700 bg-amber-50 px-2 py-1 rounded`,children:[`Target: `,(0,Z.jsx)(`strong`,{children:e.action.targetEntity}),` (not original entity)`]})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-red-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[(0,Z.jsx)(`strong`,{className:`text-red-700`,children:`Messages will be moved from the DLQ back to the active queue.`}),` `,`This cannot be undone. The `,(0,Z.jsx)(`strong`,{children:`active message count will increase`}),` — this is expected.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(O,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[`If the root cause hasn't been fixed, replayed messages may`,` `,(0,Z.jsx)(`strong`,{children:`end up back in the DLQ`}),`, creating a replay loop.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(O,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[`Replaying to the `,(0,Z.jsx)(`strong`,{children:`wrong entity`}),` or at `,(0,Z.jsx)(`strong`,{children:`high volume`}),` may cause downstream service disruption.`]})]})]}),(0,Z.jsx)(`div`,{className:`bg-blue-50 border border-blue-200 rounded-lg px-4 py-3`,children:(0,Z.jsxs)(`p`,{className:`text-xs text-blue-800`,children:[(0,Z.jsx)(`strong`,{children:`Tip:`}),` Use the `,(0,Z.jsx)(`strong`,{children:`Test`}),` button first to see how many messages match. Only proceed if you are confident the root cause is resolved.`]})})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:r,disabled:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors disabled:opacity-50`,autoFocus:!0,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:n,disabled:t,className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors disabled:opacity-60`,children:t?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 animate-spin`}),`Replaying...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(i_,{className:`w-4 h-4`}),`Yes, Replay All Matches`]})})]})]})]}):null}var fb={DeadLetterReason:`reason`,DeadLetterErrorDescription:`error`,FailureCategory:`category`,EntityName:`entity`,DeliveryCount:`delivery count`,ContentType:`content type`,TopicName:`topic`,CorrelationId:`correlation ID`,BodyPreview:`body`,ApplicationProperty:`app property`},pb={Contains:`contains`,NotContains:`doesn't contain`,Equals:`equals`,NotEquals:`doesn't equal`,StartsWith:`starts with`,EndsWith:`ends with`,Regex:`matches`,GreaterThan:`>`,LessThan:`<`,In:`in`};function mb(e){return fb[e]??e}function hb(e){return pb[e]??e}var gb=ye.create({baseURL:`/api/health`,headers:{"Content-Type":`application/json`},timeout:1e4}),_b={getVersion:async()=>{let{data:e}=await gb.get(`/version`);return e},getStatus:async()=>{let{data:e}=await gb.get(`/status`);return e}};function vb(){return a({queryKey:[`health`,`version`],queryFn:_b.getVersion,staleTime:6e4,retry:1})}function yb(){return a({queryKey:[`health`,`status`],queryFn:_b.getStatus,refetchInterval:e=>e.state.status===`error`?!1:15e3,retry:1})}function bb(e){let t=e.match(/^(?:(\d+)\.)?(\d{2}):(\d{2}):(\d{2})/);if(!t)return e;let[,n,r,i,a]=t,o=[];return n&&Number(n)>0&&o.push(`${n}d`),Number(r)>0&&o.push(`${r}h`),o.push(`${i}m`),o.push(`${a}s`),o.join(` `)}function xb({icon:e,label:t,value:n,detail:r,color:i}){return(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-5 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,Z.jsx)(`div`,{className:`p-2 rounded-lg ${i}`,children:(0,Z.jsx)(e,{className:`w-5 h-5 text-white`})}),(0,Z.jsx)(`span`,{className:`text-sm font-medium text-gray-500`,children:t})]}),(0,Z.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:n}),r&&(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-1`,children:r})]})}function Sb(){let{data:e,isLoading:t,error:n}=vb(),{data:r,isLoading:i,error:a,refetch:o}=yb(),s=t||i,c=n||a;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-emerald-600 to-emerald-500 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`h1`,{className:`text-xl font-semibold text-white`,children:`System Health`}),(0,Z.jsxs)(`button`,{onClick:()=>o(),className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 rounded-lg text-white text-sm transition-colors`,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4`}),`Refresh`]})]})}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-auto p-6 bg-gray-50/50`,children:[s&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center py-20 text-gray-500`,children:[(0,Z.jsx)(Ee,{className:`w-5 h-5 animate-spin mr-2`}),`Loading health data...`]}),c&&!s&&(0,Z.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-6 text-center`,children:[(0,Z.jsx)(`p`,{className:`text-red-700 font-medium`,children:`Unable to reach the API server`}),(0,Z.jsx)(`p`,{className:`text-red-500 text-sm mt-1`,children:`Ensure the backend is running and try again.`})]}),!s&&!c&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium ${r?.isHealthy?`bg-green-100 text-green-700`:`bg-red-100 text-red-700`}`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full ${r?.isHealthy?`bg-green-500`:`bg-red-500`}`}),r?.isHealthy?`Healthy`:`Unhealthy`]}),r?.timestamp&&(0,Z.jsxs)(`span`,{className:`text-xs text-gray-400`,children:[`as of`,` `,new Date(r.timestamp).toLocaleTimeString()]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8`,children:[(0,Z.jsx)(xb,{icon:xe,label:`Uptime`,value:r?bb(r.uptime):`—`,color:`bg-blue-500`}),(0,Z.jsx)(xb,{icon:Ug,label:`Memory Usage`,value:r?`${r.memoryUsageMb} MB`:`—`,detail:r?`GC managed: ${r.gcTotalMemoryMb} MB`:void 0,color:`bg-purple-500`}),(0,Z.jsx)(xb,{icon:Fg,label:`Threads`,value:r?.threadCount??`—`,color:`bg-amber-500`}),(0,Z.jsx)(xb,{icon:Te,label:`GC Collections`,value:r?`${r.gen0Collections} / ${r.gen1Collections} / ${r.gen2Collections}`:`—`,detail:`Gen0 / Gen1 / Gen2`,color:`bg-rose-500`})]}),e&&(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`px-5 py-3 bg-gray-50 border-b border-gray-200`,children:(0,Z.jsxs)(`h2`,{className:`text-sm font-semibold text-gray-700 flex items-center gap-2`,children:[(0,Z.jsx)(s_,{className:`w-4 h-4 text-gray-500`}),`Server Information`]})}),(0,Z.jsx)(`div`,{className:`divide-y divide-gray-100`,children:[[`Version`,e.version],[`Build`,e.informationalVersion],[`Environment`,e.environment],[`Machine`,e.machineName],[`OS`,e.osDescription],[`Framework`,e.frameworkDescription],[`Started`,new Date(e.startedAt).toLocaleString()]].map(([e,t])=>(0,Z.jsxs)(`div`,{className:`flex items-center px-5 py-2.5 text-sm`,children:[(0,Z.jsx)(`span`,{className:`w-32 text-gray-500 font-medium`,children:e}),(0,Z.jsx)(`span`,{className:`text-gray-900`,children:t})]},e))})]})]})]})]})}function Cb(){let[e,t]=(0,I.useState)(``),[n,r]=(0,I.useState)(new Set(We.map(e=>e.id))),i={"getting-started":[`/docs/screenshots/ServiceHub-Home-Page.png`],messages:[`/docs/screenshots/ServiceHub-Active-Message-1.png`,`/docs/screenshots/ServiceHub-Message-Detail-Expanded.png`],dlq:[`/docs/screenshots/ServiceHub-DLQ-Intelligence.png`],rules:[`/docs/screenshots/ServiceHub-Auto-Replay-Rules.png`],fab:[`/docs/screenshots/ServiceHub-Dashborad-6.png`],health:[`/docs/screenshots/ServiceHub-System-Health-Status.png`]},a=(0,I.useMemo)(()=>{if(!e.trim())return We;let t=e.toLowerCase();return We.map(e=>({...e,items:e.items.filter(e=>e.question.toLowerCase().includes(t)||e.answer.toLowerCase().includes(t))})).filter(e=>e.items.length>0)},[e]),o=e=>{r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,Z.jsx)(`div`,{className:`h-full overflow-y-auto bg-gradient-to-b from-white via-blue-50 to-white`,children:(0,Z.jsxs)(`div`,{className:`max-w-4xl mx-auto px-6 py-8`,children:[(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-14 h-14 bg-gradient-to-br from-primary-500 to-primary-600 rounded-2xl flex items-center justify-center shadow-lg`,children:(0,Z.jsx)(wg,{className:`w-7 h-7 text-white`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-3xl font-bold text-gray-900`,children:`Help & Support`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`Master ServiceHub in minutes`})]})]}),(0,Z.jsx)(`p`,{className:`text-gray-600 ml-[68px] text-sm leading-relaxed max-w-2xl`,children:`Everything you need to debug Azure Service Bus effectively — from getting started to advanced troubleshooting. Search or browse by topic.`})]}),(0,Z.jsxs)(`button`,{onClick:()=>{Pe(),window.dispatchEvent(new CustomEvent(`servicehub:start-tour`))},className:`flex items-center gap-2 px-6 py-3 text-sm font-semibold text-white bg-gradient-to-r from-primary-600 to-primary-700 hover:from-primary-700 hover:to-primary-800 rounded-xl transition-all shadow-md hover:shadow-lg`,children:[(0,Z.jsx)(i_,{className:`w-4 h-4`}),`Take a Tour`]})]}),(0,Z.jsx)(`div`,{className:`flex items-center gap-6 ml-[68px] mt-6 pt-6 border-t border-gray-200`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Works on`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M0 3h9v9H0V3zm10 0h14v9H10V3zM0 14h9v9H0v-9zm10 0h14v9H10v-9z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`Windows`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 ml-2`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M6.157 2a3 3 0 00-3 3v14a3 3 0 003 3h11.686a3 3 0 003-3V5a3 3 0 00-3-3H6.157zm0 1h11.686a2 2 0 012 2v14a2 2 0 01-2 2H6.157a2 2 0 01-2-2V5a2 2 0 012-2z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`macOS`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 ml-2`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`Linux`})]})]})})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-4 mb-10`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(Ae,{className:`w-5 h-5 text-amber-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Setup Time`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`30 seconds`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`From install to first debug`})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(Qg,{className:`w-5 h-5 text-blue-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Features`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`15+`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`Powerful debugging tools`})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(j,{className:`w-5 h-5 text-green-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`No Setup`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`Free`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`100% open source`})]})]}),(0,Z.jsxs)(`div`,{className:`relative mb-8`,children:[(0,Z.jsx)(k,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400`}),(0,Z.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`Search help topics… (type to filter)`,className:`w-full pl-10 pr-4 py-3 text-sm bg-white border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent shadow-sm hover:border-gray-300 transition-colors`}),e&&(0,Z.jsx)(`button`,{onClick:()=>t(``),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 font-bold text-lg`,"aria-label":`Clear search`,children:`×`})]}),a.length===0&&(0,Z.jsxs)(`div`,{className:`text-center py-16`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4`,children:(0,Z.jsx)(Ge,{className:`w-8 h-8 text-gray-400`})}),(0,Z.jsxs)(`p`,{className:`text-base font-semibold text-gray-900 mb-1`,children:[`No results for "`,(0,Z.jsx)(`span`,{className:`text-primary-600`,children:e}),`"`]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-6`,children:`Try a different search term or browse all topics`}),(0,Z.jsxs)(`button`,{onClick:()=>t(``),className:`inline-flex items-center gap-2 px-4 py-2 bg-primary-50 text-primary-700 font-medium rounded-lg border border-primary-200 hover:bg-primary-100 transition-colors`,children:[(0,Z.jsx)(ze,{className:`w-4 h-4`}),`Clear search`]})]}),(0,Z.jsx)(`div`,{className:`space-y-5`,children:a.map(e=>{let t=n.has(e.id),r=i[e.id]||[];return(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all overflow-hidden`,children:[(0,Z.jsxs)(`button`,{onClick:()=>o(e.id),className:`w-full flex items-center gap-4 px-6 py-4 text-left hover:bg-gradient-to-r hover:from-blue-50 hover:to-transparent transition-colors`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,Z.jsxs)(`div`,{className:`flex-1`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:e.title}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:[e.items.length,` `,e.items.length===1?`topic`:`topics`]})]}),(0,Z.jsx)(`span`,{className:`text-xs px-2.5 py-1 bg-blue-100 text-blue-700 rounded-full font-medium`,children:e.items.length}),t?(0,Z.jsx)(E,{className:`w-5 h-5 text-gray-400`}):(0,Z.jsx)(ze,{className:`w-5 h-5 text-gray-400`})]}),t&&(0,Z.jsxs)(`div`,{className:`border-t border-gray-100`,children:[r.length>0&&(0,Z.jsxs)(`div`,{className:`overflow-x-auto bg-gray-50 px-6 py-4 border-b border-gray-100`,children:[(0,Z.jsx)(`div`,{className:`flex gap-4`,children:r.map((t,n)=>(0,Z.jsx)(`div`,{className:`flex-shrink-0`,children:(0,Z.jsx)(`img`,{src:t,alt:`${e.title} example ${n+1}`,className:`h-32 rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow object-cover`,onError:e=>{e.target.style.display=`none`}})},n))}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600 mt-2`,children:`💡 Visual examples - click to expand`})]}),e.items.map((t,n)=>(0,Z.jsx)(`div`,{className:`px-6 py-4 ${n(await N.get(`/namespaces/${e}/queues/${t}/scheduled`,{params:{skip:n,take:r}})).data,cancelScheduled:async(e,t,n)=>{await N.delete(`/namespaces/${e}/queues/${t}/scheduled/${n}`,{headers:D(ge.cancelScheduled)})}};function Tb(e,t){return a({queryKey:[`scheduled-messages`,e,t],queryFn:()=>wb.listScheduled(e,t),enabled:!!e&&!!t,staleTime:15e3,refetchInterval:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>{let n=t?.response?.status??0;return n===404||n===401||n===403||n===429||n>=500?!1:e<2}})}function Eb(){let e=l();return g({mutationFn:({namespaceId:e,queueName:t,sequenceNumber:n})=>wb.cancelScheduled(e,t,n),onSuccess:(t,n)=>{F.success(`Scheduled message cancelled`),e.invalidateQueries({queryKey:[`scheduled-messages`,n.namespaceId,n.queueName]}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId]})},onError:e=>{let t=e?.response?.data?.detail||e?.response?.data?.title||`Failed to cancel scheduled message`;F.error(t)}})}function Db(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(t)}function Ob(e){let t=Date.now(),n=new Date(e).getTime()-t;if(n<=0)return`Now`;let r=Math.floor(n/1e3);if(r<60)return`in ${r}s`;let i=Math.floor(r/60);if(i<60)return`in ${i}m ${r%60}s`;let a=Math.floor(i/60),o=Math.floor(a/24);return o>0?`in ${o}d ${a%24}h`:`in ${a}h ${i%60}m`}function kb(e){return e==null?`—`:e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}function Ab({message:e,namespaceId:t,queueName:n,onClose:r}){let i=Eb(),a=q_(),[o,s]=(0,I.useState)(e.scheduledEnqueueTime?new Date(e.scheduledEnqueueTime).toISOString().slice(0,16):new Date(Date.now()+60*6e4).toISOString().slice(0,16)),[c,l]=(0,I.useState)(!1),u=new Date(Date.now()+3e4).toISOString().slice(0,16);return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,role:`dialog`,"aria-modal":`true`,"aria-label":`Reschedule message`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:r}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-5`,children:[(0,Z.jsx)(kg,{className:`w-5 h-5 text-sky-600`}),(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:`Reschedule Message`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`The original scheduled message will be cancelled and re-enqueued with the new delivery time.`}),(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1.5`,htmlFor:`new-schedule-time`,children:`New delivery time`}),(0,Z.jsx)(`input`,{id:`new-schedule-time`,type:`datetime-local`,value:o,min:u,onChange:e=>s(e.target.value),className:`w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-sky-400`}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2 mt-6`,children:[(0,Z.jsx)(`button`,{onClick:r,disabled:c,className:`px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsxs)(`button`,{onClick:async()=>{if(o){l(!0);try{await i.mutateAsync({namespaceId:t,queueName:n,sequenceNumber:e.sequenceNumber}),await a.mutateAsync({namespaceId:t,queueOrTopicName:n,entityType:`queue`,message:{body:e.body??``,contentType:e.contentType??`application/json`,correlationId:e.correlationId??void 0,sessionId:e.sessionId??void 0,scheduledEnqueueTime:new Date(o).toISOString()}}),F.success(`Message rescheduled successfully`),r()}catch{l(!1)}}},disabled:c||!o,className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium bg-sky-600 text-white hover:bg-sky-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(kg,{className:`w-3.5 h-3.5`}),c?`Rescheduling…`:`Confirm Reschedule`]})]})]})]}),document.body)}function jb({namespaceId:e,queueName:t,onClose:n}){let r=q_(),[i,a]=(0,I.useState)(``),[o,s]=(0,I.useState)(new Date(Date.now()+60*6e4).toISOString().slice(0,16)),[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(``),[f,p]=(0,I.useState)(`application/json`),[m,h]=(0,I.useState)(!1),g=new Date(Date.now()+3e4).toISOString().slice(0,16);return(0,Z.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-lg shadow-2xl max-w-md w-full max-h-[90vh] overflow-y-auto`,children:[(0,Z.jsxs)(`div`,{className:`bg-sky-600 text-white px-6 py-4 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(we,{className:`w-5 h-5`}),(0,Z.jsx)(`span`,{className:`font-semibold`,children:`Schedule New Message`})]}),(0,Z.jsx)(`button`,{onClick:n,disabled:m,className:`hover:bg-white/20 p-1 rounded disabled:opacity-50`,"aria-label":`Close`,children:(0,Z.jsx)(Le,{className:`w-5 h-5`})})]}),(0,Z.jsxs)(`div`,{className:`p-6 space-y-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Message Body`}),(0,Z.jsx)(`textarea`,{value:i,onChange:e=>a(e.target.value),disabled:m,placeholder:`{"orderId":"ORDER-123","amount":100}`,rows:4,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Scheduled For`}),(0,Z.jsx)(`input`,{type:`datetime-local`,value:o,onChange:e=>s(e.target.value),disabled:m,min:g,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:o?Ob(new Date(o).toISOString()):`—`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Content Type`}),(0,Z.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:m,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(`option`,{value:`application/json`,children:`JSON`}),(0,Z.jsx)(`option`,{value:`application/xml`,children:`XML`}),(0,Z.jsx)(`option`,{value:`text/plain`,children:`Plain Text`}),(0,Z.jsx)(`option`,{value:``,children:`None`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Correlation ID (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),disabled:m,placeholder:`e.g., order-12345`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Session ID (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),disabled:m,placeholder:`e.g., session-xyz`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 px-6 py-3 flex items-center justify-end gap-2 border-t border-gray-200`,children:[(0,Z.jsx)(`button`,{onClick:n,disabled:m,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors disabled:opacity-50`,children:`Cancel`}),(0,Z.jsxs)(`button`,{onClick:async()=>{if(!i.trim()){F.error(`Message body cannot be empty`);return}if(!o){F.error(`Please select a delivery time`);return}h(!0);try{let a=new Date(o).toISOString();if(new Date(a).getTime()<=Date.now()){F.error(`Scheduled time must be at least 30 seconds in the future`),h(!1);return}await r.mutateAsync({namespaceId:e,queueOrTopicName:t,message:{body:i,contentType:f,...c&&{correlationId:c},...u&&{sessionId:u},scheduledEnqueueTime:a}}),n()}catch{}finally{h(!1)}},disabled:m||!i.trim(),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-sky-600 hover:bg-sky-700 rounded-lg transition-colors disabled:bg-sky-300 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(xe,{className:`w-4 h-4`}),m?`Scheduling…`:`Schedule Message`]})]})]})})}function Mb({message:e,namespaceId:t,queueName:n}){let r=Eb(),[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(!1),[,c]=(0,I.useState)(0),l=e.scheduledEnqueueTime;(0,I.useEffect)(()=>{let e;function t(){let n=l?new Date(l).getTime()-Date.now():1/0;e=setTimeout(()=>{c(e=>e+1),t()},n<6e4?1e3:n<36e5?1e4:3e4)}return t(),()=>clearTimeout(e)},[l]);let u=()=>a(!0),d=async()=>{a(!1),await r.mutateAsync({namespaceId:t,queueName:n,sequenceNumber:e.sequenceNumber})},f=e.messageId?`${e.messageId.substring(0,12)}…`:`#${e.sequenceNumber}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`tr`,{className:`border-b border-gray-100 hover:bg-sky-50/30 transition-colors`,children:[(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono text-gray-700`,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(`span`,{title:e.messageId??void 0,className:`cursor-default`,children:f}),e.messageId&&(0,Z.jsx)(ce,{text:e.messageId,label:`message ID`,iconSize:`w-3 h-3`})]})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 max-w-[220px]`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs bg-gray-50 border border-gray-200 rounded px-1.5 py-0.5 block truncate`,children:e.body?e.body.substring(0,80):(0,Z.jsx)(`span`,{className:`italic text-gray-300`,children:`empty`})})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600 whitespace-nowrap`,children:l?(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sky-700 font-medium`,children:[(0,Z.jsx)(xe,{className:`w-3.5 h-3.5 shrink-0`}),Db(l)]}):(0,Z.jsx)(`span`,{className:`text-gray-400 italic text-xs`,children:`—`})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 whitespace-nowrap`,children:l?(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:Ob(l)}):(0,Z.jsx)(`span`,{className:`text-gray-400 italic text-xs`,children:`—`})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 whitespace-nowrap`,children:kb(e.body?new TextEncoder().encode(e.body).length:null)}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-right`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>s(!0),disabled:r.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-sky-600 hover:text-sky-700 hover:bg-sky-50 border border-sky-200 hover:border-sky-300 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(kg,{className:`w-3.5 h-3.5`}),`Reschedule`]}),(0,Z.jsxs)(`button`,{onClick:u,disabled:r.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-red-600 hover:text-red-700 hover:bg-red-50 border border-red-200 hover:border-red-300 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(Le,{className:`w-3.5 h-3.5`}),`Cancel`]})]})})]}),o&&(0,Z.jsx)(Ab,{message:e,namespaceId:t,queueName:n,onClose:()=>s(!1)}),(0,Z.jsx)(Yv,{isOpen:i,title:`Cancel Scheduled Message`,message:`Cancel the scheduled message ${f}?\n\nThis action cannot be undone.`,confirmLabel:`Yes, Cancel Message`,cancelLabel:`Keep It`,variant:`danger`,onConfirm:d,onCancel:()=>a(!1)})]})}function Nb(){let[e,t]=se(),[n,r]=(0,I.useState)(!1),i=e.get(`namespace`)??``,a=e.get(`queue`)??``,o=e=>{t(e?{namespace:e}:{})},s=n=>{if(n)t({namespace:i,queue:n});else{let n=new URLSearchParams(e);n.delete(`queue`),t(n)}},{data:c}=le(),{data:l}=Oe(i),{data:u,isLoading:d,isError:f,refetch:p,isFetching:m}=Tb(i,a),h=u?.items??[],g=u?.totalCount??h.length;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-sky-600 to-sky-500 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(Ag,{className:`w-6 h-6 text-white/80`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-xl font-semibold text-white`,children:`Scheduled Messages`}),(0,Z.jsx)(`p`,{className:`text-sky-100 text-sm`,children:`View and cancel messages queued for future delivery`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>r(!0),disabled:!a,className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors`,title:a?`Schedule a new message`:`Select a queue first`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Schedule`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(),disabled:m||!a,className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors`,title:`Refresh`,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 ${m?`animate-spin`:``}`}),`Refresh`]})]})]})}),(0,Z.jsxs)(`div`,{className:`bg-white border-b border-gray-200 px-6 py-3 flex items-center gap-4 shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-600`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:i,onChange:e=>o(e.target.value),className:`px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 min-w-[180px]`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace…`}),c?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-600`,children:`Queue`}),(0,Z.jsxs)(`select`,{value:a,onChange:e=>s(e.target.value),disabled:!i,className:`px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 min-w-[180px] disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select queue…`}),l?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[e.name,` (`,e.scheduledMessageCount,` scheduled)`]},e.name))]})]}),a&&(0,Z.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:(0,Z.jsxs)(`span`,{className:`px-2.5 py-1 bg-sky-100 text-sky-700 text-sm font-semibold rounded-full`,children:[g,` message`,g===1?``:`s`]})})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gray-50`,children:!i||!a?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-center px-6`,children:[(0,Z.jsx)(Ag,{className:`w-12 h-12 text-gray-300 mb-3`}),(0,Z.jsx)(`p`,{className:`text-gray-500 font-medium`,children:`Select a namespace and queue`}),(0,Z.jsx)(`p`,{className:`text-gray-400 text-sm mt-1`,children:`Choose a namespace and queue above to view scheduled messages`})]}):d?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3`,children:[(0,Z.jsx)(Ee,{className:`w-8 h-8 text-sky-400 animate-spin`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Loading scheduled messages…`})]}):f?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3`,children:[(0,Z.jsx)(He,{className:`w-10 h-10 text-red-400`}),(0,Z.jsx)(`p`,{className:`text-gray-600 font-medium`,children:`Failed to load scheduled messages`}),(0,Z.jsx)(`button`,{onClick:()=>p(),className:`px-4 py-2 text-sm text-sky-600 hover:text-sky-700 border border-sky-300 rounded-lg hover:bg-sky-50 transition-colors`,children:`Try Again`})]}):h.length===0?(0,Z.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 px-6 text-center`,children:g>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kg,{className:`w-10 h-10 text-sky-300`}),(0,Z.jsxs)(`p`,{className:`text-gray-600 font-medium`,children:[g,` message`,g===1?` is`:`s are`,` scheduled but content cannot be displayed`]}),(0,Z.jsxs)(`p`,{className:`text-gray-400 text-sm max-w-md`,children:[`Azure Service Bus reports `,(0,Z.jsxs)(`strong`,{children:[g,` scheduled message`,g===1?``:`s`]}),` in this queue. Message content is stored in a separate scheduling store and can only be retrieved after the messages are delivered to the active queue. Scheduled delivery times remain accurate.`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(),className:`mt-2 flex items-center gap-1.5 px-4 py-2 text-sm text-sky-600 border border-sky-300 rounded-lg hover:bg-sky-50 transition-colors`,children:[(0,Z.jsx)(Ee,{className:`w-3.5 h-3.5`}),`Refresh`]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ke,{className:`w-10 h-10 text-gray-300`}),(0,Z.jsx)(`p`,{className:`text-gray-500 font-medium`,children:`No scheduled messages`}),(0,Z.jsx)(`p`,{className:`text-gray-400 text-sm`,children:`This queue has no messages pending future delivery`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden`,children:(0,Z.jsxs)(`table`,{className:`w-full text-left`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{className:`border-b border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Message ID`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Body Preview`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Scheduled For`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Delivers In`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Size`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-right text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Action`})]})}),(0,Z.jsx)(`tbody`,{children:h.map(e=>(0,Z.jsx)(Mb,{message:e,namespaceId:i,queueName:a},e.sequenceNumber))})]})}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-400 mt-3 text-center`,children:[`Showing `,h.length,` of `,g,` scheduled message`,g===1?``:`s`,`. Auto-refreshes every 10 seconds.`]})]})}),n&&i&&a&&(0,Z.jsx)(jb,{namespaceId:i,queueName:a,onClose:()=>r(!1)})]})}var Pb=`https://github.com/debdevops/servicehub/blob/main/services/api/src`,Fb=[{label:`ConnectionStringProtector.cs`,description:`AES-256-GCM encryption and decryption of connection strings at rest.`,href:`${Pb}/ServiceHub.Infrastructure/Security/ConnectionStringProtector.cs`},{label:`LogRedactor.cs`,description:`Strips SharedAccessKey and all secret values from every log entry before writing.`,href:`${Pb}/ServiceHub.Infrastructure/Security/LogRedactor.cs`},{label:`NamespacesController.cs — MapToResponse`,description:`Confirms the API response DTO has no ConnectionString field — the encrypted value never leaves the server.`,href:`${Pb}/ServiceHub.Api/Controllers/V1/NamespacesController.cs`}],Ib=[{icon:Zg,title:`Connection strings`,color:`bg-green-100 text-green-700`,points:[`Encrypted with AES-256-GCM immediately on receipt`,`Encryption key lives only in Azure App Service configuration — never on disk`,`Plaintext connection string is never written to disk, never logged, never returned to your browser after the initial POST`]},{icon:Ie,title:`Application logs`,color:`bg-blue-100 text-blue-700`,points:[`LogRedactor strips SharedAccessKey and all secret-bearing values before any log is written`,`If an exception is logged while processing a connection string, the key value is replaced with [REDACTED]`,`No message content is ever included in server logs`]},{icon:zg,title:`API responses`,color:`bg-purple-100 text-purple-700`,points:[`The NamespacesController MapToResponse method does not include ConnectionString in any response DTO`,`Clients receive: ID, display name, environment, permissions, and timestamps — nothing sensitive`,`The encrypted blob stays server-side only`]},{icon:$g,title:`Browser storage`,color:`bg-amber-100 text-amber-700`,points:[`No connection strings are written to localStorage, sessionStorage, cookies, or IndexedDB`,`The only data stored in your browser is your saved namespace IDs (not the credentials)`,`Clearing browser storage does not affect your connection credentials`]}];function Lb(){return(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gradient-to-b from-white to-gray-50`,children:(0,Z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-10`,children:[(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center`,children:(0,Z.jsx)(Ve,{className:`w-5 h-5 text-green-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900 leading-tight`,children:`Security & privacy`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`How ServiceHub handles your credentials and data`})]})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed mt-4`,children:`We understand that pasting an Azure Service Bus connection string into a web app is a significant trust decision. This page explains exactly what ServiceHub stores, what it never touches, and where you can verify every claim directly in the open-source code.`})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-4`,children:`How your data moves through ServiceHub`}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-between gap-4 mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-blue-50 border border-blue-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)($g,{className:`w-6 h-6 text-blue-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`Your browser`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(Ne,{className:`w-5 h-5 text-gray-400 rotate-0 sm:rotate-0 rotate-90`}),(0,Z.jsx)(`span`,{className:`text-[10px] font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full`,children:`HTTPS + SPA token`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-green-50 border border-green-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)(s_,{className:`w-6 h-6 text-green-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`ServiceHub server`}),(0,Z.jsx)(`span`,{className:`text-[10px] text-gray-400`,children:`.NET 10 API`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(Ne,{className:`w-5 h-5 text-gray-400`}),(0,Z.jsx)(`span`,{className:`text-[10px] font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full`,children:`Azure SDK`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-blue-50 border border-blue-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)(`span`,{className:`text-xl`,children:`☁️`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`Your Service Bus`}),(0,Z.jsx)(`span`,{className:`text-[10px] text-gray-400`,children:`Azure`})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-2 border-t border-gray-100 pt-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Ce,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Connection string:`}),` Encrypted with AES-256-GCM immediately on the server. The encrypted blob is stored. The plaintext is discarded. It is never returned to the browser.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Ce,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Message content:`}),` Read transiently from Azure Service Bus via the SDK to display in your browser. Never stored, never logged, never indexed by ServiceHub.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Ce,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Browser traffic:`}),` All requests use HTTPS and a short-lived HMAC-signed SPA token — no raw API keys are exposed to the browser.`]})]})]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-4`,children:`What we protect`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:Ib.map(({icon:e,title:t,color:n,points:r})=>(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-7 h-7 rounded-lg flex items-center justify-center ${n}`,children:(0,Z.jsx)(e,{className:`w-4 h-4`})}),(0,Z.jsx)(`span`,{className:`text-sm font-semibold text-gray-900`,children:t})]}),(0,Z.jsx)(`ul`,{className:`space-y-1.5`,children:r.map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-1.5 text-xs text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-gray-400 mt-1.5 shrink-0`}),e]},e))})]},t))})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-1`,children:`Verify it yourself`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`ServiceHub is fully open source. Every security claim on this page has a direct link to the relevant source file on GitHub.`}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:Fb.map(({label:e,description:t,href:n})=>(0,Z.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-start gap-3 bg-white rounded-xl border border-gray-200 shadow-sm p-4 hover:border-primary-300 hover:shadow-md transition-all group`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-gray-50 border border-gray-200 rounded-lg flex items-center justify-center shrink-0 group-hover:bg-primary-50 group-hover:border-primary-200 transition-colors`,children:(0,Z.jsx)(zg,{className:`w-4 h-4 text-gray-500 group-hover:text-primary-600`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium text-gray-900 group-hover:text-primary-700 font-mono`,children:e}),(0,Z.jsx)(Lg,{className:`w-3 h-3 text-gray-400 group-hover:text-primary-500 shrink-0`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:t})]})]},e))})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-1`,children:`Prefer zero trust in third-party infrastructure?`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`If your security policy does not allow connecting production or sensitive Service Bus namespaces to a hosted third-party app — that is the right call. ServiceHub is designed to be self-hosted.`}),(0,Z.jsx)(`div`,{className:`bg-blue-50 border border-blue-200 rounded-xl p-5`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-blue-100 border border-blue-200 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(s_,{className:`w-4 h-4 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-blue-900`,children:`Run ServiceHub in your own Azure subscription`}),(0,Z.jsx)(`p`,{className:`text-xs text-blue-700 mt-1 leading-relaxed`,children:`Deploy the .NET 10 API + React frontend to your own Azure App Service. Your connection strings are encrypted with a key only you control. No data ever leaves your infrastructure. The self-hosting guide walks through a complete deployment in under 10 minutes.`}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub#-quick-start`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-blue-700 font-medium hover:text-blue-900 hover:underline mt-3`,children:[(0,Z.jsx)(Lg,{className:`w-3 h-3`}),`Self-hosting guide on GitHub`]})]})]})})]}),(0,Z.jsx)(`div`,{className:`mb-6`,children:(0,Z.jsx)(`div`,{className:`bg-amber-50 border border-amber-200 rounded-xl p-5`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-amber-100 border border-amber-200 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(O,{className:`w-4 h-4 text-amber-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-amber-900`,children:`Found a security issue?`}),(0,Z.jsxs)(`p`,{className:`text-xs text-amber-700 mt-1 leading-relaxed`,children:[`Please do not open a public GitHub issue for security vulnerabilities. Open a GitHub issue with the title prefixed`,` `,(0,Z.jsx)(`code`,{className:`bg-amber-100 px-1 rounded font-mono`,children:`[SECURITY]`}),` `,`— it will be treated as a private disclosure and acknowledged within 48 hours. We follow responsible disclosure: we will coordinate a fix and credit you when the patch is released.`]}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub/issues/new?title=%5BSECURITY%5D`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-amber-700 font-medium hover:text-amber-900 hover:underline mt-3`,children:[(0,Z.jsx)(Lg,{className:`w-3 h-3`}),`Report a security issue on GitHub`]})]})]})})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 pt-4 border-t border-gray-100 text-xs text-gray-500`,children:[(0,Z.jsx)(ue,{to:`/connect`,className:`hover:text-gray-900 hover:underline`,children:`← Back to Connect`}),(0,Z.jsx)(ue,{to:`/help`,className:`hover:text-gray-900 hover:underline`,children:`Help & documentation`}),(0,Z.jsx)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-gray-900 hover:underline`,children:`GitHub repository`})]})]})})}var Rb=`https://app-servicehub-prod.azurewebsites.net/`,zb=`https://github.com/debdevops/servicehub`;function Bb(){let e=[{icon:k,title:`Forensic Message Browser`,description:`Browse Active and Dead-Letter queues with full message bodies, headers, and properties. Syntax-highlighted JSON/XML. Virtualized grid handles thousands of messages without a lag.`,badge:`Core`},{icon:Ae,title:`Auto-Replay Rules Engine`,description:`Define smart rules to detect and replay failed DLQ messages automatically. Built-in templates for timeouts, throttle errors, and TTL expiry — with rate limiting and circuit-breaker safety controls.`,badge:`Automation`},{icon:Dg,title:`Client-Side AI Analysis`,description:`Pattern-detection engine groups DLQ failures by error type, calculates confidence scores, and surfaces the highest-impact clusters — entirely in your browser. Zero data sent anywhere.`,badge:`AI`},{icon:Re,title:`DLQ Intelligence & 30-Day History`,description:`Persistent SQLite-backed history of every DLQ event. Trend charts, auto-categorisation into 5 failure types, replay-safety ratings, and CSV/JSON export for post-mortem reports.`,badge:`Analytics`},{icon:Vg,title:`Correlation Explorer`,description:`Paste any Correlation ID and instantly trace a message's full journey across every queue, topic, subscription, and namespace — invaluable for debugging distributed workflows.`,badge:`Tracing`},{icon:xe,title:`Scheduled Message Manager`,description:`View all future-scheduled messages across your namespaces. Reschedule or cancel individual messages from the UI — no SDK scripts required.`,badge:`Management`},{icon:qg,title:`Multi-Namespace Support`,description:`Connect to multiple Azure Service Bus namespaces simultaneously — DEV, UAT, PROD, all visible in the sidebar with live colour-coded message counts.`,badge:`Enterprise`},{icon:Te,title:`Live System Health Monitor`,description:`Real-time runtime metrics: uptime, memory usage, thread count, GC generations, and full .NET environment information. Know your deployment is healthy at a glance.`,badge:`Ops`},{icon:Zg,title:`Enterprise Security`,description:`AES-GCM encrypted connection strings at rest. HMAC SPA token auth. Read-only PeekMessagesAsync — messages are never consumed or removed. OWASP-compliant.`,badge:`Security`},{icon:Ee,title:`Real-Time Auto-Refresh`,description:`Message lists refresh every 7 seconds automatically. Live incident visibility without manual page reloads — just leave it open during production incidents.`,badge:`Live`}],t=[{feature:`View Full Message Body & Content`,portal:`Count only`,hub:`Full body + syntax highlighting`},{feature:`Real-Time Full-Text Search`,portal:`Not available`,hub:`Instant, cross-field search`},{feature:`Dead-Letter Queue Investigation`,portal:`One message at a time`,hub:`Batch analysis + AI patterns`},{feature:`AI Pattern Detection`,portal:`Not available`,hub:`Client-side clustering, zero data sent`},{feature:`Replay Messages from DLQ`,portal:`Not available`,hub:`One-click or automated rules`},{feature:`30-Day DLQ Trend History`,portal:`Not available`,hub:`Full history + trend charts`},{feature:`Correlation ID Tracing`,portal:`Not available`,hub:`Cross-queue journey explorer`},{feature:`Multi-Namespace Management`,portal:`Portal-per-namespace`,hub:`All namespaces simultaneously`},{feature:`Scheduled Message Management`,portal:`Not available`,hub:`View, reschedule & cancel`},{feature:`Auto-Replay Rules Engine`,portal:`Not available`,hub:`Smart matching + safety controls`},{feature:`Live Health & Metrics Dashboard`,portal:`Basic only`,hub:`Full runtime + GC metrics`}],n=[{emoji:`🚨`,title:`Production Incident — 2 AM`,story:`10,000 orders stuck in DLQ. Azure Portal shows counts, nothing else. With ServiceHub: search all messages in seconds, AI detects 3 error clusters, auto-replay rule recovers 8,000 in minutes.`,saving:`~6 hours saved`,color:`amber`},{emoji:`🔍`,title:`Post-Mortem Root-Cause Analysis`,story:`DLQ Intelligence stores 30 days of failure history. Graph trends, categorise failures (Transient, MaxDelivery, Expired, DataQuality), extract patterns, and export CSV for stakeholder reports.`,saving:`Data-driven insights`,color:`blue`},{emoji:`🎯`,title:`Hands-Free Automated Recovery`,story:`Deploy auto-replay rules that watch for transient errors and replay automatically. Templates cover throttling, timeout, and TTL expiry. Set once — forget it.`,saving:`Zero manual intervention`,color:`green`},{emoji:`🔗`,title:`Distributed Message Tracing`,story:`Trace a Correlation ID across all queues, topics, and subscriptions to find exactly where a payment, order, or notification broke in a multi-hop workflow.`,saving:`30 min → 30 seconds`,color:`sky`}],r={amber:`from-amber-50 to-white border-amber-200`,blue:`from-blue-50 to-white border-blue-200`,green:`from-green-50 to-white border-green-200`,sky:`from-sky-50 to-white border-sky-200`},i={amber:`text-amber-700`,blue:`text-blue-700`,green:`text-green-700`,sky:`text-sky-700`};return(0,Z.jsxs)(`div`,{className:`flex flex-col min-h-screen bg-gradient-to-b from-white via-primary-50/20 to-white font-sans`,children:[(0,Z.jsx)(`header`,{className:`fixed top-0 w-full bg-white/90 backdrop-blur-md border-b border-gray-200 z-50 shadow-sm`,children:(0,Z.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-gradient-to-br from-primary-600 to-primary-700 rounded-xl flex items-center justify-center shadow-sm`,children:(0,Z.jsx)(k,{className:`w-5 h-5 text-white`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{className:`font-bold text-gray-900 text-lg`,children:`ServiceHub`}),(0,Z.jsx)(`span`,{className:`ml-2 text-xs text-primary-600 font-medium bg-primary-50 px-2 py-0.5 rounded-full`,children:`v3.1.0`})]})]}),(0,Z.jsxs)(`nav`,{className:`hidden md:flex items-center gap-6 text-sm`,children:[(0,Z.jsx)(`a`,{href:`#features`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Features`}),(0,Z.jsx)(`a`,{href:`#compare`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Compare`}),(0,Z.jsx)(`a`,{href:`#usecases`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Use Cases`}),(0,Z.jsxs)(`a`,{href:zb,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 text-gray-600 hover:text-gray-900 transition-colors font-medium`,children:[(0,Z.jsx)(Hg,{className:`w-4 h-4`}),`GitHub`]})]}),(0,Z.jsxs)(ue,{to:`/connect`,className:`inline-flex items-center gap-2 px-5 py-2 bg-primary-600 text-white text-sm font-semibold rounded-lg hover:bg-primary-700 transition-colors shadow-sm`,"aria-label":`Open ServiceHub application`,children:[`Open App`,(0,Z.jsx)(Ne,{className:`w-3.5 h-3.5`})]})]})}),(0,Z.jsx)(`section`,{className:`pt-36 pb-24 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto text-center`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 mb-6 px-4 py-2 bg-primary-50 border border-primary-200 text-primary-700 rounded-full text-sm font-semibold shadow-sm`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 bg-green-500 rounded-full animate-pulse`}),`Production-Ready · Hosted on Azure · v3.1.0 Live`]}),(0,Z.jsxs)(`h1`,{className:`text-5xl md:text-6xl lg:text-7xl font-extrabold text-gray-900 mb-6 leading-[1.08] tracking-tight`,children:[(0,Z.jsx)(`span`,{className:`text-transparent bg-clip-text bg-gradient-to-r from-primary-600 via-sky-500 to-blue-600`,children:`Azure Service Bus`}),(0,Z.jsx)(`br`,{}),(0,Z.jsx)(`span`,{children:`Forensic Debugger`})]}),(0,Z.jsx)(`p`,{className:`text-xl md:text-2xl text-gray-600 mb-4 max-w-3xl mx-auto leading-relaxed font-light`,children:`Everything the Azure Portal can't show you — full message bodies, DLQ patterns, auto-replay rules, correlation tracing, and AI-powered insights.`}),(0,Z.jsx)(`p`,{className:`text-base text-gray-500 mb-10 max-w-2xl mx-auto`,children:`Built for DevOps, Platform, and SRE engineers who need real answers during production incidents — not just message counts.`}),(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 mb-14`,children:[(0,Z.jsxs)(ue,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-primary-600 text-white text-base font-bold rounded-xl hover:bg-primary-700 transition-all shadow-lg hover:shadow-xl hover:-translate-y-0.5`,"aria-label":`Open the ServiceHub application`,children:[`🚀 Open ServiceHub`,(0,Z.jsx)(Ne,{className:`w-5 h-5`})]}),(0,Z.jsxs)(`a`,{href:zb,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-gray-800 text-base font-bold rounded-xl border-2 border-gray-300 hover:border-gray-400 hover:bg-gray-50 transition-all shadow-sm`,children:[(0,Z.jsx)(Hg,{className:`w-5 h-5`}),`View on GitHub`]}),(0,Z.jsx)(ue,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-primary-600 text-base font-bold rounded-xl border-2 border-primary-300 hover:border-primary-400 hover:bg-primary-50 transition-all shadow-sm`,children:`💻 Self-Host Locally`})]}),(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-x-8 gap-y-3 text-sm text-gray-500`,children:[{icon:`✅`,label:`100% Open Source (MIT)`},{icon:`🔐`,label:`AES-GCM Encrypted at Rest`},{icon:`👁️`,label:`Read-Only by Default`},{icon:`🧠`,label:`AI Runs Entirely In-Browser`},{icon:`☁️`,label:`Azure-Hosted & Self-Hostable`}].map(({icon:e,label:t})=>(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 font-medium`,children:[(0,Z.jsx)(`span`,{children:e}),` `,t]},t))})]})}),(0,Z.jsx)(`section`,{className:`px-6 pb-8`,children:(0,Z.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-4 p-5 bg-blue-50 border border-blue-200 rounded-xl shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`flex-shrink-0 w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mt-0.5`,children:(0,Z.jsx)(Ve,{className:`w-5 h-5 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-bold text-blue-900 mb-1`,children:`🔒 Authentication via Microsoft Entra ID (Azure AD)`}),(0,Z.jsxs)(`p`,{className:`text-sm text-blue-800 leading-relaxed`,children:[`When you open the hosted application, you will be redirected to`,` `,(0,Z.jsx)(`strong`,{children:`Microsoft's own login page`}),` — the same identity provider trusted by Fortune 500 companies. This is for`,` `,(0,Z.jsx)(`strong`,{children:`access control only`}),`. ServiceHub does`,` `,(0,Z.jsx)(`strong`,{children:`not store your personal information, credentials, or any user data`}),`. We do not have a user database. We comply with GDPR and data-minimisation principles. Your Azure Service Bus connection strings are encrypted in your session using AES-GCM — they are never transmitted to any third party.`]})]})]})})}),(0,Z.jsx)(`section`,{className:`px-6 pb-10`,children:(0,Z.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,Z.jsxs)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 p-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,Z.jsx)(`div`,{className:`flex-shrink-0 w-9 h-9 bg-amber-100 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(Ve,{className:`w-5 h-5 text-amber-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-bold text-amber-900`,children:`Recommended Adoption Path`}),(0,Z.jsx)(`p`,{className:`text-xs text-amber-700 mt-0.5`,children:`Follow this flow before connecting to a production namespace.`})]})]}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-3 mb-4`,children:[{step:`1`,env:`DEV`,color:`green`,title:`Start in DEV`,desc:`Connect your development namespace. Explore messages, test DLQ inspection, try auto-replay rules, and verify your workflow in a safe environment.`},{step:`2`,env:`UAT`,color:`amber`,title:`Validate in UAT`,desc:`Repeat in your UAT namespace. Confirm replay behaviour with realistic data, validate auto-replay rules, and review AI findings against production-like traffic.`},{step:`3`,env:`PROD`,color:`red`,title:`Use PROD with confidence`,desc:`Only after DEV and UAT validation. Production namespaces enforce read-only mode by default — Quick Actions are disabled to prevent accidental modifications.`}].map(({step:e,env:t,color:n,title:r,desc:i})=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border p-3.5 bg-white ${n===`green`?`border-green-200`:n===`amber`?`border-amber-200`:`border-red-200`}`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-[10px] font-bold px-1.5 py-0.5 rounded uppercase tracking-wider ${n===`green`?`bg-green-100 text-green-700`:n===`amber`?`bg-amber-100 text-amber-700`:`bg-red-100 text-red-700`}`,children:t}),(0,Z.jsxs)(`span`,{className:`text-xs font-semibold text-gray-600`,children:[`Step `,e]})]}),(0,Z.jsx)(`p`,{className:`text-xs font-bold text-gray-900`,children:r}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600 leading-relaxed`,children:i})]},t))}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg bg-red-50 border border-red-200 px-3 py-2.5`,children:[(0,Z.jsx)(`span`,{className:`text-red-500 text-sm mt-0.5 flex-shrink-0`,children:`⚠️`}),(0,Z.jsxs)(`p`,{className:`text-xs text-red-800 font-medium`,children:[(0,Z.jsx)(`strong`,{children:`Do not connect a production Service Bus namespace without prior validation in DEV and UAT.`}),` `,`While ServiceHub is read-only by default, replay and send operations are destructive. Validate rule logic and replay targets in lower environments first.`]})]})]})})}),(0,Z.jsx)(`section`,{className:`py-12 px-6 bg-gradient-to-r from-primary-600 to-blue-600`,children:(0,Z.jsx)(`div`,{className:`max-w-5xl mx-auto grid grid-cols-2 md:grid-cols-4 gap-6 text-center text-white`,children:[{value:`10+`,label:`Core Features`},{value:`30-day`,label:`DLQ History`},{value:`100%`,label:`Client-Side AI`},{value:`30s`,label:`Setup Time`}].map(({value:e,label:t})=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-3xl md:text-4xl font-extrabold mb-1`,children:e}),(0,Z.jsx)(`div`,{className:`text-sm text-white/80 font-medium`,children:t})]},t))})}),(0,Z.jsx)(`section`,{className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Up and Running in 30 Seconds`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-xl mx-auto`,children:`No Docker. No cloud provisioning. No credit card. Just clone and go.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[{step:`01`,title:`Connect Your Namespace`,desc:`Paste your Azure Service Bus connection string on the Connect page. Listen-only permission is all you need.`,icon:`🔌`},{step:`02`,title:`Browse & Analyse`,desc:`Instantly see all queues, message bodies, DLQ messages, AI pattern clusters, and 30-day trends.`,icon:`🔍`},{step:`03`,title:`Replay & Recover`,desc:`Fix the root cause, then replay failed messages manually or set rules to do it automatically.`,icon:`⚡`}].map(({step:e,title:t,desc:n,icon:r})=>(0,Z.jsxs)(`div`,{className:`relative p-6 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md hover:border-primary-200 transition-all group`,children:[(0,Z.jsx)(`div`,{className:`absolute -top-3 -left-3 w-8 h-8 bg-primary-600 text-white text-xs font-bold rounded-full flex items-center justify-center shadow`,children:e}),(0,Z.jsx)(`div`,{className:`text-4xl mb-4 group-hover:scale-110 transition-transform`,children:r}),(0,Z.jsx)(`h3`,{className:`text-lg font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm leading-relaxed`,children:n})]},e))}),(0,Z.jsx)(`div`,{className:`mt-10 p-4 bg-gray-900 rounded-xl text-center`,children:(0,Z.jsxs)(`code`,{className:`text-green-400 text-sm font-mono`,children:[`git clone `,zb,`.git && cd servicehub && ./run.sh`]})})]})}),(0,Z.jsx)(`section`,{id:`features`,className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Every Feature You Need to Master Azure Service Bus`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-2xl mx-auto`,children:`ServiceHub covers the full lifecycle — from real-time browsing to automated recovery and deep forensic analysis.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:e.map(({icon:e,title:t,description:n,badge:r})=>(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md hover:border-primary-300 transition-all`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-4`,children:[(0,Z.jsx)(`div`,{className:`w-11 h-11 bg-primary-50 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(e,{className:`w-6 h-6 text-primary-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-primary-600 bg-primary-50 border border-primary-100 px-2 py-0.5 rounded-full`,children:r})]}),(0,Z.jsx)(`h3`,{className:`text-base font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed`,children:n})]},t))}),(0,Z.jsxs)(`div`,{className:`mt-14 pt-10 border-t border-gray-200`,children:[(0,Z.jsx)(`p`,{className:`text-center text-sm font-semibold text-gray-500 mb-6 uppercase tracking-wider`,children:`All Included in v3.1.0`}),(0,Z.jsx)(`div`,{className:`flex flex-wrap justify-center gap-3`,children:[`🔍 DLQ Intelligence`,`⚡ Auto-Replay Rules`,`🤖 AI Pattern Analysis`,`🔗 Correlation Explorer`,`⏱️ Scheduled Messages`,`💚 Health Monitor`,`🌐 Multi-Namespace`,`📊 30-Day Trends`,`🔐 AES-GCM Security`,`📤 CSV/JSON Export`,`🔎 Full-Text Search`,`♻️ Auto-Refresh Live`].map(e=>(0,Z.jsx)(`span`,{className:`px-4 py-2 bg-white border border-gray-200 rounded-full text-sm text-gray-700 font-medium shadow-sm hover:border-primary-300 hover:text-primary-700 transition-colors`,children:e},e))})]})]})}),(0,Z.jsx)(`section`,{id:`compare`,className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`ServiceHub vs Azure Portal`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-12 max-w-xl mx-auto`,children:`The Azure Portal is great for provisioning — but terrible for debugging. Here's the difference.`}),(0,Z.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-gray-200 shadow-sm`,children:(0,Z.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{className:`bg-gray-50 border-b border-gray-200`,children:[(0,Z.jsx)(`th`,{className:`px-6 py-4 text-left font-bold text-gray-800 w-1/2`,children:`Capability`}),(0,Z.jsx)(`th`,{className:`px-6 py-4 text-center font-bold text-gray-500 w-1/4`,children:`Azure Portal`}),(0,Z.jsx)(`th`,{className:`px-6 py-4 text-center font-bold text-primary-600 w-1/4`,children:`ServiceHub`})]})}),(0,Z.jsx)(`tbody`,{children:t.map(({feature:e,portal:t,hub:n},r)=>(0,Z.jsxs)(`tr`,{className:`${r%2==0?`bg-white`:`bg-gray-50/40`} border-b border-gray-100 hover:bg-primary-50/30 transition-colors`,children:[(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-gray-800 font-medium`,children:e}),(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-center`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-red-500 font-medium`,children:[(0,Z.jsx)(`span`,{className:`text-red-400`,children:`✗`}),` `,t]})}),(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-center`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-green-600 font-semibold`,children:[(0,Z.jsx)(`span`,{className:`text-green-500`,children:`✓`}),` `,n]})})]},e))})]})}),(0,Z.jsxs)(`div`,{className:`mt-8 p-5 bg-gradient-to-r from-primary-50 to-blue-50 border border-primary-200 rounded-xl text-center`,children:[(0,Z.jsx)(`p`,{className:`text-gray-800 font-semibold text-base`,children:`🎯 ServiceHub turns a 6-hour incident into a 45-minute fix.`}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm mt-1`,children:`Stop guessing from counts. Start reading messages.`})]})]})}),(0,Z.jsx)(`section`,{id:`usecases`,className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Real-World Scenarios Where ServiceHub Shines`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-12 max-w-xl mx-auto`,children:`From 2 AM production fires to weekly post-mortems — ServiceHub is built for every phase.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:n.map(({emoji:e,title:t,story:n,saving:a,color:o})=>(0,Z.jsxs)(`div`,{className:`p-6 bg-gradient-to-br ${r[o]} rounded-xl border shadow-sm hover:shadow-md transition-all`,children:[(0,Z.jsx)(`div`,{className:`text-4xl mb-3`,children:e}),(0,Z.jsx)(`h3`,{className:`text-lg font-bold text-gray-900 mb-3`,children:t}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm leading-relaxed mb-4`,children:n}),(0,Z.jsxs)(`span`,{className:`text-xs font-bold ${i[o]} bg-white/70 px-3 py-1 rounded-full border`,children:[`⚡ `,a]})]},t))})]})}),(0,Z.jsx)(`section`,{className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Enterprise-Grade Security. Developer-Friendly.`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-2xl mx-auto`,children:`ServiceHub was built from day one with the principle that a debugging tool should never become a security liability.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6 mb-10`,children:[{icon:`🔐`,title:`AES-GCM Encryption`,body:`Your connection strings are encrypted at rest using AES-256-GCM. The encryption key lives only in your server config — never in the database.`},{icon:`👁️`,title:`Read-Only by Default`,body:`All message reading uses PeekMessagesAsync. ServiceHub never consumes, removes, or alters any messages on your bus. Your consumers are unaffected.`},{icon:`🧠`,title:`Zero-Data-Exfiltration AI`,body:`AI pattern analysis is pure TypeScript running in your browser tab. Message content never leaves your environment — no API calls, no cloud processing.`},{icon:`🛡️`,title:`OWASP Compliant`,body:`Built against OWASP Top 10 guidelines. Input validation, secure headers, no SQL injection surface (SQLite queries via EF Core parameterised).`},{icon:`🔑`,title:`Minimum-Privilege Design`,body:`Full functionality with Listen-only permission. Send permission required only for replay. Manage permission only for message generation.`},{icon:`🏠`,title:`Self-Host for Sovereignty`,body:`Deploy on your own Azure subscription, on-premises VM, Docker container, or Kubernetes cluster. You own the infrastructure and the data.`}].map(({icon:e,title:t,body:n})=>(0,Z.jsxs)(`div`,{className:`p-5 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all`,children:[(0,Z.jsx)(`div`,{className:`text-2xl mb-3`,children:e}),(0,Z.jsx)(`h4`,{className:`font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed`,children:n})]},t))}),(0,Z.jsx)(`div`,{className:`p-6 bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,Z.jsx)(Ve,{className:`w-6 h-6 text-blue-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`font-bold text-blue-900 mb-2`,children:`About the Hosted Application Authentication`}),(0,Z.jsxs)(`p`,{className:`text-sm text-blue-800 leading-relaxed`,children:[`The hosted ServiceHub at`,` `,(0,Z.jsx)(`a`,{href:Rb,className:`underline hover:text-blue-600`,target:`_blank`,rel:`noopener noreferrer`,children:`app-servicehub-prod.azurewebsites.net`}),` `,`uses `,(0,Z.jsx)(`strong`,{children:`Microsoft Entra ID (Azure Active Directory)`}),` as the identity provider. When you sign in, you are authenticating directly with `,(0,Z.jsx)(`strong`,{children:`Microsoft's infrastructure`}),` — not with ServiceHub servers. We receive only your Microsoft identity claim to verify you have access.`,(0,Z.jsx)(`strong`,{children:` We store no passwords, no personal data, and no user records.`}),` `,`This is purely a security gate to prevent unauthorised access to the shared hosting environment. For `,(0,Z.jsx)(`strong`,{children:`full data sovereignty`}),`, self-host ServiceHub on your own infrastructure.`]})]})]})})]})}),(0,Z.jsx)(`section`,{className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-12`,children:`Why Teams Choose ServiceHub`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-12`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h3`,{className:`text-xl font-bold text-gray-900 mb-6 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:`🏆`}),` Beats the Azure Portal`]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:[`See full message body — not just counts`,`Search 10,000 messages in under a second`,`Auto-replay failed DLQ messages with rules`,`30-day failure history with trend charts`,`AI clusters messages by error type automatically`,`Trace any Correlation ID across all queues`].map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(Se,{className:`w-5 h-5 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e})]},e))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h3`,{className:`text-xl font-bold text-gray-900 mb-6 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:`🧑‍💻`}),` Built for DevOps & SREs`]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:[`Works on any OS — macOS, Linux, Windows`,`One-command setup: clone → run → connect`,`Multi-namespace: DEV, UAT, PROD simultaneously`,`Enterprise AES-GCM encryption out of the box`,`Deploy anywhere: Azure, Docker, Kubernetes, VMs`,`Open source, MIT licensed — no vendor lock-in`].map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(Se,{className:`w-5 h-5 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e})]},e))})]})]})]})}),(0,Z.jsx)(`section`,{className:`py-24 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-3xl mx-auto bg-gradient-to-br from-primary-600 via-primary-700 to-blue-700 rounded-2xl p-12 text-white text-center shadow-2xl relative overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`absolute top-0 right-0 w-48 h-48 bg-white/5 rounded-full -translate-y-1/2 translate-x-1/2`}),(0,Z.jsx)(`div`,{className:`absolute bottom-0 left-0 w-32 h-32 bg-white/5 rounded-full translate-y-1/2 -translate-x-1/2`}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl md:text-4xl font-extrabold mb-4`,children:`Stop Guessing. Start Debugging.`}),(0,Z.jsx)(`p`,{className:`text-lg mb-2 text-white/90 leading-relaxed`,children:`Your DLQ messages are telling a story. ServiceHub helps you read it.`}),(0,Z.jsx)(`p`,{className:`text-sm text-white/70 mb-10`,children:`No credit card. No install required. Connect your Azure Service Bus in 30 seconds.`}),(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4`,children:[(0,Z.jsxs)(ue,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-primary-700 font-bold text-base rounded-xl hover:bg-gray-100 transition-all shadow-lg hover:-translate-y-0.5`,"aria-label":`Open the ServiceHub application`,children:[`🚀 Open ServiceHub`,(0,Z.jsx)(Ne,{className:`w-5 h-5`})]}),(0,Z.jsx)(ue,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white/15 text-white font-bold text-base rounded-xl border-2 border-white/40 hover:bg-white/25 transition-all`,children:`💻 Self-Host on localhost`})]})]})]})}),(0,Z.jsx)(`footer`,{className:`border-t border-gray-200 py-12 px-6 bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`max-w-7xl mx-auto`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-4 gap-8 mb-10`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(k,{className:`w-4 h-4 text-white`})}),(0,Z.jsx)(`span`,{className:`font-bold text-gray-900`,children:`ServiceHub`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 leading-relaxed`,children:`The forensic debugger for Azure Service Bus. Built for engineers who need real answers fast.`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Product`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${zb}/blob/main/README.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Documentation `,(0,Z.jsx)(Lg,{className:`w-3 h-3`})]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${zb}/tree/main/self-hosting`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Self-Hosting Guide `,(0,Z.jsx)(Lg,{className:`w-3 h-3`})]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ue,{to:`/security`,className:`hover:text-primary-600`,children:`Security & Privacy`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${zb}/blob/main/CHANGELOG.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Changelog `,(0,Z.jsx)(Lg,{className:`w-3 h-3`})]})})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Community`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:zb,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[(0,Z.jsx)(Hg,{className:`w-4 h-4`}),` GitHub Repository`]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${zb}/issues`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Report an Issue`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${zb}/discussions`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Discussions`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${zb}/releases`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Releases`})})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Legal`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${zb}/blob/main/SECURITY.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Security Policy`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${zb}/blob/main/LICENSE`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`MIT License`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(ue,{to:`/security`,className:`hover:text-primary-600`,children:`Privacy Notice`})})]})]})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 pt-8 flex flex-col md:flex-row items-center justify-between gap-4 text-sm text-gray-500`,children:[(0,Z.jsxs)(`p`,{children:[`ServiceHub is open source, free to use, and MIT licensed. Made with ❤️ by`,` `,(0,Z.jsx)(`a`,{href:`https://github.com/debdevops`,className:`text-primary-600 hover:underline font-medium`,children:`Debasis`})]}),(0,Z.jsx)(`p`,{children:`© 2026 ServiceHub · All rights reserved`})]})]})})]})}var Vb=(0,I.lazy)(()=>M(()=>import(`./page-dashboard-D0tsEnG-.js`).then(e=>e.t),__vite__mapDeps([0,1,2]))),Hb=(0,I.lazy)(()=>M(()=>import(`./page-dlq-history-CPp6jKYl.js`).then(e=>e.t),__vite__mapDeps([3,1,2,0]))),Ub=(0,I.lazy)(()=>M(()=>import(`./page-correlation-o8uE5lXV.js`).then(e=>e.t),__vite__mapDeps([2,1]))),Wb=(0,I.lazy)(()=>M(()=>import(`./InsightsPage-CBZxGweF.js`).then(e=>({default:e.InsightsPage})),__vite__mapDeps([4,1,2,0,3])));function Gb(){return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-full bg-gray-50`,children:(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600`})})}var Kb=te([{path:`/`,element:(0,Z.jsx)(Bb,{})},{path:`/welcome`,element:(0,Z.jsx)(Bb,{})},{path:`/`,element:(0,Z.jsx)(Tv,{}),errorElement:(0,Z.jsx)(ee,{to:`/welcome`,replace:!0}),children:[{path:`dashboard`,element:(0,Z.jsx)(I.Suspense,{fallback:(0,Z.jsx)(Gb,{}),children:(0,Z.jsx)(Vb,{})})},{path:`messages`,element:(0,Z.jsx)(Iy,{})},{path:`connect`,element:(0,Z.jsx)(Ly,{})},{path:`dlq-history`,element:(0,Z.jsx)(I.Suspense,{fallback:(0,Z.jsx)(Gb,{}),children:(0,Z.jsx)(Hb,{})})},{path:`rules`,element:(0,Z.jsx)(cb,{})},{path:`health`,element:(0,Z.jsx)(Sb,{})},{path:`help`,element:(0,Z.jsx)(Cb,{})},{path:`scheduled`,element:(0,Z.jsx)(Nb,{})},{path:`correlation`,element:(0,Z.jsx)(I.Suspense,{fallback:(0,Z.jsx)(Gb,{}),children:(0,Z.jsx)(Ub,{})})},{path:`security`,element:(0,Z.jsx)(Lb,{})},{path:`insights`,element:(0,Z.jsx)(I.Suspense,{fallback:(0,Z.jsx)(Gb,{}),children:(0,Z.jsx)(Wb,{})})}]},{path:`*`,element:(0,Z.jsx)(ee,{to:`/welcome`,replace:!0})}]),qb=new ct({defaultOptions:{queries:{staleTime:1e3*60*5,gcTime:1e3*60*30,retry:1,refetchOnWindowFocus:!1,throwOnError:!1}}}),Jb=`toString`,Yb=`isStorageUseDisabled`,Xb=`_addHook`,Zb=`core`,Qb=`dataType`,$b=`envelopeType`,ex=`diagLog`,tx=`track`,nx=`trackPageView`,rx=`config`,ix=`trackPreviousPageVisit`,ax=`sendPageViewInternal`,ox=`refUri`,sx=`startTime`,cx=`properties`,lx=`duration`,ux=`sendPageViewPerformanceInternal`,dx=`populatePageViewPerformanceEvent`,fx=`href`,px=`sendExceptionInternal`,mx=`error`,hx=`CreateAutoException`,gx=`addTelemetryInitializer`,_x=`overridePageViewDuration`,vx=`autoTrackPageVisitTime`,yx=`isBrowserLinkTrackingEnabled`,bx=`length`,xx=`enableAutoRouteTracking`,Sx=`enableUnhandledPromiseRejectionTracking`,Cx=`autoUnhandledPromiseInstrumented`,wx=`getEntriesByType`,Tx=`isPerformanceTimingSupported`,Ex=`getPerformanceTiming`,Dx=`navigationStart`,Ox=`shouldCollectDuration`,kx=`isPerformanceTimingDataReady`,Ax=`responseStart`,jx=`loadEventEnd`,Mx=`responseEnd`,Nx=`connectEnd`,Px=function(){function e(t,n,r,i){za(e,this,function(e){var a=null,o=[],s=!1,c=!1,l;r&&(l=r.logger);function u(e){r&&r.flush(e,function(){})}function d(){a||=Yi((function(){a=null;var e=o.slice(0),t=!1;o=[],U(e,function(e){e()?t=!0:o.push(e)}),o.length>0&&d(),t&&u(!0)}),100)}function f(e){o.push(e),d()}e[nx]=function(e,a){var o=e.name;if(L(o)||typeof o!=`string`){var d=Dr();o=e.name=d&&d.title||``}var p=e.uri;if(L(p)||typeof p!=`string`){var m=Uc();p=e.uri=m&&m.href||``}if(r&&r.config&&(p=e.uri=sl(e.uri,r[rx])),!c){var h=Ni(),g=h&&h.getEntriesByType&&h.getEntriesByType(`navigation`);if(g&&g[0]&&!Kt(h.timeOrigin)){var _=g[0].loadEventStart;e[sx]=new Date(h.timeOrigin+_)}else{var v=(a||e.properties||{}).duration||0;e[sx]=new Date(new Date().getTime()-v)}c=!0}if(!i.isPerformanceTimingSupported()){t[ax](e,a),u(!0),Fr()||Y(l,2,25,`trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.`);return}var y=!1,b,x=i[Ex]()[Dx];x>0&&(b=km(x,+new Date),i.shouldCollectDuration(b)||(b=void 0));var S;!L(a)&&!L(a.duration)&&(S=a[lx]),(n||!isNaN(S))&&(isNaN(S)&&(a||={},a[lx]=b),t[ax](e,a),u(!0),y=!0);var C=6e4;a||={},f(function(){var n=!1;try{if(i.isPerformanceTimingDataReady()){n=!0;var r={name:o,uri:p};i[dx](r),!r.isValid&&!y?(a[lx]=b,t[ax](e,a)):(y||(a[lx]=r.durationMs,t[ax](e,a)),s||=(t[ux](r,a),!0))}else x>0&&km(x,+new Date)>C&&(n=!0,y||(a[lx]=C,t[ax](e,a)))}catch(e){Y(l,1,38,`trackPageView failed on page load calculation: `+nc(e),{exception:V(e)})}return n})},e.teardown=function(e,t){if(a){a.cancel(),a=null;var n=o.slice(0);o=[],U(n,function(e){e()})}}})}return e.__ieDyn=1,e}(),Fx=36e5,Ix=[`googlebot`,`adsbot-google`,`apis-google`,`mediapartners-google`];function Lx(){var e=Ni();return e&&!!e.timing}function Rx(){var e=Ni();return e&&e.getEntriesByType&&e.getEntriesByType(`navigation`).length>0}function zx(){var e=Ni(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0}function Bx(){return Lx()?Ni().timing:null}function Vx(){return Rx()?Ni()[wx](`navigation`)[0]:null}function Hx(){var e=[...arguments],t=(jr()||{}).userAgent,n=!1;if(t)for(var r=0;r=Fx)return!1;return!0}var Ux=function(){function e(t){var n=Eu(t);za(e,this,function(e){e[dx]=function(t){t.isValid=!1;var r=Vx(),i=Bx(),a=0,o=0,s=0,c=0,l=0;(r||i)&&(r?(a=r[lx],o=r.startTime===0?r[Nx]:km(r[sx],r[Nx]),s=km(r.requestStart,r[Ax]),c=km(r[Ax],r[Mx]),l=km(r.responseEnd,r[jx])):(a=km(i[Dx],i[jx]),o=km(i[Dx],i[Nx]),s=km(i.requestStart,i[Ax]),c=km(i[Ax],i[Mx]),l=km(i.responseEnd,i[jx])),a===0?Y(n,2,10,`error calculating page view performance.`,{total:a,network:o,request:s,response:c,dom:l}):e.shouldCollectDuration(a,o,s,c,l)?a0&&e<=100}function tS(e){Kt(e.isStorageUseDisabled)||(e.isStorageUseDisabled?Rm():Bm())}var nS=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.identifier=yg,n.priority=180,n.autoRoutePVDelay=500;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return za(t,n,function(e,t){var n=t[Xb];j(),e.getCookieMgr=function(){return $u(e[Zb])},e.processTelemetry=function(t,n){e.processNext(t,n)},e.trackEvent=function(t,n){try{var r=dg(t,th[Qb],th[$b],e[ex](),n);e[Zb][tx](r)}catch(e){re(2,39,`trackTrace failed, trace will not be collected: `+nc(e),{exception:V(e)})}},e.startTrackEvent=function(e){try{r.start(e)}catch(e){re(1,29,`startTrackEvent failed, event will not be collected: `+nc(e),{exception:V(e)})}},e.stopTrackEvent=function(e,t,n){try{r.stop(e,void 0,t,n)}catch(e){re(1,30,`stopTrackEvent failed, event will not be collected: `+nc(e),{exception:V(e)})}},e.trackTrace=function(t,n){try{var r=dg(t,Qh[Qb],Qh[$b],e[ex](),n);e[Zb][tx](r)}catch(e){re(2,39,`trackTrace failed, trace will not be collected: `+nc(e),{exception:V(e)})}},e.trackMetric=function(t,n){try{var r=dg(t,Kh[Qb],Kh[$b],e[ex](),n);e[Zb][tx](r)}catch(e){re(1,36,`trackMetric failed, metric will not be collected: `+nc(e),{exception:V(e)})}},e[nx]=function(t,n){try{var r=t||{};e.core&&e.core.config&&(r.uri=sl(r.uri,e[Zb][rx])),a[nx](r,Qi(Qi(Qi({},r.properties),r.measurements),n)),v&&s[ix](r.name,r.uri)}catch(e){re(1,37,`trackPageView failed, page view will not be collected: `+nc(e),{exception:V(e)})}},e[ax]=function(t,n,r){var i=Dr();if(i&&(t[ox]=t.refUri===void 0?i.referrer:t[ox]),e.core&&e.core.config&&(t.refUri=sl(t.refUri,e[Zb][rx])),L(t.startTime)){var a=(n||t.properties||{}).duration||0;t[sx]=new Date(new Date().getTime()-a)}var o=dg(t,Xh[Qb],Xh[$b],e[ex](),n,r);e[Zb][tx](o),w()},e[ux]=function(t,n,r){var i=dg(t,$h[Qb],$h[$b],e[ex](),n,r);e[Zb][tx](i)},e.trackPageViewPerformance=function(t,n){var r=t||{};try{o[dx](r),e[ux](r,n)}catch(e){re(1,37,`trackPageViewPerformance failed, page view will not be collected: `+nc(e),{exception:V(e)})}},e.startTrackPage=function(e){try{if(typeof e!=`string`){var t=Dr();e=t&&t.title||``}i.start(e)}catch(e){re(1,31,`startTrackPage failed, page view may not be collected: `+nc(e),{exception:V(e)})}},e.stopTrackPage=function(t,n,r,a){try{if(typeof t!=`string`){var o=Dr();t=o&&o.title||``}if(typeof n!=`string`){var c=Uc();n=c&&c.href||``}e.core&&e.core.config&&(n=sl(n,e[Zb][rx])),i.stop(t,n,r,a),v&&s[ix](t,n)}catch(e){re(1,32,`stopTrackPage failed, page view will not be collected: `+nc(e),{exception:V(e)})}},e[px]=function(t,n,r){var i=t&&(t.exception||t.error)||tn(t)&&t||{name:t&&typeof t,message:t||`not_specified`};t||={};var a=new Mh(e[ex](),i,t.properties||n,t.measurements,t.severityLevel,t.id).toInterface(),o=Dr();if(o&&y?.inclScripts){var s=Md(o);a[cx].exceptionScripts=JSON.stringify(s)}if(y?.expLog){var c=y.expLog();c&&c.logs&&B(c.logs)&&(a[cx].exceptionLog=c.logs.slice(0,y.maxLogs).join(` +`))}var l=dg(a,Mh[Qb],Mh[$b],e[ex](),n,r);e[Zb][tx](l)},e.trackException=function(t,n){t&&!t.exception&&t.error&&(t.exception=t[mx]);try{e[px](t,n)}catch(e){re(1,35,`trackException failed, exception will not be collected: `+nc(e),{exception:V(e)})}},e._onerror=function(t){var n=t&&t.error,r=t&&t.evt;try{if(!r){var i=kr();i&&(r=i[Jx])}var a=t&&t.url||(Dr()||{}).URL,o=t.errorSrc||`window.onerror@`+a+`:`+(t.lineNumber||0)+`:`+(t.columnNumber||0),s={errorSrc:o,url:a,lineNumber:t.lineNumber||0,columnNumber:t.columnNumber||0,message:t.message};Yh(t.message,t.url,t.lineNumber,t.columnNumber,t.error)?ee(Mh[hx](`Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.`,a,t.lineNumber||0,t.columnNumber||0,n,r,null,o),s):(t.errorSrc||=o,e.trackException({exception:t,severityLevel:3},s))}catch(e){var c=n?n.name+`, `+n.message:`null`;re(1,11,`_onError threw exception while logging error, error will not be collected: `+nc(e),{exception:V(e),errorString:c})}},e[gx]=function(t){if(e.core)return e[Zb][gx](t);c||=[],c.push(t)},e.initialize=function(n,l,u,d){if(!e.isInitialized()){L(l)&&ln(`Error initializing`),t.initialize(n,l,u,d);try{S=$f(El(e.identifier),l.evtNamespace&&l.evtNamespace()),c&&=(U(c,function(e){l[gx](e)}),null),T(n),o=new Ux(e[Zb]),a=new Px(e,_.overridePageViewDuration,e[Zb],o),s=new Wx(e[ex](),function(e,t,n){return E(e,t,n)}),r=new Kx(e[ex](),`trackEvent`),r.action=function(t,n,r,i,a){i||={},a||={},i.duration=r[Jb](),e.trackEvent({name:t,properties:i,measurements:a})},i=new Kx(e[ex](),`trackPageView`),i.action=function(t,n,r,i,a){L(i)&&(i={}),i.duration=r[Jb]();var o={name:t,uri:n,properties:i,measurements:a};e[ax](o,i)},Or()&&(O(),te())}catch(t){throw e.setInitialized(!1),t}}},e._doTeardown=function(e,t){a&&a.teardown(e,t),tp(window,null,null,S),j()},e._getDbgPlgTargets=function(){return[C,m]};function w(){if(e.core){var t=e[Zb].getPlugin(`AjaxDependencyPlugin`);t&&t.plugin&&t.plugin.resetAjaxAttempts&&t.plugin.resetAjaxAttempts()}}function T(t){var n=e.identifier,r=e[Zb];e[Xb]($l(t,function(){_=Wd(null,t,r).getExtCfg(n,Qx),m=m||t.autoExceptionInstrumented||_.autoExceptionInstrumented,y=_.expCfg,v=_[vx],t.storagePrefix&&zm(t.storagePrefix),tS(_),l=_[yx],D()}))}function E(t,n,r){var i={PageName:t,PageUrl:n};e.trackMetric({name:`PageVisitTime`,average:r,max:r,min:r,sampleCount:1},i)}function D(){if(!u&&l){var t=[`/browserLinkSignalR/`,`/__browserLink/`];e[Xb](e[gx](function(e){if(l&&e.baseType===Zh.dataType){var n=e.baseData;if(n){for(var r=0;r=0)return!1}}return!0})),u=!0}}function ee(t,n){var r=dg(t,Mh[Qb],Mh[$b],e[ex](),n);e[Zb][tx](r)}function O(){var t=kr(),r=Uc(!0);e[Xb]($l(_,function(){p=_.disableExceptionTracking,!p&&!m&&!_.autoExceptionInstrumented&&(n(bp(t,`onerror`,{ns:S,rsp:function(t,n,r,i,a,o){!p&&t.rslt!==!0&&e._onerror(Mh[hx](n,r,i,a,o,t.evt))}},!1)),C++,m=!0)})),A(t,r)}function te(){var t=kr(),n=Uc(!0);e[Xb]($l(_,function(){if(d=_[xx]===!0,t&&d&&!f&&Mr()){var e=Nr();z(e.pushState)&&z(e.replaceState)&&typeof Event<`u`&&ne(t,e,n)}}))}function k(){var t=null;if(e.core&&e.core.getTraceCtx&&(t=e[Zb].getTraceCtx(!1)),!t){var n=e[Zb].getPlugin(_g);if(n){var r=n.plugin.context;r&&(t=Am(r.telemetryTrace))}}return t}function ne(t,r,i){if(f)return;var a=_.namePrefix||``;function o(){d&&Yx(t,mg(a+`locationchange`))}function s(){if(x&&(b=x),x=i&&i.href||``,e.core&&e.core.config&&(x=sl(x,e[Zb][rx])),d){var t=k();if(t){t.setTraceId(xd());var n=`_unknown_`;i&&i.pathname&&(n=i.pathname+(i.hash||``)),t.setName(im(e[ex](),n))}Yi((function(t){e[nx]({refUri:t,properties:{duration:0}})}).bind(e,b),e.autoRoutePVDelay)}}n(bp(r,`pushState`,{ns:S,rsp:function(){d&&(Yx(t,mg(a+`pushState`)),Yx(t,mg(a+`locationchange`)))}},!0)),n(bp(r,`replaceState`,{ns:S,rsp:function(){d&&(Yx(t,mg(a+`replaceState`)),Yx(t,mg(a+`locationchange`)))}},!0)),ep(t,a+`popstate`,o,S),ep(t,a+`locationchange`,s,S),f=!0}function A(t,r){e[Xb]($l(_,function(){h=_[Sx]===!0,m||=_.autoUnhandledPromiseInstrumented,h&&!g&&(n(bp(t,`onunhandledrejection`,{ns:S,rsp:function(t,n){h&&t.rslt!==!0&&e._onerror(Mh[hx](Xx(n),r?r[fx]:``,0,0,n,t.evt))}},!1)),C++,_[Cx]=g=!0)}))}function re(t,n,r,i,a){e[ex]().throwInternal(t,n,r,i,a)}function j(){r=null,i=null,a=null,o=null,s=null,c=null,l=!1,u=!1,d=!1,f=!1,p=!1,m=!1,h=!1,g=!1,v=!1,w();var t=Uc(!0);b=t&&t.href||``,e.core&&e.core.config&&(b=sl(b,e[Zb][rx])),x=null,S=null,_=null,C=0,W(e,`config`,{g:function(){return _}})}W(e,`_pageViewManager`,{g:function(){return a}}),W(e,`_pageViewPerformanceManager`,{g:function(){return o}}),W(e,`_pageVisitTimeManager`,{g:function(){return s}}),W(e,`_evtNamespace`,{g:function(){return`.`+S}})}),n}return t.Version=`3.3.11`,t}(nf),rS=`featureOptIn`,iS=`scheduleFetchTimeout`;function aS(e,t,n,r){try{var i=n>r;i&&(e=null);var a=n==0?Oi({},e):e;return a&&t&&!i&&H(a,function(e){var i=t[e];i&&(Zt(a[e])&&Zt(i)?a[e]=aS(a[e],i,++n,r):delete a[e])}),a}catch{}return e}var oS=`featureOptIn.`,sS=`.mode`,cS=`.onCfg`,lS=`.offCfg`;function uS(e,t,n){var r;if(!t||!t.enabled)return null;var i=(t.featureOptIn||{})[e]||{mode:1},a=i.mode,o=i.onCfg,s=i.offCfg,c=(n||{})[e]||{mode:2},l=c.mode,u=c.onCfg,d=c.offCfg,f=!!c.blockCdnCfg,p=oS+e+sS,m=oS+e+cS,h=oS+e+lS,g=l,_=u,v=d;return f||(a===4||a===5?(g=a==4?3:2,_=o||u,v=s||d):a===2||l===2?(g=2,_=u||o,v=d||s):a===3?(g=3,_=u||o,v=d||s):a===1&&l===1&&(g=1)),r={},r[p]=g,r[m]=_,r[h]=v,r}function dS(e,t){try{if(!e||!e.enabled)return null;if(!e.featureOptIn)return e.config;var n=e[rS],r=e.config||{};return H(n,function(n){var i=uS(n,e,t.config[rS]);L(i)||(H(i,function(e,t){Ai(r,e,t)}),fS(n,i,r))}),r}catch{}return null}function fS(e,t,n){var r=t[oS+e+sS],i=t[oS+e+cS],a=t[oS+e+lS],o=null;r===3&&(o=i),r===2&&(o=a),o&&H(o,function(e,t){Ai(n,e,t)})}var pS,mS=`ai_cfgsync`,hS=`GET`,gS=18e5,_S=void 0,vS=Fn((pS={syncMode:1,blkCdnCfg:_S,customEvtName:_S,cfgUrl:_S,overrideSyncFn:_S,overrideFetchFn:_S,onCfgChangeReceive:_S},pS[iS]=gS,pS.nonOverrideConfigs={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},pS.enableAjax=!1,pS)),yS=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=198,n.identifier=`AppInsightsCfgSyncPlugin`;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y=!1,b;return za(t,n,function(e,t){n(),e.initialize=function(n,r,i,a){t.initialize(n,r,i,a),o=$f(El(e.identifier),r.evtNamespace&&r.evtNamespace()),x(n)},e.getCfg=function(){return i},e.pause=function(){y=!0,re()},e.resume=function(){y=!1,A()},e.setCfg=function(e){return S(e)},e.sync=function(e){return w(e)},e.updateEventListenerName=function(e){return T(e)},e._doTeardown=function(e,t){C(),re(),n()},e._getDbgPlgTargets=function(){return[u,l,a,d,h]};function n(){i=null,a=null,o=null,s=null,l=null,u=null,h=null,c=null,f=null,p=null,d=null,b=!1,_=null,v=null,m=null}function x(t){var n=e.identifier,o=e.core;e._addHook($l(t,function(){r=Wd(null,t,o).getExtCfg(n,vS);var e=d;d=!!r.blkCdnCfg,b=!!r.enableAjax,!L(e)&&e!==d&&(!d&&s?g&&g(s,O,u):re()),L(l)&&(l=r.syncMode===2),L(u)&&(u=r.syncMode===1);var c=r.customEvtName||mS;a!==c&&(l?T(c):(C(),a=c)),L(s)&&(s=r.cfgUrl),s||(i=t,u&&w())})),v=r.overrideSyncFn,_=r.overrideFetchFn,m=r.onCfgChangeReceive,h=r.nonOverrideConfigs,f=r[iS],g=E(),p=0,s&&!d&&g&&g(s,O,u)}function S(t,n){if(t){if(i=t,n&&!y)return w();if(l&&!y)return e.core.updateCfg(t),!0}return!1}function C(){try{var e=wr();e&&tp(e,null,null,o)}catch{}}function w(e){try{return v&&z(v)?v(i,e):il(a,i,e)}catch{}return!1}function T(e){try{return C(),e&&(a=e,k()),!0}catch{}return!1}function E(){var e=_;return L(e)&&($c()?e=D:tl()&&(e=ee)),e}function D(e,t,n){var r=wr(),i=r&&r.fetch||null;if(e&&i&&z(i))try{var a={method:hS};b||(a[xp]=!0);var o=new Request(e,a);if(!b)try{o[xp]=!0}catch{}Ko(fetch(o),function(e){var r=e.value;e.rejected?te(t,400):r.ok?Ko(r.text(),function(e){te(t,r.status,e.value,n)}):te(t,r.status,null,n)})}catch{}}function ee(e,t,n){try{var r=new XMLHttpRequest;b||(r[xp]=!0),r.open(hS,e),r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&te(t,r.status,r.responseText,n)},r.onerror=function(){te(t,400)},r.ontimeout=function(){te(t,400)},r.send()}catch{}}function O(t,n,r){try{if(t>=200&&t<400&&n){p=0;var i=Kc();if(i){var a=dS(i.parse(n),e.core),o=a&&mi(a)&&ne(a);o&&S(o,r)}}else p++;p<3&&A()}catch{}}function te(e,t,n,r){try{e(t,n,r)}catch{}}function k(){if(l){var e=wr();if(e)try{ep(e,a,function(e){var t=e&&e.detail;if(m&&t)m(t);else{var n=t&&t.cfg,r=n&&mi(n)&&ne(n);r&&S(r)}},o,!0)}catch{}}}function ne(e,t){var n=null;try{e&&(n=aS(e,h,0,5))}catch{}return n}function A(){!c&&f&&(c=Yi(function(){c=null,g(s,O,u)},f),c.unref())}function re(){c&&c.cancel(),c=null,p=0}e.processTelemetry=function(t,n){e.processNext(t,n)}}),n}return t.__ieDyn=1,t}(nf),bS=`duration`,xS=`tags`,SS=`deviceType`,CS=`data`,wS=`name`,TS=`traceID`,ES=`length`,DS=`stringify`,OS=`dataType`,kS=`envelopeType`,AS=`toString`,jS=`enqueue`,MS=`count`,NS=`push`,PS=`emitLineDelimitedJson`,FS=`clear`,IS=`markAsSent`,LS=`clearSent`,RS=`bufferOverride`,zS=`BUFFER_KEY`,BS=`SENT_BUFFER_KEY`,VS=`concat`,HS=`MAX_BUFFER_SIZE`,US=`triggerSend`,WS=`diagLog`,GS=`initialize`,KS=`_sender`,qS=`endpointUrl`,JS=`instrumentationKey`,YS=`customHeaders`,XS=`maxBatchSizeInBytes`,ZS=`onunloadDisableBeacon`,QS=`isBeaconApiDisabled`,$S=`alwaysUseXhrOverride`,eC=`enableSessionStorageBuffer`,tC=`_buffer`,nC=`onunloadDisableFetch`,rC=`disableSendBeaconSplit`,iC=`_onError`,aC=`_onPartialSuccess`,oC=`_onSuccess`,sC=`itemsReceived`,cC=`itemsAccepted`,lC=`baseType`,uC=`sampleRate`,dC=`getHashCodeScore`,fC=`baseType`,pC=`baseData`,mC=`properties`,hC=`true`;function gC(e,t,n){return rc(e,t,n,rn)}function _C(e,t,n){var r=n[xS]=n.tags||{},i=t.ext=t.ext||{},a=t[xS]=t.tags||[],o=i.user;o&&(gC(r,pg.userAuthUserId,o.authId),gC(r,pg.userId,o.id||o.localId));var s=i.app;s&&gC(r,pg.sessionId,s.sesId);var c=i.device;c&&(gC(r,pg.deviceId,c.id||c.localId),gC(r,pg[SS],c.deviceClass),gC(r,pg.deviceIp,c.ip),gC(r,pg.deviceModel,c.model),gC(r,pg[SS],c[SS]));var l=t.ext.web;if(l){gC(r,pg.deviceLanguage,l.browserLang),gC(r,pg.deviceBrowserVersion,l.browserVer),gC(r,pg.deviceBrowser,l.browser);var u=n[CS]=n.data||{},d=u[pC]=u[pC]||{},f=d[mC]=d[mC]||{};gC(f,`domain`,l.domain),gC(f,`isManual`,l.isManual?hC:null),gC(f,`screenRes`,l.screenRes),gC(f,`userConsent`,l.userConsent?hC:null)}var p=i.os;p&&(gC(r,pg.deviceOS,p[wS]),gC(r,pg.deviceOSVersion,p.osVer));var m=i.trace;m&&(gC(r,pg.operationParentId,m.parentID),gC(r,pg.operationName,im(e,m[wS])),gC(r,pg.operationId,m[TS]));for(var h={},g=a[ES]-1;g>=0;g--){var _=a[g];H(_,function(e,t){h[e]=t}),a.splice(g,1)}H(a,function(e,t){h[e]=t});var v=Qi(Qi({},r),h);v[pg.internalSdkVersion]||(v[pg.internalSdkVersion]=im(e,`javascript:${SC.Version}`,64)),n[xS]=uc(v)}function vC(e,t,n){L(e)||H(e,function(e,r){$t(r)?n[e]=r:R(r)?t[e]=r:Gc()&&(t[e]=Kc()[DS](r))})}function yC(e,t){L(e)||H(e,function(n,r){e[n]=r||t})}function bC(e,t,n,r){var i=new eh(e,r,t);gC(i,`sampleRate`,n[Sp]),(n[pC]||{}).startTime&&(i.time=tc(n[pC].startTime)),i.iKey=n.iKey;var a=n.iKey.replace(/-/g,``);return i[wS]=i[wS].replace(`{0}`,a),_C(e,n,i),n[xS]=n.tags||[],uc(i)}function xC(e,t){L(t[pC])&&Y(e,1,46,`telemetryItem.baseData cannot be null.`)}var SC={Version:`3.3.11`};function CC(e,t,n){xC(e,t);var r=t[pC].measurements||{},i=t[pC][mC]||{};vC(t[CS],i,r),L(n)||yC(i,n);var a=t[pC];if(L(a))return ku(e,`Invalid input for dependency data`),null;var o=a[mC]&&a[mC][`http.method`]?a[mC][wp]:`GET`,s=new Zh(e,a.id,a.target,a[wS],a[bS],a.success,a.responseCode,o,a.type,a.correlationContext,i,r),c=new eg(Zh[OS],s);return bC(e,Zh[kS],t,c)}function wC(e,t,n){xC(e,t);var r={},i={};t[fC]!==th.dataType&&(r.baseTypeSource=t[fC]),t[fC]===th.dataType?(r=t[pC][mC]||{},i=t[pC].measurements||{}):t[pC]&&vC(t[pC],r,i),vC(t[CS],r,i),L(n)||yC(r,n);var a=t[pC][wS],o=new th(e,a,r,i),s=new eg(th[OS],o);return bC(e,th[kS],t,s)}function TC(e,t,n){xC(e,t);var r=t[pC].measurements||{},i=t[pC][mC]||{};vC(t[CS],i,r),L(n)||yC(i,n);var a=t[pC],o=Mh.CreateFromInterface(e,a,i,r),s=new eg(Mh[OS],o);return bC(e,Mh[kS],t,s)}function EC(e,t,n){xC(e,t);var r=t[pC],i=r[mC]||{},a=r.measurements||{};vC(t[CS],i,a),L(n)||yC(i,n);var o=new Kh(e,r[wS],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,a),s=new eg(Kh[OS],o);return bC(e,Kh[kS],t,s)}function DC(e,t,n){xC(e,t);var r,i=t[pC];!L(i)&&!L(i[mC])&&!L(i[mC].duration)?(r=i[mC][bS],delete i[mC][bS]):!L(t.data)&&!L(t.data.duration)&&(r=t[CS][bS],delete t[CS][bS]);var a=t[pC],o;((t.ext||{}).trace||{}).traceID&&(o=t.ext.trace[TS]);var s=a.id||o,c=a[wS],l=a.uri,u=a[mC]||{},d=a.measurements||{};if(L(a.refUri)||(u.refUri=a.refUri),L(a.pageType)||(u.pageType=a.pageType),L(a.isLoggedIn)||(u.isLoggedIn=a.isLoggedIn[AS]()),!L(a[mC])){var f=a[mC];H(f,function(e,t){u[e]=t})}vC(t[CS],u,d),L(n)||yC(u,n);var p=new Xh(e,c,l,r,u,d,s),m=new eg(Xh[OS],p);return bC(e,Xh[kS],t,m)}function OC(e,t,n){xC(e,t);var r=t[pC],i=r[wS],a=r.uri||r.url,o=r[mC]||{},s=r.measurements||{};vC(t[CS],o,s),L(n)||yC(o,n);var c=new $h(e,i,a,void 0,o,s,r),l=new eg($h[OS],c);return bC(e,$h[kS],t,l)}function kC(e,t,n){xC(e,t);var r=t[pC].message,i=t[pC].severityLevel,a=t[pC][mC]||{},o=t[pC].measurements||{};vC(t[CS],a,o),L(n)||yC(a,n);var s=new Qh(e,r,i,a,o),c=new eg(Qh[OS],s);return bC(e,Qh[kS],t,c)}var AC=function(){function e(t,n){var r=[],i=!1,a=n.maxRetryCnt;this._get=function(){return r},this._set=function(e){return r=e,r},za(e,this,function(e){e[jS]=function(o){if(e.count()>=n.eventsLimitInMem){i||=(Y(t,2,105,`Maximum in-memory buffer size reached: `+e[MS](),!0),!0);return}o.cnt=o.cnt||0,!(!L(a)&&o.cnt>a)&&r[NS](o)},e[MS]=function(){return r[ES]},e.size=function(){for(var e=r[ES],t=0;t0){var t=[];return U(e,function(e){t[NS](e.item)}),n.emitLineDelimitedJson?t.join(` +`):`[`+t.join(`,`)+`]`}return null},e.createNew=function(e,n,i){var a=r.slice(0);e||=t,n||={};var o=i?new NC(e,n):new jC(e,n);return U(a,function(e){o[jS](e)}),o}})}return e.__ieDyn=1,e}(),jC=function(e){ea(t,e);function t(n,r){var i=e.call(this,n,r)||this;return za(t,i,function(e,t){e[IS]=function(e){t[FS]()},e[LS]=function(e){}}),i}return t.__ieDyn=1,t}(AC),MC=[`AI_buffer`,`AI_sentBuffer`],NC=function(e){ea(t,e);function t(n,r){var i=e.call(this,n,r)||this,a=!1,o=r?.namePrefix,s=r.bufferOverride||{getItem:Km,setItem:qm},c=s.getItem,l=s.setItem,u=r.maxRetryCnt;return za(t,i,function(e,r){var i=h(t[zS]),s=h(t[BS]),d=v(),f=s[VS](d),p=e._set(i[VS](f));p.length>t.MAX_BUFFER_SIZE&&(p[ES]=t[HS]),_(t[BS],[]),_(t[zS],p),e[jS]=function(i){if(e.count()>=t.MAX_BUFFER_SIZE){a||=(Y(n,2,67,`Maximum buffer size reached: `+e[MS](),!0),!0);return}i.cnt=i.cnt||0,!(!L(u)&&i.cnt>u)&&(r[jS](i),_(t[zS],e._get()))},e[FS]=function(){r[FS](),_(t[zS],e._get()),_(t[BS],[]),a=!1},e[IS]=function(r){_(t[zS],e._set(m(r,e._get())));var i=h(t[BS]);i instanceof Array&&r instanceof Array&&(i=i[VS](r),i.length>t.MAX_BUFFER_SIZE&&(Y(n,1,67,`Sent buffer reached its maximum size: `+i[ES],!0),i[ES]=t[HS]),_(t[BS],i))},e[LS]=function(e){var n=h(t[BS]);n=m(e,n),_(t[BS],n)},e.createNew=function(r,i,a){a=!!a;var o=e._get().slice(0),s=h(t[BS]).slice(0);r||=n,i||={},e[FS]();var c=a?new t(r,i):new jC(r,i);return U(o,function(e){c[jS](e)}),a&&c[IS](s),c};function m(e,t){var n=[],r=[];return U(e,function(e){r[NS](e.item)}),U(t,function(e){!z(e)&&Xr(r,e.item)===-1&&n[NS](e)}),n}function h(e){var t=e;return t=o?o+`_`+t:t,g(t)}function g(e){try{var t=c(n,e);if(t){var r=Kc().parse(t);if(R(r)&&(r=Kc().parse(r)),r&&B(r))return r}}catch(t){Y(n,1,42,` storage key: `+e+`, `+nc(t),{exception:V(t)})}return[]}function _(e,t){var r=e;try{r=o?o+`_`+r:r;var i=JSON[DS](t);l(n,r,i)}catch(e){l(n,r,JSON[DS]([])),Y(n,2,41,` storage key: `+r+`, `+nc(e)+`. Buffer cleared`,{exception:V(e)})}}function v(){var e=[];try{return U(MC,function(t){var n=y(t);if(e=e[VS](n),o){var r=y(o+`_`+t);e=e[VS](r)}}),e}catch(e){Y(n,2,41,`Transfer events from previous buffers: `+nc(e)+`. previous Buffer items can not be removed`,{exception:V(e)})}return[]}function y(e){try{var t=g(e),r=[];return U(t,function(e){var t={item:e,cnt:0};r[NS](t)}),Jm(n,e),r}catch{}return[]}}),i}var n=t;return t.VERSION=`_1`,t.BUFFER_KEY=`AI_buffer`+n.VERSION,t.SENT_BUFFER_KEY=`AI_sentBuffer`+n.VERSION,t.MAX_BUFFER_SIZE=2e3,t}(AC),PC=function(){function e(t){za(e,this,function(e){e.serialize=function(e){var r=n(e,`root`);try{return Kc()[DS](r)}catch(e){Y(t,1,48,e&&z(e.toString)?e[AS]():`Error serializing object`,null,!0)}};function n(e,a){var o=`__aiCircularRefCheck`,s={};if(!e)return Y(t,1,48,`cannot serialize object because it is null or undefined`,{name:a},!0),s;if(e[o])return Y(t,2,50,`Circular reference detected while serializing object`,{name:a},!0),s;if(!e.aiDataContract){if(a===`measurements`)s=i(e,`number`,a);else if(a===`properties`)s=i(e,`string`,a);else if(a===`tags`)s=i(e,`string`,a);else if(B(e))s=r(e,a);else{Y(t,2,49,`Attempting to serialize an object which does not implement ISerializable`,{name:a},!0);try{Kc()[DS](e),s=e}catch(e){Y(t,1,48,e&&z(e.toString)?e[AS]():`Error serializing object`,null,!0)}}return s}return e[o]=!0,H(e.aiDataContract,function(i,o){var c=z(o)?o()&1:o&1,l=z(o)?o()&4:o&4,u=o&2,d=e[i]!==void 0,f=Zt(e[i])&&e[i]!==null;if(c&&!d&&!u)Y(t,1,24,`Missing required field specification. The field is required but not present on source`,{field:i,name:a});else if(!l){var p=void 0;p=f?u?r(e[i],i):n(e[i],i):e[i],p!==void 0&&(s[i]=p)}}),delete e[o],s}function r(e,r){var i;if(e)if(!B(e))Y(t,1,54,`This field was specified as an array in the contract but the item is not an array.\r +`,{name:r},!0);else{i=[];for(var a=0;a100||e<0)&&(n.throwInternal(2,58,`Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.`,{samplingRate:e},!0),e=100),this[uC]=e,this.samplingScoreGenerator=new LC}return e.prototype.isSampledIn=function(e){var t=this[uC],n=!1;return t==null||t>=100||e.baseType===Kh.dataType?!0:(n=this.samplingScoreGenerator.getSamplingScore(e)0&&e<=100}var YC=(BC={},BC[th.dataType]=wC,BC[Qh.dataType]=kC,BC[Xh.dataType]=DC,BC[$h.dataType]=OC,BC[Mh.dataType]=TC,BC[Kh.dataType]=EC,BC[Zh.dataType]=CC,BC),XC=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=1001,n.identifier=vg;var r,i,a,o,s,c,l,u=0,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,O,te,k,ne,A,re,j,M,ie,ae;return za(t,n,function(e,N){Ie(),e.pause=function(){je(),a=!0},e.resume=function(){a&&(a=!1,i=null,F(),Ae())},e.flush=function(t,n,r){if(t===void 0&&(t=!0),!a){je();try{var i=e[US](t,null,r||1);return Ko(i,function(e){return n?(n(!e.rejected),!0):t?ws(function(t){t(!e.rejected)}):i})}catch(t){Y(e[WS](),1,22,`flush failed, telemetry will not be collected: `+nc(t),{exception:V(t)})}}},e.onunloadFlush=function(){if(!a)if(_||te)try{return e[US](!0,we,2)}catch(t){Y(e[WS](),1,20,`failed to flush with beacon sender on page unload, telemetry will not be collected: `+nc(t),{exception:V(t)})}else e.flush(!1)},e.addHeader=function(e,t){l[e]=t},e[GS]=function(t,a,o,u){e.isInitialized()&&Y(e[WS](),1,28,`Sender is already initialized`),N[GS](t,a,o,u);var oe=e.identifier;s=new PC(a.logger),r=0,i=null,e[KS]=null,c=0;var se=e[WS]();p=$f(El(`Sender`),a.evtNamespace&&a.evtNamespace()),f=gg(p),e._addHook($l(t,function(t){var r=t.cfg;r.storagePrefix&&zm(r.storagePrefix);var i=Wd(null,r,a).getExtCfg(oe,KC),o=i[qS];if(m&&o===m){var s=r[qS];s&&s!==o&&(i[qS]=s)}var c=Tr(`CompressionStream`);ae=fc(`zipPayload`,r,!1),z(c)||(ae=!1);var u=i.corsPolicy;u?(u===`same-origin`||u===`same-site`||u===`cross-origin`)&&n.addHeader(qC,u):delete l[qC],nn(i.instrumentationKey)&&(i[JS]=r[JS]),W(e,`_senderConfig`,{g:function(){return i}}),h!==i.endpointUrl&&(m=h=i[qS]),a.activeStatus()===Ha.PENDING?e.pause():a.activeStatus()===Ha.ACTIVE&&e.resume(),b&&b!==i.customHeaders&&U(b,function(e){delete l[e.header]}),g=i[XS],_=(i.onunloadDisableBeacon===!1||i.isBeaconApiDisabled===!1)&&Qc(),v=i.onunloadDisableBeacon===!1&&Qc(),y=i.isBeaconApiDisabled===!1&&Qc(),te=i[$S],k=!!i.disableXhr,ie=i.retryCodes;var f=i[RS],p=!!i.enableSessionStorageBuffer&&(!!f||Gm()),N=i.namePrefix,ce=p!==E||p&&ee!==N||p&&D!==f;if(e._buffer){if(ce)try{e[tC]=e[tC].createNew(se,i,p)}catch(t){Y(e[WS](),1,12,`failed to transfer telemetry to different buffer storage, telemetry will be lost: `+nc(t),{exception:V(t)})}F()}else e[tC]=p?new NC(se,i):new jC(se,i);ee=N,E=p,D=f,ne=!i.onunloadDisableFetch&&$c(!0),j=!!i[rC],e._sample=new RC(i.samplingPercentage,se),S=i[JS],!nn(S)&&!Fe(S,r)&&Y(se,1,100,`Invalid Instrumentation key `+S),b=i[YS],R(m)&&!Cm(m)&&b&&b.length>0?U(b,function(e){n.addHeader(e.header,e.value)}):b=null,O=i.enableSendPromise;var le=P();M?M.SetConfig(le):(M=new kf,M[GS](le,se));var ue=i.httpXHROverride,de=null,fe=null,pe=gc([3,1,2],i.transports);de=M&&M.getSenderInst(pe,!1);var me=M&&M.getFallbackInst();A=function(e,t){return ye(me,e,t)},re=function(e,t){return ye(me,e,t,!1)},de=te?ue:de||ue||me,e[KS]=function(e,t){return ye(de,e,t)},ne&&(d=De);var he=gc([3,1],i.unloadTransports);ne||(he=he.filter(function(e){return e!==2})),fe=M&&M.getSenderInst(he,!0),fe=te?ue:fe||ue,(te||i.unloadTransports||!d)&&fe&&(d=function(e,t){return ye(fe,e,t)}),d||=A,x=i.disableTelemetry,C=i.convertUndefined||VC,w=i.isRetryDisabled,T=i.maxBatchInterval}))},e.processTelemetry=function(t,n){n=e._getTelCtx(n);var r=n[WS]();try{if(!fe(t,r))return;var i=pe(t,r);if(!i)return;var a=s.serialize(i),o=e[tC];F(a);var c={item:a,cnt:0};o[jS](c),Ae()}catch(e){Y(r,2,12,`Failed adding telemetry to the sender's buffer, some telemetry will be lost: `+nc(e),{exception:V(e)})}e.processNext(t,n)},e.isCompletelyIdle=function(){return!a&&u===0&&e._buffer.count()===0},e.getOfflineListener=function(){return f},e._xhrReadyStateChange=function(e,t,n){if(!Ee(t))return se(e,t,n)},e[US]=function(t,n,r){t===void 0&&(t=!0);var i;if(!a)try{var o=e[tC];if(x)o[FS]();else{if(o.count()>0){var s=o.getItems();Pe(r||0,t),i=n?n.call(e,s,t):e[KS](s,t)}+new Date}je()}catch(t){var c=Zc();(!c||c>9)&&Y(e[WS](),1,40,`Telemetry transmission failed, some telemetry will be lost: `+nc(t),{exception:V(t)})}return i},e.getOfflineSupport=function(){return{getUrl:function(){return m},createPayload:ge,serialize:me,batch:he,shouldProcess:function(e){return!!fe(e)}}},e._doTeardown=function(t,n){e.onunloadFlush(),eu(f,!1),Ie()},e[iC]=function(e,t,n){if(!Ee(e))return ce(e,t,n)},e[aC]=function(e,t){if(!Ee(e))return le(e,t)},e[oC]=function(e,t){if(!Ee(e))return ue(e,t)},e._xdrOnLoad=function(e,t){if(!Ee(t))return oe(e,t)};function oe(t,n){var i=WC(t);if(t&&(i+``==`200`||i===``))r=0,e[oC](n,0);else{var a=Tf(i);a&&a.itemsReceived&&a.itemsReceived>a.itemsAccepted&&!w?e[aC](n,a):e[iC](n,mc(t))}}function P(){try{return{enableSendPromise:O,isOneDs:!1,disableCredentials:!1,disableXhr:k,disableBeacon:!y,disableBeaconSync:!v,senderOnCompleteCallBack:{xdrOnComplete:function(e,t,n){var r=de(n);if(r)return oe(e,r)},fetchOnComplete:function(e,t,n,r){var i=de(r);if(i)return Se(e.status,i,e.url,i[ES],e.statusText,n||``)},xhrOnComplete:function(e,t,n){var r=de(n);if(r)return se(e,r,r[ES])},beaconOnRetry:function(e,t,n){return Te(e,t,n)}}}}catch{}return null}function se(e,t,n){e.readyState===4&&Se(e.status,t,e.responseURL,n,hc(e),WC(e)||e.response)}function ce(t,n,r){Y(e[WS](),2,26,`Failed to send telemetry.`,{message:n}),e._buffer&&e._buffer.clearSent(t)}function le(t,n){for(var r=[],i=[],a=n.errors.reverse(),o=0,s=a;o0&&e[oC](t,n[cC]),r.length>0&&e[iC](r,hc(null,[`partial success`,n[cC],`of`,n.itemsReceived].join(` `))),i.length>0&&(Oe(i),Y(e[WS](),2,40,`Partial success. Delivered: `+t[ES]+`, Failed: `+r[ES]+`. Will retry to send `+i[ES]+` our of `+n[sC]+` items`))}function ue(t,n){e._buffer&&e._buffer.clearSent(t)}function de(e){try{if(e){var t=e.oriPayload;return t&&t.length?t:null}}catch{}return null}function fe(t,n){if(x)return!1;if(!t)return n&&Y(n,1,7,`Cannot send empty telemetry`),!1;if(t.baseData&&!t.baseType)return n&&Y(n,1,70,`Cannot send telemetry without baseData and baseType`),!1;if(t.baseType||(t[lC]=`EventData`),!e._sender)return n&&Y(n,1,28,`Sender was not initialized`),!1;if(_e(t))t[Sp]=e._sample[uC];else return n&&Y(n,2,33,`Telemetry item was sampled out and not sent`,{SampleRate:e._sample.sampleRate}),!1;return!0}function pe(e,n){var r=e.iKey||S,i=t.constructEnvelope(e,r,n,C);if(!i){Y(n,1,47,`Unable to create an AppInsights envelope`);return}var a=!1;if(e.tags&&e.tags.ProcessLegacy&&(U(e[xS][Cp],function(e){try{e&&e(i)===!1&&(a=!0,ku(n,`Telemetry processor check returns false`))}catch(e){Y(n,1,64,`One of telemetry initializers failed, telemetry item will not be sent: `+nc(e),{exception:V(e)},!0)}}),delete e[xS][Cp]),!a)return i}function me(t){var n=HC,r=e[WS]();try{var i=fe(t,r),a=null;i&&(a=pe(t,r)),a&&(n=s.serialize(a))}catch{}return n}function he(e){var t=HC;return e&&e.length&&(t=`[`+e.join(`,`)+`]`),t}function ge(e){var t=xe();return{urlString:m,data:e,headers:t}}function _e(t){return e._sample.isSampledIn(t)}function ve(t,n,r,i){n===200&&t?e._onSuccess(t,t[ES]):i&&e._onError(t,i)}function ye(t,n,r,i){i===void 0&&(i=!0);var a=function(e,t,r){return ve(n,e,t,r)},o=be(n),s=t&&t.sendPOST;if(s&&o){i&&e._buffer[IS](n);var c,l=!1,u,d;return M.preparePayload(function(e){c=s(e,a,!r),l=!0,u&&qo(c,u,d)},ae,o,!r),l?c:ws(function(e,t){u=e,d=t})}return null}function be(t){if(B(t)&&t.length>0){var n=e[tC].batchPayloads(t),r=xe();return{data:n,urlString:m,headers:r,disableXhrSync:k,disableFetchKeepAlive:!ne,oriPayload:t}}return null}function xe(){try{var e=l||{};return Cm(m)&&(e[Op[6]]=Op[7]),e}catch{}return null}function F(t){var n=t?t[ES]:0;return e._buffer.size()+n>g?((!f||f.isOnline())&&e[US](!0,null,10),!0):!1}function Se(t,n,i,a,o,s){var c=null;if(e._appId||(c=Tf(s),c&&c.appId&&(e._appId=c.appId)),(t<200||t>=300)&&t!==0){if((t===301||t===307||t===308)&&!Ce(i)){e[iC](n,o);return}if(f&&!f.isOnline()){w||(Oe(n,10),Y(e[WS](),2,40,`. Offline - Response Code: ${t}. Offline status: ${!f.isOnline()}. Will retry to send ${n.length} items.`));return}!w&&Me(t)?(Oe(n),Y(e[WS](),2,40,`. Response code `+t+`. Will retry to send `+n[ES]+` items.`)):e[iC](n,o)}else Ce(i),t===206?(c||=Tf(s),c&&!w?e[aC](n,c):e[iC](n,o)):(r=0,e[oC](n,a))}function Ce(e){return c>=10?!1:!L(e)&&e!==``&&e!==m?(m=e,++c,!0):!1}function we(e,t){if(d)d(e,!1);else return ye(M&&M.getSenderInst([3],!0),e,t)}function Te(t,n,r){var i=t,a=i&&i.oriPayload;if(j)re&&re(a,!0),Y(e[WS](),2,40,`. Failed to send telemetry with Beacon API, retried with normal sender.`);else{for(var o=[],s=0;s0&&(re&&re(o,!0),Y(e[WS](),2,40,`. Failed to send telemetry with Beacon API, retried with normal sender.`))}}function Ee(e){try{if(e&&e.length)return R(e[0])}catch{}return null}function De(t,n){var r=null;if(B(t)){for(var i=t[ES],a=0;a-1}function Ne(){var t=`getNotifyMgr`,n,r=e.core;return r&&(n=r[t]?r[t]():r._notificationManager),n}function Pe(t,n){var r=Ne();if(r&&r.eventsSendRequest)try{r.eventsSendRequest(t,n)}catch(t){Y(e[WS](),1,74,`send request notification failed: `+nc(t),{exception:V(t)})}}function Fe(e,t){var n=t.disableInstrumentationKeyValidation;return!L(n)&&n?!0:RegExp(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`).test(e)}function Ie(){e[KS]=null,e[tC]=null,e._appId=null,e._sample=null,l={},f=null,r=0,i=null,a=!1,o=null,s=null,c=0,u=0,d=null,p=null,m=null,h=null,g=0,_=!1,b=null,x=!1,S=null,C=VC,w=!1,E=null,ee=VC,k=!1,ne=!1,j=!1,A=null,re=null,M=null,W(e,`_senderConfig`,{g:function(){return dc({},KC)}})}}),n}return t.constructEnvelope=function(e,t,n,r){var i=t!==e.iKey&&!L(t)?Qi(Qi({},e),{iKey:t}):e;return(YC[i.baseType]||wC)(n,i,r)},t}(nf),ZC=`duration`,QC=`properties`,$C=`requestUrl`,ew=`length`,tw=`traceID`,nw=`spanID`,rw=`traceFlags`,iw=`context`,aw=`aborted`,ow=`_addHook`,sw=`core`,cw=`includeCorrelationHeaders`,lw=`getAbsoluteUrl`,uw=`headers`,dw=`requestHeaders`,fw=`setRequestHeader`,pw=`trackDependencyDataInternal`,mw=`startTime`,hw=`toLowerCase`,gw=`enableRequestHeaderTracking`,_w=`enableAjaxErrorStatusText`,vw=`enableAjaxPerfTracking`,yw=`maxAjaxCallsPerView`,bw=`excludeRequestFromAutoTrackingPatterns`,xw=`disableAjaxTracking`,Sw=`ajaxPerfLookupDelay`,Cw=`disableFetchTracking`,ww=`enableResponseHeaderTracking`,Tw=`status`,Ew=`statusText`,Dw=`headerMap`,Ow=`requestSentTime`,kw=`getTraceId`,Aw=`getTraceFlags`,jw=`method`,Mw=`errorStatusText`,Nw=`stateChangeAttached`,Pw=`responseText`,Fw=`responseFinishedTime`,Iw=`CreateTrackItem`,Lw=`getAllResponseHeaders`,Rw=`getPartAProps`,zw=`perfMark`,Bw=`perfTiming`,Vw=`ajaxDiagnosticsMessage`,Hw=`correlationContext`,Uw=`ajaxTotalDuration`,Ww=`eventTraceCtx`;function Gw(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=km(i,a)),r}function Kw(e,t,n,r,i){var a=0,o=Gw(n,r,i);return o&&(a=qw(e,t,Jh(o))),a}function qw(e,t,n){var r=`ajaxPerf`,i=0;if(e&&t&&n){var a=e[r]=e[r]||{};a[t]=n,i=1}return i}function Jw(e,t){var n=e[Bw],r=t.properties||{},i=0,a=`name`,o=`Start`,s=`End`,c=`domainLookup`,l=`connect`,u=`redirect`,d=`request`,f=`response`,p=`startTime`,m=c+o,h=c+s,g=l+o,_=l+s,v=d+o,y=d+s,b=f+o,x=f+s,S=u+o,C=u=s,w=`transferSize`,T=`encodedBodySize`,E=`decodedBodySize`,D=`serverTiming`;if(n){i|=Kw(r,u,n,S,C),i|=Kw(r,c,n,m,h),i|=Kw(r,l,n,g,_),i|=Kw(r,d,n,v,y),i|=Kw(r,f,n,b,x),i|=Kw(r,`networkConnect`,n,p,_),i|=Kw(r,`sentRequest`,n,v,x);var ee=n[ZC];ee||=Gw(n,p,x)||0,i|=qw(r,ZC,ee),i|=qw(r,`perfTotal`,ee);var O=n[D];if(O){var te={};U(O,function(e,t){var n=$s(e[a]||``+t),r=te[n]||{};H(e,function(e,t){(e!==a&&R(t)||$t(t))&&(r[e]&&(t=r[e]+`;`+t),(t||!R(t))&&(r[e]=t))}),te[n]=r}),i|=qw(r,D,te)}i|=qw(r,w,n[w]),i|=qw(r,T,n[T]),i|=qw(r,E,n[E])}else e.perfMark&&(i|=qw(r,`missing`,e.perfAttempts));i&&(t[QC]=r)}var Yw=function(){function e(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[Nw]=!1}return e}(),Xw=function(){function e(t,n,r,i){var a=this,o=r,s=`responseText`;a[zw]=null,a.completed=!1,a.requestHeadersSize=null,a[dw]=null,a.responseReceivingDuration=null,a.callbackDuration=null,a[Uw]=null,a[aw]=0,a.pageUrl=null,a[$C]=null,a.requestSize=0,a[jw]=null,a[Tw]=null,a[Ow]=null,a.responseStartedTime=null,a[Fw]=null,a.callbackFinishedTime=null,a.endTime=null,a.xhrMonitoringState=new Yw,a.clientFailure=0,a[tw]=t,a[nw]=n,a[rw]=i?.getTraceFlags(),i?a[Ww]={traceId:i[kw](),spanId:i.getSpanId(),traceFlags:i[Aw]()}:a[Ww]=null,za(e,a,function(e){e.getAbsoluteUrl=function(){return e.requestUrl?_m(e[$C]):null},e.getPathName=function(){return e.requestUrl?am(o,vm(e[jw],e[$C])):null},e[Iw]=function(t,n,r){var i;if(e.ajaxTotalDuration=Pi(km(e.requestSentTime,e.responseFinishedTime)*1e3)/1e3,e.ajaxTotalDuration<0)return null;var a=(i={id:`|`+e[tw]+`.`+e[nw],target:e[lw](),name:e.getPathName(),type:t,startTime:null,duration:e[Uw],success:+e.status>=200&&+e.status<400,responseCode:+e[Tw]},i[QC]={HttpMethod:e[jw]},i),o=a[QC];if(e.aborted&&(o[aw]=!0),e.requestSentTime&&(a[mw]=new Date,a[mw].setTime(e[Ow])),Jw(e,a),n&&Nn(e.requestHeaders).length>0&&(o[dw]=e[dw]),r){var c=r();if(c){var l=c[Hw];if(l&&(a.correlationContext=l),c.headerMap&&Nn(c.headerMap).length>0&&(o.responseHeaders=c[Dw]),e.errorStatusText)if(e.status>=400){var u=c.type;(u===``||u===`text`)&&(o.responseText=c.responseText?c[Ew]+` - `+c[s]:c[Ew]),u===`json`&&(o.responseText=c.response?c[Ew]+` - `+JSON.stringify(c.response):c[Ew])}else e.status===0&&(o.responseText=c.statusText||``)}}return a},e[Rw]=function(){var t=null,n=e[Ww];if(n&&(n.traceId||n.spanId)){t={};var r=t[fg.TraceExt]={traceID:n.traceId,parentID:n.spanId};L(n.traceFlags)||(r[rw]=n[rw])}return t}})}return e.__ieDyn=1,e}(),Zw,Qw=`diagLog`,$w=`_ajaxData`,eT=`fetch`,tT=`Failed to monitor XMLHttpRequest`,nT=`, monitoring data for this ajax call `,rT=nT+`may be incorrect.`,iT=nT+`won't be sent.`,aT=`Failed to get Request-Context correlation header as it may be not included in the response or not accessible.`,oT=`Failed to add custom defined request context as configured call back may missing a null check.`,sT=`Failed to calculate the duration of the `,cT=0;function lT(){var e=wr();return!e||L(e.Request)||L(e.Request.prototype)||L(e[eT])?null:e[eT]}function uT(e,t){var n,r=!1;if(tl()){var i=XMLHttpRequest[ut];r=!L(i)&&!L(i.open)&&!L(i.send)&&!L(i.abort)}var a=Zc();if(a&&a<9&&(r=!1),r)try{var o=new XMLHttpRequest;o[$w]={xh:[],i:(n={},n[t]={},n)};var s=XMLHttpRequest[ut].open;XMLHttpRequest[ut].open=s}catch(t){r=!1,hT(e,15,`Failed to enable XMLHttpRequest monitoring, extension is not supported`,{exception:V(t)})}return r}var dT=function(e,t){return e&&t&&e[$w]?(e[$w].i||{})[t]:null},fT=function(e,t,n){if(e){var r=(e[$w]||{}).xh;r&&r.push({n:t,v:n})}},pT=function(e,t){var n=!1;if(e){var r=(e[$w]||{}).xh;r&&U(r,function(e){if(e.n===t)return n=!0,-1})}return n};function mT(e,t){var n=``;try{var r=dT(e,t);r&&r.requestUrl&&(n+=`(url: '`+r[$C]+`')`)}catch{}return n}function hT(e,t,n,r,i){Y(e[Qw](),1,t,n,r,i)}function gT(e,t,n,r,i){Y(e[Qw](),2,t,n,r,i)}function _T(e,t,n){return function(r){var i;hT(e,t,n,(i={},i[Vw]=mT(r.inst,e._ajaxDataId),i.exception=V(r.err),i))}}function vT(e,t){return e&&t?Ri(e,t):-1}function yT(e,t,n){var r={id:t,fn:n};return e.push(r),{remove:function(){U(e,function(t,n){if(t.id===r.id)return e.splice(n,1),-1})}}}function bT(e,t,n,r){var i=!0;return U(t,function(t,a){try{t.fn.call(null,n)===!1&&(i=!1)}catch(t){Y(e&&e.logger,1,64,`Dependency `+r+` [#`+a+`] failed: `+nc(t),{exception:V(t)},!0)}}),i}function xT(e,t,n,r,i,a){var o=e[ew],s=!0;if(o>0){var c={core:t,xhr:r,input:i,init:a,traceId:n[tw],spanId:n[nw],traceFlags:n[rw],context:n.context||{},aborted:!!n[aw]};s=bT(t,e,c,`listener`),n[tw]=c.traceId,n[nw]=c.spanId,n[rw]=c[rw],n[iw]=c[iw]}return s}var ST=`*.blob.core.`,CT=In([ST+`windows.net`,ST+`chinacloudapi.cn`,ST+`cloudapi.de`,ST+`usgovcloudapi.net`]),wT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],TT=In((Zw={},Zw[yw]=500,Zw[xw]=!1,Zw[Cw]=!1,Zw[bw]=void 0,Zw.disableCorrelationHeaders=!1,Zw.distributedTracingMode=1,Zw.correlationHeaderExcludedDomains=CT,Zw.correlationHeaderDomains=void 0,Zw.correlationHeaderExcludePatterns=void 0,Zw.appId=void 0,Zw.enableCorsCorrelation=!1,Zw[gw]=!1,Zw[ww]=!1,Zw[_w]=!1,Zw[vw]=!1,Zw.maxAjaxPerfLookupAttempts=3,Zw[Sw]=25,Zw.ignoreHeaders=[`Authorization`,`X-API-Key`,`WWW-Authenticate`],Zw.addRequestContext=void 0,Zw.addIntEndpoints=!0,Zw)),ET=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.identifier=t.identifier,n.priority=120;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,O,te,k,ne;return za(t,n,function(e,n){var A=n[ow];re(),e.initialize=function(t,r,i,a){e.isInitialized()||(n.initialize(t,r,i,a),S=$f(El(`ajax`),r&&r.evtNamespace&&r.evtNamespace()),j(t),oe(),ae(),M())},e._doTeardown=function(){re()},e.trackDependencyData=function(t,n){be(E,e[sw],null,t,n)},e.resetAjaxAttempts=function(){l=0},e[cw]=function(t,n,r,i){var c=e._currentWindowHost||a;if(xT(T,e.core,t,i,n,r)){if(n||n===``){if(wm(o,t.getAbsoluteUrl(),c)){r||={};var l=new Headers(r.headers||n instanceof Request&&n.headers||{});if(f){var p=`|`+t[tw]+`.`+t[nw];l.set(Op[3],p),s&&(t[dw][Op[3]]=p)}var m=k||u&&u.appId();if(m&&(l.set(Op[0],Op[2]+m),s&&(t[dw][Op[0]]=Op[2]+m)),d){var h=t[rw];L(h)&&(h=1);var g=jd(Od(t[tw],t[nw],h));l.set(Op[4],g),s&&(t[dw][Op[4]]=g)}r[uw]=l}}else if(i&&wm(o,t.getAbsoluteUrl(),c)){if(f)if(pT(i,Op[3]))gT(e,71,`Unable to set [`+Op[3]+`] as it has already been set by another instance`);else{var p=`|`+t[tw]+`.`+t[nw];i[fw](Op[3],p),s&&(t[dw][Op[3]]=p)}var m=k||u&&u.appId();if(m&&(pT(i,Op[0])?gT(e,71,`Unable to set [`+Op[0]+`] as it has already been set by another instance`):(i[fw](Op[0],Op[2]+m),s&&(t[dw][Op[0]]=Op[2]+m))),d){var h=t[rw];if(L(h)&&(h=1),pT(i,Op[4]))gT(e,71,`Unable to set [`+Op[4]+`] as it has already been set by another instance`);else{var g=jd(Od(t[tw],t[nw],h));i[fw](Op[4],g),s&&(t[dw][Op[4]]=g)}}}}return i||r},e[pw]=function(t,n,r){if(h===-1||l=0;p--){var m=f[p];if(m){if(m.entryType===`resource`)m.initiatorType===e&&(vT(m.name,c)!==-1||vT(c,m.name)!==-1)&&(d=m);else if(m.entryType===`mark`&&m.name===i.name){t[Bw]=d;break}if(m.startTime=o||t.async===!1?(i&&z(a.clearMarks)&&a.clearMarks(i.name),t.perfAttempts=l,n()):Yi(u,s)}catch(e){r(e)}})()}function ge(t,n){var r=ce(),i=new Xw(r&&r.getTraceId()||xd(),Zn(xd(),0,16),e[Qw](),e.core?.getTraceCtx());i[rw]=r&&r.getTraceFlags(),i[Ow]=Om(),i[Mw]=c;var a=t instanceof Request?(t||{}).url||``:t;if(a===``){var o=Uc();o&&o.href&&(a=ki(o.href,`#`)[0])}e.core&&e.core.config&&(a=sl(a,e[sw].config)),i[$C]=a;var l=`GET`;n&&n.method?l=n[jw]:t&&t instanceof Request&&(l=t[jw]),i[jw]=l;var u={};return s&&new Headers((n?n.headers:0)||t instanceof Request&&t.headers||{}).forEach(function(e,t){ie(t)&&(u[t]=e)}),i[dw]=u,me(eT,i),i}function _e(t){var n=``;try{L(t)||(typeof t==`string`?n+=`(url: '${t}')`:n+=`(url: '${t.url}')`)}catch(t){hT(e,15,`Failed to grab failed fetch diagnostics message`,{exception:V(t)})}return n}function ve(t,n,r,i,a,o,c){if(!a)return;function l(t,n,i){var a=i||{};a.fetchDiagnosticsMessage=_e(r),n&&(a.exception=V(n)),gT(e,t,sT+`fetch call`+iT,a)}a[Fw]=Om(),a[Tw]=n,he(eT,a,function(){var t=a[Iw](`Fetch`,s,o),c;try{x&&(c=x({status:n,request:r,response:i}))}catch{gT(e,104,oT)}if(t){c!==void 0&&(t[QC]=Qi(Qi({},t.properties),c));var u=a[Rw]();be(E,e[sw],a,t,null,u)}else l(14,null,{requestSentTime:a[Ow],responseFinishedTime:a[Fw]})},function(e){l(18,e,null)})}function ye(t){if(t&&t.headers)try{return Tm(t[uw].get(Op[0]))}catch(n){gT(e,18,aT,{fetchDiagnosticsMessage:_e(t),exception:V(n)})}}function be(t,n,r,i,a,o){var s=!0;t.length>0&&(s=bT(n,t,{item:i,properties:a,sysProperties:o,context:r?r[iw]:null,aborted:r?!!r[aw]:!1},`initializer`)),s&&e[pw](i,a,o)}}),n}return t.prototype.processTelemetry=function(e,t){this.processNext(e,t)},t.prototype.addDependencyInitializer=function(e){return null},t.identifier=`AjaxDependencyPlugin`,t}(nf),DT=function(){function e(){}return e}(),OT=function(){function e(){this.id=`browser`,this.deviceClass=`Browser`}return e}(),kT=`3.3.11`,AT=function(){function e(e,t){var n=this,r=$l(e,function(){var t=e.sdkExtension;n.sdkVersion=(t?t+`_`:``)+`javascript:`+kT});t&&t.add(r)}return e}(),jT=function(){function e(){}return e}(),MT=`session`,NT=`sessionManager`,PT=`isUserCookieSet`,FT=`isNewUser`,IT=`getTraceCtx`,LT=`telemetryTrace`,RT=`applySessionContext`,zT=`applyApplicationContext`,BT=`applyOperationContext`,VT=`applyOperatingSystemContxt`,HT=`applyLocationContext`,UT=`applyInternalContext`,WT=`getSessionId`,GT=`sessionCookiePostfix`,KT=`automaticSession`,qT=`accountId`,JT=`authenticatedId`,YT=`acquisitionDate`,XT=`renewalDate`,ZT=`cookieSeparator`,QT=`authUserCookieName`,$T=`ai_session`,eE=864e5,tE=18e5,nE=6e4,rE=function(){function e(){}return e}(),iE=function(){function e(t,n,r){var i=this,a,o,s=Eu(n),c=$u(n),l,u;za(e,i,function(e){t||={};var n=$l(t,function(e){l=t.sessionExpirationMs||eE,u=t.sessionRenewalMs||tE,a=$T+(t.sessionCookiePostfix||t.namePrefix||``)});r&&r.add(n),e[KT]=new rE,e.update=function(){var t=rr(),n=!1,r=e[KT];if(r.id||(n=!i(r,t)),!n&&l>0){var a=t-r[YT],s=t-r[XT];n=a<0||s<0,n||=a>l,n||=s>u}n?f(t):(!o||t-o>nE)&&p(r,t)},e.backup=function(){var t=e[KT];m(t.id,t[YT],t[XT])};function i(e,t){var n=!1,r=c.get(a);if(r&&z(r.split))n=d(e,r);else{var i=Hm(s,a);i&&(n=d(e,i))}return n||!!e.id}function d(e,t){var n=!1,r=`, session will be reset`,i=t.split(`|`);if(i.length>=2)try{var a=+i[1]||0,o=+i[2]||0;isNaN(a)||a<=0?Y(s,2,27,`AI session acquisition date is 0`+r):isNaN(o)||o<=0?Y(s,2,27,`AI session renewal date is 0`+r):i[0]&&(e.id=i[0],e[YT]=a,e[XT]=o,n=!0)}catch(e){Y(s,1,9,`Error parsing ai_session value [`+(t||``)+`]`+r+` - `+nc(e),{exception:V(e)})}return n}function f(n){var r=t.getNewId||bl;e[KT].id=r(t.idLength||22),e[KT][YT]=n,p(e[KT],n),Vm()||Y(s,2,0,`Browser does not support local storage. Session durations will be inaccurate.`)}function p(e,n){var r=e[YT];e[XT]=n;var i=u,s=r+l-n,d=[e.id,r,n],f=0;f=s0?f:null,p),o=n}function m(e,t,n){Um(s,a,[e,t,n].join(`|`))}})}return e.__ieDyn=1,e}(),aE=function(){function e(e,t,n,r,i){var a=this;a.traceID=e||xd(),a.parentID=t;var o=Uc();!n&&o&&o.pathname&&(n=o.pathname,i&&(n=sl(n,i))),a.name=im(r,n)}return e}();function oE(e){return!(typeof e!=`string`||!e||e.match(/,|;|=| |\|/))}var sE=function(){function e(t,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=Eu(n),a=$u(n),o;za(e,this,function(n){W(n,`config`,{g:function(){return t}});var s=$l(t,function(){var r=t.userCookiePostfix||``;o=e.userCookieName+r;var s=a.get(o);if(s){n[FT]=!1;var d=s.split(e[ZT]);d.length>0&&(n.id=d[0],n[PT]=!!n.id)}n.id||(n.id=c(),u(l(n.id).join(e[ZT])),Wm(i,(t.namePrefix||``)+`ai_session`)),n[qT]=t.accountId||void 0;var f=a.get(e[QT]);if(f){f=decodeURI(f);var p=f.split(e[ZT]);p[0]&&(n[JT]=p[0]),p.length>1&&p[1]&&(n[qT]=p[1])}});r&&r.add(s);function c(){var e=t||{};return(e.getNewId||bl)(e.idLength?t.idLength:22)}function l(e){var t=tc(new Date);return n.accountAcquisitionDate=t,n[FT]=!0,[e,t]}function u(e){n[PT]=a.set(o,e,31536e3)}n.setAuthenticatedUserContext=function(t,r,o){if(o===void 0&&(o=!1),!oE(t)||r&&!oE(r)){Y(i,2,60,`Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.`,!0);return}n[JT]=t;var s=n[JT];r&&(n[qT]=r,s=[n[JT],n.accountId].join(e[ZT])),o&&a.set(e[QT],encodeURI(s))},n.clearAuthenticatedUserContext=function(){n[JT]=null,n[qT]=null,a.del(e[QT])},n.update=function(t){(n.id!==t||!n.isUserCookieSet)&&u(l(t||c()).join(e[ZT]))}})}return e.cookieSeparator=`|`,e.userCookieName=`ai_user`,e.authUserCookieName=`ai_authUser`,e}(),cE=`ext`,lE=`tags`;function uE(e,t){e&&e[t]&&Nn(e[t]).length===0&&delete e[t]}function dE(){return null}var fE=function(){function e(t,n,r,i){var a=this,o=t.logger;za(e,this,function(e){if(e.appId=dE,e[WT]=dE,e.application=new DT,e.internal=new AT(n,i),Or()){e[NT]=new iE(n,t,i),e.device=new OT,e.location=new jT,e.user=new sE(n,t,i);var s=void 0,c=void 0,l;r&&(s=r.getTraceId(),c=r.getSpanId(),l=r.getName()),e[LT]=new aE(s,c,l,o),e[MT]=new rE}e[WT]=function(){var t=e[MT],n=null;if(t&&R(t.id))n=t.id;else{var r=(e.sessionManager||{})[KT];n=r&&R(r.id)?r.id:null}return n},e[RT]=function(t,n){rc(ic(t.ext,fg.AppExt),`sesId`,e[WT](),R)},e[VT]=function(t,n){rc(t.ext,fg.OSExt,e.os)},e[zT]=function(t,n){var r=e.application;if(r){var i=ic(t,lE);rc(i,pg.applicationVersion,r.ver,R),rc(i,pg.applicationBuild,r.build,R)}},e.applyDeviceContext=function(t,n){var r=e.device;if(r){var i=ic(ic(t,cE),fg.DeviceExt);rc(i,`localId`,r.id,R),rc(i,`ip`,r.ip,R),rc(i,`model`,r.model,R),rc(i,`deviceClass`,r.deviceClass,R)}},e[UT]=function(t,n){var r=e.internal;if(r){var i=ic(t,lE);rc(i,pg.internalAgentVersion,r.agentVersion,R),rc(i,pg.internalSdkVersion,im(o,r.sdkVersion,64),R),(t.baseType===Tu.dataType||t.baseType===Xh.dataType)&&(rc(i,pg.internalSnippet,r.snippetVer,R),rc(i,pg.internalSdkSrc,r.sdkSrc,R))}},e[HT]=function(e,t){var n=a.location;n&&rc(ic(e,lE,[]),pg.locationIp,n.ip,R)},e[BT]=function(t,n){var r=e[LT];if(r){var i=ic(ic(t,cE),fg.TraceExt,{traceID:void 0,parentID:void 0});rc(i,`traceID`,r.traceID,R,L),rc(i,`name`,r.name,R,L),rc(i,`parentID`,r.parentID,R,L)}},e.applyWebContext=function(e,t){var n=a.web;n&&rc(ic(e,cE),fg.WebExt,n)},e.applyUserContext=function(t,n){var r=e.user;if(r){rc(ic(t,lE,[]),pg.userAccountId,r[qT],R);var i=ic(ic(t,cE),fg.UserExt);rc(i,`id`,r.id,R),rc(i,`authId`,r[JT],R)}},e.cleanUp=function(e,t){var n=e.ext;n&&(uE(n,fg.DeviceExt),uE(n,fg.UserExt),uE(n,fg.WebExt),uE(n,fg.OSExt),uE(n,fg.AppExt),uE(n,fg.TraceExt))}})}return e.__ieDyn=1,e}(),pE,mE,hE=null,gE=Fn((pE={accountId:hE,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:hE,sdkExtension:hE,isBrowserLinkTrackingEnabled:!1,appId:hE},pE[WT]=hE,pE.namePrefix=mE,pE[GT]=mE,pE.userCookiePostfix=mE,pE.idLength=22,pE.getNewId=hE,pE)),_E=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=110,n.identifier=_g;var r,i,a,o,s;return za(t,n,function(e,t){n(),W(e,`context`,{g:function(){return o}}),e.initialize=function(e,n,r,i){t.initialize(e,n,r,i),c(e)},e.processTelemetry=function(t,n){if(!L(t)){n=e._getTelCtx(n),t.name===Xh.envelopeType&&n.diagLog().resetInternalMessageCount();var r=o||{};r.session&&typeof o.session.id!=`string`&&r.sessionManager&&r[NT].update();var i=r.user;if(i&&!i.isUserCookieSet&&i.update(r.user.id),l(t,n),i&&i.isNewUser&&(i[FT]=!1,!s)){var a=new Tu(72,(jr()||{}).userAgent||``);Au(n.diagLog(),1,a)}e.processNext(t,n)}},e._doTeardown=function(e,t){var r=(e||{}).core();r&&r.getTraceCtx&&r.getTraceCtx(!1)===i&&r.setTraceCtx(a),n()};function n(){r=null,i=null,a=null,o=null,s=!0}function c(t){var n=e.identifier,c=e.core;e._addHook($l(t,function(){var i=Wd(null,t,c);t.storagePrefix&&zm(t.storagePrefix),s=t.disableUserInitMessage!==!1,r=i.getExtCfg(n,gE),e._extConfig=r})),a=c[IT](!1),o=new fE(c,r,a,e._unloadHooks),i=Am(e.context[LT],a),c.setTraceCtx(i),e.context.appId=function(){var e=c.getPlugin(vg);return e?e.plugin._appId:null}}function l(t,n){ic(t,`tags`,[]),ic(t,`ext`,{});var r=e.context;r[RT](t,n),r[zT](t,n),r.applyDeviceContext(t,n),r[BT](t,n),r.applyUserContext(t,n),r[VT](t,n),r.applyWebContext(t,n),r[HT](t,n),r[UT](t,n),r.cleanUp(t,n)}}),n}return t.__ieDyn=1,t}(nf),vE=`AuthenticatedUserContext`,yE=`track`,bE=`snippet`,xE=`getCookieMgr`,SE=`startTrackPage`,CE=`stopTrackPage`,wE=`flush`,TE=`startTrackEvent`,EE=`stopTrackEvent`,DE=`addTelemetryInitializer`;DE+``;var OE=`pollInternalLogs`,kE=`getPlugin`,AE=`evtNamespace`,jE=yE+`Event`,ME=yE+`Trace`,NE=yE+`Metric`,PE=yE+`PageView`,FE=yE+`Exception`,IE=yE+`DependencyData`,LE=`set`+vE,RE=`clear`+vE,zE=`https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json`,BE=`connectionString`,VE=`version`,HE=`queue`,UE=`instrumentationKey`,WE=`userOverrideEndpointUrl`,GE=`endpointUrl`,KE=`onunloadFlush`,qE=`context`,JE=`addHousekeepingBeforeUnload`,YE=`sendMessage`,XE=`updateSnippetDefinitions`,ZE,QE,$E,eD,tD,nD=[bE,`dependencies`,`properties`,`_snippetVersion`,`appInsightsNew`,`getSKUDefaults`],rD=`iKeyUsage`,iD=`CdnUsage`,aD=`SdkLoaderVer`,oD=`zipPayload`,sD=void 0,cD={disabled:!0,limit:iu({samplingRate:100,maxSendNumber:1}),interval:iu({monthInterval:3,daysOfMonth:[28]})},lD=(ZE={},ZE[BE]=sD,ZE.endpointUrl=sD,ZE[UE]=sD,ZE[WE]=sD,ZE.diagnosticLogInterval=ou(uD,1e4),ZE.featureOptIn=(QE={},QE[rD]={mode:3},QE[iD]={mode:2},QE[aD]={mode:2},QE[oD]={mode:1},QE),ZE.throttleMgrCfg=iu(($E={},$E[109]=iu(cD),$E[106]=iu(cD),$E[111]=iu(cD),$E[110]=iu(cD),$E)),ZE.extensionConfig=iu((eD={},eD.AppInsightsCfgSyncPlugin=iu({cfgUrl:zE,syncMode:2}),eD)),ZE);function uD(e){return e&&e>0}function dD(e,t){return xs(function(n,r){Ko(t,function(t){var r=t&&t.value,i=null;!t.rejected&&r&&(e[BE]=r,i=$m(r)),n(i)})})}var fD=function(){function e(t){var n=this,r,i,a,o,s,c,l,u,d,f,p,m,h,g;za(e,this,function(e){y(),W(e,`config`,{g:function(){return u}}),U([`pluginVersionStringArr`,`pluginVersionString`],function(t){W(e,t,{g:function(){return l?l[t]:null}})}),o=``+(t.sv||t.version||``),t[HE]=t.queue||[],t[VE]=t.version||2;var _=Ql(t.config||{},lD);u=_.cfg,d=new nS,W(e,`appInsights`,{g:function(){return d}}),i=new _E,r=new ET,a=new XC,l=new wf,W(e,`core`,{g:function(){return l}}),x($l(_,function(){var e=u[BE];if(nn(e)){var t=xs(function(t,n){Ko(dD(u,e),function(e){if(e.rejected)t(null);else{var n=u[UE],r=e.value;n=r&&r.instrumentationkey||n,t(n)}})}),n=u[WE];L(n)&&(n=xs(function(t,n){Ko(dD(u,e),function(e){if(e.rejected)t(null);else{var n=u[GE],r=e.value,i=r&&r.ingestionendpoint;n=i?i+Ep:n,t(n)}})})),u[UE]=t,u[GE]=n}if(R(e)&&e){var r=$m(e),i=r.ingestionendpoint;u.endpointUrl=u.userOverrideEndpointUrl?u[WE]:i+Ep,u[UE]=r.instrumentationkey||u.instrumentationKey}u.endpointUrl=u.userOverrideEndpointUrl?u[WE]:u[GE]})),e[bE]=t,e[wE]=function(e,t){e===void 0&&(e=!0);var n;return yd(l,function(){return`AISKU.flush`},function(){e&&!t&&(n=ws(function(e){t=e}));var r=1,i=function(){r--,r===0&&t()};U(l.getChannels(),function(t){t&&(r++,t[wE](e,i))}),i()},null,e),n},e[KE]=function(e){e===void 0&&(e=!0),U(l.getChannels(),function(t){t.onunloadFlush?t[KE]():t[wE](e)})},e.loadAppInsights=function(t,n,s){t===void 0&&(t=!1),t&&si(`Legacy Mode is no longer supported`);function c(t){if(t){var n=``;L(o)||(n+=o),e.context&&e.context.internal&&(e[qE].internal.snippetVer=n||`-`),H(e,function(e,n){R(e)&&!z(n)&&e&&e[0]!==`_`&&Xr(nD,e)===-1&&t[e]!==n&&(t[e]=n)})}}return yd(e.core,function(){return`AISKU.loadAppInsights`},function(){l.initialize(u,[a,i,r,d,f],n,s),W(e,`context`,{g:function(){return i[qE]}}),p||=new Xm(l);var t=pD();t&&e.context&&(e[qE].internal.sdkSrc=t),c(e[bE]),e.emptyQueue(),e[OE](),e[JE](e),x($l(_,function(){var t=!1;u.throttleMgrCfg[109]&&(t=!u.throttleMgrCfg[109].disabled),!p.isReady()&&u.extensionConfig&&u.extensionConfig[f.identifier]&&t&&p.onReadyState(!0),!m&&!u.connectionString&&fc(rD,u,!0)&&(p[YE](106,`See Instrumentation key support at aka.ms/IkeyMigrate`),m=!0),!h&&e.context.internal.sdkSrc&&e.context.internal.sdkSrc.indexOf(`az416426`)!=-1&&fc(iD,u,!0)&&(p[YE](110,`See Cdn support notice at aka.ms/JsActiveCdn`),h=!0),!g&&parseInt(o)<6&&fc(aD,u,!0)&&(p[YE](111,`An updated Sdk Loader is available, see aka.ms/SnippetVer`),g=!0)}))}),e},e[XE]=function(t){oc(t,e,function(e){return e&&Xr(nD,e)===-1})},e.emptyQueue=function(){try{if(B(e.snippet.queue)){for(var t=e.snippet[HE].length,n=0;n{this.setState({hasError:!1,error:void 0,errorInfo:void 0})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,Z.jsx)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8 bg-white rounded-lg shadow-lg`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`⚠️`}),(0,Z.jsx)(`h1`,{className:`text-2xl font-bold text-red-600 mb-4`,children:`Something went wrong`}),(0,Z.jsx)(`p`,{className:`text-gray-600 mb-6`,children:this.state.error?_D(this.state.error):`An unexpected error occurred.`}),!1,(0,Z.jsxs)(`div`,{className:`flex gap-3 justify-center`,children:[(0,Z.jsx)(`button`,{onClick:this.handleReset,className:`px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors`,children:`Try Again`}),(0,Z.jsx)(`button`,{onClick:()=>window.location.reload(),className:`px-6 py-3 bg-sky-500 text-white rounded-lg hover:bg-sky-600 transition-colors`,children:`Reload Page`})]})]})}):this.props.children}};(0,__.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(I.StrictMode,{children:(0,Z.jsx)(Sg.Provider,{value:mD,children:(0,Z.jsx)(vD,{children:(0,Z.jsxs)(o,{client:qb,children:[(0,Z.jsx)(tt,{router:Kb}),(0,Z.jsx)(i,{position:`top-right`,toastOptions:{duration:3e3,style:{background:`#fff`,color:`#374151`,border:`1px solid #E5E7EB`,padding:`12px 16px`,borderRadius:`8px`,boxShadow:`0 4px 12px rgba(0, 0, 0, 0.1)`},success:{iconTheme:{primary:`#10B981`,secondary:`#fff`}},error:{iconTheme:{primary:`#EF4444`,secondary:`#fff`}}}})]})})})}));export{Ev as t}; \ No newline at end of file diff --git a/services/api/src/ServiceHub.Api/wwwroot/assets/index-ahHEHxCY.js b/services/api/src/ServiceHub.Api/wwwroot/assets/index-ahHEHxCY.js deleted file mode 100644 index a00082d..0000000 --- a/services/api/src/ServiceHub.Api/wwwroot/assets/index-ahHEHxCY.js +++ /dev/null @@ -1,79 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-dashboard-CPa1Ep2L.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/page-correlation-ByerC9Nt.js","assets/page-dlq-history-Bi3Gp6Ul.js","assets/InsightsPage-B56HoFxL.js"])))=>i.map(i=>d[i]); -import{r as e,t}from"./rolldown-runtime-S-ySWqyJ.js";import{$ as n,B as r,C as i,F as a,G as o,H as s,I as c,J as l,K as u,N as d,P as f,R as p,S as m,U as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,a as S,at as C,b as w,c as T,ct as E,d as D,dt as O,f as ee,ft as k,g as A,h as te,i as j,it as M,l as ne,lt as re,m as ie,mt as ae,n as oe,nt as se,o as N,ot as ce,p as le,pt as ue,q as de,r as fe,rt as pe,s as me,st as he,tt as ge,u as _e,ut as ve,v as ye,w as be,x as xe,y as Se,z as Ce}from"./page-correlation-ByerC9Nt.js";import{a as we,c as Te,i as Ee,l as De,n as Oe,o as ke,r as Ae,s as je,u as Me}from"./page-dashboard-CPa1Ep2L.js";import{_ as Ne,a as Pe,c as Fe,d as Ie,f as Le,g as Re,h as ze,i as Be,l as Ve,m as He,n as Ue,o as We,p as Ge,r as Ke,s as qe,u as Je}from"./page-dlq-history-Bi3Gp6Ul.js";import{t as Ye}from"./vendor-ui-BR_f26pW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Xe=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ze=t(((e,t)=>{t.exports=Xe()})),Qe=t((e=>{var t=Ze(),n=ae(),r=Me();function i(e){var t=`https://react.dev/errors/`+e;if(1ie||(e.current=re[ie],re[ie]=null,ie--)}function N(e,t){ie++,re[ie]=e.current,e.current=t}var ce=oe(null),le=oe(null),ue=oe(null),de=oe(null);function fe(e,t){switch(N(ue,t),N(le,e),N(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}se(ce),N(ce,e)}function pe(){se(ce),se(le),se(ue)}function me(e){e.memoizedState!==null&&N(de,e);var t=ce.current,n=Gd(t,e.type);t!==n&&(N(le,e),N(ce,n))}function he(e){le.current===e&&(se(ce),se(le)),de.current===e&&(se(de),tp._currentValue=ne)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function Se(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Ce=Object.prototype.hasOwnProperty,we=t.unstable_scheduleCallback,Te=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,De=t.unstable_requestPaint,Oe=t.unstable_now,ke=t.unstable_getCurrentPriorityLevel,Ae=t.unstable_ImmediatePriority,je=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,Pe=t.unstable_LowPriority,Fe=t.unstable_IdlePriority,Ie=t.log,Le=t.unstable_setDisableYieldValue,Re=null,ze=null;function Be(e){if(typeof Ie==`function`&&Le(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(Re,e)}catch{}}var Ve=Math.clz32?Math.clz32:We,He=Math.log,Ue=Math.LN2;function We(e){return e>>>=0,e===0?32:31-(He(e)/Ue|0)|0}var Ge=256,Ke=262144,qe=4194304;function Je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function P(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(z)try{var un={};Object.defineProperty(un,`passive`,{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=mn(),pn=fn=dn=null,Xn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=z&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Bt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Od(Dr,`onSelect`),0>=o,i-=o,Si=1<<32-Ve(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ji&&wi(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ji&&wi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ji&&wi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ta(o),x(e,r,o,c)}if(te(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ja(o),c);if(o.$$typeof===b)return x(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=x(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Rl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(J&p)===p:(r&p)===p){p!==0&&p===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:La=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Ns(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,pa(c,r),hu(e)):Ms(e,t,r,hu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,ne,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},hu())}function Es(){return Qi(tp)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Ba(n);var r=Va(t,e,n);r!==null&&(_u(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=Qr(e,t,n,r),n!==null&&(_u(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,hu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),zl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return _u(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&_u(t,e,2)}function Ps(e){var t=e.alternate;return e===W||t!==null&&t===W}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}var Ls={readContext:Qi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Qi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Be(!0);try{n(t)}finally{Be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,W,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Oo();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),zl===null)throw Error(i(349));J&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=zl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ut]=t,o[dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ut]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Fi(t,!0)}else e=Ud(e).createTextNode(r),e[ut]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ut]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ut]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return pe(),e===null&&wd(t.stateNode.containerInfo),Fc(t),null;case 10:return Ki(t.type),Fc(t),null;case 19:if(se(oo),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return N(oo,oo.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Oe()>ru&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Fc(t),null}else 2*Oe()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Oe(),e.sibling=null,n=oo.current,N(oo,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(oo),null;case 4:return pe(),null;case 10:return Ki(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&se(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Rc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:se(oo);break;case 10:Ki(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&se(ha);break;case 24:Ki(ia)}}function zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Bc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Vc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Ku(e,e.return,t)}}}function Hc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Uc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Wc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Gc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Kc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[dt]=t}catch(t){Ku(e,e.return,t)}}function qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[ut]=e,t[dt]=n}catch(t){Ku(e,e.return,t)}}var Qc=!1,$c=!1,el=!1,tl=typeof WeakSet==`function`?WeakSet:Set,nl=null;function rl(e,t){if(e=e.containerInfo,Vd=up,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,nl=t;nl!==null;)if(t=nl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,nl=e;else for(;nl!==null;){switch(t=nl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ld(o,r,n),o[ut]=e,Ct(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Rl&6)throw Error(i(331));var c=Rl;if(Rl|=4,Nl(o.current),Tl(o,o.current,s,n),Rl=c,od(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(Re,o)}catch{}return!0}finally{M.p=a,j.T=r,Hu(e,t)}}function Gu(e,t,n){t=mi(n,t),t=Zs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(et(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=mi(n,e),n=Qs(2),r=Va(t,n,2),r!==null&&($s(n,r,t,e),et(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,zl===e&&(J&n)===n&&(Kl===4||Kl===3&&(J&62914560)===J&&300>Oe()-tu?!(Rl&2)&&wu(e,0):Yl|=n,Zl===J&&(Zl=0)),ad(e)}function Yu(e,t){t===0&&(t=$e()),e=$r(e,t),e!==null&&(et(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return we(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ve(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=J,a=Ye(r,r===zl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=Oe(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}ou!==0&&ou!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),Ct(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=St(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);Ct(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=St(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),Ct(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=St(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),Ct(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=ue.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=St(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=St(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=St(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+Ht(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),Ct(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Ht(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Ct(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ct(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,Ct(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,Ct(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ct(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ct(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),Ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Qe()})),P=e(ae(),1),et=e(Me(),1);function tt(e){return P.createElement(E,{flushSync:et.flushSync,...e})}ve();function nt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,u=async()=>{let n=!1,u=e=>{g(e,()=>t.signal,()=>n=!0)},d=_(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await d((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})()),{maxPages:o}=t.options,c=i?h:s;return{pages:c(e.pages,a,o),pageParams:c(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?it:rt,n={pages:a,pageParams:o};c=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=l===0?o[0]??r.initialPageParam:rt(r,c);if(l>0&&e==null)break;c=await f(c,e),l++}while(lt.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function rt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function it(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var at=class extends pe{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new c({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ot(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ot(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){r.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){r.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return r.batch(()=>Promise.all(e.map(e=>e.continue().catch(v))))}};function ot(e){return e.options.scope?.id}var st=class extends pe{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??de(r,t),a=this.get(i);return a||(a=new p({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){r.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>y(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>y(e,t)):t}notify(e){r.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){r.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){r.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ct=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new st,this.#t=e.mutationCache||new at,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=se.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ce.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(n(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=o(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return r.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;r.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return r.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},i=r.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(i).then(v).catch(v)}invalidateQueries(e,t={}){return r.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},i=r.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(v)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(i).then(v)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(n(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(v).catch(v)}fetchInfiniteQuery(e){return e.behavior=nt(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(v).catch(v)}ensureInfiniteQueryData(e){return e.behavior=nt(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ce.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(u(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{b(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(u(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{b(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=de(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ge&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},lt=`undefined`,ut=`prototype`,dt=Object,ft=dt[ut];function pt(e,t){return e||t}function mt(e,t){return e[t]}var ht=void 0,gt=null,_t=``,vt=`function`,yt=`object`,bt=`prototype`,xt=`__proto__`,St=`undefined`,Ct=`constructor`,wt=`Symbol`,Tt=`length`,Et=`name`,Dt=`call`,Ot=`toString`,kt=`getOwnPropertyDescriptor`,At=pt(Object),jt=mt(At,bt),Mt=pt(String),Nt=mt(Mt,bt),Pt=pt(Math),Ft=pt(Array),It=mt(Ft,bt),Lt=mt(It,`slice`),Rt=`_polyfill`,zt=`__nw21$polytype__`;function Bt(e,t){try{return{v:e.apply(this,t)}}catch(e){return{e}}}function Vt(e,t,n){var r=Bt(e,n);return r.e?t:r.v}var Ht;function Ut(e){return function(t){return typeof t===e}}function Wt(e){var t=`[object `+e+`]`;return function(e){return!!(e&&Gt(e)===t)}}function Gt(e){return jt[Ot].call(e)}function Kt(e){return typeof e===St||e===St}function qt(e){return e===ht}function F(e){return e===gt||Kt(e)}function Jt(e){return e===gt||e===ht}function Yt(e){return!!e||e!==ht}function Xt(e){return!Ht&&(Ht=[`string`,`number`,`boolean`,St,`symbol`,`bigint`]),e!==yt&&Ht.indexOf(e)!==-1}var I=Ut(`string`),L=Ut(vt);function Zt(e){return!e&&F(e)?!1:!!e&&typeof e===yt}var R=mt(Ft,`isArray`),Qt=Wt(`Date`),$t=Ut(`number`),en=Ut(`boolean`),tn=Wt(`Error`);function nn(e){return!!(e&&e.then&&L(e.then))}function rn(e){return!(!e||Vt(function(){return!(e&&0+e)},!e))}function an(){}function on(){return!1}var sn=pt(Mt),cn=`[object Error]`;function z(e,t){var n=_t,r=jt[Ot][Dt](e);r===cn&&(e={stack:sn(e.stack),message:sn(e.message),name:sn(e.name)});try{n=JSON.stringify(e,gt,t?typeof t==`number`?t:4:ht),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,`$1: `):gt)||sn(e)}catch(e){n=` - `+z(e,t)}return r+`: `+n}function ln(e){throw Error(e)}function un(e){throw TypeError(e)}function dn(e){Jt(e)&&un(`Cannot convert undefined or null to object`)}function fn(e){I(e)||un(`'`+z(e)+`' is not a string`)}function pn(e,t){return!!e&&jt.hasOwnProperty[Dt](e,t)}var mn=pt(mt(At,kt),an),hn=pt(mt(At,`hasOwn`),gn);function gn(e,t){return dn(e),pn(e,t)||!!mn(e,t)}function B(e,t,n){if(e&&(Zt(e)||L(e))){for(var r in e)if(hn(e,r)&&t[Dt](n||e,r,e[r])===-1)break}}function V(e,t,n){if(e)for(var r=e[Tt]>>>0,i=0;i0&&L(n[0])&&(t=n[0])}return t||setTimeout}function qi(e){var t=L(e)?e:Gi;if(!t){var n=Kn().tmOut||[];R(n)&&n.length>1&&L(n[1])&&(t=n[1])}return t||clearTimeout}function Ji(e,t,n){var r=R(t),i=r?t.length:0,a=Ki(i>0?t[0]:r?ht:t),o=qi(i>1?t[1]:ht),s=n[0];n[0]=function(){c.dn(),ar(s,ht,Lt[Dt](arguments))};var c=Ui(e,function(e){if(e){if(e.refresh)return e.refresh(),e;ar(o,ht,[e])}return ar(a,ht,n)},function(e){ar(o,ht,[e])});return c.h}function Yi(e,t){return Ji(!0,ht,Lt[Dt](arguments))}function Xi(e,t){return Ji(!1,ht,Lt[Dt](arguments))}(wr()||{}).Symbol,(wr()||{}).Reflect;var Zi=`hasOwnProperty`,Qi=Mn||function(e){for(var t,n=1,r=arguments.length;n0)for(var i=0;i=0;n--)if(e[n]===t)return!0;return!1}function Na(e,t,n,r){function i(e,t,n){var i=t[n];if(i[sa]&&r){var a=e[oa]||{};a[da]!==!1&&(i=(a[t[ca]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var a=tr(null);Oa(n,function(e){a[e]=i(t,n,e)});for(var o=Da(e),s=[];o&&!Ea(o)&&!Ma(s,o);)Oa(o,function(e){!a[e]&&ka(o,e,!xa)&&(a[e]=i(t,o,e))}),s.push(o),o=Da(o);return a}function Pa(e,t,n,r){var i=null;if(e&&pn(n,ca)){var a=e[oa]||tr(null);if(i=(a[n[ca]]||tr(null))[t],i||Aa(`Missing [`+t+`] `+aa),!i[ua]&&a[da]!==!1){for(var o=!pn(e,t),s=Da(e),c=[];o&&s&&!Ea(s)&&!Ma(c,s);){var l=s[t];if(l){o=l===r;break}c.push(s),s=Da(s)}try{o&&(e[t]=i),i[ua]=1}catch{a[da]=!1}}}return i}function Fa(e,t,n){var r=t[e];return r===n&&(r=Da(t)[e]),typeof r!==aa&&Aa(`[`+e+`] is not a `+aa),r}function Ia(e,t,n,r,i){function a(e,t){var n=function(){return(Pa(this,t,e,n)||Fa(t,e,n)).apply(this,arguments)};return n[sa]=1,n}if(!Ta(e)){var o=n[oa]=n[oa]||tr(null);if(!Ta(o)){var s=o[t]=o[t]||tr(null);o[da]!==!1&&(o[da]=!!i),Ta(s)||Oa(n,function(t){ka(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!pn(e,t)||e[t]&&!e[t][sa])&&(e[t]=a(e,t)))})}}}function La(e,t){if(xa){for(var n=[],r=Da(t);r&&!Ea(r)&&!Ma(n,r);){if(r===e)return!0;n.push(r),r=Da(r)}return!1}return!0}function Ra(e,t){return pn(e,ia)?e.name||t||pa:((e||{})[ra]||{}).name||t||pa}function za(e,t,n,r){pn(e,ia)||Aa(`theClass is an invalid class definition.`);var i=e[ia];La(i,t)||Aa(`[`+Ra(e)+`] not in hierarchy of [`+Ra(t)+`]`);var a=null;pn(i,ca)?a=i[ca]:(a=la+Ra(e,`_`)+`$`+wa.n,wa.n++,i[ca]=a);var o=za[fa],s=!!o[va];s&&r&&r[va]!==void 0&&(s=!!r[va]);var c=ja(t);n(t,Na(i,t,c,s));var l=!!xa&&!!o[ya];l&&r&&(l=!!r[ya]),Ia(i,a,t,c,l!==!1)}za[fa]=wa.o;var Ba=Rn,Va=Vn,Ha=Ba({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Ua=`toLowerCase`,Wa=`length`,Ga=`warnToConsole`,Ka=`throwInternal`,qa=`watch`,Ja=`apply`,U=`push`,Ya=`splice`,Xa=`logger`,Za=`cancel`,Qa=`initialize`,$a=`identifier`,eo=`removeNotificationListener`,to=`addNotificationListener`,no=`isInitialized`,ro=`getNotifyMgr`,io=`getPlugin`,ao=`name`,oo=`processNext`,so=`getProcessTelContext`,co=`value`,W=`enabled`,lo=`stopPollingInternalLogs`,uo=`unload`,fo=`onComplete`,po=`version`,mo=`loggingLevelConsole`,ho=`createNew`,go=`teardown`,_o=`messageId`,vo=`message`,yo=`diagLog`,bo=`_doTeardown`,xo=`update`,So=`getNext`,Co=`setNextPlugin`,wo=`userAgent`,To=`split`,Eo=`replace`,Do=`substring`,Oo=`indexOf`,ko=`type`,Ao=`evtName`,jo=`status`,Mo=`getAllResponseHeaders`,No=`isChildEvt`,Po=`data`,Fo=`getCtx`,Io=`setCtx`,Lo=`headers`,Ro=`urlString`,zo=`timeout`,Bo=`traceFlags`,Vo=`getAttribute`,Ho;function Uo(e,t){Ho||=ai(`AggregationError`,function(e,t){t.length>1&&(e.errors=t[1])});var n=e||`One or more errors occurred.`;throw V(t,function(e,t){n+=` -${t} > ${z(e)}`}),new Ho(n,t||[])}var Wo=`Promise`,Go=`rejected`;function Ko(e,t){return qo(e,function(e){return t?t({status:`fulfilled`,rejected:!1,value:e}):e},function(e){return t?t({status:Go,rejected:!0,reason:e}):e})}function qo(e,t,n,r){var i=e;try{if(nn(e))(t||n)&&(i=e.then(t,n));else try{t&&(i=t(e))}catch(e){if(n)i=n(e);else throw e}}finally{r&&Jo(i,r)}return i}function Jo(e,t){var n=e;return t&&(nn(e)?n=e.finally?e.finally(t):e.then(function(e){return t(),e},function(e){throw t(),e}):t()),n}var Yo,Xo,Zo,Qo=!1;function $o(e,t,n,r){Yo||={toString:function(){return`[[PromiseState]]`}},Xo||={toString:function(){return`[[PromiseResult]]`}},Zo||={toString:function(){return`[[PromiseIsHandled]]`}};var i={};i[Yo]={get:t},i[Xo]={get:n},i[Zo]={get:r},wn(e,i)}var es=[`pending`,`resolving`,`resolved`,Go],ts=`dispatchEvent`,ns;function rs(e){var t;return e&&e.createEvent&&(t=e.createEvent(`Event`)),!!t&&t.initEvent}function is(e,t,n,r){var i=Dr();!ns&&(ns=br(!!Bt(rs,[i]).v));var a=ns.v?i.createEvent(`Event`):r?new Event(t):{};if(n&&n(a),ns.v&&a.initEvent(t,!1,!0),a&&e[ts])e[ts](a);else{var o=e[`on`+t];if(o)o(a);else{var s=Tr(`console`);s&&(s.error||s.log)(t,z(a))}}}var as=`unhandledRejection`,os=as.toLowerCase(),ss=[],cs=0,ls=10,us;function ds(e){return L(e)?e.toString():z(e)}function fs(e,t,n){var r=Qr(arguments,3),i=0,a=!1,o,s=[],c=cs++,l=ss.length>0?ss[ss.length-1]:void 0,u=!1,d=null,f;function p(t,n){try{return ss.push(c),u=!0,d&&d.cancel(),d=null,e(function(e,r){s.push(function(){try{var a=i===2?t:n,s=Kt(a)?o:L(a)?a(o):a;nn(s)?s.then(e,r):a?e(s):i===3?r(s):e(s)}catch(e){r(e)}}),a&&_()},r)}finally{ss.pop()}}function m(e){return p(void 0,e)}function h(e){var t=e,n=e;return L(e)&&(t=function(t){return e&&e(),t},n=function(t){throw e&&e(),t}),p(t,n)}function g(){return es[i]}function _(){if(s.length>0){var e=s.slice();s=[],u=!0,d&&d.cancel(),d=null,t(e)}}function v(e,t){return function(n){if(i===t){if(e===2&&nn(n)){i=1,n.then(v(2,1),v(3,1));return}i=e,a=!0,o=n,_(),!u&&e===3&&!d&&(d=Yi(y,ls))}}}function y(){if(!u)if(u=!0,Pr())process.emit(as,o,f);else{var e=kr()||wr();!us&&(us=br(Bt(Tr,[Wo+`RejectionEvent`]).v)),is(e,os,function(e){return H(e,`promise`,{g:function(){return f}}),e.reason=o,e},!!us.v)}}f={then:p,catch:m,finally:h},Cn(f,`state`,{get:g}),Qo&&$o(f,g,function(){return Gt(o)},function(){return u}),Br()&&(f[Hr(11)]=`IPromise`);function b(){return`IPromise`+(Qo?`[`+c+(Kt(l)?``:`:`+l)+`]`:``)+` `+g()+(a?` - `+ds(o):``)}return f.toString=b,(function(){L(n)||un(Wo+`: executor is not a function - `+ds(n));var e=v(3,0);try{n.call(f,v(2,0),e)}catch(t){e(t)}})(),f}function ps(e){return function(t){return e(function(e,n){try{var r=[],i=1;Jr(t,function(t,a){t&&(i++,qo(t,function(t){r[a]=t,--i===0&&e(r)},n))}),i--,i===0&&e(r)}catch(e){n(e)}},Qr(arguments,1))}}function ms(e){return br(function(t){return e(function(e,n){var r=[],i=1;function a(t,n){i++,Ko(t,function(t){t.rejected?r[n]={status:Go,reason:t.reason}:r[n]={status:`fulfilled`,value:t.value},--i===0&&e(r)})}try{R(t)?V(t,a):Kr(t)?Jr(t,a):un(`Input is not an iterable`),i--,i===0&&e(r)}catch(e){n(e)}},Qr(arguments,1))})}function hs(e){V(e,function(e){try{e()}catch{}})}function gs(e){var t=$t(e)?e:0;return function(e){Yi(function(){hs(e)},t)}}function _s(e,t){return fs(_s,gs(t),e,t)}var vs;function ys(e,t){!vs&&(vs=br(Bt(Tr,[Wo]).v||null));var n=vs.v;if(!n)return _s(e);L(e)||un(Wo+`: executor is not a function - `+z(e));var r=0;function i(){return es[r]}var a=new n(function(t,n){function i(e){r=2,t(e)}function a(e){r=3,n(e)}e(i,a)});return Cn(a,`state`,{get:i}),a}var bs;function xs(e){return fs(xs,hs,e)}function Ss(e,t){return!bs&&(bs=ms(xs)),bs.v(e,t)}var Cs;function ws(e,t){return!Cs&&(Cs=br(ys)),Cs.v.call(this,e,t)}var Ts=ps(ws),Es=`channels`,Ds=`core`,Os=`createPerfMgr`,ks=`disabled`,As=`extensionConfig`,js=`extensions`,Ms=`processTelemetry`,Ns=`priority`,Ps=`eventsSent`,Fs=`eventsDiscarded`,Is=`eventsSendRequest`,Ls=`perfEvent`,Rs=`offlineEventsStored`,zs=`offlineBatchSent`,Bs=`offlineBatchDrop`,Vs=`getPerfMgr`,Hs=`domain`,Us=`path`,Ws=`Not dynamic - `,Gs=`REDACTED`,Ks=[`sig`,`Signature`,`AWSAccessKeyId`,`X-Goog-Signature`],qs=`getPrototypeOf`,Js=/-([a-z])/g,Ys=/([^\w\d_$])/g,Xs=/^(\d+[\w\d_$])/,Zs=Object[qs];function Qs(e){return!F(e)}function $s(e){var t=e;return t&&I(t)&&(t=t[Eo](Js,function(e,t){return t.toUpperCase()}),t=t[Eo](Ys,`_`),t=t[Eo](Xs,function(e,t){return`_`+t})),t}function ec(e,t){return e&&t?Ri(e,t)!==-1:!1}function tc(e){return e&&e.toISOString()||``}function G(e){return tn(e)?e[ao]:``}function K(e,t,n,r,i){var a=n;return e&&(a=e[t],a!==n&&(!i||i(a))&&(!r||r(n))&&(a=n,e[t]=a)),a}function nc(e,t,n){var r;return e?(r=e[t],!r&&F(r)&&(r=Kt(n)?{}:n,e[t]=r)):r=Kt(n)?{}:n,r}function rc(e,t){var n=null,r=null;return L(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t][Ja](r,e)}}function ic(e,t,n){if(e&&t&&Zt(e)&&Zt(t)){var r=function(r){if(I(r)){var i=t[r];L(i)?(!n||n(r,!0,t,e))&&(e[r]=rc(t,r)):(!n||n(r,!1,t,e))&&(hn(e,r)&&delete e[r],H(e,r,{g:function(){return t[r]},s:function(e){t[r]=e}}))}};for(var i in t)r(i)}return e}function ac(e,t,n,r,i){e&&t&&n&&(i!==!1||Kt(e[t]))&&(e[t]=rc(n,r))}function oc(e,t,n,r){return e&&t&&Zt(e)&&R(n)&&V(n,function(n){I(n)&&ac(e,n,t,n,r)}),e}function sc(e){return function(){function t(){var t=this;e&&B(e,function(e,n){t[e]=n})}return t}()}function cc(e){return e&&Mn&&(e=dt(Mn({},e))),e}function lc(e,t,n,r,i,a){var o=arguments,s=o[0]||{},c=o[Wa],l=!1,u=1;for(c>0&&en(s)&&(l=s,s=o[u]||{},u++),Zt(s)||(s={});u>>=0),dl=cl+e&sl,fl=ll-e&sl,ul=!0}function ml(){try{var e=rr()&2147483647;pl((Math.random()*ol^e)+e)}catch{}}function hl(e){return e>0?ui(gl()/sl*(e+1))>>>0:0}function gl(e){var t=0,n=Gc()||Kc();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&sl),t===0&&Jc()&&(ul||ml(),t=_l()&sl),t===0&&(t=ui(ol*Math.random()|0)),e||(t>>>=0),t}function _l(e){fl=36969*(fl&65535)+(fl>>16)&sl,dl=18e3*(dl&65535)+(dl>>16)&sl;var t=(fl<<16)+(dl&65535)>>>0&sl|0;return e||(t>>>=0),t}function vl(e){e===void 0&&(e=22);for(var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n=gl()>>>0,r=0,i=``;i[Wa]>>=6,r===5&&(n=(gl()<<2&4294967295|n&3)>>>0,r=0);return i}var yl=`3.3.11`,bl=`.`+vl(6),xl=0;function Sl(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType}function Cl(e,t){var n=t[e.id];if(!n){n={};try{Sl(t)&&H(t,e.id,{e:!1,v:n})}catch{}}return n}function wl(e,t){return t===void 0&&(t=!1),$s(e+ xl+++(t?`.`+yl:``)+bl)}function Tl(e){var t={id:wl(`_aiData-`+(e||``)+`.`+yl),accept:function(e){return Sl(e)},get:function(e,n,r,i){var a=e[t.id];return a?a[$s(n)]:(i&&(a=Cl(t,e),a[$s(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch{}}};return t}function El(e){return e&&Zt(e)&&!R(e)&&(e.isVal||e.fb||hn(e,`v`)||hn(e,`mrg`)||hn(e,`ref`)||e.set)}function Dl(e,t,n){var r,i=n.dfVal||Yt;if(t&&n.fb){var a=n.fb;R(a)||(a=[a]);for(var o=0;o0&&Uo(`Watcher error(s): `,t)}}function d(e){if(e&&e.h.length>0){o||=[],s||=Yi(function(){s=null,u()},0);for(var t=0;t0?Ko(Ql(e[0],t),function(){$l(Qr(e,1),t,n)}):n(),r}var eu=`Microsoft_ApplicationInsights_BypassAjaxInstrumentation`;function tu(e,t,n){return!e&&F(e)?t:en(e)?e:sn(e)[Ua]()===`true`}function nu(e){return{mrg:!0,v:e}}function ru(e,t){return{set:e,v:t}}function iu(e,t,n){return{fb:n,isVal:e,v:t}}function au(e,t){return{fb:t,set:tu,v:!!e}}function ou(e){return{isVal:I,v:sn(e||``)}}var su=[Ps,Fs,Is,Ls],cu=null,lu;function uu(e,t){return function(){var n=arguments,r=fu(t);if(r){var i=r.listener;i&&i[e]&&i[e][Ja](i,n)}}}function du(){var e=Tr(`Microsoft`);return e&&(cu=e.ApplicationInsights),cu}function fu(e){var t=cu;return!t&&e.disableDbgExt!==!0&&(t=cu||du()),t?t.ChromeDbgExt:null}function pu(e){if(!lu){lu={};for(var t=0;t=t&&(e[d](u[vo]),r[p]=!0)}else i>=t&&e[d](u[vo]);l(t,u)}},e.debugToConsole=function(e){Su(`debug`,e),f(`warning`,e)},e[Ga]=function(e){Su(`warn`,e),f(`warning`,e)},e.errorToConsole=function(e){Su(`error`,e),f(`error`,e)},e.resetInternalMessageCount=function(){n=0,r={}},e.logInternalMessage=l,e[uo]=function(e){c&&c.rm(),c=null};function l(t,i){if(!d()){var s=!0,c=vu+i[_o];if(r[c]?s=!1:r[c]=!0,s&&(t<=a&&(e.queue[U](i),n++,f(t===1?`error`:`warn`,i)),n===o)){var l=`Internal events throttle limit per PageView reached for this app.`,u=new Cu(23,l,!1);e.queue[U](u),t===1?e.errorToConsole(l):e[Ga](l)}}}function u(t){return Zl(Xl(t,yu,e).cfg,function(e){var t=e.cfg;i=t[mo],a=t.loggingLevelTelemetry,o=t.maxMessageLimit,s=t.enableDebug})}function d(){return n>=o}function f(e,n){var r=fu(t||{});r&&r.diagLog&&r[yo](e,n)}})}return e.__ieDyn=1,e}();function Eu(e){return e||new Tu}function Y(e,t,n,r,i,a){a===void 0&&(a=!1),Eu(e)[Ka](t,n,r,i,a)}function Du(e,t){Eu(e)[Ga](t)}function Ou(e,t,n){Eu(e).logInternalMessage(t,n)}var ku,Au,ju=`toGMTString`,Mu=`toUTCString`,Nu=`cookie`,Pu=`expires`,Fu=`isCookieUseDisabled`,Iu=`disableCookiesUsage`,Lu=`_ckMgr`,Ru=null,zu=null,Bu=null,Vu,Hu={},Uu={},Wu=(ku={cookieCfg:nu((Au={},Au[Hs]={fb:`cookieDomain`,dfVal:Qs},Au.path={fb:`cookiePath`,dfVal:Qs},Au.enabled=void 0,Au.ignoreCookies=void 0,Au.blockedCookies=void 0,Au.disableCookieDefer=!1,Au)),cookieDomain:void 0,cookiePath:void 0},ku[Iu]=void 0,ku);function Gu(){!Vu&&(Vu=cr(function(){return Dr()}))}function Ku(e,t){var n=Qu[Lu]||Uu[Lu];return n||(n=Qu[Lu]=Qu(e,t),Uu[Lu]=n),n}function qu(e){return e?e.isEnabled():!0}function Ju(e,t){return t&&e&&R(e.ignoreCookies)?Xr(e.ignoreCookies,t)!==-1:!1}function Yu(e,t){return t&&e&&R(e.blockedCookies)&&Xr(e.blockedCookies,t)!==-1?!0:Ju(e,t)}function Xu(e,t){var n=t[W];if(F(n)){var r=void 0;Kt(e[Fu])||(r=!e[Fu]),Kt(e[Iu])||(r=!e[Iu]),n=r}return n}function Zu(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var r=t.cookieCfg;n=r&&r[Lu]?r[Lu]:Qu(t)}return n||=Ku(t,(e||{})[Xa]),n}function Qu(e,t){var n,r,i,a,o,s,c,l,u=[];function d(e){var t,n=(t={},t[Us]=e||`/`,t[Pu]=`Thu, 01 Jan 1970 00:00:01 GMT`,t);return Jc()||(n[`max-age`]=`0`),nd(``,n)}function f(e,t,n,a){var o={},s=li(e||``),c=Ri(s,`;`);if(c!==-1&&(s=li($n(e,c)),o=ed(Xn(e,c+1))),K(o,Hs,n||i,rn,Kt),!F(t)){var l=Jc();if(Kt(o[Pu])){var u=rr()+t*1e3;if(u>0){var d=new Date;d.setTime(u),K(o,Pu,td(d,l?ju:Mu)||td(d,l?ju:Mu)||``,rn)}}l||K(o,`max-age`,``+t,null,Kt)}var f=Vc();return f&&f.protocol===`https:`&&(K(o,`secure`,null,null,Kt),zu===null&&(zu=!ad((jr()||{})[wo])),zu&&K(o,`SameSite`,`None`,null,Kt)),K(o,Us,a||r,null,Kt),nd(s,o)}function p(e){if(u)for(var t=u[Wa]-1;t>=0;t--)u[t].n===e&&u[Ya](t,1)}function m(){$u(t)&&u&&(V(u,function(e){Yu(n,e.n)||(e.o===0?c(e.n,e.v):e.o===1&&l(e.n,e.v))}),u=[])}e=Xl(e||Uu,null,t).cfg,a=Zl(e,function(t){t.setDf(t.cfg,Wu),n=t.ref(t.cfg,`cookieCfg`),r=n.path||`/`,i=n[Hs],n.disableCookieDefer?u=null:u===null&&(u=[]);var a=o;o=Xu(e,n)!==!1,s=n.getCookie||rd,c=n.setCookie||id,l=n.delCookie||id,!a&&o&&u&&m()},t);var h={isEnabled:function(){var r=Xu(e,n)!==!1&&o&&$u(t),i=Uu[Lu];return r&&i&&h!==i&&(r=qu(i)),r},setEnabled:function(t){n[W]=t,Kt(e[Iu])||(e[Iu]=!t)},set:function(e,t,r,i,a){var o=!1;if(!Yu(n,e)){var s=f(t,r,i,a);qu(h)?(c(e,s),o=!0):u&&(p(e),u[U]({n:e,o:0,v:s}),o=!0)}return o},get:function(e){var t=``;if(!Ju(n,e)){if(qu(h))t=s(e);else if(u)for(var r=u[Wa]-1;r>=0;r--){var i=u[r];if(i.n===e){if(i.o===0){var a=i.v,o=Ri(a,`;`);t=li(o===-1?a:$n(a,o))}break}}}return t},del:function(e,t){var n=!1;return qu(h)?n=h.purge(e,t):u&&(p(e),u[U]({n:e,o:1,v:d(t)}),n=!0),n},purge:function(e,n){var r=!1;return $u(t)&&(l(e,d(n)),r=!0),r},unload:function(e){a&&a.rm(),a=null,u=null}};return h[Lu]=h,h}function $u(e){if(Ru===null){Ru=!1,!Vu&&Gu();try{Ru=(Vu.v||{})[Nu]!==void 0}catch(t){Y(e,2,68,`Cannot access document.cookie - `+G(t),{exception:z(t)})}}return Ru}function ed(e){var t={};return e&&e.length&&V(li(e)[To](`;`),function(e){if(e=li(e||``),e){var n=Ri(e,`=`);n===-1?t[e]=null:t[li($n(e,n))]=li(Xn(e,n+1))}}),t}function td(e,t){return L(e[t])?e[t]():null}function nd(e,t){var n=e||``;return B(t,function(e,t){n+=`; `+e+(F(t)?``:`=`+t)}),n}function rd(e){var t=``;if(!Vu&&Gu(),Vu.v){var n=Vu.v[Nu]||``;Bu!==n&&(Hu=ed(n),Bu=n),t=li(Hu[e]||``)}return t}function id(e,t){!Vu&&Gu(),Vu.v&&(Vu.v[Nu]=e+`=`+t)}function ad(e){return I(e)?!!(ec(e,`CPU iPhone OS 12`)||ec(e,`iPad; CPU OS 12`)||ec(e,`Macintosh; Intel Mac OS X 10_14`)&&ec(e,`Version/`)&&ec(e,`Safari`)||ec(e,`Macintosh; Intel Mac OS X 10_14`)&&Ii(e,`AppleWebKit/605.1.15 (KHTML, like Gecko)`)||ec(e,`Chrome/5`)||ec(e,`Chrome/6`)||ec(e,`UnrealEngine`)&&!ec(e,`Chrome`)||ec(e,`UCBrowser/12`)||ec(e,`UCBrowser/11`)):!1}var od={perfEvtsSendAll:!1};function sd(e){e.h=null;var t=e.cb;e.cb=[],V(t,function(e){Bt(e.fn,[e.arg])})}function cd(e,t,n,r){V(e,function(e){e&&e[t]&&(n?(n.cb[U]({fn:r,arg:e}),n.h=n.h||Yi(sd,0,n)):Bt(r,[e]))})}var ld=function(){function e(t){this.listeners=[];var n,r,i=[],a={h:null,cb:[]};r=Xl(t,od)[qa](function(e){n=!!e.cfg.perfEvtsSendAll}),za(e,this,function(e){H(e,`listeners`,{g:function(){return i}}),e[to]=function(e){i[U](e)},e[eo]=function(e){for(var t=Xr(i,e);t>-1;)i[Ya](t,1),t=Xr(i,e)},e[Ps]=function(e){cd(i,Ps,a,function(t){t[Ps](e)})},e[Fs]=function(e,t,n){cd(i,Fs,a,function(r){r[Fs](e,t,n)})},e[Is]=function(e,t){cd(i,Is,t?a:null,function(n){n[Is](e,t)})},e[Ls]=function(e){e&&(n||!e.isChildEvt())&&cd(i,Ls,null,function(t){e.isAsync?Yi(function(){return t[Ls](e)},0):t[Ls](e)})},e[Rs]=function(e){e&&e.length&&cd(i,Rs,a,function(t){t[Rs](e)})},e[zs]=function(e){e&&e.data&&cd(i,zs,a,function(t){t[zs](e)})},e[Bs]=function(e,t){if(e>0){var n=t||0;cd(i,Bs,a,function(t){t[Bs](e,n)})}},e[uo]=function(e){var t=function(){r&&r.rm(),r=null,i=[],a.h&&a.h.cancel(),a.h=null,a.cb=[]},n;if(cd(i,`unload`,null,function(t){var r=t[uo](e);r&&(n||=[],n[U](r))}),n)return ws(function(e){return Ko(Ts(n),function(){t(),e()})});t()}})}return e.__ieDyn=1,e}(),ud=`ctx`,dd=`ParentContextKey`,fd=`ChildrenContextKey`,pd=null,md=function(){function e(t,n,r){var i=this;if(i.start=rr(),i[ao]=t,i.isAsync=r,i[No]=function(){return!1},L(n)){var a;H(i,`payload`,{g:function(){return!a&&L(n)&&(a=n(),n=null),a}})}i[Fo]=function(t){return t?t===e[dd]||t===e[fd]?i[t]:(i[ud]||{})[t]:null},i[Io]=function(t,n){if(t)if(t===e[dd])i[t]||(i[No]=function(){return!0}),i[t]=n;else if(t===e[fd])i[t]=n;else{var r=i[ud]=i[ud]||{};r[t]=n}},i.complete=function(){var t=0,n=i[Fo](e[fd]);if(R(n))for(var r=0;r>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var i=e[8+(gl()&3)|0];return Zn(t,0,8)+Zn(t,9,4)+`4`+Zn(t,13,3)+i+Zn(t,16,3)+Zn(t,19,12)}var bd=`00`,xd=`ff`,X=`00000000000000000000000000000000`,Sd=`0000000000000000`;function Cd(e,t,n){return e&&e.length===t&&e!==n?!!e.match(/^[\da-f]*$/i):!1}function wd(e,t,n){return Cd(e,t)?e:n}function Td(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[Wa]<2;)t=`0`+t;return t}function Ed(e,t,n,r){return{version:Cd(r,2,xd)?r:bd,traceId:Dd(e)?e:yd(),spanId:Od(t)?t:$n(yd(),16),traceFlags:n>=0&&n<=255?n:1}}function Dd(e){return Cd(e,32,X)}function Od(e){return Cd(e,16,Sd)}function kd(e){if(e){var t=Td(e[Bo]);Cd(t,2)||(t=`01`);var n=e.version||bd;return n!==`00`&&n!==`ff`&&(n=bd),`${n.toLowerCase()}-${wd(e.traceId,32,X).toLowerCase()}-${wd(e.spanId,16,Sd).toLowerCase()}-${t.toLowerCase()}`}return``}function Ad(e){var t=e.getElementsByTagName(`script`),n=[];return V(t,function(e){var t=e[Vo](`src`);if(t){var r=e[Vo](`crossorigin`),i=e.hasAttribute(`async`)===!0,a=e.hasAttribute(`defer`)===!0,o=e[Vo](`referrerpolicy`),s={url:t};r&&(s.crossOrigin=r),i&&(s.async=i),a&&(s.defer=a),o&&(s.referrerPolicy=o),n[U](s)}}),n}var jd=Tl(`plugin`);function Md(e){return jd.get(e,`state`,{},!0)}function Nd(e,t){for(var n=[],r=null,i=e[So](),a;i;){var o=i[io]();if(o){r&&r.setNextPlugin&&o.processTelemetry&&r[Co](o),a=Md(o);var s=!!a[no];o.isInitialized&&(s=o[no]()),s||n[U](o),r=o,i=i[So]()}}V(n,function(n){var r=e[Ds]();n[Qa](e.getCfg(),r,t,e[So]()),a=Md(n),!n.core&&!a.core&&(a[Ds]=r),a[no]=!0,delete a[go]})}function Pd(e){return e.sort(function(e,t){var n=0;if(t){var r=t[Ms];e.processTelemetry?n=r?e[Ns]-t[Ns]:1:r&&(n=-1)}else n=e?1:-1;return n})}function Fd(e){var t={};return{getName:function(){return t[ao]},setName:function(n){e&&e.setName(n),t[ao]=n},getTraceId:function(){return t.traceId},setTraceId:function(n){e&&e.setTraceId(n),Dd(n)&&(t.traceId=n)},getSpanId:function(){return t.spanId},setSpanId:function(n){e&&e.setSpanId(n),Od(n)&&(t.spanId=n)},getTraceFlags:function(){return t[Bo]},setTraceFlags:function(n){e&&e.setTraceFlags(n),t[Bo]=n}}}var Id=`TelemetryPluginChain`,Ld=`_hasRun`,Rd=`_getTelCtx`,zd=0;function Bd(e,t,n){for(;e;){if(e.getPlugin()===n)return e;e=e[So]()}return Gd([n],t.config||{},t)}function Vd(e,t,n,r){var i=null,a=[];t||=Xl({},null,n[Xa]),r!==null&&(i=r?Bd(e,n,r):e);var o={_next:c,ctx:{core:function(){return n},diagLog:function(){return wu(n,t.cfg)},getCfg:function(){return t.cfg},getExtCfg:u,getConfig:d,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(e){i=e},iterate:f,onComplete:s}};function s(e,t){var n=[...arguments].slice(2);e&&a[U]({func:e,self:Kt(t)?o.ctx:t,args:n})}function c(){var e=i;if(i=e?e[So]():null,!e){var t=a;t&&t.length>0&&(V(t,function(e){try{e.func.call(e.self,e.args)}catch(e){Y(n[Xa],2,73,`Unexpected Exception during onComplete - `+z(e))}}),a=[])}return e}function l(e,n){var r=null,i=t.cfg;if(i&&e){var a=i[As];!a&&n&&(a={}),i[As]=a,a=t.ref(i,As),a&&(r=a[e],!r&&n&&(r={}),a[e]=r,r=t.ref(a,e))}return r}function u(e,n){var r=l(e,!0);return n&&B(n,function(e,n){if(F(r[e])){var i=t.cfg[e];(i||!F(i))&&(r[e]=i)}kl(t,r,e,n)}),t.setDf(r,n)}function d(e,n,r){r===void 0&&(r=!1);var i,a=l(e,!1),o=t.cfg;return a&&(a[n]||!F(a[n]))?i=a[n]:(o[n]||!F(o[n]))&&(i=o[n]),i||!F(i)?i:r}function f(e){for(var t;t=o._next();){var n=t[io]();n&&e(n)}}return o}function Hd(e,t,n,r){var i=Xl(t),a=Vd(e,i,n,r),o=a.ctx;function s(e){var t=a._next();return t&&t[Ms](e,o),!t}function c(e,t){return e===void 0&&(e=null),R(e)&&(e=Gd(e,i.cfg,n,t)),Hd(e||o.getNext(),i.cfg,n,t)}return o[oo]=s,o[ho]=c,o}function Ud(e,t,n){var r=Xl(t.config),i=Vd(e,r,t,n),a=i.ctx;function o(e){var t=i._next();return t&&t.unload(a,e),!t}function s(e,n){return e===void 0&&(e=null),R(e)&&(e=Gd(e,r.cfg,t,n)),Ud(e||a.getNext(),t,n)}return a[oo]=o,a[ho]=s,a}function Wd(e,t,n){var r=Xl(t.config),i=Vd(e,r,t,n).ctx;function a(e){return i.iterate(function(t){L(t.update)&&t[xo](i,e)})}function o(e,n){return e===void 0&&(e=null),R(e)&&(e=Gd(e,r.cfg,t,n)),Wd(e||i.getNext(),t,n)}return i[oo]=a,i[ho]=o,i}function Gd(e,t,n,r){var i=null,a=!r;if(R(e)&&e.length>0){var o=null;V(e,function(e){if(!a&&r===e&&(a=!0),a&&e&&L(e.processTelemetry)){var s=Kd(e,t,n);i||=s,o&&o._setNext(s),o=s}})}return r&&!i?Gd([r],t,n):i}function Kd(e,t,n){var r=null,i=L(e[Ms]),a=L(e[Co]),o=e?e[$a]+`-`+e[Ns]+`-`+ zd++:`Unknown-0-`+ zd++,s={getPlugin:function(){return e},getNext:function(){return r},processTelemetry:u,unload:d,update:f,_id:o,_setNext:function(e){r=e}};function c(){var r;return e&&L(e[Rd])&&(r=e[Rd]()),r||=Hd(s,t,n),r}function l(t,n,i,a,s){var c=!1,l=e?e[$a]:Id,u=t[Ld];return u||=t[Ld]={},t.setNext(r),e&&_d(t[Ds](),function(){return l+`:`+i},function(){u[o]=!0;try{var e=r?r._id:``;e&&(u[e]=!1),c=n(t)}catch(e){var a=r?u[r._id]:!0;a&&(c=!0),(!r||!a)&&Y(t[yo](),1,73,`Plugin [`+l+`] failed during `+i+` - `+z(e)+`, run flags: `+z(u))}},a,s),c}function u(t,n){n||=c();function o(n){if(!e||!i)return!1;var o=Md(e);return o.teardown||o.disabled?!1:(a&&e[Co](r),e[Ms](t,n),!0)}l(n,o,`processTelemetry`,function(){return{item:t}},!t.sync)||n[oo](t)}function d(t,n){function r(){var r=!1;if(e){var i=Md(e),a=e.core||i.core;e&&(!a||a===t.core())&&!i.teardown&&(i[Ds]=null,i[go]=!0,i[no]=!1,e.teardown&&e.teardown(t,n)===!0&&(r=!0))}return r}l(t,r,`unload`,function(){},n.isAsync)||t[oo](n)}function f(t,n){function r(){var r=!1;if(e){var i=Md(e),a=e.core||i.core;e&&(!a||a===t.core())&&!i.teardown&&e.update&&e.update(t,n)===!0&&(r=!0)}return r}l(t,r,`update`,function(){},!1)||t[oo](n)}return In(s)}(function(){function e(e,t,n,r){var i=this,a=Hd(e,t,n,r);oc(i,a,Nn(a))}return e})();function qd(){var e=[];function t(t){t&&e[U](t)}function n(t,n){V(e,function(e){try{e(t,n)}catch(e){Y(t[yo](),2,73,`Unexpected error calling unload handler - `+z(e))}}),e=[]}return{add:t,run:n}}var Jd,Yd;function Xd(){var e=[];function t(t){var n=e;e=[],V(n,function(e){try{(e.rm||e.remove).call(e)}catch(e){Y(t,2,73,`Unloading:`+z(e))}}),Jd&&n.length>Jd&&(Yd?Yd(`doUnload`,n):Y(null,1,48,`Max unload hooks exceeded. An excessive number of unload hooks has been detected.`))}function n(t){t&&(Yr(e,t),Jd&&e.length>Jd&&(Yd?Yd(`Add`,e):Y(null,1,48,`Max unload hooks exceeded. An excessive number of unload hooks has been detected.`)))}return{run:t,add:n}}var Zd,Qd=`getPlugin`,$d=(Zd={},Zd[As]={isVal:Qs,v:{}},Zd),ef=function(){function e(){var t=this,n,r,i,a,o;l(),za(e,t,function(e){e[Qa]=function(e,t,r,i){c(e,t,i),n=!0},e[go]=function(t,n){var r=e[Ds];if(!r||t&&r!==t.core())return;var s,c=!1,u=t||Ud(null,r,i&&i[Qd]?i[Qd]():i),d=n||{reason:0,isAsync:!1};function f(){c||(c=!0,a.run(u,n),o.run(u[yo]()),s===!0&&u[oo](d),l())}return!e._doTeardown||e._doTeardown(u,d,f)!==!0?f():s=!0,s},e[xo]=function(t,n){var r=e[Ds];if(!r||t&&r!==t.core())return;var a,o=!1,s=t||Wd(null,r,i&&i[Qd]?i[Qd]():i),l=n||{reason:0};function u(){o||(o=!0,c(s.getCfg(),s.core(),s[So]()))}return!e._doUpdate||e._doUpdate(s,l,u)!==!0?u():a=!0,a},ac(e,`_addUnloadCb`,function(){return a},`add`),ac(e,`_addHook`,function(){return o},`add`),H(e,`_unloadHooks`,{g:function(){return o}})}),t[yo]=function(e){return s(e)[yo]()},t[no]=function(){return n},t.setInitialized=function(e){n=e},t[Co]=function(e){i=e},t[oo]=function(e,t){t?t[oo](e):i&&L(i.processTelemetry)&&i[Ms](e,null)},t._getTelCtx=s;function s(e){e===void 0&&(e=null);var n=e;if(!n){var a=r||Hd(null,{},t.core);n=i&&i[Qd]?a[ho](null,i[Qd]):a[ho](null,i)}return n}function c(e,n,a){Xl(e,$d,wu(n)),!a&&n&&(a=n[so]()[So]());var o=i;i&&i[Qd]&&(o=i[Qd]()),t[Ds]=n,r=Hd(a,e,n,o)}function l(){n=!1,t[Ds]=null,r=null,i=null,o=Xd(),a=qd()}}return e.__ieDyn=1,e}();function tf(e,t,n){var r={id:t,fn:n};return Yr(e,r),{remove:function(){V(e,function(t,n){if(t.id===r.id)return e[Ya](n,1),-1})}}}function nf(e,t,n){for(var r=!1,i=e[Wa],a=0;a`}})}var Sf=function(){function e(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,k,A,te,j;za(e,this,function(e){se(),e._getDbgPlgTargets=function(){return[C,i]},e[no]=function(){return n},e.activeStatus=function(){return E},e._setPendingStatus=function(){E=3},e[Qa]=function(i,o,s,c){p&&ln(cf),e.isInitialized()&&ln(`Core cannot be initialized more than once`),t=Xl(i,ff,s||e.logger,!1),i=t.cfg,ve(t[qa](function(e){var t=e.cfg;O=t.initInMemoMaxSize||uf,M(t);var n=e.ref(e.cfg,As);B(n,function(t){e.ref(n,t)})})),a=c,y=bf(t,v,a&&e.getNotifyMgr(),y),me(),e[Xa]=s;var l=i[js];if(u=[],u[U].apply(u,ta(ta([],o,!1),l,!1)),d=i[Es],ce(null),(!f||f.length===0)&&ln(`No `+Es+` available`),d&&d.length>1){var m=e[io](`TeeChannelController`);(!m||!m.plugin)&&Y(r,1,28,`TeeChannel required`)}yf(i,S,r),S=null,n=!0,E===Ha.ACTIVE&&ie()},e.getChannels=function(){var e=[];return f&&V(f,function(t){e[U](t)}),In(e)},e.track=function(t){_d(e[Vs](),function(){return`AppInsightsCore:track`},function(){t===null&&(_e(t),ln(`Invalid telemetry item`)),!t.name&&F(t.name)&&(_e(t),ln(`telemetry name required`)),t.iKey=t.iKey||x,t.time=t.time||tc(new Date),t.ver=t.ver||`4.0`,!p&&e.isInitialized()&&E===Ha.ACTIVE?N()[oo](t):E!==Ha.INACTIVE&&i.length<=O&&i[U](t)},function(){return{item:t}},!t.sync)},e[so]=N,e[ro]=function(){return a||(a=new ld(t.cfg),e[sf]=a),a},e[to]=function(t){e.getNotifyMgr()[to](t)},e[eo]=function(e){a&&a[eo](e)},e.getCookieMgr=function(){return c||=Qu(t.cfg,e[Xa]),c},e.setCookieMgr=function(e){c!==e&&(Ql(c,!1),c=e)},e[Vs]=function(){return o||s||vd()},e.setPerfMgr=function(e){o=e},e.eventCnt=function(){return i[Wa]},e.releaseQueue=function(){if(n&&i.length>0){var e=i;i=[],E===2?V(e,function(e){e.iKey=e.iKey||x,N()[oo](e)}):Y(r,2,20,`core init status is not active`)}},e.pollInternalLogs=function(e){return h=e||null,j=!1,A&&A.cancel(),ae(!0)};function M(e){var t=e.instrumentationKey,i=e.endpointUrl;if(E!==3){if(F(t)){x=null,E=Ha.INACTIVE;var a=`Please provide instrumentation key`;n?(Y(r,1,100,a),ie()):ln(a);return}var o=[];nn(t)?(o[U](t),x=null):x=t,nn(i)?(o[U](i),D=null):D=i,o.length?ne(e,o):re()}}function ne(e,t){ee=!1,E=3;var n=Qs(e.initTimeOut)?e.initTimeOut:df,r=Ss(t);k&&k[Za](),k=Yi(function(){k=null,ee||re()},n),Ko(r,function(t){try{if(ee)return;if(!t.rejected){var n=t[co];if(n&&n.length){var r=n[0];if(x=r&&r.value,n.length>1){var i=n[1];D=i&&i.value}}x&&(e.instrumentationKey=x,e.endpointUrl=D)}re()}catch{ee||re()}})}function re(){ee=!0,F(x)?(E=Ha.INACTIVE,Y(r,1,112,`ikey can't be resolved from promises`)):E=Ha.ACTIVE,ie()}function ie(){n&&(e.releaseQueue(),e.pollInternalLogs())}function ae(e){return(!A||!A.enabled)&&!j&&(e||r&&r.queue.length>0)&&(te||(te=!0,ve(t[qa](function(e){var t=e.cfg.diagnosticLogInterval;(!t||!(t>0))&&(t=1e4);var n=!1;A&&(n=A[W],A[Za]()),A=Xi(fe,t),A.unref(),A[W]=n}))),A[W]=!0),A}e[lo]=function(){j=!0,A&&A.cancel(),fe()},oc(e,function(){return m},[`addTelemetryInitializer`]),e[uo]=function(t,i,o){t===void 0&&(t=!0),n||ln(lf),p&&ln(cf);var s={reason:50,isAsync:t,flushComplete:!1},l;t&&!i&&(l=ws(function(e){i=e}));var u=Ud(ue(),e);u[fo](function(){v.run(e[Xa]),$l([c,a,r],t,function(){se(),i&&i(s)})},e);function d(t){s.flushComplete=t,p=!0,_.run(u,s),e[lo](),u[oo](s)}return fe(),pe(t,d,6,o)||d(!1),l},e[io]=le,e.addPlugin=function(e,t,n,r){if(!e){r&&r(!1),ge(of);return}var i=le(e[$a]);if(i&&!t){r&&r(!1),ge(`Plugin [`+e[$a]+`] is already loaded!`);return}var a={reason:16};function o(t){u[U](e),a.added=[e],ce(a),r&&r(!0)}if(i){var s=[i.plugin];de(s,{reason:2,isAsync:!!n},function(e){e?(a.removed=s,a.reason|=32,o(!0)):r&&r(!1)})}else o(!1)},e.updateCfg=function(n,r){r===void 0&&(r=!0);var i;if(e.isInitialized()){i={reason:1,cfg:t.cfg,oldCfg:Di({},t.cfg),newConfig:Di({},n),merge:r},n=i.newConfig;var a=t.cfg;n[js]=a[js],n[Es]=a[Es]}t._block(function(e){var t=e.cfg;gf(e,t,n,r),r||B(t,function(r){hn(n,r)||e.set(t,r,void 0)}),e.setDf(t,ff)},!0),t.notify(),i&&he(i)},e.evtNamespace=function(){return g},e.flush=pe,e.getTraceCtx=function(e){return b||=Fd(),b},e.setTraceCtx=function(e){b=e||null},e.addUnloadHook=ve,ac(e,`addUnloadCb`,function(){return _},`add`),e.onCfgChange=function(r){return xf(n?Zl(t.cfg,r,e[Xa]):vf(S,r))},e.getWParam=function(){return Er()||t.cfg.enableWParam?0:-1};function oe(){var e={};w=[];var t=function(t){t&&V(t,function(t){if(t.identifier&&t.version&&!e[t.identifier]){var n=t[$a]+`=`+t[po];w[U](n),e[t.identifier]=t}})};t(f),d&&V(d,function(e){t(e)}),t(u)}function se(){n=!1,t=Xl({},ff,e[Xa]),t.cfg[mo]=1,H(e,`config`,{g:function(){return t.cfg},s:function(t){e.updateCfg(t,!1)}}),H(e,`pluginVersionStringArr`,{g:function(){return w||oe(),w}}),H(e,`pluginVersionString`,{g:function(){return T||=(w||oe(),w.join(`;`)),T||``}}),H(e,`logger`,{g:function(){return r||(r=new Tu(t.cfg),t[Xa]=r),r},s:function(e){t[Xa]=e,r!==e&&(Ql(r,!1),r=e)}}),e[Xa]=new Tu(t.cfg),C=[];var y=e.config.extensions||[];y.splice(0,y[Wa]),Yr(y,C),m=new rf,i=[],Ql(a,!1),a=null,o=null,s=null,Ql(c,!1),c=null,l=null,u=[],d=null,f=null,p=!1,h=null,g=wl(`AIBaseCore`,!0),_=qd(),b=null,x=null,v=Xd(),S=[],T=null,w=null,j=!1,A=null,te=!1,E=0,D=null,O=null,ee=!1,k=null}function N(){var n=Hd(ue(),t.cfg,e);return n[fo](ae),n}function ce(t){var n=mf(e[Xa],500,u);l=null,T=null,w=null,f=(d||[])[0]||[],f=Pd(Yr(f,n[Es]));var r=Yr(Pd(n[Ds]),f);C=In(r);var i=e.config.extensions||[];i.splice(0,i[Wa]),Yr(i,C);var a=N();f&&f.length>0&&Nd(a[ho](f),r),Nd(a,r),t&&he(t)}function le(e){var t=null,n=null,r=[];return V(C,function(t){if(t.identifier===e&&t!==m)return n=t,-1;t.getChannel&&r[U](t)}),!n&&r.length>0&&V(r,function(t){if(n=t.getChannel(e),!n)return-1}),n&&(t={plugin:n,setEnabled:function(e){Md(n)[ks]=!e},isEnabled:function(){var e=Md(n);return!e.teardown&&!e.disabled},remove:function(e,t){e===void 0&&(e=!0);var r=[n];de(r,{reason:1,isAsync:e},function(e){e&&ce({reason:32,removed:r}),t&&t(e)})}}),t}function ue(){if(!l){var n=(C||[]).slice();Xr(n,m)===-1&&n[U](m),l=Gd(Pd(n),t.cfg,e)}return l}function de(n,r,i){if(n&&n.length>0){var a=Ud(Gd(n,t.cfg,e),e);a[fo](function(){var e=!1,t=[];V(u,function(r,i){hf(r,n)?e=!0:t[U](r)}),u=t,T=null,w=null;var r=[];d&&=(V(d,function(t,i){var a=[];V(t,function(t){hf(t,n)?e=!0:a[U](t)}),r[U](a)}),r),i&&i(e),ae()}),a[oo](r)}else i(!1)}function fe(){if(r&&r.queue){var t=r.queue.slice(0);r.queue[Wa]=0,V(t,function(t){var n={name:h||`InternalMessageId: `+t[_o],iKey:x,time:tc(new Date),baseType:Cu.dataType,baseData:{message:t[vo]}};e.track(n)})}}function pe(e,t,n,r){var i=1,a=!1,o=null;r||=5e3;function s(){i--,a&&i===0&&(o&&o.cancel(),o=null,t&&t(a),t=null)}return f&&f.length>0&&N()[ho](f).iterate(function(t){if(t.flush){i++;var a=!1;t.flush(e,function(){a=!0,s()},n)||a||(e&&o==null?o=Yi(function(){o=null,s()},r):s())}}),a=!0,s(),!0}function me(){var n;ve(t[qa](function(t){if(t.cfg.enablePerfMgr){var r=t.cfg[Os];(n!==r||!n)&&(r||=pf,nc(t.cfg,Os,r),n=r,s=null),!o&&!s&&L(r)&&(s=r(e,e[ro]()))}else s=null,n=null}))}function he(t){var n=Wd(ue(),e);n[fo](ae),(!e._updateHook||e._updateHook(n,t)!==!0)&&n[oo](t)}function ge(t){var n=e[Xa];n?(Y(n,2,73,t),ae()):ln(t)}function _e(t){var n=e[ro]();n&&n[Fs]([t],2)}function ve(e){v.add(e)}})}return e.__ieDyn=1,e}();function Cf(e,t){try{if(e&&e!==``){var n=Wc().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){Y(t,1,43,`Cannot parse the response. `+(n.name||z(n)),{response:e})}return null}var wf=``,Tf=`&NoResponseBody=true`,Ef=`POST`,Df=function(){function e(){var t=0,n,r,i,a,o,s,c,l,u,d,f,p,m,h;za(e,this,function(e,g){var _=!0;O(),e[Qa]=function(t,n){i=n,r&&Y(i,1,28,`Sender is already initialized`),e.SetConfig(t),r=!0},e._getDbgPlgTargets=function(){return[r,a,s,n]},e.SetConfig=function(e){try{if(o=e.senderOnCompleteCallBack||{},s=!!e.disableCredentials,c=e.fetchCredentials,a=!!e.isOneDs,n=!!e.enableSendPromise,u=!!e.disableXhr,d=!!e.disableBeacon,f=!!e.disableBeaconSync,h=e.timeWrapper,m=!!e.addNoResponse,p=!!e.disableFetchKeepAlive,l={sendPOST:T},a||(_=!1),s){var t=Vc();t&&t.protocol&&t.protocol.toLowerCase()===`file:`&&(_=!1)}return!0}catch{}return!1},e.getSyncFetchPayload=function(){return t},e.getSenderInst=function(e,t){return e&&e.length?x(e,t):null},e.getFallbackInst=function(){return l},e[bo]=function(e,t){O()},e.preparePayload=function(e,t,n,r){if(!t||r||!n.data){e(n);return}try{var i=Tr(`CompressionStream`);if(!L(i)){e(n);return}var a=new ReadableStream({start:function(e){e.enqueue(I(n.data)?new TextEncoder().encode(n[Po]):n[Po]),e.close()}}).pipeThrough(new i(`gzip`)).getReader(),o=[],s=0,c=!1;return Ko(a.read(),function t(r){if(!c&&!r.rejected){var i=r[co];if(!i.done)return o[U](i[co]),s+=i.value[Wa],Ko(a.read(),t);for(var l=new Uint8Array(s),u=0,d=0,f=o;d0&&(V(Nn(w),function(e){v.append(e,w[e])}),T[Lo]=v),c?T.credentials=c:_&&a&&(T.credentials=`include`),i&&(T.keepalive=!0,t+=y,a?e._sendReason===2&&(x=!0,m&&(l+=Tf)):x=!0);var E=new Request(l,T);try{E[eu]=!0}catch{}if(!i&&n&&(f=ws(function(e,t){p=e,g=t})),!l){b(r),p&&p(!1);return}function D(e,t){t?S(r,a?0:t,{},a?wf:e):S(r,a?0:400,{},a?wf:e)}function O(e,t,n){var i=e[jo],a=o.fetchOnComplete;a&&L(a)?a(e,r,n||wf,t):S(r,i,{},n||wf)}try{Ko(fetch(a?l:E,a?T:null),function(n){if(i&&(t-=y,y=0),!C)if(C=!0,n.rejected)D(n.reason&&n.reason.message,499),g&&g(n.reason);else{var r=n[co];try{!a&&!r.ok?(r.status?D(r.statusText,r[jo]):D(r.statusText,499),p&&p(!1)):a&&!r.body?(O(r,null,wf),p&&p(!0)):Ko(r.text(),function(t){O(r,e,t[co]),p&&p(!0)})}catch(e){r&&r.status?D(z(e),r[jo]):D(z(e),499),g&&g(e)}}})}catch(e){C||(D(z(e),499),g&&g(e))}return x&&!C&&(C=!0,S(r,200,{}),p&&p(!0)),a&&!C&&e.timeout>0&&h&&h.set(function(){C||(C=!0,S(r,500,{}),p&&p(!0))},e.timeout),f}function D(e,t,n){var r=kr(),s=new XDomainRequest,c=e[Po];s.onload=function(){var n=dc(s),r=o&&o.xdrOnComplete;r&&L(r)?r(s,t,e):S(t,200,{},n)},s.onerror=function(){S(t,400,{},a?wf:fc(s))},s.ontimeout=function(){S(t,500,{})},s.onprogress=function(){};var l=r&&r.location&&r.location.protocol||``,u=e[Ro];if(!u){b(t);return}if(!a&&u.lastIndexOf(l,0)!==0){var d=`Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.`;Y(i,2,40,`. `+d),y(d,t);return}var f=a?u:u[Eo](/^(https?:)/,``);s.open(Ef,f),e.timeout&&(s[zo]=e[zo]),s.send(c),a&&n?h&&h.set(function(){s.send(c)},0):s.send(c)}function O(){t=0,r=!1,n=!1,i=null,a=null,o=null,s=null,c=null,l=null,u=!1,d=!1,f=!1,p=!1,m=!1,h=null}})}return e.__ieDyn=1,e}(),Of=`on`,kf=`attachEvent`,Af=`addEventListener`,jf=`detachEvent`,Mf=`removeEventListener`,Nf=`events`,Pf=`visibilitychange`,Ff=`pagehide`,If=`unload`,Lf=`beforeunload`,Rf=wl(`aiEvtPageHide`);wl(`aiEvtPageShow`);var zf=/\.[\.]+/g,Bf=/[\.]+$/,Vf=1,Hf=Tl(`events`),Uf=/^([^.]*)(?:\.(.+)|)/;function Wf(e){return e&&e.replace?e[Eo](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,``):e}function Gf(e,t){if(t){var n=``;R(t)?(n=``,V(t,function(e){e=Wf(e),e&&(e[0]!==`.`&&(e=`.`+e),n+=e)})):n=Wf(t),n&&(n[0]!==`.`&&(n=`.`+n),e=(e||``)+n)}var r=Uf.exec(e||``)||[];return{type:r[1],ns:(r[2]||``).replace(zf,`.`).replace(Bf,``)[To](`.`).sort().join(`.`)}}function Kf(e,t,n){n===void 0&&(n=!0);var r=Hf.get(e,Nf,{},n),i=r[t];return i||=r[t]=[],i}function qf(e,t,n,r){e&&t&&t.type&&(e[Mf]?e[Mf](t[ko],n,r):e[jf]&&e[jf](Of+t[ko],n))}function Jf(e,t,n,r){var i=!1;return e&&t&&t.type&&n&&(e[Af]?(e[Af](t[ko],n,r),i=!0):e[kf]&&(e[kf](Of+t[ko],n),i=!0)),i}function Yf(e,t,n,r){for(var i=t[Wa];i--;){var a=t[i];a&&(!n.ns||n.ns===a.evtName.ns)&&(!r||r(a))&&(qf(e,a[Ao],a.handler,a.capture),t[Ya](i,1))}}function Xf(e,t,n){if(t.type)Yf(e,Kf(e,t[ko]),t,n);else{var r=Hf.get(e,Nf,{});B(r,function(r,i){Yf(e,i,t,n)}),Nn(r).length===0&&Hf.kill(e,Nf)}}function Zf(e,t){var n;return t?(n=R(t)?[e].concat(t):[e,t],n=Gf(`xx`,n).ns[To](`.`)):n=e,n}function Qf(e,t,n,r,i){i===void 0&&(i=!1);var a=!1;if(e)try{var o=Gf(t,r);if(a=Jf(e,o,n,i),a&&Hf.accept(e)){var s={guid:Vf++,evtName:o,handler:n,capture:i};Kf(e,o.type)[U](s)}}catch{}return a}function $f(e,t,n,r,i){if(i===void 0&&(i=!1),e)try{var a=Gf(t,r),o=!1;Xf(e,a,function(e){return a.ns&&!n||e.handler===n?(o=!0,!0):!1}),o||qf(e,a,n,i)}catch{}}function ep(e,t,n){var r=!1,i=kr();i&&(r=Qf(i,e,t,n),r=Qf(i.body,e,t,n)||r);var a=Dr();return a&&(r=Qf(a,e,t,n)||r),r}function tp(e,t,n){var r=kr();r&&($f(r,e,t,n),$f(r.body,e,t,n));var i=Dr();i&&$f(i,e,t,n)}function np(e,t,n,r){var i=!1;return t&&e&&e.length>0&&V(e,function(e){e&&(!n||Xr(n,e)===-1)&&(i=ep(e,t,r)||i)}),i}function rp(e,t,n,r){var i=!1;return t&&e&&R(e)&&(i=np(e,t,n,r),!i&&n&&n.length>0&&(i=np(e,t,null,r))),i}function ip(e,t,n){e&&R(e)&&V(e,function(e){e&&tp(e,t,n)})}function ap(e,t,n){return rp([Lf,If,Ff],e,t,n)}function op(e,t){ip([Lf,If,Ff],e,t)}function sp(e,t,n){function r(t){var n=Dr();e&&n&&n.visibilityState===`hidden`&&e(t)}var i=Zf(Rf,n),a=np([Ff],e,t,i);return(!t||Xr(t,Pf)===-1)&&(a=np([Pf],r,t,i)||a),!a&&t&&(a=sp(e,null,n)),a}function cp(e,t){var n=Zf(Rf,t);ip([Ff],e,n),ip([Pf],null,n)}var lp=`_aiHooks`,up=[`req`,`rsp`,`hkErr`,`fnErr`];function dp(e,t){if(e)for(var n=0;n=0&&i<=2&&dp(e,function(e,a){var o=e.cbks,s=o[up[i]];if(s){t.ctx=function(){return r[a]=r[a]||{}};try{s[Ja](t.inst,n)}catch(e){var c=t.err;try{var l=o[up[2]];l&&(t.err=e,l[Ja](t.inst,n))}catch{}finally{t.err=c}}}})}function pp(e){return function(){var t=this,n=arguments,r=e.h,i={name:e.n,inst:t,ctx:null,set:c},a=[],o=s([i],n);i.evt=Tr(`event`);function s(e,t){return dp(t,function(t){e[U](t)}),e}function c(e,t){n=s([],n),n[e]=t,o=s([i],n)}fp(r,i,o,a,0);var l=e.f;if(l)try{i.rslt=l[Ja](t,n)}catch(e){throw i.err=e,fp(r,i,o,a,3),e}return fp(r,i,o,a,1),i.rslt}}function mp(e,t,n,r){var i=null;return e&&(pn(e,t)?i=e:n&&(i=mp(Zs(e),t,r,!1))),i}function hp(e,t,n){return e?_p(e[ut],t,n,!1):null}function gp(e,t,n,r){var i=n&&n[lp];if(!i){i={i:0,n:t,f:n,h:[]};var a=pp(i);a[lp]=i,e[t]=a}var o={id:i.i,cbks:r,rm:function(){var e=this.id;dp(i.h,function(t,n){if(t.id===e)return i.h[Ya](n,1),1})}};return i.i++,i.h[U](o),o}function _p(e,t,n,r,i){if(r===void 0&&(r=!0),e&&t&&n){var a=mp(e,t,r,i);if(a){var o=a[t];if(typeof o==`function`)return gp(a,t,o,n)}}return null}function vp(e,t,n,r,i){if(e&&t&&n){var a=mp(e,t,r,i)||e;if(a)return gp(a,t,a[t],n)}return null}var yp=`Microsoft_ApplicationInsights_BypassAjaxInstrumentation`,bp=`sampleRate`,xp=`ProcessLegacy`,Sp=`http.method`,Cp=`https://dc.services.visualstudio.com`,wp=`/v2/track`,Tp=`iKey`,Ep=Va({requestContextHeader:[0,`Request-Context`],requestContextTargetKey:[1,`appId`],requestContextAppIdFormat:[2,`appId=cid-v1:`],requestIdHeader:[3,`Request-Id`],traceParentHeader:[4,`traceparent`],traceStateHeader:[5,`tracestate`],sdkContextHeader:[6,`Sdk-Context`],sdkContextHeaderAppIdRequest:[7,`appId`],requestContextHeaderLowerCase:[8,`request-context`]}),Dp=`split`,Op=`length`,kp=`toLowerCase`,Ap=`ingestionendpoint`,jp=`toString`,Mp=`removeItem`,Np=`message`,Pp=`count`,Fp=`preTriggerDate`,Ip=`getUTCDate`,Lp=`stringify`,Rp=`pathname`,zp=`match`,Bp=`name`,Vp=`properties`,Hp=`measurements`,Up=`sizeInBytes`,Wp=`typeName`,Gp=`exceptions`,Kp=`severityLevel`,qp=`problemGroup`,Jp=`hasFullStack`,Yp=`assembly`,Xp=`fileName`,Zp=`line`,Qp=`aiDataContract`,$p=`duration`;function em(e,t,n){var r=t[Op],i=tm(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==void 0;)a++,o=Xn(i,0,147)+um(a);i=o}return i}function tm(e,t){var n;return t&&(t=li(sn(t)),t.length>150&&(n=Xn(t,0,150),Y(e,2,57,`name is too long. It has been truncated to 150 characters.`,{name:t},!0))),n||t}function nm(e,t,n){n===void 0&&(n=1024);var r;return t&&(n||=1024,t=li(sn(t)),t.length>n&&(r=Xn(t,0,n),Y(e,2,61,`string value is too long. It has been truncated to `+n+` characters.`,{value:t},!0))),r||t}function rm(e,t,n){return I(t)&&(t=al(t,n)),lm(e,t,2048,66)}function im(e,t){var n;return t&&t.length>32768&&(n=Xn(t,0,32768),Y(e,2,56,`message is too long, it has been truncated to 32768 characters.`,{message:t},!0)),n||t}function am(e,t){var n;if(t){var r=``+t;r.length>32768&&(n=Xn(r,0,32768),Y(e,2,52,`exception is too long, it has been truncated to 32768 characters.`,{exception:t},!0))}return n||t}function om(e,t){if(t){var n={};B(t,function(t,r){if(Zt(r)&&Uc())try{r=Wc()[Lp](r)}catch(t){Y(e,2,49,`custom property is not valid`,{exception:t},!0)}r=nm(e,r,8192),t=em(e,t,n),n[t]=r}),t=n}return t}function sm(e,t){if(t){var n={};B(t,function(t,r){t=em(e,t,n),n[t]=r}),t=n}return t}function cm(e,t){return t&&lm(e,t,128,69)[jp]()}function lm(e,t,n,r){var i;return t&&(t=li(sn(t)),t.length>n&&(i=Xn(t,0,n),Y(e,2,r,`input is too long, it has been truncated to `+n+` characters.`,{data:t},!0))),i||t}function um(e){var t=`00`+e;return Zn(t,t[Op]-3)}var dm=Dr()||{},fm=0,pm=[null,null,null,null,null];function mm(e){var t=fm,n=pm,r=n[t];return dm.createElement?n[t]||(r=n[t]=dm.createElement(`a`)):r={host:_m(e,!0)},r.href=e,t++,t>=n.length&&(t=0),fm=t,r}function hm(e){var t,n=mm(e);return n&&(t=n.href),t}function gm(e,t){return e?e.toUpperCase()+` `+t:t}function _m(e,t){var n=vm(e,t)||``;if(n){var r=n[zp](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r.length>3&&I(r[2])&&r[2].length>0)return r[2]+(r[3]||``)}return n}function vm(e,t){var n=null;if(e){var r=e[zp](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r.length>2&&I(r[2])&&r[2].length>0&&(n=r[2]||``,t&&r.length>2)){var i=(r[1]||``)[kp](),a=r[3]||``;(i===`http`&&a===`:80`||i===`https`&&a===`:443`)&&(a=``),n+=a}}return n}var ym=[Cp+wp,`https://breeze.aimon.applicationinsights.io`+wp,`https://dc-int.services.visualstudio.com`+wp],bm=`cid-v1:`;function xm(e){return Xr(ym,e[kp]())!==-1}function Sm(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns){for(var r=0;r0}function Cm(e){if(e){var t=wm(e,Ep[1]);if(t&&t!==bm)return t}}function wm(e,t){if(e)for(var n=e[Dp](`,`),r=0;r0){var s=mm(t);if(i=s.host,!a)if(s.pathname!=null){var c=s.pathname.length===0?`/`:s[Rp];c.charAt(0)!==`/`&&(c=`/`+c),o=s[Rp],a=nm(e,n?n+` `+c:c)}else a=nm(e,t)}else i=r,a=r;return{target:i,name:a,data:o}}function Em(){var e=Ni();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0)return t}return rr()}function Dm(e,t){var n=null;return e!==0&&t!==0&&!F(e)&&!F(t)&&(n=t-e),n}function Om(e,t){var n=e||{};return{getName:function(){return n[Bp]},setName:function(e){t&&t.setName(e),n[Bp]=e},getTraceId:function(){return n.traceID},setTraceId:function(e){t&&t.setTraceId(e),Dd(e)&&(n.traceID=e)},getSpanId:function(){return n.parentID},setSpanId:function(e){t&&t.setSpanId(e),Od(e)&&(n.parentID=e)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(e){t&&t.setTraceFlags(e),n.traceFlags=e}}}var km=Ba({LocalStorage:0,SessionStorage:1}),Am=void 0,jm=void 0,Mm=``;function Nm(){return zm()?Pm(km.LocalStorage):null}function Pm(e){try{if(F(wr()))return null;var t=new Date()[jp](),n=Tr(e===km.LocalStorage?`localStorage`:`sessionStorage`),r=Mm+t;n.setItem(r,t);var i=n.getItem(r)!==t;if(n[Mp](r),!i)return n}catch{}return null}function Fm(){return Um()?Pm(km.SessionStorage):null}function Im(){Am=!1,jm=!1}function Lm(e){Mm=e||``}function Rm(){Am=zm(!0),jm=Um(!0)}function zm(e){return(e||Am===void 0)&&(Am=!!Pm(km.LocalStorage)),Am}function Bm(e,t){var n=Nm();if(n!==null)try{return n.getItem(t)}catch(t){Am=!1,Y(e,2,1,`Browser failed read of local storage. `+G(t),{exception:z(t)})}return null}function Vm(e,t,n){var r=Nm();if(r!==null)try{return r.setItem(t,n),!0}catch(t){Am=!1,Y(e,2,3,`Browser failed write to local storage. `+G(t),{exception:z(t)})}return!1}function Hm(e,t){var n=Nm();if(n!==null)try{return n[Mp](t),!0}catch(t){Am=!1,Y(e,2,5,`Browser failed removal of local storage item. `+G(t),{exception:z(t)})}return!1}function Um(e){return(e||jm===void 0)&&(jm=!!Pm(km.SessionStorage)),jm}function Wm(e,t){var n=Fm();if(n!==null)try{return n.getItem(t)}catch(t){jm=!1,Y(e,2,2,`Browser failed read of session storage. `+G(t),{exception:z(t)})}return null}function Gm(e,t,n){var r=Fm();if(r!==null)try{return r.setItem(t,n),!0}catch(t){jm=!1,Y(e,2,4,`Browser failed write to session storage. `+G(t),{exception:z(t)})}return!1}function Km(e,t){var n=Fm();if(n!==null)try{return n[Mp](t),!0}catch(t){jm=!1,Y(e,2,6,`Browser failed removal of session storage item. `+G(t),{exception:z(t)})}return!1}var qm=`appInsightsThrottle`,Jm=function(){function e(e,t){var n=this,r,i,a,o,s,c,l,u=!1,d=!1;p(),n._getDbgPlgTargets=function(){return[l]},n.getConfig=function(){return a},n.canThrottle=function(e){var t=E(e);return _(m(e),r,t)},n.isTriggered=function(e){return D(e)},n.isReady=function(){return u},n.flush=function(e){try{var t=O(e);if(t&&t.length>0){var n=t.slice(0);return l[e]=[],V(n,function(e){f(e.msgID,e[Np],e.severity,!1)}),!0}}catch{}return!1},n.flushAll=function(){try{if(l){var e=!0;return B(l,function(t){var r=n.flush(parseInt(t));e&&=r}),e}}catch{}return!1},n.onReadyState=function(e,t){return t===void 0&&(t=!0),u=F(e)?!0:e,u&&t?n.flushAll():null},n.sendMessage=function(e,t,n){return f(e,t,n,!0)};function f(e,t,n,a){if(u){if(!T(e))return;var o=m(e),c=E(e),l=_(o,r,c),d=!1,f=0,p=D(e);try{l&&!p?(f=qn(o.limit.maxSendNumber,c[Pp]+1),c[Pp]=0,d=!0,s[e]=!0,c[Fp]=new Date):(s[e]=l,c[Pp]+=1);var h=v(e);S(i,h,c);for(var g=0;g0,r.interval=g(i),r.limit={samplingRate:n.limit?.samplingRate||100,maxSendNumber:n.limit?.maxSendNumber||1},a[e]=r}catch{}}function g(e){e||={};var t=e?.monthInterval,n=e?.dayInterval;return F(t)&&F(n)&&(e.monthInterval=3,d||=(e.daysOfMonth=[28],!0)),e={monthInterval:e?.monthInterval,dayInterval:e?.dayInterval,daysOfMonth:e?.daysOfMonth},e}function _(e,t,n){if(e&&!e.disabled&&t&&Qs(n)){var r=x(),i=n.date,a=e.interval,o=1;if(a?.monthInterval){var s=(r.getUTCFullYear()-i.getUTCFullYear())*12+r.getUTCMonth()-i.getUTCMonth();o=C(a.monthInterval,0,s)}var c=1;if(d)c=Xr(a.daysOfMonth,r[Ip]());else if(a?.dayInterval){var l=ui((r.getTime()-i.getTime())/864e5);c=C(a.dayInterval,0,l)}return o>=0&&c>=0}return!1}function v(e,t){var n=Qs(t)?t:``;return e?qm+n+`-`+e:null}function y(e){try{if(e){var t=new Date;return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}}catch{}return!1}function b(e,t,n){try{var r={date:x(),count:0};if(e){var i=JSON.parse(e);return{date:x(i.date)||r.date,count:i.count||r.count,preTriggerDate:i.preTriggerDate?x(i[Fp]):void 0}}else return S(t,n,r),r}catch{}return null}function x(e){try{if(e){var t=new Date(e);if(!isNaN(t.getDate()))return t}else return new Date}catch{}return null}function S(e,t,n){try{return Vm(e,t,li(JSON[Lp](n)))}catch{}return!1}function C(e,t,n){return e<=0?1:n>=t&&(n-t)%e==0?ui((n-t)/e)+1:-1}function w(e,t,n,r){Y(t,r||1,e,n)}function T(e){try{var t=m(e);return hl(1e6)<=t.limit.samplingRate}catch{}return!1}function E(e){try{var t=o[e];if(!t){var n=v(e,c);t=b(Bm(i,n),i,n),o[e]=t}return o[e]}catch{}return null}function D(e){var t=s[e];if(F(t)){t=!1;var n=E(e);n&&(t=y(n[Fp])),s[e]=t}return s[e]}function O(e){return l||={},F(l[e])&&(l[e]=[]),l[e]}}return e}(),Ym=`;`,Xm=`=`;function Zm(e){if(!e)return{};var t=$r(e[Dp](Ym),function(e,t){var n=t[Dp](Xm);if(n.length===2){var r=n[0][kp]();e[r]=n[1]}return e},{});if(Nn(t).length>0){if(t.endpointsuffix){var n=t.location?t.location+`.`:``;t[Ap]=t.ingestionendpoint||`https://`+n+`dc.`+t.endpointsuffix}t[Ap]=t.ingestionendpoint||`https://dc.services.visualstudio.com`,Ii(t.ingestionendpoint,`/`)&&(t[Ap]=t[Ap].slice(0,-1))}return t}var Qm=function(){function e(e,t,n){var r=this,i=this;i.ver=1,i.sampleRate=100,i.tags={},i[Bp]=nm(e,n)||`not_specified`,i.data=t,i.time=tc(new Date),i[Qp]={time:1,iKey:1,name:1,sampleRate:function(){return r.sampleRate===100?4:1},tags:1,data:1}}return e}(),$m=function(){function e(e,t,n,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var i=this;i.ver=2,i[Bp]=nm(e,t)||`not_specified`,i[Vp]=om(e,n),i[Hp]=sm(e,r)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Event`,e.dataType=`EventData`,e}(),eh=58,th=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,nh=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,rh=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,ih=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,ah=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,oh=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,sh=/([^\(\s\n]+):([0-9]+)$/,ch=``,lh=`error`,uh=`stack`,dh=`stackDetails`,fh=`errorSrc`,ph=`message`,mh=`description`,hh=[{re:nh,len:5,m:1,fn:2,ln:3,col:4},{chk:_h,pre:gh,re:rh,len:4,m:1,fn:2,ln:3},{re:ih,len:3,m:1,fn:2,hdl:Ih},{re:ah,len:2,fn:1,hdl:Ih}];function gh(e){return e.replace(/(\(anonymous\))/,``)}function _h(e){return Ri(e,`[native`)<0}function vh(e,t){var n=e;return n&&!I(n)&&(JSON&&JSON.stringify?(n=JSON[Lp](e),t&&(!n||n===`{}`)&&(n=L(e.toString)?e[jp]():``+e)):n=``+e+` - (Missing JSON.stringify)`),n||``}function yh(e,t){var n=e;return e&&(n&&!I(n)&&(n=e[ph]||e[mh]||n),n&&!I(n)&&(n=vh(n,!0)),e.filename&&(n=n+` @`+(e.filename||``)+`:`+(e.lineno||`?`)+`:`+(e.colno||`?`))),t&&t!==`String`&&t!==`Object`&&t!==`Error`&&Ri(n||``,t)===-1&&(n=t+`: `+n),n||``}function bh(e){try{if(Zt(e))return`hasFullStack`in e&&`typeName`in e}catch{}return!1}function xh(e){try{if(Zt(e))return`ver`in e&&`exceptions`in e&&`properties`in e}catch{}return!1}function Sh(e){return e&&e.src&&I(e.src)&&e.obj&&R(e.obj)}function Ch(e){var t=e||``;I(t)||(t=I(t[uh])?t[uh]:``+t);var n=t[Dp](` -`);return{src:t,obj:n}}function wh(e){for(var t=[],n=e[Dp](` -`),r=0;r0){t=[];var r=0,i=!1,a=0;V(n,function(e){if(i||Lh(e)){var n=sn(e);i=!0;var o=zh(n,r);o&&(a+=o[Up],t.push(o),r++)}});var o=32*1024;if(a>o)for(var s=0,c=t[Op]-1,l=0,u=s,d=c;so){var m=d-u+1;t.splice(u,m);break}u=s,d=c,s++,c--}}return t}function Oh(e){var t=``;if(e&&(t=e.typeName||e.name||``,!t))try{var n=/function (.{1,200})\(/.exec(e.constructor[jp]());t=n&&n.length>1?n[1]:``}catch{}return t}function kh(e){if(e)try{if(!I(e)){var t=Oh(e),n=vh(e,!1);return(!n||n===`{}`)&&(e[lh]&&(e=e[lh],t=Oh(e)),n=vh(e,!0)),Ri(n,t)!==0&&t!==`String`?t+`:`+n:n}}catch{}return``+(e||``)}var Ah=function(){function e(e,t,n,r,i,a){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var o=this;o.ver=2,xh(t)?(o[Gp]=t.exceptions||[],o[Vp]=t[Vp],o[Hp]=t[Hp],t.severityLevel&&(o[Kp]=t[Kp]),t.id&&(o.id=t.id,t[Vp].id=t.id),t.problemGroup&&(o[qp]=t[qp]),F(t.isManual)||(o.isManual=t.isManual)):(n||={},a&&(n.id=a),o[Gp]=[Nh(e,t,n)],o[Vp]=om(e,n),o[Hp]=sm(e,r),i&&(o[Kp]=i),a&&(o.id=a))}return e.CreateAutoException=function(e,t,n,r,i,a,o,s){var c=Oh(i||a||e);return{message:yh(e,c),url:t,lineNumber:n,columnNumber:r,error:kh(i||a||e),evt:kh(a||e),typeName:c,stackDetails:Th(o||i||a),errorSrc:s}},e.CreateFromInterface=function(t,n,r,i){var a=n.exceptions&&Zr(n.exceptions,function(e){return Ph(t,e)});return new e(t,Qi(Qi({},n),{exceptions:a}),r,i)},e.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,s=e.isManual;return{ver:`4.0`,exceptions:t instanceof Array&&Zr(t,function(e){return e.toInterface()})||void 0,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},e.CreateSimpleException=function(e,t,n,r,i,a){var o;return{exceptions:[(o={},o[Jp]=!0,o.message=e,o.stack=i,o.typeName=t,o)]}},e.envelopeType=`Microsoft.ApplicationInsights.{0}.Exception`,e.dataType=`ExceptionData`,e.formatError=kh,e}(),jh=In({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function Mh(){var e=this,t=R(e.parsedStack)&&Zr(e.parsedStack,function(e){return Hh(e)});return{id:e.id,outerId:e.outerId,typeName:e[Wp],message:e[Np],hasFullStack:e[Jp],stack:e[uh],parsedStack:t||void 0}}function Nh(e,t,n){var r,i,a,o,s,c,l,u;if(bh(t))o=t[Wp],s=t[Np],l=t[uh],u=t.parsedStack||[],c=t[Jp];else{var d=t,f=d&&d.evt;tn(d)||(d=d[lh]||f||d),o=nm(e,Oh(d))||`not_specified`,s=im(e,yh(t||d,o))||`not_specified`;var p=t[dh]||Th(t);u=Dh(p),R(u)&&Zr(u,function(t){t[Yp]=nm(e,t[Yp]),t[Xp]=nm(e,t[Xp])}),l=am(e,Eh(p)),c=R(u)&&u.length>0,n&&(n[Wp]=n.typeName||o)}return r={},r[Qp]=jh,r.id=i,r.outerId=a,r.typeName=o,r.message=s,r[Jp]=c,r.stack=l,r.parsedStack=u,r.toInterface=Mh,r}function Ph(e,t){var n=R(t.parsedStack)&&Zr(t.parsedStack,function(e){return Bh(e)})||t.parsedStack;return Nh(e,Qi(Qi({},t),{parsedStack:n}))}function Fh(e,t){var n=t[zp](oh);if(n&&n.length>=4)e[Xp]=n[1],e[Zp]=parseInt(n[2]);else{var r=t[zp](sh);r&&r.length>=3?(e[Xp]=r[1],e[Zp]=parseInt(r[2])):e[Xp]=t}}function Ih(e,t,n){var r=e[Xp];t.fn&&n&&n.length>t.fn&&(t.ln&&n.length>t.ln?(r=li(n[t.fn]||``),e[Zp]=parseInt(li(n[t.ln]||``))||0):r=li(n[t.fn]||``)),r&&Fh(e,r)}function Lh(e){var t=!1;if(e&&I(e)){var n=li(e);n&&(t=th.test(n))}return t}var Rh=In({level:1,method:1,assembly:0,fileName:0,line:0});function zh(e,t){var n,r;if(e&&I(e)&&li(e)){r=(n={},n[Qp]=Rh,n.level=t,n.assembly=li(e),n.method=ch,n.fileName=``,n.line=0,n.sizeInBytes=0,n);for(var i=0;i=a.len){a.m&&(r.method=li(o[a.m]||ch)),a.hdl?a.hdl(r,a,o):a.fn&&(a.ln?(r[Xp]=li(o[a.fn]||``),r[Zp]=parseInt(li(o[a.ln]||``))||0):Fh(r,o[a.fn]||``));break}i++}}return Vh(r)}function Bh(e){var t;return Vh((t={},t[Qp]=Rh,t.level=e.level,t.method=e.method,t.assembly=e[Yp],t.fileName=e[Xp],t.line=e[Zp],t.sizeInBytes=0,t))}function Vh(e){var t=eh;return e&&(t+=e.method[Op],t+=e.assembly[Op],t+=e.fileName[Op],t+=e.level.toString()[Op],t+=e.line.toString()[Op],e[Up]=t),e}function Hh(e){return{level:e.level,method:e.method,assembly:e[Yp],fileName:e[Xp],line:e[Zp]}}var Uh=function(){function e(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return e}(),Wh=function(){function e(e,t,n,r,i,a,o,s,c){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var u=new Uh;u[Pp]=r>0?r:void 0,u.max=isNaN(a)||a===null?void 0:a,u.min=isNaN(i)||i===null?void 0:i,u[Bp]=nm(e,t)||`not_specified`,u.value=n,u.stdDev=isNaN(o)||o===null?void 0:o,l.metrics=[u],l[Vp]=om(e,s),l[Hp]=sm(e,c)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Metric`,e.dataType=`MetricData`,e}(),Gh=``;function Kh(e){(isNaN(e)||e<0)&&(e=0),e=Pi(e);var t=Gh+e%1e3,n=Gh+ui(e/1e3)%60,r=Gh+ui(e/(1e3*60))%60,i=Gh+ui(e/(1e3*60*60))%24,a=ui(e/(1e3*60*60*24));return t=t.length===1?`00`+t:t.length===2?`0`+t:t,n=n.length<2?`0`+n:n,r=r.length<2?`0`+r:r,i=i.length<2?`0`+i:i,(a>0?a+`.`:Gh)+i+`:`+r+`:`+n+`.`+t}function qh(e,t,n,r,i){return!i&&I(e)&&(e===`Script error.`||e===`Script error`)}var Jh=function(){function e(e,t,n,r,i,a,o){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var s=this;s.ver=2,s.id=cm(e,o),s.url=rm(e,n),s[Bp]=nm(e,t)||`not_specified`,isNaN(r)||(s[$p]=Kh(r)),s[Vp]=om(e,i),s[Hp]=sm(e,a)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Pageview`,e.dataType=`PageviewData`,e}(),Yh=function(){function e(e,t,n,r,i,a,o,s,c,l,u,d){c===void 0&&(c=`Ajax`),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var f=this;f.ver=2,f.id=t,f[$p]=Kh(i),f.success=a,f.resultCode=o+``,f.type=nm(e,c);var p=Tm(e,n,s,r);f.data=rm(e,r)||p.data,f.target=nm(e,p.target),l&&(f.target=`${f.target} | ${l}`),f[Bp]=nm(e,p[Bp]),f[Vp]=om(e,u),f[Hp]=sm(e,d)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.RemoteDependency`,e.dataType=`RemoteDependencyData`,e}(),Xh=function(){function e(e,t,n,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var a=this;a.ver=2,t||=`not_specified`,a[Np]=im(e,t),a[Vp]=om(e,r),a[Hp]=sm(e,i),n&&(a[Kp]=n)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.Message`,e.dataType=`MessageData`,e}(),Zh=function(){function e(e,t,n,r,i,a,o){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var s=this;s.ver=2,s.url=rm(e,n),s[Bp]=nm(e,t)||`not_specified`,s[Vp]=om(e,i),s[Hp]=sm(e,a),o&&(s.domProcessing=o.domProcessing,s[$p]=o[$p],s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest)}return e.envelopeType=`Microsoft.ApplicationInsights.{0}.PageviewPerformance`,e.dataType=`PageviewPerformanceData`,e}(),Qh=function(){function e(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}return e}();function $h(e){var t=`ai.`+e+`.`;return function(e){return t+e}}var eg=$h(`application`),tg=$h(`device`),ng=$h(`location`),rg=$h(`operation`),ig=$h(`session`),ag=$h(`user`),og=$h(`cloud`),sg=$h(`internal`),cg=function(e){ea(t,e);function t(){return e.call(this)||this}return t}(sc({applicationVersion:eg(`ver`),applicationBuild:eg(`build`),applicationTypeId:eg(`typeId`),applicationId:eg(`applicationId`),applicationLayer:eg(`layer`),deviceId:tg(`id`),deviceIp:tg(`ip`),deviceLanguage:tg(`language`),deviceLocale:tg(`locale`),deviceModel:tg(`model`),deviceFriendlyName:tg(`friendlyName`),deviceNetwork:tg(`network`),deviceNetworkName:tg(`networkName`),deviceOEMName:tg(`oemName`),deviceOS:tg(`os`),deviceOSVersion:tg(`osVersion`),deviceRoleInstance:tg(`roleInstance`),deviceRoleName:tg(`roleName`),deviceScreenResolution:tg(`screenResolution`),deviceType:tg(`type`),deviceMachineName:tg(`machineName`),deviceVMName:tg(`vmName`),deviceBrowser:tg(`browser`),deviceBrowserVersion:tg(`browserVersion`),locationIp:ng(`ip`),locationCountry:ng(`country`),locationProvince:ng(`province`),locationCity:ng(`city`),operationId:rg(`id`),operationName:rg(`name`),operationParentId:rg(`parentId`),operationRootId:rg(`rootId`),operationSyntheticSource:rg(`syntheticSource`),operationCorrelationVector:rg(`correlationVector`),sessionId:ig(`id`),sessionIsFirst:ig(`isFirst`),sessionIsNew:ig(`isNew`),userAccountAcquisitionDate:ag(`accountAcquisitionDate`),userAccountId:ag(`accountId`),userAgent:ag(`userAgent`),userId:ag(`id`),userStoreRegion:ag(`storeRegion`),userAuthUserId:ag(`authUserId`),userAnonymousUserAcquisitionDate:ag(`anonUserAcquisitionDate`),userAuthenticatedUserAcquisitionDate:ag(`authUserAcquisitionDate`),cloudName:og(`name`),cloudRole:og(`role`),cloudRoleVer:og(`roleVer`),cloudRoleInstance:og(`roleInstance`),cloudEnvironment:og(`environment`),cloudLocation:og(`location`),cloudDeploymentUnit:og(`deploymentUnit`),internalNodeName:sg(`nodeName`),internalSdkVersion:sg(`sdkVersion`),internalAgentVersion:sg(`agentVersion`),internalSnippet:sg(`snippet`),internalSdkSrc:sg(`sdkSrc`)}));function lg(e,t,n,r,i,a){n=nm(r,n)||`not_specified`,(F(e)||F(t)||F(n))&&ln(`Input doesn't contain all required fields`);var o=``;e.iKey&&(o=e[Tp],delete e[Tp]);var s={name:n,time:tc(new Date),iKey:o,ext:a||{},tags:[],data:{},baseType:t,baseData:e};return F(i)||B(i,function(e,t){s.data[e]=t}),s}(function(){function e(){}return e.create=lg,e})();var ug={UserExt:`user`,DeviceExt:`device`,TraceExt:`trace`,WebExt:`web`,AppExt:`app`,OSExt:`os`,SessionExt:`ses`,SDKExt:`sdk`},dg=new cg;function fg(e){var t=null;if(L(Event))t=new Event(e);else{var n=Dr();n&&n.createEvent&&(t=n.createEvent(`Event`),t.initEvent(e,!0,!0))}return t}function pg(e,t){$f(e,null,null,t)}function mg(e){var t=Dr(),n=jr(),r=!1,i=[],a=1;n&&!F(n.onLine)&&!n.onLine&&(a=2);var o=0,s=f(),c=Zf(wl(`OfflineListener`),e);try{if(u(kr())&&(r=!0),t){var l=t.body||t;l.ononline&&u(l)&&(r=!0)}}catch{r=!1}function u(e){var t=!1;return e&&(t=Qf(e,`online`,h,c),t&&Qf(e,`offline`,g,c)),t}function d(){return s}function f(){return!(o===2||a===2)}function p(){var e=f();s!==e&&(s=e,V(i,function(e){var t={isOnline:s,rState:a,uState:o};try{e(t)}catch{}}))}function m(e){o=e,p()}function h(){a=1,p()}function g(){a=2,p()}function _(){var e=kr();if(e&&r){if(pg(e,c),t){var n=t.body||t;Kt(n.ononline)||pg(n,c)}r=!1}}function v(e){return i.push(e),{rm:function(){var t=i.indexOf(e);if(t>-1)return i.splice(t,1)}}}return{isOnline:d,isListening:function(){return r},unload:_,addListener:v,setOnlineState:m}}var hg=`AppInsightsPropertiesPlugin`,gg=`AppInsightsChannelPlugin`,_g=`ApplicationInsightsAnalytics`,vg=Fn({history:{blkVal:!0,v:void 0}}),yg=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=185,n.identifier=`ReactPlugin`;var r,i,a,o,s,c;return za(t,n,function(t,l){u(),t.initialize=function(o,l,u,d){e.prototype.initialize.call(n,o,l,u,d);var p=l.getPlugin(hg);p&&(c=p.plugin),H(t,`context`,{g:function(){return c?c.context:null}}),t._addHook(Zl(o,function(e){if(i=t._getTelCtx().getExtCfg(n.identifier,vg),r=l.getPlugin(`ApplicationInsightsAnalytics`)?.plugin,L(a)&&(a(),a=null),i.history&&(f(i.history),!s)){var o={uri:i.history.location.pathname};t.trackPageView(o),s=!0}}))},t.getCookieMgr=function(){return Zu(t.core)},t.getAppInsights=d,t.processTelemetry=function(e,n){t.processNext(e,n)},t._doTeardown=function(e,t,n){L(a)&&a(),o&&clearTimeout(o),u()},oc(t,d,[`trackMetric`,`trackPageView`,`trackEvent`,`trackException`,`trackTrace`]);function u(){r=null,i=null,a=null,o=null,s=!1,c=null}function d(){return r||Y(t.diagLog(),1,64,`Analytics plugin is not available, React plugin telemetry will not be sent: `),r}function f(e){a=e.listen(function(e){var n=null;n=`location`in e?e.location:e,o=setTimeout(function(){o=null;var e={uri:n.pathname};t.trackPageView(e)},500)})}Tn(t,`_extensionConfig`,function(){return i})}),n}return t.__ieDyn=1,t}(ef),bg=(0,P.createContext)(void 0),xg=w(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Sg=w(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Cg=w(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),wg=w(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Tg=w(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Eg=w(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Dg=w(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Og=w(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),kg=w(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Ag=w(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),jg=w(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Mg=w(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ng=w(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Pg=w(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),Fg=w(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Ig=w(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Lg=w(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Rg=w(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),zg=w(`git-branch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),Bg=w(`github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),Vg=w(`hard-drive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),Hg=w(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Ug=w(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Wg=w(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),Gg=w(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Kg=w(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),qg=w(`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`}]]),Jg=w(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Yg=w(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Xg=w(`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`}]]),Zg=w(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Qg=w(`newspaper`,[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]),$g=w(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),e_=w(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),t_=w(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),n_=w(`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`}]]),r_=w(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),i_=w(`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`}]]),a_=w(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),o_=w(`skull`,[[`path`,{d:`m12.5 17-.5-1-.5 1h1z`,key:`3me087`}],[`path`,{d:`M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z`,key:`1o5pge`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}]]),s_=w(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),c_=w(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),l_=w(`toggle-left`,[[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),u_=w(`toggle-right`,[[`circle`,{cx:`15`,cy:`12`,r:`3`,key:`1afu0r`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`7`,key:`g7kal2`}]]),d_=w(`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`}]]),f_=w(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),p_=w(`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`}]]),m_=w(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),h_=$e(),Z=a();function g_(){let[e]=k(),t=e.get(`namespace`),{data:n}=N(),r=n?.find(e=>e.id===t);return(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)(`header`,{className:`h-14 bg-primary-500 text-white flex items-center justify-between px-4 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,Z.jsxs)(M,{to:`/`,className:`flex items-center gap-2 font-semibold text-lg`,"aria-label":`ServiceHub Home`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-white/20 rounded-xl flex items-center justify-center border border-white/25`,children:(0,Z.jsx)(jg,{className:`w-4 h-4`})}),(0,Z.jsxs)(`span`,{className:`tracking-tight`,children:[(0,Z.jsx)(`span`,{className:`text-white/95`,children:`Service`}),(0,Z.jsx)(`span`,{className:`text-white font-bold`,children:`Hub`})]})]})}),(0,Z.jsx)(`div`,{className:`flex items-center gap-2 text-sm`,"data-tour":`header-connection`,children:r?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/10 px-3 py-1.5 rounded-full`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 bg-green-400 rounded-full animate-pulse`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`text-white/90`,children:`Connected:`}),(0,Z.jsx)(`span`,{className:`font-medium`,children:r.displayName||r.name}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] font-bold rounded uppercase leading-none ${r.environment===`prod`?`bg-red-500 text-white`:r.environment===`uat`?`bg-amber-400 text-amber-900`:`bg-green-400 text-green-900`}`,children:(r.environment??`dev`).toUpperCase()})]}):(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/10 px-3 py-1.5 rounded-full`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 bg-gray-400 rounded-full`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`text-white/70`,children:`No namespace selected`})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>window.dispatchEvent(new Event(`servicehub:open-palette`)),className:`hidden sm:flex items-center gap-1.5 px-2.5 py-1.5 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-white/80 text-xs transition-colors`,title:`Open command palette (⌘K)`,"aria-label":`Open command palette`,children:[(0,Z.jsx)(_e,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Search…`}),(0,Z.jsx)(`kbd`,{className:`ml-1 text-[10px] font-mono bg-white/10 px-1 rounded`,children:`⌘K`})]}),(0,Z.jsx)(`button`,{onClick:()=>window.dispatchEvent(new Event(`servicehub:open-palette`)),className:`sm:hidden p-2 hover:bg-white/10 rounded-lg transition-colors`,title:`Open command palette (⌘K)`,"aria-label":`Open command palette`,children:(0,Z.jsx)(_e,{className:`w-5 h-5`})}),(0,Z.jsx)(M,{to:`/help`,className:`p-2 hover:bg-white/10 rounded-lg transition-colors`,title:`Help & Quick Reference`,"aria-label":`Help`,"data-tour":`header-help`,children:(0,Z.jsx)(Ge,{className:`w-5 h-5`})}),(0,Z.jsx)(`button`,{className:`w-8 h-8 bg-white/20 rounded-full flex items-center justify-center hover:bg-white/30 transition-colors`,"aria-label":`User menu`,title:`ServiceHub User`,children:(0,Z.jsx)(f_,{className:`w-4 h-4`})})]})]})})}function __(e,t=!0){return be({queryKey:[`topics`,e],queryFn:async()=>(await me.get(`/namespaces/${e}/topics`,{_silent:!0})).data,enabled:!!e,staleTime:15e3,refetchInterval:t?3e4:!1,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2})}function v_(e,t,n=!0){return be({queryKey:[`subscriptions`,e,t],queryFn:async()=>(await me.get(`/namespaces/${e}/topics/${t}/subscriptions`,{_silent:!0})).data,enabled:!!e&&!!t,staleTime:15e3,refetchInterval:n?3e4:!1,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2})}var y_={list:async e=>[],get:async(e,t)=>{throw Error(`AI insights backend is not enabled. Client-side insights do not support individual lookup.`)},dismiss:async(e,t)=>{},resolve:async(e,t)=>{},getSummary:async(e,t)=>({activeCount:0,insights:[]}),isAvailable:async()=>!0},b_={MIN_MESSAGES_FOR_PATTERN:3,HIGH_DELIVERY_COUNT:5,POISON_MESSAGE_THRESHOLD:10,MIN_CLUSTER_PERCENTAGE:.1,ANALYSIS_WINDOW_MS:3600*1e3,HIGH_CONFIDENCE_THRESHOLD:80,MEDIUM_CONFIDENCE_THRESHOLD:50};function x_(e){let t=e.filter(e=>e.isFromDeadLetter||e.deadLetterReason);if(t.length=b_.MIN_MESSAGES_FOR_PATTERN){let n=Math.round(i.length/t.length*100);r.push({type:`dlq-pattern`,messages:i,signature:e,metrics:{affectedCount:i.length,totalDLQ:t.length,matchPercentage:n}})}return r}function S_(e){let t=e.filter(e=>e.deliveryCount>=b_.HIGH_DELIVERY_COUNT&&!e.isFromDeadLetter);if(t.lengthe+t.deliveryCount,0)/t.length);return[{type:`retry-loop`,messages:t,signature:`High retry count (avg: ${n})`,metrics:{affectedCount:t.length,avgDeliveryCount:n,maxDeliveryCount:Math.max(...t.map(e=>e.deliveryCount))}}]}function C_(e){let t=e.filter(e=>e.deliveryCount>=b_.POISON_MESSAGE_THRESHOLD);return t.length===0?[]:[{type:`poison-message`,messages:t,signature:`Exceeded ${b_.POISON_MESSAGE_THRESHOLD} delivery attempts`,metrics:{affectedCount:t.length,avgDeliveryCount:Math.round(t.reduce((e,t)=>e+t.deliveryCount,0)/t.length)}}]}function w_(e){let t=e.filter(e=>{let t=e.body?.toLowerCase()||``;return t.includes(`error`)||t.includes(`exception`)||t.includes(`failed`)||t.includes(`timeout`)||e.isFromDeadLetter});if(t.length=b_.MIN_MESSAGES_FOR_PATTERN&&r.push({type:`error-cluster`,messages:t,signature:e,metrics:{affectedCount:t.length,errorType:e}});return r}function T_(e){return e.replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/g,`[timestamp]`).replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,`[uuid]`).replace(/\d+\.\d+\.\d+\.\d+/g,`[ip]`).replace(/\d{10,}/g,`[number]`).trim().substring(0,100)}function E_(e){let t=e.body||``;for(let e of[/(?:Exception|Error):\s*([A-Za-z]+(?:Exception|Error))/i,/"(?:error|exception|type)":\s*"([^"]+)"/i,/(?:failed|error|exception)\s+(?:with|:)\s+([A-Za-z]+)/i]){let n=t.match(e);if(n)return n[1].trim()}return e.deadLetterReason?T_(e.deadLetterReason):null}function D_(e,t,n){let r=t>0?e/t*100:0,i=Math.min(99,Math.round(r*.6+n*.4)),a,o;return i>=b_.HIGH_CONFIDENCE_THRESHOLD?(a=`high`,o=`Strong pattern match: ${e} messages (${r.toFixed(0)}%) share this characteristic`):i>=b_.MEDIUM_CONFIDENCE_THRESHOLD?(a=`medium`,o=`Moderate pattern: ${e} messages show this behavior, but other factors may be involved`):(a=`low`,o=`Weak pattern: Only ${e} messages detected. More data needed for confident assessment`),{level:a,score:i,reasoning:o}}function O_(e){let t=[];switch(e.type){case`dlq-pattern`:t.push({title:`Review dead-letter error signatures`,description:`Examine the ${e.metrics.affectedCount} messages for common failure patterns`,priority:`immediate`}),t.push({title:`Check message schema validation`,description:`Ensure producers are sending correctly formatted messages`,priority:`short-term`}),t.push({title:`Consider replay after root cause fix`,description:`Once the issue is resolved, replay affected messages`,priority:`investigative`});break;case`retry-loop`:t.push({title:`Investigate consumer processing failures`,description:`Check logs for why messages are failing after ${e.metrics.avgDeliveryCount} attempts`,priority:`immediate`}),t.push({title:`Review max delivery count settings`,description:`Consider dead-lettering messages that exceed retry thresholds`,priority:`short-term`});break;case`poison-message`:t.push({title:`Move poison messages to DLQ`,description:`These messages are unlikely to process successfully`,priority:`immediate`}),t.push({title:`Add poison message detection logic`,description:`Implement early detection to prevent retry storms`,priority:`short-term`});break;case`error-cluster`:t.push({title:`Analyze error cluster root cause`,description:`${e.metrics.affectedCount} messages share error pattern: ${e.signature}`,priority:`immediate`}),t.push({title:`Check downstream service health`,description:`Clustered errors often indicate external dependencies issues`,priority:`investigative`});break}return t}function k_(e){switch(e.type){case`dlq-pattern`:return`DLQ Pattern: ${e.signature?.substring(0,50)||`Unknown Failure`}`;case`retry-loop`:return`Retry Loop: ${e.messages.length} Messages Stuck`;case`poison-message`:return`Poison Messages: ${e.messages.length} Unprocessable`;case`error-cluster`:return`Error Cluster: ${e.signature||`Common Failures`}`;case`latency-anomaly`:return`Latency Anomaly Detected`;default:return`Unknown Pattern`}}function A_(e){let t=e.messages.length;switch(e.type){case`dlq-pattern`:return`${t} messages dead-lettered with similar error: "${e.signature}". This represents ${e.metrics.matchPercentage}% of DLQ messages.`;case`retry-loop`:return`${t} messages in retry loop with average ${e.metrics.avgDeliveryCount} delivery attempts. Messages are not progressing to completion.`;case`poison-message`:return`${t} message${t>1?`s`:``} exceeded ${b_.POISON_MESSAGE_THRESHOLD} delivery attempts. These messages are likely unprocessable without intervention.`;case`error-cluster`:return`${t} messages share error pattern: ${e.signature}. This may indicate a systematic issue.`;default:return`${t} messages match this pattern.`}}function j_(e,t){if(!e||e.length===0)return[];let n=[],r=new Date,i=new Date(r.getTime()-b_.ANALYSIS_WINDOW_MS),a=[...x_(e),...S_(e),...C_(e),...w_(e)];for(let o=0;oe.messageId||`seq-${e.sequenceNumber}`);n.push({id:`insight-${t.entityName}-${s.type}-${o}`,type:s.type,title:k_(s),description:A_(s),confidence:c,evidence:{sampleSize:s.messages.length,affectedMessageIds:l,exampleMessageIds:l.slice(0,3),metrics:[{label:`Affected Messages`,value:s.messages.length,isAnomaly:s.messages.length>5},{label:`Pattern Match`,value:`${c.score}%`,isAnomaly:c.level===`high`},{label:`Analysis Window`,value:`1 hour`,isAnomaly:!1}],patternSignature:s.signature},recommendations:O_(s),timeWindow:{start:i.toISOString(),end:r.toISOString(),analysisTimestamp:r.toISOString()},scope:{namespaceId:t.namespaceId,queueOrTopicName:t.entityName,subscriptionName:t.subscriptionName},status:`active`})}return n}function M_(){return!0}function N_(e,t){return be({queryKey:[`insights`,`summary`,e,t],queryFn:()=>y_.getSummary(e,t),enabled:!!e&&!!t,retry:!1,staleTime:3e4,meta:{errorMessage:!1}})}function P_(e,t,n=!0){return be({queryKey:[`insights`,`client-side`,t.namespaceId,t.entityName,e?.length],queryFn:()=>!e||e.length===0?[]:j_(e,t),enabled:n&&!!e&&e.length>0&&M_(),staleTime:6e4,meta:{errorMessage:!1}})}function F_({queue:e,namespaceId:t}){let{data:n}=N_(t,e.name),r=(n?.activeCount||0)>0;return(0,Z.jsx)(C,{to:`/messages?namespace=${t}&queue=${e.name}`,className:({isActive:n})=>{let r=new URLSearchParams(window.location.search),i=r.get(`namespace`),a=r.get(`queue`),o=r.get(`topic`);return`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm transition-all duration-200 ${n&&i===t&&a===e.name&&!o?`bg-sky-600 text-white shadow-xl border-2 border-sky-400 font-bold transform scale-[1.02] -ml-1 mr-1`:`bg-white text-gray-700 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300`}`},children:()=>{let n=new URLSearchParams(window.location.search),i=n.get(`namespace`),a=n.get(`queue`),o=n.get(`topic`),s=i===t&&a===e.name&&!o;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[s&&(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 bg-white rounded-full animate-pulse`}),e.name,r&&(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full animate-pulse ${s?`bg-yellow-300`:`bg-primary-500`}`,title:`AI patterns detected`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-white text-sky-700`:`bg-green-100 text-green-700`}`,children:e.activeMessageCount}),e.deadLetterMessageCount>0&&(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-red-200 text-red-800`:`bg-red-100 text-red-700`}`,children:e.deadLetterMessageCount})]})]})}},e.name)}function I_({topic:e,namespaceId:t}){let[n,r]=(0,P.useState)(!1),{data:i,isLoading:a}=v_(t,e.name);return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{onClick:()=>r(!n),className:`w-full flex items-center justify-between px-3 py-1.5 rounded text-sm text-gray-600 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5 text-gray-500`,children:[n?(0,Z.jsx)(ye,{className:`w-3 h-3 shrink-0`}):(0,Z.jsx)(ze,{className:`w-3 h-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e.name})]}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 bg-gray-100 text-gray-600 text-xs font-medium rounded shrink-0`,children:e.subscriptionCount})]}),n&&(0,Z.jsx)(`div`,{className:`ml-4 mt-0.5 space-y-0.5`,children:a?(0,Z.jsx)(`div`,{className:`px-3 py-1 text-xs text-gray-500`,children:`Loading...`}):i&&i.length>0?i.map(n=>(0,Z.jsx)(L_,{subscription:n,namespaceId:t,topicName:e.name},n.name)):(0,Z.jsx)(`div`,{className:`px-3 py-1 text-xs text-gray-500`,children:`No subscriptions`})})]})}function L_({subscription:e,namespaceId:t,topicName:n}){return(0,Z.jsx)(C,{to:`/messages?namespace=${t}&topic=${n}&subscription=${e.name}`,className:({isActive:r})=>{let i=new URLSearchParams(window.location.search),a=i.get(`namespace`),o=i.get(`subscription`),s=i.get(`topic`);return`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm transition-all duration-200 ${r&&a===t&&o===e.name&&s===n?`bg-sky-600 text-white shadow-xl border-2 border-sky-400 font-bold transform scale-[1.02] -ml-1 mr-1`:`bg-white text-gray-600 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300`}`},children:()=>{let r=new URLSearchParams(window.location.search),i=r.get(`namespace`),a=r.get(`subscription`),o=r.get(`topic`),s=i===t&&a===e.name&&o===n;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[s&&(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 bg-white rounded-full animate-pulse`}),e.name]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-white text-sky-700`:`bg-green-100 text-green-700`}`,children:e.activeMessageCount}),e.deadLetterMessageCount>0&&(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-bold rounded-full ${s?`bg-red-200 text-red-800`:`bg-red-100 text-red-700`}`,children:e.deadLetterMessageCount})]})]})}})}function R_({namespace:e}){let{data:t,isLoading:n,isError:r}=Oe(e.id),{data:i,isLoading:a,isError:o}=__(e.id),[s,c]=(0,P.useState)(e.isActive),[l,u]=(0,P.useState)(!0),[d,f]=(0,P.useState)(!0);return(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>c(!s),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-all ${e.isActive?`bg-gray-50 border border-gray-200`:`hover:bg-gray-50 border border-transparent`}`,children:[s?(0,Z.jsx)(ye,{className:`w-4 h-4 text-gray-500 shrink-0`}):(0,Z.jsx)(ze,{className:`w-4 h-4 text-gray-500 shrink-0`}),(0,Z.jsx)(`div`,{className:`w-2 h-2 rounded-full shrink-0 ${e.isActive?`bg-green-500`:`bg-gray-200`}`,title:e.isActive?`Active namespace`:`Inactive namespace`}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-sm text-gray-900 truncate`,children:e.displayName||e.name}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 truncate`,children:e.name})]})]}),s&&e.isActive&&(0,Z.jsxs)(`div`,{className:`mt-1 ml-4 space-y-1`,children:[(0,Z.jsxs)(`button`,{onClick:()=>u(!l),className:`w-full flex items-center gap-2 px-2 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:text-gray-700`,children:[l?(0,Z.jsx)(ye,{className:`w-3 h-3`}):(0,Z.jsx)(ze,{className:`w-3 h-3`}),(0,Z.jsx)(ke,{className:`w-3 h-3`}),`Queues (`,t?.length||0,`)`]}),l&&(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:r?(0,Z.jsxs)(`div`,{className:`px-3 py-2 text-xs text-amber-600 flex items-center gap-1`,children:[(0,Z.jsx)(He,{className:`w-3 h-3`}),`Connection unavailable`]}):n?(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`Loading...`}):t&&t.length>0?t.map(t=>(0,Z.jsx)(F_,{queue:t,namespaceId:e.id},t.name)):(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`No queues found`})}),(0,Z.jsxs)(`button`,{onClick:()=>f(!d),className:`w-full flex items-center gap-2 px-2 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:text-gray-700`,children:[d?(0,Z.jsx)(ye,{className:`w-3 h-3`}):(0,Z.jsx)(ze,{className:`w-3 h-3`}),(0,Z.jsx)(Qg,{className:`w-3 h-3`}),`Topics (`,i?.length||0,`)`]}),d&&(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:o?(0,Z.jsxs)(`div`,{className:`px-3 py-2 text-xs text-amber-600 flex items-center gap-1`,children:[(0,Z.jsx)(He,{className:`w-3 h-3`}),`Connection unavailable`]}):a?(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`Loading...`}):i&&i.length>0?i.map(t=>(0,Z.jsx)(I_,{topic:t,namespaceId:e.id},t.name)):(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-gray-500`,children:`No topics found`})})]})]})}function z_(){let e=O(),{data:t,isLoading:n,refetch:r}=N(),[i,a]=(0,P.useState)(!1),o=new URLSearchParams(window.location.search).get(`demo`)===`true`,s=t?.find(e=>e.isActive),{data:c}=Oe(s?.id||``),{data:l}=__(s?.id||``),u=De({queries:(t?.map(e=>e.id)??[]).map(e=>({queryKey:[`namespace-stats`,e],queryFn:async()=>(await me.get(`/namespaces/${e}/stats`,{_silent:!0})).data,enabled:!!e,staleTime:3e4,refetchInterval:6e4,refetchIntervalInBackground:!1}))}).reduce((e,t)=>t.data?e+t.data.totalDlq:e,0);return(0,Z.jsxs)(`aside`,{className:`w-[260px] bg-white border-r border-gray-200 flex flex-col overflow-hidden`,"data-tour":`sidebar`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`h2`,{className:`text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Namespaces`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(`button`,{onClick:()=>r(),className:`p-1 hover:bg-primary-50 rounded transition-colors group`,title:`Refresh Namespaces`,"aria-label":`Refresh namespaces list`,children:(0,Z.jsx)(Ee,{className:`w-4 h-4 text-primary-500 group-hover:rotate-180 transition-transform duration-300`})}),(0,Z.jsx)(C,{to:`/connect`,className:`p-1 hover:bg-gray-100 rounded transition-colors`,title:`Add Connection`,"aria-label":`Add new connection`,"data-tour":`add-connection`,children:(0,Z.jsx)(we,{className:`w-4 h-4 text-gray-500`})})]})]}),n?(0,Z.jsx)(`div`,{className:`px-3 py-4 text-sm text-gray-500 text-center`,children:`Loading namespaces...`}):t&&t.length>0?t.map(e=>(0,Z.jsx)(R_,{namespace:e},e.id)):(0,Z.jsxs)(`div`,{className:`px-3 py-4 text-sm text-gray-500 text-center`,children:[(0,Z.jsx)(`p`,{className:`mb-2`,children:`No connections yet`}),(0,Z.jsx)(C,{to:`/connect`,className:`text-primary-600 hover:text-primary-700 font-medium`,children:`Add your first connection`})]}),o&&(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsxs)(`div`,{className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-50 border border-blue-200`,children:[(0,Z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-blue-500`}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`div`,{className:`font-medium text-sm text-blue-900`,children:`Demo Namespace`}),(0,Z.jsx)(`div`,{className:`text-xs text-blue-500`,children:`Sample data`})]})]}),(0,Z.jsx)(`div`,{className:`mt-1 ml-4 space-y-0.5`,children:[`orders-queue`,`payment-queue`,`notification-queue`].map(e=>(0,Z.jsx)(C,{to:`/messages?demo=true&queue=${e}`,className:`flex items-center justify-between px-3 py-2.5 rounded-lg text-sm bg-white text-gray-700 hover:bg-sky-50 hover:text-sky-700 border border-gray-200 hover:border-sky-300 transition-all duration-200`,children:(0,Z.jsx)(`span`,{className:`truncate`,children:e})},e))})]})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 bg-gradient-to-b from-sky-50 to-white`,"data-tour":`quick-access`,children:[(0,Z.jsxs)(`button`,{onClick:()=>a(e=>!e),className:`w-full flex items-center justify-between px-3 py-2 text-xs font-semibold text-sky-700 uppercase tracking-wider hover:bg-sky-100/50 transition-colors`,"aria-expanded":i,children:[`Quick Access`,(0,Z.jsx)(ye,{className:`w-3.5 h-3.5 transition-transform ${i?``:`-rotate-90`}`})]}),i&&(0,Z.jsxs)(`nav`,{className:`space-y-1 px-3 pb-3`,children:[(0,Z.jsxs)(C,{to:`/dashboard`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-indigo-50 text-indigo-700 border-indigo-300 font-medium`:`bg-white hover:bg-indigo-50 text-gray-700 hover:text-indigo-700 border-gray-200 hover:border-indigo-300`}`,children:[(0,Z.jsx)(Kg,{className:`w-4 h-4 text-indigo-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Dashboard`}),u>0&&(0,Z.jsx)(`span`,{className:`text-xs bg-red-100 text-red-700 px-1.5 py-0.5 rounded-full font-medium`,children:u})]}),(0,Z.jsxs)(`button`,{onClick:()=>{let n=t?.find(e=>e.isActive);if(!n){m.error(`No active namespace selected`);return}let r=c?.[0];if(r){e(`/messages?namespace=${n.id}&queue=${r.name}&queueType=active`);return}if(l?.[0]){m(`Select a subscription from the topic to view messages`,{icon:`ℹ️`});return}m(`No queues or topics available`,{icon:`ℹ️`})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-sky-50 text-gray-700 hover:text-sky-700 border border-gray-200 hover:border-sky-300 shadow-sm`,children:[(0,Z.jsx)(ie,{className:`w-4 h-4 text-sky-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Active Messages`}),(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:`View All`})]}),(0,Z.jsxs)(`button`,{onClick:()=>{let n=t?.find(e=>e.isActive);if(!n){m.error(`No active namespace selected`);return}let r=c?.[0];if(r){e(`/messages?namespace=${n.id}&queue=${r.name}&queueType=deadletter`);return}if(l?.[0]){m(`Select a subscription from the topic to view DLQ`,{icon:`⚠️`});return}m(`No queues or topics available for DLQ view`,{icon:`⚠️`})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-red-50 text-gray-700 hover:text-red-700 border border-gray-200 hover:border-red-300 shadow-sm`,children:[(0,Z.jsx)(He,{className:`w-4 h-4 text-red-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Dead-Letter`}),(0,Z.jsx)(`span`,{className:`text-xs text-red-600 font-medium`,children:`DLQ`})]}),(0,Z.jsxs)(C,{to:s?`/dlq-history?namespace=${s.id}`:`/dlq-history`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-purple-50 text-gray-700 hover:text-purple-700 border border-gray-200 hover:border-purple-300 shadow-sm`,children:[(0,Z.jsx)(Re,{className:`w-4 h-4 text-purple-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`DLQ Intelligence`}),(0,Z.jsx)(`span`,{className:`text-xs text-purple-600 font-medium`,children:`History`})]}),(0,Z.jsxs)(C,{to:`/rules`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-amber-50 text-gray-700 hover:text-amber-700 border border-gray-200 hover:border-amber-300 shadow-sm`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Auto-Replay`}),(0,Z.jsx)(`span`,{className:`text-xs text-amber-600 font-medium`,children:`Rules`})]}),(0,Z.jsxs)(C,{to:`/health`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-emerald-50 text-gray-700 hover:text-emerald-700 border border-gray-200 hover:border-emerald-300 shadow-sm`,children:[(0,Z.jsx)(Te,{className:`w-4 h-4 text-emerald-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`System Health`}),(0,Z.jsx)(`span`,{className:`text-xs text-emerald-600 font-medium`,children:`Status`})]}),(0,Z.jsxs)(C,{to:`/scheduled`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-sky-50 text-sky-700 border-sky-300 font-medium`:`bg-white hover:bg-sky-50 text-gray-700 hover:text-sky-700 border-gray-200 hover:border-sky-300`}`,children:[(0,Z.jsx)(A,{className:`w-4 h-4 text-sky-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Scheduled`}),(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:`View`})]}),(0,Z.jsxs)(C,{to:`/correlation`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-violet-50 text-violet-700 border-violet-300`:`bg-white hover:bg-violet-50 text-gray-700 hover:text-violet-700 border-gray-200 hover:border-violet-300`}`,children:[(0,Z.jsx)(D,{className:`w-4 h-4 text-violet-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Correlation`})]}),(0,Z.jsxs)(C,{to:`/help`,className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all bg-white hover:bg-primary-50 text-gray-700 hover:text-primary-700 border border-gray-200 hover:border-primary-300 shadow-sm`,children:[(0,Z.jsx)(Ge,{className:`w-4 h-4 text-primary-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Help & Guide`}),(0,Z.jsx)(`span`,{className:`text-xs text-primary-600 font-medium`,children:`?`})]}),(0,Z.jsxs)(C,{to:`/security`,className:({isActive:e})=>`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-all border shadow-sm ${e?`bg-green-50 text-green-700 border-green-300`:`bg-white hover:bg-green-50 text-gray-700 hover:text-green-700 border-gray-200 hover:border-green-300`}`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-green-500`}),(0,Z.jsx)(`span`,{className:`flex-1 text-left`,children:`Security & Privacy`})]})]})]}),(0,Z.jsx)(`div`,{className:`border-t border-gray-200 p-3 bg-white`,children:(0,Z.jsxs)(C,{to:`/connect`,className:`flex items-center justify-center gap-2 w-full px-4 py-2.5 bg-sky-500 hover:bg-sky-600 text-white rounded-lg text-sm font-medium transition-all shadow-md hover:shadow-lg`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Add Connection`]})})]})}function B_(){let e=new Date().getFullYear();return(0,Z.jsx)(`footer`,{className:`h-12 bg-primary-500 text-white border-t border-primary-600 shadow-sm`,children:(0,Z.jsxs)(`div`,{className:`h-full px-4 flex items-center justify-between text-xs`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`text-white/70`,children:`ServiceHub v3.1.0`}),(0,Z.jsx)(`span`,{className:`text-white/50`,children:`•`}),(0,Z.jsx)(`span`,{className:`text-white/70`,children:`.NET 10 • React 19`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-white/70`,children:[(0,Z.jsx)(`span`,{children:`Made with`}),(0,Z.jsx)(Hg,{className:`w-3.5 h-3.5 text-red-300 fill-red-300`}),(0,Z.jsxs)(`span`,{children:[`© `,e]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`text-white/70 hover:text-white transition-colors flex items-center gap-1`,title:`GitHub`,children:[(0,Z.jsx)(Bg,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`GitHub`})]}),(0,Z.jsx)(`span`,{className:`text-white/30`,children:`|`}),(0,Z.jsxs)(`a`,{href:`#help`,className:`text-white/70 hover:text-white transition-colors flex items-center gap-1`,title:`Help`,children:[(0,Z.jsx)(Sg,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Help`})]})]})]})})}function V_(e){return e.replace(/\/?\$deadletterqueue$/i,``)}var H_={list:async e=>{let{namespaceId:t,entityType:n=`queue`,...r}=e,i=V_(e.queueOrTopicName);if(n===`topic`&&i.includes(`/subscriptions/`)){let[e,n]=i.split(`/subscriptions/`);return(await me.get(`/namespaces/${t}/topics/${e}/subscriptions/${n}/messages`,{params:r})).data}let a=n===`topic`?`topics`:`queues`;return(await me.get(`/namespaces/${t}/${a}/${i}/messages`,{params:r})).data},get:async(e,t)=>(await me.get(`/namespaces/${e}/messages/${t}`)).data,send:async(e,t,n,r=`queue`)=>{let i=r===`topic`?`topics`:`queues`,a={body:n.body,contentType:n.contentType,applicationProperties:n.properties,sessionId:n.sessionId,correlationId:n.correlationId,timeToLiveSeconds:n.timeToLive,scheduledEnqueueTimeUtc:n.scheduledEnqueueTime};await me.post(`/namespaces/${e}/${i}/${t}/messages`,a)},replay:async(e,t,n,r)=>{await me.post(`/messages/replay`,null,{params:{namespaceId:e,sequenceNumber:t,entityName:n,subscriptionName:r}})},deadLetter:async(e,t,n=1,r=`ManualDeadLetter`,i,a=`queue`,o)=>{let s=new URLSearchParams({messageCount:n.toString(),reason:r,...i&&{errorDescription:i}}),c;return c=a===`topic`&&o?`/namespaces/${e}/topics/${t}/subscriptions/${o}/deadletter`:`/namespaces/${e}/queues/${t}/deadletter`,(await me.post(`${c}?${s.toString()}`)).data}};function U_(e){return e.replace(/\/?\$deadletterqueue$/i,``)}function W_(e){let t={...e,queueOrTopicName:U_(e.queueOrTopicName)};return be({queryKey:[`messages`,t],queryFn:async()=>{try{return await H_.list(t)}catch(e){let t=e?.response?.status;if(t===404||t===502||t===503)return{items:[],totalCount:0,hasMore:!1};throw e}},enabled:!!t.namespaceId&&!!t.queueOrTopicName,staleTime:1e4,refetchInterval:e.autoRefresh===!1?!1:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===404||t?.response?.status===401||t?.response?.status===403||t?.response?.status===429||(t?.response?.status??0)>=500?!1:e<2,meta:{errorMessage:!1}})}function G_(){let e=f();return i({mutationFn:({namespaceId:e,queueOrTopicName:t,message:n,entityType:r=`queue`})=>H_.send(e,t,n,r),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:[`messages`,{namespaceId:n.namespaceId,queueOrTopicName:n.queueOrTopicName}],exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId],refetchType:`active`}),e.invalidateQueries({queryKey:[`subscriptions`,n.namespaceId],refetchType:`active`})]),m.success(`Message sent successfully`)},onError:e=>{let t=e?.response?.data?.message||e?.message||`Failed to send message`;m.error(t,{duration:1/0})}})}function K_(){let e=f();return i({mutationFn:({namespaceId:e,sequenceNumber:t,entityName:n,subscriptionName:r})=>H_.replay(e,t,n,r),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:[`messages`,{namespaceId:n.namespaceId,queueOrTopicName:n.entityName}],exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId],refetchType:`active`}),e.invalidateQueries({queryKey:[`subscriptions`,n.namespaceId],refetchType:`active`})]),m.success(`Message replayed successfully`)},onError:e=>{if(e?.response?.status===404)m.error(`Replay feature is not yet available in the API`,{duration:4e3,icon:`🚧`});else{let t=e?.response?.data?.message||e?.message||`Failed to replay message`;m.error(t,{duration:1/0})}}})}function q_({isOpen:e,onClose:t,onSend:n,defaultNamespaceId:r,defaultQueueName:i}){let{data:a}=N(),[o,s]=(0,P.useState)(r||``),{data:c}=Oe(o),{data:l}=__(o),u=G_(),[d,f]=(0,P.useState)(`queue`),[p,m]=(0,P.useState)(i||``),[h,g]=(0,P.useState)(`{ - "orderId": "ORD-2026-12345", - "amount": 99.99, - "currency": "USD" -}`),[_,v]=(0,P.useState)(`application/json`),[y,b]=(0,P.useState)([{key:`source`,value:`ServiceHub`}]),[x,S]=(0,P.useState)(!1),[C,w]=(0,P.useState)(``),[T,E]=(0,P.useState)(``),[D,O]=(0,P.useState)(``),[ee,k]=(0,P.useState)(`now`),[te,j]=(0,P.useState)(``),[M,ne]=(0,P.useState)(!1),[re,ie]=(0,P.useState)(1);if((0,P.useEffect)(()=>{r&&s(r),i&&m(i)},[r,i]),(0,P.useEffect)(()=>{let n=n=>{n.key===`Escape`&&e&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),!e)return null;let ae=()=>{b([...y,{key:``,value:``}])},oe=e=>{b(y.filter((t,n)=>n!==e))},se=(e,t,n)=>{let r=[...y];r[e][t]=n,b(r)},ce=async()=>{if(!o||!p)return;let e={};y.forEach(t=>{t.key.trim()&&(e[t.key.trim()]=t.value)});try{let t=M?re:1;for(let n=0;n{if(_!==`application/json`)return!0;try{return JSON.parse(h),!0}catch{return!1}},ue=o&&p&&h.trim().length>0&&le()&&(ee===`now`||ee===`scheduled`&&!!te);return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Send Message`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-6`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace...`}),a?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Entity Type`}),(0,Z.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,Z.jsx)(`button`,{onClick:()=>{f(`queue`),m(``)},className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`queue`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📥 Queue`}),(0,Z.jsx)(`button`,{onClick:()=>{f(`topic`),m(``)},className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`topic`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📢 Topic`})]}),(0,Z.jsxs)(`select`,{value:p,onChange:e=>m(e.target.value),disabled:!o,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsxs)(`option`,{value:``,children:[`Select `,d,`...`]}),d===`queue`?c?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[`📥 `,e.name]},e.name)):l?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[`📢 `,e.name]},e.name))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Content Type`}),(0,Z.jsxs)(`select`,{value:_,onChange:e=>v(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:`application/json`,children:`application/json`}),(0,Z.jsx)(`option`,{value:`text/plain`,children:`text/plain`}),(0,Z.jsx)(`option`,{value:`application/xml`,children:`application/xml`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Message Body`}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`textarea`,{value:h,onChange:e=>g(e.target.value),rows:8,className:`w-full px-3 py-2 border rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 ${!le()&&_===`application/json`?`border-red-300 bg-red-50`:`border-gray-200`}`,placeholder:`Enter message body...`}),!le()&&_===`application/json`&&(0,Z.jsx)(`p`,{className:`text-xs text-red-600 mt-1`,children:`Invalid JSON format`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-700`,children:`Custom Properties`}),(0,Z.jsxs)(`button`,{onClick:ae,className:`flex items-center gap-1 text-xs text-primary-600 hover:text-primary-700`,children:[(0,Z.jsx)(we,{className:`w-3 h-3`}),`Add Property`]})]}),(0,Z.jsx)(`div`,{className:`space-y-2`,children:y.map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`input`,{type:`text`,value:e.key,onChange:e=>se(t,`key`,e.target.value),placeholder:`Key`,className:`flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>se(t,`value`,e.target.value),placeholder:`Value`,className:`flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`button`,{onClick:()=>oe(t),className:`p-2 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-lg transition-colors`,children:(0,Z.jsx)(d_,{className:`w-4 h-4`})})]},t))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Delivery Mode`}),(0,Z.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,Z.jsxs)(`button`,{onClick:()=>{k(`now`),j(``)},className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors border ${ee===`now`?`bg-primary-500 text-white border-primary-500`:`bg-white text-gray-700 border-gray-200 hover:bg-gray-50`}`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4`}),`Send Now`]}),(0,Z.jsxs)(`button`,{onClick:()=>k(`scheduled`),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors border ${ee===`scheduled`?`bg-sky-500 text-white border-sky-500`:`bg-white text-gray-700 border-gray-200 hover:bg-sky-50 hover:border-sky-300 hover:text-sky-700`}`,children:[(0,Z.jsx)(A,{className:`w-4 h-4`}),`Schedule`]})]}),ee===`scheduled`&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`input`,{type:`datetime-local`,value:te,onChange:e=>j(e.target.value),min:new Date(Date.now()+6e4).toISOString().slice(0,16),className:`w-full px-3 py-2 border border-sky-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 bg-sky-50`}),te&&(0,Z.jsxs)(`p`,{className:`text-xs text-sky-600 mt-1`,children:[`⏰ Message will be delivered at `,new Date(te).toLocaleString()]}),!te&&(0,Z.jsx)(`p`,{className:`text-xs text-amber-600 mt-1`,children:`Select a future date and time`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>S(!x),className:`text-sm text-primary-600 hover:text-primary-700 font-medium`,children:[x?`▼`:`▶`,` Advanced Options`]}),x&&(0,Z.jsxs)(`div`,{className:`space-y-4 pl-4 border-l-2 border-gray-100`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Correlation ID`}),(0,Z.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`Optional`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Session ID`}),(0,Z.jsx)(`input`,{type:`text`,value:T,onChange:e=>E(e.target.value),placeholder:`Optional`,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Time To Live (seconds)`}),(0,Z.jsx)(`input`,{type:`number`,value:D,onChange:e=>O(e.target.value),placeholder:`Optional — leave blank for entity default`,min:1,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 rounded-lg p-4`,children:[(0,Z.jsxs)(`label`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:M,onChange:e=>ne(e.target.checked),className:`w-4 h-4 text-primary-500 rounded focus:ring-primary-400`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Send multiple copies`})]}),M&&(0,Z.jsxs)(`div`,{className:`mt-3 flex items-center gap-3`,children:[(0,Z.jsx)(`label`,{className:`text-sm text-gray-600`,children:`How many?`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:1e3,value:re,onChange:e=>ie(Math.min(1e3,Math.max(1,parseInt(e.target.value)||1))),className:`w-24 px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400`}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-500`,children:`(max 1000)`})]}),M&&re>1&&(0,Z.jsxs)(`p`,{className:`mt-2 text-sm text-amber-600`,children:[`⚠️ This will send `,(0,Z.jsx)(`strong`,{children:re}),` messages to `,(0,Z.jsx)(`strong`,{children:p})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:ce,disabled:!ue||u.isPending,className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-500 hover:bg-primary-600 disabled:bg-gray-300 disabled:cursor-not-allowed rounded-lg transition-colors`,children:u.isPending?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin`}),`Sending...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(i_,{className:`w-4 h-4`}),M&&re>1?`Send ${re} Messages`:`Send Message`]})})]})]})]}),document.body)}function J_(){return crypto.randomUUID()}var Y_=`ServiceHub-Generated`,X_=`1.0.0`,Z_=[`Contoso`,`Fabrikam`,`Northwind`,`AdventureWorks`,`TailSpin`,`WideWorld`,`GraphicDesign`,`LitWare`,`Proseware`,`VanArsdel`],Q_=[`us-east-1`,`us-west-2`,`eu-west-1`,`ap-southeast-1`,`eu-central-1`],$_=[`production`,`staging`,`development`];function ev(e,t){let n=`ORD-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`CUST-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=Z_[Math.floor(Math.random()*Z_.length)],a=J_(),o=Array.from({length:Math.floor(Math.random()*5)+1},()=>({sku:`SKU-${Math.random().toString(36).substring(2,8).toUpperCase()}`,name:[`Wireless Mouse`,`USB-C Hub`,`Mechanical Keyboard`,`Monitor Stand`,`4K Webcam`,`Desk Lamp`,`Ergonomic Chair`][Math.floor(Math.random()*7)],quantity:Math.floor(Math.random()*5)+1,unitPrice:parseFloat((Math.random()*200+10).toFixed(2))})),s=o.reduce((e,t)=>e+t.quantity*t.unitPrice,0),c=s*.08,l=s+c,u=`pending`,d=null,f=1;if(e)switch(t){case`dlq-candidate`:u=`validation-failed`,d={code:`INVALID_SHIPPING_ADDRESS`,message:`The shipping address could not be validated. ZIP code does not match city/state combination.`,timestamp:new Date().toISOString(),retryable:!1};break;case`retry-loop`:u=`processing`,f=Math.floor(Math.random()*8)+3,d={code:`INVENTORY_LOCK_TIMEOUT`,message:`Failed to acquire inventory lock for SKU ${o[0].sku}. Concurrent update detected.`,timestamp:new Date().toISOString(),retryable:!0,attemptNumber:f};break;case`poison-message`:u=`corrupted`,d={code:`SCHEMA_VALIDATION_FAILED`,message:`Message body contains malformed JSON. Expected number for "quantity", received string.`,timestamp:new Date().toISOString(),retryable:!1};break;case`latency-spike`:u=`processing-slow`,d={code:`DOWNSTREAM_LATENCY`,message:`Payment gateway response time exceeded 30s threshold. Circuit breaker triggered.`,timestamp:new Date().toISOString(),latencyMs:Math.floor(Math.random()*45e3)+3e4};break}return{body:JSON.stringify({eventType:`OrderCreated`,eventVersion:`2.1`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-order-service`,data:{orderId:n,customerId:r,customerEmail:`customer.${r.toLowerCase()}@${i.toLowerCase()}.com`,status:u,items:o,pricing:{subtotal:parseFloat(s.toFixed(2)),tax:parseFloat(c.toFixed(2)),total:parseFloat(l.toFixed(2)),currency:`USD`},shipping:{method:[`standard`,`express`,`overnight`][Math.floor(Math.random()*3)],address:{street:`${Math.floor(Math.random()*9999)+1} ${[`Main`,`Oak`,`Pine`,`Maple`,`Cedar`][Math.floor(Math.random()*5)]} Street`,city:[`Seattle`,`Portland`,`San Francisco`,`Los Angeles`,`Denver`][Math.floor(Math.random()*5)],state:[`WA`,`OR`,`CA`,`CA`,`CO`][Math.floor(Math.random()*5)],zipCode:String(Math.floor(Math.random()*9e4)+1e4),country:`US`},estimatedDelivery:new Date(Date.now()+(Math.random()*7+3)*24*60*60*1e3).toISOString()},metadata:{userAgent:`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36`,ipAddress:`${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}.${Math.floor(Math.random()*255)}`,sessionId:J_()},...d&&{error:d}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`order-processing`,anomalyType:t,messageType:`OrderCreated`,source:`${i.toLowerCase()}-order-service`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],priority:o.some(e=>e.unitPrice>100)?`high`:`normal`,customerId:r,orderId:n},correlationId:a,sessionId:r,scenario:`order-processing`,anomalyType:t}}function tv(e,t){let n=`TXN-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`ORD-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=J_(),a=Z_[Math.floor(Math.random()*Z_.length)],o=parseFloat((Math.random()*2e3+10).toFixed(2)),s=[`credit_card`,`debit_card`,`paypal`,`bank_transfer`,`apple_pay`][Math.floor(Math.random()*5)],c=`completed`,l=null;if(e)switch(t){case`dlq-candidate`:c=`declined`,l={code:`CARD_DECLINED`,message:`The card was declined by the issuing bank. Reason: insufficient funds.`,declineCode:`insufficient_funds`,timestamp:new Date().toISOString()};break;case`retry-loop`:c=`pending`,l={code:`GATEWAY_TIMEOUT`,message:`Payment gateway did not respond within timeout period. Request will be retried.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*5)+2};break;case`poison-message`:c=`error`,l={code:`INVALID_CARD_NUMBER`,message:`Card number failed Luhn check validation. Possible data corruption.`,timestamp:new Date().toISOString()};break;case`latency-spike`:c=`processing`,l={code:`FRAUD_CHECK_DELAY`,message:`Extended fraud analysis required for high-value transaction.`,timestamp:new Date().toISOString(),analysisTimeMs:Math.floor(Math.random()*6e4)+3e4};break}return{body:JSON.stringify({eventType:`PaymentProcessed`,eventVersion:`1.3`,timestamp:new Date().toISOString(),source:`${a.toLowerCase()}-payment-gateway`,data:{transactionId:n,orderId:r,amount:o,currency:`USD`,paymentMethod:s,status:c,processorResponse:{code:c===`completed`?`APPROVED`:`DECLINED`,message:c===`completed`?`Transaction approved`:l?.message,authorizationCode:c===`completed`?Math.random().toString(36).substring(2,8).toUpperCase():null,avsResult:`Y`,cvvResult:`M`},billing:{name:`${[`John`,`Jane`,`Michael`,`Sarah`,`David`][Math.floor(Math.random()*5)]} ${[`Smith`,`Johnson`,`Williams`,`Brown`,`Jones`][Math.floor(Math.random()*5)]}`,email:`billing@${a.toLowerCase()}.com`,phone:`+1-${Math.floor(Math.random()*900)+100}-${Math.floor(Math.random()*900)+100}-${Math.floor(Math.random()*9e3)+1e3}`},riskScore:Math.floor(Math.random()*100),...l&&{error:l}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`payment-gateway`,anomalyType:t,messageType:`PaymentProcessed`,source:`${a.toLowerCase()}-payment-gateway`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],transactionId:n,orderId:r,paymentStatus:c,amount:String(o)},correlationId:i,scenario:`payment-gateway`,anomalyType:t}}function nv(e,t){let n=`NOTIF-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=J_(),i=Z_[Math.floor(Math.random()*Z_.length)],a=[`email`,`sms`,`push`,`webhook`],o=a[Math.floor(Math.random()*a.length)],s={email:[`order-confirmation`,`shipping-update`,`password-reset`,`welcome`,`invoice`],sms:[`otp-verification`,`delivery-alert`,`payment-confirmation`,`appointment-reminder`],push:[`new-message`,`price-drop`,`back-in-stock`,`flash-sale`],webhook:[`order-status`,`inventory-update`,`customer-event`,`refund-processed`]},c=s[o][Math.floor(Math.random()*s[o].length)],l=`delivered`,u=null;if(e)switch(t){case`dlq-candidate`:l=`bounced`,u={code:`RECIPIENT_NOT_FOUND`,message:`Email address does not exist or mailbox is full.`,bounceType:`hard`,timestamp:new Date().toISOString()};break;case`retry-loop`:l=`retrying`,u={code:`SMTP_TEMPORARY_FAILURE`,message:`Recipient server temporarily unavailable. Will retry.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*6)+2};break;case`poison-message`:l=`failed`,u={code:`TEMPLATE_RENDER_ERROR`,message:`Failed to render notification template. Missing required variable: {{customerName}}`,timestamp:new Date().toISOString()};break;case`latency-spike`:l=`queued`,u={code:`RATE_LIMITED`,message:`Notification rate limit exceeded. Message queued for delayed delivery.`,timestamp:new Date().toISOString(),estimatedDeliveryMs:Math.floor(Math.random()*3e5)+6e4};break}let d=Array.from({length:Math.floor(Math.random()*3)+1},()=>`user${Math.floor(Math.random()*1e4)}@${i.toLowerCase()}.com`);return{body:JSON.stringify({eventType:`NotificationSent`,eventVersion:`1.0`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-notification-service`,data:{notificationId:n,type:o,template:c,status:l,recipients:d,subject:o===`email`?`[${i}] Your ${c.replace(`-`,` `)} notification`:void 0,content:{preview:`This is a ${c} notification from ${i}. Your recent activity has triggered this automated message.`,variables:{companyName:i,timestamp:new Date().toISOString(),actionUrl:`https://${i.toLowerCase()}.com/action/${n}`}},delivery:{attempts:l===`delivered`?1:Math.floor(Math.random()*5)+1,provider:[`sendgrid`,`mailgun`,`twilio`,`firebase`][Math.floor(Math.random()*4)],sentAt:new Date().toISOString(),deliveredAt:l===`delivered`?new Date().toISOString():null},...u&&{error:u}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`notification-service`,anomalyType:t,messageType:`NotificationSent`,source:`${i.toLowerCase()}-notification-service`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],notificationType:o,template:c,notificationStatus:l},correlationId:r,scenario:`notification-service`,anomalyType:t}}function rv(e,t){let n=`INV-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=J_(),i=Z_[Math.floor(Math.random()*Z_.length)],a=Array.from({length:Math.floor(Math.random()*3)+1},()=>({sku:`SKU-${Math.random().toString(36).substring(2,8).toUpperCase()}`,productName:[`Laptop`,`Tablet`,`Headphones`,`Smartwatch`,`Camera`,`Speaker`][Math.floor(Math.random()*6)],warehouse:[`WH-EAST`,`WH-WEST`,`WH-CENTRAL`,`WH-SOUTH`][Math.floor(Math.random()*4)],previousQuantity:Math.floor(Math.random()*100),newQuantity:Math.floor(Math.random()*100),changeType:[`receipt`,`shipment`,`adjustment`,`transfer`][Math.floor(Math.random()*4)]})),o=`committed`,s=null;if(e)switch(t){case`dlq-candidate`:o=`rejected`,s={code:`NEGATIVE_INVENTORY`,message:`Cannot reduce inventory below zero for SKU ${a[0].sku}. Current: ${a[0].previousQuantity}, Requested change: -${a[0].previousQuantity+10}`,timestamp:new Date().toISOString()};break;case`retry-loop`:o=`pending`,s={code:`WAREHOUSE_SYNC_CONFLICT`,message:`Optimistic locking failure. Inventory was modified by another process.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*7)+3};break;case`poison-message`:o=`invalid`,s={code:`UNKNOWN_SKU`,message:`SKU ${a[0].sku} does not exist in the product catalog.`,timestamp:new Date().toISOString()};break;case`latency-spike`:o=`processing`,s={code:`CROSS_REGION_SYNC`,message:`Multi-region inventory synchronization in progress.`,timestamp:new Date().toISOString(),syncDurationMs:Math.floor(Math.random()*12e4)+6e4};break}return{body:JSON.stringify({eventType:`InventoryUpdated`,eventVersion:`2.0`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-inventory-service`,data:{eventId:n,status:o,items:a.map(e=>({...e,delta:e.newQuantity-e.previousQuantity,timestamp:new Date().toISOString()})),summary:{totalItemsAffected:a.length,totalUnitsChanged:a.reduce((e,t)=>e+Math.abs(t.newQuantity-t.previousQuantity),0)},audit:{initiatedBy:`system@${i.toLowerCase()}.com`,reason:[`customer-order`,`supplier-delivery`,`inventory-count`,`damaged-goods`][Math.floor(Math.random()*4)],referenceNumber:`REF-${Math.random().toString(36).substring(2,10).toUpperCase()}`},...s&&{error:s}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`inventory-update`,anomalyType:t,messageType:`InventoryUpdated`,source:`${i.toLowerCase()}-inventory-service`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],inventoryStatus:o,warehouseId:a[0].warehouse},correlationId:r,scenario:`inventory-update`,anomalyType:t}}function iv(e,t){let n=`UA-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=`USER-${Math.random().toString(36).substring(2,10).toUpperCase()}`,i=J_(),a=Z_[Math.floor(Math.random()*Z_.length)],o=[`login`,`logout`,`page_view`,`button_click`,`form_submit`,`search`,`purchase`],s=o[Math.floor(Math.random()*o.length)],c=`recorded`,l=null;if(e)switch(t){case`dlq-candidate`:c=`invalid`,l={code:`USER_NOT_FOUND`,message:`User ${r} does not exist in the system.`,timestamp:new Date().toISOString()};break;case`retry-loop`:c=`pending`,l={code:`ANALYTICS_UNAVAILABLE`,message:`Analytics ingestion service temporarily unavailable.`,timestamp:new Date().toISOString(),retryCount:Math.floor(Math.random()*4)+2};break;case`poison-message`:c=`corrupted`,l={code:`INVALID_TIMESTAMP`,message:`Event timestamp is in the future or malformed.`,timestamp:new Date().toISOString()};break;case`latency-spike`:c=`buffered`,l={code:`HIGH_VOLUME_PERIOD`,message:`Event buffered due to high ingestion volume.`,timestamp:new Date().toISOString(),bufferTimeMs:Math.floor(Math.random()*3e4)+1e4};break}return{body:JSON.stringify({eventType:`UserActivityTracked`,eventVersion:`1.2`,timestamp:new Date().toISOString(),source:`${a.toLowerCase()}-analytics-service`,data:{eventId:n,userId:r,sessionId:J_(),activityType:s,status:c,context:{page:`/${[`home`,`products`,`cart`,`checkout`,`account`,`orders`][Math.floor(Math.random()*6)]}`,referrer:[`google.com`,`facebook.com`,`direct`,`email-campaign`,`partner-site`][Math.floor(Math.random()*5)],device:{type:[`desktop`,`mobile`,`tablet`][Math.floor(Math.random()*3)],os:[`Windows`,`macOS`,`iOS`,`Android`][Math.floor(Math.random()*4)],browser:[`Chrome`,`Firefox`,`Safari`,`Edge`][Math.floor(Math.random()*4)]},geo:{country:`US`,region:[`California`,`Texas`,`New York`,`Florida`,`Washington`][Math.floor(Math.random()*5)],city:[`Los Angeles`,`Houston`,`New York`,`Miami`,`Seattle`][Math.floor(Math.random()*5)]}},metrics:{timeOnPage:Math.floor(Math.random()*300),scrollDepth:Math.floor(Math.random()*100),interactionCount:Math.floor(Math.random()*20)},...l&&{error:l}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`user-activity`,anomalyType:t,messageType:`UserActivityTracked`,source:`${a.toLowerCase()}-analytics-service`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],activityType:s,userId:r},correlationId:i,scenario:`user-activity`,anomalyType:t}}function av(e,t){let n=`ERR-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2,6).toUpperCase()}`,r=J_(),i=Z_[Math.floor(Math.random()*Z_.length)],a=[{code:`DATABASE_CONNECTION_FAILED`,severity:`critical`,service:`database-proxy`},{code:`EXTERNAL_API_TIMEOUT`,severity:`warning`,service:`integration-gateway`},{code:`VALIDATION_ERROR`,severity:`info`,service:`api-gateway`},{code:`RATE_LIMIT_EXCEEDED`,severity:`warning`,service:`rate-limiter`},{code:`AUTHENTICATION_FAILED`,severity:`warning`,service:`auth-service`},{code:`RESOURCE_EXHAUSTED`,severity:`critical`,service:`compute-service`}],o=a[Math.floor(Math.random()*a.length)],s=`logged`,c=null;if(e)switch(t){case`dlq-candidate`:s=`unrecoverable`,c={level:`P1`,team:`platform-oncall`,escalatedAt:new Date().toISOString()};break;case`retry-loop`:s=`recurring`,c={occurrenceCount:Math.floor(Math.random()*50)+10,firstSeen:new Date(Date.now()-Math.random()*36e5).toISOString(),lastSeen:new Date().toISOString()};break;case`poison-message`:s=`circuit-breaker-open`,c={circuitBreakerId:`CB-${o.service}`,openedAt:new Date().toISOString(),failureThreshold:5,currentFailures:Math.floor(Math.random()*10)+5};break;case`latency-spike`:s=`degraded`,c={p99Latency:Math.floor(Math.random()*1e4)+5e3,normalP99:200,degradationFactor:Math.floor(Math.random()*50)+10};break}return{body:JSON.stringify({eventType:`ErrorOccurred`,eventVersion:`1.1`,timestamp:new Date().toISOString(),source:`${i.toLowerCase()}-${o.service}`,data:{errorId:n,code:o.code,severity:o.severity,service:o.service,status:s,message:`${o.code.replace(/_/g,` `).toLowerCase()}: The ${o.service} encountered an issue while processing the request.`,stackTrace:`Error: ${o.code}\n at processRequest (/app/src/handlers/${o.service}.ts:142:15)\n at handleMessage (/app/src/core/messageProcessor.ts:87:22)\n at async ServiceBusReceiver.processMessage (/app/node_modules/@azure/service-bus/src/receivers/receiver.ts:234:9)`,context:{requestId:J_(),traceId:J_().replace(/-/g,``),spanId:Math.random().toString(16).substring(2,18),userId:Math.random()>.5?`USER-${Math.random().toString(36).substring(2,10).toUpperCase()}`:null},metadata:{hostname:`${o.service}-${Math.floor(Math.random()*10)}.${i.toLowerCase()}.internal`,podId:`${o.service}-${Math.random().toString(36).substring(2,10)}`,containerId:Math.random().toString(16).substring(2,14),kubernetesNamespace:`production`},...c&&{escalation:c}}},null,2),contentType:`application/json`,properties:{[Y_]:`true`,generatorVersion:X_,generatedAt:new Date().toISOString(),scenario:`error-handling`,anomalyType:t,messageType:`ErrorOccurred`,source:`${i.toLowerCase()}-${o.service}`,environment:$_[Math.floor(Math.random()*$_.length)],region:Q_[Math.floor(Math.random()*Q_.length)],errorCode:o.code,severity:o.severity,errorStatus:s},correlationId:r,scenario:`error-handling`,anomalyType:t}}var ov={"order-processing":ev,"payment-gateway":tv,"notification-service":nv,"inventory-update":rv,"user-activity":iv,"error-handling":av};function sv(e){let{volume:t,scenarios:n,anomalyRate:r}=e,i=[],a=[`dlq-candidate`,`retry-loop`,`poison-message`,`latency-spike`];for(let e=0;e{n&&c(n),r&&g(r)},[n,r]),(0,P.useEffect)(()=>{r||g(``)},[s,r]),!e)return null;let D=d===`queue`?l:u,O=e=>{b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ee=async()=>{if(!s||!h||y.length===0){m.error(`Please select a namespace, entity, and at least one scenario`);return}w(!0);let e=m.loading(`Generating messages...`);try{let n=sv({targetType:d,queueName:d===`queue`?h:void 0,topicName:d===`topic`?h:void 0,volume:_,scenarios:y,anomalyRate:x,includeStructuredData:!0}),r=0,a=0,c=[];for(let t=0;t{await H_.send(s,h,{body:e.body,contentType:e.contentType,properties:e.properties,correlationId:e.correlationId,sessionId:e.sessionId},d)}))).forEach(e=>{if(e.status===`fulfilled`)r++;else{a++;let t=e.reason,n=t?.response?.data?.message||t?.message||`Unknown error`;c.push(n)}}),t+10setTimeout(e,100))}m.dismiss(e),r>0&&await Promise.all([o.invalidateQueries({queryKey:[`messages`],refetchType:`active`}),o.invalidateQueries({queryKey:[`queues`,s],refetchType:`active`}),o.invalidateQueries({queryKey:[`topics`,s],refetchType:`active`}),o.invalidateQueries({queryKey:[`subscriptions`,s],refetchType:`active`})]),a===0?m.success(`✅ Generated ${r} messages successfully!`,{duration:4e3}):r>0?m.success(`Generated ${r} messages (${a} failed).\nCheck console for details.`,{duration:5e3}):m.error(`Failed to generate messages. ${c[0]||`Unknown error`}`,{duration:5e3}),r>0&&i?.(),(a===0||r>0)&&t()}catch(t){m.dismiss(e);let n=t instanceof Error?t.message:`Unknown error`;m.error(`Failed to generate messages: ${n}`,{duration:5e3})}finally{w(!1)}},k=s&&h&&y.length>0;return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200 bg-gradient-to-r from-primary-50 to-blue-50`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-primary-100 rounded-lg`,children:(0,Z.jsx)(m_,{className:`w-5 h-5 text-primary-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Message Generator`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Generate realistic test messages for demo & validation`})]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-3 p-4 bg-primary-50 border border-primary-200 rounded-lg`,children:[(0,Z.jsx)(Ug,{className:`w-5 h-5 text-primary-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-primary-800`,children:[(0,Z.jsx)(`p`,{className:`font-medium mb-1`,children:`About Generated Messages`}),(0,Z.jsxs)(`p`,{className:`text-primary-700`,children:[`All generated messages are tagged with `,(0,Z.jsx)(`code`,{className:`bg-primary-100 px-1 rounded`,children:cv}),` property for easy identification. Messages include realistic business scenarios with structured JSON bodies, headers, and configurable anomalies for AI Insights testing.`]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Target`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace...`}),a?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`Entity Type`}),(0,Z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>p(`queue`),className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`queue`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📥 Queue`}),(0,Z.jsx)(`button`,{onClick:()=>p(`topic`),className:`flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${d===`topic`?`bg-primary-500 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:`📢 Topic`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:d===`queue`?`Queue`:`Topic`}),(0,Z.jsxs)(`select`,{value:h,onChange:e=>g(e.target.value),disabled:!s,className:`w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsxs)(`option`,{value:``,children:[`Select `,d,`...`]}),D?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[d===`queue`?`📥`:`📢`,` `,e.name]},e.name))]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Volume`}),(0,Z.jsx)(`div`,{className:`flex gap-2`,children:uv.map(e=>(0,Z.jsx)(`button`,{onClick:()=>v(e),className:`flex-1 px-4 py-3 rounded-lg text-sm font-semibold transition-colors ${_===e?`bg-primary-500 text-white shadow-md`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:e},e))}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`Messages will be generated with varied timestamps and content`})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider`,children:`Scenarios`}),(0,Z.jsx)(`button`,{onClick:()=>b(y.length===Object.keys(dv).length?[]:lv()),className:`text-xs text-primary-600 hover:text-primary-700 font-medium`,children:y.length===Object.keys(dv).length?`Deselect All`:`Select All`})]}),(0,Z.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:Object.entries(dv).map(([e,t])=>{let n=t.icon,r=y.includes(e);return(0,Z.jsxs)(`button`,{onClick:()=>O(e),className:`flex items-start gap-3 p-3 rounded-lg text-left transition-all ${r?`bg-primary-50 border-2 border-primary-400 shadow-sm`:`bg-gray-50 border-2 border-transparent hover:bg-gray-100`}`,children:[(0,Z.jsx)(`div`,{className:`p-1.5 rounded-md ${r?`bg-primary-100`:`bg-gray-200`}`,children:(0,Z.jsx)(n,{className:`w-4 h-4 ${r?`text-primary-600`:`text-gray-500`}`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium ${r?`text-primary-700`:`text-gray-700`}`,children:t.label}),r&&(0,Z.jsx)(Se,{className:`w-3.5 h-3.5 text-primary-600`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 truncate`,children:t.description})]})]},e)})})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`h3`,{className:`text-sm font-semibold text-gray-700 uppercase tracking-wider flex items-center gap-2`,children:[(0,Z.jsx)(ne,{className:`w-4 h-4 text-amber-500`}),`Anomaly Rate`]}),(0,Z.jsxs)(`span`,{className:`text-sm font-semibold text-amber-600`,children:[x,`%`]})]}),(0,Z.jsx)(`input`,{type:`range`,min:`0`,max:`50`,value:x,onChange:e=>S(parseInt(e.target.value)),className:`w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-amber-500`}),(0,Z.jsxs)(`div`,{className:`flex justify-between text-xs text-gray-500`,children:[(0,Z.jsx)(`span`,{children:`0% (Normal)`}),(0,Z.jsx)(`span`,{children:`25% (Moderate)`}),(0,Z.jsx)(`span`,{children:`50% (Stress Test)`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`Anomalous messages simulate: DLQ candidates, retry loops, poison messages, and latency spikes. These help test AI Insights pattern detection.`})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 pt-4`,children:[(0,Z.jsxs)(`button`,{onClick:()=>E(!T),className:`flex items-center gap-2 text-sm text-gray-600 hover:text-gray-800`,children:[(0,Z.jsx)(d_,{className:`w-4 h-4`}),T?`Hide Cleanup Options`:`Show Cleanup Options`]}),T&&(0,Z.jsxs)(`div`,{className:`mt-3 p-4 bg-red-50 border border-red-200 rounded-lg`,children:[(0,Z.jsxs)(`p`,{className:`text-sm text-red-800 mb-3`,children:[(0,Z.jsx)(`strong`,{children:`Cleanup Generated Messages`}),(0,Z.jsx)(`br`,{}),`This will purge all messages with the `,(0,Z.jsx)(`code`,{className:`bg-red-100 px-1 rounded`,children:`ServiceHub-Generated`}),` property. Real messages will NOT be affected.`]}),(0,Z.jsx)(`button`,{className:`px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm font-medium rounded-lg transition-colors`,onClick:()=>{m(`Cleanup feature requires backend support. Messages can be identified by the ServiceHub-Generated property.`,{icon:`🧹`,duration:5e3})},children:`Purge Generated Messages`})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[y.length,` scenario(s) × `,_,` messages = `,(0,Z.jsx)(`strong`,{children:y.length>0?_:0}),` total`]}),(0,Z.jsxs)(`div`,{className:`flex gap-3`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:ee,disabled:!k||C,className:`flex items-center gap-2 px-6 py-2 text-sm font-medium rounded-lg transition-colors ${k&&!C?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-gray-200 text-gray-400 cursor-not-allowed`}`,children:C?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Jg,{className:`w-4 h-4 animate-spin`}),`Generating...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(m_,{className:`w-4 h-4`}),`Generate Messages`]})})]})]})]})]}),document.body)}function pv({namespaceId:e,queueName:t,entityType:n=`queue`,topicName:r,subscriptionName:i,environment:a,onMessageSent:o,onMessagesGenerated:s}){let c=a?.toLowerCase()===`prod`,[l,u]=(0,P.useState)(!1),[d,p]=(0,P.useState)(null),[h,g]=(0,P.useState)(!1),_=(0,P.useRef)(null),v=f(),y=e&&(t||r&&i);(0,P.useEffect)(()=>{let e=e=>{_.current&&!_.current.contains(e.target)&&u(!1)};return l&&document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[l]);let b=()=>{v.invalidateQueries({queryKey:[`messages`]}),v.invalidateQueries({queryKey:[`queues`]}),v.invalidateQueries({queryKey:[`topics`]}),v.invalidateQueries({queryKey:[`subscriptions`]}),m.success(`Data refreshed`)};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`fixed bottom-8 right-8 z-50`,ref:_,children:[(0,Z.jsxs)(`div`,{className:` - absolute bottom-16 right-0 - flex flex-col gap-2 - transition-all duration-200 ease-out - ${l?`opacity-100 translate-y-0`:`opacity-0 translate-y-4 pointer-events-none`} - `,children:[(0,Z.jsxs)(`button`,{onClick:()=>{u(!1),b()},className:` - flex items-center gap-3 - px-4 py-3 - bg-white hover:bg-green-50 - border border-gray-200 hover:border-green-300 - rounded-xl shadow-lg hover:shadow-xl - transition-all duration-150 - group - `,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-green-100 rounded-lg group-hover:bg-green-200 transition-colors`,children:(0,Z.jsx)(Ee,{className:`w-5 h-5 text-green-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Refresh All`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Update queues & messages`})]})]}),c&&(0,Z.jsxs)(`div`,{className:`px-3 py-1.5 text-[11px] font-medium text-amber-700 bg-amber-50 border border-amber-200 rounded-lg mb-2 flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{children:`⚠`}),` Production — destructive actions disabled`]}),(0,Z.jsxs)(`button`,{onClick:c?void 0:async()=>{if(!e){m.error(`Please select a namespace first`);return}if(n===`topic`){if(!r||!i){m.error(`Please select a subscription to dead-letter messages`);return}}else if(!t){m.error(`Please select a queue first`);return}g(!0),u(!1);try{let a;n===`topic`&&r&&i?(a=await H_.deadLetter(e,r,3,`TestingDLQ`,`Manually moved to DLQ for testing purposes via ServiceHub UI`,`topic`,i),m.success(`✅ Moved ${a.deadLetteredCount} messages to DLQ from ${r}/${i}`)):t&&(a=await H_.deadLetter(e,t,3,`TestingDLQ`,`Manually moved to DLQ for testing purposes via ServiceHub UI`,`queue`),m.success(`✅ Moved ${a.deadLetteredCount} messages to DLQ from ${t}`)),a&&a.deadLetteredCount>0?await Promise.all([v.invalidateQueries({queryKey:[`messages`],refetchType:`active`}),v.invalidateQueries({queryKey:[`queues`,e],refetchType:`active`}),v.invalidateQueries({queryKey:[`topics`,e],refetchType:`active`}),v.invalidateQueries({queryKey:[`subscriptions`,e],refetchType:`active`})]):a&&a.deadLetteredCount===0&&m(`No messages available to dead-letter`,{icon:`ℹ️`})}catch(e){let t=e,n=t?.response?.data?.detail||t?.response?.data?.message||t?.message||`Failed to dead-letter messages`;m.error(`DLQ Error: ${n}`)}finally{g(!1)}},disabled:!y||h||c,className:` - flex items-center gap-3 - px-4 py-3 - border rounded-xl shadow-lg - transition-all duration-150 - group - ${!y||c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-red-50 border-gray-200 hover:border-red-300 hover:shadow-xl`} - `,title:c?`Quick Actions are disabled for Production namespaces`:`For testing: moves up to 3 messages from the active queue to the dead-letter queue`,children:[(0,Z.jsx)(`div`,{className:`p-2 rounded-lg transition-colors ${!y||c?`bg-gray-200`:`bg-red-100 group-hover:bg-red-200`}`,children:(0,Z.jsx)(o_,{className:`w-5 h-5 ${!y||c?`text-gray-400`:`text-red-600`}`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold ${!y||c?`text-gray-400`:`text-gray-800`}`,children:h?`Moving...`:`Test DLQ`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 max-w-[180px]`,children:e?n===`topic`?!r||!i?`Select a subscription first`:`Move up to 3 test msgs to DLQ`:t?`Move up to 3 test msgs to DLQ`:`Select a queue first`:`Select a namespace first`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>{u(!1),p(`generate`)},disabled:c,className:` - flex items-center gap-3 - px-4 py-3 - border rounded-xl shadow-lg - transition-all duration-150 - group - ${c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-amber-50 border-gray-200 hover:border-amber-300 hover:shadow-xl`} - `,title:c?`Quick Actions are disabled for Production namespaces`:void 0,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-amber-100 rounded-lg group-hover:bg-amber-200 transition-colors`,children:(0,Z.jsx)(m_,{className:`w-5 h-5 text-amber-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Generate Messages`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Create realistic test data`})]})]}),(0,Z.jsxs)(`button`,{onClick:()=>{u(!1),p(`send`)},disabled:c,className:` - flex items-center gap-3 - px-4 py-3 - border rounded-xl shadow-lg - transition-all duration-150 - group - ${c?`bg-gray-100 border-gray-200 cursor-not-allowed opacity-50`:`bg-white hover:bg-sky-50 border-gray-200 hover:border-sky-300 hover:shadow-xl`} - `,title:c?`Quick Actions are disabled for Production namespaces`:void 0,children:[(0,Z.jsx)(`div`,{className:`p-2 bg-sky-100 rounded-lg group-hover:bg-sky-200 transition-colors`,children:(0,Z.jsx)(i_,{className:`w-5 h-5 text-sky-600`})}),(0,Z.jsxs)(`div`,{className:`text-left`,children:[(0,Z.jsx)(`div`,{className:`text-sm font-semibold text-gray-800`,children:`Send Message`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:`Send a single message`})]})]})]}),(0,Z.jsx)(`button`,{onClick:()=>u(!l),className:` - flex items-center justify-center - w-14 h-14 - bg-gradient-to-br from-sky-500 to-sky-600 hover:from-sky-600 hover:to-sky-700 - text-white - rounded-full shadow-lg hover:shadow-xl - transition-all duration-200 ease-out - ring-4 ring-sky-200 ring-offset-2 - ${l?`rotate-45`:`rotate-0`} - `,title:l?`Close menu`:`Open message menu`,children:l?(0,Z.jsx)(Fe,{className:`w-6 h-6`}):(0,Z.jsx)(we,{className:`w-6 h-6`})})]}),(0,Z.jsx)(q_,{isOpen:d===`send`,onClose:()=>p(null),onSend:e=>{let t=e.messageCount,n=`${e.entityType===`topic`?`📢`:`📥`} ${e.entity}`;m.success(t>1?`Sent ${t} messages to ${n}`:`Message sent to ${n}`),o?.(e),p(null)},defaultNamespaceId:e,defaultQueueName:t}),(0,Z.jsx)(fv,{isOpen:d===`generate`,onClose:()=>p(null),defaultNamespaceId:e,defaultEntityName:n===`topic`?r:t,onGenerated:()=>{s?.()}})]})}var mv=[{id:`page-dashboard`,label:`Dashboard`,description:`Multi-namespace overview`,group:`Pages`,icon:(0,Z.jsx)(Kg,{className:`w-4 h-4`}),keywords:`home overview`},{id:`page-messages`,label:`Messages`,description:`Browse and send messages`,group:`Pages`,icon:(0,Z.jsx)(Xg,{className:`w-4 h-4`}),keywords:`queue browse send`},{id:`page-scheduled`,label:`Scheduled Messages`,description:`View and cancel scheduled deliveries`,group:`Pages`,icon:(0,Z.jsx)(A,{className:`w-4 h-4`}),keywords:`future timed deliver`},{id:`page-correlation`,label:`Correlation Explorer`,description:`Trace messages by correlation ID`,group:`Pages`,icon:(0,Z.jsx)(D,{className:`w-4 h-4`}),keywords:`trace journey timeline correlation`},{id:`page-dlq`,label:`DLQ History`,description:`Dead-letter queue audit trail`,group:`Pages`,icon:(0,Z.jsx)(He,{className:`w-4 h-4`}),keywords:`dead letter poisoned failed`},{id:`page-rules`,label:`Auto-Replay Rules`,description:`Manage auto-replay configuration`,group:`Pages`,icon:(0,Z.jsx)(Ee,{className:`w-4 h-4`}),keywords:`replay retry automation`},{id:`page-health`,label:`Health`,description:`API and service health status`,group:`Pages`,icon:(0,Z.jsx)(je,{className:`w-4 h-4`}),keywords:`status ping uptime`},{id:`page-connect`,label:`Connect`,description:`Add or manage Service Bus namespaces`,group:`Pages`,icon:(0,Z.jsx)(r_,{className:`w-4 h-4`}),keywords:`namespace add connection string`},{id:`page-help`,label:`Help`,description:`Quick reference and shortcuts`,group:`Pages`,icon:(0,Z.jsx)(Ge,{className:`w-4 h-4`}),keywords:`docs guide keyboard`}],hv={"page-dashboard":`/dashboard`,"page-messages":`/messages`,"page-scheduled":`/scheduled`,"page-correlation":`/correlation`,"page-dlq":`/dlq-history`,"page-rules":`/rules`,"page-health":`/health`,"page-connect":`/connect`,"page-help":`/help`};function gv(e,t){if(!e)return!0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0;for(let e=0;e{e&&(a(``),s(0),setTimeout(()=>c.current?.focus(),30))},[e]);let u=(0,P.useMemo)(()=>{let e=mv.map(e=>({...e,action:()=>{n(hv[e.id]),t()}})),i=r.map(e=>({id:`ns-${e.id}`,label:e.displayName||e.name,description:e.environment?`${e.environment} namespace`:`Namespace`,group:`Namespaces`,icon:(0,Z.jsx)(ie,{className:`w-4 h-4 text-blue-500`}),keywords:e.name+` `+(e.environment||``),action:()=>{n(`/?namespace=${e.id}`),t()}})),a=r.flatMap(e=>[{id:`action-dlq-${e.id}`,label:`Browse DLQ — ${e.displayName||e.name}`,description:`View dead-letter messages`,group:`Actions`,icon:(0,Z.jsx)(He,{className:`w-4 h-4 text-red-500`}),keywords:`dead letter queue`,action:()=>{n(`/messages?namespace=${e.id}&tab=dlq`),t()}},{id:`action-scheduled-${e.id}`,label:`Scheduled — ${e.displayName||e.name}`,description:`View scheduled messages`,group:`Actions`,icon:(0,Z.jsx)(A,{className:`w-4 h-4 text-purple-500`}),keywords:`future timed`,action:()=>{n(`/scheduled?namespace=${e.id}`),t()}}]);return[...e,...i,...a]},[r,n,t]),d=(0,P.useMemo)(()=>i?u.map(e=>({item:e,score:_v(i,e)})).filter(({score:e})=>e>0).sort((e,t)=>t.score-e.score).map(({item:e})=>e):u,[u,i]),f=(0,P.useMemo)(()=>{let e=[],t=new Set;for(let n of d)t.has(n.group)||(t.add(n.group),e.push({label:n.group,items:[]})),e[e.length-1].items.push(n);return e},[d]),p=(0,P.useMemo)(()=>d,[d]);(0,P.useEffect)(()=>{s(e=>Math.max(0,Math.min(e,p.length-1)))},[p.length]),(0,P.useEffect)(()=>{l.current&&l.current.querySelector(`[data-active="true"]`)?.scrollIntoView({block:`nearest`})},[o]);let m=(0,P.useCallback)(e=>{e.key===`ArrowDown`?(e.preventDefault(),s(e=>Math.min(e+1,p.length-1))):e.key===`ArrowUp`?(e.preventDefault(),s(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),p[o]?.action()):e.key===`Escape`&&t()},[p,o,t]);if(!e)return null;let h=0;return(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/40 backdrop-blur-sm`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative w-full max-w-xl mx-4 bg-white rounded-2xl shadow-2xl overflow-hidden border border-gray-200 flex flex-col max-h-[60vh]`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3 border-b border-gray-100`,children:[(0,Z.jsx)(_e,{className:`w-4 h-4 text-gray-400 shrink-0`}),(0,Z.jsx)(`input`,{ref:c,type:`text`,value:i,onChange:e=>{a(e.target.value),s(0)},onKeyDown:m,placeholder:`Search pages, namespaces, actions…`,className:`flex-1 bg-transparent text-sm text-gray-900 placeholder-gray-400 outline-none`,autoComplete:`off`,spellCheck:!1}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-400 shrink-0 hidden sm:block`,children:`ESC to close`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors sm:hidden`,"aria-label":`Close`,children:(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5 text-gray-400`})})]}),(0,Z.jsxs)(`ul`,{ref:l,className:`overflow-y-auto flex-1 py-2`,role:`listbox`,children:[f.length===0&&(0,Z.jsxs)(`li`,{className:`px-4 py-8 text-center text-sm text-gray-400`,children:[`No results for “`,i,`”`]}),f.map(e=>(0,Z.jsxs)(`li`,{children:[(0,Z.jsx)(`div`,{className:`px-4 py-1.5 text-[10px] font-semibold uppercase tracking-widest ${yv[e.label]}`,children:e.label}),(0,Z.jsx)(`ul`,{children:e.items.map(e=>{let t=h++,n=t===o;return(0,Z.jsxs)(`li`,{"data-active":n,role:`option`,"aria-selected":n,className:`flex items-center gap-3 px-4 py-2.5 cursor-pointer transition-colors ${n?`bg-primary-50`:`hover:bg-gray-50`}`,onClick:e.action,onMouseEnter:()=>s(t),children:[(0,Z.jsx)(`span`,{className:`shrink-0 ${n?`text-primary-600`:`text-gray-400`}`,children:e.icon}),(0,Z.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`span`,{className:`block text-sm font-medium truncate ${n?`text-primary-700`:`text-gray-800`}`,children:(0,Z.jsx)(vv,{text:e.label,query:i})}),e.description&&(0,Z.jsx)(`span`,{className:`block text-xs text-gray-400 truncate`,children:e.description})]}),n&&(0,Z.jsx)(ze,{className:`w-3.5 h-3.5 text-primary-400 shrink-0`})]},e.id)})})]},e.label))]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-100 px-4 py-2 flex items-center gap-4 text-[11px] text-gray-400`,children:[(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`↑↓`}),` navigate`]}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`↵`}),` select`]}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`Esc`}),` close`]})]})]})]})}var xv=[{group:`Navigation`,items:[{keys:[`⌘`,`K`],label:`Open command palette`},{keys:[`?`],label:`Show this shortcuts list`}]},{group:`Message List`,items:[{keys:[`J`],label:`Next message`},{keys:[`K`],label:`Previous message`},{keys:[`Enter`],label:`Open message detail`},{keys:[`Esc`],label:`Close detail panel`}]},{group:`Global`,items:[{keys:[`Esc`],label:`Close any open dialog or panel`}]}];function Sv({open:e,onClose:t}){return(0,P.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,role:`dialog`,"aria-modal":`true`,"aria-label":`Keyboard shortcuts`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/30 backdrop-blur-[2px]`,onClick:t}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-2xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden border border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-4 border-b border-gray-100`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-gray-800 font-semibold text-sm`,children:[(0,Z.jsx)(Wg,{className:`w-4 h-4 text-gray-500`}),`Keyboard Shortcuts`]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,"aria-label":`Close`,children:(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`px-5 py-4 space-y-4`,children:xv.map(e=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-2`,children:e.group}),(0,Z.jsx)(`ul`,{className:`space-y-1.5`,children:e.items.map(e=>(0,Z.jsxs)(`li`,{className:`flex items-center justify-between text-sm`,children:[(0,Z.jsx)(`span`,{className:`text-gray-600`,children:e.label}),(0,Z.jsx)(`span`,{className:`flex items-center gap-1`,children:e.keys.map(e=>(0,Z.jsx)(`kbd`,{className:`px-1.5 py-0.5 text-xs font-mono bg-gray-100 border border-gray-200 rounded text-gray-700 leading-none`,children:e},e))})]},e.label))})]},e.group))}),(0,Z.jsxs)(`div`,{className:`px-5 py-3 border-t border-gray-100 text-center text-xs text-gray-400`,children:[`Press `,(0,Z.jsx)(`kbd`,{className:`font-mono bg-gray-100 px-1 rounded`,children:`?`}),` anywhere to toggle`]})]})]}):null}function Cv(){let[e]=k(),t=f(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1);(0,P.useEffect)(()=>{if(!Be()){let e=setTimeout(()=>r(!0),800);return()=>clearTimeout(e)}},[]);let c=(0,P.useCallback)(()=>r(!0),[]);(0,P.useEffect)(()=>(window.addEventListener(`servicehub:start-tour`,c),()=>window.removeEventListener(`servicehub:start-tour`,c)),[c]),(0,P.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),a(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,P.useEffect)(()=>{let e=()=>a(!0);return window.addEventListener(`servicehub:open-palette`,e),()=>window.removeEventListener(`servicehub:open-palette`,e)},[]),(0,P.useEffect)(()=>{let e=e=>{let t=e.target?.tagName;t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.key===`?`&&(e.preventDefault(),s(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let l=e.get(`namespace`),u=e.get(`queue`),d=e.get(`topic`),p=e.get(`subscription`),m=window.location.pathname===`/messages`,{data:h}=N(),g=h?.find(e=>e.id===l),_=g?.environment===`dev`&&g?.hasManagePermission===!0,v=d?`topic`:`queue`,y=u||d||``;return(0,Z.jsxs)(`div`,{className:`h-screen flex flex-col bg-gray-50`,children:[(0,Z.jsx)(g_,{}),(0,Z.jsxs)(`div`,{className:`flex flex-1 overflow-hidden`,children:[(0,Z.jsx)(z_,{}),(0,Z.jsx)(`main`,{className:`flex-1 overflow-hidden flex flex-col`,children:(0,Z.jsx)(he,{})})]}),m&&_&&(0,Z.jsx)(pv,{namespaceId:l,queueName:y,entityType:v,topicName:d,subscriptionName:p,environment:g?.environment,onMessageSent:()=>{t.invalidateQueries({queryKey:[`messages`],refetchType:`none`}),t.invalidateQueries({queryKey:[`queues`],refetchType:`none`}),t.invalidateQueries({queryKey:[`topics`],refetchType:`none`}),t.invalidateQueries({queryKey:[`subscriptions`],refetchType:`none`})},onMessagesGenerated:()=>{t.invalidateQueries({queryKey:[`messages`],refetchType:`none`}),t.invalidateQueries({queryKey:[`queues`],refetchType:`none`}),t.invalidateQueries({queryKey:[`topics`],refetchType:`none`}),t.invalidateQueries({queryKey:[`subscriptions`],refetchType:`none`})}}),(0,Z.jsx)(Ke,{isActive:n,onComplete:()=>r(!1)}),(0,Z.jsx)(bv,{open:i,onClose:()=>a(!1)}),(0,Z.jsx)(Sv,{open:o,onClose:()=>s(!1)}),(0,Z.jsx)(B_,{})]})}function wv(e){let t=new Date().getTime()-e.getTime(),n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24);return n<60?`just now`:r<60?`${r}m ago`:i<24?`${i}h ago`:`${a}d ago`}var Tv={success:{icon:x,label:`Normal`,tooltip:`First delivery attempt (delivery count = 1)`,bgColor:`bg-green-100`,textColor:`text-green-700`,iconColor:`text-green-600`},warning:{icon:ne,label:`Retried`,tooltip:`Message has been retried (delivery count > 1)`,bgColor:`bg-amber-100`,textColor:`text-amber-700`,iconColor:`text-amber-600`},error:{icon:Le,label:`Dead-Letter`,tooltip:`Message is in the dead-letter queue`,bgColor:`bg-red-100`,textColor:`text-red-700`,iconColor:`text-red-600`}};function Ev({status:e,deliveryCount:t}){let n=Tv[e],r=n.icon,i=t!==void 0&&e!==`success`?`ServiceHub Assessment: ${n.tooltip} — Delivery count: ${t}`:n.tooltip;return(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${n.bgColor} ${n.textColor} cursor-pointer transition-opacity hover:opacity-80`,title:i,children:[(0,Z.jsx)(r,{size:12,className:n.iconColor}),n.label]})}function Dv(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_.-]+/g,` `).trim()}var Ov=(0,P.memo)(function({message:e,isSelected:t,onClick:n}){let r=(0,P.useMemo)(()=>e.eventType?Dv(e.eventType):e.displayTitle?Dv(e.displayTitle):`Message`,[e.eventType,e.displayTitle]);return(0,Z.jsxs)(`div`,{onClick:n,className:` - px-4 py-4 cursor-pointer transition-colors border-b border-gray-100 - ${t?`bg-primary-50 border-l-4 border-l-primary-500`:`bg-transparent hover:bg-gray-50 border-l-4 border-l-transparent`} - `,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`span`,{className:`font-bold text-base text-gray-900 truncate flex-1 mr-2`,children:r}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-400 cursor-help whitespace-nowrap`,title:e.enqueuedTime.toISOString(),children:wv(e.enqueuedTime)})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(Ev,{status:e.status,deliveryCount:e.deliveryCount}),e.scheduledEnqueueTime&&(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-700`,title:`Scheduled for ${new Date(e.scheduledEnqueueTime).toLocaleString()}`,children:[(0,Z.jsx)(A,{size:12}),`Scheduled`]}),e.hasAIInsight&&(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-primary-100 text-primary-700`,children:[(0,Z.jsx)(Cg,{size:12}),`AI`]})]}),(0,Z.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600 leading-relaxed overflow-hidden`,style:{display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`},children:e.preview})]})});function kv({messages:e,selectedId:t,onSelectMessage:n,queueTab:r,onQueueTabChange:i,activeCounts:a,hasMoreMessages:o=!1,isLoadingMore:s=!1,onLoadMore:c}){let l=(0,P.useRef)(null),u=(0,P.useMemo)(()=>e.filter(e=>e.queueType===r),[e,r]),d=(0,P.useCallback)(e=>{e>=0&&e{let e=e=>{if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||!u.length)return;let n=u.findIndex(e=>e.id===t),r=-1;e.key===`j`||e.key===`ArrowDown`?(e.preventDefault(),r=n0?n-1:n),r!==-1&&r!==n&&d(r)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u,t,d]);let f=Ye({count:u.length,getScrollElement:()=>l.current,estimateSize:()=>148,measureElement:e=>e.getBoundingClientRect().height,overscan:10}),p=f.getVirtualItems();return(0,Z.jsxs)(`div`,{className:`flex flex-col h-full border-r border-gray-200 bg-white`,style:{width:420},children:[(0,Z.jsxs)(`div`,{className:`flex border-b border-gray-200 bg-white shrink-0`,children:[(0,Z.jsxs)(`button`,{onClick:()=>i(`active`),className:` - flex-1 px-4 py-3 text-sm font-medium transition-colors relative - ${r===`active`?`text-primary-600 border-b-2 border-primary-500`:`text-gray-500 hover:text-gray-700`} - `,children:[`Active (`,a.active.toLocaleString(),`)`]}),(0,Z.jsx)(`button`,{onClick:()=>i(`deadletter`),className:` - flex-1 px-4 py-3 text-sm font-medium transition-colors relative - ${r===`deadletter`?`text-primary-600 border-b-2 border-primary-500`:`text-gray-500 hover:text-gray-700`} - `,children:(0,Z.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[`Dead-Letter (`,a.deadletter.toLocaleString(),`)`,a.deadletter>0&&(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-red-500`})]})})]}),(0,Z.jsxs)(`div`,{ref:l,className:`flex-1 overflow-auto`,children:[(0,Z.jsx)(`div`,{style:{height:f.getTotalSize(),width:`100%`,position:`relative`},children:p.map(e=>{let r=u[e.index];return(0,Z.jsx)(`div`,{ref:f.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:(0,Z.jsx)(Ov,{message:r,isSelected:r.id===t,onClick:()=>n(r.id)})},e.key)})}),u.length===0&&(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-gray-500 p-8`,children:[(0,Z.jsx)(x,{size:48,className:`text-gray-300 mb-4`}),(0,Z.jsx)(`p`,{className:`text-lg font-medium`,children:`No messages`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 text-center max-w-xs`,children:r===`deadletter`?`Dead-letter queue is empty — no messages have been dead-lettered`:`Active queue is empty — no messages are currently pending`})]})]}),o&&u.length>0&&c&&(0,Z.jsx)(`div`,{className:`border-t border-gray-200 bg-white p-3 shrink-0`,children:(0,Z.jsx)(`button`,{onClick:c,disabled:s,className:`w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors ${s?`bg-gray-100 text-gray-500 cursor-not-allowed`:`bg-primary-50 text-primary-700 hover:bg-primary-100 border border-primary-200`}`,children:s?(0,Z.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-primary-300 border-t-primary-600 rounded-full animate-spin`}),`Loading more...`]}):`📥 Load More Messages`})})]})}var Av=`servicehub:detail-tab`,jv=[`properties`,`body`,`ai`,`headers`],Mv=`properties`;function Nv(){let[e,t]=(0,P.useState)(()=>{if(typeof window>`u`)return Mv;try{let e=localStorage.getItem(Av);if(e&&jv.includes(e))return e}catch{}return Mv}),n=(0,P.useCallback)(e=>{jv.includes(e)||(e=Mv),t(e);try{localStorage.setItem(Av,e)}catch{}},[]);return(0,P.useEffect)(()=>{let e=e=>{e.key===Av&&e.newValue&&jv.includes(e.newValue)&&t(e.newValue)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),[e,n]}function Pv({label:e,value:t,mono:n=!1}){return(0,Z.jsxs)(`div`,{className:`py-3 grid grid-cols-[180px_1fr] gap-4 border-b border-gray-100 last:border-0`,children:[(0,Z.jsx)(`dt`,{className:`text-sm font-medium text-gray-500`,children:e}),(0,Z.jsx)(`dd`,{className:`text-sm text-gray-900 break-all ${n?`font-mono`:``}`,children:t||`-`})]})}var Fv={test:{label:`Test/Manual`,description:`This message was manually moved to DLQ for testing or inspection purposes. Not a production failure.`,color:`gray`},warning:{label:`Warning`,description:`Real dead-letter message with normal retry behavior (delivery count ≤ 5).`,color:`amber`},critical:{label:`Critical`,description:`Message failed 6+ delivery attempts - indicates persistent processing failure.`,color:`red`}};function Iv(e){let t=(e.deadLetterReason||``).toLowerCase(),n=(e.deadLetterSource||``).toLowerCase();return t.includes(`test`)||t.includes(`demo`)||t.includes(`manual`)||n.includes(`servicehub`)||n.includes(`testing`)?`test`:e.deliveryCount>5?`critical`:`warning`}function Lv(e){if(!(e.queueType===`deadletter`||e.deadLetterReason))return null;let t=e.deadLetterReason?.trim(),n=e.deadLetterSource?.trim(),r=t||`Not provided by Azure Service Bus`,i=n||`Not provided by Azure Service Bus`,a=!t||!n,o=Iv(e),s=``,c=[];return a?(s=`Azure Service Bus did not provide complete dead-letter metadata. The message state information is incomplete.`,c.push(`Check Azure Portal for additional message properties`),c.push(`Verify Service Bus SDK version supports complete metadata`),c.push(`Consider checking application logs for the original failure context`),{reason:r,description:i,interpretation:s,guidance:c,severity:`warning`,hasIncompleteData:a}):(o===`test`?(s=`This appears to be a test or manually dead-lettered message, likely used for inspection or system validation.`,c.push(`Review whether this test message should be purged or kept for reference`),c.push(`Verify test data is not mixed with production messages`)):e.deliveryCount>5?(s=`This message failed multiple delivery attempts, indicating a persistent processing issue.`,c.push(`Check application logs for repeated failure patterns`),c.push(`Review error details in the message body`),c.push(`Verify downstream service availability and health`)):e.deliveryCount>1?(s=`This message was retried before being dead-lettered, suggesting a transient or resolvable issue.`,c.push(`Review the message body for error details`),c.push(`Check if the underlying issue has been resolved before replaying`)):(s=`This message was dead-lettered on the first delivery attempt.`,c.push(`Review the message body for validation or schema errors`),c.push(`Check application logs for the original processing failure`)),{reason:r,description:i,interpretation:s,guidance:c,severity:o,hasIncompleteData:a})}function Rv({message:e}){let t=O(),[n]=k(),r=n.get(`namespace`)??``,i=e.properties?.correlationId,a=Lv(e),o=a?Fv[a.severity]:null;return(0,Z.jsxs)(`div`,{className:`p-4 space-y-4`,children:[a&&o&&(0,Z.jsxs)(Z.Fragment,{children:[a.hasIncompleteData&&(0,Z.jsxs)(`div`,{className:`mb-3 rounded-lg border-2 border-yellow-300 bg-yellow-50 px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-yellow-800 text-sm font-medium`,children:[(0,Z.jsx)(ne,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{children:`Incomplete Azure Data`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-yellow-700 mt-1`,children:`Azure Service Bus did not provide complete dead-letter metadata. Analysis may be limited.`})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg overflow-hidden border-2 ${a.severity===`test`?`bg-gray-50 border-gray-200`:a.severity===`critical`?`bg-red-50 border-red-300`:`bg-amber-50 border-amber-300`}`,children:[(0,Z.jsxs)(`div`,{className:`px-4 py-3 border-b flex items-center gap-2 ${a.severity===`test`?`bg-gray-100 border-gray-200`:a.severity===`critical`?`bg-red-100 border-red-200`:`bg-amber-100 border-amber-200`}`,children:[(0,Z.jsx)(ne,{className:`w-5 h-5 ${a.severity===`test`?`text-gray-500`:a.severity===`critical`?`text-red-600`:`text-amber-600`}`}),(0,Z.jsx)(`span`,{className:`font-semibold ${a.severity===`test`?`text-gray-700`:a.severity===`critical`?`text-red-800`:`text-amber-800`}`,children:`Dead-Letter Queue Message`}),(0,Z.jsxs)(`span`,{className:`ml-auto text-xs px-2 py-1 rounded-full font-medium cursor-help flex items-center gap-1 ${a.severity===`test`?`bg-gray-200 text-gray-700`:a.severity===`critical`?`bg-red-200 text-red-800`:`bg-amber-200 text-amber-800`}`,title:`⚠️ ServiceHub Assessment (Not Azure Data): ${o.description}`,children:[o.label,(0,Z.jsx)(Ge,{className:`w-3 h-3 opacity-70`})]})]}),(0,Z.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`text-xs font-semibold uppercase tracking-wide mb-2 flex items-center gap-1 text-gray-700`,children:[(0,Z.jsx)(`span`,{className:`bg-green-100 text-green-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`FACT`}),`Azure Service Bus Data`]}),(0,Z.jsxs)(`div`,{className:`bg-white border border-gray-200 rounded-lg p-3 space-y-2`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`DeadLetterReason`}),(0,Z.jsx)(`div`,{className:`text-sm font-mono text-gray-900 break-all`,children:a.reason})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`DeadLetterErrorDescription`}),(0,Z.jsx)(`div`,{className:`text-sm font-mono text-gray-900 break-all`,children:a.description})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-xs text-gray-500 mb-0.5`,children:`Delivery Count`}),(0,Z.jsx)(`div`,{className:`text-sm text-gray-900`,children:e.deliveryCount})]})]})]}),(0,Z.jsx)(`div`,{className:`border-t-2 border-dashed border-gray-300 my-4`}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 rounded-lg p-3 border border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`text-xs font-semibold uppercase tracking-wide mb-2 flex items-center gap-1 text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`bg-blue-100 text-blue-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`ASSESSMENT`}),(0,Z.jsx)(Ug,{className:`w-3 h-3`}),`ServiceHub Interpretation`]}),(0,Z.jsx)(`div`,{className:`text-sm text-gray-700 leading-relaxed`,children:a.interpretation})]}),(0,Z.jsxs)(`details`,{className:`group bg-gray-50 rounded-lg border border-gray-200 overflow-hidden`,open:a.severity!==`test`,children:[(0,Z.jsx)(`summary`,{className:`px-3 py-2 text-xs font-semibold uppercase tracking-wide cursor-pointer select-none list-none text-gray-600 bg-gray-100 hover:bg-gray-150`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,Z.jsx)(ze,{className:`w-3 h-3 transition-transform group-open:rotate-90`}),(0,Z.jsx)(`span`,{className:`bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded text-[10px] font-bold`,children:`GUIDANCE`}),`Suggested Actions`]})}),(0,Z.jsx)(`ul`,{className:`p-3 space-y-1.5 text-sm text-gray-700`,children:a.guidance.map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400 mt-0.5`,children:`•`}),(0,Z.jsx)(`span`,{children:e})]},t))})]})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border-2 border-sky-100 shadow-sm overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-sky-500 to-sky-600 px-4 py-2.5`,children:(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-white`,children:`Complete Message Properties`})}),(0,Z.jsxs)(`dl`,{className:`p-4`,children:[(0,Z.jsx)(Pv,{label:`Message ID`,value:e.id,mono:!0}),(0,Z.jsx)(Pv,{label:`Enqueued Time`,value:e.enqueuedTime.toISOString(),mono:!0}),(0,Z.jsx)(Pv,{label:`Delivery Count`,value:`${e.deliveryCount} (current session)`}),(0,Z.jsx)(`div`,{className:`py-2 px-3 bg-gray-50 rounded border-l-2 border-gray-300 my-2`,children:(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600 leading-relaxed`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Note:`}),` Delivery count reflects attempts in the current session. This value resets when messages move between queues, sessions expire, or manual intervention occurs. Total historical delivery attempts may be higher.`]})}),(0,Z.jsx)(Pv,{label:`Time To Live`,value:e.timeToLive}),(0,Z.jsx)(Pv,{label:`Sequence Number`,value:e.sequenceNumber.toLocaleString(),mono:!0}),(0,Z.jsx)(Pv,{label:`Content Type`,value:e.contentType}),(0,Z.jsx)(Pv,{label:`Lock Token`,value:e.lockToken,mono:!0}),e.queueType===`deadletter`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`pt-4 pb-2 border-t border-gray-200 mt-2`,children:(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-red-600 uppercase tracking-wide`,children:`Dead-Letter Information`})}),e.deadLetterReason&&(0,Z.jsx)(Pv,{label:`Dead-Letter Reason`,value:e.deadLetterReason}),e.deadLetterSource&&(0,Z.jsx)(Pv,{label:`Dead-Letter Source`,value:e.deadLetterSource})]})]})]}),Object.keys(e.properties||{}).length>0&&(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border-2 border-sky-100 shadow-sm overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-sky-400 to-sky-500 px-4 py-2.5 flex items-center gap-2`,children:[(0,Z.jsx)(Ug,{className:`w-4 h-4 text-white`}),(0,Z.jsx)(`h4`,{className:`text-sm font-semibold text-white`,children:`Custom Application Properties`})]}),(0,Z.jsx)(`dl`,{className:`p-4`,children:Object.entries(e.properties).map(([e,t])=>(0,Z.jsx)(Pv,{label:e,value:String(t),mono:!0},e))})]}),i&&(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsxs)(`button`,{onClick:()=>t(`/correlation?correlationId=${encodeURIComponent(i)}${r?`&namespaceId=${encodeURIComponent(r)}`:``}`),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-violet-700 bg-violet-50 hover:bg-violet-100 border border-violet-200 rounded-lg transition-colors`,children:[(0,Z.jsx)(D,{className:`w-4 h-4`}),`🔍 Trace Correlation`]})}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsxs)(`button`,{onClick:async()=>{let t=n.get(`queue`)||n.get(`topic`)||``,r=[`## Message Incident Report`,`**Generated by ServiceHub** · ${new Date().toISOString()}`,``,`| Field | Value |`,`|---|---|`,`| Message ID | ${e.id} |`,`| Queue/Entity | ${t} |`,`| Enqueued | ${e.enqueuedTime?new Date(e.enqueuedTime).toISOString():`-`} |`,`| Delivery Count | ${e.deliveryCount} |`,`| State | ${e.queueType} |`];e.deadLetterReason&&r.push(`| DLQ Reason | ${e.deadLetterReason} |`),e.deadLetterSource&&r.push(`| DLQ Description | ${e.deadLetterSource} |`),i&&r.push(`| Correlation ID | ${i} |`),r.push(``,`**Body Preview:**`,``,e.body?e.body.substring(0,500):`-`),r.push(``,`**Tool:** https://app-servicehub-prod.azurewebsites.net`),await fe(r.join(` -`))?m.success(`Report copied to clipboard`):m.error(`Failed to copy report`)},className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-violet-700 bg-violet-50 hover:bg-violet-100 border border-violet-200 rounded-lg transition-colors`,children:[(0,Z.jsx)(kg,{className:`w-4 h-4`}),`📋 Copy as Report`]})})]})}function zv(e){try{let t=JSON.parse(e);return JSON.stringify(t,null,2)}catch{return e}}function Bv(e){try{return(0,Z.jsx)(`div`,{className:`font-mono`,style:{whiteSpace:`pre`},children:e.split(` -`).map((e,t)=>{let n=e.trim();if(!n)return(0,Z.jsx)(`div`,{className:`leading-6`,style:{height:`1.5rem`},children:`\xA0`},t);let r=e.match(/^(\s*)/)?.[1].length||0,i=`\xA0`.repeat(r),a=()=>{if(/^[{}[\],]*$/.test(n))return(0,Z.jsxs)(Z.Fragment,{children:[i,(0,Z.jsx)(`span`,{className:`text-gray-400`,children:n})]});if(n.includes(`:`)){let e=-1,t=!1;for(let r=0;r-1){let t=n.substring(0,e),r=n.substring(e+1);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{children:i}),(0,Z.jsx)(`span`,{className:`text-blue-400`,children:t}),(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`:`}),o(r)]})}}return(0,Z.jsxs)(Z.Fragment,{children:[i,(0,Z.jsx)(`span`,{className:`text-gray-300`,children:n})]})},o=e=>{let t=e.trim();return t.startsWith(`"`)?(0,Z.jsx)(`span`,{className:`text-green-400`,children:e}):/^-?\d+\.?\d*,?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-orange-400`,children:e}):/^(true|false),?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-purple-400`,children:e}):/^null,?$/.test(t)?(0,Z.jsx)(`span`,{className:`text-gray-500`,children:e}):t.match(/^[[{]/)?(0,Z.jsx)(`span`,{className:`text-gray-400`,children:e}):(0,Z.jsx)(`span`,{className:`text-gray-300`,children:e})};return(0,Z.jsx)(`div`,{className:`leading-6`,children:a()},t)})})}catch{return(0,Z.jsx)(`span`,{className:`text-gray-300`,children:e})}}function Vv({body:e,contentType:t}){let[n,r]=(0,P.useState)(!1),i=t.includes(`json`),a=(0,P.useMemo)(()=>i?zv(e):e,[e,i]);return(0,Z.jsx)(`div`,{className:`h-full flex flex-col`,children:(0,Z.jsxs)(`div`,{className:`relative flex-1 flex flex-col overflow-hidden p-4`,children:[(0,Z.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(a),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},className:`absolute top-7 right-7 p-2 rounded-md bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors z-10`,title:`Copy formatted JSON to clipboard`,children:n?(0,Z.jsx)(Se,{size:16,className:`text-green-400`}):(0,Z.jsx)(te,{size:16})}),(0,Z.jsx)(`div`,{className:`absolute top-7 left-7 z-10`,children:(0,Z.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded bg-gray-700 text-gray-300`,children:t})}),(0,Z.jsx)(`div`,{className:`bg-gray-900 rounded-lg p-4 pt-12 overflow-y-auto flex-1`,children:(0,Z.jsx)(`div`,{className:`text-sm text-gray-100`,children:i?Bv(a):(0,Z.jsx)(`pre`,{className:`font-mono whitespace-pre-wrap break-words`,children:e})})})]})})}var Hv={immediate:`bg-red-100 text-red-700`,"short-term":`bg-amber-100 text-amber-700`,investigative:`bg-primary-100 text-primary-700`};function Uv({pattern:e,messageId:t,onViewPattern:n}){let r=e.evidence.exampleMessageIds.includes(t),i=e.evidence.affectedMessageIds;return(0,Z.jsxs)(`div`,{className:`bg-primary-50 border border-primary-200 rounded-xl p-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-primary-900`,children:e.title}),(0,Z.jsx)(`span`,{className:`text-xs px-2 py-1 bg-white rounded-lg border border-primary-200 font-medium`,children:r?`📌 Example`:`🔗 Affected`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-primary-700 mb-4 leading-relaxed`,children:e.description}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-primary-600 mb-4`,children:[(0,Z.jsxs)(`span`,{children:[`Confidence: `,(0,Z.jsxs)(`strong`,{children:[e.confidence.score,`%`]})]}),(0,Z.jsx)(`span`,{children:`•`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`strong`,{children:i.length}),` affected messages`]})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-lg p-4 mb-4`,children:[(0,Z.jsx)(`h5`,{className:`text-xs font-semibold text-gray-700 mb-2 flex items-center gap-1`,children:`💡 Recommendations`}),(0,Z.jsx)(`ul`,{className:`space-y-2`,children:e.recommendations.slice(0,3).map((e,t)=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`shrink-0 text-xs px-2 py-0.5 rounded font-medium ${Hv[e.priority]||Hv[`short-term`]}`,children:e.priority}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:e.title})]},t))})]}),(0,Z.jsxs)(`button`,{onClick:()=>n?.(i),className:`text-sm text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1`,children:[`View all `,i.length,` affected messages`,(0,Z.jsx)(`span`,{children:`→`})]})]})}function Wv({message:e,onViewPattern:t,insights:n}){let[r]=k(),i=r.get(`namespace`),a=r.get(`queue`),o=r.get(`topic`),s=r.get(`subscription`),c=a||(o&&s?`${o}/subscriptions/${s}`:o)||``,l=o?`topic`:`queue`,{data:u,isLoading:d}=W_({namespaceId:i||``,queueOrTopicName:c,entityType:l,queueType:e.queueType||`active`,skip:0,take:1e3,autoRefresh:!1}),{data:f,isLoading:p,isError:m}=P_(u?.items,{namespaceId:i||``,entityName:c,subscriptionName:s||void 0,entityType:l},!!i&&!!c&&!d&&n===void 0);if(n!==void 0){let r=(n||[]).filter(t=>{let n=t.evidence.affectedMessageIds,r=t.evidence.exampleMessageIds;return n.includes(e.id)||r.includes(e.id)});return r.length===0?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(s_,{size:32,className:`text-green-400`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`No Patterns Detected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`This message is not part of any AI-detected patterns. It appears to be processing normally.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center max-w-xs`,children:`AI analysis found no anomalies or recurring issues associated with this message.`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Ug,{size:14,className:`text-blue-500 mt-0.5 shrink-0`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700`,children:[(0,Z.jsx)(`strong`,{children:`⚠️ ServiceHub Interpretation (Not Azure Data):`}),` These patterns are heuristic analysis based on message characteristics. They represent possible explanations, not confirmed facts. Always verify findings in Azure Portal before taking operational action.`]})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4 text-sm text-gray-600`,children:[(0,Z.jsx)(He,{size:16,className:`text-primary-500`}),(0,Z.jsxs)(`span`,{children:[`This message is part of `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:r.length}),` detected pattern`,r.length>1?`s`:``]})]}),(0,Z.jsx)(`div`,{className:`space-y-4`,children:r.map(n=>(0,Z.jsx)(Uv,{pattern:n,messageId:e.id,onViewPattern:t},n.id))})]})}let h=d||p,g=(f||[]).filter(t=>{let n=t.evidence.affectedMessageIds,r=t.evidence.exampleMessageIds;return n.includes(e.id)||r.includes(e.id)});return h?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-12 w-12 border-b-2 border-primary-500`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-4`,children:`Loading AI insights...`})]})}):m||!f?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(s_,{size:32,className:`text-gray-300`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`AI Insights Not Available`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`AI pattern analysis is not enabled for this namespace, or the AI service is currently unavailable.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center`,children:`The application works normally without AI features.`})]})}):g.length===0?(0,Z.jsx)(`div`,{className:`p-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mb-4`,children:(0,Z.jsx)(s_,{size:32,className:`text-green-400`})}),(0,Z.jsx)(`p`,{className:`text-lg font-medium text-gray-700`,children:`No Patterns Detected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1 text-center max-w-sm`,children:`This message is not part of any AI-detected patterns. It appears to be processing normally.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-3 text-center max-w-xs`,children:`AI analysis found no anomalies or recurring issues associated with this message.`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(Ug,{size:14,className:`text-blue-500 mt-0.5 shrink-0`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700`,children:[(0,Z.jsx)(`strong`,{children:`⚠️ ServiceHub Interpretation (Not Azure Data):`}),` These patterns are heuristic analysis based on message characteristics. They represent possible explanations, not confirmed facts. Always verify findings in Azure Portal before taking operational action.`]})]})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4 text-sm text-gray-600`,children:[(0,Z.jsx)(He,{size:16,className:`text-primary-500`}),(0,Z.jsxs)(`span`,{children:[`This message is part of `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:g.length}),` detected pattern`,g.length>1?`s`:``]})]}),(0,Z.jsx)(`div`,{className:`space-y-4`,children:g.map(n=>(0,Z.jsx)(Uv,{pattern:n,messageId:e.id,onViewPattern:t},n.id))})]})}function Gv({name:e,value:t,isEven:n}){let[r,i]=(0,P.useState)(!1);return(0,Z.jsxs)(`tr`,{className:n?`bg-gray-50`:`bg-white`,children:[(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono font-medium text-gray-700 whitespace-nowrap`,children:e}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono text-gray-600`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 group`,children:[(0,Z.jsx)(`span`,{className:`truncate max-w-md`,title:t,children:t}),(0,Z.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},className:`p-1 rounded opacity-0 group-hover:opacity-100 hover:bg-gray-200 transition-all`,title:`Copy value`,children:r?(0,Z.jsx)(Se,{size:14,className:`text-green-600`}):(0,Z.jsx)(te,{size:14,className:`text-gray-400`})})]})})]})}function Kv({headers:e}){let t=Object.entries(e);return t.length===0?(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-gray-500`,children:[(0,Z.jsx)(`p`,{className:`text-lg font-medium`,children:`No Headers`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-400 mt-1`,children:`This message has no custom headers`})]})}):(0,Z.jsx)(`div`,{className:`p-4`,children:(0,Z.jsx)(`div`,{className:`bg-white rounded-lg border border-gray-200 overflow-hidden`,children:(0,Z.jsxs)(`table`,{className:`w-full`,children:[(0,Z.jsx)(`thead`,{className:`bg-gray-100 border-b border-gray-200`,children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider`,children:`Header Name`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider`,children:`Value`})]})}),(0,Z.jsx)(`tbody`,{className:`divide-y divide-gray-100`,children:t.map(([e,t],n)=>(0,Z.jsx)(Gv,{name:e,value:t,isEven:n%2==0},e))})]})})})}function qv({isOpen:e,title:t,message:n,confirmLabel:r=`Confirm`,cancelLabel:i=`Cancel`,variant:a=`default`,onConfirm:o,onCancel:s}){if((0,P.useEffect)(()=>{let t=t=>{t.key===`Escape`&&e&&s()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,s]),!e)return null;let c=a===`danger`;return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:s,"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`confirm-dialog-title`,"aria-describedby":`confirm-dialog-description`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[c&&(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-red-100 rounded-full flex items-center justify-center`,children:(0,Z.jsx)(ne,{className:`w-5 h-5 text-red-600`})}),(0,Z.jsx)(`h2`,{id:`confirm-dialog-title`,className:`text-lg font-semibold text-gray-900`,children:t})]}),(0,Z.jsx)(`button`,{onClick:s,className:`p-1 hover:bg-gray-100 rounded-lg transition-colors`,"aria-label":`Close dialog`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`px-6 py-4`,children:(0,Z.jsx)(`p`,{id:`confirm-dialog-description`,className:`text-sm text-gray-600 whitespace-pre-line`,children:n})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:s,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors`,autoFocus:c,children:i}),(0,Z.jsx)(`button`,{onClick:o,className:`px-4 py-2 text-sm font-medium text-white rounded-lg transition-colors ${c?`bg-red-500 hover:bg-red-600`:`bg-primary-500 hover:bg-primary-600`}`,autoFocus:!c,children:r})]})]})]}),document.body)}var Jv=[{id:`properties`,label:`Properties`,icon:Je},{id:`body`,label:`Body`,icon:Mg},{id:`ai`,label:`AI Insights`,icon:Cg},{id:`headers`,label:`Headers`,icon:qg}];function Yv(){return(0,Z.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-gray-500 bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm px-10 py-12 text-center`,style:{maxWidth:520},children:[(0,Z.jsx)(ke,{size:64,className:`text-gray-300 mx-auto mb-4`}),(0,Z.jsx)(`h3`,{className:`text-xl font-semibold text-gray-700`,children:`No Message Selected`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-2`,children:`Select a message from the list to view its details, body content, and AI insights.`})]})})}function Xv({tab:e,message:t,onViewPattern:n,insights:r}){switch(e){case`properties`:return(0,Z.jsx)(Rv,{message:t});case`body`:return(0,Z.jsx)(Vv,{body:t.body,contentType:t.contentType});case`ai`:return(0,Z.jsx)(Wv,{message:t,onViewPattern:n,insights:r});case`headers`:return(0,Z.jsx)(Kv,{headers:t.headers});default:return null}}function Zv({message:e,namespaceId:t}){let n=K_(),{data:r}=N(),i=r?.find(e=>e.id===t),a=i?.environment===`prod`,o=i?.hasSendPermission!==!1,[s]=k(),[c,l]=(0,P.useState)({isOpen:!1,title:``,message:``,variant:`default`,action:null}),u=s.get(`queue`),d=s.get(`topic`),f=s.get(`subscription`),p=d||u||``,h=e.queueType===`deadletter`||!!e.deadLetterReason,g=t=>{let n=e.id?.split(`-`).slice(0,2).join(`-`)||`#${e.sequenceNumber}`;t===`replay`&&l({isOpen:!0,title:`Replay Message`,message:`Are you sure you want to replay message ${n}?\n\nThis will re-send the message to the queue for processing.\n\n⚠️ Replay is best-effort and not atomic. If a transient error occurs after the message is sent but before it is removed from the DLQ, both the original DLQ entry and the new copy may briefly coexist. Check ApplicationProperties for "Replayed=true" if you see unexpected duplicates.`,variant:`default`,action:`replay`})};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 p-4 border-t border-gray-200 bg-white`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:a?(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay is disabled for production namespaces. Use your CI/CD pipeline for production message operations.`,className:`inline-flex items-center gap-2 px-4 py-2 bg-red-100 text-red-400 rounded-lg font-medium cursor-not-allowed border border-red-200`,"aria-label":`Replay blocked in production`,children:[(0,Z.jsx)(n_,{size:16}),`PROD — Replay Blocked`]}):o?h?(0,Z.jsxs)(`button`,{className:`inline-flex items-center gap-2 px-4 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg font-medium transition-colors disabled:bg-gray-300 disabled:text-gray-500 disabled:cursor-not-allowed`,onClick:()=>g(`replay`),disabled:n.isPending||!t,title:`Re-send this message from DLQ back to the main queue for reprocessing`,"aria-label":`Replay message`,children:[(0,Z.jsx)(n_,{size:16}),n.isPending?`Replaying...`:`Replay`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay is only available for dead-letter messages — active messages are already being processed`,className:`inline-flex items-center gap-2 px-4 py-2 bg-gray-300 text-gray-500 rounded-lg font-medium cursor-not-allowed`,"aria-label":`Replay message`,children:[(0,Z.jsx)(n_,{size:16}),`Replay`]}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-500 italic max-w-[160px]`,title:`Active messages are already queued for processing. Replay is for returning dead-letter messages to the main queue.`,children:`Active messages cannot be replayed`})]}):(0,Z.jsxs)(`button`,{disabled:!0,title:`Replay requires a SAS policy with Manage permission. Update your connection string to enable replay.`,className:`inline-flex items-center gap-2 px-4 py-2 bg-amber-100 text-amber-400 rounded-lg font-medium cursor-not-allowed border border-amber-200`,"aria-label":`Replay blocked — insufficient permissions`,children:[(0,Z.jsx)(n_,{size:16}),`Replay — Manage Required`]})}),(0,Z.jsxs)(`button`,{className:`inline-flex items-center gap-2 px-4 py-2 bg-white hover:bg-gray-50 text-gray-700 border border-gray-200 rounded-lg font-medium transition-colors`,onClick:async()=>{try{await navigator.clipboard.writeText(e.id),m.success(`Message ID copied to clipboard`)}catch{m.error(`Failed to copy ID`)}},"aria-label":`Copy message ID to clipboard`,children:[(0,Z.jsx)(Ag,{size:16}),`Copy ID`]})]}),(0,Z.jsx)(qv,{isOpen:c.isOpen,title:c.title,message:c.message,variant:c.variant,confirmLabel:`Confirm`,onConfirm:async()=>{if(!t){m.error(`Namespace context missing`);return}if(!p){m.error(`Queue or topic name is missing`);return}try{c.action===`replay`&&await n.mutateAsync({namespaceId:t,sequenceNumber:e.sequenceNumber,entityName:p,subscriptionName:f||void 0})}catch{}finally{l(e=>({...e,isOpen:!1,action:null}))}},onCancel:()=>{l(e=>({...e,isOpen:!1,action:null}))}})]})}function Qv(e){try{let t=typeof e.body==`string`?JSON.parse(e.body):e.body,n=t?.eventType||t?.type||t?.event,r=t?.data?.orderId||t?.orderId,i=t?.data?.transactionId||t?.transactionId,a=t?.data?.notificationId||t?.notificationId,o=t?.data?.userId||t?.userId,s=t?.data?.error?.code||t?.error?.code||t?.errorCode,c=t?.data?.status||t?.status;if(n){let e=n.replace(/([A-Z])/g,` $1`).trim(),t=``;return r?t=`Order: ${r}`:i?t=`Transaction: ${i}`:a?t=`Notification: ${a}`:s?t=`Error: ${s}`:c&&(t=`Status: ${c}`),{title:e,subtitle:t}}if(r)return{title:`Order Message`,subtitle:r};if(i)return{title:`Payment Transaction`,subtitle:i};if(a)return{title:`Notification`,subtitle:a};if(s)return{title:`Error Event`,subtitle:s};if(o)return{title:`User Activity`,subtitle:`User: ${o}`}}catch{}return{title:`Message`,subtitle:e.id?e.id.includes(`-`)?e.id.split(`-`).slice(0,2).join(`-`):e.id.substring(0,12):`#${e.sequenceNumber}`}}function $v({message:e,onViewPattern:t,insights:n}){let[r,i]=Nv(),[a]=k(),o=a.get(`namespace`);if(!e)return(0,Z.jsx)(Yv,{});let{title:s,subtitle:c}=Qv(e),l=e.queueType===`deadletter`||!!e.deadLetterReason,u=l?(e=>{let t=(e.deadLetterReason||``).toLowerCase(),n=(e.deadLetterSource||``).toLowerCase();return t.includes(`test`)||t.includes(`demo`)||t.includes(`manual`)||n.includes(`servicehub`)||n.includes(`testing`)?`test`:e.deliveryCount>5?`critical`:`warning`})(e):null;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col bg-gray-50 overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`shrink-0 px-6 py-4 border-b border-gray-200 ${l&&u===`critical`?`bg-red-50`:`bg-white`}`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900`,children:s}),c&&(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1 font-mono`,children:c})]}),(0,Z.jsx)(oe,{text:(()=>{let t=`${window.location.origin}/messages?namespace=${o||``}`,n=a.get(`queue`),r=a.get(`topic`),i=a.get(`subscription`);return`${t}${n?`&queue=${n}`:r?`&topic=${r}${i?`&subscription=${i}`:``}`:``}&messageId=${e.id}`})(),label:`Copy Link`,className:`shrink-0 ml-3 px-2 py-1 border border-gray-200 rounded-lg`,iconSize:`w-4 h-4`})]}),l&&(0,Z.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium ${u===`critical`?`bg-red-100 text-red-800`:`bg-amber-100 text-amber-800`}`,children:[(0,Z.jsx)(ne,{size:12,className:u===`critical`?`text-red-600`:`text-amber-600`}),`ServiceHub Assessment: `,u===`critical`?`Critical`:`Warning`]}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-600`,title:`The reason provided by Azure Service Bus.`,children:e.deadLetterReason})]})]}),(0,Z.jsx)(`div`,{className:`shrink-0 flex border-b border-gray-200 bg-white`,children:Jv.map(({id:e,label:t,icon:n})=>(0,Z.jsxs)(`button`,{onClick:()=>i(e),className:` - flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors relative - ${r===e?`text-primary-600 border-b-2 border-primary-500 -mb-px`:`text-gray-500 hover:text-gray-700 hover:bg-gray-50`} - `,children:[(0,Z.jsx)(n,{size:16}),t]},e))}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gray-50`,children:(0,Z.jsx)(Xv,{tab:r,message:e,onViewPattern:t,insights:n})}),(0,Z.jsx)(Zv,{message:e,namespaceId:o})]})}var ey={"dlq-pattern":`📥`,"retry-loop":`🔄`,"error-cluster":`⚠️`,"latency-anomaly":`⏱️`,"poison-message":`☠️`},ty={high:`bg-green-100 text-green-700`,medium:`bg-amber-100 text-amber-700`,low:`bg-gray-100 text-gray-600`};function ny({insights:e,onClose:t,onViewEvidence:n}){let r=e.filter(e=>e.status===`active`);return(0,P.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:t}),(0,Z.jsxs)(`div`,{className:`absolute top-full right-0 mt-2 w-[420px] bg-white rounded-xl shadow-xl border border-gray-200 z-50 overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`Active AI Patterns`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:[r.length,` pattern`,r.length===1?``:`s`,` detected`]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1 hover:bg-gray-200 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-4 h-4 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto`,children:r.length===0?(0,Z.jsxs)(`div`,{className:`p-8 text-center text-gray-500`,children:[(0,Z.jsx)(`p`,{className:`text-sm`,children:`No active patterns detected`}),(0,Z.jsx)(`p`,{className:`text-xs mt-1`,children:`AI is monitoring your queues`})]}):r.map(e=>(0,Z.jsxs)(`div`,{className:`p-4 border-b border-gray-100 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-lg`,title:e.type,children:ey[e.type]||`🔍`}),(0,Z.jsx)(`h4`,{className:`font-medium text-sm text-gray-900 leading-tight`,children:e.title})]}),(0,Z.jsxs)(`span`,{className:`shrink-0 text-xs px-2 py-0.5 rounded-full font-medium ${ty[e.confidence.level]}`,children:[e.confidence.score,`%`]})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-3 leading-relaxed`,children:e.description}),(0,Z.jsx)(`div`,{className:`flex items-center gap-4 text-xs text-gray-500 mb-3`,children:e.evidence.metrics.slice(0,3).map((e,t)=>(0,Z.jsxs)(`span`,{className:e.isAnomaly?`text-red-600 font-medium`:``,children:[e.label,`: `,(0,Z.jsx)(`strong`,{children:e.value})]},t))}),(0,Z.jsxs)(`button`,{onClick:()=>n(e.evidence.affectedMessageIds),className:`text-sm text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1`,children:[`View `,e.evidence.affectedMessageIds.length,` affected messages`,(0,Z.jsx)(`span`,{children:`→`})]})]},e.id))}),r.length>0&&(0,Z.jsxs)(`div`,{className:`px-4 py-3 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`💡 Click a pattern to filter messages and investigate`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-1 italic`,children:`ServiceHub Interpretation — AI-assisted patterns, not Azure data`})]})]})]})}function ry(){return(0,Z.jsx)(`div`,{className:`p-4 space-y-4`,children:Array.from({length:10}).map((e,t)=>(0,Z.jsxs)(`div`,{className:`animate-pulse bg-white border border-gray-200 rounded-lg p-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,Z.jsx)(`div`,{className:`h-4 bg-gray-200 rounded w-32`}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-20`})]}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-3/4 mb-2`}),(0,Z.jsx)(`div`,{className:`h-3 bg-gray-200 rounded w-1/2`})]},t))})}var iy=[`Northwind Trading Ltd`,`Fabrikam Corporation`,`Adventure Works LLC`,`Blue Yonder Airlines`,`Tailspin Toys Inc`,`Wide World Importers`,`Datum Corp`,`Wingtip Toys`,`Contoso Manufacturing`,`Litware Global`,`Proseware Inc`,`A. Datum Corporation`,`Alpine Ski House`],ay={"Northwind Trading Ltd":`NW`,"Fabrikam Corporation":`FAB`,"Adventure Works LLC":`AW`,"Blue Yonder Airlines":`BYA`,"Tailspin Toys Inc":`TST`,"Wide World Importers":`WWI`,"Datum Corp":`DAT`,"Wingtip Toys":`WTT`,"Contoso Manufacturing":`CM`,"Litware Global":`LWG`,"Proseware Inc":`PRW`,"A. Datum Corporation":`ADC`,"Alpine Ski House":`ASH`},oy=[{product:`Enterprise Analytics Suite (Annual)`,unitPrice:4800,category:`software`},{product:`Cloud API Gateway Pro — 10M calls/mo`,unitPrice:1250,category:`infrastructure`},{product:`Business Intelligence Dashboard (3 seats)`,unitPrice:2400,category:`software`},{product:`Managed SQL Database — Standard S4`,unitPrice:890,category:`database`},{product:`IoT Device Management Platform (500 devices)`,unitPrice:3200,category:`iot`},{product:`Security & Compliance Module`,unitPrice:1800,category:`security`},{product:`Automated Workflow Engine — 50k runs/mo`,unitPrice:750,category:`automation`},{product:`Distributed Cache Cluster (16-node)`,unitPrice:5400,category:`infrastructure`},{product:`Real-time Event Streaming (10 partitions)`,unitPrice:2100,category:`streaming`},{product:`Identity & Access Management Suite`,unitPrice:1650,category:`security`}],sy=[{gateway:`Stripe`,code:`STR`},{gateway:`PayPal Commerce`,code:`PPL`},{gateway:`Adyen`,code:`ADY`},{gateway:`Braintree`,code:`BRT`},{gateway:`Square`,code:`SQR`},{gateway:`Worldpay`,code:`WPY`}],cy={insufficient_funds:`Card declined — insufficient funds`,do_not_honor:`Card declined — do_not_honor (bank refused)`,gateway_timeout:`Gateway timeout after 30s — connection reset by peer`,duplicate_transaction:`Duplicate transaction detected — idempotency key collision`,card_velocity_exceeded:`Card velocity limit exceeded — 3 transactions in 60s`,invalid_cvv:`CVV validation failed — card not present verification error`,expired_card:`Card expired — expiry date 03/24 is in the past`,stolen_card:`Card flagged as stolen — issuer declined with code 41`},ly=[{id:`WH-LHR-01`,location:`London Heathrow Logistics Hub`,region:`EMEA`},{id:`WH-JFK-02`,location:`Newark Distribution Centre`,region:`AMER`},{id:`WH-SIN-03`,location:`Singapore Changi Fulfilment`,region:`APAC`},{id:`WH-FRA-04`,location:`Frankfurt Rhine Warehouse`,region:`EMEA`},{id:`WH-SEA-05`,location:`Seattle West Coast Hub`,region:`AMER`}],uy=[{type:`email`,provider:`SendGrid`,template:`order_confirmation_v3`},{type:`email`,provider:`SendGrid`,template:`invoice_ready_v2`},{type:`sms`,provider:`Twilio`,template:`shipping_update`},{type:`push`,provider:`Firebase FCM`,template:`payment_received`},{type:`webhook`,provider:`Partner ERP`,template:`inventory_sync_v2`},{type:`teams`,provider:`Microsoft Teams`,template:`ops_alert`}],dy=[[`unusual_geo`,`high_velocity`],[`card_testing_pattern`],[`multiple_failed_attempts`],[`ip_mismatch`,`device_fingerprint_anomaly`],[`account_age_low`,`high_order_value`],[`vpn_detected`,`unusual_geo`],[`chargeback_history`,`velocity_exceeded`]],fy=[{name:`FedEx Priority`,code:`FEDEX`,prefix:`FX`},{name:`DHL Express`,code:`DHL`,prefix:`DE`},{name:`UPS Next Day Air`,code:`UPS`,prefix:`UPS`},{name:`Royal Mail Special`,code:`RMSPL`,prefix:`RM`},{name:`Parcelforce 48`,code:`PF48`,prefix:`PF`}],py=[`awaiting_approval`,`approved`,`queued_for_payment`,`paid`,`disputed`],my=[`L1_Manager`,`L2_Finance`,`L3_CFO`,`Procurement_Committee`],hy=[`Order ORD-2026-%s processed — Northwind Trading Ltd, £14,850 — payment confirmed via Stripe`,`Payment TXN-%s captured — Fabrikam Corporation, $6,240 — Adyen gateway, 0.8s latency`,`Invoice INV-2026-%s approved by L2_Finance — Wide World Importers, £22,400 — queued for payment`,`Inventory sync complete — WH-LHR-01 → WH-JFK-02 — 1,240 units of Enterprise Analytics Suite`,`Shipping label generated — Blue Yonder Airlines, FedEx FX%s, estimated delivery D+2`,`Fraud check cleared — Datum Corp, risk score 12/100 — all 6 factors within threshold`,`Auto-replay rule triggered — 28 payment messages replayed successfully, 0 failures`,`Webhook delivered — Tailspin Toys ERP (v2.1), 204ms, all 142 line items synced`,`Order ORD-2026-%s shipped — Adventure Works LLC — DHL DE%s, in transit via Frankfurt`,`Consumer group caught up — adventure-works-consumer lag 0ms after processing 3,241 messages`],gy=[`Payment retry #2 — TXN-%s — Fabrikam Corp, Worldpay gateway, timeout after 30s (retry 3 of 5)`,`Invoice INV-2026-%s pending — awaiting L3_CFO approval for 18h — SLA breach in 6h`,`Inventory low stock alert — SKU:EDS-PRO-2026 — 12 units remain, 9 open orders pending`,`Shipping delay — UPS UPS%s — customs hold at Frankfurt (HS code mismatch on 3 of 8 items)`,`Duplicate order detected — ORD-2026-%s submitted twice in same customer session (60s apart)`,`Consumer lag growing — notification-queue — 1,843 unprocessed messages, 12min behind real-time`,`Fraud score elevated — Litware Global — riskScore 68/100 (vpn_detected, unusual_geo) — review`,`Webhook delivering slowly — Proseware ERP — attempt 3 of 5, 5.2s timeout, retrying in 30s`,`Schema warning — NotificationService received order body missing new "recipientTimezone" field`,`Rate limit approaching — Stripe API at 87% of 100 req/s quota — throttling risk in ~8 min`],_y=[`DLQ flood — payment-queue — 847 messages dead-lettered: MaxDeliveryCountExceeded after 5 retries`,`Payment declined — TXN-%s — Northwind Trading Ltd £14,850 — do_not_honor (bank code 05)`,`Order validation failed — ORD-2026-%s — OrderService rejected: "shippingAddress.postcode" null`,`Fraud alert — Wingtip Toys — riskScore 94/100 — card_testing_pattern, 11 attempts in 4 minutes`,`Shipping failed — DHL DE%s — address undeliverable: postcode SW1A 2AA not valid for carrier zone`,`Invoice processing error — INV-2026-%s — Accounts Payable API returned 503 Service Unavailable`,`TTL expired — ORD-2026-%s — message in queue 14 days without consumer pickup — moved to DLQ`,`Schema mismatch — NotificationService v2.1 cannot deserialise OrderCreated v3.0 payload`,`Database deadlock — OrderService.ProcessAsync() — 3 concurrent writes to Orders table, tx aborted`,`Session lock expired — checkout-session-%s held 5 min — consumer reconnecting, message re-enqueued`],vy=[{issue:`DLQ flood — 847 of 862 dead-lettered messages share the identical error signature: null reference in OrderValidationService.ProcessAsync() at line 312. Root cause: "shippingAddress.postcode" field introduced in order-schema v3.0 but consumer still running v2.8.`,recommendations:[`Deploy OrderValidationService v2.9+ (null-safe postcode handling) — ETA 15 min`,`After deployment, use Auto-Replay to bulk-replay the 847 affected messages`,`Add schema version negotiation to prevent cross-version incompatibility in future`]},{issue:`Payment gateway cascade failure — Worldpay returning 504 Gateway Timeout consistently since 14:32 UTC. Retry backoff not working: all 5 retry attempts fire within 2 seconds instead of exponential spacing. This is flooding the retry queue.`,recommendations:[`Fix retry backoff: implement exponential delay (2s, 4s, 8s, 16s, 32s) not fixed 0.5s`,`Add circuit breaker: after 3 consecutive failures, route to Stripe fallback gateway`,`Dead-letter after 5 attempts with DeadLetterReason="GatewayDown" for targeted replay later`]},{issue:`Message ordering violation in orders-queue — 23 messages processed out-of-sequence. OrderUpdated events arriving before OrderCreated for the same OrderId, causing foreign key violations in the Orders database.`,recommendations:[`Enable Azure Service Bus Sessions keyed on OrderId to guarantee FIFO per customer order`,`Add idempotency check in consumer: skip if OrderCreated not yet in DB, re-enqueue with delay`,`Review partition key strategy — currently random, should be set to customerId`]},{issue:`Consumer group saturation — notification-queue has 1,843 backlogged messages. Single consumer instance processing at 2.3 msg/sec; at current rate backlog will clear in 13 minutes. However a new DLQ spike at 15:20 UTC could overwhelm it.`,recommendations:[`Scale notification consumer to 3 instances immediately (Azure Container Apps: min replicas 3)`,`Set queue max delivery count to 3 (currently 10) to reduce retry amplification`,`Add dead-letter monitoring alert: notify #ops-alerts if DLQ count exceeds 50`]},{issue:`Fraud detection bypassed — 11 high-risk transactions from Wingtip Toys processed without fraud check completion. FraudCheckService timed out (60s) and the order pipeline proceeded without awaiting the fraud verdict. Risk exposure: £47,230.`,recommendations:[`Make fraud check synchronous in the critical payment path — do not proceed on timeout`,`Add compensating transaction: if FraudCheck times out, place order in "pending_review" state`,`Increase FraudCheckService timeout budget from 60s to 120s and add dedicated node pool`]},{issue:`Shipping address validation failures concentrated in UK postcodes — Royal Mail API rejecting 38 of 42 UK addresses. Root cause: postcode format changed in service update (space stripped), "SW1A2AA" failing Royal Mail format validation expecting "SW1A 2AA".`,recommendations:[`Fix postcode normalisation: add space before last 3 chars for UK postcodes before API call`,`Replay the 38 failed shipping label messages after deploying the fix`,`Add postcode format unit test with all Royal Mail edge-case formats`]},{issue:`Invoice approval SLA breach risk — 14 invoices from Wide World Importers and Fabrikam Corporation awaiting L3_CFO approval for 18+ hours. SLA requires approval within 24h. Breach in < 6h for 9 of them.`,recommendations:[`Trigger escalation webhook to CFO TEAMS channel immediately (auto-alert rule)`,`Configure approval reminder automation: resend after 12h, 20h, 23h intervals`,`Review L3_CFO approval delegation — apply L2_Finance auto-approve for amounts < £25,000`]},{issue:`Duplicate message delivery — message deduplication window expired (60s) causing 34 OrderCreated events to be processed twice. Orders created for customers Datum Corp and Proseware Inc have duplicate line items. Billing impact: £18,400 over-charged.`,recommendations:[`Extend deduplication window to 10 minutes (Service Bus property: DuplicateDetectionHistoryTimeWindow)`,`Add idempotency guard in OrderService — check order exists before insert (upsert pattern)`,`Reconcile and reverse the 34 duplicate charges before end of business today`]}],yy=[`MaxDeliveryCountExceeded`,`TTLExpiredException`,`MessageSizeExceeded`,`SessionIdMismatch`,`HeaderSizeExceeded`,`FilterEvaluationException`,`GatewayTimeout_RetryExhausted`,`SchemaValidationFailure`,`DownstreamServiceUnavailable`];function Q(e){return e[Math.floor(Math.random()*e.length)]}function $(e,t){return Math.floor(Math.random()*(t-e+1))+e}function by(){return String($(1e4,99999))}function xy(){let e=Q(iy),t=ay[e]||`CTM`,n=Q(oy),r=$(1,5),i=Math.round(n.unitPrice*r*100)/100,a=Q([`USD`,`GBP`,`EUR`]),o={eventType:`OrderCreated`,schemaVersion:`3.1`,orderId:`ORD-2026-${String($(1e5,999999))}`,customerRef:`${t}-PO-2026-${String($(1e3,9999))}`,customer:{company:e,accountId:`ACC-${$(1e4,99999)}`,billingRegion:Q([`EMEA`,`AMER`,`APAC`]),accountManager:Q([`Sarah Chen`,`James Okafor`,`Priya Nair`,`Tom Bergström`,`Maria Santos`])},lineItems:[{lineId:1,product:n.product,category:n.category,quantity:r,unitPrice:n.unitPrice,currency:a,total:i}],orderTotal:{amount:i,currency:a,vatIncluded:a===`GBP`||a===`EUR`},paymentMethod:Q([`bank_transfer`,`credit_card`,`purchase_order`,`direct_debit`]),status:Q([`pending_validation`,`validated`,`processing`,`shipped`,`delivered`]),timestamps:{created:new Date(Date.now()-$(6e4,864e5)).toISOString(),lastUpdated:new Date().toISOString()},sourceService:`OrderManagementService`,correlationId:`corr-${Math.random().toString(36).substring(2,11)}`};return{body:JSON.stringify(o,null,2),contentType:`application/json`,eventType:`OrderCreated`}}function Sy(){let e=Q(sy),t=Q(iy),n=Math.round($(500,5e4)*100)/100,r=Q([`USD`,`GBP`,`EUR`]),i=Q(Object.keys(cy)),a={eventType:`PaymentProcessed`,schemaVersion:`2.4`,transactionId:`${e.code}-TXN-${String($(1e9,9999999999))}`,externalRef:`${e.code}-${String($(1e8,999999999))}`,payer:{company:t,accountId:`ACC-${$(1e4,99999)}`},amount:{value:n,currency:r},gateway:{provider:e.gateway,environment:`production`,processingTimeMs:$(120,8500)},status:Q([`authorized`,`captured`,`declined`,`pending_3ds`,`refunded`]),failureDetail:Math.random()<.4?{errorCode:i,message:cy[i],retryCount:$(1,5),retryable:![`stolen_card`,`do_not_honor`].includes(i)}:void 0,timestamps:{initiated:new Date(Date.now()-$(3e4,36e5)).toISOString(),completed:new Date().toISOString()},sourceService:`PaymentProcessingService`};return{body:JSON.stringify(a,null,2),contentType:`application/json`,eventType:`PaymentProcessed`}}function Cy(){let e=Q(ly),t=Q(oy),n=$(0,2e3),r=$(50,200),i={eventType:`InventoryUpdated`,schemaVersion:`1.8`,warehouseId:e.id,warehouseName:e.location,region:e.region,product:{sku:`SKU-${t.category.toUpperCase().substring(0,3)}-${String($(1e3,9999))}`,name:t.product,category:t.category},stockLevel:{current:n,threshold:r,unit:`licenses`},alert:n===0?`out_of_stock`:n80?`HIGH_RISK`:t>50?`MEDIUM_RISK`:`LOW_RISK`,riskFactors:n,modelVersion:`fraud-ml-v4.2`,processingTimeMs:$(200,2e3)},action:t>80?`block_and_review`:t>50?`review_required`:`approve`,sourceService:`FraudDetectionService`,timestamp:new Date().toISOString()};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`FraudCheckResult`}}function Ey(){let e=Q(iy),t=ay[e]||`CTM`,n=$(5e3,15e4),r=Q(my),i={eventType:`InvoiceProcessing`,schemaVersion:`1.5`,invoiceId:`INV-2026-${String($(1e4,99999))}`,vendor:e,purchaseOrder:`${t}-PO-2026-${String($(1e3,9999))}`,amount:{value:n,currency:Q([`GBP`,`USD`,`EUR`])},approvalWorkflow:{requiredTier:r,currentStatus:Q(py),submittedAt:new Date(Date.now()-$(36e5,864e5*3)).toISOString(),slaHours:$(8,48),hoursElapsed:$(1,50),escalated:Math.random()<.3},lineItems:$(1,12),attachmentCount:$(1,4),sourceService:`InvoiceProcessingService`};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`InvoiceProcessing`}}function Dy(){let e=Q(fy),t=Q(ly),n=Q(iy),r=`${e.prefix}${$(1e9,9999999999)}`,i={eventType:`ShipmentCreated`,schemaVersion:`2.2`,shipmentId:`SHIP-2026-${String($(1e4,99999))}`,orderId:`ORD-2026-${String($(1e5,999999))}`,recipient:{company:n,deliveryContact:Q([`Goods_In`,`Reception`,`IT_Department`,`Finance`])},carrier:{name:e.name,code:e.code,trackingNumber:r},origin:{warehouseId:t.id,name:t.location,region:t.region},destination:{country:Q([`GB`,`US`,`DE`,`FR`,`NL`,`SG`,`AU`]),postcode:Q([`EC2A 4NE`,`W1D 3QZ`,`10001`,`75001`,`60311`,`048624`,`2000`])},estimatedDelivery:new Date(Date.now()+$(864e5,864e5*5)).toISOString().split(`T`)[0],status:Q([`label_created`,`collected`,`in_transit`,`customs_hold`,`out_for_delivery`,`delivered`]),packageDetails:{count:$(1,8),totalWeightKg:Math.round($(1,200)*.5)/1},sourceService:`LogisticsService`};return{body:JSON.stringify(i,null,2),contentType:`application/json`,eventType:`ShipmentCreated`}}function Oy(){let e=Math.random();return e<.3?xy():e<.5?Sy():e<.62?Cy():e<.72?wy():e<.82?Ty():e<.91?Ey():Dy()}function ky(e){let t={},n={OrderCreated:`OrderManagementService`,PaymentProcessed:`PaymentProcessingService`,InventoryUpdated:`InventoryManagementService`,NotificationDispatched:`CustomerEngagementService`,FraudCheckResult:`FraudDetectionService`,InvoiceProcessing:`InvoiceProcessingService`,ShipmentCreated:`LogisticsService`}[e]||`ContosoCommerceBackend`;return t[`Content-Type`]=`application/json; charset=utf-8`,t[`Message-Id`]=crypto.randomUUID?.()||`msg-${Math.random().toString(36).substring(2,15)}`,t[`Correlation-Id`]=`corr-${Math.random().toString(36).substring(2,11)}`,t[`x-contoso-source-service`]=n,t[`x-contoso-schema-version`]=Q([`1.0`,`2.0`,`2.4`,`3.0`,`3.1`]),t[`x-contoso-event-version`]=`1`,t.Label=e,t[`Partition-Key`]=`partition-${$(0,15)}`,Math.random()<.6&&(t[`Session-Id`]=`session-${$(1e4,99999)}`),Math.random()<.4&&(t[`Reply-To`]=`response-processed-queue`),t}function Ay(){return Q([`1d 0h 0m 0s`,`7d 0h 0m 0s`,`14d 0h 0m 0s`,`0d 4h 0m 0s`,`0d 12h 0m 0s`])}function jy(e){let t=by();return Q(e===`success`?hy:e===`warning`?gy:_y).replace(/%s/g,t)}function My(e){let t=[.55,.3,.15],n=[],r=new Date;for(let i=0;it.enqueuedTime.getTime()-e.enqueuedTime.getTime()),n}My(1e5);function Ny(e,t=[],n=`active`){let r=e.messageId||`seq-${e.sequenceNumber}`,i=e.body,a,o;try{if(i&&typeof i==`string`){let e=JSON.parse(i);a=e.eventType||e.event||e.type,a||(e.messageType?o=e.messageType:e.name?o=e.name:e.action&&(o=e.action))}}catch{}let s=`success`;return e.isFromDeadLetter||e.deadLetterReason?s=`error`:(e.deliveryCount||0)>1&&(s=`warning`),{id:r,enqueuedTime:new Date(e.enqueuedTime),status:s,preview:i?i.substring(0,100):`[Body unavailable - may exceed size limit or API throttled]`,contentType:e.contentType||`application/json`,deliveryCount:e.deliveryCount||0,hasAIInsight:t.includes(r),sequenceNumber:e.sequenceNumber||0,properties:e.applicationProperties||{},queueType:n,body:i||``,headers:{"Content-Type":e.contentType||`application/json`,...e.correlationId?{"Correlation-Id":e.correlationId}:{},...e.sessionId?{"Session-Id":e.sessionId}:{}},timeToLive:e.timeToLive||``,lockToken:``,eventType:a,displayTitle:o||a,deadLetterReason:e.deadLetterReason||void 0,deadLetterSource:e.deadLetterSource||void 0,scheduledEnqueueTime:e.scheduledEnqueueTime??void 0}}function Py(){let[e,t]=k(),n=f(),r=O(),i=e.get(`demo`)===`true`,a=e.get(`namespace`),o=e.get(`queue`),s=e.get(`topic`),c=e.get(`subscription`),l=e.get(`queueType`),u=s?`topic`:`queue`,d=o||(s&&c?`${s}/subscriptions/${c}`:s)||``,{data:p}=N();(0,P.useEffect)(()=>{if(p&&p.length>0&&a&&!i&&!p.some(e=>e.id===a)){let n=p[0],r=new URLSearchParams(e);r.set(`namespace`,n.id),t(r,{replace:!0}),m.success(`Reconnected to ${n.displayName||n.name}`,{duration:3e3})}},[p,a,e,t,i]);let[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(`active`),[y,b]=(0,P.useState)(!0),[x,S]=(0,P.useState)({skip:0,allMessages:[]}),[C,w]=(0,P.useState)(!1);(0,P.useEffect)(()=>{l===`deadletter`?v(`deadletter`):l===`active`&&v(`active`)},[l]),(0,P.useEffect)(()=>{g(null)},[a,o,s,c]),(0,P.useEffect)(()=>{S({skip:0,allMessages:[]})},[a,o,s,c,_]),(0,P.useEffect)(()=>{if(!i)return;let e=`servicehub_demo_nudge_shown`;if(sessionStorage.getItem(e))return;let t=setTimeout(()=>{sessionStorage.setItem(e,`true`),m(e=>(0,Z.jsxs)(`div`,{className:`max-w-xs`,children:[(0,Z.jsx)(`p`,{className:`font-semibold text-gray-900 mb-0.5`,children:`Ready to connect your real Service Bus?`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-3`,children:`See your actual messages, DLQ data, and AI insights on live traffic.`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>{r(`/connect`),m.dismiss(e.id)},className:`px-3 py-1.5 bg-primary-600 hover:bg-primary-700 text-white text-xs font-semibold rounded-lg transition-colors`,children:`Connect now →`}),(0,Z.jsx)(`button`,{onClick:()=>m.dismiss(e.id),className:`px-3 py-1.5 text-gray-500 hover:text-gray-700 text-xs transition-colors`,children:`Keep exploring`})]})]}),{duration:15e3,id:`demo-nudge`,style:{maxWidth:`320px`,padding:`16px`},position:`bottom-right`})},9e4);return()=>clearTimeout(t)},[i]);let{data:T,isLoading:E,error:D,refetch:A,isFetching:te,dataUpdatedAt:j}=W_({namespaceId:a||``,queueOrTopicName:d,entityType:u,queueType:_,skip:x.skip,take:50,autoRefresh:y&&x.skip===0}),{data:M,refetch:ne}=Oe(a||``,y),{data:re,refetch:ie}=v_(a||``,s||``,y);(0,P.useEffect)(()=>{T?.items&&(S(e=>{if(e.skip===0)return{...e,allMessages:T.items};{let t=new Set(e.allMessages.map(e=>e.messageId)),n=T.items.filter(e=>!t.has(e.messageId));return{...e,allMessages:[...e.allMessages,...n]}}}),w(!1))},[T?.items,x.skip]),(0,P.useEffect)(()=>{u===`queue`&&a&&o?ne():u===`topic`&&a&&s&&c&&ie()},[a,o,s,c,u,ne,ie]);let ae=()=>{if(i&&oe.length>0)return{active:oe.filter(e=>e.queueType===`active`).length,deadletter:oe.filter(e=>e.queueType===`deadletter`).length};if(u===`queue`&&o){let e=M?.find(e=>e.name===o);return{active:e?.activeMessageCount||0,deadletter:e?.deadLetterMessageCount||0}}else if(u===`topic`&&c&&s){let e=re?.find(e=>e.name===c);return{active:e?.activeMessageCount||0,deadletter:e?.deadLetterMessageCount||0}}return{active:0,deadletter:0}},oe=(0,P.useMemo)(()=>i?My(50).map((e,t)=>{let n={...e};if(t<10&&e.queueType!==`deadletter`)if(n.status=`error`,n.queueType=`deadletter`,n.deadLetterReason=e.deadLetterReason||`MaxDeliveryCountExceeded`,n.deadLetterSource=e.deadLetterSource||`PaymentService`,n.preview=`[ERROR] ${e.preview.substring(0,60)}`,Math.random()<.8){let r=vy[t%vy.length];n.hasAIInsight=!0,n.aiAnalysis={issue:r.issue,recommendations:[...r.recommendations],detectedAt:new Date(e.enqueuedTime.getTime()+6e4)}}else n.hasAIInsight=!1,n.aiAnalysis=void 0;if(n.queueType===`active`&&!n.aiAnalysis&&Math.random()<.5){let t=vy[Math.floor(Math.random()*vy.length)];n.hasAIInsight=!0,n.aiAnalysis={issue:t.issue,recommendations:[...t.recommendations],detectedAt:new Date(e.enqueuedTime.getTime()+Math.floor(Math.random()*3e5+3e4))}}return n}):[],[i]),se=ae(),{data:ce}=P_(T?.items,{namespaceId:a||``,entityName:d,subscriptionName:c||void 0,entityType:u},!!a&&!!d&&!E&&!i),le=(0,P.useMemo)(()=>{if(!i||oe.length===0)return[];let e=oe.filter(e=>e.aiAnalysis);return e.map((t,n)=>({id:`demo-insight-${n}`,type:`error-cluster`,title:t.aiAnalysis.issue.substring(0,100),description:t.aiAnalysis.issue,confidence:{level:`high`,score:.95,reasoning:`Detected from message patterns in demo dataset`},evidence:{sampleSize:e.length,affectedMessageIds:[t.id],exampleMessageIds:[t.id],metrics:[{label:`Confidence`,value:`95%`,comparison:`High confidence pattern match`,isAnomaly:!1}],patternSignature:t.aiAnalysis.issue.substring(0,50)},recommendations:t.aiAnalysis.recommendations.map(e=>({title:e.substring(0,50),description:e,priority:`immediate`})),timeWindow:{start:t.enqueuedTime.toISOString(),end:new Date().toISOString(),analysisTimestamp:t.aiAnalysis.detectedAt.toISOString()},scope:{namespaceId:`demo`,queueOrTopicName:`demo-queue`},status:`active`}))},[i,oe]),ue=(0,P.useMemo)(()=>i?le:ce||[],[i,le,ce]),{data:de}=N_(a||``,d||``),[fe,pe]=(0,P.useState)(!1),[me,he]=(0,P.useState)(``),ge=(0,P.useDeferredValue)(me),[ve,ye]=(0,P.useState)(!1),[be,xe]=(0,P.useState)(`all`),[Se,Ce]=(0,P.useState)(null),we=(0,P.useMemo)(()=>{if(!ue)return[];let e=new Set;return ue.forEach(t=>{t.evidence.affectedMessageIds.forEach(t=>e.add(t))}),Array.from(e)},[ue]),Te=i?oe.filter(e=>e.queueType===_).sort((e,t)=>t.enqueuedTime.getTime()-e.enqueuedTime.getTime()):x.allMessages.map(e=>Ny(e,we,_)).sort((e,t)=>t.enqueuedTime.getTime()-e.enqueuedTime.getTime()),De=(0,P.useMemo)(()=>Te.find(e=>e.id===h)??null,[Te,h]),ke=(0,P.useMemo)(()=>{let e=Te;if(Se&&(e=e.filter(e=>Se.includes(e.id))),ge.trim()){let t=ge.toLowerCase();e=e.filter(e=>e.id.toLowerCase().includes(t)||e.preview.toLowerCase().includes(t)||typeof e.body==`string`&&e.body.toLowerCase().includes(t)||JSON.stringify(e.properties).toLowerCase().includes(t))}return be!==`all`&&(e=e.filter(e=>e.status===be)),e},[Te,Se,ge,be]),Ae=ue?.length||de?.activeCount||0,je=T?.totalCount||0,Me=x.skip+50{w(!0),S(e=>({...e,skip:e.skip+50}))},Pe=e=>{g(e)},Ie=n=>{v(n),g(null);let r=new URLSearchParams(e);r.set(`queueType`,n),t(r,{replace:!0}),u===`queue`?ne():u===`topic`&&ie()},Le=e=>{Ce(e),pe(!1),m.success(`Showing ${e.length} affected messages`)},Re=()=>{Ce(null),m.success(`Filter cleared`)},ze=()=>{A(),n.invalidateQueries({queryKey:[`queues`]}),n.invalidateQueries({queryKey:[`topics`]}),n.invalidateQueries({queryKey:[`subscriptions`]}),m.success(`Messages refreshed`)},Be=()=>{b(e=>{let t=!e;return m.success(t?`🔄 Auto-refresh enabled (7s)`:`⏸️ Auto-refresh paused`,{duration:2e3}),t})},Ve=()=>{if(!j)return``;let e=Math.floor((Date.now()-j)/1e3);return e<5?`just now`:e<60?`${e}s ago`:`${Math.floor(e/60)}m ago`};if(E)return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-white border-b border-gray-200 px-4 py-3 flex items-center gap-3 shrink-0`,children:(0,Z.jsx)(`div`,{className:`flex-1 text-sm text-gray-500`,children:`Loading messages...`})}),(0,Z.jsx)(ry,{})]});if(D){let e=D instanceof Error?D.message:`An error occurred`,t=e.toLowerCase().includes(`network`)||e.toLowerCase().includes(`connection`)||e.toLowerCase().includes(`timeout`);return(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`⚠️`}),(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900 mb-2`,children:`Failed to load messages`}),(0,Z.jsx)(`p`,{className:`text-gray-600 mb-2`,children:e}),t&&(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`Check if the API server is running and Azure Service Bus is accessible.`}),(0,Z.jsx)(`button`,{onClick:()=>A(),className:`px-4 py-2 bg-primary-500 text-white rounded-lg hover:bg-primary-600`,children:`Try Again`})]})})}return!i&&(!a||!d)?(0,Z.jsx)(`div`,{className:`flex-1 flex items-center justify-center bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`📬`}),(0,Z.jsx)(`h2`,{className:`text-xl font-semibold text-gray-900 mb-2`,children:`No entity selected`}),(0,Z.jsx)(`p`,{className:`text-gray-600`,children:`Select a queue or topic subscription from the sidebar to view messages`})]})}):(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative`,"data-tour":`messages-area`,children:[i&&(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-blue-200 px-4 py-3 flex items-center justify-between shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`inline-flex items-center justify-center w-5 h-5 bg-blue-600 rounded-full text-white text-xs font-bold`,children:`▶`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-blue-900`,children:`🎬 Interactive Demo — 50 Production-Realistic Messages`}),(0,Z.jsx)(`p`,{className:`text-xs text-blue-700 mt-0.5`,children:`Try the DLQ tab to see error patterns • Click AI Insights for root-cause analysis • Use filters to pinpoint issues`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>r(`/messages?demo=true&queueType=deadletter`),className:`text-xs font-medium text-blue-700 hover:bg-blue-100 px-2.5 py-1 rounded transition-colors`,title:`View Dead-Letter Queue`,children:`📬 View DLQ`}),(0,Z.jsxs)(`button`,{onClick:()=>r(`/connect`),className:`flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium text-blue-700 hover:bg-blue-100 rounded transition-colors`,title:`Return to Connect page`,children:[(0,Z.jsx)(Fe,{className:`w-3.5 h-3.5`}),(0,Z.jsx)(`span`,{children:`Exit Demo`})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-white border-b border-gray-200 px-4 py-3 flex items-center gap-3 shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 max-w-md relative`,children:[(0,Z.jsx)(_e,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400`}),(0,Z.jsx)(`input`,{type:`text`,placeholder:`Search messages by ID, properties, or content...`,value:me,onChange:e=>he(e.target.value),className:`w-full pl-10 pr-4 py-2.5 rounded-lg text-sm bg-white border border-gray-300 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-sky-500 focus:border-sky-500 transition-all`}),me&&(0,Z.jsx)(`button`,{onClick:()=>he(``),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,children:(0,Z.jsx)(Fe,{className:`w-4 h-4`})})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsxs)(`button`,{onClick:()=>ye(!ve),className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm transition-colors ${be!==`all`||ve?`border-sky-300 bg-sky-50 text-sky-700`:`border-gray-200 hover:bg-gray-50 text-gray-700`}`,children:[(0,Z.jsx)(ee,{className:`w-4 h-4`}),`Filter`,be!==`all`&&(0,Z.jsx)(`span`,{className:`w-2 h-2 bg-sky-500 rounded-full`})]}),ve&&(0,Z.jsxs)(`div`,{className:`absolute top-full right-0 mt-1 w-48 bg-white border border-gray-200 rounded-lg shadow-lg z-50 py-1`,children:[(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs font-semibold text-gray-500 uppercase`,children:`Status`}),[`all`,`success`,`warning`,`error`].map(e=>(0,Z.jsxs)(`button`,{onClick:()=>{xe(e),ye(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 flex items-center gap-2 ${be===e?`bg-sky-50 text-sky-700`:`text-gray-700`}`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full ${e===`all`?`bg-gray-400`:e===`success`?`bg-green-500`:e===`warning`?`bg-amber-500`:`bg-red-500`}`}),e===`all`?`All Messages`:e===`error`?`Dead-Letter`:e.charAt(0).toUpperCase()+e.slice(1)]},e))]})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsxs)(`button`,{onClick:()=>pe(!fe),className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm font-medium transition-colors ${fe?`border-primary-300 bg-primary-50 text-primary-700`:`border-gray-200 hover:bg-gray-50 text-gray-700`}`,children:[(0,Z.jsx)(s_,{className:`w-4 h-4 text-primary-500`}),`AI Findings: `,Ae,(0,Z.jsx)(Ue,{...qe.messages.aiFindings,position:`bottom`,className:`ml-0.5`})]}),fe&&(0,Z.jsx)(ny,{insights:ue||[],onClose:()=>pe(!1),onViewEvidence:Le})]}),(0,Z.jsx)(`button`,{onClick:Be,className:`flex items-center gap-2 px-3 py-2 border rounded-lg text-sm font-medium transition-colors ${y?`border-green-300 bg-green-50 text-green-700 hover:bg-green-100`:`border-gray-300 bg-gray-50 text-gray-600 hover:bg-gray-100`}`,"aria-label":y?`Pause auto-refresh`:`Resume auto-refresh`,title:y?`Auto-refresh every 7 seconds`:`Auto-refresh paused`,children:y?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(e_,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Auto: ON`}),(0,Z.jsx)(Ue,{...qe.messages.autoRefresh,position:`bottom`,className:`ml-0.5`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(n_,{className:`w-4 h-4`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Auto: OFF`})]})}),(0,Z.jsxs)(`button`,{onClick:ze,className:`flex items-center gap-2 px-3 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg text-sm font-medium transition-colors relative`,"aria-label":`Refresh message list`,disabled:te&&!E,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 ${te&&!E?`animate-spin`:``}`}),(0,Z.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`}),j&&(0,Z.jsxs)(`span`,{className:`hidden md:inline text-xs opacity-75 ml-1`,children:[`(`,Ve(),`)`]})]})]}),Se&&(0,Z.jsxs)(`div`,{className:`bg-primary-50 border-b border-primary-200 px-4 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(s_,{className:`w-4 h-4 text-primary-500`}),(0,Z.jsxs)(`span`,{className:`text-sm text-primary-700`,children:[`Showing `,(0,Z.jsx)(`strong`,{children:Se.length}),` of `,Te.length.toLocaleString(),` messages`,(0,Z.jsx)(`span`,{className:`text-primary-500 ml-1`,children:`(AI pattern filter active)`})]})]}),(0,Z.jsxs)(`button`,{onClick:Re,className:`flex items-center gap-1 text-sm text-primary-600 hover:text-primary-700 font-medium`,children:[`Clear filter`,(0,Z.jsx)(Fe,{className:`w-4 h-4`})]})]}),Me&&!Se&&(0,Z.jsxs)(`div`,{className:`bg-blue-50 border-b border-blue-200 px-4 py-2.5 flex items-center gap-2`,children:[(0,Z.jsx)(He,{className:`w-4 h-4 text-blue-600 shrink-0`}),(0,Z.jsxs)(`span`,{className:`text-xs text-blue-800 flex-1`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`More messages available:`}),` Showing `,Te.length.toLocaleString(),` of `,je.toLocaleString(),` messages. Scroll down or click "Load More" to view additional messages.`]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,Z.jsx)(kv,{messages:ke,selectedId:h,onSelectMessage:Pe,queueTab:_,onQueueTabChange:Ie,activeCounts:{active:se.active,deadletter:se.deadletter},hasMoreMessages:Me,isLoadingMore:C,onLoadMore:Ne}),(0,Z.jsx)($v,{message:De,onViewPattern:Le,insights:ue})]})]})}function Fy(){let e=O(),[t,n]=(0,P.useState)(!1),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(`dev`),[l,u]=(0,P.useState)(()=>localStorage.getItem(`servicehub_v310_hkdf_notice_dismissed`)!==`true`),d=()=>{localStorage.setItem(`servicehub_v310_hkdf_notice_dismissed`,`true`),u(!1)},[f,p]=(0,P.useState)({isOpen:!1,id:``,name:``}),{data:h,isLoading:g}=N(),_=j(),v=S(),y=e=>{try{let t=e.match(/Endpoint=sb:\/\/([^.]+)\.servicebus\./i);return t&&t[1]?t[1]:null}catch{return null}},b=async e=>{if(e.preventDefault(),!r.trim()||!a.trim())return;let t=y(a.trim());if(!t){m.error(`Could not extract namespace from connection string. Please verify the format.`,{duration:5e3});return}try{let e=await _.mutateAsync({name:t,connectionString:a.trim(),displayName:r.trim(),environment:s});e.hasManagePermission===!1&&e.hasSendPermission===!1?m.success(`✓ Connected with Listen-only access. Perfect for DLQ inspection and message browsing. Quick Actions (FAB) require a Manage policy for send, generate, and dead-letter operations.`,{duration:8e3}):e.hasManagePermission===!1&&m(`✓ Connected with Send + Listen access. Replay and send operations are available. Some Quick Actions may require Manage permission.`,{duration:6e3,style:{background:`#f0fdf4`,color:`#166534`,border:`1px solid #86efac`}}),i(``),o(``),n(!1),c(`dev`)}catch{}},x=(e,t)=>{p({isOpen:!0,id:e,name:t})},C=async()=>{await v.mutateAsync(f.id),p({isOpen:!1,id:``,name:``})},w=()=>{p({isOpen:!1,id:``,name:``})};return g?(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-screen`,children:(0,Z.jsxs)(`div`,{className:`text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 border-4 border-primary-200 border-t-primary-600 rounded-full animate-spin mx-auto mb-4`}),(0,Z.jsx)(`p`,{className:`text-gray-600`,children:`Loading connections...`})]})}):(0,Z.jsxs)(`div`,{className:`flex-1 overflow-auto bg-gradient-to-b from-white to-gray-50 p-6 md:p-8`,children:[(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsxs)(`div`,{className:`mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-sky-500 animate-pulse`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-sky-700`,children:`Free · Open Source · No installation`})]}),(0,Z.jsxs)(`h1`,{className:`text-2xl font-bold text-gray-900 leading-tight`,children:[`Debug Azure Service Bus`,` `,(0,Z.jsx)(`span`,{className:`text-primary-600`,children:`in seconds.`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`Browse messages, pinpoint DLQ failures, replay dead-lettered events — all from your browser.`})]}),l&&(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-amber-50 border border-amber-200 p-3 flex items-start justify-between gap-3`,children:[(0,Z.jsxs)(`p`,{className:`text-xs text-amber-800`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`ServiceHub v3.1.0`}),` upgrades encryption key derivation (HKDF).`,` `,`If you have existing saved connections, they must be re-added — delete them and add them again with your connection string.`]}),(0,Z.jsx)(`button`,{type:`button`,onClick:d,className:`shrink-0 text-xs font-medium text-amber-700 hover:text-amber-900 whitespace-nowrap`,children:`I understand, don't show again`})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-sky-50 border border-sky-200 p-3 flex items-start gap-2.5`,children:[(0,Z.jsx)(ne,{className:`w-4 h-4 text-sky-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-sky-800`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:`Single-instance storage:`}),` Namespace connections are stored locally on the server running ServiceHub.`,` `,`If you are running `,(0,Z.jsx)(`strong`,{children:`multiple instances`}),` (e.g., Azure App Service with scale-out), each instance has its own connection list.`,` `,`Use `,(0,Z.jsx)(`strong`,{children:`sticky sessions`}),` or ensure all instances share the same storage path to avoid inconsistent connection lists across page refreshes.`]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-6 items-start mb-6`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-5`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(`span`,{className:`text-base`,children:`☁️`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:`Connect to Service Bus`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500`,children:`A Listen-only SAS policy is all you need.`})]})]}),(0,Z.jsxs)(`div`,{className:`mb-4 rounded-lg bg-green-50 border border-green-100 p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-green-600 flex-shrink-0`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-green-800`,children:`Your data stays yours`})]}),(0,Z.jsx)(`div`,{className:`space-y-1`,children:[{label:`Connection string`,value:`AES-256-GCM encrypted before saving — never returned to browser`},{label:`Message content`,value:`Never logged or stored by ServiceHub`}].map(({label:e,value:t})=>(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,Z.jsx)(`span`,{className:`text-green-500 mt-0.5 flex-shrink-0`,children:`✓`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsxs)(`span`,{className:`font-medium text-green-800`,children:[e,`:`]}),` `,(0,Z.jsx)(`span`,{className:`text-green-700`,children:t})]})]},e))}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mt-2 pt-2 border-t border-green-100`,children:[(0,Z.jsx)(`a`,{href:`https://github.com/debdevops/servicehub/blob/main/services/api/src/ServiceHub.Infrastructure/Security/ConnectionStringProtector.cs`,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs text-green-700 hover:text-green-900 underline underline-offset-2`,children:`Verify encryption code →`}),(0,Z.jsx)(M,{to:`/security`,className:`text-xs text-green-700 hover:text-green-900 underline underline-offset-2`,children:`Security overview →`})]})]}),(0,Z.jsxs)(`form`,{onSubmit:b,children:[(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Display Name `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.displayName,position:`right`,className:`ml-1`})]}),(0,Z.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.target.value),placeholder:`e.g., Production Service Bus`,required:!0,className:`w-full px-3 py-2 rounded-lg text-sm bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`})]}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Connection String `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.connectionString,position:`right`,className:`ml-1`})]}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`input`,{type:t?`text`:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Endpoint=sb://...;SharedAccessKey=...`,required:!0,className:`w-full px-3 py-2 pr-10 rounded-lg text-sm font-mono bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`}),(0,Z.jsx)(`button`,{type:`button`,onClick:()=>n(!t),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600`,children:t?(0,Z.jsx)(Ig,{className:`w-4 h-4`}):(0,Z.jsx)(Ie,{className:`w-4 h-4`})})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 mt-1.5 text-xs text-green-700`,children:[(0,Z.jsx)(Ve,{className:`w-3 h-3 text-green-600 shrink-0`}),`AES-GCM encrypted at rest — never stored in plaintext.`]})]}),(0,Z.jsxs)(`div`,{className:`mb-4`,children:[(0,Z.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`Environment `,(0,Z.jsx)(`span`,{className:`text-red-500`,children:`*`}),(0,Z.jsx)(Ue,{...qe.connect.environment,position:`right`,className:`ml-1`})]}),(0,Z.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),className:`w-full px-3 py-2 rounded-lg text-sm bg-white border border-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-400 focus:border-primary-300`,children:[(0,Z.jsx)(`option`,{value:`dev`,children:`DEV — Development`}),(0,Z.jsx)(`option`,{value:`uat`,children:`UAT — User Acceptance Testing`}),(0,Z.jsx)(`option`,{value:`prod`,children:`PROD — Production`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`Production disables Quick Actions for safety.`})]}),(0,Z.jsx)(`button`,{type:`submit`,disabled:_.isPending,className:`w-full px-4 py-2.5 rounded-lg font-medium transition-colors flex items-center justify-center gap-2 text-white bg-primary-500 hover:bg-primary-600 disabled:bg-primary-300`,children:_.isPending?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin`}),`Connecting...`]}):(0,Z.jsx)(Z.Fragment,{children:`Connect`})})]}),(0,Z.jsxs)(`div`,{className:`mt-3 rounded-r-lg border-l-2 border-blue-300 bg-blue-50 pl-3 pr-2 py-2`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-blue-800 mb-1`,children:`💡 A Listen-only key is all you need — and it's the safest option`}),(0,Z.jsxs)(`p`,{className:`text-xs text-blue-700 mb-1`,children:[`A Listen-only policy can `,(0,Z.jsx)(`strong`,{children:`only read`}),` messages. It cannot delete, send, or modify anything. Even if this key were ever exposed, your data remains safe.`]}),(0,Z.jsxs)(`ol`,{className:`text-xs text-blue-700 space-y-0.5 list-decimal list-inside`,children:[(0,Z.jsx)(`li`,{children:`Azure Portal → your Service Bus namespace`}),(0,Z.jsx)(`li`,{children:`Shared access policies → + Add policy`}),(0,Z.jsxs)(`li`,{children:[`Name it `,(0,Z.jsx)(`code`,{className:`bg-blue-100 px-1 rounded`,children:`servicehub`}),`, tick `,(0,Z.jsx)(`strong`,{children:`Listen only`})]}),(0,Z.jsx)(`li`,{children:`Save → copy Primary Connection String → paste above`})]})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-5`,children:[(0,Z.jsxs)(`h2`,{className:`text-sm font-semibold text-gray-900 mb-3 flex items-center gap-1.5`,children:[`Saved Connections`,(0,Z.jsx)(Ue,{...qe.connect.savedConnections,position:`bottom`,className:`ml-1`})]}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:h&&h.length>0?h.map(t=>(0,Z.jsxs)(`div`,{className:`flex items-center justify-between p-4 rounded-lg transition-colors cursor-pointer bg-gray-50 border border-gray-200 hover:bg-gray-100 hover:border-gray-300`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full ${t.isActive?`bg-green-500`:`bg-gray-300`}`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h3`,{className:`font-medium text-gray-900`,children:t.displayName||t.name}),(0,Z.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] font-semibold rounded uppercase ${t.environment===`prod`?`bg-red-100 text-red-700`:t.environment===`uat`?`bg-amber-100 text-amber-700`:`bg-green-100 text-green-700`}`,children:t.environment||`dev`})]}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500`,children:[t.name,t.lastUsedAt&&` • Last used: ${new Date(t.lastUsedAt).toLocaleDateString()}`]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:()=>e(`/messages?namespace=${t.id}`),className:`px-3 py-1.5 text-white text-sm font-medium rounded-lg transition-colors bg-primary-500 hover:bg-primary-600`,"aria-label":`Open ${t.displayName||t.name} namespace`,children:`Open`}),(0,Z.jsx)(`button`,{onClick:()=>x(t.id,t.displayName||t.name),className:`p-1.5 hover:bg-red-100 text-red-600 rounded-lg transition-colors`,type:`button`,"aria-label":`Delete ${t.displayName||t.name} connection`,children:(0,Z.jsx)(d_,{className:`w-4 h-4`})})]})]},t.id)):(0,Z.jsxs)(`div`,{className:`text-center py-8`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-gray-100 border border-gray-200 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-2xl`,children:`📭`})}),(0,Z.jsx)(`h3`,{className:`font-medium text-gray-900 mb-1`,children:`No saved connections yet`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Add your first Service Bus to get started`})]})})]}),(0,Z.jsxs)(`div`,{className:`bg-gradient-to-r from-slate-800 to-primary-900 rounded-xl border border-slate-700 p-4 flex items-center gap-4`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-amber-400/20 border border-amber-400/30 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(n_,{className:`w-4 h-4 text-amber-300 fill-current`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-white`,children:`No Service Bus? Try the live demo`}),(0,Z.jsx)(`p`,{className:`text-[11px] text-slate-400 mt-0.5`,children:`50 production-realistic messages, DLQ scenarios, AI root-cause analysis — no credentials needed.`})]}),(0,Z.jsxs)(`button`,{onClick:()=>e(`/messages?demo=true`),className:`shrink-0 px-3 py-1.5 bg-amber-400 hover:bg-amber-300 text-slate-900 font-semibold text-xs rounded-lg transition-colors flex items-center gap-1.5`,children:[`Launch`,(0,Z.jsx)(Ne,{className:`w-3 h-3`})]})]}),(0,Z.jsx)(`div`,{className:`bg-white rounded-xl border border-blue-100 p-4`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-blue-50 rounded-lg flex items-center justify-center flex-shrink-0`,children:(0,Z.jsx)(Ve,{className:`w-4 h-4 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-gray-900 mb-0.5`,children:`Prefer zero-trust? Run it yourself.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-2`,children:`Deploy ServiceHub inside your own Azure subscription in under 10 minutes. Your data never leaves your infrastructure.`}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub/blob/main/self-hosting/README.md`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-xs font-medium text-blue-600 hover:text-blue-800`,children:[`Self-hosting guide `,(0,Z.jsx)(Ne,{className:`w-3 h-3`})]})]})]})})]})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 text-center mb-2`,children:`How it works`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 text-center mb-6`,children:`From zero to full message visibility in under 60 seconds`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`1`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`60 seconds to your first message view`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Paste a Listen-only connection string — no admin rights, no Azure Portal clutter, no SDK to install`})]}),(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`2`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`Find the failing message in seconds, not hours`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Filter by status, search by content, jump to the DLQ, and let AI pinpoint the root cause automatically`})]}),(0,Z.jsxs)(`div`,{className:`text-center p-5 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-primary-50 border border-primary-100 rounded-full flex items-center justify-center mx-auto mb-3`,children:(0,Z.jsx)(`span`,{className:`text-sm font-bold text-primary-600`,children:`3`})}),(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:`Fix and replay without switching tools`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1.5`,children:`Bulk-replay dead-lettered messages, set auto-replay rules, and trace correlation chains — all in one browser tab`})]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-12`,children:[(0,Z.jsx)(`h3`,{className:`text-xl font-semibold text-gray-900 text-center mb-2`,children:`Built for these exact scenarios`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 text-center mb-8`,children:`Real problems that ServiceHub solves in minutes, not hours`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6`,children:[(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-red-50 border border-red-200 text-red-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-red-500`}),` Dead-Letter Flood`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`847 messages failing? Find the pattern in 30 seconds.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`Group by error, spot the duplicate root cause (null ref, version mismatch, timeout), apply a fix, 1-click bulk replay. Azure Portal: 30 min. ServiceHub: 2 min.`})]}),(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-amber-50 border border-amber-200 text-amber-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber-500`}),` Retry Loop`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Message stuck reprocessing infinitely? Diagnose in 20 seconds.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`View retry count, delivery history, peek the exact error, check for circuit-breaker miss or config bug. Dead-letter before it cascades.`})]}),(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 text-xs font-semibold mb-4`,children:[(0,Z.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-blue-500`}),` Correlation Tracing`]}),(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-2`,children:`Payment failed → trace all downstream effects in one view.`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600`,children:`Jump from OrderCreated → PaymentProcessed → InventoryReserved. See what order #12847 touched. Replay the chain together.`})]})]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8 mb-12`,children:[(0,Z.jsxs)(`div`,{className:`bg-gradient-to-br from-gray-50 to-white rounded-xl border border-gray-200 p-6`,children:[(0,Z.jsxs)(`h4`,{className:`text-sm font-bold text-gray-800 mb-4 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-base`,children:`⚡`}),`ServiceHub vs Azure Portal`]}),(0,Z.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[[{task:`Find a failed message`,portal:`8–15 min`,hub:`< 30 sec`,hubClass:`text-green-700 font-semibold`},{task:`Replay DLQ batch`,portal:`Not possible`,hub:`1 click`,hubClass:`text-green-700 font-semibold`},{task:`AI root-cause analysis`,portal:`Not available`,hub:`Automatic`,hubClass:`text-green-700 font-semibold`},{task:`Share message link`,portal:`Not possible`,hub:`Deep link`,hubClass:`text-green-700 font-semibold`},{task:`Works on Mac/Linux`,portal:`✓`,hub:`✓`,hubClass:`text-gray-700`}].map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center text-xs`,children:[(0,Z.jsx)(`span`,{className:`flex-1 text-gray-700`,children:e.task}),(0,Z.jsx)(`span`,{className:`w-24 text-center text-gray-400`,children:e.portal}),(0,Z.jsx)(`span`,{className:`w-24 text-center ${e.hubClass}`,children:e.hub})]},e.task)),(0,Z.jsxs)(`div`,{className:`flex items-center text-[10px] text-gray-400 pt-1 border-t border-gray-100`,children:[(0,Z.jsx)(`span`,{className:`flex-1`}),(0,Z.jsx)(`span`,{className:`w-24 text-center`,children:`Azure Portal`}),(0,Z.jsx)(`span`,{className:`w-24 text-center text-primary-600 font-semibold`,children:`ServiceHub`})]})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gradient-to-br from-slate-900 to-slate-800 rounded-xl border border-slate-700 p-6 flex flex-col justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(c_,{className:`w-5 h-5 text-amber-400 fill-current`}),(0,Z.jsx)(`span`,{className:`text-sm font-bold text-white`,children:`Open Source`})]}),(0,Z.jsx)(`p`,{className:`text-slate-300 text-sm leading-relaxed mb-4`,children:`ServiceHub is free, open-source, and built by engineers for engineers. If it saved your 2 AM, consider starring the repo — it takes 3 seconds and helps other developers find it.`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-slate-500 mb-5`,children:[(0,Z.jsx)(Ve,{className:`w-3.5 h-3.5`}),`Connection strings encrypted · No telemetry on message content · Self-hostable`]})]}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2 px-4 py-2.5 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-white text-sm font-medium transition-colors`,children:[(0,Z.jsx)(Bg,{className:`w-4 h-4`}),`View on GitHub · ⭐ Star`]})]})]})]}),(0,Z.jsx)(qv,{isOpen:f.isOpen,title:`Delete Connection`,message:`Are you sure you want to delete the connection "${f.name}"?\n\nThis will remove the saved connection but will not affect your Azure Service Bus namespace.`,variant:`danger`,confirmLabel:`Delete`,onConfirm:C,onCancel:w})]})}var Iy=[{value:`DeadLetterReason`,label:`Dead Letter Reason`},{value:`DeadLetterErrorDescription`,label:`Error Description`},{value:`FailureCategory`,label:`Failure Category`},{value:`EntityName`,label:`Entity Name`},{value:`DeliveryCount`,label:`Delivery Count`},{value:`ContentType`,label:`Content Type`},{value:`TopicName`,label:`Topic Name`},{value:`CorrelationId`,label:`Correlation ID`},{value:`BodyPreview`,label:`Body Preview`},{value:`ApplicationProperty`,label:`Application Property`}],Ly=[{value:`Contains`,label:`Contains`},{value:`NotContains`,label:`Does not contain`},{value:`Equals`,label:`Equals`},{value:`NotEquals`,label:`Does not equal`},{value:`StartsWith`,label:`Starts with`},{value:`EndsWith`,label:`Ends with`},{value:`Regex`,label:`Matches regex`},{value:`GreaterThan`,label:`Greater than`},{value:`LessThan`,label:`Less than`},{value:`In`,label:`In (comma-separated)`}],Ry={field:`DeadLetterReason`,operator:`Contains`,value:``},zy={autoReplay:!0,delaySeconds:60,maxRetries:3,exponentialBackoff:!1};function By({open:e,onClose:t,onSave:n,editRule:r,initialConditions:i,initialAction:a,isSaving:o}){let[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(!0),[p,m]=(0,P.useState)([{...Ry}]),[h,g]=(0,P.useState)({...zy}),[_,v]=(0,P.useState)(100);(0,P.useEffect)(()=>{r?(c(r.name),u(r.description??``),f(r.enabled),m(r.conditions.length>0?r.conditions:[{...Ry}]),g(r.action),v(r.maxReplaysPerHour)):i||a?(c(``),u(``),f(!0),m(i?.length?i:[{...Ry}]),g(a??{...zy}),v(100)):y()},[r,i,a,e]);let y=()=>{c(``),u(``),f(!0),m([{...Ry}]),g({...zy}),v(100)},b=()=>{m(e=>[...e,{...Ry}])},x=e=>{m(t=>t.filter((t,n)=>n!==e))},S=(e,t)=>{m(n=>n.map((n,r)=>r===e?{...n,...t}:n))},C=()=>{s.trim()&&(p.some(e=>!e.value.trim())||n({name:s.trim(),description:l.trim()||void 0,enabled:d,conditions:p,action:h,maxReplaysPerHour:_}))},w=s.trim().length>0&&p.every(e=>e.value.trim().length>0);return e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:r?`Edit Auto-Replay Rule`:`Create Auto-Replay Rule`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-sm text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:C,disabled:!w||o,className:`px-4 py-1.5 text-sm font-medium text-white bg-primary-500 rounded-lg hover:bg-primary-600 disabled:opacity-50 transition-colors`,children:o?`Saving...`:`Save`})]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-5 space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Rule Name`}),(0,Z.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., Database Timeouts`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary-500 focus:border-primary-500`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Description`}),(0,Z.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),placeholder:`Describe what this rule does...`,rows:2,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none`})]}),(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:d,onChange:e=>f(e.target.checked),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Enable this rule`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,Z.jsx)(`label`,{className:`text-xs font-semibold text-gray-600 uppercase`,children:`Conditions (all must match)`}),(0,Z.jsxs)(`button`,{onClick:b,className:`flex items-center gap-1 text-xs text-primary-600 hover:text-primary-700 font-medium`,children:[(0,Z.jsx)(we,{className:`w-3.5 h-3.5`}),`Add Condition`]})]}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:p.map((e,t)=>(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-3 bg-gray-50 space-y-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex-1 grid grid-cols-3 gap-2`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Field`}),(0,Z.jsx)(`select`,{value:e.field,onChange:e=>S(t,{field:e.target.value}),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm bg-white`,children:Iy.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Operator`}),(0,Z.jsx)(`select`,{value:e.operator,onChange:e=>S(t,{operator:e.target.value}),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm bg-white`,children:Ly.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Value`}),(0,Z.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>S(t,{value:e.target.value}),placeholder:`Value...`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]}),p.length>1&&(0,Z.jsx)(`button`,{onClick:()=>x(t),className:`p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors mt-4`,title:`Remove condition`,children:(0,Z.jsx)(d_,{className:`w-4 h-4`})})]}),e.field===`ApplicationProperty`&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Property Key`}),(0,Z.jsx)(`input`,{type:`text`,value:e.propertyKey??``,onChange:e=>S(t,{propertyKey:e.target.value}),placeholder:`e.g., x-retry-count`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]},t))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-2`,children:`Actions`}),(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-4 bg-gray-50 space-y-3`,children:[(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:h.autoReplay,onChange:e=>g(t=>({...t,autoReplay:e.target.checked})),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700 font-medium`,children:`Auto-replay messages that match`})]}),h.autoReplay&&(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 pl-6`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Delay (seconds)`}),(0,Z.jsx)(`input`,{type:`number`,min:0,max:86400,value:h.delaySeconds,onChange:e=>g(t=>({...t,delaySeconds:parseInt(e.target.value)||0})),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Max Retries`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:10,value:h.maxRetries,onChange:e=>g(t=>({...t,maxRetries:parseInt(e.target.value)||1})),className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer col-span-2`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:h.exponentialBackoff,onChange:e=>g(t=>({...t,exponentialBackoff:e.target.checked})),className:`w-4 h-4 rounded border-gray-300 text-primary-500 focus:ring-primary-500`}),(0,Z.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Exponential backoff`})]}),(0,Z.jsxs)(`div`,{className:`col-span-2`,children:[(0,Z.jsx)(`label`,{className:`block text-[10px] text-gray-500 uppercase mb-0.5`,children:`Target Entity (optional — leave blank for original)`}),(0,Z.jsx)(`input`,{type:`text`,value:h.targetEntity??``,onChange:e=>g(t=>({...t,targetEntity:e.target.value||void 0})),placeholder:`e.g., fallback-queue`,className:`w-full px-2 py-1.5 border border-gray-300 rounded-lg text-sm`})]})]})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-xs font-semibold text-gray-600 uppercase mb-1`,children:`Max Replays Per Hour`}),(0,Z.jsx)(`input`,{type:`number`,min:1,max:1e4,value:_,onChange:e=>v(parseInt(e.target.value)||100),className:`w-32 px-3 py-2 border border-gray-300 rounded-lg text-sm`})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 p-3 bg-amber-50 border border-amber-200 rounded-xl text-xs text-amber-800`,children:[(0,Z.jsx)(Ug,{className:`w-4 h-4 shrink-0 mt-0.5`}),(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`strong`,{children:`Safety:`}),` Circuit breaker will automatically disable this rule if the success rate drops below 30% over the last 50 replays.`]})]})]})]})}):null}var Vy=`/dlq/rules`,Hy={getAll:async e=>{let t=e==null?void 0:{enabledOnly:e},{data:n}=await me.get(Vy,{params:t});return n},getById:async e=>{let{data:t}=await me.get(`${Vy}/${e}`);return t},create:async e=>{let{data:t}=await me.post(Vy,e);return t},update:async(e,t)=>{let{data:n}=await me.put(`${Vy}/${e}`,t);return n},delete:async e=>{await me.delete(`${Vy}/${e}`)},toggle:async e=>{let{data:t}=await me.post(`${Vy}/${e}/toggle`);return t},replayAll:async e=>{let{data:t}=await me.post(`${Vy}/${e}/replay-all`,null,{timeout:12e4});return t},test:async e=>{let{data:t}=await me.post(`${Vy}/test`,e);return t},getTemplates:async()=>{let{data:e}=await me.get(`${Vy}/templates`);return e},generateRules:async e=>{let t=e?{namespaceId:e}:void 0,{data:n}=await me.post(`${Vy}/generate`,null,{params:t});return n}},Uy=[`rules`],Wy=[`dlq-history`,`dlq-summary`];function Gy(e){return be({queryKey:[...Uy,{enabledOnly:e}],queryFn:()=>Hy.getAll(e),staleTime:3e4,refetchInterval:e=>e.state.status===`error`?!1:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>t?.response?.status===429||t?.response?.status===404||(t?.response?.status??0)>=500?!1:e<2})}function Ky(){return be({queryKey:[`rule-templates`],queryFn:()=>Hy.getTemplates(),staleTime:6e4*5})}function qy(){let e=f();return i({mutationFn:e=>Hy.create(e),onSuccess:t=>{e.invalidateQueries({queryKey:Uy}),m.success(`Rule "${t.name}" created`)},onError:()=>m.error(`Failed to create rule`)})}function Jy(){let e=f();return i({mutationFn:({id:e,request:t})=>Hy.update(e,t),onSuccess:t=>{e.invalidateQueries({queryKey:Uy}),m.success(`Rule "${t.name}" updated`)},onError:()=>m.error(`Failed to update rule`)})}function Yy(){let e=f();return i({mutationFn:e=>Hy.delete(e),onSuccess:()=>{e.invalidateQueries({queryKey:Uy}),m.success(`Rule deleted`)},onError:()=>m.error(`Failed to delete rule`)})}function Xy(){let e=f();return i({mutationFn:e=>Hy.toggle(e),onSuccess:t=>{e.invalidateQueries({queryKey:Uy}),m.success(`Rule "${t.name}" ${t.enabled?`enabled`:`disabled`}`)},onError:()=>m.error(`Failed to toggle rule`)})}function Zy(){return i({mutationFn:e=>Hy.test(e),onError:()=>m.error(`Failed to test rule`)})}function Qy(){let e=f();return i({mutationFn:e=>Hy.replayAll(e),onSuccess:t=>{e.invalidateQueries({queryKey:Uy}),Wy.forEach(t=>e.invalidateQueries({queryKey:[t]})),t.replayed>0?m.success(`Replayed ${t.replayed} of ${t.totalMatched} matched messages`+(t.failed>0?` (${t.failed} failed)`:``)):t.totalMatched===0?m(`No messages matched this rule's conditions`,{icon:`ℹ️`}):m.error(`All ${t.totalMatched} matched messages failed to replay`)},onError:()=>m.error(`Failed to execute replay-all`)})}function $y(){let e=f();return i({mutationFn:e=>Hy.generateRules(e),onSuccess:t=>{e.invalidateQueries({queryKey:Uy}),t.rulesCreated>0?m.success(`Analysed ${t.analysedMessages} messages — created ${t.rulesCreated} intelligent rules`):t.analysedMessages===0?m(`No active DLQ messages to analyse`,{icon:`ℹ️`}):m(`All detected patterns already have rules`,{icon:`ℹ️`})},onError:()=>m.error(`Failed to generate intelligent rules`)})}var eb={Transient:`bg-green-100 text-green-700`,MaxDelivery:`bg-orange-100 text-orange-700`,Expired:`bg-yellow-100 text-yellow-700`,ResourceNotFound:`bg-blue-100 text-blue-700`,QuotaExceeded:`bg-red-100 text-red-700`},tb={Transient:`🟢`,MaxDelivery:`🔶`,Expired:`⏳`,ResourceNotFound:`🔍`,QuotaExceeded:`🚫`};function nb({open:e,onClose:t,onSelect:n}){let{data:r,isLoading:i}=Ky();return e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-2xl max-h-[85vh] flex flex-col mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Ae,{className:`w-5 h-5 text-primary-500`}),(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:`Choose a Rule Template`})]}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-4`,children:i?(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`Loading templates...`}):r&&r.length>0?r.map(e=>(0,Z.jsx)(rb,{template:e,onSelect:()=>n(e)},e.id)):(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`No templates available`})})]})}):null}function rb({template:e,onSelect:t}){let n=eb[e.category]??`bg-gray-100 text-gray-700`;return(0,Z.jsxs)(`div`,{className:`border border-gray-200 rounded-xl p-4 hover:border-primary-300 hover:shadow-sm transition-all`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-lg`,children:tb[e.category]??`📋`}),(0,Z.jsx)(`h3`,{className:`text-sm font-bold text-gray-900`,children:e.name})]}),(0,Z.jsx)(`span`,{className:`px-2 py-0.5 rounded-full text-xs font-medium ${n}`,children:e.category})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-3`,children:e.description}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-gray-500`,children:[(0,Z.jsxs)(`span`,{children:[`Used `,e.usageCount,` times`]}),(0,Z.jsxs)(`span`,{className:`flex items-center gap-0.5`,children:[(0,Z.jsx)(c_,{className:`w-3.5 h-3.5 text-amber-400 fill-amber-400`}),e.rating.toFixed(1)]})]}),(0,Z.jsx)(`button`,{onClick:t,className:`px-3 py-1.5 text-xs font-medium text-primary-700 bg-primary-50 border border-primary-200 rounded-lg hover:bg-primary-100 transition-colors`,children:`Use This Template`})]})]})}function ib({open:e,onClose:t,rule:n,conditions:r,namespaceId:i}){let a=Zy(),[o,s]=(0,P.useState)(null),c=()=>{s(null),a.mutate({ruleId:n?.id,conditions:n?void 0:r,namespaceId:i,maxMessages:100},{onSuccess:s})},[l,u]=(0,P.useState)(!1);return e&&!l&&(u(!0),c()),!e&&l&&(u(!1),s(null)),e?(0,Z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-2xl w-full max-w-lg mx-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-gray-200`,children:[(0,Z.jsx)(`h2`,{className:`text-lg font-bold text-gray-900`,children:n?`Test Rule: ${n.name}`:`Test Rule Conditions`}),(0,Z.jsx)(`button`,{onClick:t,className:`p-1.5 hover:bg-gray-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`px-6 py-5`,children:[a.isPending&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-8 text-gray-500`,children:[(0,Z.jsx)(Jg,{className:`w-5 h-5 animate-spin`}),(0,Z.jsx)(`span`,{className:`text-sm`,children:`Testing against active DLQ messages...`})]}),a.isError&&!o&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-6 text-red-600`,children:[(0,Z.jsx)(ne,{className:`w-5 h-5`}),(0,Z.jsx)(`span`,{className:`text-sm`,children:`Failed to run test. Please try again.`})]}),o&&(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(x,{className:`w-5 h-5 text-green-500`}),(0,Z.jsx)(`span`,{className:`text-sm font-semibold text-gray-900`,children:`Test Results`})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,Z.jsx)(ab,{label:`Tested`,value:o.totalTested}),(0,Z.jsx)(ab,{label:`Matched`,value:o.matchedCount,highlight:!0}),(0,Z.jsx)(ab,{label:`Est. Success`,value:`${o.estimatedSuccessRate}%`})]}),(0,Z.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Would match`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:o.matchedCount}),` of`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-900`,children:o.totalTested}),` messages`]}),o.sampleMatches.length>0&&(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`text-xs font-semibold text-gray-600 uppercase mb-2`,children:`Sample Matched Messages`}),(0,Z.jsx)(`div`,{className:`space-y-1.5 max-h-40 overflow-y-auto`,children:o.sampleMatches.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 text-xs p-2 bg-green-50 rounded-lg`,children:[(0,Z.jsx)(`span`,{className:`shrink-0 text-green-500 mt-0.5`,children:`•`}),(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsxs)(`span`,{className:`font-mono text-gray-700`,children:[e.serviceBusMessageId.slice(0,12),`...`]}),e.deadLetterReason&&(0,Z.jsxs)(`span`,{className:`text-gray-500 ml-1.5`,children:[`— `,e.deadLetterReason]})]})]},e.messageId))})]}),o.sampleMatches.length===0&&o.matchedCount===0&&(0,Z.jsx)(`div`,{className:`py-3 text-center text-sm text-gray-500`,children:`No messages matched the conditions. Try adjusting the rule.`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-6 py-3 border-t border-gray-200`,children:[(0,Z.jsx)(`button`,{onClick:c,disabled:a.isPending,className:`px-3 py-1.5 text-sm text-primary-700 border border-primary-200 rounded-lg hover:bg-primary-50 transition-colors disabled:opacity-50`,children:`Re-test`}),(0,Z.jsx)(`button`,{onClick:t,className:`px-4 py-1.5 text-sm font-medium text-white bg-primary-500 rounded-lg hover:bg-primary-600 transition-colors`,children:`Close`})]})]})}):null}function ab({label:e,value:t,highlight:n}){return(0,Z.jsxs)(`div`,{className:`rounded-xl p-3 text-center ${n?`bg-primary-50`:`bg-gray-50`}`,children:[(0,Z.jsx)(`div`,{className:`text-xl font-bold ${n?`text-primary-700`:`text-gray-900`}`,children:typeof t==`number`?t.toLocaleString():t}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-500`,children:e})]})}function ob(){let{data:e,isLoading:t,refetch:n,isFetching:r}=Gy(),i=qy(),a=Jy(),o=Yy(),s=Xy(),c=Qy(),l=$y(),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(null),E=()=>{_(null),T(null),d(!0)},D=e=>{_(e),T(null),d(!0)},O=e=>{p(!1),_(null),T({conditions:e.conditions,action:e.action}),d(!0)},ee=e=>{y(e),h(!0)},k=e=>{g?a.mutate({id:g.id,request:e},{onSuccess:()=>d(!1)}):i.mutate(e,{onSuccess:()=>d(!1)})},A=e=>{C(e)},te=()=>{S&&o.mutate(S.id,{onSettled:()=>C(null)})},j=e=>{x(e)},M=()=>{b&&c.mutate(b.id,{onSettled:()=>x(null)})};return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-white border-b border-gray-200 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h1`,{className:`text-xl font-bold text-gray-900`,children:[`Auto-Replay Rules`,(0,Z.jsx)(Ue,{...qe.rules.ruleBuilder,position:`bottom`,className:`ml-1.5`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-0.5`,children:`Define rules that automatically replay dead-letter messages matching specific conditions`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>l.mutate(void 0),disabled:l.isPending,className:`flex items-center gap-1.5 px-3 py-2 bg-violet-50 border border-violet-200 rounded-lg text-sm text-violet-700 hover:bg-violet-100 transition-colors disabled:opacity-50`,title:`Analyse DLQ patterns and automatically create smart rules`,children:[(0,Z.jsx)(Tg,{className:`w-4 h-4 ${l.isPending?`animate-pulse`:``}`}),l.isPending?`Analysing...`:`Generate Intelligent Rules`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(!0),className:`flex items-center gap-1.5 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),`Browse Templates`]}),(0,Z.jsxs)(`button`,{onClick:E,className:`flex items-center gap-1.5 px-3 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg text-sm font-medium transition-colors`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Create Rule`]}),(0,Z.jsx)(`button`,{onClick:()=>n(),disabled:r,className:`p-2 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,title:`Refresh`,children:(0,Z.jsx)(Ee,{className:`w-4 h-4 text-gray-500 ${r?`animate-spin`:``}`})})]})]})}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto p-6`,children:t?(0,Z.jsx)(`div`,{className:`py-12 text-center text-sm text-gray-500`,children:`Loading rules...`}):e&&e.length>0?(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4`,children:e.map(e=>(0,Z.jsx)(sb,{rule:e,onEdit:()=>D(e),onDelete:()=>A(e),onToggle:()=>s.mutate(e.id),onTest:()=>ee(e),onReplayAll:()=>j(e),isReplayingAll:c.isPending&&b?.id===e.id},e.id))}):(0,Z.jsx)(cb,{onCreate:E,onBrowseTemplates:()=>p(!0),onGenerateRules:()=>l.mutate(void 0),isGenerating:l.isPending})}),(0,Z.jsx)(By,{open:u,onClose:()=>d(!1),onSave:k,editRule:g,initialConditions:w?.conditions,initialAction:w?.action,isSaving:i.isPending||a.isPending}),(0,Z.jsx)(nb,{open:f,onClose:()=>p(!1),onSelect:O}),(0,Z.jsx)(ib,{open:m,onClose:()=>{h(!1),y(null)},rule:v}),(0,Z.jsx)(lb,{rule:b,isExecuting:c.isPending,onConfirm:M,onCancel:()=>x(null)}),(0,Z.jsx)(qv,{isOpen:S!==null,title:`Delete Rule`,message:`Delete rule "${S?.name}"? This cannot be undone. Rules that have already matched messages will lose their history statistics.`,confirmLabel:`Delete`,cancelLabel:`Cancel`,variant:`danger`,onConfirm:te,onCancel:()=>C(null)})]})}function sb({rule:e,onEdit:t,onDelete:n,onToggle:r,onTest:i,onReplayAll:a,isReplayingAll:o}){let s=e.matchCount>0?Math.round(e.successCount/e.matchCount*100):0;return(0,Z.jsxs)(`div`,{className:`border rounded-xl p-4 transition-all ${e.enabled?`border-gray-200 bg-white hover:shadow-md`:`border-gray-100 bg-gray-50 opacity-75`}`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,Z.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full shrink-0 ${e.enabled?`bg-green-400`:`bg-gray-300`}`}),e.name.startsWith(`Auto:`)&&(0,Z.jsx)(`span`,{className:`shrink-0 px-1.5 py-0.5 text-[10px] font-bold text-violet-700 bg-violet-100 border border-violet-200 rounded`,children:`AI`}),(0,Z.jsx)(`h3`,{className:`text-sm font-bold text-gray-900 truncate`,children:e.name})]}),(0,Z.jsx)(`button`,{onClick:r,className:`shrink-0 p-1 hover:bg-gray-100 rounded transition-colors`,title:e.enabled?`Disable rule`:`Enable rule`,children:e.enabled?(0,Z.jsx)(u_,{className:`w-5 h-5 text-green-500`}):(0,Z.jsx)(l_,{className:`w-5 h-5 text-gray-400`})})]}),e.description&&(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mb-3 line-clamp-2`,children:e.description}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsx)(`h4`,{className:`text-[10px] font-semibold text-gray-500 uppercase mb-1`,children:`Conditions`}),(0,Z.jsxs)(`div`,{className:`space-y-0.5`,children:[e.conditions.slice(0,3).map((e,t)=>(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`•`}),(0,Z.jsxs)(`span`,{className:`lowercase`,children:[fb(e.field),` `,pb(e.operator),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-gray-800`,children:[`"`,e.value,`"`]})]})]},t)),e.conditions.length>3&&(0,Z.jsxs)(`span`,{className:`text-[10px] text-gray-400`,children:[`+`,e.conditions.length-3,` more`]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-3`,children:[(0,Z.jsx)(`h4`,{className:`text-[10px] font-semibold text-gray-500 uppercase mb-1`,children:`Action`}),(0,Z.jsx)(`div`,{className:`text-xs text-gray-600`,children:e.action.autoReplay?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-green-600`,children:`✓`}),` Auto-replay after`,` `,e.action.delaySeconds,`s`,e.action.exponentialBackoff&&(0,Z.jsx)(`span`,{className:`text-gray-400 ml-1`,children:`(backoff)`})]}):(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`No automatic action`})})]}),(0,Z.jsxs)(`div`,{className:`mb-4 flex items-center gap-4 text-xs text-gray-500`,children:[(0,Z.jsxs)(`span`,{children:[`Pending:`,` `,(0,Z.jsx)(`strong`,{className:e.pendingMatchCount>0?`text-amber-600`:`text-gray-700`,children:e.pendingMatchCount})]}),(0,Z.jsxs)(`span`,{children:[`Replayed:`,` `,(0,Z.jsx)(`strong`,{className:`text-gray-700`,children:e.matchCount})]}),(0,Z.jsxs)(`span`,{children:[`Success:`,` `,(0,Z.jsxs)(`strong`,{className:`text-gray-700`,children:[e.successCount,` (`,s,`%)`]})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 border-t border-gray-100 pt-3`,children:[(0,Z.jsxs)(`button`,{onClick:i,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Rg,{className:`w-3.5 h-3.5`}),`Test`]}),(0,Z.jsxs)(`button`,{onClick:a,disabled:!e.enabled||o,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-amber-700 bg-amber-50 border border-amber-200 rounded-lg hover:bg-amber-100 transition-colors disabled:opacity-40 disabled:cursor-not-allowed`,title:e.enabled?e.pendingMatchCount===0?`No pending DLQ messages match this rule`:`Replay ${e.pendingMatchCount} matching DLQ messages`:`Enable rule first`,children:[(0,Z.jsx)(n_,{className:`w-3.5 h-3.5 ${o?`animate-pulse`:``}`}),o?`Replaying...`:`Replay All`]}),(0,Z.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(t_,{className:`w-3.5 h-3.5`}),`Edit`]}),(0,Z.jsx)(`button`,{onClick:n,className:`flex items-center gap-1 px-2.5 py-1.5 text-xs text-red-500 border border-gray-200 rounded-lg hover:bg-red-50 hover:border-red-200 transition-colors ml-auto`,children:(0,Z.jsx)(d_,{className:`w-3.5 h-3.5`})})]})]})}function cb({onCreate:e,onBrowseTemplates:t,onGenerateRules:n,isGenerating:r}){return(0,Z.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,Z.jsx)(Tg,{className:`w-12 h-12 text-violet-300 mx-auto mb-4`}),(0,Z.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 mb-1`,children:`No auto-replay rules yet`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-6 max-w-md mx-auto`,children:`Let ServiceHub analyse your DLQ messages and automatically create intelligent replay rules, or create rules manually from scratch or templates.`}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-3`,children:[(0,Z.jsxs)(`button`,{onClick:n,disabled:r,className:`flex items-center gap-1.5 px-4 py-2 bg-violet-500 hover:bg-violet-600 text-white rounded-lg text-sm font-medium transition-colors disabled:opacity-50`,children:[(0,Z.jsx)(Tg,{className:`w-4 h-4 ${r?`animate-pulse`:``}`}),r?`Analysing DLQ Patterns...`:`Generate Intelligent Rules`]}),(0,Z.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 px-4 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(Ae,{className:`w-4 h-4 text-amber-500`}),`Browse Templates`]}),(0,Z.jsxs)(`button`,{onClick:e,className:`flex items-center gap-1.5 px-4 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Create Rule`]})]})]})}function lb({rule:e,isExecuting:t,onConfirm:n,onCancel:r}){return e?(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:t?void 0:r}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-xl shadow-2xl w-full max-w-lg overflow-hidden`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-6 py-4 border-b border-red-100 bg-red-50`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-red-100 border border-red-200 rounded-full flex items-center justify-center`,children:(0,Z.jsx)(ne,{className:`w-5 h-5 text-red-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900`,children:`Replay All Matching Messages`}),(0,Z.jsx)(`p`,{className:`text-xs text-red-600 font-medium mt-0.5`,children:`Destructive Operation`})]})]}),!t&&(0,Z.jsx)(`button`,{onClick:r,className:`p-1 hover:bg-red-100 rounded-lg transition-colors`,children:(0,Z.jsx)(Fe,{className:`w-5 h-5 text-gray-500`})})]}),(0,Z.jsxs)(`div`,{className:`px-6 py-5 space-y-4`,children:[(0,Z.jsxs)(`div`,{className:`bg-gray-50 border border-gray-200 rounded-lg px-4 py-3`,children:[(0,Z.jsxs)(`div`,{className:`text-sm font-semibold text-gray-900 mb-1`,children:[`Rule: `,e.name]}),(0,Z.jsx)(`div`,{className:`space-y-0.5`,children:e.conditions.map((e,t)=>(0,Z.jsxs)(`div`,{className:`text-xs text-gray-600 flex items-center gap-1`,children:[(0,Z.jsx)(`span`,{className:`text-gray-400`,children:`•`}),(0,Z.jsxs)(`span`,{children:[fb(e.field),` `,pb(e.operator),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-gray-800`,children:[`"`,e.value,`"`]})]})]},t))}),e.action.targetEntity&&(0,Z.jsxs)(`div`,{className:`mt-2 text-xs text-amber-700 bg-amber-50 px-2 py-1 rounded`,children:[`Target: `,(0,Z.jsx)(`strong`,{children:e.action.targetEntity}),` (not original entity)`]})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(Ve,{className:`w-4 h-4 text-red-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[(0,Z.jsx)(`strong`,{className:`text-red-700`,children:`Messages will be moved from the DLQ back to the active queue.`}),` `,`This cannot be undone. The `,(0,Z.jsx)(`strong`,{children:`active message count will increase`}),` — this is expected.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(ne,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[`If the root cause hasn't been fixed, replayed messages may`,` `,(0,Z.jsx)(`strong`,{children:`end up back in the DLQ`}),`, creating a replay loop.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,Z.jsx)(ne,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{className:`text-sm text-gray-700`,children:[`Replaying to the `,(0,Z.jsx)(`strong`,{children:`wrong entity`}),` or at `,(0,Z.jsx)(`strong`,{children:`high volume`}),` may cause downstream service disruption.`]})]})]}),(0,Z.jsx)(`div`,{className:`bg-blue-50 border border-blue-200 rounded-lg px-4 py-3`,children:(0,Z.jsxs)(`p`,{className:`text-xs text-blue-800`,children:[(0,Z.jsx)(`strong`,{children:`Tip:`}),` Use the `,(0,Z.jsx)(`strong`,{children:`Test`}),` button first to see how many messages match. Only proceed if you are confident the root cause is resolved.`]})})]}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`button`,{onClick:r,disabled:t,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors disabled:opacity-50`,autoFocus:!0,children:`Cancel`}),(0,Z.jsx)(`button`,{onClick:n,disabled:t,className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors disabled:opacity-60`,children:t?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 animate-spin`}),`Replaying...`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(n_,{className:`w-4 h-4`}),`Yes, Replay All Matches`]})})]})]})]}):null}var ub={DeadLetterReason:`reason`,DeadLetterErrorDescription:`error`,FailureCategory:`category`,EntityName:`entity`,DeliveryCount:`delivery count`,ContentType:`content type`,TopicName:`topic`,CorrelationId:`correlation ID`,BodyPreview:`body`,ApplicationProperty:`app property`},db={Contains:`contains`,NotContains:`doesn't contain`,Equals:`equals`,NotEquals:`doesn't equal`,StartsWith:`starts with`,EndsWith:`ends with`,Regex:`matches`,GreaterThan:`>`,LessThan:`<`,In:`in`};function fb(e){return ub[e]??e}function pb(e){return db[e]??e}var mb=T.create({baseURL:`/api/health`,headers:{"Content-Type":`application/json`},timeout:1e4}),hb={getVersion:async()=>{let{data:e}=await mb.get(`/version`);return e},getStatus:async()=>{let{data:e}=await mb.get(`/status`);return e}};function gb(){return be({queryKey:[`health`,`version`],queryFn:hb.getVersion,staleTime:6e4,retry:1})}function _b(){return be({queryKey:[`health`,`status`],queryFn:hb.getStatus,refetchInterval:e=>e.state.status===`error`?!1:15e3,retry:1})}function vb(e){let t=e.match(/^(?:(\d+)\.)?(\d{2}):(\d{2}):(\d{2})/);if(!t)return e;let[,n,r,i,a]=t,o=[];return n&&Number(n)>0&&o.push(`${n}d`),Number(r)>0&&o.push(`${r}h`),o.push(`${i}m`),o.push(`${a}s`),o.join(` `)}function yb({icon:e,label:t,value:n,detail:r,color:i}){return(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-5 shadow-sm`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,Z.jsx)(`div`,{className:`p-2 rounded-lg ${i}`,children:(0,Z.jsx)(e,{className:`w-5 h-5 text-white`})}),(0,Z.jsx)(`span`,{className:`text-sm font-medium text-gray-500`,children:t})]}),(0,Z.jsx)(`p`,{className:`text-2xl font-bold text-gray-900`,children:n}),r&&(0,Z.jsx)(`p`,{className:`text-xs text-gray-400 mt-1`,children:r})]})}function bb(){let{data:e,isLoading:t,error:n}=gb(),{data:r,isLoading:i,error:a,refetch:o}=_b(),s=t||i,c=n||a;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-emerald-600 to-emerald-500 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`h1`,{className:`text-xl font-semibold text-white`,children:`System Health`}),(0,Z.jsxs)(`button`,{onClick:()=>o(),className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 rounded-lg text-white text-sm transition-colors`,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4`}),`Refresh`]})]})}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-auto p-6 bg-gray-50/50`,children:[s&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center py-20 text-gray-500`,children:[(0,Z.jsx)(Ee,{className:`w-5 h-5 animate-spin mr-2`}),`Loading health data...`]}),c&&!s&&(0,Z.jsxs)(`div`,{className:`bg-red-50 border border-red-200 rounded-xl p-6 text-center`,children:[(0,Z.jsx)(`p`,{className:`text-red-700 font-medium`,children:`Unable to reach the API server`}),(0,Z.jsx)(`p`,{className:`text-red-500 text-sm mt-1`,children:`Ensure the backend is running and try again.`})]}),!s&&!c&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium ${r?.isHealthy?`bg-green-100 text-green-700`:`bg-red-100 text-red-700`}`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 rounded-full ${r?.isHealthy?`bg-green-500`:`bg-red-500`}`}),r?.isHealthy?`Healthy`:`Unhealthy`]}),r?.timestamp&&(0,Z.jsxs)(`span`,{className:`text-xs text-gray-400`,children:[`as of`,` `,new Date(r.timestamp).toLocaleTimeString()]})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8`,children:[(0,Z.jsx)(yb,{icon:A,label:`Uptime`,value:r?vb(r.uptime):`—`,color:`bg-blue-500`}),(0,Z.jsx)(yb,{icon:Vg,label:`Memory Usage`,value:r?`${r.memoryUsageMb} MB`:`—`,detail:r?`GC managed: ${r.gcTotalMemoryMb} MB`:void 0,color:`bg-purple-500`}),(0,Z.jsx)(yb,{icon:Ng,label:`Threads`,value:r?.threadCount??`—`,color:`bg-amber-500`}),(0,Z.jsx)(yb,{icon:Te,label:`GC Collections`,value:r?`${r.gen0Collections} / ${r.gen1Collections} / ${r.gen2Collections}`:`—`,detail:`Gen0 / Gen1 / Gen2`,color:`bg-rose-500`})]}),e&&(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`px-5 py-3 bg-gray-50 border-b border-gray-200`,children:(0,Z.jsxs)(`h2`,{className:`text-sm font-semibold text-gray-700 flex items-center gap-2`,children:[(0,Z.jsx)(a_,{className:`w-4 h-4 text-gray-500`}),`Server Information`]})}),(0,Z.jsx)(`div`,{className:`divide-y divide-gray-100`,children:[[`Version`,e.version],[`Build`,e.informationalVersion],[`Environment`,e.environment],[`Machine`,e.machineName],[`OS`,e.osDescription],[`Framework`,e.frameworkDescription],[`Started`,new Date(e.startedAt).toLocaleString()]].map(([e,t])=>(0,Z.jsxs)(`div`,{className:`flex items-center px-5 py-2.5 text-sm`,children:[(0,Z.jsx)(`span`,{className:`w-32 text-gray-500 font-medium`,children:e}),(0,Z.jsx)(`span`,{className:`text-gray-900`,children:t})]},e))})]})]})]})]})}function xb(){let[e,t]=(0,P.useState)(``),[n,r]=(0,P.useState)(new Set(We.map(e=>e.id))),i={"getting-started":[`/docs/screenshots/ServiceHub-Home-Page.png`],messages:[`/docs/screenshots/ServiceHub-Active-Message-1.png`,`/docs/screenshots/ServiceHub-Message-Detail-Expanded.png`],dlq:[`/docs/screenshots/ServiceHub-DLQ-Intelligence.png`],rules:[`/docs/screenshots/ServiceHub-Auto-Replay-Rules.png`],fab:[`/docs/screenshots/ServiceHub-Dashborad-6.png`],health:[`/docs/screenshots/ServiceHub-System-Health-Status.png`]},a=(0,P.useMemo)(()=>{if(!e.trim())return We;let t=e.toLowerCase();return We.map(e=>({...e,items:e.items.filter(e=>e.question.toLowerCase().includes(t)||e.answer.toLowerCase().includes(t))})).filter(e=>e.items.length>0)},[e]),o=e=>{r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,Z.jsx)(`div`,{className:`h-full overflow-y-auto bg-gradient-to-b from-white via-blue-50 to-white`,children:(0,Z.jsxs)(`div`,{className:`max-w-4xl mx-auto px-6 py-8`,children:[(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-14 h-14 bg-gradient-to-br from-primary-500 to-primary-600 rounded-2xl flex items-center justify-center shadow-lg`,children:(0,Z.jsx)(Sg,{className:`w-7 h-7 text-white`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-3xl font-bold text-gray-900`,children:`Help & Support`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mt-1`,children:`Master ServiceHub in minutes`})]})]}),(0,Z.jsx)(`p`,{className:`text-gray-600 ml-[68px] text-sm leading-relaxed max-w-2xl`,children:`Everything you need to debug Azure Service Bus effectively — from getting started to advanced troubleshooting. Search or browse by topic.`})]}),(0,Z.jsxs)(`button`,{onClick:()=>{Pe(),window.dispatchEvent(new CustomEvent(`servicehub:start-tour`))},className:`flex items-center gap-2 px-6 py-3 text-sm font-semibold text-white bg-gradient-to-r from-primary-600 to-primary-700 hover:from-primary-700 hover:to-primary-800 rounded-xl transition-all shadow-md hover:shadow-lg`,children:[(0,Z.jsx)(n_,{className:`w-4 h-4`}),`Take a Tour`]})]}),(0,Z.jsx)(`div`,{className:`flex items-center gap-6 ml-[68px] mt-6 pt-6 border-t border-gray-200`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Works on`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M0 3h9v9H0V3zm10 0h14v9H10V3zM0 14h9v9H0v-9zm10 0h14v9H10v-9z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`Windows`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 ml-2`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M6.157 2a3 3 0 00-3 3v14a3 3 0 003 3h11.686a3 3 0 003-3V5a3 3 0 00-3-3H6.157zm0 1h11.686a2 2 0 012 2v14a2 2 0 01-2 2H6.157a2 2 0 01-2-2V5a2 2 0 012-2z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`macOS`})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 ml-2`,children:[(0,Z.jsx)(`svg`,{className:`w-5 h-5 text-gray-700`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,Z.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z`})}),(0,Z.jsx)(`span`,{className:`text-xs text-gray-700 font-medium`,children:`Linux`})]})]})})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-4 mb-10`,children:[(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(Ae,{className:`w-5 h-5 text-amber-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Setup Time`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`30 seconds`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`From install to first debug`})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(Xg,{className:`w-5 h-5 text-blue-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`Features`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`15+`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`Powerful debugging tools`})]}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 p-4 shadow-sm hover:shadow-md transition-shadow`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(le,{className:`w-5 h-5 text-green-500`}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-500 uppercase`,children:`No Setup`})]}),(0,Z.jsx)(`p`,{className:`text-lg font-bold text-gray-900`,children:`Free`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:`100% open source`})]})]}),(0,Z.jsxs)(`div`,{className:`relative mb-8`,children:[(0,Z.jsx)(_e,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400`}),(0,Z.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`Search help topics… (type to filter)`,className:`w-full pl-10 pr-4 py-3 text-sm bg-white border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent shadow-sm hover:border-gray-300 transition-colors`}),e&&(0,Z.jsx)(`button`,{onClick:()=>t(``),className:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 font-bold text-lg`,"aria-label":`Clear search`,children:`×`})]}),a.length===0&&(0,Z.jsxs)(`div`,{className:`text-center py-16`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4`,children:(0,Z.jsx)(Ge,{className:`w-8 h-8 text-gray-400`})}),(0,Z.jsxs)(`p`,{className:`text-base font-semibold text-gray-900 mb-1`,children:[`No results for "`,(0,Z.jsx)(`span`,{className:`text-primary-600`,children:e}),`"`]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 mb-6`,children:`Try a different search term or browse all topics`}),(0,Z.jsxs)(`button`,{onClick:()=>t(``),className:`inline-flex items-center gap-2 px-4 py-2 bg-primary-50 text-primary-700 font-medium rounded-lg border border-primary-200 hover:bg-primary-100 transition-colors`,children:[(0,Z.jsx)(ze,{className:`w-4 h-4`}),`Clear search`]})]}),(0,Z.jsx)(`div`,{className:`space-y-5`,children:a.map(e=>{let t=n.has(e.id),r=i[e.id]||[];return(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all overflow-hidden`,children:[(0,Z.jsxs)(`button`,{onClick:()=>o(e.id),className:`w-full flex items-center gap-4 px-6 py-4 text-left hover:bg-gradient-to-r hover:from-blue-50 hover:to-transparent transition-colors`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,Z.jsxs)(`div`,{className:`flex-1`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:e.title}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:[e.items.length,` `,e.items.length===1?`topic`:`topics`]})]}),(0,Z.jsx)(`span`,{className:`text-xs px-2.5 py-1 bg-blue-100 text-blue-700 rounded-full font-medium`,children:e.items.length}),t?(0,Z.jsx)(ye,{className:`w-5 h-5 text-gray-400`}):(0,Z.jsx)(ze,{className:`w-5 h-5 text-gray-400`})]}),t&&(0,Z.jsxs)(`div`,{className:`border-t border-gray-100`,children:[r.length>0&&(0,Z.jsxs)(`div`,{className:`overflow-x-auto bg-gray-50 px-6 py-4 border-b border-gray-100`,children:[(0,Z.jsx)(`div`,{className:`flex gap-4`,children:r.map((t,n)=>(0,Z.jsx)(`div`,{className:`flex-shrink-0`,children:(0,Z.jsx)(`img`,{src:t,alt:`${e.title} example ${n+1}`,className:`h-32 rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow object-cover`,onError:e=>{e.target.style.display=`none`}})},n))}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-600 mt-2`,children:`💡 Visual examples - click to expand`})]}),e.items.map((t,n)=>(0,Z.jsx)(`div`,{className:`px-6 py-4 ${n(await me.get(`/namespaces/${e}/queues/${t}/scheduled`,{params:{skip:n,take:r}})).data,cancelScheduled:async(e,t,n)=>{await me.delete(`/namespaces/${e}/queues/${t}/scheduled/${n}`)}};function Cb(e,t){return be({queryKey:[`scheduled-messages`,e,t],queryFn:()=>Sb.listScheduled(e,t),enabled:!!e&&!!t,staleTime:15e3,refetchInterval:3e4,refetchIntervalInBackground:!1,retry:(e,t)=>{let n=t?.response?.status??0;return n===404||n===401||n===403||n===429||n>=500?!1:e<2}})}function wb(){let e=f();return i({mutationFn:({namespaceId:e,queueName:t,sequenceNumber:n})=>Sb.cancelScheduled(e,t,n),onSuccess:(t,n)=>{m.success(`Scheduled message cancelled`),e.invalidateQueries({queryKey:[`scheduled-messages`,n.namespaceId,n.queueName]}),e.invalidateQueries({queryKey:[`queues`,n.namespaceId]})},onError:e=>{let t=e?.response?.data?.detail||e?.response?.data?.title||`Failed to cancel scheduled message`;m.error(t)}})}function Tb(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(t)}function Eb(e){let t=Date.now(),n=new Date(e).getTime()-t;if(n<=0)return`Now`;let r=Math.floor(n/1e3);if(r<60)return`in ${r}s`;let i=Math.floor(r/60);if(i<60)return`in ${i}m ${r%60}s`;let a=Math.floor(i/60),o=Math.floor(a/24);return o>0?`in ${o}d ${a%24}h`:`in ${a}h ${i%60}m`}function Db(e){return e==null?`—`:e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}function Ob({message:e,namespaceId:t,queueName:n,onClose:r}){let i=wb(),a=G_(),[o,s]=(0,P.useState)(e.scheduledEnqueueTime?new Date(e.scheduledEnqueueTime).toISOString().slice(0,16):new Date(Date.now()+60*6e4).toISOString().slice(0,16)),[c,l]=(0,P.useState)(!1),u=new Date(Date.now()+3e4).toISOString().slice(0,16);return(0,et.createPortal)((0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,role:`dialog`,"aria-modal":`true`,"aria-label":`Reschedule message`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:r}),(0,Z.jsxs)(`div`,{className:`relative bg-white rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-5`,children:[(0,Z.jsx)(Dg,{className:`w-5 h-5 text-sky-600`}),(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:`Reschedule Message`})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`The original scheduled message will be cancelled and re-enqueued with the new delivery time.`}),(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1.5`,htmlFor:`new-schedule-time`,children:`New delivery time`}),(0,Z.jsx)(`input`,{id:`new-schedule-time`,type:`datetime-local`,value:o,min:u,onChange:e=>s(e.target.value),className:`w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-sky-400`}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2 mt-6`,children:[(0,Z.jsx)(`button`,{onClick:r,disabled:c,className:`px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 rounded-lg transition-colors`,children:`Cancel`}),(0,Z.jsxs)(`button`,{onClick:async()=>{if(o){l(!0);try{await i.mutateAsync({namespaceId:t,queueName:n,sequenceNumber:e.sequenceNumber}),await a.mutateAsync({namespaceId:t,queueOrTopicName:n,entityType:`queue`,message:{body:e.body??``,contentType:e.contentType??`application/json`,correlationId:e.correlationId??void 0,sessionId:e.sessionId??void 0,scheduledEnqueueTime:new Date(o).toISOString()}}),m.success(`Message rescheduled successfully`),r()}catch{l(!1)}}},disabled:c||!o,className:`flex items-center gap-1.5 px-4 py-2 text-sm font-medium bg-sky-600 text-white hover:bg-sky-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(Dg,{className:`w-3.5 h-3.5`}),c?`Rescheduling…`:`Confirm Reschedule`]})]})]})]}),document.body)}function kb({namespaceId:e,queueName:t,onClose:n}){let r=G_(),[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(new Date(Date.now()+60*6e4).toISOString().slice(0,16)),[c,l]=(0,P.useState)(``),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(`application/json`),[h,g]=(0,P.useState)(!1),_=new Date(Date.now()+3e4).toISOString().slice(0,16);return(0,Z.jsx)(`div`,{className:`fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4`,children:(0,Z.jsxs)(`div`,{className:`bg-white rounded-lg shadow-2xl max-w-md w-full max-h-[90vh] overflow-y-auto`,children:[(0,Z.jsxs)(`div`,{className:`bg-sky-600 text-white px-6 py-4 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(we,{className:`w-5 h-5`}),(0,Z.jsx)(`span`,{className:`font-semibold`,children:`Schedule New Message`})]}),(0,Z.jsx)(`button`,{onClick:n,disabled:h,className:`hover:bg-white/20 p-1 rounded disabled:opacity-50`,"aria-label":`Close`,children:(0,Z.jsx)(Le,{className:`w-5 h-5`})})]}),(0,Z.jsxs)(`div`,{className:`p-6 space-y-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Message Body`}),(0,Z.jsx)(`textarea`,{value:i,onChange:e=>a(e.target.value),disabled:h,placeholder:`{"orderId":"ORDER-123","amount":100}`,rows:4,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Scheduled For`}),(0,Z.jsx)(`input`,{type:`datetime-local`,value:o,onChange:e=>s(e.target.value),disabled:h,min:_,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-1`,children:o?Eb(new Date(o).toISOString()):`—`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Content Type`}),(0,Z.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:h,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(`option`,{value:`application/json`,children:`JSON`}),(0,Z.jsx)(`option`,{value:`application/xml`,children:`XML`}),(0,Z.jsx)(`option`,{value:`text/plain`,children:`Plain Text`}),(0,Z.jsx)(`option`,{value:``,children:`None`})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Correlation ID (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),disabled:h,placeholder:`e.g., order-12345`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`Session ID (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),disabled:h,placeholder:`e.g., session-xyz`,className:`w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 disabled:bg-gray-50 disabled:cursor-not-allowed`})]})]}),(0,Z.jsxs)(`div`,{className:`bg-gray-50 px-6 py-3 flex items-center justify-end gap-2 border-t border-gray-200`,children:[(0,Z.jsx)(`button`,{onClick:n,disabled:h,className:`px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors disabled:opacity-50`,children:`Cancel`}),(0,Z.jsxs)(`button`,{onClick:async()=>{if(!i.trim()){m.error(`Message body cannot be empty`);return}if(!o){m.error(`Please select a delivery time`);return}g(!0);try{let a=new Date(o).toISOString();if(new Date(a).getTime()<=Date.now()){m.error(`Scheduled time must be at least 30 seconds in the future`),g(!1);return}await r.mutateAsync({namespaceId:e,queueOrTopicName:t,message:{body:i,contentType:f,...c&&{correlationId:c},...u&&{sessionId:u},scheduledEnqueueTime:a}}),n()}catch{}finally{g(!1)}},disabled:h||!i.trim(),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-sky-600 hover:bg-sky-700 rounded-lg transition-colors disabled:bg-sky-300 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(A,{className:`w-4 h-4`}),h?`Scheduling…`:`Schedule Message`]})]})]})})}function Ab({message:e,namespaceId:t,queueName:n}){let r=wb(),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[,c]=(0,P.useState)(0),l=e.scheduledEnqueueTime;(0,P.useEffect)(()=>{let e;function t(){let n=l?new Date(l).getTime()-Date.now():1/0;e=setTimeout(()=>{c(e=>e+1),t()},n<6e4?1e3:n<36e5?1e4:3e4)}return t(),()=>clearTimeout(e)},[l]);let u=()=>a(!0),d=async()=>{a(!1),await r.mutateAsync({namespaceId:t,queueName:n,sequenceNumber:e.sequenceNumber})},f=e.messageId?`${e.messageId.substring(0,12)}…`:`#${e.sequenceNumber}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`tr`,{className:`border-b border-gray-100 hover:bg-sky-50/30 transition-colors`,children:[(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm font-mono text-gray-700`,children:(0,Z.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,Z.jsx)(`span`,{title:e.messageId??void 0,className:`cursor-default`,children:f}),e.messageId&&(0,Z.jsx)(oe,{text:e.messageId,label:`message ID`,iconSize:`w-3 h-3`})]})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 max-w-[220px]`,children:(0,Z.jsx)(`span`,{className:`font-mono text-xs bg-gray-50 border border-gray-200 rounded px-1.5 py-0.5 block truncate`,children:e.body?e.body.substring(0,80):(0,Z.jsx)(`span`,{className:`italic text-gray-300`,children:`empty`})})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600 whitespace-nowrap`,children:l?(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sky-700 font-medium`,children:[(0,Z.jsx)(A,{className:`w-3.5 h-3.5 shrink-0`}),Tb(l)]}):(0,Z.jsx)(`span`,{className:`text-gray-400 italic text-xs`,children:`—`})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 whitespace-nowrap`,children:l?(0,Z.jsx)(`span`,{className:`text-xs text-sky-600 font-medium`,children:Eb(l)}):(0,Z.jsx)(`span`,{className:`text-gray-400 italic text-xs`,children:`—`})}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 whitespace-nowrap`,children:Db(e.body?new TextEncoder().encode(e.body).length:null)}),(0,Z.jsx)(`td`,{className:`px-4 py-3 text-right`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>s(!0),disabled:r.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-sky-600 hover:text-sky-700 hover:bg-sky-50 border border-sky-200 hover:border-sky-300 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(Dg,{className:`w-3.5 h-3.5`}),`Reschedule`]}),(0,Z.jsxs)(`button`,{onClick:u,disabled:r.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-red-600 hover:text-red-700 hover:bg-red-50 border border-red-200 hover:border-red-300 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(Le,{className:`w-3.5 h-3.5`}),`Cancel`]})]})})]}),o&&(0,Z.jsx)(Ob,{message:e,namespaceId:t,queueName:n,onClose:()=>s(!1)}),(0,Z.jsx)(qv,{isOpen:i,title:`Cancel Scheduled Message`,message:`Cancel the scheduled message ${f}?\n\nThis action cannot be undone.`,confirmLabel:`Yes, Cancel Message`,cancelLabel:`Keep It`,variant:`danger`,onConfirm:d,onCancel:()=>a(!1)})]})}function jb(){let[e,t]=k(),[n,r]=(0,P.useState)(!1),i=e.get(`namespace`)??``,a=e.get(`queue`)??``,o=e=>{t(e?{namespace:e}:{})},s=n=>{if(n)t({namespace:i,queue:n});else{let n=new URLSearchParams(e);n.delete(`queue`),t(n)}},{data:c}=N(),{data:l}=Oe(i),{data:u,isLoading:d,isError:f,refetch:p,isFetching:m}=Cb(i,a),h=u?.items??[],g=u?.totalCount??h.length;return(0,Z.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`bg-gradient-to-r from-sky-600 to-sky-500 px-6 py-4 shrink-0`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(Og,{className:`w-6 h-6 text-white/80`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-xl font-semibold text-white`,children:`Scheduled Messages`}),(0,Z.jsx)(`p`,{className:`text-sky-100 text-sm`,children:`View and cancel messages queued for future delivery`})]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{onClick:()=>r(!0),disabled:!a,className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors`,title:a?`Schedule a new message`:`Select a queue first`,children:[(0,Z.jsx)(we,{className:`w-4 h-4`}),`Schedule`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(),disabled:m||!a,className:`flex items-center gap-2 px-3 py-1.5 bg-white/20 hover:bg-white/30 disabled:opacity-50 text-white rounded-lg text-sm font-medium transition-colors`,title:`Refresh`,children:[(0,Z.jsx)(Ee,{className:`w-4 h-4 ${m?`animate-spin`:``}`}),`Refresh`]})]})]})}),(0,Z.jsxs)(`div`,{className:`bg-white border-b border-gray-200 px-6 py-3 flex items-center gap-4 shrink-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-600`,children:`Namespace`}),(0,Z.jsxs)(`select`,{value:i,onChange:e=>o(e.target.value),className:`px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 min-w-[180px]`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select namespace…`}),c?.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.displayName||e.name},e.id))]})]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium text-gray-600`,children:`Queue`}),(0,Z.jsxs)(`select`,{value:a,onChange:e=>s(e.target.value),disabled:!i,className:`px-3 py-1.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-400 min-w-[180px] disabled:bg-gray-50 disabled:cursor-not-allowed`,children:[(0,Z.jsx)(`option`,{value:``,children:`Select queue…`}),l?.map(e=>(0,Z.jsxs)(`option`,{value:e.name,children:[e.name,` (`,e.scheduledMessageCount,` scheduled)`]},e.name))]})]}),a&&(0,Z.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:(0,Z.jsxs)(`span`,{className:`px-2.5 py-1 bg-sky-100 text-sky-700 text-sm font-semibold rounded-full`,children:[g,` message`,g===1?``:`s`]})})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gray-50`,children:!i||!a?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-center px-6`,children:[(0,Z.jsx)(Og,{className:`w-12 h-12 text-gray-300 mb-3`}),(0,Z.jsx)(`p`,{className:`text-gray-500 font-medium`,children:`Select a namespace and queue`}),(0,Z.jsx)(`p`,{className:`text-gray-400 text-sm mt-1`,children:`Choose a namespace and queue above to view scheduled messages`})]}):d?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3`,children:[(0,Z.jsx)(Ee,{className:`w-8 h-8 text-sky-400 animate-spin`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-sm`,children:`Loading scheduled messages…`})]}):f?(0,Z.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3`,children:[(0,Z.jsx)(He,{className:`w-10 h-10 text-red-400`}),(0,Z.jsx)(`p`,{className:`text-gray-600 font-medium`,children:`Failed to load scheduled messages`}),(0,Z.jsx)(`button`,{onClick:()=>p(),className:`px-4 py-2 text-sm text-sky-600 hover:text-sky-700 border border-sky-300 rounded-lg hover:bg-sky-50 transition-colors`,children:`Try Again`})]}):h.length===0?(0,Z.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 px-6 text-center`,children:g>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Dg,{className:`w-10 h-10 text-sky-300`}),(0,Z.jsxs)(`p`,{className:`text-gray-600 font-medium`,children:[g,` message`,g===1?` is`:`s are`,` scheduled but content cannot be displayed`]}),(0,Z.jsxs)(`p`,{className:`text-gray-400 text-sm max-w-md`,children:[`Azure Service Bus reports `,(0,Z.jsxs)(`strong`,{children:[g,` scheduled message`,g===1?``:`s`]}),` in this queue. Message content is stored in a separate scheduling store and can only be retrieved after the messages are delivered to the active queue. Scheduled delivery times remain accurate.`]}),(0,Z.jsxs)(`button`,{onClick:()=>p(),className:`mt-2 flex items-center gap-1.5 px-4 py-2 text-sm text-sky-600 border border-sky-300 rounded-lg hover:bg-sky-50 transition-colors`,children:[(0,Z.jsx)(Ee,{className:`w-3.5 h-3.5`}),`Refresh`]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ke,{className:`w-10 h-10 text-gray-300`}),(0,Z.jsx)(`p`,{className:`text-gray-500 font-medium`,children:`No scheduled messages`}),(0,Z.jsx)(`p`,{className:`text-gray-400 text-sm`,children:`This queue has no messages pending future delivery`})]})}):(0,Z.jsxs)(`div`,{className:`p-6`,children:[(0,Z.jsx)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden`,children:(0,Z.jsxs)(`table`,{className:`w-full text-left`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{className:`border-b border-gray-200 bg-gray-50`,children:[(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Message ID`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Body Preview`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Scheduled For`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Delivers In`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Size`}),(0,Z.jsx)(`th`,{className:`px-4 py-3 text-right text-xs font-semibold text-gray-500 uppercase tracking-wider`,children:`Action`})]})}),(0,Z.jsx)(`tbody`,{children:h.map(e=>(0,Z.jsx)(Ab,{message:e,namespaceId:i,queueName:a},e.sequenceNumber))})]})}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-400 mt-3 text-center`,children:[`Showing `,h.length,` of `,g,` scheduled message`,g===1?``:`s`,`. Auto-refreshes every 10 seconds.`]})]})}),n&&i&&a&&(0,Z.jsx)(kb,{namespaceId:i,queueName:a,onClose:()=>r(!1)})]})}var Mb=`https://github.com/debdevops/servicehub/blob/main/services/api/src`,Nb=[{label:`ConnectionStringProtector.cs`,description:`AES-256-GCM encryption and decryption of connection strings at rest.`,href:`${Mb}/ServiceHub.Infrastructure/Security/ConnectionStringProtector.cs`},{label:`LogRedactor.cs`,description:`Strips SharedAccessKey and all secret values from every log entry before writing.`,href:`${Mb}/ServiceHub.Infrastructure/Security/LogRedactor.cs`},{label:`NamespacesController.cs — MapToResponse`,description:`Confirms the API response DTO has no ConnectionString field — the encrypted value never leaves the server.`,href:`${Mb}/ServiceHub.Api/Controllers/V1/NamespacesController.cs`}],Pb=[{icon:Yg,title:`Connection strings`,color:`bg-green-100 text-green-700`,points:[`Encrypted with AES-256-GCM immediately on receipt`,`Encryption key lives only in Azure App Service configuration — never on disk`,`Plaintext connection string is never written to disk, never logged, never returned to your browser after the initial POST`]},{icon:Ie,title:`Application logs`,color:`bg-blue-100 text-blue-700`,points:[`LogRedactor strips SharedAccessKey and all secret-bearing values before any log is written`,`If an exception is logged while processing a connection string, the key value is replaced with [REDACTED]`,`No message content is ever included in server logs`]},{icon:Lg,title:`API responses`,color:`bg-purple-100 text-purple-700`,points:[`The NamespacesController MapToResponse method does not include ConnectionString in any response DTO`,`Clients receive: ID, display name, environment, permissions, and timestamps — nothing sensitive`,`The encrypted blob stays server-side only`]},{icon:Zg,title:`Browser storage`,color:`bg-amber-100 text-amber-700`,points:[`No connection strings are written to localStorage, sessionStorage, cookies, or IndexedDB`,`The only data stored in your browser is your saved namespace IDs (not the credentials)`,`Clearing browser storage does not affect your connection credentials`]}];function Fb(){return(0,Z.jsx)(`div`,{className:`flex-1 overflow-auto bg-gradient-to-b from-white to-gray-50`,children:(0,Z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-10`,children:[(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center`,children:(0,Z.jsx)(Ve,{className:`w-5 h-5 text-green-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900 leading-tight`,children:`Security & privacy`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500`,children:`How ServiceHub handles your credentials and data`})]})]}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed mt-4`,children:`We understand that pasting an Azure Service Bus connection string into a web app is a significant trust decision. This page explains exactly what ServiceHub stores, what it never touches, and where you can verify every claim directly in the open-source code.`})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-4`,children:`How your data moves through ServiceHub`}),(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-between gap-4 mb-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-blue-50 border border-blue-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)(Zg,{className:`w-6 h-6 text-blue-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`Your browser`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(Ne,{className:`w-5 h-5 text-gray-400 rotate-0 sm:rotate-0 rotate-90`}),(0,Z.jsx)(`span`,{className:`text-[10px] font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full`,children:`HTTPS + SPA token`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-green-50 border border-green-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)(a_,{className:`w-6 h-6 text-green-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`ServiceHub server`}),(0,Z.jsx)(`span`,{className:`text-[10px] text-gray-400`,children:`.NET 10 API`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(Ne,{className:`w-5 h-5 text-gray-400`}),(0,Z.jsx)(`span`,{className:`text-[10px] font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full`,children:`Azure SDK`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 bg-blue-50 border border-blue-200 rounded-xl flex items-center justify-center mb-2`,children:(0,Z.jsx)(`span`,{className:`text-xl`,children:`☁️`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-gray-800`,children:`Your Service Bus`}),(0,Z.jsx)(`span`,{className:`text-[10px] text-gray-400`,children:`Azure`})]})]}),(0,Z.jsxs)(`div`,{className:`space-y-2 border-t border-gray-100 pt-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(x,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Connection string:`}),` Encrypted with AES-256-GCM immediately on the server. The encrypted blob is stored. The plaintext is discarded. It is never returned to the browser.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(x,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Message content:`}),` Read transiently from Azure Service Bus via the SDK to display in your browser. Never stored, never logged, never indexed by ServiceHub.`]})]}),(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Z.jsx)(x,{className:`w-4 h-4 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsxs)(`p`,{className:`text-xs text-gray-600`,children:[(0,Z.jsx)(`strong`,{children:`Browser traffic:`}),` All requests use HTTPS and a short-lived HMAC-signed SPA token — no raw API keys are exposed to the browser.`]})]})]})]})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-4`,children:`What we protect`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:Pb.map(({icon:e,title:t,color:n,points:r})=>(0,Z.jsxs)(`div`,{className:`bg-white rounded-xl border border-gray-200 shadow-sm p-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,Z.jsx)(`div`,{className:`w-7 h-7 rounded-lg flex items-center justify-center ${n}`,children:(0,Z.jsx)(e,{className:`w-4 h-4`})}),(0,Z.jsx)(`span`,{className:`text-sm font-semibold text-gray-900`,children:t})]}),(0,Z.jsx)(`ul`,{className:`space-y-1.5`,children:r.map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-1.5 text-xs text-gray-600`,children:[(0,Z.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-gray-400 mt-1.5 shrink-0`}),e]},e))})]},t))})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-1`,children:`Verify it yourself`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`ServiceHub is fully open source. Every security claim on this page has a direct link to the relevant source file on GitHub.`}),(0,Z.jsx)(`div`,{className:`space-y-3`,children:Nb.map(({label:e,description:t,href:n})=>(0,Z.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-start gap-3 bg-white rounded-xl border border-gray-200 shadow-sm p-4 hover:border-primary-300 hover:shadow-md transition-all group`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-gray-50 border border-gray-200 rounded-lg flex items-center justify-center shrink-0 group-hover:bg-primary-50 group-hover:border-primary-200 transition-colors`,children:(0,Z.jsx)(Lg,{className:`w-4 h-4 text-gray-500 group-hover:text-primary-600`})}),(0,Z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium text-gray-900 group-hover:text-primary-700 font-mono`,children:e}),(0,Z.jsx)(Fg,{className:`w-3 h-3 text-gray-400 group-hover:text-primary-500 shrink-0`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 mt-0.5`,children:t})]})]},e))})]}),(0,Z.jsxs)(`div`,{className:`mb-10`,children:[(0,Z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900 mb-1`,children:`Prefer zero trust in third-party infrastructure?`}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-500 mb-4`,children:`If your security policy does not allow connecting production or sensitive Service Bus namespaces to a hosted third-party app — that is the right call. ServiceHub is designed to be self-hosted.`}),(0,Z.jsx)(`div`,{className:`bg-blue-50 border border-blue-200 rounded-xl p-5`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-blue-100 border border-blue-200 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(a_,{className:`w-4 h-4 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-blue-900`,children:`Run ServiceHub in your own Azure subscription`}),(0,Z.jsx)(`p`,{className:`text-xs text-blue-700 mt-1 leading-relaxed`,children:`Deploy the .NET 10 API + React frontend to your own Azure App Service. Your connection strings are encrypted with a key only you control. No data ever leaves your infrastructure. The self-hosting guide walks through a complete deployment in under 10 minutes.`}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub#-quick-start`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-blue-700 font-medium hover:text-blue-900 hover:underline mt-3`,children:[(0,Z.jsx)(Fg,{className:`w-3 h-3`}),`Self-hosting guide on GitHub`]})]})]})})]}),(0,Z.jsx)(`div`,{className:`mb-6`,children:(0,Z.jsx)(`div`,{className:`bg-amber-50 border border-amber-200 rounded-xl p-5`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-amber-100 border border-amber-200 rounded-lg flex items-center justify-center shrink-0`,children:(0,Z.jsx)(ne,{className:`w-4 h-4 text-amber-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-amber-900`,children:`Found a security issue?`}),(0,Z.jsxs)(`p`,{className:`text-xs text-amber-700 mt-1 leading-relaxed`,children:[`Please do not open a public GitHub issue for security vulnerabilities. Open a GitHub issue with the title prefixed`,` `,(0,Z.jsx)(`code`,{className:`bg-amber-100 px-1 rounded font-mono`,children:`[SECURITY]`}),` `,`— it will be treated as a private disclosure and acknowledged within 48 hours. We follow responsible disclosure: we will coordinate a fix and credit you when the patch is released.`]}),(0,Z.jsxs)(`a`,{href:`https://github.com/debdevops/servicehub/issues/new?title=%5BSECURITY%5D`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-amber-700 font-medium hover:text-amber-900 hover:underline mt-3`,children:[(0,Z.jsx)(Fg,{className:`w-3 h-3`}),`Report a security issue on GitHub`]})]})]})})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 pt-4 border-t border-gray-100 text-xs text-gray-500`,children:[(0,Z.jsx)(M,{to:`/connect`,className:`hover:text-gray-900 hover:underline`,children:`← Back to Connect`}),(0,Z.jsx)(M,{to:`/help`,className:`hover:text-gray-900 hover:underline`,children:`Help & documentation`}),(0,Z.jsx)(`a`,{href:`https://github.com/debdevops/servicehub`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-gray-900 hover:underline`,children:`GitHub repository`})]})]})})}var Ib=`https://app-servicehub-prod.azurewebsites.net/`,Lb=`https://github.com/debdevops/servicehub`;function Rb(){let e=[{icon:_e,title:`Forensic Message Browser`,description:`Browse Active and Dead-Letter queues with full message bodies, headers, and properties. Syntax-highlighted JSON/XML. Virtualized grid handles thousands of messages without a lag.`,badge:`Core`},{icon:Ae,title:`Auto-Replay Rules Engine`,description:`Define smart rules to detect and replay failed DLQ messages automatically. Built-in templates for timeouts, throttle errors, and TTL expiry — with rate limiting and circuit-breaker safety controls.`,badge:`Automation`},{icon:Tg,title:`Client-Side AI Analysis`,description:`Pattern-detection engine groups DLQ failures by error type, calculates confidence scores, and surfaces the highest-impact clusters — entirely in your browser. Zero data sent anywhere.`,badge:`AI`},{icon:Re,title:`DLQ Intelligence & 30-Day History`,description:`Persistent SQLite-backed history of every DLQ event. Trend charts, auto-categorisation into 5 failure types, replay-safety ratings, and CSV/JSON export for post-mortem reports.`,badge:`Analytics`},{icon:zg,title:`Correlation Explorer`,description:`Paste any Correlation ID and instantly trace a message's full journey across every queue, topic, subscription, and namespace — invaluable for debugging distributed workflows.`,badge:`Tracing`},{icon:A,title:`Scheduled Message Manager`,description:`View all future-scheduled messages across your namespaces. Reschedule or cancel individual messages from the UI — no SDK scripts required.`,badge:`Management`},{icon:Gg,title:`Multi-Namespace Support`,description:`Connect to multiple Azure Service Bus namespaces simultaneously — DEV, UAT, PROD, all visible in the sidebar with live colour-coded message counts.`,badge:`Enterprise`},{icon:Te,title:`Live System Health Monitor`,description:`Real-time runtime metrics: uptime, memory usage, thread count, GC generations, and full .NET environment information. Know your deployment is healthy at a glance.`,badge:`Ops`},{icon:Yg,title:`Enterprise Security`,description:`AES-GCM encrypted connection strings at rest. HMAC SPA token auth. Read-only PeekMessagesAsync — messages are never consumed or removed. OWASP-compliant.`,badge:`Security`},{icon:Ee,title:`Real-Time Auto-Refresh`,description:`Message lists refresh every 7 seconds automatically. Live incident visibility without manual page reloads — just leave it open during production incidents.`,badge:`Live`}],t=[{feature:`View Full Message Body & Content`,portal:`Count only`,hub:`Full body + syntax highlighting`},{feature:`Real-Time Full-Text Search`,portal:`Not available`,hub:`Instant, cross-field search`},{feature:`Dead-Letter Queue Investigation`,portal:`One message at a time`,hub:`Batch analysis + AI patterns`},{feature:`AI Pattern Detection`,portal:`Not available`,hub:`Client-side clustering, zero data sent`},{feature:`Replay Messages from DLQ`,portal:`Not available`,hub:`One-click or automated rules`},{feature:`30-Day DLQ Trend History`,portal:`Not available`,hub:`Full history + trend charts`},{feature:`Correlation ID Tracing`,portal:`Not available`,hub:`Cross-queue journey explorer`},{feature:`Multi-Namespace Management`,portal:`Portal-per-namespace`,hub:`All namespaces simultaneously`},{feature:`Scheduled Message Management`,portal:`Not available`,hub:`View, reschedule & cancel`},{feature:`Auto-Replay Rules Engine`,portal:`Not available`,hub:`Smart matching + safety controls`},{feature:`Live Health & Metrics Dashboard`,portal:`Basic only`,hub:`Full runtime + GC metrics`}],n=[{emoji:`🚨`,title:`Production Incident — 2 AM`,story:`10,000 orders stuck in DLQ. Azure Portal shows counts, nothing else. With ServiceHub: search all messages in seconds, AI detects 3 error clusters, auto-replay rule recovers 8,000 in minutes.`,saving:`~6 hours saved`,color:`amber`},{emoji:`🔍`,title:`Post-Mortem Root-Cause Analysis`,story:`DLQ Intelligence stores 30 days of failure history. Graph trends, categorise failures (Transient, MaxDelivery, Expired, DataQuality), extract patterns, and export CSV for stakeholder reports.`,saving:`Data-driven insights`,color:`blue`},{emoji:`🎯`,title:`Hands-Free Automated Recovery`,story:`Deploy auto-replay rules that watch for transient errors and replay automatically. Templates cover throttling, timeout, and TTL expiry. Set once — forget it.`,saving:`Zero manual intervention`,color:`green`},{emoji:`🔗`,title:`Distributed Message Tracing`,story:`Trace a Correlation ID across all queues, topics, and subscriptions to find exactly where a payment, order, or notification broke in a multi-hop workflow.`,saving:`30 min → 30 seconds`,color:`sky`}],r={amber:`from-amber-50 to-white border-amber-200`,blue:`from-blue-50 to-white border-blue-200`,green:`from-green-50 to-white border-green-200`,sky:`from-sky-50 to-white border-sky-200`},i={amber:`text-amber-700`,blue:`text-blue-700`,green:`text-green-700`,sky:`text-sky-700`};return(0,Z.jsxs)(`div`,{className:`flex flex-col min-h-screen bg-gradient-to-b from-white via-primary-50/20 to-white font-sans`,children:[(0,Z.jsx)(`header`,{className:`fixed top-0 w-full bg-white/90 backdrop-blur-md border-b border-gray-200 z-50 shadow-sm`,children:(0,Z.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 py-3 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-9 h-9 bg-gradient-to-br from-primary-600 to-primary-700 rounded-xl flex items-center justify-center shadow-sm`,children:(0,Z.jsx)(_e,{className:`w-5 h-5 text-white`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`span`,{className:`font-bold text-gray-900 text-lg`,children:`ServiceHub`}),(0,Z.jsx)(`span`,{className:`ml-2 text-xs text-primary-600 font-medium bg-primary-50 px-2 py-0.5 rounded-full`,children:`v3.1.0`})]})]}),(0,Z.jsxs)(`nav`,{className:`hidden md:flex items-center gap-6 text-sm`,children:[(0,Z.jsx)(`a`,{href:`#features`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Features`}),(0,Z.jsx)(`a`,{href:`#compare`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Compare`}),(0,Z.jsx)(`a`,{href:`#usecases`,className:`text-gray-600 hover:text-primary-600 transition-colors font-medium`,children:`Use Cases`}),(0,Z.jsxs)(`a`,{href:Lb,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 text-gray-600 hover:text-gray-900 transition-colors font-medium`,children:[(0,Z.jsx)(Bg,{className:`w-4 h-4`}),`GitHub`]})]}),(0,Z.jsxs)(M,{to:`/connect`,className:`inline-flex items-center gap-2 px-5 py-2 bg-primary-600 text-white text-sm font-semibold rounded-lg hover:bg-primary-700 transition-colors shadow-sm`,"aria-label":`Open ServiceHub application`,children:[`Open App`,(0,Z.jsx)(Ne,{className:`w-3.5 h-3.5`})]})]})}),(0,Z.jsx)(`section`,{className:`pt-36 pb-24 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto text-center`,children:[(0,Z.jsxs)(`div`,{className:`inline-flex items-center gap-2 mb-6 px-4 py-2 bg-primary-50 border border-primary-200 text-primary-700 rounded-full text-sm font-semibold shadow-sm`,children:[(0,Z.jsx)(`span`,{className:`w-2 h-2 bg-green-500 rounded-full animate-pulse`}),`Production-Ready · Hosted on Azure · v3.1.0 Live`]}),(0,Z.jsxs)(`h1`,{className:`text-5xl md:text-6xl lg:text-7xl font-extrabold text-gray-900 mb-6 leading-[1.08] tracking-tight`,children:[(0,Z.jsx)(`span`,{className:`text-transparent bg-clip-text bg-gradient-to-r from-primary-600 via-sky-500 to-blue-600`,children:`Azure Service Bus`}),(0,Z.jsx)(`br`,{}),(0,Z.jsx)(`span`,{children:`Forensic Debugger`})]}),(0,Z.jsx)(`p`,{className:`text-xl md:text-2xl text-gray-600 mb-4 max-w-3xl mx-auto leading-relaxed font-light`,children:`Everything the Azure Portal can't show you — full message bodies, DLQ patterns, auto-replay rules, correlation tracing, and AI-powered insights.`}),(0,Z.jsx)(`p`,{className:`text-base text-gray-500 mb-10 max-w-2xl mx-auto`,children:`Built for DevOps, Platform, and SRE engineers who need real answers during production incidents — not just message counts.`}),(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 mb-14`,children:[(0,Z.jsxs)(M,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-primary-600 text-white text-base font-bold rounded-xl hover:bg-primary-700 transition-all shadow-lg hover:shadow-xl hover:-translate-y-0.5`,"aria-label":`Open the ServiceHub application`,children:[`🚀 Open ServiceHub`,(0,Z.jsx)(Ne,{className:`w-5 h-5`})]}),(0,Z.jsxs)(`a`,{href:Lb,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-gray-800 text-base font-bold rounded-xl border-2 border-gray-300 hover:border-gray-400 hover:bg-gray-50 transition-all shadow-sm`,children:[(0,Z.jsx)(Bg,{className:`w-5 h-5`}),`View on GitHub`]}),(0,Z.jsx)(M,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-primary-600 text-base font-bold rounded-xl border-2 border-primary-300 hover:border-primary-400 hover:bg-primary-50 transition-all shadow-sm`,children:`💻 Self-Host Locally`})]}),(0,Z.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-x-8 gap-y-3 text-sm text-gray-500`,children:[{icon:`✅`,label:`100% Open Source (MIT)`},{icon:`🔐`,label:`AES-GCM Encrypted at Rest`},{icon:`👁️`,label:`Read-Only by Default`},{icon:`🧠`,label:`AI Runs Entirely In-Browser`},{icon:`☁️`,label:`Azure-Hosted & Self-Hostable`}].map(({icon:e,label:t})=>(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 font-medium`,children:[(0,Z.jsx)(`span`,{children:e}),` `,t]},t))})]})}),(0,Z.jsx)(`section`,{className:`px-6 pb-8`,children:(0,Z.jsx)(`div`,{className:`max-w-4xl mx-auto`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-4 p-5 bg-blue-50 border border-blue-200 rounded-xl shadow-sm`,children:[(0,Z.jsx)(`div`,{className:`flex-shrink-0 w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mt-0.5`,children:(0,Z.jsx)(Ve,{className:`w-5 h-5 text-blue-600`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`text-sm font-bold text-blue-900 mb-1`,children:`🔒 Authentication via Microsoft Entra ID (Azure AD)`}),(0,Z.jsxs)(`p`,{className:`text-sm text-blue-800 leading-relaxed`,children:[`When you open the hosted application, you will be redirected to`,` `,(0,Z.jsx)(`strong`,{children:`Microsoft's own login page`}),` — the same identity provider trusted by Fortune 500 companies. This is for`,` `,(0,Z.jsx)(`strong`,{children:`access control only`}),`. ServiceHub does`,` `,(0,Z.jsx)(`strong`,{children:`not store your personal information, credentials, or any user data`}),`. We do not have a user database. We comply with GDPR and data-minimisation principles. Your Azure Service Bus connection strings are encrypted in your session using AES-GCM — they are never transmitted to any third party.`]})]})]})})}),(0,Z.jsx)(`section`,{className:`py-12 px-6 bg-gradient-to-r from-primary-600 to-blue-600`,children:(0,Z.jsx)(`div`,{className:`max-w-5xl mx-auto grid grid-cols-2 md:grid-cols-4 gap-6 text-center text-white`,children:[{value:`10+`,label:`Core Features`},{value:`30-day`,label:`DLQ History`},{value:`100%`,label:`Client-Side AI`},{value:`30s`,label:`Setup Time`}].map(({value:e,label:t})=>(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-3xl md:text-4xl font-extrabold mb-1`,children:e}),(0,Z.jsx)(`div`,{className:`text-sm text-white/80 font-medium`,children:t})]},t))})}),(0,Z.jsx)(`section`,{className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Up and Running in 30 Seconds`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-xl mx-auto`,children:`No Docker. No cloud provisioning. No credit card. Just clone and go.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[{step:`01`,title:`Connect Your Namespace`,desc:`Paste your Azure Service Bus connection string on the Connect page. Listen-only permission is all you need.`,icon:`🔌`},{step:`02`,title:`Browse & Analyse`,desc:`Instantly see all queues, message bodies, DLQ messages, AI pattern clusters, and 30-day trends.`,icon:`🔍`},{step:`03`,title:`Replay & Recover`,desc:`Fix the root cause, then replay failed messages manually or set rules to do it automatically.`,icon:`⚡`}].map(({step:e,title:t,desc:n,icon:r})=>(0,Z.jsxs)(`div`,{className:`relative p-6 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md hover:border-primary-200 transition-all group`,children:[(0,Z.jsx)(`div`,{className:`absolute -top-3 -left-3 w-8 h-8 bg-primary-600 text-white text-xs font-bold rounded-full flex items-center justify-center shadow`,children:e}),(0,Z.jsx)(`div`,{className:`text-4xl mb-4 group-hover:scale-110 transition-transform`,children:r}),(0,Z.jsx)(`h3`,{className:`text-lg font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm leading-relaxed`,children:n})]},e))}),(0,Z.jsx)(`div`,{className:`mt-10 p-4 bg-gray-900 rounded-xl text-center`,children:(0,Z.jsxs)(`code`,{className:`text-green-400 text-sm font-mono`,children:[`git clone `,Lb,`.git && cd servicehub && ./run.sh`]})})]})}),(0,Z.jsx)(`section`,{id:`features`,className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Every Feature You Need to Master Azure Service Bus`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-2xl mx-auto`,children:`ServiceHub covers the full lifecycle — from real-time browsing to automated recovery and deep forensic analysis.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:e.map(({icon:e,title:t,description:n,badge:r})=>(0,Z.jsxs)(`div`,{className:`p-6 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md hover:border-primary-300 transition-all`,children:[(0,Z.jsxs)(`div`,{className:`flex items-start justify-between mb-4`,children:[(0,Z.jsx)(`div`,{className:`w-11 h-11 bg-primary-50 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(e,{className:`w-6 h-6 text-primary-600`})}),(0,Z.jsx)(`span`,{className:`text-xs font-semibold text-primary-600 bg-primary-50 border border-primary-100 px-2 py-0.5 rounded-full`,children:r})]}),(0,Z.jsx)(`h3`,{className:`text-base font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed`,children:n})]},t))}),(0,Z.jsxs)(`div`,{className:`mt-14 pt-10 border-t border-gray-200`,children:[(0,Z.jsx)(`p`,{className:`text-center text-sm font-semibold text-gray-500 mb-6 uppercase tracking-wider`,children:`All Included in v3.1.0`}),(0,Z.jsx)(`div`,{className:`flex flex-wrap justify-center gap-3`,children:[`🔍 DLQ Intelligence`,`⚡ Auto-Replay Rules`,`🤖 AI Pattern Analysis`,`🔗 Correlation Explorer`,`⏱️ Scheduled Messages`,`💚 Health Monitor`,`🌐 Multi-Namespace`,`📊 30-Day Trends`,`🔐 AES-GCM Security`,`📤 CSV/JSON Export`,`🔎 Full-Text Search`,`♻️ Auto-Refresh Live`].map(e=>(0,Z.jsx)(`span`,{className:`px-4 py-2 bg-white border border-gray-200 rounded-full text-sm text-gray-700 font-medium shadow-sm hover:border-primary-300 hover:text-primary-700 transition-colors`,children:e},e))})]})]})}),(0,Z.jsx)(`section`,{id:`compare`,className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`ServiceHub vs Azure Portal`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-12 max-w-xl mx-auto`,children:`The Azure Portal is great for provisioning — but terrible for debugging. Here's the difference.`}),(0,Z.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-gray-200 shadow-sm`,children:(0,Z.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{className:`bg-gray-50 border-b border-gray-200`,children:[(0,Z.jsx)(`th`,{className:`px-6 py-4 text-left font-bold text-gray-800 w-1/2`,children:`Capability`}),(0,Z.jsx)(`th`,{className:`px-6 py-4 text-center font-bold text-gray-500 w-1/4`,children:`Azure Portal`}),(0,Z.jsx)(`th`,{className:`px-6 py-4 text-center font-bold text-primary-600 w-1/4`,children:`ServiceHub`})]})}),(0,Z.jsx)(`tbody`,{children:t.map(({feature:e,portal:t,hub:n},r)=>(0,Z.jsxs)(`tr`,{className:`${r%2==0?`bg-white`:`bg-gray-50/40`} border-b border-gray-100 hover:bg-primary-50/30 transition-colors`,children:[(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-gray-800 font-medium`,children:e}),(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-center`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-red-500 font-medium`,children:[(0,Z.jsx)(`span`,{className:`text-red-400`,children:`✗`}),` `,t]})}),(0,Z.jsx)(`td`,{className:`px-6 py-3.5 text-center`,children:(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-green-600 font-semibold`,children:[(0,Z.jsx)(`span`,{className:`text-green-500`,children:`✓`}),` `,n]})})]},e))})]})}),(0,Z.jsxs)(`div`,{className:`mt-8 p-5 bg-gradient-to-r from-primary-50 to-blue-50 border border-primary-200 rounded-xl text-center`,children:[(0,Z.jsx)(`p`,{className:`text-gray-800 font-semibold text-base`,children:`🎯 ServiceHub turns a 6-hour incident into a 45-minute fix.`}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm mt-1`,children:`Stop guessing from counts. Start reading messages.`})]})]})}),(0,Z.jsx)(`section`,{id:`usecases`,className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Real-World Scenarios Where ServiceHub Shines`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-12 max-w-xl mx-auto`,children:`From 2 AM production fires to weekly post-mortems — ServiceHub is built for every phase.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:n.map(({emoji:e,title:t,story:n,saving:a,color:o})=>(0,Z.jsxs)(`div`,{className:`p-6 bg-gradient-to-br ${r[o]} rounded-xl border shadow-sm hover:shadow-md transition-all`,children:[(0,Z.jsx)(`div`,{className:`text-4xl mb-3`,children:e}),(0,Z.jsx)(`h3`,{className:`text-lg font-bold text-gray-900 mb-3`,children:t}),(0,Z.jsx)(`p`,{className:`text-gray-600 text-sm leading-relaxed mb-4`,children:n}),(0,Z.jsxs)(`span`,{className:`text-xs font-bold ${i[o]} bg-white/70 px-3 py-1 rounded-full border`,children:[`⚡ `,a]})]},t))})]})}),(0,Z.jsx)(`section`,{className:`py-20 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-4`,children:`Enterprise-Grade Security. Developer-Friendly.`}),(0,Z.jsx)(`p`,{className:`text-gray-500 text-center mb-14 max-w-2xl mx-auto`,children:`ServiceHub was built from day one with the principle that a debugging tool should never become a security liability.`}),(0,Z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6 mb-10`,children:[{icon:`🔐`,title:`AES-GCM Encryption`,body:`Your connection strings are encrypted at rest using AES-256-GCM. The encryption key lives only in your server config — never in the database.`},{icon:`👁️`,title:`Read-Only by Default`,body:`All message reading uses PeekMessagesAsync. ServiceHub never consumes, removes, or alters any messages on your bus. Your consumers are unaffected.`},{icon:`🧠`,title:`Zero-Data-Exfiltration AI`,body:`AI pattern analysis is pure TypeScript running in your browser tab. Message content never leaves your environment — no API calls, no cloud processing.`},{icon:`🛡️`,title:`OWASP Compliant`,body:`Built against OWASP Top 10 guidelines. Input validation, secure headers, no SQL injection surface (SQLite queries via EF Core parameterised).`},{icon:`🔑`,title:`Minimum-Privilege Design`,body:`Full functionality with Listen-only permission. Send permission required only for replay. Manage permission only for message generation.`},{icon:`🏠`,title:`Self-Host for Sovereignty`,body:`Deploy on your own Azure subscription, on-premises VM, Docker container, or Kubernetes cluster. You own the infrastructure and the data.`}].map(({icon:e,title:t,body:n})=>(0,Z.jsxs)(`div`,{className:`p-5 bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all`,children:[(0,Z.jsx)(`div`,{className:`text-2xl mb-3`,children:e}),(0,Z.jsx)(`h4`,{className:`font-bold text-gray-900 mb-2`,children:t}),(0,Z.jsx)(`p`,{className:`text-sm text-gray-600 leading-relaxed`,children:n})]},t))}),(0,Z.jsx)(`div`,{className:`p-6 bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl`,children:(0,Z.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,Z.jsx)(Ve,{className:`w-6 h-6 text-blue-600 shrink-0 mt-0.5`}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`font-bold text-blue-900 mb-2`,children:`About the Hosted Application Authentication`}),(0,Z.jsxs)(`p`,{className:`text-sm text-blue-800 leading-relaxed`,children:[`The hosted ServiceHub at`,` `,(0,Z.jsx)(`a`,{href:Ib,className:`underline hover:text-blue-600`,target:`_blank`,rel:`noopener noreferrer`,children:`app-servicehub-prod.azurewebsites.net`}),` `,`uses `,(0,Z.jsx)(`strong`,{children:`Microsoft Entra ID (Azure Active Directory)`}),` as the identity provider. When you sign in, you are authenticating directly with `,(0,Z.jsx)(`strong`,{children:`Microsoft's infrastructure`}),` — not with ServiceHub servers. We receive only your Microsoft identity claim to verify you have access.`,(0,Z.jsx)(`strong`,{children:` We store no passwords, no personal data, and no user records.`}),` `,`This is purely a security gate to prevent unauthorised access to the shared hosting environment. For `,(0,Z.jsx)(`strong`,{children:`full data sovereignty`}),`, self-host ServiceHub on your own infrastructure.`]})]})]})})]})}),(0,Z.jsx)(`section`,{className:`py-20 px-6 bg-gray-50/60`,children:(0,Z.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl font-bold text-gray-900 text-center mb-12`,children:`Why Teams Choose ServiceHub`}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-12`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h3`,{className:`text-xl font-bold text-gray-900 mb-6 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:`🏆`}),` Beats the Azure Portal`]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:[`See full message body — not just counts`,`Search 10,000 messages in under a second`,`Auto-replay failed DLQ messages with rules`,`30-day failure history with trend charts`,`AI clusters messages by error type automatically`,`Trace any Correlation ID across all queues`].map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(Se,{className:`w-5 h-5 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e})]},e))})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`h3`,{className:`text-xl font-bold text-gray-900 mb-6 flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-2xl`,children:`🧑‍💻`}),` Built for DevOps & SREs`]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:[`Works on any OS — macOS, Linux, Windows`,`One-command setup: clone → run → connect`,`Multi-namespace: DEV, UAT, PROD simultaneously`,`Enterprise AES-GCM encryption out of the box`,`Deploy anywhere: Azure, Docker, Kubernetes, VMs`,`Open source, MIT licensed — no vendor lock-in`].map(e=>(0,Z.jsxs)(`li`,{className:`flex items-start gap-3`,children:[(0,Z.jsx)(Se,{className:`w-5 h-5 text-green-500 shrink-0 mt-0.5`}),(0,Z.jsx)(`span`,{className:`text-gray-700`,children:e})]},e))})]})]})]})}),(0,Z.jsx)(`section`,{className:`py-24 px-6`,children:(0,Z.jsxs)(`div`,{className:`max-w-3xl mx-auto bg-gradient-to-br from-primary-600 via-primary-700 to-blue-700 rounded-2xl p-12 text-white text-center shadow-2xl relative overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`absolute top-0 right-0 w-48 h-48 bg-white/5 rounded-full -translate-y-1/2 translate-x-1/2`}),(0,Z.jsx)(`div`,{className:`absolute bottom-0 left-0 w-32 h-32 bg-white/5 rounded-full translate-y-1/2 -translate-x-1/2`}),(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`h2`,{className:`text-3xl md:text-4xl font-extrabold mb-4`,children:`Stop Guessing. Start Debugging.`}),(0,Z.jsx)(`p`,{className:`text-lg mb-2 text-white/90 leading-relaxed`,children:`Your DLQ messages are telling a story. ServiceHub helps you read it.`}),(0,Z.jsx)(`p`,{className:`text-sm text-white/70 mb-10`,children:`No credit card. No install required. Connect your Azure Service Bus in 30 seconds.`}),(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4`,children:[(0,Z.jsxs)(M,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white text-primary-700 font-bold text-base rounded-xl hover:bg-gray-100 transition-all shadow-lg hover:-translate-y-0.5`,"aria-label":`Open the ServiceHub application`,children:[`🚀 Open ServiceHub`,(0,Z.jsx)(Ne,{className:`w-5 h-5`})]}),(0,Z.jsx)(M,{to:`/connect`,className:`inline-flex items-center gap-2.5 px-8 py-4 bg-white/15 text-white font-bold text-base rounded-xl border-2 border-white/40 hover:bg-white/25 transition-all`,children:`💻 Self-Host on localhost`})]})]})]})}),(0,Z.jsx)(`footer`,{className:`border-t border-gray-200 py-12 px-6 bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`max-w-7xl mx-auto`,children:[(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-4 gap-8 mb-10`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 mb-4`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center`,children:(0,Z.jsx)(_e,{className:`w-4 h-4 text-white`})}),(0,Z.jsx)(`span`,{className:`font-bold text-gray-900`,children:`ServiceHub`})]}),(0,Z.jsx)(`p`,{className:`text-xs text-gray-500 leading-relaxed`,children:`The forensic debugger for Azure Service Bus. Built for engineers who need real answers fast.`})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Product`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${Lb}/blob/main/README.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Documentation `,(0,Z.jsx)(Fg,{className:`w-3 h-3`})]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${Lb}/tree/main/self-hosting`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Self-Hosting Guide `,(0,Z.jsx)(Fg,{className:`w-3 h-3`})]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(M,{to:`/security`,className:`hover:text-primary-600`,children:`Security & Privacy`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:`${Lb}/blob/main/CHANGELOG.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[`Changelog `,(0,Z.jsx)(Fg,{className:`w-3 h-3`})]})})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Community`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:Lb,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600 flex items-center gap-1.5`,children:[(0,Z.jsx)(Bg,{className:`w-4 h-4`}),` GitHub Repository`]})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${Lb}/issues`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Report an Issue`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${Lb}/discussions`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Discussions`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${Lb}/releases`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Releases`})})]})]}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`font-semibold text-gray-900 mb-4 text-sm`,children:`Legal`}),(0,Z.jsxs)(`ul`,{className:`space-y-2.5 text-sm text-gray-600`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${Lb}/blob/main/SECURITY.md`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`Security Policy`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{href:`${Lb}/blob/main/LICENSE`,target:`_blank`,rel:`noopener noreferrer`,className:`hover:text-primary-600`,children:`MIT License`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(M,{to:`/security`,className:`hover:text-primary-600`,children:`Privacy Notice`})})]})]})]}),(0,Z.jsxs)(`div`,{className:`border-t border-gray-200 pt-8 flex flex-col md:flex-row items-center justify-between gap-4 text-sm text-gray-500`,children:[(0,Z.jsxs)(`p`,{children:[`ServiceHub is open source, free to use, and MIT licensed. Made with ❤️ by`,` `,(0,Z.jsx)(`a`,{href:`https://github.com/debdevops`,className:`text-primary-600 hover:underline font-medium`,children:`Debasis`})]}),(0,Z.jsx)(`p`,{children:`© 2026 ServiceHub · All rights reserved`})]})]})})]})}var zb=(0,P.lazy)(()=>ue(()=>import(`./page-dashboard-CPa1Ep2L.js`).then(e=>e.t),__vite__mapDeps([0,1,2]))),Bb=(0,P.lazy)(()=>ue(()=>import(`./page-dlq-history-Bi3Gp6Ul.js`).then(e=>e.t),__vite__mapDeps([3,1,2,0]))),Vb=(0,P.lazy)(()=>ue(()=>import(`./page-correlation-ByerC9Nt.js`).then(e=>e.t),__vite__mapDeps([2,1]))),Hb=(0,P.lazy)(()=>ue(()=>import(`./InsightsPage-B56HoFxL.js`).then(e=>({default:e.InsightsPage})),__vite__mapDeps([4,1,2,0,3])));function Ub(){return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-full bg-gray-50`,children:(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600`})})}var Wb=re([{path:`/`,element:(0,Z.jsx)(Rb,{})},{path:`/welcome`,element:(0,Z.jsx)(Rb,{})},{path:`/`,element:(0,Z.jsx)(Cv,{}),errorElement:(0,Z.jsx)(ce,{to:`/welcome`,replace:!0}),children:[{path:`dashboard`,element:(0,Z.jsx)(P.Suspense,{fallback:(0,Z.jsx)(Ub,{}),children:(0,Z.jsx)(zb,{})})},{path:`messages`,element:(0,Z.jsx)(Py,{})},{path:`connect`,element:(0,Z.jsx)(Fy,{})},{path:`dlq-history`,element:(0,Z.jsx)(P.Suspense,{fallback:(0,Z.jsx)(Ub,{}),children:(0,Z.jsx)(Bb,{})})},{path:`rules`,element:(0,Z.jsx)(ob,{})},{path:`health`,element:(0,Z.jsx)(bb,{})},{path:`help`,element:(0,Z.jsx)(xb,{})},{path:`scheduled`,element:(0,Z.jsx)(jb,{})},{path:`correlation`,element:(0,Z.jsx)(P.Suspense,{fallback:(0,Z.jsx)(Ub,{}),children:(0,Z.jsx)(Vb,{})})},{path:`security`,element:(0,Z.jsx)(Fb,{})},{path:`insights`,element:(0,Z.jsx)(P.Suspense,{fallback:(0,Z.jsx)(Ub,{}),children:(0,Z.jsx)(Hb,{})})}]},{path:`*`,element:(0,Z.jsx)(ce,{to:`/welcome`,replace:!0})}]),Gb=new ct({defaultOptions:{queries:{staleTime:1e3*60*5,gcTime:1e3*60*30,retry:1,refetchOnWindowFocus:!1,throwOnError:!1}}}),Kb=`toString`,qb=`isStorageUseDisabled`,Jb=`_addHook`,Yb=`core`,Xb=`dataType`,Zb=`envelopeType`,Qb=`diagLog`,$b=`track`,ex=`trackPageView`,tx=`config`,nx=`trackPreviousPageVisit`,rx=`sendPageViewInternal`,ix=`refUri`,ax=`startTime`,ox=`properties`,sx=`duration`,cx=`sendPageViewPerformanceInternal`,lx=`populatePageViewPerformanceEvent`,ux=`href`,dx=`sendExceptionInternal`,fx=`error`,px=`CreateAutoException`,mx=`addTelemetryInitializer`,hx=`overridePageViewDuration`,gx=`autoTrackPageVisitTime`,_x=`isBrowserLinkTrackingEnabled`,vx=`length`,yx=`enableAutoRouteTracking`,bx=`enableUnhandledPromiseRejectionTracking`,xx=`autoUnhandledPromiseInstrumented`,Sx=`getEntriesByType`,Cx=`isPerformanceTimingSupported`,wx=`getPerformanceTiming`,Tx=`navigationStart`,Ex=`shouldCollectDuration`,Dx=`isPerformanceTimingDataReady`,Ox=`responseStart`,kx=`loadEventEnd`,Ax=`responseEnd`,jx=`connectEnd`,Mx=function(){function e(t,n,r,i){za(e,this,function(e){var a=null,o=[],s=!1,c=!1,l;r&&(l=r.logger);function u(e){r&&r.flush(e,function(){})}function d(){a||=Yi((function(){a=null;var e=o.slice(0),t=!1;o=[],V(e,function(e){e()?t=!0:o.push(e)}),o.length>0&&d(),t&&u(!0)}),100)}function f(e){o.push(e),d()}e[ex]=function(e,a){var o=e.name;if(F(o)||typeof o!=`string`){var d=Dr();o=e.name=d&&d.title||``}var p=e.uri;if(F(p)||typeof p!=`string`){var m=Vc();p=e.uri=m&&m.href||``}if(r&&r.config&&(p=e.uri=al(e.uri,r[tx])),!c){var h=Ni(),g=h&&h.getEntriesByType&&h.getEntriesByType(`navigation`);if(g&&g[0]&&!Kt(h.timeOrigin)){var _=g[0].loadEventStart;e[ax]=new Date(h.timeOrigin+_)}else{var v=(a||e.properties||{}).duration||0;e[ax]=new Date(new Date().getTime()-v)}c=!0}if(!i.isPerformanceTimingSupported()){t[rx](e,a),u(!0),Fr()||Y(l,2,25,`trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.`);return}var y=!1,b,x=i[wx]()[Tx];x>0&&(b=Dm(x,+new Date),i.shouldCollectDuration(b)||(b=void 0));var S;!F(a)&&!F(a.duration)&&(S=a[sx]),(n||!isNaN(S))&&(isNaN(S)&&(a||={},a[sx]=b),t[rx](e,a),u(!0),y=!0);var C=6e4;a||={},f(function(){var n=!1;try{if(i.isPerformanceTimingDataReady()){n=!0;var r={name:o,uri:p};i[lx](r),!r.isValid&&!y?(a[sx]=b,t[rx](e,a)):(y||(a[sx]=r.durationMs,t[rx](e,a)),s||=(t[cx](r,a),!0))}else x>0&&Dm(x,+new Date)>C&&(n=!0,y||(a[sx]=C,t[rx](e,a)))}catch(e){Y(l,1,38,`trackPageView failed on page load calculation: `+G(e),{exception:z(e)})}return n})},e.teardown=function(e,t){if(a){a.cancel(),a=null;var n=o.slice(0);o=[],V(n,function(e){e()})}}})}return e.__ieDyn=1,e}(),Nx=36e5,Px=[`googlebot`,`adsbot-google`,`apis-google`,`mediapartners-google`];function Fx(){var e=Ni();return e&&!!e.timing}function Ix(){var e=Ni();return e&&e.getEntriesByType&&e.getEntriesByType(`navigation`).length>0}function Lx(){var e=Ni(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0}function Rx(){return Fx()?Ni().timing:null}function zx(){return Ix()?Ni()[Sx](`navigation`)[0]:null}function Bx(){var e=[...arguments],t=(jr()||{}).userAgent,n=!1;if(t)for(var r=0;r=Nx)return!1;return!0}var Vx=function(){function e(t){var n=wu(t);za(e,this,function(e){e[lx]=function(t){t.isValid=!1;var r=zx(),i=Rx(),a=0,o=0,s=0,c=0,l=0;(r||i)&&(r?(a=r[sx],o=r.startTime===0?r[jx]:Dm(r[ax],r[jx]),s=Dm(r.requestStart,r[Ox]),c=Dm(r[Ox],r[Ax]),l=Dm(r.responseEnd,r[kx])):(a=Dm(i[Tx],i[kx]),o=Dm(i[Tx],i[jx]),s=Dm(i.requestStart,i[Ox]),c=Dm(i[Ox],i[Ax]),l=Dm(i.responseEnd,i[kx])),a===0?Y(n,2,10,`error calculating page view performance.`,{total:a,network:o,request:s,response:c,dom:l}):e.shouldCollectDuration(a,o,s,c,l)?a0&&e<=100}function $x(e){Kt(e.isStorageUseDisabled)||(e.isStorageUseDisabled?Im():Rm())}var eS=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.identifier=_g,n.priority=180,n.autoRoutePVDelay=500;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return za(t,n,function(e,t){var n=t[Jb];ne(),e.getCookieMgr=function(){return Zu(e[Yb])},e.processTelemetry=function(t,n){e.processNext(t,n)},e.trackEvent=function(t,n){try{var r=lg(t,$m[Xb],$m[Zb],e[Qb](),n);e[Yb][$b](r)}catch(e){M(2,39,`trackTrace failed, trace will not be collected: `+G(e),{exception:z(e)})}},e.startTrackEvent=function(e){try{r.start(e)}catch(e){M(1,29,`startTrackEvent failed, event will not be collected: `+G(e),{exception:z(e)})}},e.stopTrackEvent=function(e,t,n){try{r.stop(e,void 0,t,n)}catch(e){M(1,30,`stopTrackEvent failed, event will not be collected: `+G(e),{exception:z(e)})}},e.trackTrace=function(t,n){try{var r=lg(t,Xh[Xb],Xh[Zb],e[Qb](),n);e[Yb][$b](r)}catch(e){M(2,39,`trackTrace failed, trace will not be collected: `+G(e),{exception:z(e)})}},e.trackMetric=function(t,n){try{var r=lg(t,Wh[Xb],Wh[Zb],e[Qb](),n);e[Yb][$b](r)}catch(e){M(1,36,`trackMetric failed, metric will not be collected: `+G(e),{exception:z(e)})}},e[ex]=function(t,n){try{var r=t||{};e.core&&e.core.config&&(r.uri=al(r.uri,e[Yb][tx])),a[ex](r,Qi(Qi(Qi({},r.properties),r.measurements),n)),v&&s[nx](r.name,r.uri)}catch(e){M(1,37,`trackPageView failed, page view will not be collected: `+G(e),{exception:z(e)})}},e[rx]=function(t,n,r){var i=Dr();if(i&&(t[ix]=t.refUri===void 0?i.referrer:t[ix]),e.core&&e.core.config&&(t.refUri=al(t.refUri,e[Yb][tx])),F(t.startTime)){var a=(n||t.properties||{}).duration||0;t[ax]=new Date(new Date().getTime()-a)}var o=lg(t,Jh[Xb],Jh[Zb],e[Qb](),n,r);e[Yb][$b](o),w()},e[cx]=function(t,n,r){var i=lg(t,Zh[Xb],Zh[Zb],e[Qb](),n,r);e[Yb][$b](i)},e.trackPageViewPerformance=function(t,n){var r=t||{};try{o[lx](r),e[cx](r,n)}catch(e){M(1,37,`trackPageViewPerformance failed, page view will not be collected: `+G(e),{exception:z(e)})}},e.startTrackPage=function(e){try{if(typeof e!=`string`){var t=Dr();e=t&&t.title||``}i.start(e)}catch(e){M(1,31,`startTrackPage failed, page view may not be collected: `+G(e),{exception:z(e)})}},e.stopTrackPage=function(t,n,r,a){try{if(typeof t!=`string`){var o=Dr();t=o&&o.title||``}if(typeof n!=`string`){var c=Vc();n=c&&c.href||``}e.core&&e.core.config&&(n=al(n,e[Yb][tx])),i.stop(t,n,r,a),v&&s[nx](t,n)}catch(e){M(1,32,`stopTrackPage failed, page view will not be collected: `+G(e),{exception:z(e)})}},e[dx]=function(t,n,r){var i=t&&(t.exception||t.error)||tn(t)&&t||{name:t&&typeof t,message:t||`not_specified`};t||={};var a=new Ah(e[Qb](),i,t.properties||n,t.measurements,t.severityLevel,t.id).toInterface(),o=Dr();if(o&&y?.inclScripts){var s=Ad(o);a[ox].exceptionScripts=JSON.stringify(s)}if(y?.expLog){var c=y.expLog();c&&c.logs&&R(c.logs)&&(a[ox].exceptionLog=c.logs.slice(0,y.maxLogs).join(` -`))}var l=lg(a,Ah[Xb],Ah[Zb],e[Qb](),n,r);e[Yb][$b](l)},e.trackException=function(t,n){t&&!t.exception&&t.error&&(t.exception=t[fx]);try{e[dx](t,n)}catch(e){M(1,35,`trackException failed, exception will not be collected: `+G(e),{exception:z(e)})}},e._onerror=function(t){var n=t&&t.error,r=t&&t.evt;try{if(!r){var i=kr();i&&(r=i[Kx])}var a=t&&t.url||(Dr()||{}).URL,o=t.errorSrc||`window.onerror@`+a+`:`+(t.lineNumber||0)+`:`+(t.columnNumber||0),s={errorSrc:o,url:a,lineNumber:t.lineNumber||0,columnNumber:t.columnNumber||0,message:t.message};qh(t.message,t.url,t.lineNumber,t.columnNumber,t.error)?O(Ah[px](`Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.`,a,t.lineNumber||0,t.columnNumber||0,n,r,null,o),s):(t.errorSrc||=o,e.trackException({exception:t,severityLevel:3},s))}catch(e){var c=n?n.name+`, `+n.message:`null`;M(1,11,`_onError threw exception while logging error, error will not be collected: `+G(e),{exception:z(e),errorString:c})}},e[mx]=function(t){if(e.core)return e[Yb][mx](t);c||=[],c.push(t)},e.initialize=function(n,l,u,d){if(!e.isInitialized()){F(l)&&ln(`Error initializing`),t.initialize(n,l,u,d);try{S=Zf(wl(e.identifier),l.evtNamespace&&l.evtNamespace()),c&&=(V(c,function(e){l[mx](e)}),null),T(n),o=new Vx(e[Yb]),a=new Mx(e,_.overridePageViewDuration,e[Yb],o),s=new Hx(e[Qb](),function(e,t,n){return E(e,t,n)}),r=new Wx(e[Qb](),`trackEvent`),r.action=function(t,n,r,i,a){i||={},a||={},i.duration=r[Kb](),e.trackEvent({name:t,properties:i,measurements:a})},i=new Wx(e[Qb](),`trackPageView`),i.action=function(t,n,r,i,a){F(i)&&(i={}),i.duration=r[Kb]();var o={name:t,uri:n,properties:i,measurements:a};e[rx](o,i)},Or()&&(ee(),k())}catch(t){throw e.setInitialized(!1),t}}},e._doTeardown=function(e,t){a&&a.teardown(e,t),$f(window,null,null,S),ne()},e._getDbgPlgTargets=function(){return[C,m]};function w(){if(e.core){var t=e[Yb].getPlugin(`AjaxDependencyPlugin`);t&&t.plugin&&t.plugin.resetAjaxAttempts&&t.plugin.resetAjaxAttempts()}}function T(t){var n=e.identifier,r=e[Yb];e[Jb](Zl(t,function(){_=Hd(null,t,r).getExtCfg(n,Xx),m=m||t.autoExceptionInstrumented||_.autoExceptionInstrumented,y=_.expCfg,v=_[gx],t.storagePrefix&&Lm(t.storagePrefix),$x(_),l=_[_x],D()}))}function E(t,n,r){var i={PageName:t,PageUrl:n};e.trackMetric({name:`PageVisitTime`,average:r,max:r,min:r,sampleCount:1},i)}function D(){if(!u&&l){var t=[`/browserLinkSignalR/`,`/__browserLink/`];e[Jb](e[mx](function(e){if(l&&e.baseType===Yh.dataType){var n=e.baseData;if(n){for(var r=0;r=0)return!1}}return!0})),u=!0}}function O(t,n){var r=lg(t,Ah[Xb],Ah[Zb],e[Qb](),n);e[Yb][$b](r)}function ee(){var t=kr(),r=Vc(!0);e[Jb](Zl(_,function(){p=_.disableExceptionTracking,!p&&!m&&!_.autoExceptionInstrumented&&(n(vp(t,`onerror`,{ns:S,rsp:function(t,n,r,i,a,o){!p&&t.rslt!==!0&&e._onerror(Ah[px](n,r,i,a,o,t.evt))}},!1)),C++,m=!0)})),j(t,r)}function k(){var t=kr(),n=Vc(!0);e[Jb](Zl(_,function(){if(d=_[yx]===!0,t&&d&&!f&&Mr()){var e=Nr();L(e.pushState)&&L(e.replaceState)&&typeof Event<`u`&&te(t,e,n)}}))}function A(){var t=null;if(e.core&&e.core.getTraceCtx&&(t=e[Yb].getTraceCtx(!1)),!t){var n=e[Yb].getPlugin(hg);if(n){var r=n.plugin.context;r&&(t=Om(r.telemetryTrace))}}return t}function te(t,r,i){if(f)return;var a=_.namePrefix||``;function o(){d&&qx(t,fg(a+`locationchange`))}function s(){if(x&&(b=x),x=i&&i.href||``,e.core&&e.core.config&&(x=al(x,e[Yb][tx])),d){var t=A();if(t){t.setTraceId(yd());var n=`_unknown_`;i&&i.pathname&&(n=i.pathname+(i.hash||``)),t.setName(nm(e[Qb](),n))}Yi((function(t){e[ex]({refUri:t,properties:{duration:0}})}).bind(e,b),e.autoRoutePVDelay)}}n(vp(r,`pushState`,{ns:S,rsp:function(){d&&(qx(t,fg(a+`pushState`)),qx(t,fg(a+`locationchange`)))}},!0)),n(vp(r,`replaceState`,{ns:S,rsp:function(){d&&(qx(t,fg(a+`replaceState`)),qx(t,fg(a+`locationchange`)))}},!0)),Qf(t,a+`popstate`,o,S),Qf(t,a+`locationchange`,s,S),f=!0}function j(t,r){e[Jb](Zl(_,function(){h=_[bx]===!0,m||=_.autoUnhandledPromiseInstrumented,h&&!g&&(n(vp(t,`onunhandledrejection`,{ns:S,rsp:function(t,n){h&&t.rslt!==!0&&e._onerror(Ah[px](Jx(n),r?r[ux]:``,0,0,n,t.evt))}},!1)),C++,_[xx]=g=!0)}))}function M(t,n,r,i,a){e[Qb]().throwInternal(t,n,r,i,a)}function ne(){r=null,i=null,a=null,o=null,s=null,c=null,l=!1,u=!1,d=!1,f=!1,p=!1,m=!1,h=!1,g=!1,v=!1,w();var t=Vc(!0);b=t&&t.href||``,e.core&&e.core.config&&(b=al(b,e[Yb][tx])),x=null,S=null,_=null,C=0,H(e,`config`,{g:function(){return _}})}H(e,`_pageViewManager`,{g:function(){return a}}),H(e,`_pageViewPerformanceManager`,{g:function(){return o}}),H(e,`_pageVisitTimeManager`,{g:function(){return s}}),H(e,`_evtNamespace`,{g:function(){return`.`+S}})}),n}return t.Version=`3.3.11`,t}(ef),tS=`featureOptIn`,nS=`scheduleFetchTimeout`;function rS(e,t,n,r){try{var i=n>r;i&&(e=null);var a=n==0?Oi({},e):e;return a&&t&&!i&&B(a,function(e){var i=t[e];i&&(Zt(a[e])&&Zt(i)?a[e]=rS(a[e],i,++n,r):delete a[e])}),a}catch{}return e}var iS=`featureOptIn.`,aS=`.mode`,oS=`.onCfg`,sS=`.offCfg`;function cS(e,t,n){var r;if(!t||!t.enabled)return null;var i=(t.featureOptIn||{})[e]||{mode:1},a=i.mode,o=i.onCfg,s=i.offCfg,c=(n||{})[e]||{mode:2},l=c.mode,u=c.onCfg,d=c.offCfg,f=!!c.blockCdnCfg,p=iS+e+aS,m=iS+e+oS,h=iS+e+sS,g=l,_=u,v=d;return f||(a===4||a===5?(g=a==4?3:2,_=o||u,v=s||d):a===2||l===2?(g=2,_=u||o,v=d||s):a===3?(g=3,_=u||o,v=d||s):a===1&&l===1&&(g=1)),r={},r[p]=g,r[m]=_,r[h]=v,r}function lS(e,t){try{if(!e||!e.enabled)return null;if(!e.featureOptIn)return e.config;var n=e[tS],r=e.config||{};return B(n,function(n){var i=cS(n,e,t.config[tS]);F(i)||(B(i,function(e,t){Ai(r,e,t)}),uS(n,i,r))}),r}catch{}return null}function uS(e,t,n){var r=t[iS+e+aS],i=t[iS+e+oS],a=t[iS+e+sS],o=null;r===3&&(o=i),r===2&&(o=a),o&&B(o,function(e,t){Ai(n,e,t)})}var dS,fS=`ai_cfgsync`,pS=`GET`,mS=18e5,hS=void 0,gS=Fn((dS={syncMode:1,blkCdnCfg:hS,customEvtName:hS,cfgUrl:hS,overrideSyncFn:hS,overrideFetchFn:hS,onCfgChangeReceive:hS},dS[nS]=mS,dS.nonOverrideConfigs={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},dS.enableAjax=!1,dS)),_S=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=198,n.identifier=`AppInsightsCfgSyncPlugin`;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y=!1,b;return za(t,n,function(e,t){n(),e.initialize=function(n,r,i,a){t.initialize(n,r,i,a),o=Zf(wl(e.identifier),r.evtNamespace&&r.evtNamespace()),x(n)},e.getCfg=function(){return i},e.pause=function(){y=!0,M()},e.resume=function(){y=!1,j()},e.setCfg=function(e){return S(e)},e.sync=function(e){return w(e)},e.updateEventListenerName=function(e){return T(e)},e._doTeardown=function(e,t){C(),M(),n()},e._getDbgPlgTargets=function(){return[u,l,a,d,h]};function n(){i=null,a=null,o=null,s=null,l=null,u=null,h=null,c=null,f=null,p=null,d=null,b=!1,_=null,v=null,m=null}function x(t){var n=e.identifier,o=e.core;e._addHook(Zl(t,function(){r=Hd(null,t,o).getExtCfg(n,gS);var e=d;d=!!r.blkCdnCfg,b=!!r.enableAjax,!F(e)&&e!==d&&(!d&&s?g&&g(s,ee,u):M()),F(l)&&(l=r.syncMode===2),F(u)&&(u=r.syncMode===1);var c=r.customEvtName||fS;a!==c&&(l?T(c):(C(),a=c)),F(s)&&(s=r.cfgUrl),s||(i=t,u&&w())})),v=r.overrideSyncFn,_=r.overrideFetchFn,m=r.onCfgChangeReceive,h=r.nonOverrideConfigs,f=r[nS],g=E(),p=0,s&&!d&&g&&g(s,ee,u)}function S(t,n){if(t){if(i=t,n&&!y)return w();if(l&&!y)return e.core.updateCfg(t),!0}return!1}function C(){try{var e=wr();e&&$f(e,null,null,o)}catch{}}function w(e){try{return v&&L(v)?v(i,e):nl(a,i,e)}catch{}return!1}function T(e){try{return C(),e&&(a=e,A()),!0}catch{}return!1}function E(){var e=_;return F(e)&&(Zc()?e=D:$c()&&(e=O)),e}function D(e,t,n){var r=wr(),i=r&&r.fetch||null;if(e&&i&&L(i))try{var a={method:pS};b||(a[yp]=!0);var o=new Request(e,a);if(!b)try{o[yp]=!0}catch{}Ko(fetch(o),function(e){var r=e.value;e.rejected?k(t,400):r.ok?Ko(r.text(),function(e){k(t,r.status,e.value,n)}):k(t,r.status,null,n)})}catch{}}function O(e,t,n){try{var r=new XMLHttpRequest;b||(r[yp]=!0),r.open(pS,e),r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&k(t,r.status,r.responseText,n)},r.onerror=function(){k(t,400)},r.ontimeout=function(){k(t,400)},r.send()}catch{}}function ee(t,n,r){try{if(t>=200&&t<400&&n){p=0;var i=Wc();if(i){var a=lS(i.parse(n),e.core),o=a&&mi(a)&&te(a);o&&S(o,r)}}else p++;p<3&&j()}catch{}}function k(e,t,n,r){try{e(t,n,r)}catch{}}function A(){if(l){var e=wr();if(e)try{Qf(e,a,function(e){var t=e&&e.detail;if(m&&t)m(t);else{var n=t&&t.cfg,r=n&&mi(n)&&te(n);r&&S(r)}},o,!0)}catch{}}}function te(e,t){var n=null;try{e&&(n=rS(e,h,0,5))}catch{}return n}function j(){!c&&f&&(c=Yi(function(){c=null,g(s,ee,u)},f),c.unref())}function M(){c&&c.cancel(),c=null,p=0}e.processTelemetry=function(t,n){e.processNext(t,n)}}),n}return t.__ieDyn=1,t}(ef),vS=`duration`,yS=`tags`,bS=`deviceType`,xS=`data`,SS=`name`,CS=`traceID`,wS=`length`,TS=`stringify`,ES=`dataType`,DS=`envelopeType`,OS=`toString`,kS=`enqueue`,AS=`count`,jS=`push`,MS=`emitLineDelimitedJson`,NS=`clear`,PS=`markAsSent`,FS=`clearSent`,IS=`bufferOverride`,LS=`BUFFER_KEY`,RS=`SENT_BUFFER_KEY`,zS=`concat`,BS=`MAX_BUFFER_SIZE`,VS=`triggerSend`,HS=`diagLog`,US=`initialize`,WS=`_sender`,GS=`endpointUrl`,KS=`instrumentationKey`,qS=`customHeaders`,JS=`maxBatchSizeInBytes`,YS=`onunloadDisableBeacon`,XS=`isBeaconApiDisabled`,ZS=`alwaysUseXhrOverride`,QS=`enableSessionStorageBuffer`,$S=`_buffer`,eC=`onunloadDisableFetch`,tC=`disableSendBeaconSplit`,nC=`_onError`,rC=`_onPartialSuccess`,iC=`_onSuccess`,aC=`itemsReceived`,oC=`itemsAccepted`,sC=`baseType`,cC=`sampleRate`,lC=`getHashCodeScore`,uC=`baseType`,dC=`baseData`,fC=`properties`,pC=`true`;function mC(e,t,n){return K(e,t,n,rn)}function hC(e,t,n){var r=n[yS]=n.tags||{},i=t.ext=t.ext||{},a=t[yS]=t.tags||[],o=i.user;o&&(mC(r,dg.userAuthUserId,o.authId),mC(r,dg.userId,o.id||o.localId));var s=i.app;s&&mC(r,dg.sessionId,s.sesId);var c=i.device;c&&(mC(r,dg.deviceId,c.id||c.localId),mC(r,dg[bS],c.deviceClass),mC(r,dg.deviceIp,c.ip),mC(r,dg.deviceModel,c.model),mC(r,dg[bS],c[bS]));var l=t.ext.web;if(l){mC(r,dg.deviceLanguage,l.browserLang),mC(r,dg.deviceBrowserVersion,l.browserVer),mC(r,dg.deviceBrowser,l.browser);var u=n[xS]=n.data||{},d=u[dC]=u[dC]||{},f=d[fC]=d[fC]||{};mC(f,`domain`,l.domain),mC(f,`isManual`,l.isManual?pC:null),mC(f,`screenRes`,l.screenRes),mC(f,`userConsent`,l.userConsent?pC:null)}var p=i.os;p&&(mC(r,dg.deviceOS,p[SS]),mC(r,dg.deviceOSVersion,p.osVer));var m=i.trace;m&&(mC(r,dg.operationParentId,m.parentID),mC(r,dg.operationName,nm(e,m[SS])),mC(r,dg.operationId,m[CS]));for(var h={},g=a[wS]-1;g>=0;g--){var _=a[g];B(_,function(e,t){h[e]=t}),a.splice(g,1)}B(a,function(e,t){h[e]=t});var v=Qi(Qi({},r),h);v[dg.internalSdkVersion]||(v[dg.internalSdkVersion]=nm(e,`javascript:${bC.Version}`,64)),n[yS]=cc(v)}function gC(e,t,n){F(e)||B(e,function(e,r){$t(r)?n[e]=r:I(r)?t[e]=r:Uc()&&(t[e]=Wc()[TS](r))})}function _C(e,t){F(e)||B(e,function(n,r){e[n]=r||t})}function vC(e,t,n,r){var i=new Qm(e,r,t);mC(i,`sampleRate`,n[bp]),(n[dC]||{}).startTime&&(i.time=tc(n[dC].startTime)),i.iKey=n.iKey;var a=n.iKey.replace(/-/g,``);return i[SS]=i[SS].replace(`{0}`,a),hC(e,n,i),n[yS]=n.tags||[],cc(i)}function yC(e,t){F(t[dC])&&Y(e,1,46,`telemetryItem.baseData cannot be null.`)}var bC={Version:`3.3.11`};function xC(e,t,n){yC(e,t);var r=t[dC].measurements||{},i=t[dC][fC]||{};gC(t[xS],i,r),F(n)||_C(i,n);var a=t[dC];if(F(a))return Du(e,`Invalid input for dependency data`),null;var o=a[fC]&&a[fC][`http.method`]?a[fC][Sp]:`GET`,s=new Yh(e,a.id,a.target,a[SS],a[vS],a.success,a.responseCode,o,a.type,a.correlationContext,i,r),c=new Qh(Yh[ES],s);return vC(e,Yh[DS],t,c)}function SC(e,t,n){yC(e,t);var r={},i={};t[uC]!==$m.dataType&&(r.baseTypeSource=t[uC]),t[uC]===$m.dataType?(r=t[dC][fC]||{},i=t[dC].measurements||{}):t[dC]&&gC(t[dC],r,i),gC(t[xS],r,i),F(n)||_C(r,n);var a=t[dC][SS],o=new $m(e,a,r,i),s=new Qh($m[ES],o);return vC(e,$m[DS],t,s)}function CC(e,t,n){yC(e,t);var r=t[dC].measurements||{},i=t[dC][fC]||{};gC(t[xS],i,r),F(n)||_C(i,n);var a=t[dC],o=Ah.CreateFromInterface(e,a,i,r),s=new Qh(Ah[ES],o);return vC(e,Ah[DS],t,s)}function wC(e,t,n){yC(e,t);var r=t[dC],i=r[fC]||{},a=r.measurements||{};gC(t[xS],i,a),F(n)||_C(i,n);var o=new Wh(e,r[SS],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,a),s=new Qh(Wh[ES],o);return vC(e,Wh[DS],t,s)}function TC(e,t,n){yC(e,t);var r,i=t[dC];!F(i)&&!F(i[fC])&&!F(i[fC].duration)?(r=i[fC][vS],delete i[fC][vS]):!F(t.data)&&!F(t.data.duration)&&(r=t[xS][vS],delete t[xS][vS]);var a=t[dC],o;((t.ext||{}).trace||{}).traceID&&(o=t.ext.trace[CS]);var s=a.id||o,c=a[SS],l=a.uri,u=a[fC]||{},d=a.measurements||{};if(F(a.refUri)||(u.refUri=a.refUri),F(a.pageType)||(u.pageType=a.pageType),F(a.isLoggedIn)||(u.isLoggedIn=a.isLoggedIn[OS]()),!F(a[fC])){var f=a[fC];B(f,function(e,t){u[e]=t})}gC(t[xS],u,d),F(n)||_C(u,n);var p=new Jh(e,c,l,r,u,d,s),m=new Qh(Jh[ES],p);return vC(e,Jh[DS],t,m)}function EC(e,t,n){yC(e,t);var r=t[dC],i=r[SS],a=r.uri||r.url,o=r[fC]||{},s=r.measurements||{};gC(t[xS],o,s),F(n)||_C(o,n);var c=new Zh(e,i,a,void 0,o,s,r),l=new Qh(Zh[ES],c);return vC(e,Zh[DS],t,l)}function DC(e,t,n){yC(e,t);var r=t[dC].message,i=t[dC].severityLevel,a=t[dC][fC]||{},o=t[dC].measurements||{};gC(t[xS],a,o),F(n)||_C(a,n);var s=new Xh(e,r,i,a,o),c=new Qh(Xh[ES],s);return vC(e,Xh[DS],t,c)}var OC=function(){function e(t,n){var r=[],i=!1,a=n.maxRetryCnt;this._get=function(){return r},this._set=function(e){return r=e,r},za(e,this,function(e){e[kS]=function(o){if(e.count()>=n.eventsLimitInMem){i||=(Y(t,2,105,`Maximum in-memory buffer size reached: `+e[AS](),!0),!0);return}o.cnt=o.cnt||0,!(!F(a)&&o.cnt>a)&&r[jS](o)},e[AS]=function(){return r[wS]},e.size=function(){for(var e=r[wS],t=0;t0){var t=[];return V(e,function(e){t[jS](e.item)}),n.emitLineDelimitedJson?t.join(` -`):`[`+t.join(`,`)+`]`}return null},e.createNew=function(e,n,i){var a=r.slice(0);e||=t,n||={};var o=i?new jC(e,n):new kC(e,n);return V(a,function(e){o[kS](e)}),o}})}return e.__ieDyn=1,e}(),kC=function(e){ea(t,e);function t(n,r){var i=e.call(this,n,r)||this;return za(t,i,function(e,t){e[PS]=function(e){t[NS]()},e[FS]=function(e){}}),i}return t.__ieDyn=1,t}(OC),AC=[`AI_buffer`,`AI_sentBuffer`],jC=function(e){ea(t,e);function t(n,r){var i=e.call(this,n,r)||this,a=!1,o=r?.namePrefix,s=r.bufferOverride||{getItem:Wm,setItem:Gm},c=s.getItem,l=s.setItem,u=r.maxRetryCnt;return za(t,i,function(e,r){var i=h(t[LS]),s=h(t[RS]),d=v(),f=s[zS](d),p=e._set(i[zS](f));p.length>t.MAX_BUFFER_SIZE&&(p[wS]=t[BS]),_(t[RS],[]),_(t[LS],p),e[kS]=function(i){if(e.count()>=t.MAX_BUFFER_SIZE){a||=(Y(n,2,67,`Maximum buffer size reached: `+e[AS](),!0),!0);return}i.cnt=i.cnt||0,!(!F(u)&&i.cnt>u)&&(r[kS](i),_(t[LS],e._get()))},e[NS]=function(){r[NS](),_(t[LS],e._get()),_(t[RS],[]),a=!1},e[PS]=function(r){_(t[LS],e._set(m(r,e._get())));var i=h(t[RS]);i instanceof Array&&r instanceof Array&&(i=i[zS](r),i.length>t.MAX_BUFFER_SIZE&&(Y(n,1,67,`Sent buffer reached its maximum size: `+i[wS],!0),i[wS]=t[BS]),_(t[RS],i))},e[FS]=function(e){var n=h(t[RS]);n=m(e,n),_(t[RS],n)},e.createNew=function(r,i,a){a=!!a;var o=e._get().slice(0),s=h(t[RS]).slice(0);r||=n,i||={},e[NS]();var c=a?new t(r,i):new kC(r,i);return V(o,function(e){c[kS](e)}),a&&c[PS](s),c};function m(e,t){var n=[],r=[];return V(e,function(e){r[jS](e.item)}),V(t,function(e){!L(e)&&Xr(r,e.item)===-1&&n[jS](e)}),n}function h(e){var t=e;return t=o?o+`_`+t:t,g(t)}function g(e){try{var t=c(n,e);if(t){var r=Wc().parse(t);if(I(r)&&(r=Wc().parse(r)),r&&R(r))return r}}catch(t){Y(n,1,42,` storage key: `+e+`, `+G(t),{exception:z(t)})}return[]}function _(e,t){var r=e;try{r=o?o+`_`+r:r;var i=JSON[TS](t);l(n,r,i)}catch(e){l(n,r,JSON[TS]([])),Y(n,2,41,` storage key: `+r+`, `+G(e)+`. Buffer cleared`,{exception:z(e)})}}function v(){var e=[];try{return V(AC,function(t){var n=y(t);if(e=e[zS](n),o){var r=y(o+`_`+t);e=e[zS](r)}}),e}catch(e){Y(n,2,41,`Transfer events from previous buffers: `+G(e)+`. previous Buffer items can not be removed`,{exception:z(e)})}return[]}function y(e){try{var t=g(e),r=[];return V(t,function(e){var t={item:e,cnt:0};r[jS](t)}),Km(n,e),r}catch{}return[]}}),i}var n=t;return t.VERSION=`_1`,t.BUFFER_KEY=`AI_buffer`+n.VERSION,t.SENT_BUFFER_KEY=`AI_sentBuffer`+n.VERSION,t.MAX_BUFFER_SIZE=2e3,t}(OC),MC=function(){function e(t){za(e,this,function(e){e.serialize=function(e){var r=n(e,`root`);try{return Wc()[TS](r)}catch(e){Y(t,1,48,e&&L(e.toString)?e[OS]():`Error serializing object`,null,!0)}};function n(e,a){var o=`__aiCircularRefCheck`,s={};if(!e)return Y(t,1,48,`cannot serialize object because it is null or undefined`,{name:a},!0),s;if(e[o])return Y(t,2,50,`Circular reference detected while serializing object`,{name:a},!0),s;if(!e.aiDataContract){if(a===`measurements`)s=i(e,`number`,a);else if(a===`properties`)s=i(e,`string`,a);else if(a===`tags`)s=i(e,`string`,a);else if(R(e))s=r(e,a);else{Y(t,2,49,`Attempting to serialize an object which does not implement ISerializable`,{name:a},!0);try{Wc()[TS](e),s=e}catch(e){Y(t,1,48,e&&L(e.toString)?e[OS]():`Error serializing object`,null,!0)}}return s}return e[o]=!0,B(e.aiDataContract,function(i,o){var c=L(o)?o()&1:o&1,l=L(o)?o()&4:o&4,u=o&2,d=e[i]!==void 0,f=Zt(e[i])&&e[i]!==null;if(c&&!d&&!u)Y(t,1,24,`Missing required field specification. The field is required but not present on source`,{field:i,name:a});else if(!l){var p=void 0;p=f?u?r(e[i],i):n(e[i],i):e[i],p!==void 0&&(s[i]=p)}}),delete e[o],s}function r(e,r){var i;if(e)if(!R(e))Y(t,1,54,`This field was specified as an array in the contract but the item is not an array.\r -`,{name:r},!0);else{i=[];for(var a=0;a100||e<0)&&(n.throwInternal(2,58,`Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.`,{samplingRate:e},!0),e=100),this[cC]=e,this.samplingScoreGenerator=new FC}return e.prototype.isSampledIn=function(e){var t=this[cC],n=!1;return t==null||t>=100||e.baseType===Wh.dataType?!0:(n=this.samplingScoreGenerator.getSamplingScore(e)0&&e<=100}var qC=(RC={},RC[$m.dataType]=SC,RC[Xh.dataType]=DC,RC[Jh.dataType]=TC,RC[Zh.dataType]=EC,RC[Ah.dataType]=CC,RC[Wh.dataType]=wC,RC[Yh.dataType]=xC,RC),JC=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=1001,n.identifier=gg;var r,i,a,o,s,c,l,u=0,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,k,A,te,j,M,ne,re,ie,ae;return za(t,n,function(e,oe){Re(),e.pause=function(){Ne(),a=!0},e.resume=function(){a&&(a=!1,i=null,Ce(),Me())},e.flush=function(t,n,r){if(t===void 0&&(t=!0),!a){Ne();try{var i=e[VS](t,null,r||1);return Ko(i,function(e){return n?(n(!e.rejected),!0):t?ws(function(t){t(!e.rejected)}):i})}catch(t){Y(e[HS](),1,22,`flush failed, telemetry will not be collected: `+G(t),{exception:z(t)})}}},e.onunloadFlush=function(){if(!a)if(_||k)try{return e[VS](!0,Ee,2)}catch(t){Y(e[HS](),1,20,`failed to flush with beacon sender on page unload, telemetry will not be collected: `+G(t),{exception:z(t)})}else e.flush(!1)},e.addHeader=function(e,t){l[e]=t},e[US]=function(t,a,o,u){e.isInitialized()&&Y(e[HS](),1,28,`Sender is already initialized`),oe[US](t,a,o,u);var se=e.identifier;s=new MC(a.logger),r=0,i=null,e[WS]=null,c=0;var ce=e[HS]();p=Zf(wl(`Sender`),a.evtNamespace&&a.evtNamespace()),f=mg(p),e._addHook(Zl(t,function(t){var r=t.cfg;r.storagePrefix&&Lm(r.storagePrefix);var i=Hd(null,r,a).getExtCfg(se,WC),o=i[GS];if(m&&o===m){var s=r[GS];s&&s!==o&&(i[GS]=s)}var c=Tr(`CompressionStream`);ae=uc(`zipPayload`,r,!1),L(c)||(ae=!1);var u=i.corsPolicy;u?(u===`same-origin`||u===`same-site`||u===`cross-origin`)&&n.addHeader(GC,u):delete l[GC],nn(i.instrumentationKey)&&(i[KS]=r[KS]),H(e,`_senderConfig`,{g:function(){return i}}),h!==i.endpointUrl&&(m=h=i[GS]),a.activeStatus()===Ha.PENDING?e.pause():a.activeStatus()===Ha.ACTIVE&&e.resume(),b&&b!==i.customHeaders&&V(b,function(e){delete l[e.header]}),g=i[JS],_=(i.onunloadDisableBeacon===!1||i.isBeaconApiDisabled===!1)&&Xc(),v=i.onunloadDisableBeacon===!1&&Xc(),y=i.isBeaconApiDisabled===!1&&Xc(),k=i[ZS],A=!!i.disableXhr,ie=i.retryCodes;var f=i[IS],p=!!i.enableSessionStorageBuffer&&(!!f||Um()),oe=i.namePrefix,le=p!==E||p&&O!==oe||p&&D!==f;if(e._buffer){if(le)try{e[$S]=e[$S].createNew(ce,i,p)}catch(t){Y(e[HS](),1,12,`failed to transfer telemetry to different buffer storage, telemetry will be lost: `+G(t),{exception:z(t)})}Ce()}else e[$S]=p?new jC(ce,i):new kC(ce,i);O=oe,E=p,D=f,te=!i.onunloadDisableFetch&&Zc(!0),ne=!!i[tC],e._sample=new IC(i.samplingPercentage,ce),S=i[KS],!nn(S)&&!Le(S,r)&&Y(ce,1,100,`Invalid Instrumentation key `+S),b=i[qS],I(m)&&!xm(m)&&b&&b.length>0?V(b,function(e){n.addHeader(e.header,e.value)}):b=null,ee=i.enableSendPromise;var ue=N();re?re.SetConfig(ue):(re=new Df,re[US](ue,ce));var de=i.httpXHROverride,fe=null,pe=null,me=mc([3,1,2],i.transports);fe=re&&re.getSenderInst(me,!1);var he=re&&re.getFallbackInst();j=function(e,t){return be(he,e,t)},M=function(e,t){return be(he,e,t,!1)},fe=k?de:fe||de||he,e[WS]=function(e,t){return be(fe,e,t)},te&&(d=ke);var ge=mc([3,1],i.unloadTransports);te||(ge=ge.filter(function(e){return e!==2})),pe=re&&re.getSenderInst(ge,!0),pe=k?de:pe||de,(k||i.unloadTransports||!d)&&pe&&(d=function(e,t){return be(pe,e,t)}),d||=j,x=i.disableTelemetry,C=i.convertUndefined||zC,w=i.isRetryDisabled,T=i.maxBatchInterval}))},e.processTelemetry=function(t,n){n=e._getTelCtx(n);var r=n[HS]();try{if(!pe(t,r))return;var i=me(t,r);if(!i)return;var a=s.serialize(i),o=e[$S];Ce(a);var c={item:a,cnt:0};o[kS](c),Me()}catch(e){Y(r,2,12,`Failed adding telemetry to the sender's buffer, some telemetry will be lost: `+G(e),{exception:z(e)})}e.processNext(t,n)},e.isCompletelyIdle=function(){return!a&&u===0&&e._buffer.count()===0},e.getOfflineListener=function(){return f},e._xhrReadyStateChange=function(e,t,n){if(!Oe(t))return ce(e,t,n)},e[VS]=function(t,n,r){t===void 0&&(t=!0);var i;if(!a)try{var o=e[$S];if(x)o[NS]();else{if(o.count()>0){var s=o.getItems();Ie(r||0,t),i=n?n.call(e,s,t):e[WS](s,t)}+new Date}Ne()}catch(t){var c=Yc();(!c||c>9)&&Y(e[HS](),1,40,`Telemetry transmission failed, some telemetry will be lost: `+G(t),{exception:z(t)})}return i},e.getOfflineSupport=function(){return{getUrl:function(){return m},createPayload:_e,serialize:he,batch:ge,shouldProcess:function(e){return!!pe(e)}}},e._doTeardown=function(t,n){e.onunloadFlush(),Ql(f,!1),Re()},e[nC]=function(e,t,n){if(!Oe(e))return le(e,t,n)},e[rC]=function(e,t){if(!Oe(e))return ue(e,t)},e[iC]=function(e,t){if(!Oe(e))return de(e,t)},e._xdrOnLoad=function(e,t){if(!Oe(t))return se(e,t)};function se(t,n){var i=HC(t);if(t&&(i+``==`200`||i===``))r=0,e[iC](n,0);else{var a=Cf(i);a&&a.itemsReceived&&a.itemsReceived>a.itemsAccepted&&!w?e[rC](n,a):e[nC](n,fc(t))}}function N(){try{return{enableSendPromise:ee,isOneDs:!1,disableCredentials:!1,disableXhr:A,disableBeacon:!y,disableBeaconSync:!v,senderOnCompleteCallBack:{xdrOnComplete:function(e,t,n){var r=fe(n);if(r)return se(e,r)},fetchOnComplete:function(e,t,n,r){var i=fe(r);if(i)return we(e.status,i,e.url,i[wS],e.statusText,n||``)},xhrOnComplete:function(e,t,n){var r=fe(n);if(r)return ce(e,r,r[wS])},beaconOnRetry:function(e,t,n){return De(e,t,n)}}}}catch{}return null}function ce(e,t,n){e.readyState===4&&we(e.status,t,e.responseURL,n,pc(e),HC(e)||e.response)}function le(t,n,r){Y(e[HS](),2,26,`Failed to send telemetry.`,{message:n}),e._buffer&&e._buffer.clearSent(t)}function ue(t,n){for(var r=[],i=[],a=n.errors.reverse(),o=0,s=a;o0&&e[iC](t,n[oC]),r.length>0&&e[nC](r,pc(null,[`partial success`,n[oC],`of`,n.itemsReceived].join(` `))),i.length>0&&(Ae(i),Y(e[HS](),2,40,`Partial success. Delivered: `+t[wS]+`, Failed: `+r[wS]+`. Will retry to send `+i[wS]+` our of `+n[aC]+` items`))}function de(t,n){e._buffer&&e._buffer.clearSent(t)}function fe(e){try{if(e){var t=e.oriPayload;return t&&t.length?t:null}}catch{}return null}function pe(t,n){if(x)return!1;if(!t)return n&&Y(n,1,7,`Cannot send empty telemetry`),!1;if(t.baseData&&!t.baseType)return n&&Y(n,1,70,`Cannot send telemetry without baseData and baseType`),!1;if(t.baseType||(t[sC]=`EventData`),!e._sender)return n&&Y(n,1,28,`Sender was not initialized`),!1;if(ve(t))t[bp]=e._sample[cC];else return n&&Y(n,2,33,`Telemetry item was sampled out and not sent`,{SampleRate:e._sample.sampleRate}),!1;return!0}function me(e,n){var r=e.iKey||S,i=t.constructEnvelope(e,r,n,C);if(!i){Y(n,1,47,`Unable to create an AppInsights envelope`);return}var a=!1;if(e.tags&&e.tags.ProcessLegacy&&(V(e[yS][xp],function(e){try{e&&e(i)===!1&&(a=!0,Du(n,`Telemetry processor check returns false`))}catch(e){Y(n,1,64,`One of telemetry initializers failed, telemetry item will not be sent: `+G(e),{exception:z(e)},!0)}}),delete e[yS][xp]),!a)return i}function he(t){var n=BC,r=e[HS]();try{var i=pe(t,r),a=null;i&&(a=me(t,r)),a&&(n=s.serialize(a))}catch{}return n}function ge(e){var t=BC;return e&&e.length&&(t=`[`+e.join(`,`)+`]`),t}function _e(e){var t=Se();return{urlString:m,data:e,headers:t}}function ve(t){return e._sample.isSampledIn(t)}function ye(t,n,r,i){n===200&&t?e._onSuccess(t,t[wS]):i&&e._onError(t,i)}function be(t,n,r,i){i===void 0&&(i=!0);var a=function(e,t,r){return ye(n,e,t,r)},o=xe(n),s=t&&t.sendPOST;if(s&&o){i&&e._buffer[PS](n);var c,l=!1,u,d;return re.preparePayload(function(e){c=s(e,a,!r),l=!0,u&&qo(c,u,d)},ae,o,!r),l?c:ws(function(e,t){u=e,d=t})}return null}function xe(t){if(R(t)&&t.length>0){var n=e[$S].batchPayloads(t),r=Se();return{data:n,urlString:m,headers:r,disableXhrSync:A,disableFetchKeepAlive:!te,oriPayload:t}}return null}function Se(){try{var e=l||{};return xm(m)&&(e[Ep[6]]=Ep[7]),e}catch{}return null}function Ce(t){var n=t?t[wS]:0;return e._buffer.size()+n>g?((!f||f.isOnline())&&e[VS](!0,null,10),!0):!1}function we(t,n,i,a,o,s){var c=null;if(e._appId||(c=Cf(s),c&&c.appId&&(e._appId=c.appId)),(t<200||t>=300)&&t!==0){if((t===301||t===307||t===308)&&!Te(i)){e[nC](n,o);return}if(f&&!f.isOnline()){w||(Ae(n,10),Y(e[HS](),2,40,`. Offline - Response Code: ${t}. Offline status: ${!f.isOnline()}. Will retry to send ${n.length} items.`));return}!w&&Pe(t)?(Ae(n),Y(e[HS](),2,40,`. Response code `+t+`. Will retry to send `+n[wS]+` items.`)):e[nC](n,o)}else Te(i),t===206?(c||=Cf(s),c&&!w?e[rC](n,c):e[nC](n,o)):(r=0,e[iC](n,a))}function Te(e){return c>=10?!1:!F(e)&&e!==``&&e!==m?(m=e,++c,!0):!1}function Ee(e,t){if(d)d(e,!1);else return be(re&&re.getSenderInst([3],!0),e,t)}function De(t,n,r){var i=t,a=i&&i.oriPayload;if(ne)M&&M(a,!0),Y(e[HS](),2,40,`. Failed to send telemetry with Beacon API, retried with normal sender.`);else{for(var o=[],s=0;s0&&(M&&M(o,!0),Y(e[HS](),2,40,`. Failed to send telemetry with Beacon API, retried with normal sender.`))}}function Oe(e){try{if(e&&e.length)return I(e[0])}catch{}return null}function ke(t,n){var r=null;if(R(t)){for(var i=t[wS],a=0;a-1}function Fe(){var t=`getNotifyMgr`,n,r=e.core;return r&&(n=r[t]?r[t]():r._notificationManager),n}function Ie(t,n){var r=Fe();if(r&&r.eventsSendRequest)try{r.eventsSendRequest(t,n)}catch(t){Y(e[HS](),1,74,`send request notification failed: `+G(t),{exception:z(t)})}}function Le(e,t){var n=t.disableInstrumentationKeyValidation;return!F(n)&&n?!0:RegExp(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`).test(e)}function Re(){e[WS]=null,e[$S]=null,e._appId=null,e._sample=null,l={},f=null,r=0,i=null,a=!1,o=null,s=null,c=0,u=0,d=null,p=null,m=null,h=null,g=0,_=!1,b=null,x=!1,S=null,C=zC,w=!1,E=null,O=zC,A=!1,te=!1,ne=!1,j=null,M=null,re=null,H(e,`_senderConfig`,{g:function(){return lc({},WC)}})}}),n}return t.constructEnvelope=function(e,t,n,r){var i=t!==e.iKey&&!F(t)?Qi(Qi({},e),{iKey:t}):e;return(qC[i.baseType]||SC)(n,i,r)},t}(ef),YC=`duration`,XC=`properties`,ZC=`requestUrl`,QC=`length`,$C=`traceID`,ew=`spanID`,tw=`traceFlags`,nw=`context`,rw=`aborted`,iw=`_addHook`,aw=`core`,ow=`includeCorrelationHeaders`,sw=`getAbsoluteUrl`,cw=`headers`,lw=`requestHeaders`,uw=`setRequestHeader`,dw=`trackDependencyDataInternal`,fw=`startTime`,pw=`toLowerCase`,mw=`enableRequestHeaderTracking`,hw=`enableAjaxErrorStatusText`,gw=`enableAjaxPerfTracking`,_w=`maxAjaxCallsPerView`,vw=`excludeRequestFromAutoTrackingPatterns`,yw=`disableAjaxTracking`,bw=`ajaxPerfLookupDelay`,xw=`disableFetchTracking`,Sw=`enableResponseHeaderTracking`,Cw=`status`,ww=`statusText`,Tw=`headerMap`,Ew=`requestSentTime`,Dw=`getTraceId`,Ow=`getTraceFlags`,kw=`method`,Aw=`errorStatusText`,jw=`stateChangeAttached`,Mw=`responseText`,Nw=`responseFinishedTime`,Pw=`CreateTrackItem`,Fw=`getAllResponseHeaders`,Iw=`getPartAProps`,Lw=`perfMark`,Rw=`perfTiming`,zw=`ajaxDiagnosticsMessage`,Bw=`correlationContext`,Vw=`ajaxTotalDuration`,Hw=`eventTraceCtx`;function Uw(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=Dm(i,a)),r}function Ww(e,t,n,r,i){var a=0,o=Uw(n,r,i);return o&&(a=Gw(e,t,Kh(o))),a}function Gw(e,t,n){var r=`ajaxPerf`,i=0;if(e&&t&&n){var a=e[r]=e[r]||{};a[t]=n,i=1}return i}function Kw(e,t){var n=e[Rw],r=t.properties||{},i=0,a=`name`,o=`Start`,s=`End`,c=`domainLookup`,l=`connect`,u=`redirect`,d=`request`,f=`response`,p=`startTime`,m=c+o,h=c+s,g=l+o,_=l+s,v=d+o,y=d+s,b=f+o,x=f+s,S=u+o,C=u=s,w=`transferSize`,T=`encodedBodySize`,E=`decodedBodySize`,D=`serverTiming`;if(n){i|=Ww(r,u,n,S,C),i|=Ww(r,c,n,m,h),i|=Ww(r,l,n,g,_),i|=Ww(r,d,n,v,y),i|=Ww(r,f,n,b,x),i|=Ww(r,`networkConnect`,n,p,_),i|=Ww(r,`sentRequest`,n,v,x);var O=n[YC];O||=Uw(n,p,x)||0,i|=Gw(r,YC,O),i|=Gw(r,`perfTotal`,O);var ee=n[D];if(ee){var k={};V(ee,function(e,t){var n=$s(e[a]||``+t),r=k[n]||{};B(e,function(e,t){(e!==a&&I(t)||$t(t))&&(r[e]&&(t=r[e]+`;`+t),(t||!I(t))&&(r[e]=t))}),k[n]=r}),i|=Gw(r,D,k)}i|=Gw(r,w,n[w]),i|=Gw(r,T,n[T]),i|=Gw(r,E,n[E])}else e.perfMark&&(i|=Gw(r,`missing`,e.perfAttempts));i&&(t[XC]=r)}var qw=function(){function e(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[jw]=!1}return e}(),Jw=function(){function e(t,n,r,i){var a=this,o=r,s=`responseText`;a[Lw]=null,a.completed=!1,a.requestHeadersSize=null,a[lw]=null,a.responseReceivingDuration=null,a.callbackDuration=null,a[Vw]=null,a[rw]=0,a.pageUrl=null,a[ZC]=null,a.requestSize=0,a[kw]=null,a[Cw]=null,a[Ew]=null,a.responseStartedTime=null,a[Nw]=null,a.callbackFinishedTime=null,a.endTime=null,a.xhrMonitoringState=new qw,a.clientFailure=0,a[$C]=t,a[ew]=n,a[tw]=i?.getTraceFlags(),i?a[Hw]={traceId:i[Dw](),spanId:i.getSpanId(),traceFlags:i[Ow]()}:a[Hw]=null,za(e,a,function(e){e.getAbsoluteUrl=function(){return e.requestUrl?hm(e[ZC]):null},e.getPathName=function(){return e.requestUrl?rm(o,gm(e[kw],e[ZC])):null},e[Pw]=function(t,n,r){var i;if(e.ajaxTotalDuration=Pi(Dm(e.requestSentTime,e.responseFinishedTime)*1e3)/1e3,e.ajaxTotalDuration<0)return null;var a=(i={id:`|`+e[$C]+`.`+e[ew],target:e[sw](),name:e.getPathName(),type:t,startTime:null,duration:e[Vw],success:+e.status>=200&&+e.status<400,responseCode:+e[Cw]},i[XC]={HttpMethod:e[kw]},i),o=a[XC];if(e.aborted&&(o[rw]=!0),e.requestSentTime&&(a[fw]=new Date,a[fw].setTime(e[Ew])),Kw(e,a),n&&Nn(e.requestHeaders).length>0&&(o[lw]=e[lw]),r){var c=r();if(c){var l=c[Bw];if(l&&(a.correlationContext=l),c.headerMap&&Nn(c.headerMap).length>0&&(o.responseHeaders=c[Tw]),e.errorStatusText)if(e.status>=400){var u=c.type;(u===``||u===`text`)&&(o.responseText=c.responseText?c[ww]+` - `+c[s]:c[ww]),u===`json`&&(o.responseText=c.response?c[ww]+` - `+JSON.stringify(c.response):c[ww])}else e.status===0&&(o.responseText=c.statusText||``)}}return a},e[Iw]=function(){var t=null,n=e[Hw];if(n&&(n.traceId||n.spanId)){t={};var r=t[ug.TraceExt]={traceID:n.traceId,parentID:n.spanId};F(n.traceFlags)||(r[tw]=n[tw])}return t}})}return e.__ieDyn=1,e}(),Yw,Xw=`diagLog`,Zw=`_ajaxData`,Qw=`fetch`,$w=`Failed to monitor XMLHttpRequest`,eT=`, monitoring data for this ajax call `,tT=eT+`may be incorrect.`,nT=eT+`won't be sent.`,rT=`Failed to get Request-Context correlation header as it may be not included in the response or not accessible.`,iT=`Failed to add custom defined request context as configured call back may missing a null check.`,aT=`Failed to calculate the duration of the `,oT=0;function sT(){var e=wr();return!e||F(e.Request)||F(e.Request.prototype)||F(e[Qw])?null:e[Qw]}function cT(e,t){var n,r=!1;if($c()){var i=XMLHttpRequest[ut];r=!F(i)&&!F(i.open)&&!F(i.send)&&!F(i.abort)}var a=Yc();if(a&&a<9&&(r=!1),r)try{var o=new XMLHttpRequest;o[Zw]={xh:[],i:(n={},n[t]={},n)};var s=XMLHttpRequest[ut].open;XMLHttpRequest[ut].open=s}catch(t){r=!1,pT(e,15,`Failed to enable XMLHttpRequest monitoring, extension is not supported`,{exception:z(t)})}return r}var lT=function(e,t){return e&&t&&e[Zw]?(e[Zw].i||{})[t]:null},uT=function(e,t,n){if(e){var r=(e[Zw]||{}).xh;r&&r.push({n:t,v:n})}},dT=function(e,t){var n=!1;if(e){var r=(e[Zw]||{}).xh;r&&V(r,function(e){if(e.n===t)return n=!0,-1})}return n};function fT(e,t){var n=``;try{var r=lT(e,t);r&&r.requestUrl&&(n+=`(url: '`+r[ZC]+`')`)}catch{}return n}function pT(e,t,n,r,i){Y(e[Xw](),1,t,n,r,i)}function mT(e,t,n,r,i){Y(e[Xw](),2,t,n,r,i)}function hT(e,t,n){return function(r){var i;pT(e,t,n,(i={},i[zw]=fT(r.inst,e._ajaxDataId),i.exception=z(r.err),i))}}function gT(e,t){return e&&t?Ri(e,t):-1}function _T(e,t,n){var r={id:t,fn:n};return e.push(r),{remove:function(){V(e,function(t,n){if(t.id===r.id)return e.splice(n,1),-1})}}}function vT(e,t,n,r){var i=!0;return V(t,function(t,a){try{t.fn.call(null,n)===!1&&(i=!1)}catch(t){Y(e&&e.logger,1,64,`Dependency `+r+` [#`+a+`] failed: `+G(t),{exception:z(t)},!0)}}),i}function yT(e,t,n,r,i,a){var o=e[QC],s=!0;if(o>0){var c={core:t,xhr:r,input:i,init:a,traceId:n[$C],spanId:n[ew],traceFlags:n[tw],context:n.context||{},aborted:!!n[rw]};s=vT(t,e,c,`listener`),n[$C]=c.traceId,n[ew]=c.spanId,n[tw]=c[tw],n[nw]=c[nw]}return s}var bT=`*.blob.core.`,xT=In([bT+`windows.net`,bT+`chinacloudapi.cn`,bT+`cloudapi.de`,bT+`usgovcloudapi.net`]),ST=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],CT=In((Yw={},Yw[_w]=500,Yw[yw]=!1,Yw[xw]=!1,Yw[vw]=void 0,Yw.disableCorrelationHeaders=!1,Yw.distributedTracingMode=1,Yw.correlationHeaderExcludedDomains=xT,Yw.correlationHeaderDomains=void 0,Yw.correlationHeaderExcludePatterns=void 0,Yw.appId=void 0,Yw.enableCorsCorrelation=!1,Yw[mw]=!1,Yw[Sw]=!1,Yw[hw]=!1,Yw[gw]=!1,Yw.maxAjaxPerfLookupAttempts=3,Yw[bw]=25,Yw.ignoreHeaders=[`Authorization`,`X-API-Key`,`WWW-Authenticate`],Yw.addRequestContext=void 0,Yw.addIntEndpoints=!0,Yw)),wT=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.identifier=t.identifier,n.priority=120;var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,k,A,te;return za(t,n,function(e,n){var j=n[iw];M(),e.initialize=function(t,r,i,a){e.isInitialized()||(n.initialize(t,r,i,a),S=Zf(wl(`ajax`),r&&r.evtNamespace&&r.evtNamespace()),ne(t),se(),ae(),re())},e._doTeardown=function(){M()},e.trackDependencyData=function(t,n){xe(E,e[aw],null,t,n)},e.resetAjaxAttempts=function(){l=0},e[ow]=function(t,n,r,i){var c=e._currentWindowHost||a;if(yT(T,e.core,t,i,n,r)){if(n||n===``){if(Sm(o,t.getAbsoluteUrl(),c)){r||={};var l=new Headers(r.headers||n instanceof Request&&n.headers||{});if(f){var p=`|`+t[$C]+`.`+t[ew];l.set(Ep[3],p),s&&(t[lw][Ep[3]]=p)}var m=A||u&&u.appId();if(m&&(l.set(Ep[0],Ep[2]+m),s&&(t[lw][Ep[0]]=Ep[2]+m)),d){var h=t[tw];F(h)&&(h=1);var g=kd(Ed(t[$C],t[ew],h));l.set(Ep[4],g),s&&(t[lw][Ep[4]]=g)}r[cw]=l}}else if(i&&Sm(o,t.getAbsoluteUrl(),c)){if(f)if(dT(i,Ep[3]))mT(e,71,`Unable to set [`+Ep[3]+`] as it has already been set by another instance`);else{var p=`|`+t[$C]+`.`+t[ew];i[uw](Ep[3],p),s&&(t[lw][Ep[3]]=p)}var m=A||u&&u.appId();if(m&&(dT(i,Ep[0])?mT(e,71,`Unable to set [`+Ep[0]+`] as it has already been set by another instance`):(i[uw](Ep[0],Ep[2]+m),s&&(t[lw][Ep[0]]=Ep[2]+m))),d){var h=t[tw];if(F(h)&&(h=1),dT(i,Ep[4]))mT(e,71,`Unable to set [`+Ep[4]+`] as it has already been set by another instance`);else{var g=kd(Ed(t[$C],t[ew],h));i[uw](Ep[4],g),s&&(t[lw][Ep[4]]=g)}}}}return i||r},e[dw]=function(t,n,r){if(h===-1||l=0;p--){var m=f[p];if(m){if(m.entryType===`resource`)m.initiatorType===e&&(gT(m.name,c)!==-1||gT(c,m.name)!==-1)&&(d=m);else if(m.entryType===`mark`&&m.name===i.name){t[Rw]=d;break}if(m.startTime=o||t.async===!1?(i&&L(a.clearMarks)&&a.clearMarks(i.name),t.perfAttempts=l,n()):Yi(u,s)}catch(e){r(e)}})()}function _e(t,n){var r=le(),i=new Jw(r&&r.getTraceId()||yd(),Zn(yd(),0,16),e[Xw](),e.core?.getTraceCtx());i[tw]=r&&r.getTraceFlags(),i[Ew]=Em(),i[Aw]=c;var a=t instanceof Request?(t||{}).url||``:t;if(a===``){var o=Vc();o&&o.href&&(a=ki(o.href,`#`)[0])}e.core&&e.core.config&&(a=al(a,e[aw].config)),i[ZC]=a;var l=`GET`;n&&n.method?l=n[kw]:t&&t instanceof Request&&(l=t[kw]),i[kw]=l;var u={};return s&&new Headers((n?n.headers:0)||t instanceof Request&&t.headers||{}).forEach(function(e,t){ie(t)&&(u[t]=e)}),i[lw]=u,he(Qw,i),i}function ve(t){var n=``;try{F(t)||(typeof t==`string`?n+=`(url: '${t}')`:n+=`(url: '${t.url}')`)}catch(t){pT(e,15,`Failed to grab failed fetch diagnostics message`,{exception:z(t)})}return n}function ye(t,n,r,i,a,o,c){if(!a)return;function l(t,n,i){var a=i||{};a.fetchDiagnosticsMessage=ve(r),n&&(a.exception=z(n)),mT(e,t,aT+`fetch call`+nT,a)}a[Nw]=Em(),a[Cw]=n,ge(Qw,a,function(){var t=a[Pw](`Fetch`,s,o),c;try{x&&(c=x({status:n,request:r,response:i}))}catch{mT(e,104,iT)}if(t){c!==void 0&&(t[XC]=Qi(Qi({},t.properties),c));var u=a[Iw]();xe(E,e[aw],a,t,null,u)}else l(14,null,{requestSentTime:a[Ew],responseFinishedTime:a[Nw]})},function(e){l(18,e,null)})}function be(t){if(t&&t.headers)try{return Cm(t[cw].get(Ep[0]))}catch(n){mT(e,18,rT,{fetchDiagnosticsMessage:ve(t),exception:z(n)})}}function xe(t,n,r,i,a,o){var s=!0;t.length>0&&(s=vT(n,t,{item:i,properties:a,sysProperties:o,context:r?r[nw]:null,aborted:r?!!r[rw]:!1},`initializer`)),s&&e[dw](i,a,o)}}),n}return t.prototype.processTelemetry=function(e,t){this.processNext(e,t)},t.prototype.addDependencyInitializer=function(e){return null},t.identifier=`AjaxDependencyPlugin`,t}(ef),TT=function(){function e(){}return e}(),ET=function(){function e(){this.id=`browser`,this.deviceClass=`Browser`}return e}(),DT=`3.3.11`,OT=function(){function e(e,t){var n=this,r=Zl(e,function(){var t=e.sdkExtension;n.sdkVersion=(t?t+`_`:``)+`javascript:`+DT});t&&t.add(r)}return e}(),kT=function(){function e(){}return e}(),AT=`session`,jT=`sessionManager`,MT=`isUserCookieSet`,NT=`isNewUser`,PT=`getTraceCtx`,FT=`telemetryTrace`,IT=`applySessionContext`,LT=`applyApplicationContext`,RT=`applyOperationContext`,zT=`applyOperatingSystemContxt`,BT=`applyLocationContext`,VT=`applyInternalContext`,HT=`getSessionId`,UT=`sessionCookiePostfix`,WT=`automaticSession`,GT=`accountId`,KT=`authenticatedId`,qT=`acquisitionDate`,JT=`renewalDate`,YT=`cookieSeparator`,XT=`authUserCookieName`,ZT=`ai_session`,QT=864e5,$T=18e5,eE=6e4,tE=function(){function e(){}return e}(),nE=function(){function e(t,n,r){var i=this,a,o,s=wu(n),c=Zu(n),l,u;za(e,i,function(e){t||={};var n=Zl(t,function(e){l=t.sessionExpirationMs||QT,u=t.sessionRenewalMs||$T,a=ZT+(t.sessionCookiePostfix||t.namePrefix||``)});r&&r.add(n),e[WT]=new tE,e.update=function(){var t=rr(),n=!1,r=e[WT];if(r.id||(n=!i(r,t)),!n&&l>0){var a=t-r[qT],s=t-r[JT];n=a<0||s<0,n||=a>l,n||=s>u}n?f(t):(!o||t-o>eE)&&p(r,t)},e.backup=function(){var t=e[WT];m(t.id,t[qT],t[JT])};function i(e,t){var n=!1,r=c.get(a);if(r&&L(r.split))n=d(e,r);else{var i=Bm(s,a);i&&(n=d(e,i))}return n||!!e.id}function d(e,t){var n=!1,r=`, session will be reset`,i=t.split(`|`);if(i.length>=2)try{var a=+i[1]||0,o=+i[2]||0;isNaN(a)||a<=0?Y(s,2,27,`AI session acquisition date is 0`+r):isNaN(o)||o<=0?Y(s,2,27,`AI session renewal date is 0`+r):i[0]&&(e.id=i[0],e[qT]=a,e[JT]=o,n=!0)}catch(e){Y(s,1,9,`Error parsing ai_session value [`+(t||``)+`]`+r+` - `+G(e),{exception:z(e)})}return n}function f(n){var r=t.getNewId||vl;e[WT].id=r(t.idLength||22),e[WT][qT]=n,p(e[WT],n),zm()||Y(s,2,0,`Browser does not support local storage. Session durations will be inaccurate.`)}function p(e,n){var r=e[qT];e[JT]=n;var i=u,s=r+l-n,d=[e.id,r,n],f=0;f=s0?f:null,p),o=n}function m(e,t,n){Vm(s,a,[e,t,n].join(`|`))}})}return e.__ieDyn=1,e}(),rE=function(){function e(e,t,n,r,i){var a=this;a.traceID=e||yd(),a.parentID=t;var o=Vc();!n&&o&&o.pathname&&(n=o.pathname,i&&(n=al(n,i))),a.name=nm(r,n)}return e}();function iE(e){return!(typeof e!=`string`||!e||e.match(/,|;|=| |\|/))}var aE=function(){function e(t,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=wu(n),a=Zu(n),o;za(e,this,function(n){H(n,`config`,{g:function(){return t}});var s=Zl(t,function(){var r=t.userCookiePostfix||``;o=e.userCookieName+r;var s=a.get(o);if(s){n[NT]=!1;var d=s.split(e[YT]);d.length>0&&(n.id=d[0],n[MT]=!!n.id)}n.id||(n.id=c(),u(l(n.id).join(e[YT])),Hm(i,(t.namePrefix||``)+`ai_session`)),n[GT]=t.accountId||void 0;var f=a.get(e[XT]);if(f){f=decodeURI(f);var p=f.split(e[YT]);p[0]&&(n[KT]=p[0]),p.length>1&&p[1]&&(n[GT]=p[1])}});r&&r.add(s);function c(){var e=t||{};return(e.getNewId||vl)(e.idLength?t.idLength:22)}function l(e){var t=tc(new Date);return n.accountAcquisitionDate=t,n[NT]=!0,[e,t]}function u(e){n[MT]=a.set(o,e,31536e3)}n.setAuthenticatedUserContext=function(t,r,o){if(o===void 0&&(o=!1),!iE(t)||r&&!iE(r)){Y(i,2,60,`Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.`,!0);return}n[KT]=t;var s=n[KT];r&&(n[GT]=r,s=[n[KT],n.accountId].join(e[YT])),o&&a.set(e[XT],encodeURI(s))},n.clearAuthenticatedUserContext=function(){n[KT]=null,n[GT]=null,a.del(e[XT])},n.update=function(t){(n.id!==t||!n.isUserCookieSet)&&u(l(t||c()).join(e[YT]))}})}return e.cookieSeparator=`|`,e.userCookieName=`ai_user`,e.authUserCookieName=`ai_authUser`,e}(),oE=`ext`,sE=`tags`;function cE(e,t){e&&e[t]&&Nn(e[t]).length===0&&delete e[t]}function lE(){return null}var uE=function(){function e(t,n,r,i){var a=this,o=t.logger;za(e,this,function(e){if(e.appId=lE,e[HT]=lE,e.application=new TT,e.internal=new OT(n,i),Or()){e[jT]=new nE(n,t,i),e.device=new ET,e.location=new kT,e.user=new aE(n,t,i);var s=void 0,c=void 0,l;r&&(s=r.getTraceId(),c=r.getSpanId(),l=r.getName()),e[FT]=new rE(s,c,l,o),e[AT]=new tE}e[HT]=function(){var t=e[AT],n=null;if(t&&I(t.id))n=t.id;else{var r=(e.sessionManager||{})[WT];n=r&&I(r.id)?r.id:null}return n},e[IT]=function(t,n){K(nc(t.ext,ug.AppExt),`sesId`,e[HT](),I)},e[zT]=function(t,n){K(t.ext,ug.OSExt,e.os)},e[LT]=function(t,n){var r=e.application;if(r){var i=nc(t,sE);K(i,dg.applicationVersion,r.ver,I),K(i,dg.applicationBuild,r.build,I)}},e.applyDeviceContext=function(t,n){var r=e.device;if(r){var i=nc(nc(t,oE),ug.DeviceExt);K(i,`localId`,r.id,I),K(i,`ip`,r.ip,I),K(i,`model`,r.model,I),K(i,`deviceClass`,r.deviceClass,I)}},e[VT]=function(t,n){var r=e.internal;if(r){var i=nc(t,sE);K(i,dg.internalAgentVersion,r.agentVersion,I),K(i,dg.internalSdkVersion,nm(o,r.sdkVersion,64),I),(t.baseType===Cu.dataType||t.baseType===Jh.dataType)&&(K(i,dg.internalSnippet,r.snippetVer,I),K(i,dg.internalSdkSrc,r.sdkSrc,I))}},e[BT]=function(e,t){var n=a.location;n&&K(nc(e,sE,[]),dg.locationIp,n.ip,I)},e[RT]=function(t,n){var r=e[FT];if(r){var i=nc(nc(t,oE),ug.TraceExt,{traceID:void 0,parentID:void 0});K(i,`traceID`,r.traceID,I,F),K(i,`name`,r.name,I,F),K(i,`parentID`,r.parentID,I,F)}},e.applyWebContext=function(e,t){var n=a.web;n&&K(nc(e,oE),ug.WebExt,n)},e.applyUserContext=function(t,n){var r=e.user;if(r){K(nc(t,sE,[]),dg.userAccountId,r[GT],I);var i=nc(nc(t,oE),ug.UserExt);K(i,`id`,r.id,I),K(i,`authId`,r[KT],I)}},e.cleanUp=function(e,t){var n=e.ext;n&&(cE(n,ug.DeviceExt),cE(n,ug.UserExt),cE(n,ug.WebExt),cE(n,ug.OSExt),cE(n,ug.AppExt),cE(n,ug.TraceExt))}})}return e.__ieDyn=1,e}(),dE,fE,pE=null,mE=Fn((dE={accountId:pE,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:pE,sdkExtension:pE,isBrowserLinkTrackingEnabled:!1,appId:pE},dE[HT]=pE,dE.namePrefix=fE,dE[UT]=fE,dE.userCookiePostfix=fE,dE.idLength=22,dE.getNewId=pE,dE)),hE=function(e){ea(t,e);function t(){var n=e.call(this)||this;n.priority=110,n.identifier=hg;var r,i,a,o,s;return za(t,n,function(e,t){n(),H(e,`context`,{g:function(){return o}}),e.initialize=function(e,n,r,i){t.initialize(e,n,r,i),c(e)},e.processTelemetry=function(t,n){if(!F(t)){n=e._getTelCtx(n),t.name===Jh.envelopeType&&n.diagLog().resetInternalMessageCount();var r=o||{};r.session&&typeof o.session.id!=`string`&&r.sessionManager&&r[jT].update();var i=r.user;if(i&&!i.isUserCookieSet&&i.update(r.user.id),l(t,n),i&&i.isNewUser&&(i[NT]=!1,!s)){var a=new Cu(72,(jr()||{}).userAgent||``);Ou(n.diagLog(),1,a)}e.processNext(t,n)}},e._doTeardown=function(e,t){var r=(e||{}).core();r&&r.getTraceCtx&&r.getTraceCtx(!1)===i&&r.setTraceCtx(a),n()};function n(){r=null,i=null,a=null,o=null,s=!0}function c(t){var n=e.identifier,c=e.core;e._addHook(Zl(t,function(){var i=Hd(null,t,c);t.storagePrefix&&Lm(t.storagePrefix),s=t.disableUserInitMessage!==!1,r=i.getExtCfg(n,mE),e._extConfig=r})),a=c[PT](!1),o=new uE(c,r,a,e._unloadHooks),i=Om(e.context[FT],a),c.setTraceCtx(i),e.context.appId=function(){var e=c.getPlugin(gg);return e?e.plugin._appId:null}}function l(t,n){nc(t,`tags`,[]),nc(t,`ext`,{});var r=e.context;r[IT](t,n),r[LT](t,n),r.applyDeviceContext(t,n),r[RT](t,n),r.applyUserContext(t,n),r[zT](t,n),r.applyWebContext(t,n),r[BT](t,n),r[VT](t,n),r.cleanUp(t,n)}}),n}return t.__ieDyn=1,t}(ef),gE=`AuthenticatedUserContext`,_E=`track`,vE=`snippet`,yE=`getCookieMgr`,bE=`startTrackPage`,xE=`stopTrackPage`,SE=`flush`,CE=`startTrackEvent`,wE=`stopTrackEvent`,TE=`addTelemetryInitializer`;TE+``;var EE=`pollInternalLogs`,DE=`getPlugin`,OE=`evtNamespace`,kE=_E+`Event`,AE=_E+`Trace`,jE=_E+`Metric`,ME=_E+`PageView`,NE=_E+`Exception`,PE=_E+`DependencyData`,FE=`set`+gE,IE=`clear`+gE,LE=`https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json`,RE=`connectionString`,zE=`version`,BE=`queue`,VE=`instrumentationKey`,HE=`userOverrideEndpointUrl`,UE=`endpointUrl`,WE=`onunloadFlush`,GE=`context`,KE=`addHousekeepingBeforeUnload`,qE=`sendMessage`,JE=`updateSnippetDefinitions`,YE,XE,ZE,QE,$E,eD=[vE,`dependencies`,`properties`,`_snippetVersion`,`appInsightsNew`,`getSKUDefaults`],tD=`iKeyUsage`,nD=`CdnUsage`,rD=`SdkLoaderVer`,iD=`zipPayload`,aD=void 0,oD={disabled:!0,limit:nu({samplingRate:100,maxSendNumber:1}),interval:nu({monthInterval:3,daysOfMonth:[28]})},sD=(YE={},YE[RE]=aD,YE.endpointUrl=aD,YE[VE]=aD,YE[HE]=aD,YE.diagnosticLogInterval=iu(cD,1e4),YE.featureOptIn=(XE={},XE[tD]={mode:3},XE[nD]={mode:2},XE[rD]={mode:2},XE[iD]={mode:1},XE),YE.throttleMgrCfg=nu((ZE={},ZE[109]=nu(oD),ZE[106]=nu(oD),ZE[111]=nu(oD),ZE[110]=nu(oD),ZE)),YE.extensionConfig=nu((QE={},QE.AppInsightsCfgSyncPlugin=nu({cfgUrl:LE,syncMode:2}),QE)),YE);function cD(e){return e&&e>0}function lD(e,t){return xs(function(n,r){Ko(t,function(t){var r=t&&t.value,i=null;!t.rejected&&r&&(e[RE]=r,i=Zm(r)),n(i)})})}var uD=function(){function e(t){var n=this,r,i,a,o,s,c,l,u,d,f,p,m,h,g;za(e,this,function(e){y(),H(e,`config`,{g:function(){return u}}),V([`pluginVersionStringArr`,`pluginVersionString`],function(t){H(e,t,{g:function(){return l?l[t]:null}})}),o=``+(t.sv||t.version||``),t[BE]=t.queue||[],t[zE]=t.version||2;var _=Xl(t.config||{},sD);u=_.cfg,d=new eS,H(e,`appInsights`,{g:function(){return d}}),i=new hE,r=new wT,a=new JC,l=new Sf,H(e,`core`,{g:function(){return l}}),x(Zl(_,function(){var e=u[RE];if(nn(e)){var t=xs(function(t,n){Ko(lD(u,e),function(e){if(e.rejected)t(null);else{var n=u[VE],r=e.value;n=r&&r.instrumentationkey||n,t(n)}})}),n=u[HE];F(n)&&(n=xs(function(t,n){Ko(lD(u,e),function(e){if(e.rejected)t(null);else{var n=u[UE],r=e.value,i=r&&r.ingestionendpoint;n=i?i+wp:n,t(n)}})})),u[VE]=t,u[UE]=n}if(I(e)&&e){var r=Zm(e),i=r.ingestionendpoint;u.endpointUrl=u.userOverrideEndpointUrl?u[HE]:i+wp,u[VE]=r.instrumentationkey||u.instrumentationKey}u.endpointUrl=u.userOverrideEndpointUrl?u[HE]:u[UE]})),e[vE]=t,e[SE]=function(e,t){e===void 0&&(e=!0);var n;return _d(l,function(){return`AISKU.flush`},function(){e&&!t&&(n=ws(function(e){t=e}));var r=1,i=function(){r--,r===0&&t()};V(l.getChannels(),function(t){t&&(r++,t[SE](e,i))}),i()},null,e),n},e[WE]=function(e){e===void 0&&(e=!0),V(l.getChannels(),function(t){t.onunloadFlush?t[WE]():t[SE](e)})},e.loadAppInsights=function(t,n,s){t===void 0&&(t=!1),t&&si(`Legacy Mode is no longer supported`);function c(t){if(t){var n=``;F(o)||(n+=o),e.context&&e.context.internal&&(e[GE].internal.snippetVer=n||`-`),B(e,function(e,n){I(e)&&!L(n)&&e&&e[0]!==`_`&&Xr(eD,e)===-1&&t[e]!==n&&(t[e]=n)})}}return _d(e.core,function(){return`AISKU.loadAppInsights`},function(){l.initialize(u,[a,i,r,d,f],n,s),H(e,`context`,{g:function(){return i[GE]}}),p||=new Jm(l);var t=dD();t&&e.context&&(e[GE].internal.sdkSrc=t),c(e[vE]),e.emptyQueue(),e[EE](),e[KE](e),x(Zl(_,function(){var t=!1;u.throttleMgrCfg[109]&&(t=!u.throttleMgrCfg[109].disabled),!p.isReady()&&u.extensionConfig&&u.extensionConfig[f.identifier]&&t&&p.onReadyState(!0),!m&&!u.connectionString&&uc(tD,u,!0)&&(p[qE](106,`See Instrumentation key support at aka.ms/IkeyMigrate`),m=!0),!h&&e.context.internal.sdkSrc&&e.context.internal.sdkSrc.indexOf(`az416426`)!=-1&&uc(nD,u,!0)&&(p[qE](110,`See Cdn support notice at aka.ms/JsActiveCdn`),h=!0),!g&&parseInt(o)<6&&uc(rD,u,!0)&&(p[qE](111,`An updated Sdk Loader is available, see aka.ms/SnippetVer`),g=!0)}))}),e},e[JE]=function(t){ic(t,e,function(e){return e&&Xr(eD,e)===-1})},e.emptyQueue=function(){try{if(R(e.snippet.queue)){for(var t=e.snippet[BE].length,n=0;n{this.setState({hasError:!1,error:void 0,errorInfo:void 0})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,Z.jsx)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-gray-50`,children:(0,Z.jsxs)(`div`,{className:`text-center max-w-md p-8 bg-white rounded-lg shadow-lg`,children:[(0,Z.jsx)(`div`,{className:`text-6xl mb-4`,children:`⚠️`}),(0,Z.jsx)(`h1`,{className:`text-2xl font-bold text-red-600 mb-4`,children:`Something went wrong`}),(0,Z.jsx)(`p`,{className:`text-gray-600 mb-6`,children:this.state.error?hD(this.state.error):`An unexpected error occurred.`}),!1,(0,Z.jsxs)(`div`,{className:`flex gap-3 justify-center`,children:[(0,Z.jsx)(`button`,{onClick:this.handleReset,className:`px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors`,children:`Try Again`}),(0,Z.jsx)(`button`,{onClick:()=>window.location.reload(),className:`px-6 py-3 bg-sky-500 text-white rounded-lg hover:bg-sky-600 transition-colors`,children:`Reload Page`})]})]})}):this.props.children}};(0,h_.createRoot)(document.getElementById(`root`)).render((0,Z.jsx)(P.StrictMode,{children:(0,Z.jsx)(bg.Provider,{value:fD,children:(0,Z.jsx)(gD,{children:(0,Z.jsxs)(d,{client:Gb,children:[(0,Z.jsx)(tt,{router:Wb}),(0,Z.jsx)(xe,{position:`top-right`,toastOptions:{duration:3e3,style:{background:`#fff`,color:`#374151`,border:`1px solid #E5E7EB`,padding:`12px 16px`,borderRadius:`8px`,boxShadow:`0 4px 12px rgba(0, 0, 0, 0.1)`},success:{iconTheme:{primary:`#10B981`,secondary:`#fff`}},error:{iconTheme:{primary:`#EF4444`,secondary:`#fff`}}}})]})})})}));export{wv as t}; \ No newline at end of file diff --git a/services/api/src/ServiceHub.Api/wwwroot/assets/page-correlation-ByerC9Nt.js b/services/api/src/ServiceHub.Api/wwwroot/assets/page-correlation-ByerC9Nt.js deleted file mode 100644 index 223b8e5..0000000 --- a/services/api/src/ServiceHub.Api/wwwroot/assets/page-correlation-ByerC9Nt.js +++ /dev/null @@ -1,188 +0,0 @@ -import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=r()})),a=t(i(),1),o=`modulepreload`,s=function(e){return`/`+e},c={},l=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=l(t.map(t=>{if(t=s(t,n),t in c)return;c[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let l=document.createElement(`link`);if(l.rel=r?`stylesheet`:o,r||(l.as=`script`),l.crossOrigin=``,l.href=t,a&&l.setAttribute(`nonce`,a),document.head.appendChild(l),r)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},u=e=>{throw TypeError(e)},d=(e,t,n)=>t.has(e)||u(`Cannot `+n),f=(e,t,n)=>(d(e,t,`read from private field`),n?n.call(e):t.get(e)),p=(e,t,n)=>t.has(e)?u(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),m=`popstate`;function h(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return b(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:x(t)}return C(t,n,null,e)}function g(e,t){if(e===!1||e==null)throw Error(t)}function _(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function v(){return Math.random().toString(36).substring(2,10)}function y(e,t){return{usr:e.state,key:e.key,idx:t}}function b(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?S(t):t,state:n,key:t&&t.key||r||v()}}function x({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function S(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function C(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:g.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(g.location,e,t);n&&n(r,e),l=u()+1;let d=y(r,l),f=g.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:g.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(g.location,e,t);n&&n(r,e),l=u();let i=y(r,l),d=g.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:g.location,delta:0})}function h(e){return w(e)}let g={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(m,d),c=e,()=>{i.removeEventListener(m,d),c=null}},createHref(e){return t(i,e)},createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return g}function w(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),g(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:x(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function T(e){return{defaultValue:e}}var E,ee=class{constructor(e){if(p(this,E,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(f(this,E).has(e))return f(this,E).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){f(this,E).set(e,t)}};E=new WeakMap;var D=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function O(e){return D.has(e)}var k=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function A(e){return k.has(e)}function j(e){return e.index===!0}function M(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(g(e.index!==!0||!e.children,`Cannot specify children on an index route`),g(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),j(e)){let n={...e,id:s};return r[s]=N(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=N(n,t(n)),e.children&&(n.children=M(e.children,t,o,r,i)),n}})}function N(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function te(e,t,n=`/`){return P(e,t,n,!1)}function P(e,t,n,r){let i=L((typeof t==`string`?S(t):t).pathname||`/`,n);if(i==null)return null;let a=re(e);ae(a);let o=null;for(let e=0;o==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;g(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Te([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(g(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),re(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:fe(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ie(e.path))a(e,t,!0,n)}),t}function ie(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ie(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ae(e){e.sort((e,t)=>e.score===t.score?pe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var oe=/^:[\w-]+$/,se=3,F=2,ce=1,le=10,ue=-2,de=e=>e===`*`;function fe(e,t){let n=e.split(`/`),r=n.length;return n.some(de)&&(r+=ue),t&&(r+=F),n.filter(e=>!de(e)).reduce((e,t)=>e+(oe.test(t)?se:t===``?ce:le),r)}function pe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function me(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function he(e,t=!1,n=!0){_(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ge(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return _(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function L(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function _e({basename:e,pathname:t}){return t===`/`?e:Te([e,t])}var ve=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ye=e=>ve.test(e);function be(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?S(e):e,a;if(n)if(ye(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),_(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${n}`)}a=n.startsWith(`/`)?R(n.substring(1),`/`):R(n,t)}else a=t;return{pathname:a,search:De(r),hash:Oe(i)}}function R(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function xe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Se(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ce(e){let t=Se(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function we(e,t,n,r=!1){let i;typeof e==`string`?i=S(e):(i={...e},g(!i.pathname||!i.pathname.includes(`?`),xe(`?`,`pathname`,`search`,i)),g(!i.pathname||!i.pathname.includes(`#`),xe(`#`,`pathname`,`hash`,i)),g(!i.search||!i.search.includes(`#`),xe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=be(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Te=e=>e.join(`/`).replace(/\/\/+/g,`/`),Ee=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),De=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Oe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ke=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ae(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function je(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Me=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ne(e,t){let n=e;if(typeof n!=`string`||!ve.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Me)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=L(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{_(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var z=Symbol(`Uninstrumented`);function Pe(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Ie(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Ie(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[z]??i,a=Ie(n[e],t,(...e)=>Re(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[z]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[z]??e,r=Ie(n.middleware,t,(...e)=>Re(e[0]));return r?(r[z]=t,r):e})),r}function Fe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[z]??e.navigate,r=Ie(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?x(n):`.`,...ze(e,r??{})}});r&&(r[z]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[z]??e.fetch,r=Ie(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...ze(e,i??{})}});r&&(r[z]=t,e.fetch=r)}return e}function Ie(e,t,n){return e.length===0?null:async(...r)=>{let i=await Le(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Le(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Le(e,t,n,r-1),a=await o,g(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Re(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:Be(t),params:{...r},unstable_pattern:i,context:Ve(n)}}function ze(e,t){return{currentUrl:x(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Be(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ve(e){if(Ue(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var He=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ue(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===He}var We=[`POST`,`PUT`,`PATCH`,`DELETE`],Ge=new Set(We),Ke=[`GET`,...We],qe=new Set(Ke),Je=new Set([301,302,303,307,308]),Ye=new Set([307,308]),Xe={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ze={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qe={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},$e=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),et=`remix-router-transitions`,tt=Symbol(`ResetLoaderData`);function nt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;g(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||$e,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...Pe(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=M(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||yt,d={...e.future},f=null,p=new Set,m=null,h=null,v=null,y=e.hydrationData!=null,x=te(s,e.history.location,l),S=!1,C=null,T;if(x==null&&!e.patchRoutesOnNavigation){let t=Vt(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Bt(s);T=!0,x=n,C={[r.id]:t}}else if(x&&!e.hydrationData&&mt(x,s,e.history.location.pathname).active&&(x=null),!x){T=!1,x=[];let t=mt(null,s,e.history.location.pathname);t.active&&t.matches&&(S=!0,x=t.matches)}else if(x.some(e=>e.route.lazy))T=!1;else if(!x.some(e=>st(e.route)))T=!0;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=x.findIndex(e=>n[e.route.id]!==void 0);T=x.slice(0,e+1).every(e=>!ct(e.route,t,n))}else T=x.every(e=>!ct(e.route,t,n))}let E,D={historyAction:e.history.action,location:e.history.location,matches:x,initialized:T,navigation:Xe,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},O=`POP`,k=null,A=!1,j,N=!1,re=new Map,ie=null,ae=!1,oe=!1,se=new Set,F=new Map,ce=0,le=-1,ue=new Map,de=new Set,fe=new Map,pe=new Map,me=new Set,I=new Map,he,ge=null;function _e(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(he){he(),he=void 0;return}_(I.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=nt({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{he=e});e.history.go(r*-1),tt(i,{state:`blocked`,location:n,proceed(){tt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,Qe),R({blockers:e})}}),k?.resolve(),k=null;return}return we(t,n)}),n){un(t,re);let e=()=>dn(t,re);t.addEventListener(`pagehide`,e),ie=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||we(`POP`,D.location,{initialHydration:!0}),E}function ve(){f&&f(),ie&&ie(),p.clear(),j&&j.abort(),D.fetchers.forEach((e,t)=>He(t)),D.blockers.forEach((e,t)=>et(t))}function be(e){return p.add(e),()=>p.delete(e)}function R(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(me.has(t)?n.push(t):r.push(t))}),me.forEach(e=>{!D.fetchers.has(e)&&!F.has(e)&&n.push(e)}),[...p].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>He(e)),r.forEach(e=>D.fetchers.delete(e))}function xe(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&V(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?Lt(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,l=D.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,Qe)));let u=ae?!1:pt(t,n.matches||D.matches),d=A===!0||D.navigation.formMethod!=null&&V(D.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),ae||O===`POP`||(O===`PUSH`?e.history.push(t,t.state):O===`REPLACE`&&e.history.replace(t,t.state));let f;if(O===`POP`){let e=re.get(D.location.pathname);e&&e.has(t.pathname)?f={currentLocation:D.location,nextLocation:t}:re.has(t.pathname)&&(f={currentLocation:t,nextLocation:D.location})}else if(N){let e=re.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(D.location.pathname,e)),f={currentLocation:D.location,nextLocation:t}}R({...n,actionData:a,loaderData:o,historyAction:O,location:t,initialized:!0,navigation:Xe,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),O=`POP`,A=!1,N=!1,ae=!1,oe=!1,k?.resolve(),k=null,ge?.resolve(),ge=null}async function Se(t,n){if(k?.resolve(),k=null,typeof t==`number`){k||=fn();let n=k.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=at(!1,it(D.location,D.matches,l,t,n?.fromRouteId,n?.relative),n),o=D.location,s=b(D.location,r,n&&n.state);s={...s,...e.history.encodeLocation(s)};let c=n&&n.replace!=null?n.replace:void 0,u=`PUSH`;c===!0?u=`REPLACE`:c===!1||i!=null&&V(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(u=`REPLACE`);let d=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,f=(n&&n.flushSync)===!0,p=nt({currentLocation:o,nextLocation:s,historyAction:u});if(p){tt(p,{state:`blocked`,location:s,proceed(){tt(p,{state:`proceeding`,proceed:void 0,reset:void 0,location:s}),Se(t,n)},reset(){let e=new Map(D.blockers);e.set(p,Qe),R({blockers:e})}});return}await we(u,s,{submission:i,pendingError:a,preventScrollReset:d,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:f,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function Ce(){ge||=fn(),Le(),R({revalidation:`loading`});let e=ge.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(we(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),e):(we(O||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:N===!0}),e)}async function we(t,n,r){j&&j.abort(),j=null,O=t,ae=(r&&r.startUninterruptedRevalidation)===!0,dt(D.location,D.matches),A=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&D.matches&&D.matches.length>0&&!S?D.matches:te(i,n,l),u=(r&&r.flushSync)===!0;if(o&&D.initialized&&!oe&&Wt(D.location,n)&&!(r&&r.submission&&V(r.submission.formMethod))){xe(n,{matches:o},{flushSync:u});return}let d=mt(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=rt(n.pathname);xe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}j=new AbortController;let f=Mt(e.history,n,j.signal,r&&r.submission),p=e.getContext?await e.getContext():new ee,m;if(r&&r.pendingError)m=[zt(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&V(r.submission.formMethod)){let t=await Te(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(B(r)&&Ae(r.error)&&r.error.status===404){j=null,xe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=an(n,r.submission),u=!1,d.active=!1,f=Mt(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await Ee(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m,r&&r.callSiteDefaultShouldRevalidate);h||(j=null,xe(n,{matches:g||o,...Rt(m),loaderData:_,errors:v}))}async function Te(t,n,i,c,u,d,f,p={}){if(Le(),R({navigation:on(n,i)},{flushSync:p.flushSync===!0}),d){let e=await ht(c,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Bt(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=zt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=rt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=nn(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:Vt(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await z(t,Tt(a,o,t,c,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of c)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Yt(m)){let n;return n=p&&p.replace!=null?p.replace:jt(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===D.location.pathname+D.location.search,await Ne(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(B(m)){let e=zt(c,h.route.id);return(p&&p.replace)!==!0&&(O=`PUSH`),{matches:c,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:c,pendingActionResult:[h.route.id,m]}}async function Ee(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||an(n,p),x=p||m||rn(b),S=!ae&&!g;if(d){if(S){let e=De(v);R({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ht(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Bt(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=zt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=rt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=c||s,{dsMatches:w,revalidatingFetchers:T}=ot(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,oe,se,me,fe,de,C,l,e.patchRoutesOnNavigation!=null,v,y);if(le=++ce,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=Ke();return xe(n,{matches:i,loaderData:{},errors:v&&B(v[1])?{[v[0]]:v[1].error}:null,...Rt(v),...e?{fetchers:new Map(D.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=De(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Oe(T)),R(e,{flushSync:_})}T.forEach(e=>{We(e.key),e.controller&&F.set(e.key,e.controller)});let E=()=>T.forEach(e=>We(e.key));j&&j.signal.addEventListener(`abort`,E);let{loaderResults:ee,fetcherResults:O}=await Ie(w,T,t,u);if(t.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener(`abort`,E),T.forEach(e=>F.delete(e.key));let k=Ht(ee);if(k)return await Ne(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=Ht(O),k)return de.add(k.key),await Ne(t,k.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:A,errors:M}=It(D,i,ee,v,T,O);g&&D.errors&&(M={...D.errors,...M});let N=Ke(),te=qe(le),P=N||te||T.length>0;return{matches:i,loaderData:A,errors:M,...P?{fetchers:new Map(D.fetchers)}:{}}}function De(e){if(e&&!B(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function Oe(e){return e.forEach(e=>{let t=D.fetchers.get(e.key),n=sn(void 0,t?t.data:void 0);D.fetchers.set(e.key,n)}),new Map(D.fetchers)}async function ke(t,n,r,i){We(t);let a=(i&&i.flushSync)===!0,o=c||s,u=it(D.location,D.matches,l,r,n,i?.relative),d=te(o,u,l),f=mt(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){ze(t,n,Vt(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=at(!0,u,i);if(h){ze(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new ee,_=(i&&i.preventScrollReset)===!0;if(m&&V(m.formMethod)){await je(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}fe.set(t,{routeId:n,path:p}),await Me(t,n,p,d,g,f.active,a,_,m)}async function je(t,n,i,u,d,f,p,m,h,_){Le(),fe.delete(t),Re(t,cn(h,D.fetchers.get(t)),{flushSync:p});let v=new AbortController,y=Mt(e.history,i,v.signal,h);if(f){let e=await ht(u,new URL(y.url).pathname,y.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{ze(t,n,Vt(404,{pathname:i}),{flushSync:p});return}}let b=nn(u,i);if(!b.route.action&&!b.route.lazy){ze(t,n,Vt(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}F.set(t,v);let x=ce,S=Tt(a,o,y,u,b,r,d),C=await z(y,S,d,t),w=C[b.route.id];if(!w){for(let e of S)if(C[e.route.id]){w=C[e.route.id];break}}if(y.signal.aborted){F.get(t)===v&&F.delete(t);return}if(me.has(t)){if(Yt(w)||B(w)){Re(t,ln(void 0));return}}else{if(Yt(w))if(F.delete(t),le>x){Re(t,ln(void 0));return}else return de.add(t),Re(t,sn(h)),Ne(y,w,!1,{fetcherSubmission:h,preventScrollReset:m});if(B(w)){ze(t,n,w.error);return}}let T=D.navigation.location||D.location,E=Mt(e.history,T,v.signal),ee=c||s,k=D.navigation.state===`idle`?D.matches:te(ee,D.navigation.location,l);g(k,`Didn't find any matches after fetcher action`);let A=++ce;ue.set(t,A);let M=sn(h,w.data);D.fetchers.set(t,M);let{dsMatches:N,revalidatingFetchers:P}=ot(E,d,a,o,e.history,D,k,h,T,r,!1,oe,se,me,fe,de,ee,l,e.patchRoutesOnNavigation!=null,[b.route.id,w],_);P.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=D.fetchers.get(t),r=sn(void 0,n?n.data:void 0);D.fetchers.set(t,r),We(t),e.controller&&F.set(t,e.controller)}),R({fetchers:new Map(D.fetchers)});let ne=()=>P.forEach(e=>We(e.key));v.signal.addEventListener(`abort`,ne);let{loaderResults:re,fetcherResults:ie}=await Ie(N,P,E,d);if(v.signal.aborted)return;if(v.signal.removeEventListener(`abort`,ne),ue.delete(t),F.delete(t),P.forEach(e=>F.delete(e.key)),D.fetchers.has(t)){let e=ln(w.data);D.fetchers.set(t,e)}let ae=Ht(re);if(ae)return Ne(E,ae.result,!1,{preventScrollReset:m});if(ae=Ht(ie),ae)return de.add(ae.key),Ne(E,ae.result,!1,{preventScrollReset:m});let{loaderData:pe,errors:I}=It(D,k,re,void 0,P,ie);qe(A),D.navigation.state===`loading`&&A>le?(g(O,`Expected pending action`),j&&j.abort(),xe(D.navigation.location,{matches:k,loaderData:pe,errors:I,fetchers:new Map(D.fetchers)})):(R({errors:I,loaderData:Lt(D.loaderData,pe,k,I),fetchers:new Map(D.fetchers)}),oe=!1)}async function Me(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);Re(t,sn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Mt(e.history,i,m.signal);if(l){let e=await ht(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{ze(t,n,Vt(404,{pathname:i}),{flushSync:u});return}}let g=nn(s,i);F.set(t,m);let _=ce,v=(await z(h,Tt(a,o,h,s,g,r,c),c,t))[g.route.id];if(F.get(t)===m&&F.delete(t),!h.signal.aborted){if(me.has(t)){Re(t,ln(void 0));return}if(Yt(v))if(le>_){Re(t,ln(void 0));return}else{de.add(t),await Ne(h,v,!1,{preventScrollReset:d});return}if(B(v)){ze(t,n,v.error);return}Re(t,ln(v.data))}}async function Ne(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(k?.resolve(),k=null),i.response.headers.has(`X-Remix-Revalidate`)&&(oe=!0);let d=i.response.headers.get(`Location`);g(d,`Expected a Location header on the redirect Response`),d=jt(d,new URL(r.url),l,e.history);let f=b(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(ye(d)){let n=w(d,!0);e=n.origin!==t.location.origin||L(n.pathname,l)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}j=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:_}=D.navigation;!o&&!s&&m&&h&&_&&(o=rn(D.navigation));let v=o||s;Ye.has(i.response.status)&&v&&V(v.formMethod)?await we(p,f,{submission:{...v,formAction:d},preventScrollReset:c||A,enableViewTransition:a?N:void 0}):await we(p,f,{overrideNavigation:an(f,o),fetcherSubmission:s,preventScrollReset:c||A,enableViewTransition:a?N:void 0})}async function z(e,t,n,r){let i,a={};try{i=await Et(u,e,t,r,n,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{a[t.route.id]={type:`error`,error:e}}),a}if(e.signal.aborted)return a;if(!V(e.method))for(let e of t){if(i[e.route.id]?.type===`error`)break;!i.hasOwnProperty(e.route.id)&&!D.loaderData.hasOwnProperty(e.route.id)&&(!D.errors||!D.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(i[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(i))if(Jt(r)){let i=r.result;a[n]={type:`redirect`,response:At(i,e,n,t,l)}}else a[n]=await kt(r);return a}async function Ie(e,t,n,r){let i=z(n,e,r,null),a=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await z(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:Vt(404,{pathname:e.path})}})}));return{loaderResults:await i,fetcherResults:(await a).reduce((e,t)=>Object.assign(e,t),{})}}function Le(){oe=!0,fe.forEach((e,t)=>{F.has(t)&&se.add(t),We(t)})}function Re(e,t,n={}){D.fetchers.set(e,t),R({fetchers:new Map(D.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function ze(e,t,n,r={}){let i=zt(D.matches,t);He(e),R({errors:{[i.route.id]:n},fetchers:new Map(D.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Be(e){return pe.set(e,(pe.get(e)||0)+1),me.has(e)&&me.delete(e),D.fetchers.get(e)||Ze}function Ve(e,t){We(e,t?.reason),Re(e,ln(null))}function He(e){let t=D.fetchers.get(e);F.has(e)&&!(t&&t.state===`loading`&&ue.has(e))&&We(e),fe.delete(e),ue.delete(e),de.delete(e),me.delete(e),se.delete(e),D.fetchers.delete(e)}function Ue(e){let t=(pe.get(e)||0)-1;t<=0?(pe.delete(e),me.add(e)):pe.set(e,t),R({fetchers:new Map(D.fetchers)})}function We(e,t){let n=F.get(e);n&&(n.abort(t),F.delete(e))}function Ge(e){for(let t of e){let e=ln(Be(t).data);D.fetchers.set(t,e)}}function Ke(){let e=[],t=!1;for(let n of de){let r=D.fetchers.get(n);g(r,`Expected fetcher: ${n}`),r.state===`loading`&&(de.delete(n),e.push(n),t=!0)}return Ge(e),t}function qe(e){let t=[];for(let[n,r]of ue)if(r0}function Je(e,t){let n=D.blockers.get(e)||Qe;return I.get(e)!==t&&I.set(e,t),n}function et(e){D.blockers.delete(e),I.delete(e)}function tt(e,t){let n=D.blockers.get(e)||Qe;g(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(D.blockers);r.set(e,t),R({blockers:r})}function nt({currentLocation:e,nextLocation:t,historyAction:n}){if(I.size===0)return;I.size>1&&_(!1,`A router only supports one blocker at a time`);let r=Array.from(I.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function rt(e){let t=Vt(404,{pathname:e}),{matches:n,route:r}=Bt(c||s);return{notFoundMatches:n,route:r,error:t}}function lt(e,t,n){if(m=e,v=t,h=n||null,!y&&D.navigation===Xe){y=!0;let e=pt(D.location,D.matches);e!=null&&R({restoreScrollPosition:e})}return()=>{m=null,v=null,h=null}}function ut(e,t){return h&&h(e,t.map(e=>ne(e,D.loaderData)))||e.key}function dt(e,t){if(m&&v){let n=ut(e,t);m[n]=v()}}function pt(e,t){if(m){let n=ut(e,t),r=m[n];if(typeof r==`number`)return r}return null}function mt(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:P(n,r,l,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:P(n,r,l,!0)}}return{active:!1,matches:null}}async function ht(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||ft(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=te(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=P(d,n,l,!0),!(m&&u.lengthe.route.id===t[n].route.id)}function _t(e){o={},c=M(e,a,void 0,o)}function vt(e,t,n=!1){let r=c==null;ft(e,t,c||s,o,a,n),r&&(s=[...s],R({}))}return E={get basename(){return l},get future(){return d},get state(){return D},get routes(){return s},get window(){return t},initialize:_e,subscribe:be,enableScrollRestoration:lt,navigate:Se,fetch:ke,revalidate:Ce,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Be,resetFetcher:Ve,deleteFetcher:Ue,dispose:ve,getBlocker:Je,deleteBlocker:et,patchRoutes:vt,_internalFetchControllers:F,_internalSetRoutes:_t,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){R(e)}},e.unstable_instrumentations&&(E=Fe(E,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),E}function rt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function it(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=we(r||`.`,Ce(o),L(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=tn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=_e({basename:n,pathname:c.pathname})),x(c)}function at(e,t,n){if(!n||!rt(n))return{path:t};if(n.formMethod&&!en(n.formMethod))return{path:t,error:Vt(405,{method:n.formMethod})};let r=()=>({path:t,error:Vt(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Ut(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!V(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n} -`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!V(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}g(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Nt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Nt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Pt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Pt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(V(c.formMethod))return{path:t,submission:c};let l=S(t);return e&&l.search&&tn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:x(l),submission:c}}function ot(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?B(y[1])?y[1].error:y[1].data:void 0,S=i.createURL(a.location),C=i.createURL(c),w;if(u&&a.errors){let e=Object.keys(a.errors)[0];w=o.findIndex(t=>t.route.id===e)}else if(y&&B(y[1])){let e=y[0];w=o.findIndex(t=>t.route.id===e)-1}let T=y?y[1].statusCode:void 0,E=T&&T>=400,ee={currentUrl:S,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:o[0].params,...s,actionResult:x,actionStatus:T},D=je(o),O=o.map((i,o)=>{let{route:s}=i,c=null;if(w!=null&&o>w?c=!1:s.lazy?c=!0:st(s)?u?c=ct(s,a.loaderData,a.errors):lt(a.loaderData,a.matches[o],i)&&(c=!0):c=!1,c!==null)return wt(n,r,e,D,i,l,t,c);let f=!1;typeof b==`boolean`?f=b:E?f=!1:d||S.pathname+S.search===C.pathname+C.search?f=!0:S.search===C.search?ut(a.matches[o],i)&&(f=!0):f=!0;let p={...ee,defaultShouldRevalidate:f};return wt(n,r,e,D,i,l,t,dt(i,p),p,b)}),k=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=te(g,e.path,_);if(!y){if(v&&m)return;k.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let x=nn(y,e.path),S=new AbortController,C=Mt(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=Tt(n,r,C,y,x,l,t);else if(m)d&&(w=Tt(n,r,C,y,x,l,t));else{let e;e=typeof b==`boolean`?b:E?!1:d;let i={...ee,defaultShouldRevalidate:e};dt(x,i)&&(w=Tt(n,r,C,y,x,l,t,i))}w&&k.push({key:s,routeId:e.routeId,path:e.path,matches:w,match:x,request:C,controller:S})}),{dsMatches:O,revalidatingFetchers:k}}function st(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ct(e,t,n){if(e.lazy)return!0;if(!st(e))return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function lt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function ut(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function dt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function ft(e,t,n,r,i,a){let o;if(e){let t=r[e];g(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>pt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=M(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;et.children?.some(t=>pt(e,t))):!1}var mt=new WeakMap,ht=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(g(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=mt.get(i);o||(o={},mt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=O(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)_(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)_(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},gt=new WeakMap;function _t(e,t,n,r,i){let a=n[e.id];if(g(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=gt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{g(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=A(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?_(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?_(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return gt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=ht({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function vt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function yt(e){return e.matches.some(e=>e.route.middleware)?bt(e,()=>vt(e)):vt(e)}function bt(e,t){return xt(e,t,e=>{if($t(e))throw e;return e},Kt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=zt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function xt(e,t,n,r,i){let{matches:a,request:o,params:s,context:c,unstable_pattern:l}=e,u=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await St({request:o,params:s,context:c,unstable_pattern:l},u,t,n,r,i)}async function St(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await St(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Ct(e,t,n,r,i){let a=ht({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=_t(r.route,V(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function wt(e,t,n,r,i,a,o,s,c=null,l){let u=!1,d=Ct(e,t,n,i,a);return{...i,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler(e){return u=!0,c?typeof l==`boolean`?dt(i,{...c,defaultShouldRevalidate:l}):typeof e==`boolean`?dt(i,{...c,defaultShouldRevalidate:e}):dt(i,c):s},resolve(e){let{lazy:t,loader:a,middleware:c}=i.route,l=u||s||e&&!V(n.method)&&(t||a),f=c&&c.length>0&&!a&&!t;return l&&(V(n.method)||!f)?Dt({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:`data`,result:void 0})}}}function Tt(e,t,n,r,i,a,o,s=null){return r.map(c=>c.route.id===i.route.id?wt(e,t,n,je(r),c,a,o,!0,s):{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ct(e,t,n,c,a),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Et(e,t,n,r,i,a){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let o={request:t,unstable_pattern:je(n),params:n[0].params,context:i,matches:n},s=a?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=o;return bt(t,()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...o,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return c}async function Dt({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:o}){let s,c,l=V(e.method),u=l?`action`:`loader`,d=r=>{let i,s=new Promise((e,t)=>i=t);c=()=>i(),e.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:e,unstable_pattern:t,params:n.params,context:o},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)),d=(async()=>{try{return{type:`data`,result:await(a?a(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([d,s])};try{let t=l?n.route.action:n.route.loader;if(r||i)if(t){let e,[n]=await Promise.all([d(t).catch(t=>{e=t}),r,i]);if(e!==void 0)throw e;s=n}else{await r;let t=l?n.route.action:n.route.loader;if(t)[s]=await Promise.all([d(t),i]);else if(u===`action`){let t=new URL(e.url),r=t.pathname+t.search;throw Vt(405,{method:e.method,pathname:r,routeId:n.route.id})}else return{type:`data`,result:void 0}}else if(t)s=await d(t);else{let t=new URL(e.url);throw Vt(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{c&&e.signal.removeEventListener(`abort`,c)}return s}async function Ot(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function kt(e){let{result:t,type:n}=e;if(Zt(t)){let e;try{e=await Ot(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new ke(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Xt(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Gt(t),statusCode:Ae(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ae(t)?t.status:void 0}:Xt(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function At(e,t,n,r,i){let a=e.headers.get(`Location`);if(g(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!ye(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=it(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}function jt(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(ye(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=L(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Mt(e,t,n,r){let i=e.createURL(Ut(t)).toString(),a={signal:n};if(r&&V(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Nt(r.formData):a.body=r.formData}return new Request(i,a)}function Nt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Pt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ft(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&B(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(g(!Yt(f),`Cannot handle redirect results in processLoaderData`),B(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=zt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=tt),c||(c=!0,s=Ae(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function It(e,t,n,r,i,a){let{loaderData:o,errors:s}=Ft(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(g(o,`Did not find corresponding fetcher result`),B(o)){let t=zt(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(Yt(o))g(!1,`Unhandled fetcher revalidation redirect`);else{let t=ln(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function Lt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==tt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Rt(e){return e?B(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function zt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Bt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Vt(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new ke(e||500,o,Error(s),!0)}function Ht(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Yt(r))return{key:n,result:r}}}function Ut(e){return x({...typeof e==`string`?S(e):e,hash:``})}function Wt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Gt(e){return new ke(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Kt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&qt(t))}function qt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Jt(e){return Zt(e.result)&&Je.has(e.result.status)}function B(e){return e.type===`error`}function Yt(e){return(e&&e.type)===`redirect`}function Xt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Zt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Qt(e){return Je.has(e)}function $t(e){return Zt(e)&&Qt(e.status)&&e.headers.has(`Location`)}function en(e){return qe.has(e.toUpperCase())}function V(e){return Ge.has(e.toUpperCase())}function tn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function nn(e,t){let n=typeof t==`string`?S(t).search:t.search;if(e[e.length-1].route.index&&tn(n||``))return e[e.length-1];let r=Se(e);return r[r.length-1]}function rn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function an(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function on(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function sn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function cn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ln(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function un(e,t){try{let n=e.sessionStorage.getItem(et);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function dn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(et,JSON.stringify(n))}catch(e){_(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function fn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var pn=a.createContext(null);pn.displayName=`DataRouter`;var mn=a.createContext(null);mn.displayName=`DataRouterState`;var hn=a.createContext(!1);function gn(){return a.useContext(hn)}var _n=a.createContext({isTransitioning:!1});_n.displayName=`ViewTransition`;var vn=a.createContext(new Map);vn.displayName=`Fetchers`;var yn=a.createContext(null);yn.displayName=`Await`;var H=a.createContext(null);H.displayName=`Navigation`;var bn=a.createContext(null);bn.displayName=`Location`;var xn=a.createContext({outlet:null,matches:[],isDataRoute:!1});xn.displayName=`Route`;var Sn=a.createContext(null);Sn.displayName=`RouteError`;var Cn=`REACT_ROUTER_ERROR`,wn=`REDIRECT`,Tn=`ROUTE_ERROR_RESPONSE`;function En(e){if(e.startsWith(`${Cn}:${wn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Dn(e){if(e.startsWith(`${Cn}:${Tn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ke(t.status,t.statusText,t.data)}catch{}}function On(e,{relative:t}={}){g(kn(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=a.useContext(H),{hash:i,pathname:o,search:s}=Ln(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:Te([n,o])),r.createHref({pathname:c,search:s,hash:i})}function kn(){return a.useContext(bn)!=null}function An(){return g(kn(),`useLocation() may be used only in the context of a component.`),a.useContext(bn).location}var jn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Mn(e){a.useContext(H).static||a.useLayoutEffect(e)}function Nn(){let{isDataRoute:e}=a.useContext(xn);return e?tr():Pn()}function Pn(){g(kn(),`useNavigate() may be used only in the context of a component.`);let e=a.useContext(pn),{basename:t,navigator:n}=a.useContext(H),{matches:r}=a.useContext(xn),{pathname:i}=An(),o=JSON.stringify(Ce(r)),s=a.useRef(!1);return Mn(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(_(s.current,jn),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=we(r,JSON.parse(o),i,a.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Te([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,o,i,e])}var Fn=a.createContext(null);function In(e){let t=a.useContext(xn).outlet;return a.useMemo(()=>t&&a.createElement(Fn.Provider,{value:e},t),[t,e])}function Ln(e,{relative:t}={}){let{matches:n}=a.useContext(xn),{pathname:r}=An(),i=JSON.stringify(Ce(n));return a.useMemo(()=>we(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Rn(e,t,n,r,i){g(kn(),`useRoutes() may be used only in the context of a component.`);let{navigator:o}=a.useContext(H),{matches:s}=a.useContext(xn),c=s[s.length-1],l=c?c.params:{},u=c?c.pathname:`/`,d=c?c.pathnameBase:`/`,f=c&&c.route;{let e=f&&f.path||``;rr(u,!f||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let p=An(),m;if(t){let e=typeof t==`string`?S(t):t;g(d===`/`||e.pathname?.startsWith(d),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=p;let h=m.pathname||`/`,v=h;if(d!==`/`){let e=d.replace(/^\//,``).split(`/`);v=`/`+h.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let y=te(e,{pathname:v});_(f||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),_(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let b=Gn(y&&y.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Te([d,o.encodeLocation?o.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?d:Te([d,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),s,n,r,i);return t&&b?a.createElement(bn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...m},navigationType:`POP`}},b):b}function zn(){let e=er(),t=Ae(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},o={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=a.createElement(a.Fragment,null,a.createElement(`p`,null,`💿 Hey developer 👋`),a.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,a.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,a.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),a.createElement(a.Fragment,null,a.createElement(`h2`,null,`Unexpected Application Error!`),a.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?a.createElement(`pre`,{style:i},n):null,s)}var Bn=a.createElement(zn,null),Vn=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Dn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:a.createElement(xn.Provider,{value:this.props.routeContext},a.createElement(Sn.Provider,{value:e,children:this.props.component}));return this.context?a.createElement(Un,{error:e},t):t}};Vn.contextType=hn;var Hn=new WeakMap;function Un({children:e,error:t}){let{basename:n}=a.useContext(H);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=En(t.digest);if(e){let r=Hn.get(t);if(r)throw r;let i=Ne(e.location,n);if(Me&&!Hn.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Hn.set(t,n),n}return a.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Wn({routeContext:e,match:t,children:n}){let r=a.useContext(pn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(xn.Provider,{value:e},n)}function Gn(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let e=o.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);g(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(`,`)}`),o=o.slice(0,Math.min(o.length,e+1))}let c=!1,l=-1;if(n)for(let e=0;e=0?o.slice(0,l+1):[o[0]];break}}}let u=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:je(n.matches),errorInfo:t})}:void 0;return o.reduceRight((e,r,i)=>{let d,f=!1,p=null,m=null;n&&(d=s&&r.route.id?s[r.route.id]:void 0,p=r.route.errorElement||Bn,c&&(l<0&&i===0?(rr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):l===i&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,i+1)),g=()=>{let t;return t=d?p:f?m:r.route.Component?a.createElement(r.route.Component,null):r.route.element?r.route.element:e,a.createElement(Wn,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?a.createElement(Vn,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Kn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qn(e){let t=a.useContext(pn);return g(t,Kn(e)),t}function Jn(e){let t=a.useContext(mn);return g(t,Kn(e)),t}function Yn(e){let t=a.useContext(xn);return g(t,Kn(e)),t}function Xn(e){let t=Yn(e),n=t.matches[t.matches.length-1];return g(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Zn(){return Xn(`useRouteId`)}function Qn(){return Jn(`useNavigation`).navigation}function $n(){let{matches:e,loaderData:t}=Jn(`useMatches`);return a.useMemo(()=>e.map(e=>ne(e,t)),[e,t])}function er(){let e=a.useContext(Sn),t=Jn(`useRouteError`),n=Xn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function tr(){let{router:e}=qn(`useNavigate`),t=Xn(`useNavigate`),n=a.useRef(!1);return Mn(()=>{n.current=!0}),a.useCallback(async(r,i={})=>{_(n.current,jn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var nr={};function rr(e,t,n){!t&&!nr[e]&&(nr[e]=!0,_(!1,n))}var ir={};function ar(e,t){!e&&!ir[t]&&(ir[t]=!0,console.warn(t))}var or=a.useOptimistic,sr=()=>void 0;function cr(e){return or?or(e):[e,sr]}function lr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&_(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&_(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&_(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ur=[`HydrateFallback`,`hydrateFallbackElement`],dr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function fr({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=gn()||r;let[i,o]=a.useState(e.state),[s,c]=cr(i),[l,u]=a.useState(),[d,f]=a.useState({isTransitioning:!1}),[p,m]=a.useState(),[h,g]=a.useState(),[_,v]=a.useState(),y=a.useRef(new Map),b=a.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:je(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),ar(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ar(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&d?t(()=>o(i)):r===!1?o(i):a.startTransition(()=>{r===!0&&c(e=>pr(e,i)),o(i)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);a.useLayoutEffect(()=>e.subscribe(b),[e,b]),a.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new dr)},[d]),a.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?o(t):a.startTransition(()=>{r===!0&&c(e=>pr(e,t)),o(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),a.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),a.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=a.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=a.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return a.createElement(a.Fragment,null,a.createElement(pn.Provider,{value:C},a.createElement(mn.Provider,{value:s},a.createElement(vn.Provider,{value:y.current},a.createElement(_n.Provider,{value:d},a.createElement(vr,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,unstable_useTransitions:r},a.createElement(mr,{routes:e.routes,future:e.future,state:s,onError:n})))))),null)}function pr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var mr=a.memo(hr);function hr({routes:e,future:t,state:n,onError:r}){return Rn(e,void 0,n,r,t)}function gr({to:e,replace:t,state:n,relative:r}){g(kn(),` may be used only in the context of a component.`);let{static:i}=a.useContext(H);_(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:o}=a.useContext(xn),{pathname:s}=An(),c=Nn(),l=we(e,Ce(o),s,r===`path`),u=JSON.stringify(l);return a.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function _r(e){return In(e.context)}function vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:o=!1,unstable_useTransitions:s}){g(!kn(),`You cannot render a inside another . You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=a.useMemo(()=>({basename:c,navigator:i,static:o,unstable_useTransitions:s,future:{}}),[c,i,o,s]);typeof n==`string`&&(n=S(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=n,h=a.useMemo(()=>{let e=L(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:r}},[c,u,d,f,p,m,r]);return _(h!=null,` is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the won't render anything.`),h==null?null:a.createElement(H.Provider,{value:l},a.createElement(bn.Provider,{children:t,value:h}))}a.Component;var yr=`get`,br=`application/x-www-form-urlencoded`;function xr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Sr(e){return xr(e)&&e.tagName.toLowerCase()===`button`}function Cr(e){return xr(e)&&e.tagName.toLowerCase()===`form`}function wr(e){return xr(e)&&e.tagName.toLowerCase()===`input`}function Tr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Er(e,t){return e.button===0&&(!t||t===`_self`)&&!Tr(e)}function Dr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Or(e,t){let n=Dr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var kr=null;function Ar(){if(kr===null)try{new FormData(document.createElement(`form`),0),kr=!1}catch{kr=!0}return kr}var jr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Mr(e){return e!=null&&!jr.has(e)?(_(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${br}"`),null):e}function Nr(e,t){let n,r,i,a,o;if(Cr(e)){let o=e.getAttribute(`action`);r=o?L(o,t):null,n=e.getAttribute(`method`)||yr,i=Mr(e.getAttribute(`enctype`))||br,a=new FormData(e)}else if(Sr(e)||wr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a