From 2fe3f0031a68508b330a651fcfaec9e7b3f40d92 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:13:46 +0000 Subject: [PATCH 01/25] Pass socket read timeouts by name in test fixtures Swoole\Coroutine\Socket::recv() takes the read length first and the timeout second. Ten calls in the HTTP and database test fixtures passed 2 or 3 positionally, intending a timeout, so each read returned at most two or three bytes and waited without a time limit. Pass the timeout by name. The remaining positional recv() calls are on HTTP, HTTP/2 and gRPC clients, whose first argument is the timeout. The affected test files pass. --- tests/Ai/BedrockHttpTest.php | 2 +- tests/Ai/HttpStreamingTest.php | 4 ++-- tests/Database/DatabaseConnectionLeaseTest.php | 2 +- tests/Http/Client/CurlStreamingHandlerTest.php | 2 +- tests/Http/Fixtures/LoopbackHttpServer.php | 4 ++-- tests/Http/Fixtures/concurrent-stream-deadlines.php | 4 ++-- tests/Http/Fixtures/concurrent-stream-headers.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Ai/BedrockHttpTest.php b/tests/Ai/BedrockHttpTest.php index 08b6cd075d..b3b1d95d57 100644 --- a/tests/Ai/BedrockHttpTest.php +++ b/tests/Ai/BedrockHttpTest.php @@ -92,7 +92,7 @@ public function testInterruptedAgentStreamsCloseTheAwsResponseAndAllowAnotherStr $server = LoopbackHttpServer::start([ static function (Socket $client) use ($first, $closed): void { $client->sendAll("HTTP/1.1 200 OK\r\nContent-Type: application/vnd.amazon.eventstream\r\nConnection: close\r\n\r\n" . $first); - $closed->push($client->recv(2)); + $closed->push($client->recv(timeout: 2)); }, ['headers' => ['Content-Type' => 'application/vnd.amazon.eventstream'], 'body' => $next], ]); diff --git a/tests/Ai/HttpStreamingTest.php b/tests/Ai/HttpStreamingTest.php index 45ad7b5ded..9b3044001b 100644 --- a/tests/Ai/HttpStreamingTest.php +++ b/tests/Ai/HttpStreamingTest.php @@ -90,7 +90,7 @@ public function testAbandoningConsumptionClosesTheProviderConnection(): void $server = LoopbackHttpServer::start([ static function (Socket $client) use ($first, $closed): void { $client->sendAll("HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\nConnection: close\r\n\r\n" . $first); - $closed->push($client->recv(2)); + $closed->push($client->recv(timeout: 2)); }, [ 'headers' => ['Content-Type' => 'text/event-stream'], @@ -201,7 +201,7 @@ static function (Socket $client) use ($sendBody, $first, $closed): void { $client->sendAll("HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\nConnection: close\r\n\r\n" . $first); } - $closed->push($client->recv(2)); + $closed->push($client->recv(timeout: 2)); }, [ 'headers' => ['Content-Type' => 'text/event-stream'], diff --git a/tests/Database/DatabaseConnectionLeaseTest.php b/tests/Database/DatabaseConnectionLeaseTest.php index 8244a3e23f..f4c95a348c 100644 --- a/tests/Database/DatabaseConnectionLeaseTest.php +++ b/tests/Database/DatabaseConnectionLeaseTest.php @@ -219,7 +219,7 @@ function () use ($server): void { $headers = ''; while (! str_contains($headers, "\r\n\r\n")) { - $chunk = $client->recv(3); + $chunk = $client->recv(timeout: 3); $this->assertIsString($chunk); $this->assertNotSame('', $chunk); $headers .= $chunk; diff --git a/tests/Http/Client/CurlStreamingHandlerTest.php b/tests/Http/Client/CurlStreamingHandlerTest.php index da979291ab..3cf455a7f7 100644 --- a/tests/Http/Client/CurlStreamingHandlerTest.php +++ b/tests/Http/Client/CurlStreamingHandlerTest.php @@ -510,7 +510,7 @@ function () use ($server, $sendFirst, $firstSent, $sendLast): void { $request = ''; while (! str_contains($request, "\r\n\r\n")) { - $chunk = $client->recv(2); + $chunk = $client->recv(timeout: 2); $this->assertIsString($chunk); $this->assertNotSame('', $chunk); $request .= $chunk; diff --git a/tests/Http/Fixtures/LoopbackHttpServer.php b/tests/Http/Fixtures/LoopbackHttpServer.php index 1c9ce25cd0..93af0e5094 100644 --- a/tests/Http/Fixtures/LoopbackHttpServer.php +++ b/tests/Http/Fixtures/LoopbackHttpServer.php @@ -97,7 +97,7 @@ private static function receiveRequest(Socket $client): string $request = ''; while (! str_contains($request, "\r\n\r\n")) { - $chunk = $client->recv(2); + $chunk = $client->recv(timeout: 2); if ($chunk === false || $chunk === '') { return $request; @@ -111,7 +111,7 @@ private static function receiveRequest(Socket $client): string $length = isset($matches[1]) ? (int) $matches[1] : 0; while (strlen($body) < $length) { - $chunk = $client->recv(2); + $chunk = $client->recv(timeout: 2); if ($chunk === false || $chunk === '') { break; diff --git a/tests/Http/Fixtures/concurrent-stream-deadlines.php b/tests/Http/Fixtures/concurrent-stream-deadlines.php index b2868937b4..92a1f22f90 100644 --- a/tests/Http/Fixtures/concurrent-stream-deadlines.php +++ b/tests/Http/Fixtures/concurrent-stream-deadlines.php @@ -27,7 +27,7 @@ try { $request = ''; while (! str_contains($request, "\r\n\r\n")) { - $chunk = $client->recv(2); + $chunk = $client->recv(timeout: 2); if ($chunk === false || $chunk === '') { throw new RuntimeException('Request ended before its headers.'); } @@ -66,7 +66,7 @@ $client = $listener->accept(2); try { // Do not send headers. The second client's own timeout releases us. - while (($data = $client->recv(2)) !== '' && $data !== false); + while (($data = $client->recv(timeout: 2)) !== '' && $data !== false); } finally { $client->close(); $finished->push(true); diff --git a/tests/Http/Fixtures/concurrent-stream-headers.php b/tests/Http/Fixtures/concurrent-stream-headers.php index 1babc5752c..f7835b2bc2 100644 --- a/tests/Http/Fixtures/concurrent-stream-headers.php +++ b/tests/Http/Fixtures/concurrent-stream-headers.php @@ -27,7 +27,7 @@ $client = $listener->accept(2); $request = ''; while (! str_contains($request, "\r\n\r\n")) { - $chunk = $client->recv(2); + $chunk = $client->recv(timeout: 2); if ($chunk === false || $chunk === '') { throw new RuntimeException('Request ended before its headers.'); } From 0f10b28fed5d1a43da244e5425c5ddfdcabcaf44 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:13:52 +0000 Subject: [PATCH 02/25] Verify QUERY requests against request forgery Laravel master's QUERY route support (laravel/framework#60655, ported earlier) treats QUERY as a reading method, so PreventRequestForgery skipped its origin and token checks. Method override is enabled, so a cross-site form POST with _method=QUERY, in the query string or the body, reached QUERY routes without either check when the browser sent the session cookie. Laravel 13.x verifies QUERY on purpose (laravel/framework#61797 at 3bb5d6084544), so isReading() now covers only HEAD, GET and OPTIONS, with a source comment explaining why. Port #61797's two tests, and cover spoofed POSTs from both request bags, without and with a valid token, and QUERY in origin-only mode. Port the matching csrf.md and routing.md wording from laravel/docs 13.x (226b0649c7, at 12080c72699b), and drop http-tests.md's stale link to the removed Swoole QUERY warning. The rest of #61797 already matched the #60655 port. Formatting, static analysis and the full suite pass. --- src/docs/csrf.md | 4 +- src/docs/http-tests.md | 2 - src/docs/routing.md | 4 +- .../Http/Middleware/PreventRequestForgery.php | 3 +- .../Middleware/PreventRequestForgeryTest.php | 96 ++++++++++++++++--- 5 files changed, 90 insertions(+), 19 deletions(-) diff --git a/src/docs/csrf.md b/src/docs/csrf.md index 43d405e4d0..2d0b4984b8 100644 --- a/src/docs/csrf.md +++ b/src/docs/csrf.md @@ -31,7 +31,7 @@ Without CSRF protection, a malicious website could create an HTML form that poin If the malicious website automatically submits the form when the page is loaded, the malicious user only needs to lure an unsuspecting user of your application to visit their website and their email address will be changed in your application. -To prevent this vulnerability, we need to inspect every incoming `POST`, `PUT`, `PATCH`, or `DELETE` request for a secret session value that the malicious application is unable to access. +To prevent this vulnerability, we need to inspect every incoming `POST`, `PUT`, `PATCH`, `DELETE`, or `QUERY` request for a secret session value that the malicious application is unable to access. ## Preventing CSRF Requests @@ -147,4 +147,4 @@ Hypervel stores the current CSRF token in an encrypted `XSRF-TOKEN` cookie that This cookie is primarily sent as a developer convenience since some JavaScript frameworks and libraries, like Angular and Axios, automatically place its value in the `X-XSRF-TOKEN` header on same-origin requests. > [!NOTE] -> For JavaScript requests, read the `XSRF-TOKEN` cookie and send its value in the `X-XSRF-TOKEN` header on same-origin `POST`, `PUT`, `PATCH`, and `DELETE` requests. +> For JavaScript requests, read the `XSRF-TOKEN` cookie and send its value in the `X-XSRF-TOKEN` header on same-origin `POST`, `PUT`, `PATCH`, `DELETE`, and `QUERY` requests. diff --git a/src/docs/http-tests.md b/src/docs/http-tests.md index d38db75d2f..a5f0448486 100644 --- a/src/docs/http-tests.md +++ b/src/docs/http-tests.md @@ -70,8 +70,6 @@ $response = $this->query('/search', ['filter' => 'active']); $response = $this->queryJson('/search', ['filter' => 'active']); ``` -Because these requests are simulated, they aren't affected by the [HTTP/1.1 limitation on `QUERY` routes](/docs/{{version}}/routing#available-router-methods) that applies in production. - Instead of returning a `Hypervel\Http\Response` instance, test request methods return an instance of `Hypervel\Testing\TestResponse`, which provides a [variety of helpful assertions](#available-assertions) that allow you to inspect your application's responses: ```php tab=Pest diff --git a/src/docs/routing.md b/src/docs/routing.md index e1b1d19482..686c1ffd00 100644 --- a/src/docs/routing.md +++ b/src/docs/routing.md @@ -112,9 +112,9 @@ Route::options($uri, $callback); Route::query($uri, $callback); ``` -The `query` method registers a route for HTTP `QUERY` requests. Like `GET`, a `QUERY` request only reads data, but it sends its query in the request body, which suits searches that are too large or complex to fit in a URL. +The `query` method registers a route for HTTP `QUERY` requests. Like `GET`, a `QUERY` request only reads data, but it sends its query in the request body, which suits searches that are too large or complex to fit in a URL. `QUERY` routes in the `web` middleware group are subject to [CSRF protection](/docs/{{version}}/csrf). -Sometimes you may need to register a route that responds to multiple HTTP verbs. You may do so using the `match` method. Or, you may even register a route that responds to all HTTP verbs using the `any` method: +Sometimes you may need to register a route that responds to multiple HTTP verbs. You may do so using the `match` method. Or, you may even register a route that responds to all HTTP verbs, including `QUERY`, using the `any` method: ```php Route::match(['get', 'post'], '/', function () { diff --git a/src/foundation/src/Http/Middleware/PreventRequestForgery.php b/src/foundation/src/Http/Middleware/PreventRequestForgery.php index d6fbc46807..6a7ef73a49 100644 --- a/src/foundation/src/Http/Middleware/PreventRequestForgery.php +++ b/src/foundation/src/Http/Middleware/PreventRequestForgery.php @@ -95,7 +95,8 @@ public function handle(Request $request, Closure $next): Response */ protected function isReading(Request $request): bool { - return in_array($request->method(), ['HEAD', 'GET', 'OPTIONS', 'QUERY'], true); + // QUERY stays verified: it carries a body and can arrive as a form POST with a _method override. + return in_array($request->method(), ['HEAD', 'GET', 'OPTIONS'], true); } /** diff --git a/tests/Http/Middleware/PreventRequestForgeryTest.php b/tests/Http/Middleware/PreventRequestForgeryTest.php index 90f8ce0cdc..ea242fcc9f 100644 --- a/tests/Http/Middleware/PreventRequestForgeryTest.php +++ b/tests/Http/Middleware/PreventRequestForgeryTest.php @@ -14,6 +14,7 @@ use Hypervel\Session\TokenMismatchException; use Hypervel\Tests\TestCase; use Mockery as m; +use PHPUnit\Framework\Attributes\DataProvider; class PreventRequestForgeryTest extends TestCase { @@ -27,16 +28,6 @@ public function testSameOriginHeaderPasses(): void $this->assertSame('OK', $response->getContent()); } - public function testQueryRequestsPassWithoutToken(): void - { - $middleware = $this->createMiddleware(); - $request = $this->createRequest(method: 'QUERY'); - - $response = $middleware->handle($request, fn (): Response => new Response('OK')); - - $this->assertSame('OK', $response->getContent()); - } - public function testSameSiteHeaderRejectedByDefault(): void { $middleware = $this->createMiddleware(); @@ -101,19 +92,31 @@ public function testArrayTokenIsRejected(): void $middleware->handle($request, fn (): Response => new Response('OK')); } - public function testOriginOnlyModeRejectsCrossSite(): void + #[DataProvider('verifiedMethods')] + public function testOriginOnlyModeRejectsCrossSite(string $method): void { PreventRequestForgery::useOriginOnly(); $middleware = $this->createMiddleware(); // Even with a valid token, origin-only mode rejects cross-site - $request = $this->createRequest(['HTTP_SEC_FETCH_SITE' => 'cross-site'], 'test-token'); + $request = $this->createRequest(['HTTP_SEC_FETCH_SITE' => 'cross-site'], 'test-token', $method); $this->expectException(OriginMismatchException::class); $middleware->handle($request, fn (): Response => new Response('OK')); } + /** + * Provide request methods that require origin or token verification. + */ + public static function verifiedMethods(): array + { + return [ + 'post' => ['POST'], + 'query' => ['QUERY'], + ]; + } + public function testOriginOnlyModeRejectsMissingHeader(): void { PreventRequestForgery::useOriginOnly(); @@ -138,6 +141,59 @@ public function testOriginOnlyModePassesSameOrigin(): void $this->assertSame('OK', $response->getContent()); } + public function testQueryRequestWithoutTokenFails(): void + { + $middleware = $this->createMiddleware(); + $request = $this->createRequest(['HTTP_SEC_FETCH_SITE' => 'cross-site'], method: 'QUERY'); + + $this->expectException(TokenMismatchException::class); + + $middleware->handle($request, fn (): Response => new Response('OK')); + } + + public function testQueryRequestWithValidTokenPasses(): void + { + $middleware = $this->createMiddleware(); + $request = $this->createRequest(['HTTP_SEC_FETCH_SITE' => 'cross-site'], 'test-token', 'QUERY'); + + $response = $middleware->handle($request, fn (): Response => new Response('OK')); + + $this->assertSame('OK', $response->getContent()); + } + + #[DataProvider('methodOverrideBags')] + public function testSpoofedQueryRequestWithoutTokenFails(string $bag): void + { + $middleware = $this->createMiddleware(); + $request = $this->createSpoofedQueryRequest($bag); + + $this->expectException(TokenMismatchException::class); + + $middleware->handle($request, fn (): Response => new Response('OK')); + } + + #[DataProvider('methodOverrideBags')] + public function testSpoofedQueryRequestWithValidTokenPasses(string $bag): void + { + $middleware = $this->createMiddleware(); + $request = $this->createSpoofedQueryRequest($bag, 'test-token'); + + $response = $middleware->handle($request, fn (): Response => new Response('OK')); + + $this->assertSame('OK', $response->getContent()); + } + + /** + * Provide the request bags a form may use to override its method. + */ + public static function methodOverrideBags(): array + { + return [ + 'query string' => ['query'], + 'body' => ['request'], + ]; + } + /** * Create a request with the given headers and token. */ @@ -159,6 +215,22 @@ protected function createRequest(array $server = [], ?string $token = null, stri return $request; } + /** + * Create a cross-site form POST that overrides its method to QUERY. + */ + protected function createSpoofedQueryRequest(string $bag, ?string $token = null): Request + { + Request::enableHttpMethodParameterOverride(); + + $request = $this->createRequest(['HTTP_SEC_FETCH_SITE' => 'cross-site'], $token); + $request->{$bag}->set('_method', 'QUERY'); + + $this->assertSame('POST', $request->getRealMethod()); + $this->assertSame('QUERY', $request->method()); + + return $request; + } + /** * Create the middleware for origin and token verification. */ From b4763f4308a8303dc0209b0f9599df38a85986c3 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:00 +0000 Subject: [PATCH 03/25] Limit remote file downloads in kilobytes and reject large declared sizes laravel/ai#1139 (laravel/ai 1.x at d44ae14d17fb) limits fetched remote files in kilobytes and rejects a response whose Content-Length exceeds the limit before reading its body. Hypervel already bounded downloads in bytes. ai.remote_files.max_size is now in kilobytes, shipped as 32 * 1024 and matched by the public MAX_KILOBYTES constant, keeping null to disable the limit, the validation, cancellation precedence and URL-free messages in upstream's wording. Port the on_headers rejection. The sink keeps its tell()-based check, since upstream's getSize() adds clearstatcache() and fstat() for every chunk. The transport drops a compressed response's Content-Length before on_headers, so the sink still bounds decoded bytes. Port upstream's five tests with Hypervel's fakes, replacing a duplicate faked-limit test, move the loopback cases to kilobytes and add a real server case that is rejected before any body is sent. Document the kilobyte unit and the early rejection in ai-sdk.md and the README difference. The same file also takes laravel/docs#11401 (13.x at 12080c72699b): move in the FileStorage tool list and Groq's GPT-OSS notes for web search and code execution. Formatting, static analysis and the AI suite pass. --- src/ai/README.md | 2 +- src/ai/config/ai.php | 4 +- src/ai/src/Files/UntrustedUrl.php | 46 ++++++--- src/docs/ai-sdk.md | 14 ++- tests/Ai/Feature/Files/UntrustedUrlTest.php | 106 ++++++++++++++++---- 5 files changed, 131 insertions(+), 41 deletions(-) diff --git a/src/ai/README.md b/src/ai/README.md index 556552288e..4db416d956 100644 --- a/src/ai/README.md +++ b/src/ai/README.md @@ -27,7 +27,7 @@ Skill discovery is cached for the fixed paths in `ai.skills.cached_paths`. [Relo The conversation migrations use Hypervel's column types, indexes, and approval claim fields. Existing Laravel conversation data requires a [schema migration](https://hypervel.org/docs/ai-sdk#migrating-conversation-data) before use. -Remote downloads share the HTTP client's destination checks. The protected `UntrustedUrl::validate()`, `resolve()`, and `isBlocked()` helpers and hostname-blocklist constants are removed; `resolveUsing()` remains available. URLs containing embedded credentials are rejected. Downloads are limited to 32 MiB of decoded content by default; configure `ai.remote_files.max_size` to change or disable the limit. See [remote attachments](https://hypervel.org/docs/ai-sdk#remote-attachments). +Remote downloads share the HTTP client's destination checks. The protected `UntrustedUrl::validate()`, `resolve()`, and `isBlocked()` helpers and hostname-blocklist constants are removed; `resolveUsing()` remains available. URLs containing embedded credentials are rejected. Downloads are limited to 32 MiB of decoded content by default, instead of Laravel's 100 MB; set `ai.remote_files.max_size` in kilobytes to change the limit, or to `null` to disable it. See [remote attachments](https://hypervel.org/docs/ai-sdk#remote-attachments). ## Known Issues diff --git a/src/ai/config/ai.php b/src/ai/config/ai.php index 07369e2a1b..9eff5d2426 100644 --- a/src/ai/config/ai.php +++ b/src/ai/config/ai.php @@ -89,13 +89,13 @@ | | Remote attachments must resolve to public addresses unless their host | is listed below. The size limit applies to each decoded download in - | bytes. Set max_size to null to allow downloads of any size. + | kilobytes. Set max_size to null to allow downloads of any size. | */ 'remote_files' => [ 'allowed_hosts' => [], - 'max_size' => 32 * 1024 * 1024, + 'max_size' => 32 * 1024, ], /* diff --git a/src/ai/src/Files/UntrustedUrl.php b/src/ai/src/Files/UntrustedUrl.php index 9f755e3b63..0a5c9d6900 100644 --- a/src/ai/src/Files/UntrustedUrl.php +++ b/src/ai/src/Files/UntrustedUrl.php @@ -14,15 +14,17 @@ use Hypervel\Http\Client\Response; use Hypervel\Support\Facades\Http; use InvalidArgumentException; +use Psr\Http\Message\ResponseInterface; +use RuntimeException; use Swoole\Coroutine\CanceledException; use Throwable; class UntrustedUrl { - public const int DEFAULT_MAX_SIZE = 32 * 1024 * 1024; - protected const int MAX_REDIRECTS = 5; + public const int MAX_KILOBYTES = 32 * 1024; + // REMOVED: hostname blocklists; the HTTP destination policy checks the resolved addresses. protected static ?Closure $resolver = null; @@ -36,16 +38,18 @@ public static function fetch(string $url): Response { $allowedHosts = config()->array('ai.remote_files.allowed_hosts', []); $policy = new RemoteFileDestinationPolicy(static::$resolver); - $maxSize = config()->get('ai.remote_files.max_size', static::DEFAULT_MAX_SIZE); + $kilobytes = config()->get('ai.remote_files.max_size', static::MAX_KILOBYTES); - if ($maxSize !== null && (! is_int($maxSize) || $maxSize <= 0)) { + if ($kilobytes !== null && (! is_int($kilobytes) || $kilobytes <= 0)) { throw new InvalidArgumentException('The remote file maximum size must be a positive integer or null.'); } + $limit = $kilobytes === null ? null : $kilobytes * 1024; + for ($hop = 0; $hop <= static::MAX_REDIRECTS; ++$hop) { $uri = new Uri($url); $options = []; - $tooLarge = null; + $tooLarge = false; $trusted = in_array(rtrim(trim($uri->getHost(), '[]'), '.'), $allowedHosts, true); if ($trusted) { @@ -54,20 +58,30 @@ public static function fetch(string $url): Response } } - if ($maxSize !== null) { - $buffer = Utils::streamFor(); + if ($limit !== null) { + $body = Utils::streamFor(); + + // The transport drops a compressed response's Content-Length before this runs, so only decoded lengths are checked. + $options['on_headers'] = static function (ResponseInterface $response) use ($limit, &$tooLarge): void { + if ((int) $response->getHeaderLine('Content-Length') > $limit) { + $tooLarge = true; - // Count decoded bytes at the sink; transfer sizes may describe compressed data. - $options['sink'] = FnStream::decorate($buffer, [ - 'write' => static function (string $chunk) use ($buffer, $maxSize, &$tooLarge): int { - if (strlen($chunk) > $maxSize - $buffer->tell()) { - $tooLarge = new InvalidArgumentException("The remote file exceeds the maximum size of [{$maxSize}] bytes."); + throw new RuntimeException('The remote file declares a body larger than the size limit.'); + } + }; + + // Count decoded bytes at the sink, which also bounds compressed and chunked bodies that declare no decoded length. + $options['sink'] = FnStream::decorate($body, [ + 'write' => static function (string $chunk) use ($body, $limit, &$tooLarge): int { + // The sink appends sequentially, so tell() gives its size without a stat call for every chunk. + if (strlen($chunk) > $limit - $body->tell()) { + $tooLarge = true; // A short write aborts the transfer while preserving transport cleanup. return 0; } - return $buffer->write($chunk); + return $body->write($chunk); }, ]); } @@ -87,7 +101,11 @@ public static function fetch(string $url): Response try { $response = $request->get((string) $uri); } catch (Throwable $exception) { - throw $exception instanceof CanceledException ? $exception : $tooLarge ?? $exception; + if ($tooLarge && ! $exception instanceof CanceledException) { + throw new InvalidArgumentException("The remote file exceeds the maximum size of {$kilobytes} kilobytes."); + } + + throw $exception; } if (! $response->redirect() || blank($response->header('Location'))) { diff --git a/src/docs/ai-sdk.md b/src/docs/ai-sdk.md index b74f102654..d3acc9f82a 100644 --- a/src/docs/ai-sdk.md +++ b/src/docs/ai-sdk.md @@ -1063,16 +1063,16 @@ Downloads inherit your application's outgoing proxy configuration; no separate A Pinning an untrusted hostname requires cURL with SSL support and libcurl 7.75 or later; see the HTTP client's [destination policy limitations](/docs/{{version}}/http-client#destination-policy-limitations). Explicitly trusted hosts bypass destination checks and do not require hostname pinning. -Downloads are limited to 32 MiB of decoded content by default. You may set a different positive byte limit, or `null` to disable the limit, in your `config/ai.php` file: +Downloads are limited to 32 MiB of decoded content by default. You may set a different limit in kilobytes, or `null` to disable the limit, in your `config/ai.php` file: ```php 'remote_files' => [ 'allowed_hosts' => ['files.internal.example'], - 'max_size' => 64 * 1024 * 1024, + 'max_size' => 64 * 1024, ], ``` -The limit also applies to allowed hosts and compressed responses. A blocked destination or oversized download throws an `InvalidArgumentException`. The limit applies to each file; concurrent downloads and preparing files for a provider can use additional memory. +The limit also applies to allowed hosts and compressed responses. A response that declares a larger `Content-Length` is rejected before its body is downloaded. A blocked destination or oversized download throws an `InvalidArgumentException`. The limit applies to each file; concurrent downloads and preparing files for a provider can use additional memory. If a file requires HTTP authentication, download it using the HTTP client's authentication methods and pass the downloaded content or local path to the SDK. The attachment's `withHeaders` method configures the upload to the AI provider, not the remote download. @@ -1642,7 +1642,7 @@ When using Anthropic, additional provider-specific options may be passed to the ### File Storage Tools -The `FileStorage` tool factory allows you to give agents access to a Hypervel [filesystem disk](/docs/{{version}}/filesystem). The `all` method returns tools that allow the agent to list, read, inspect, generate URLs for, write, delete, and copy files on the given disk: +The `FileStorage` tool factory allows you to give agents access to a Hypervel [filesystem disk](/docs/{{version}}/filesystem). The `all` method returns tools that allow the agent to list, read, inspect, generate URLs for, write, delete, copy, and move files on the given disk: ```php use Hypervel\Ai\Tools\FileStorage; @@ -1826,6 +1826,9 @@ To refine search results based on user location, use the `location` method: ); ``` +> [!NOTE] +> Groq only supports web search on its GPT-OSS models, and ignores the `max`, `allow`, and `location` methods. + #### Web Fetch @@ -1921,6 +1924,9 @@ When using OpenAI or Azure, you may make [stored files](#files) available to the ]); ``` +> [!NOTE] +> Groq only supports code execution on its GPT-OSS models. + ### Sub-Agents diff --git a/tests/Ai/Feature/Files/UntrustedUrlTest.php b/tests/Ai/Feature/Files/UntrustedUrlTest.php index 580970834f..36bc40869d 100644 --- a/tests/Ai/Feature/Files/UntrustedUrlTest.php +++ b/tests/Ai/Feature/Files/UntrustedUrlTest.php @@ -4,10 +4,12 @@ namespace Hypervel\Tests\Ai\Feature\Files; +use GuzzleHttp\Psr7\Utils; use Hypervel\Ai\Files\RemoteImage; use Hypervel\Ai\Files\UntrustedUrl; use Hypervel\Contracts\Foundation\Application; use Hypervel\Database\Pool\PoolManager; +use Hypervel\Http\Client\ConnectionException; use Hypervel\Http\Client\Destinations\DestinationResolutionException; use Hypervel\Http\Client\Destinations\DisallowedDestinationException; use Hypervel\Http\Client\Request; @@ -19,6 +21,7 @@ use InvalidArgumentException; use PHPUnit\Framework\Attributes\DataProvider; use Swoole\Coroutine\CanceledException; +use Swoole\Coroutine\Socket; class UntrustedUrlTest extends TestCase { @@ -279,6 +282,66 @@ public function testTooManyRedirectsThrows(): void Http::assertSentCount(6); } + public function testABodyLargerThanTheSizeLimitIsRejected(): void + { + config(['ai.remote_files.max_size' => 1]); + Http::fake(['*' => Http::response(str_repeat('a', 1025))]); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('exceeds the maximum size of 1 kilobytes'); + + (new RemoteImage('https://example.com/photo.png'))->content(); + } + + public function testADeclaredLengthLargerThanTheSizeLimitIsRejectedBeforeTheBodyIsRead(): void + { + config(['ai.remote_files.max_size' => 1]); + $body = Utils::streamFor('bytes'); + Http::fake(['*' => Http::response($body, 200, ['Content-Length' => '1025'])]); + + try { + (new RemoteImage('https://example.com/photo.png'))->content(); + $this->fail('The declared length was not checked.'); + } catch (InvalidArgumentException $exception) { + $this->assertStringContainsString('exceeds the maximum size of 1 kilobytes', $exception->getMessage()); + } + + $this->assertSame(0, $body->tell()); + } + + public function testTheSizeLimitDefaultsTo32Megabytes(): void + { + $this->assertSame(UntrustedUrl::MAX_KILOBYTES, config('ai.remote_files.max_size')); + Http::fake(['*' => Http::response('bytes', 200, ['Content-Length' => (string) (32 * 1024 * 1024 + 1)])]); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('exceeds the maximum size of 32768 kilobytes'); + + (new RemoteImage('https://example.com/photo.png'))->content(); + } + + public function testABodyWithinTheSizeLimitIsFetched(): void + { + config(['ai.remote_files.max_size' => 1]); + $content = str_repeat('a', 1024); + Http::fake(['*' => Http::response($content, 200, ['Content-Length' => '1024'])]); + + $this->assertSame($content, (new RemoteImage('https://example.com/photo.png'))->content()); + } + + public function testATransportFailureUnrelatedToTheSizeLimitIsRethrown(): void + { + $failure = new ConnectionException('cURL error 7: Failed to connect'); + Http::fake(static fn () => throw $failure); + + try { + (new RemoteImage('https://example.com/photo.png'))->content(); + $this->fail('The transport failure was not rethrown.'); + } catch (ConnectionException $exception) { + $this->assertSame($failure, $exception); + } + } + public function testDownloadsInheritTheGlobalProxyConfiguration(): void { $proxy = LoopbackHttpServer::start([['body' => 'bytes']]); @@ -299,29 +362,43 @@ public function testTheDecodedDownloadSizeIsBounded(int $limit, string $content, if ($rejected) { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage("maximum size of [{$limit}] bytes"); + $this->expectExceptionMessage("maximum size of {$limit} kilobytes"); } $this->assertSame($content, (new RemoteImage("http://127.0.0.1:{$server->port}/photo.png"))->content()); } /** - * Provide exact, excessive, and compressed downloads. + * Provide exact and compressed downloads. */ public static function downloadSizes(): array { return [ - 'exact limit' => [5, 'bytes', false, false], - 'one byte over' => [4, 'bytes', false, true], - 'decoded gzip' => [128, str_repeat('x', 1024), true, true], + 'exact limit' => [1, str_repeat('x', 1024), false, false], + 'decoded gzip' => [1, str_repeat('x', 2048), true, true], ]; } + public function testADeclaredLengthIsRejectedBeforeTheServerSendsTheBody(): void + { + config(['ai.remote_files.allowed_hosts' => ['127.0.0.1'], 'ai.remote_files.max_size' => 1]); + $server = LoopbackHttpServer::start([static function (Socket $client): void { + $client->sendAll("HTTP/1.1 200 OK\r\nContent-Length: 1025\r\nConnection: close\r\n\r\n"); + + // Withhold the body until the client closes the connection. + $client->recv(timeout: 2); + }]); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('exceeds the maximum size of 1 kilobytes'); + + (new RemoteImage("http://127.0.0.1:{$server->port}/photo.png"))->content(); + } + public function testANullSizeLimitAllowsDownloadsLargerThanTheDefault(): void { - $this->assertSame(UntrustedUrl::DEFAULT_MAX_SIZE, config('ai.remote_files.max_size')); config(['ai.remote_files.allowed_hosts' => ['127.0.0.1'], 'ai.remote_files.max_size' => null]); - $size = UntrustedUrl::DEFAULT_MAX_SIZE + 1; + $size = UntrustedUrl::MAX_KILOBYTES * 1024 + 1; $server = LoopbackHttpServer::start([[ 'body' => gzencode(str_repeat('x', $size)), 'headers' => ['Content-Encoding' => 'gzip'], @@ -356,21 +433,10 @@ public static function invalidSizeLimits(): array ]; } - public function testFakedDownloadsEnforceTheSizeLimit(): void - { - config(['ai.remote_files.max_size' => 4]); - Http::fake(['*' => Http::response('bytes')]); - - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('maximum size of [4] bytes'); - - (new RemoteImage('https://example.com/photo.png'))->content(); - } - public function testCancellationDuringTransferCompletionTakesPrecedenceOverTheSizeFailure(): void { - config(['ai.remote_files.allowed_hosts' => ['127.0.0.1'], 'ai.remote_files.max_size' => 4]); - $server = LoopbackHttpServer::start([['body' => 'bytes']]); + config(['ai.remote_files.allowed_hosts' => ['127.0.0.1'], 'ai.remote_files.max_size' => 1]); + $server = LoopbackHttpServer::start([['body' => str_repeat('x', 1025)]]); $canceled = new CanceledException('Canceled while publishing transfer statistics.'); Http::globalOptions(['on_stats' => static function () use ($canceled): void { throw $canceled; From 8c91c61781bdaac738300535155ea064399ddc21 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:05 +0000 Subject: [PATCH 04/25] Open rebuilt Gemini turns with their thought step laravel/ai#1150 (laravel/ai 1.x at d44ae14d17fb): Gemini expects a model turn's thought step before its text, but mapAssistantMessage() rebuilt stored turns with the text first. Emit the thought step first; this is the only place Gemini turns are rebuilt. Port upstream's mapping test and its persistence-test update. Formatting, static analysis and the AI suite pass. --- .../Gateway/Gemini/Concerns/MapsMessages.php | 10 ++++---- .../Providers/Gemini/MessageMappingTest.php | 24 +++++++++++++++++++ .../Storage/DatabaseConversationStoreTest.php | 11 +++++---- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/ai/src/Gateway/Gemini/Concerns/MapsMessages.php b/src/ai/src/Gateway/Gemini/Concerns/MapsMessages.php index ca51d3308c..076e365a36 100644 --- a/src/ai/src/Gateway/Gemini/Concerns/MapsMessages.php +++ b/src/ai/src/Gateway/Gemini/Concerns/MapsMessages.php @@ -67,6 +67,11 @@ protected function mapAssistantMessage(AssistantMessage|Message $message, array return; } + // A signature never rides on a function call, so a persisted turn opens with the rebuilt thought step that held it... + if ($message instanceof AssistantMessage && filled($signature = $message->toolCalls->first()?->thoughtSignature)) { + $input[] = ['type' => 'thought', 'signature' => $signature]; + } + if (filled($message->content)) { $input[] = [ 'type' => 'model_output', @@ -75,11 +80,6 @@ protected function mapAssistantMessage(AssistantMessage|Message $message, array } if ($message instanceof AssistantMessage) { - // A signature never rides on a function call, so a persisted turn rebuilds the thought step that held it... - if (filled($signature = $message->toolCalls->first()?->thoughtSignature)) { - $input[] = ['type' => 'thought', 'signature' => $signature]; - } - foreach ($message->toolCalls as $toolCall) { $input[] = [ 'type' => 'function_call', diff --git a/tests/Ai/Feature/Providers/Gemini/MessageMappingTest.php b/tests/Ai/Feature/Providers/Gemini/MessageMappingTest.php index ae548b80eb..cfd0d64943 100644 --- a/tests/Ai/Feature/Providers/Gemini/MessageMappingTest.php +++ b/tests/Ai/Feature/Providers/Gemini/MessageMappingTest.php @@ -221,6 +221,30 @@ public function messages(): iterable $this->assertStringContainsString('{"type":"function_call","id":"call_123","name":"FixedNumberGenerator","arguments":{}}', $request->body()); } + public function testARebuiltAssistantTurnWithTextOpensWithItsThoughtStep(): void + { + Http::fake([ + 'generativelanguage.googleapis.com/*' => $this->fakeTextResponse('OK'), + ]); + + agent('You are a helpful assistant.', [ + new Message(role: 'user', content: 'Generate a number'), + new AssistantMessage('Let me generate one.', new Collection([ + new ToolCall('call_123', 'FixedNumberGenerator', [], 'call_123', thoughtSignature: 'sig_123'), + ])), + new ToolResultMessage(new Collection([ + new ToolResult('call_123', 'FixedNumberGenerator', [], 123, 'call_123'), + ])), + ])->prompt('And again', provider: 'gemini'); + + $input = geminiRequestBody()['input']; + + $this->assertSame([ + 'user_input', 'thought', 'model_output', 'function_call', 'function_result', 'user_input', + ], array_column($input, 'type')); + $this->assertSame(['type' => 'thought', 'signature' => 'sig_123'], $input[1]); + } + public function testLocalImageAttachmentWithoutExplicitMimeTypeDetectsMimeFromFile(): void { Http::fake([ diff --git a/tests/Ai/Feature/Storage/DatabaseConversationStoreTest.php b/tests/Ai/Feature/Storage/DatabaseConversationStoreTest.php index c743354ca4..ffc1d9d029 100644 --- a/tests/Ai/Feature/Storage/DatabaseConversationStoreTest.php +++ b/tests/Ai/Feature/Storage/DatabaseConversationStoreTest.php @@ -373,6 +373,7 @@ public function testItPreservesTheGeminiThoughtSignatureAcrossAPersistedToolConv '*' => Http::sequence([ Http::response(storeTestGeminiInteraction([ ['type' => 'thought', 'summary' => [['type' => 'text', 'text' => 'Thinking.']], 'signature' => 'sig_persist_777'], + ['type' => 'model_output', 'content' => [['type' => 'text', 'text' => 'Let me generate one.']]], ['type' => 'function_call', 'id' => 'call_123', 'name' => 'FixedNumberGenerator', 'arguments' => (object) []], ])), Http::response(storeTestGeminiInteraction([[ @@ -398,12 +399,12 @@ public function testItPreservesTheGeminiThoughtSignatureAcrossAPersistedToolConv (new RememberingToolUsingAgent)->continue($conversationId, $user)->prompt('Generate another', provider: 'gemini'); $recorded = Http::recorded(); - $signatures = array_column(array_filter( - $recorded[count($recorded) - 1][0]->data()['input'], - fn (array $step): bool => $step['type'] === 'thought', - ), 'signature'); + $input = $recorded[count($recorded) - 1][0]->data()['input']; - $this->assertSame(['sig_persist_777'], $signatures); + $this->assertSame([ + 'user_input', 'thought', 'model_output', 'function_call', 'function_result', 'model_output', 'user_input', + ], array_column($input, 'type')); + $this->assertSame(['type' => 'thought', 'signature' => 'sig_persist_777'], $input[1]); } public function testItStoresAResponseBuiltWithoutStepsAsASingleStepOfLists(): void From 981edba83177cf420f4c55cd0e978882db085532 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:25 +0000 Subject: [PATCH 05/25] Port Scout's queued import queue and connection tests laravel/scout#1015 (laravel/scout 11.x at d6d1774c4fa5) makes queued imports keep their queue and connection. Hypervel's MakeRangeSearchable already prefers its own queue and connection, so only the tests are ported: the queue-import command test, and upstream's two job tests in place of Hypervel's two duplicates, keeping upstream's key and count assertions. The Scout suite passes. --- .../Unit/Console/QueueImportCommandTest.php | 22 ++++++ .../Unit/Jobs/MakeRangeSearchableTest.php | 78 ++++++++++--------- 2 files changed, 63 insertions(+), 37 deletions(-) diff --git a/tests/Scout/Unit/Console/QueueImportCommandTest.php b/tests/Scout/Unit/Console/QueueImportCommandTest.php index 7ccdf9fd66..e2eec12b03 100644 --- a/tests/Scout/Unit/Console/QueueImportCommandTest.php +++ b/tests/Scout/Unit/Console/QueueImportCommandTest.php @@ -6,7 +6,9 @@ use Hypervel\Scout\Exceptions\ScoutException; use Hypervel\Scout\Jobs\MakeRangeSearchable; +use Hypervel\Scout\Jobs\MakeSearchable; use Hypervel\Support\Facades\Bus; +use Hypervel\Support\Facades\Queue; use Hypervel\Tests\Scout\Fixtures\Models\SearchableModel; use Hypervel\Tests\Scout\Fixtures\Models\UuidSearchableModel; use Hypervel\Tests\Scout\ScoutTestCase; @@ -463,6 +465,26 @@ public function testItAcceptsCustomQueueOption(): void }); } + public function testItUsesCustomQueueForMakeSearchableJobs(): void + { + $model = SearchableModel::create(['title' => 'Title', 'body' => 'Body']); + + config(['scout.queue' => ['connection' => 'sync', 'queue' => 'scout']]); + + Queue::fake([MakeSearchable::class]); + + $this->artisan('scout:queue-import', [ + 'model' => SearchableModel::class, + '--queue' => 'custom-queue', + ])->assertSuccessful(); + + Queue::assertPushedOn('custom-queue', MakeSearchable::class, function (MakeSearchable $job) use ($model) { + return $job->models->modelKeys() === [$model->id]; + }); + + Queue::assertPushed(MakeSearchable::class, 1); + } + public function testItUsesModelDefaultQueueWhenNoQueueOption(): void { $this->app->make('config')->set('scout.queue.queue', 'scout-default'); diff --git a/tests/Scout/Unit/Jobs/MakeRangeSearchableTest.php b/tests/Scout/Unit/Jobs/MakeRangeSearchableTest.php index 41bb0987fa..98be3bd360 100644 --- a/tests/Scout/Unit/Jobs/MakeRangeSearchableTest.php +++ b/tests/Scout/Unit/Jobs/MakeRangeSearchableTest.php @@ -8,6 +8,7 @@ use Hypervel\Scout\Jobs\MakeSearchable; use Hypervel\Scout\Scout; use Hypervel\Support\Facades\Bus; +use Hypervel\Support\Facades\Queue; use Hypervel\Tests\Scout\Fixtures\Models\ConditionalSearchableModel; use Hypervel\Tests\Scout\Fixtures\Models\SearchableModel; use Hypervel\Tests\Scout\Fixtures\Models\UuidSearchableModel; @@ -57,6 +58,46 @@ public function testHandleDispatchesMakeSearchableForSingleIdRange(): void }); } + public function testHandlePassesQueueAndConnectionToMakeSearchableJob(): void + { + $model = SearchableModel::create(['title' => 'Title', 'body' => 'Body']); + + config(['scout.queue' => ['connection' => 'sync', 'queue' => 'scout']]); + + Queue::fake(); + + $job = (new MakeRangeSearchable(SearchableModel::class, $model->id, $model->id)) + ->onQueue('imports') + ->onConnection('redis'); + + $job->handle(); + + Queue::assertPushedOn('imports', MakeSearchable::class, function (MakeSearchable $job) use ($model) { + return $job->connection === 'redis' && $job->models->modelKeys() === [$model->id]; + }); + + Queue::assertPushed(MakeSearchable::class, 1); + } + + public function testHandleUsesModelQueueAndConnectionWhenNeitherIsSet(): void + { + $model = SearchableModel::create(['title' => 'Title', 'body' => 'Body']); + + config(['scout.queue' => ['connection' => 'sync', 'queue' => 'scout']]); + + Queue::fake(); + + $job = new MakeRangeSearchable(SearchableModel::class, $model->id, $model->id); + + $job->handle(); + + Queue::assertPushedOn('scout', MakeSearchable::class, function (MakeSearchable $job) use ($model) { + return $job->connection === 'sync' && $job->models->modelKeys() === [$model->id]; + }); + + Queue::assertPushed(MakeSearchable::class, 1); + } + public function testHandleDoesNotDispatchWhenNoModelsInRange(): void { for ($i = 1; $i <= 3; ++$i) { @@ -119,43 +160,6 @@ public function testHandleSkipsModelsThatShouldNotBeSearchable(): void }); } - public function testHandleDispatchesOnModelsConnectionAndQueue(): void - { - $this->app->make('config')->set('scout.queue.connection', 'redis'); - $this->app->make('config')->set('scout.queue.queue', 'scout'); - - SearchableModel::create(['title' => 'Test', 'body' => 'Body']); - - Bus::fake([MakeSearchable::class]); - - (new MakeRangeSearchable(SearchableModel::class, 1, 1))->handle(); - - Bus::assertDispatched(MakeSearchable::class, function (MakeSearchable $job) { - return $job->connection === 'redis' && $job->queue === 'scout'; - }); - } - - public function testHandlePropagatesOwnQueueAndConnectionToDispatchedJob(): void - { - // Model defaults are set, but the parent job's own queue/connection - // should win (so --queue=imports on scout:queue-import flows all the - // way through to the actual indexing job). - $this->app->make('config')->set('scout.queue.connection', 'redis'); - $this->app->make('config')->set('scout.queue.queue', 'default-scout'); - - SearchableModel::create(['title' => 'Test', 'body' => 'Body']); - - Bus::fake([MakeSearchable::class]); - - $job = new MakeRangeSearchable(SearchableModel::class, 1, 1); - $job->onQueue('imports')->onConnection('sqs'); - $job->handle(); - - Bus::assertDispatched(MakeSearchable::class, function (MakeSearchable $dispatched) { - return $dispatched->queue === 'imports' && $dispatched->connection === 'sqs'; - }); - } - public function testHandleDispatchesCustomMakeSearchableJobClass(): void { Scout::makeSearchableUsing(CustomMakeRangeSearchableTestJob::class); From 40c847e2cabec40ee474e3cad946d38f82a2d8a9 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:25 +0000 Subject: [PATCH 06/25] Port Scout's Typesense indexable-name collection tests laravel/scout#1013 (laravel/scout 11.x at d6d1774c4fa5) creates missing Typesense collections with the model's indexable name. Hypervel's createCollectionFromModel() already receives that name on update. Give Hypervel's matching unit test upstream's name and port upstream's integration test, where the schema has no name and the read collection is never created. It passes against Typesense 27.1. --- .../TypesenseEngineIntegrationTest.php | 60 +++++++++++++++++++ .../Unit/Engines/TypesenseEngineTest.php | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/tests/Integration/Scout/Typesense/TypesenseEngineIntegrationTest.php b/tests/Integration/Scout/Typesense/TypesenseEngineIntegrationTest.php index 0d263a4c22..fa2fba01e6 100644 --- a/tests/Integration/Scout/Typesense/TypesenseEngineIntegrationTest.php +++ b/tests/Integration/Scout/Typesense/TypesenseEngineIntegrationTest.php @@ -295,6 +295,30 @@ public function testItCanUseUserProvidedEmbeddingsForSemanticSearch(): void $this->assertSame('2', $results['hits'][0]['document']['id']); } + + public function testItCreatesMissingCollectionsUsingTheIndexableName(): void + { + $model = new TypesenseVersionedModel; + + config()->set('scout.typesense.model-settings.' . TypesenseVersionedModel::class, [ + 'collection-schema' => [ + 'fields' => [ + ['name' => 'id', 'type' => 'string'], + ['name' => 'name', 'type' => 'string'], + ], + ], + ]); + + $engine = new TypesenseEngine($this->typesense, 1000); + + $engine->update($model->newCollection([ + new TypesenseVersionedModel(['id' => 1, 'name' => 'Hypervel Scout']), + new TypesenseVersionedModel(['id' => 2, 'name' => 'Hypervel Framework']), + ])); + + $this->assertSame(2, $this->typesense->collections[$model->indexableAs()]->retrieve()['num_documents']); + $this->assertFalse(rescue(fn () => $this->typesense->collections[$model->searchableAs()]->retrieve(), false, false)); + } } class TypesenseEmbeddingModel extends Model @@ -335,6 +359,42 @@ public function toSearchableEmbedding(): array } } +class TypesenseVersionedModel extends Model +{ + use Searchable; + + protected array $fillable = ['id', 'name']; + + public bool $timestamps = false; + + /** + * Get the index name for the model when searching. + */ + public function searchableAs(): string + { + return config()->string('scout.prefix') . 'versioned'; + } + + /** + * Get the index name for the model when indexing. + */ + public function indexableAs(): string + { + return $this->searchableAs() . '_v2'; + } + + /** + * Get the indexable data array for the model. + */ + public function toSearchableArray(): array + { + return [ + 'id' => (string) $this->id, + 'name' => $this->name, + ]; + } +} + class TypesenseReadWriteSearchableModel extends TypesenseSearchableModel { public function indexableAs(): string diff --git a/tests/Scout/Unit/Engines/TypesenseEngineTest.php b/tests/Scout/Unit/Engines/TypesenseEngineTest.php index 7bd81ffce0..a49139d3bd 100644 --- a/tests/Scout/Unit/Engines/TypesenseEngineTest.php +++ b/tests/Scout/Unit/Engines/TypesenseEngineTest.php @@ -423,7 +423,7 @@ public function testUpdateDoesNotGenerateEmbeddingsWhenUsingNativeEmbeddings(): $engine->update($model->newCollection([$model])); } - public function testUpdateCreatesMissingCollectionAndRetriesImportOnce(): void + public function testMissingCollectionIsCreatedUsingTheIndexableName(): void { $client = m::mock(TypesenseClient::class); $collections = m::mock(Collections::class); From 54936e74502a5e02ac67fb081948aad8975fd1ba Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:25 +0000 Subject: [PATCH 07/25] Port Scout's Meilisearch whereIn escaping tests laravel/scout#1014 (laravel/scout 11.x at d6d1774c4fa5) escapes values in Meilisearch whereIn and whereNotIn filters. Hypervel's filters() already escapes them, so upstream's unit and integration tests are ported; the integration test filters on title. Both fail without the escaping, and both pass against Meilisearch. --- .../MeilisearchFilteringIntegrationTest.php | 21 ++++++++++++++++++ .../Unit/Engines/MeilisearchEngineTest.php | 22 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/tests/Integration/Scout/Meilisearch/MeilisearchFilteringIntegrationTest.php b/tests/Integration/Scout/Meilisearch/MeilisearchFilteringIntegrationTest.php index 897d69aac6..3d32888846 100644 --- a/tests/Integration/Scout/Meilisearch/MeilisearchFilteringIntegrationTest.php +++ b/tests/Integration/Scout/Meilisearch/MeilisearchFilteringIntegrationTest.php @@ -183,6 +183,27 @@ public function testBackedEnumsAndEscapedSetValuesReachMeilisearch(): void $this->assertSame([401, 402], $results->pluck('id')->sort()->values()->all()); } + public function testWhereInAndWhereNotInValuesAreEscaped(): void + { + SearchableModel::create(['id' => 1, 'title' => 'Hypervel Framework', 'body' => 'Body']); + SearchableModel::create(['id' => 2, 'title' => 'Other', 'body' => 'Body']); + + $this->engine->update(SearchableModel::query()->get()); + $this->waitForMeilisearchTasks(); + + $injection = 'x"] OR title IS NOT NULL OR title IN ["y'; + + $this->assertSame( + [1 => 'Hypervel Framework'], + SearchableModel::search('')->whereIn('title', ['Hypervel Framework', $injection])->get()->pluck('title', 'id')->all() + ); + + $this->assertNotContains( + 1, + SearchableModel::search('')->whereNotIn('title', ['Hypervel Framework', $injection])->take(100)->keys()->all() + ); + } + public function testApplicationFiltersComposeWithBuilderFiltersForSearchAndDeletion(): void { SearchableModel::withoutSyncingToSearch(function (): void { diff --git a/tests/Scout/Unit/Engines/MeilisearchEngineTest.php b/tests/Scout/Unit/Engines/MeilisearchEngineTest.php index 61c5c27efc..5d4f9502a0 100644 --- a/tests/Scout/Unit/Engines/MeilisearchEngineTest.php +++ b/tests/Scout/Unit/Engines/MeilisearchEngineTest.php @@ -415,6 +415,28 @@ public function testSearchWithFilters(): void $engine->search($builder); } + public function testWhereInAndWhereNotInValuesAreEscaped(): void + { + $client = m::mock(Client::class); + $index = m::mock(Indexes::class); + $client->shouldReceive('index')->once()->with('test_index')->andReturn($index); + $index->shouldReceive('rawSearch')->once()->with('', [ + 'filter' => 'category IN ["12\" pipe", "back\\\slash"] AND tag NOT IN ["a\"] OR team_id = 2 OR tag IN [\"b"]', + ])->andReturn(['hits' => [], 'totalHits' => 0]); + + $engine = new MeilisearchEngine($client); + + $model = m::mock(MeilisearchTestSearchableModel::class); + $model->shouldReceive('searchableAs')->andReturn('test_index'); + $model->shouldReceive('getScoutKeyName')->andReturn('id'); + + $builder = new Builder($model, ''); + $builder->whereIn('category', ['12" pipe', 'back\slash']); + $builder->whereNotIn('tag', ['a"] OR team_id = 2 OR tag IN ["b']); + + $engine->search($builder); + } + #[DataProvider('filterCombinations')] public function testSearchComposesApplicationAndBuilderFilters( string|array|null $applicationFilter, From 9c1e1a852db984a7106c0517002ed8471179a7f3 Mon Sep 17 00:00:00 2001 From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com> Date: Tue, 20 Oct 2026 08:14:36 +0000 Subject: [PATCH 08/25] Format query previews by SQL dialect and test them with Vitest laravel/telescope#1770 (laravel/telescope 5.x at dcc6674c825f) formats query previews by driver. Port formatQuery(), sqlDialect(), the pgsql and sqlsrv aliases, raw output for unknown drivers and the highlightQuery/querycode rename. MongoDB is unsupported, so its alias, the JSON grammar and branch, and queryLanguage() are omitted with REMOVED comments; the preview keeps a static language-sql class. Port upstream's Vitest harness (dev dependencies, config and scripts) and preview.test.js at upstream's location, without the MongoDB-only cases and with SQL clipboard and ready cases. The CI JavaScript job installs npm 11.21.0, which Telescope's devEngines require, and runs npm ci and npm test in src/telescope. The lockfile also takes laravel/telescope#1772, bumping source-map-js to 1.2.2 as upstream does. dist is rebuilt. npm ci and npm test pass. --- .github/workflows/tests.yml | 12 + src/telescope/dist/app.js | 16 +- src/telescope/package-lock.json | 1883 ++++++++++++++++- src/telescope/package.json | 5 + .../js/screens/queries/preview.test.js | 117 + .../resources/js/screens/queries/preview.vue | 55 +- src/telescope/vitest.config.js | 11 + 7 files changed, 2020 insertions(+), 79 deletions(-) create mode 100644 src/telescope/resources/js/screens/queries/preview.test.js create mode 100644 src/telescope/vitest.config.js diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 23a580db25..723d70a989 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -131,3 +131,15 @@ jobs: - name: Type-check generated Wayfinder output run: pnpm typecheck:wayfinder + + # Telescope's dashboard is a standalone npm package whose devEngines require npm 11.10 or newer. + - name: Install npm for Telescope + run: npm install --global npm@11.21.0 + + - name: Install Telescope dependencies + working-directory: src/telescope + run: npm ci + + - name: Run Telescope dashboard tests + working-directory: src/telescope + run: npm test diff --git a/src/telescope/dist/app.js b/src/telescope/dist/app.js index 601b012974..b178f31c05 100644 --- a/src/telescope/dist/app.js +++ b/src/telescope/dist/app.js @@ -1,4 +1,4 @@ -var LL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var MY=LL((hY,$O)=>{var hL={};/*! +var LL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var aY=LL((IY,$O)=>{var hL={};/*! * Vue.js v2.7.16 * (c) 2014-2023 Evan You * Released under the MIT License. @@ -55,7 +55,7 @@ Y0.version="2.31.0";XC(Ae);Y0.fn=B0;Y0.min=Cm;Y0.max=mm;Y0.now=vm;Y0.utc=f2;Y0.u `);a=b===-1?"":O.slice(b+1)}if(!r.stack)r.stack=a;else if(a){const b=a.indexOf(` `),A=b===-1?-1:a.indexOf(` `,b+1),u=A===-1?"":a.slice(A+1);String(r.stack).endsWith(u)||(r.stack+=` -`+a)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wo(this.defaults,n);const{transitional:r,paramsSerializer:M,headers:O}=n;r!==void 0&&BO.assertOptions(r,{silentJSONParsing:rt.transitional(rt.boolean),forcedJSONParsing:rt.transitional(rt.boolean),clarifyTimeoutError:rt.transitional(rt.boolean),legacyInterceptorReqResOrdering:rt.transitional(rt.boolean),advertiseZstdAcceptEncoding:rt.transitional(rt.boolean),validateStatusUndefinedResolves:rt.transitional(rt.boolean)},!1),M!=null&&(Z.isFunction(M)?n.paramsSerializer={serialize:M}:BO.assertOptions(M,{encode:rt.function,serialize:rt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),BO.assertOptions(n,{baseUrl:rt.spelling("baseURL"),withXsrfToken:rt.spelling("withXSRFToken")},!0),n.method=(Z.getSafeProp(n,"method")||Z.getSafeProp(this.defaults,"method")||"get").toLowerCase();let a=O&&Z.merge(O.common,O[n.method]);O&&Z.forEach(PR.concat("common"),m=>{delete O[m]}),n.headers=ot.concat(a,O);const b=[];let A=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(n)===!1)return;A=A&&P.synchronous;const k=n.transitional||kA;k&&k.legacyInterceptorReqResOrdering?b.unshift(P.fulfilled,P.rejected):b.push(P.fulfilled,P.rejected)});const u=[];this.interceptors.response.forEach(function(P){u.push(P.fulfilled,P.rejected)});let R,T=0,v;if(!A){const m=[Rb.bind(this),void 0];for(m.unshift(...b),m.push(...u),v=m.length,R=Promise.resolve(n);TRb.call(this,g)))}catch(W){R=Promise.reject(W)}break}}if(!R)try{R=Rb.call(this,g)}catch(m){R=Promise.reject(m)}for(T=0,v=u.length;T{if(!r._listeners)return;let O=r._listeners.length;for(;O-- >0;)r._listeners[O](M);r._listeners=null}),this.promise.then=M=>{let O;const a=new Promise(b=>{r.subscribe(b),O=b}).then(M);return a.cancel=function(){r.unsubscribe(O)},a},t(function(O,a,b){r.reason||(r.reason=new Si(O,a,b),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new xR(function(M){t=M}),cancel:t}}};function iy(e){return function(n){return e.apply(null,n)}}function Oy(e){return Z.isObject(e)&&e.isAxiosError===!0}const UO={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(UO).forEach(([e,t])=>{UO[t]===void 0&&(UO[t]=e)});function YR(e){const t=new Wo(e),n=ER(Wo.prototype.request,t);return Z.extend(n,Wo.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(M){return YR(wo(e,M))},n}const x1=YR(qi);x1.Axios=Wo;x1.CanceledError=Si;x1.CancelToken=ay;x1.isCancel=yR;x1.VERSION=KA;x1.toFormData=Xc;x1.AxiosError=G0;x1.Cancel=x1.CanceledError;x1.all=function(t){return Promise.all(t)};x1.spread=iy;x1.isAxiosError=Oy;x1.mergeConfig=wo;x1.AxiosHeaders=ot;x1.formToJSON=e=>DR(Z.isHTMLForm(e)?new FormData(e):e);x1.getAdapter=FR.getAdapter;x1.HttpStatusCode=UO;x1.default=x1;const{Axios:pY,AxiosError:bY,CanceledError:sY,isCancel:AY,CancelToken:zY,VERSION:EY,all:uY,Cancel:lY,isAxiosError:fY,spread:dY,toFormData:RY,AxiosHeaders:TY,HttpStatusCode:NY,formToJSON:qY,getAdapter:SY,mergeConfig:_Y,create:LY}=x1;function N1(e,t,n,r,M,O,a,b){var A=typeof e=="function"?e.options:e;return t&&(A.render=t,A.staticRenderFns=n,A._compiled=!0),O&&(A._scopeId="data-v-"+O),{exports:e,options:A}}const cy={methods:{recipientsCount(e){return f1.union(e.content.to?Object.keys(e.content.to):[],e.content.cc?Object.keys(e.content.cc):[],e.content.bcc?Object.keys(e.content.bcc):[],e.content.replyTo?Object.keys(e.content.replyTo):[]).length}}};var py=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Mail",resource:"mail"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("span",{attrs:{title:r.entry.content.mailable}},[t._v(t._s(t.truncate(r.entry.content.mailable||"-",70)))]),r.entry.content.queued?n("span",{staticClass:"badge badge-secondary ml-2"},[t._v(" Queued ")]):t._e(),n("br"),n("small",{staticClass:"text-muted",attrs:{title:r.entry.content.subject}},[t._v(" Subject: "+t._s(t.truncate(r.entry.content.subject,90))+" ")])]),n("td",{staticClass:"table-fit text-right text-muted"},[t._v(" "+t._s(t.recipientsCount(r.entry))+" ")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"mail-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Mailable")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Recipients")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},by=[],sy=N1(cy,py,by,!1,null,null);const Ay=sy.exports,zy={methods:{formatAddresses(e){return f1.chain(e).map((t,n)=>(t?"<"+t+"> ":"")+n).join(", ").value()}},data(){return{entry:null,batch:[]}}};var Ey=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Mail Details",resource:"mail",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Mailable")]),n("td",[t._v(" "+t._s(r.entry.content.mailable)+" "),r.entry.content.queued?n("span",{staticClass:"badge badge-secondary ml-2"},[t._v(" Queued ")]):t._e()])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("From")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.from))+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("To")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.to))+" ")])]),r.entry.replyTo?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Reply-To")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.replyTo))+" ")])]):t._e(),r.entry.cc?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("CC")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.cc))+" ")])]):t._e(),r.entry.bcc?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("BCC")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.bcc))+" ")])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Subject")]),n("td",[t._v(" "+t._s(r.entry.content.subject)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Download")]),n("td",[n("a",{attrs:{href:t.Telescope.basePath+"/telescope-api/mail/"+t.$route.params.id+"/download"}},[t._v("Download .eml file")])])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{staticClass:"mt-5"},[n("div",{staticClass:"card"},[n("iframe",{attrs:{src:t.Telescope.basePath+"/telescope-api/mail/"+t.$route.params.id+"/preview",width:"100%",height:"400"}})])])}}])})},uy=[],ly=N1(zy,Ey,uy,!1,null,"9cb6461b");const fy=ly.exports,dy={};var Ry=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Exceptions",resource:"exceptions"},scopedSlots:t._u([{key:"row",fn:function(r){return[t.$route.query.family_hash?t._e():n("td",{attrs:{title:r.entry.content.class}},[t._v(" "+t._s(t.truncate(r.entry.content.class,70))),n("br"),n("small",{staticClass:"text-muted"},[t._v(t._s(t.truncate(r.entry.content.message,100)))])]),!t.$route.query.family_hash&&!t.$route.query.tag?n("td",{staticClass:"table-fit text-right text-muted"},[n("span",[t._v(t._s(r.entry.content.occurrences))])]):t._e(),t.$route.query.family_hash?n("td",{attrs:{title:r.entry.content.message}},[t._v(" "+t._s(t.truncate(r.entry.content.message,80))),n("br"),n("small",{staticClass:"text-muted"},[r.entry.content.user&&r.entry.content.user.email?n("span",[t._v(" User: "+t._s(r.entry.content.user.email)+" ("+t._s(r.entry.content.user.id)+") ")]):n("span",[t._v(" User: N/A ")])])]):t._e(),n("td",{staticClass:"table-fit text-right text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[r.entry.content.resolved_at?n("div",{attrs:{"data-timeago":r.entry.content.resolved_at,title:r.entry.content.resolved_at}},[t._v(" "+t._s(t.timeAgo(r.entry.content.resolved_at))+" ")]):t._e(),r.entry.content.resolved_at?t._e():n("div",{staticClass:"control-action text-center"},[n("svg",{attrs:{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[n("path",{attrs:{fill:"#ef5753",d:"M2.92893219,17.0710678 C6.83417511,20.9763107 13.1658249,20.9763107 17.0710678,17.0710678 C20.9763107,13.1658249 20.9763107,6.83417511 17.0710678,2.92893219 C13.1658249,-0.976310729 6.83417511,-0.976310729 2.92893219,2.92893219 C-0.976310729,6.83417511 -0.976310729,13.1658249 2.92893219,17.0710678 Z M9,5 L11,5 L11,11 L9,11 L9,5 Z M9,13 L11,13 L11,15 L9,15 L9,13 Z",id:"Combined-Shape"}})])])]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"exception-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[t.$route.query.family_hash?t._e():n("th",{attrs:{scope:"col"}},[t._v("Type")]),!t.$route.query.family_hash&&!t.$route.query.tag?n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("#")]):t._e(),t.$route.query.family_hash?n("th",{attrs:{scope:"col"}},[t._v("Message")]):t._e(),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}},[t._v("Resolved")]),n("th",{attrs:{scope:"col"}})])])},Ty=[],Ny=N1(dy,Ry,Ty,!1,null,null);const qy=Ny.exports;function VR(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&VR(n)}),e}class Gu{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function kR(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function qr(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const M in r)n[M]=r[M]}),n}const Sy="",Fu=e=>!!e.scope,_y=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,M)=>`${r}${"_".repeat(M+1)}`)].join(" ")}return`${t}${e}`};class Ly{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=kR(t)}openNode(t){if(!Fu(t))return;const n=_y(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Fu(t)&&(this.buffer+=Sy)}value(){return this.buffer}span(t){this.buffer+=``}}const xu=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class jA{constructor(){this.rootNode=xu(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=xu({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{jA._collapse(n)}))}}class hy extends jA{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Ly(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function si(e){return e?typeof e=="string"?e:e.source:null}function $R(e){return Go("(?=",e,")")}function Iy(e){return Go("(?:",e,")*")}function Wy(e){return Go("(?:",e,")?")}function Go(...e){return e.map(n=>si(n)).join("")}function Cy(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function QA(...e){return"("+(Cy(e).capture?"":"?:")+e.map(r=>si(r)).join("|")+")"}function KR(e){return new RegExp(e.toString()+"|").exec("").length-1}function my(e,t){const n=e&&e.exec(t);return n&&n.index===0}const vy=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ZA(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const M=n;let O=si(r),a="";for(;O.length>0;){const b=vy.exec(O);if(!b){a+=O;break}a+=O.substring(0,b.index),O=O.substring(b.index+b[0].length),b[0][0]==="\\"&&b[1]?a+="\\"+String(Number(b[1])+M):(a+=b[0],b[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const gy=/\b\B/,JR="[a-zA-Z]\\w*",ez="[a-zA-Z_]\\w*",jR="\\b\\d+(\\.\\d+)?",QR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ZR="\\b(0b[01]+)",Dy="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Py=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Go(t,/.*\b/,e.binary,/\b.*/)),qr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Ai={begin:"\\\\[\\s\\S]",relevance:0},yy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ai]},By={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ai]},Uy={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Hc=function(e,t,n={}){const r=qr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const M=QA("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Go(/[ ]+/,"(",M,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Xy=Hc("//","$"),wy=Hc("/\\*","\\*/"),Hy=Hc("#","$"),Gy={scope:"number",begin:jR,relevance:0},Fy={scope:"number",begin:QR,relevance:0},xy={scope:"number",begin:ZR,relevance:0},Yy={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ai,{begin:/\[/,end:/\]/,relevance:0,contains:[Ai]}]},Vy={scope:"title",begin:JR,relevance:0},ky={scope:"title",begin:ez,relevance:0},$y={begin:"\\.\\s*"+ez,relevance:0},Ky=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var RO=Object.freeze({__proto__:null,APOS_STRING_MODE:yy,BACKSLASH_ESCAPE:Ai,BINARY_NUMBER_MODE:xy,BINARY_NUMBER_RE:ZR,COMMENT:Hc,C_BLOCK_COMMENT_MODE:wy,C_LINE_COMMENT_MODE:Xy,C_NUMBER_MODE:Fy,C_NUMBER_RE:QR,END_SAME_AS_BEGIN:Ky,HASH_COMMENT_MODE:Hy,IDENT_RE:JR,MATCH_NOTHING_RE:gy,METHOD_GUARD:$y,NUMBER_MODE:Gy,NUMBER_RE:jR,PHRASAL_WORDS_MODE:Uy,QUOTE_STRING_MODE:By,REGEXP_MODE:Yy,RE_STARTERS_RE:Dy,SHEBANG:Py,TITLE_MODE:Vy,UNDERSCORE_IDENT_RE:ez,UNDERSCORE_TITLE_MODE:ky});function Jy(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function jy(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Qy(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Jy,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Zy(e,t){Array.isArray(e.illegal)&&(e.illegal=QA(...e.illegal))}function eB(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function tB(e,t){e.relevance===void 0&&(e.relevance=1)}const nB=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Go(n.beforeMatch,$R(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},rB=["of","and","for","in","not","or","if","then","parent","list","value"],oB="keyword";function eT(e,t,n=oB){const r=Object.create(null);return typeof e=="string"?M(n,e.split(" ")):Array.isArray(e)?M(n,e):Object.keys(e).forEach(function(O){Object.assign(r,eT(e[O],t,O))}),r;function M(O,a){t&&(a=a.map(b=>b.toLowerCase())),a.forEach(function(b){const A=b.split("|");r[A[0]]=[O,MB(A[0],A[1])]})}}function MB(e,t){return t?Number(t):aB(e)?0:1}function aB(e){return rB.includes(e.toLowerCase())}const Yu={},Co=e=>{console.error(e)},Vu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},vM=(e,t)=>{Yu[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Yu[`${e}/${t}`]=!0)},uc=new Error;function tT(e,t,{key:n}){let r=0;const M=e[n],O={},a={};for(let b=1;b<=t.length;b++)a[b+r]=M[b],O[b+r]=!0,r+=KR(t[b-1]);e[n]=a,e[n]._emit=O,e[n]._multi=!0}function iB(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Co("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),uc;if(typeof e.beginScope!="object"||e.beginScope===null)throw Co("beginScope must be object"),uc;tT(e,e.begin,{key:"beginScope"}),e.begin=ZA(e.begin,{joinWith:""})}}function OB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Co("skip, excludeEnd, returnEnd not compatible with endScope: {}"),uc;if(typeof e.endScope!="object"||e.endScope===null)throw Co("endScope must be object"),uc;tT(e,e.end,{key:"endScope"}),e.end=ZA(e.end,{joinWith:""})}}function cB(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pB(e){cB(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),iB(e),OB(e)}function bB(e){function t(a,b){return new RegExp(si(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(b?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(b,A){A.position=this.position++,this.matchIndexes[this.matchAt]=A,this.regexes.push([A,b]),this.matchAt+=KR(b)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const b=this.regexes.map(A=>A[1]);this.matcherRe=t(ZA(b,{joinWith:"|"}),!0),this.lastIndex=0}exec(b){this.matcherRe.lastIndex=this.lastIndex;const A=this.matcherRe.exec(b);if(!A)return null;const u=A.findIndex((T,v)=>v>0&&T!==void 0),R=this.matchIndexes[u];return A.splice(0,u),Object.assign(A,R)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(b){if(this.multiRegexes[b])return this.multiRegexes[b];const A=new n;return this.rules.slice(b).forEach(([u,R])=>A.addRule(u,R)),A.compile(),this.multiRegexes[b]=A,A}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(b,A){this.rules.push([b,A]),A.type==="begin"&&this.count++}exec(b){const A=this.getMatcher(this.regexIndex);A.lastIndex=this.lastIndex;let u=A.exec(b);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const R=this.getMatcher(0);R.lastIndex=this.lastIndex+1,u=R.exec(b)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function M(a){const b=new r;return a.contains.forEach(A=>b.addRule(A.begin,{rule:A,type:"begin"})),a.terminatorEnd&&b.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&b.addRule(a.illegal,{type:"illegal"}),b}function O(a,b){const A=a;if(a.isCompiled)return A;[jy,eB,pB,nB].forEach(R=>R(a,b)),e.compilerExtensions.forEach(R=>R(a,b)),a.__beforeBegin=null,[Qy,Zy,tB].forEach(R=>R(a,b)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=eT(a.keywords,e.case_insensitive)),A.keywordPatternRe=t(u,!0),b&&(a.begin||(a.begin=/\B|\b/),A.beginRe=t(A.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(A.endRe=t(A.end)),A.terminatorEnd=si(A.end)||"",a.endsWithParent&&b.terminatorEnd&&(A.terminatorEnd+=(a.end?"|":"")+b.terminatorEnd)),a.illegal&&(A.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(R){return sB(R==="self"?a:R)})),a.contains.forEach(function(R){O(R,A)}),a.starts&&O(a.starts,b),A.matcher=M(A),A}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=qr(e.classNameAliases||{}),O(e)}function nT(e){return e?e.endsWithParent||nT(e.starts):!1}function sB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return qr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:nT(e)?qr(e,{starts:e.starts?qr(e.starts):null}):Object.isFrozen(e)?qr(e):e}var AB="11.11.1";class zB extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Tb=kR,ku=qr,$u=Symbol("nomatch"),EB=7,rT=function(e){const t=Object.create(null),n=Object.create(null),r=[];let M=!0;const O="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let b={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:hy};function A(F){return b.noHighlightRe.test(F)}function u(F){let O0=F.className+" ";O0+=F.parentNode?F.parentNode.className:"";const N0=b.languageDetectRe.exec(O0);if(N0){const l0=w0(N0[1]);return l0||(Vu(O.replace("{}",N0[1])),Vu("Falling back to no-highlight mode for this block.",F)),l0?N0[1]:"no-highlight"}return O0.split(/\s+/).find(l0=>A(l0)||w0(l0))}function R(F,O0,N0){let l0="",m0="";typeof O0=="object"?(l0=F,N0=O0.ignoreIllegals,m0=O0.language):(vM("10.7.0","highlight(lang, code, ...args) has been deprecated."),vM("10.7.0",`Please use highlight(code, options) instead. +`+a)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wo(this.defaults,n);const{transitional:r,paramsSerializer:M,headers:O}=n;r!==void 0&&BO.assertOptions(r,{silentJSONParsing:rt.transitional(rt.boolean),forcedJSONParsing:rt.transitional(rt.boolean),clarifyTimeoutError:rt.transitional(rt.boolean),legacyInterceptorReqResOrdering:rt.transitional(rt.boolean),advertiseZstdAcceptEncoding:rt.transitional(rt.boolean),validateStatusUndefinedResolves:rt.transitional(rt.boolean)},!1),M!=null&&(Z.isFunction(M)?n.paramsSerializer={serialize:M}:BO.assertOptions(M,{encode:rt.function,serialize:rt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),BO.assertOptions(n,{baseUrl:rt.spelling("baseURL"),withXsrfToken:rt.spelling("withXSRFToken")},!0),n.method=(Z.getSafeProp(n,"method")||Z.getSafeProp(this.defaults,"method")||"get").toLowerCase();let a=O&&Z.merge(O.common,O[n.method]);O&&Z.forEach(PR.concat("common"),m=>{delete O[m]}),n.headers=ot.concat(a,O);const b=[];let A=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(n)===!1)return;A=A&&P.synchronous;const k=n.transitional||kA;k&&k.legacyInterceptorReqResOrdering?b.unshift(P.fulfilled,P.rejected):b.push(P.fulfilled,P.rejected)});const u=[];this.interceptors.response.forEach(function(P){u.push(P.fulfilled,P.rejected)});let R,T=0,v;if(!A){const m=[Rb.bind(this),void 0];for(m.unshift(...b),m.push(...u),v=m.length,R=Promise.resolve(n);TRb.call(this,g)))}catch(W){R=Promise.reject(W)}break}}if(!R)try{R=Rb.call(this,g)}catch(m){R=Promise.reject(m)}for(T=0,v=u.length;T{if(!r._listeners)return;let O=r._listeners.length;for(;O-- >0;)r._listeners[O](M);r._listeners=null}),this.promise.then=M=>{let O;const a=new Promise(b=>{r.subscribe(b),O=b}).then(M);return a.cancel=function(){r.unsubscribe(O)},a},t(function(O,a,b){r.reason||(r.reason=new Si(O,a,b),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new xR(function(M){t=M}),cancel:t}}};function iy(e){return function(n){return e.apply(null,n)}}function Oy(e){return Z.isObject(e)&&e.isAxiosError===!0}const UO={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(UO).forEach(([e,t])=>{UO[t]===void 0&&(UO[t]=e)});function YR(e){const t=new Wo(e),n=ER(Wo.prototype.request,t);return Z.extend(n,Wo.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(M){return YR(wo(e,M))},n}const x1=YR(qi);x1.Axios=Wo;x1.CanceledError=Si;x1.CancelToken=ay;x1.isCancel=yR;x1.VERSION=KA;x1.toFormData=Xc;x1.AxiosError=G0;x1.Cancel=x1.CanceledError;x1.all=function(t){return Promise.all(t)};x1.spread=iy;x1.isAxiosError=Oy;x1.mergeConfig=wo;x1.AxiosHeaders=ot;x1.formToJSON=e=>DR(Z.isHTMLForm(e)?new FormData(e):e);x1.getAdapter=FR.getAdapter;x1.HttpStatusCode=UO;x1.default=x1;const{Axios:bY,AxiosError:sY,CanceledError:AY,isCancel:zY,CancelToken:EY,VERSION:uY,all:lY,Cancel:fY,isAxiosError:dY,spread:RY,toFormData:TY,AxiosHeaders:NY,HttpStatusCode:qY,formToJSON:SY,getAdapter:_Y,mergeConfig:LY,create:hY}=x1;function N1(e,t,n,r,M,O,a,b){var A=typeof e=="function"?e.options:e;return t&&(A.render=t,A.staticRenderFns=n,A._compiled=!0),O&&(A._scopeId="data-v-"+O),{exports:e,options:A}}const cy={methods:{recipientsCount(e){return f1.union(e.content.to?Object.keys(e.content.to):[],e.content.cc?Object.keys(e.content.cc):[],e.content.bcc?Object.keys(e.content.bcc):[],e.content.replyTo?Object.keys(e.content.replyTo):[]).length}}};var py=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Mail",resource:"mail"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("span",{attrs:{title:r.entry.content.mailable}},[t._v(t._s(t.truncate(r.entry.content.mailable||"-",70)))]),r.entry.content.queued?n("span",{staticClass:"badge badge-secondary ml-2"},[t._v(" Queued ")]):t._e(),n("br"),n("small",{staticClass:"text-muted",attrs:{title:r.entry.content.subject}},[t._v(" Subject: "+t._s(t.truncate(r.entry.content.subject,90))+" ")])]),n("td",{staticClass:"table-fit text-right text-muted"},[t._v(" "+t._s(t.recipientsCount(r.entry))+" ")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"mail-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Mailable")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Recipients")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},by=[],sy=N1(cy,py,by,!1,null,null);const Ay=sy.exports,zy={methods:{formatAddresses(e){return f1.chain(e).map((t,n)=>(t?"<"+t+"> ":"")+n).join(", ").value()}},data(){return{entry:null,batch:[]}}};var Ey=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Mail Details",resource:"mail",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Mailable")]),n("td",[t._v(" "+t._s(r.entry.content.mailable)+" "),r.entry.content.queued?n("span",{staticClass:"badge badge-secondary ml-2"},[t._v(" Queued ")]):t._e()])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("From")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.from))+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("To")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.to))+" ")])]),r.entry.replyTo?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Reply-To")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.replyTo))+" ")])]):t._e(),r.entry.cc?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("CC")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.cc))+" ")])]):t._e(),r.entry.bcc?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("BCC")]),n("td",[t._v(" "+t._s(t.formatAddresses(r.entry.content.bcc))+" ")])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Subject")]),n("td",[t._v(" "+t._s(r.entry.content.subject)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Download")]),n("td",[n("a",{attrs:{href:t.Telescope.basePath+"/telescope-api/mail/"+t.$route.params.id+"/download"}},[t._v("Download .eml file")])])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{staticClass:"mt-5"},[n("div",{staticClass:"card"},[n("iframe",{attrs:{src:t.Telescope.basePath+"/telescope-api/mail/"+t.$route.params.id+"/preview",width:"100%",height:"400"}})])])}}])})},uy=[],ly=N1(zy,Ey,uy,!1,null,"9cb6461b");const fy=ly.exports,dy={};var Ry=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Exceptions",resource:"exceptions"},scopedSlots:t._u([{key:"row",fn:function(r){return[t.$route.query.family_hash?t._e():n("td",{attrs:{title:r.entry.content.class}},[t._v(" "+t._s(t.truncate(r.entry.content.class,70))),n("br"),n("small",{staticClass:"text-muted"},[t._v(t._s(t.truncate(r.entry.content.message,100)))])]),!t.$route.query.family_hash&&!t.$route.query.tag?n("td",{staticClass:"table-fit text-right text-muted"},[n("span",[t._v(t._s(r.entry.content.occurrences))])]):t._e(),t.$route.query.family_hash?n("td",{attrs:{title:r.entry.content.message}},[t._v(" "+t._s(t.truncate(r.entry.content.message,80))),n("br"),n("small",{staticClass:"text-muted"},[r.entry.content.user&&r.entry.content.user.email?n("span",[t._v(" User: "+t._s(r.entry.content.user.email)+" ("+t._s(r.entry.content.user.id)+") ")]):n("span",[t._v(" User: N/A ")])])]):t._e(),n("td",{staticClass:"table-fit text-right text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[r.entry.content.resolved_at?n("div",{attrs:{"data-timeago":r.entry.content.resolved_at,title:r.entry.content.resolved_at}},[t._v(" "+t._s(t.timeAgo(r.entry.content.resolved_at))+" ")]):t._e(),r.entry.content.resolved_at?t._e():n("div",{staticClass:"control-action text-center"},[n("svg",{attrs:{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[n("path",{attrs:{fill:"#ef5753",d:"M2.92893219,17.0710678 C6.83417511,20.9763107 13.1658249,20.9763107 17.0710678,17.0710678 C20.9763107,13.1658249 20.9763107,6.83417511 17.0710678,2.92893219 C13.1658249,-0.976310729 6.83417511,-0.976310729 2.92893219,2.92893219 C-0.976310729,6.83417511 -0.976310729,13.1658249 2.92893219,17.0710678 Z M9,5 L11,5 L11,11 L9,11 L9,5 Z M9,13 L11,13 L11,15 L9,15 L9,13 Z",id:"Combined-Shape"}})])])]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"exception-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[t.$route.query.family_hash?t._e():n("th",{attrs:{scope:"col"}},[t._v("Type")]),!t.$route.query.family_hash&&!t.$route.query.tag?n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("#")]):t._e(),t.$route.query.family_hash?n("th",{attrs:{scope:"col"}},[t._v("Message")]):t._e(),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}},[t._v("Resolved")]),n("th",{attrs:{scope:"col"}})])])},Ty=[],Ny=N1(dy,Ry,Ty,!1,null,null);const qy=Ny.exports;function VR(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&VR(n)}),e}class Gu{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function kR(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function qr(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const M in r)n[M]=r[M]}),n}const Sy="",Fu=e=>!!e.scope,_y=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,M)=>`${r}${"_".repeat(M+1)}`)].join(" ")}return`${t}${e}`};class Ly{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=kR(t)}openNode(t){if(!Fu(t))return;const n=_y(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Fu(t)&&(this.buffer+=Sy)}value(){return this.buffer}span(t){this.buffer+=``}}const xu=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class jA{constructor(){this.rootNode=xu(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=xu({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{jA._collapse(n)}))}}class hy extends jA{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Ly(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function si(e){return e?typeof e=="string"?e:e.source:null}function $R(e){return Go("(?=",e,")")}function Iy(e){return Go("(?:",e,")*")}function Wy(e){return Go("(?:",e,")?")}function Go(...e){return e.map(n=>si(n)).join("")}function Cy(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function QA(...e){return"("+(Cy(e).capture?"":"?:")+e.map(r=>si(r)).join("|")+")"}function KR(e){return new RegExp(e.toString()+"|").exec("").length-1}function my(e,t){const n=e&&e.exec(t);return n&&n.index===0}const vy=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ZA(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const M=n;let O=si(r),a="";for(;O.length>0;){const b=vy.exec(O);if(!b){a+=O;break}a+=O.substring(0,b.index),O=O.substring(b.index+b[0].length),b[0][0]==="\\"&&b[1]?a+="\\"+String(Number(b[1])+M):(a+=b[0],b[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const gy=/\b\B/,JR="[a-zA-Z]\\w*",ez="[a-zA-Z_]\\w*",jR="\\b\\d+(\\.\\d+)?",QR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ZR="\\b(0b[01]+)",Dy="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Py=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Go(t,/.*\b/,e.binary,/\b.*/)),qr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Ai={begin:"\\\\[\\s\\S]",relevance:0},yy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ai]},By={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ai]},Uy={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Hc=function(e,t,n={}){const r=qr({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const M=QA("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Go(/[ ]+/,"(",M,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Xy=Hc("//","$"),wy=Hc("/\\*","\\*/"),Hy=Hc("#","$"),Gy={scope:"number",begin:jR,relevance:0},Fy={scope:"number",begin:QR,relevance:0},xy={scope:"number",begin:ZR,relevance:0},Yy={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ai,{begin:/\[/,end:/\]/,relevance:0,contains:[Ai]}]},Vy={scope:"title",begin:JR,relevance:0},ky={scope:"title",begin:ez,relevance:0},$y={begin:"\\.\\s*"+ez,relevance:0},Ky=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var RO=Object.freeze({__proto__:null,APOS_STRING_MODE:yy,BACKSLASH_ESCAPE:Ai,BINARY_NUMBER_MODE:xy,BINARY_NUMBER_RE:ZR,COMMENT:Hc,C_BLOCK_COMMENT_MODE:wy,C_LINE_COMMENT_MODE:Xy,C_NUMBER_MODE:Fy,C_NUMBER_RE:QR,END_SAME_AS_BEGIN:Ky,HASH_COMMENT_MODE:Hy,IDENT_RE:JR,MATCH_NOTHING_RE:gy,METHOD_GUARD:$y,NUMBER_MODE:Gy,NUMBER_RE:jR,PHRASAL_WORDS_MODE:Uy,QUOTE_STRING_MODE:By,REGEXP_MODE:Yy,RE_STARTERS_RE:Dy,SHEBANG:Py,TITLE_MODE:Vy,UNDERSCORE_IDENT_RE:ez,UNDERSCORE_TITLE_MODE:ky});function Jy(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function jy(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Qy(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Jy,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Zy(e,t){Array.isArray(e.illegal)&&(e.illegal=QA(...e.illegal))}function eB(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function tB(e,t){e.relevance===void 0&&(e.relevance=1)}const nB=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Go(n.beforeMatch,$R(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},rB=["of","and","for","in","not","or","if","then","parent","list","value"],oB="keyword";function eT(e,t,n=oB){const r=Object.create(null);return typeof e=="string"?M(n,e.split(" ")):Array.isArray(e)?M(n,e):Object.keys(e).forEach(function(O){Object.assign(r,eT(e[O],t,O))}),r;function M(O,a){t&&(a=a.map(b=>b.toLowerCase())),a.forEach(function(b){const A=b.split("|");r[A[0]]=[O,MB(A[0],A[1])]})}}function MB(e,t){return t?Number(t):aB(e)?0:1}function aB(e){return rB.includes(e.toLowerCase())}const Yu={},Co=e=>{console.error(e)},Vu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},vM=(e,t)=>{Yu[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Yu[`${e}/${t}`]=!0)},uc=new Error;function tT(e,t,{key:n}){let r=0;const M=e[n],O={},a={};for(let b=1;b<=t.length;b++)a[b+r]=M[b],O[b+r]=!0,r+=KR(t[b-1]);e[n]=a,e[n]._emit=O,e[n]._multi=!0}function iB(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Co("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),uc;if(typeof e.beginScope!="object"||e.beginScope===null)throw Co("beginScope must be object"),uc;tT(e,e.begin,{key:"beginScope"}),e.begin=ZA(e.begin,{joinWith:""})}}function OB(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Co("skip, excludeEnd, returnEnd not compatible with endScope: {}"),uc;if(typeof e.endScope!="object"||e.endScope===null)throw Co("endScope must be object"),uc;tT(e,e.end,{key:"endScope"}),e.end=ZA(e.end,{joinWith:""})}}function cB(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pB(e){cB(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),iB(e),OB(e)}function bB(e){function t(a,b){return new RegExp(si(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(b?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(b,A){A.position=this.position++,this.matchIndexes[this.matchAt]=A,this.regexes.push([A,b]),this.matchAt+=KR(b)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const b=this.regexes.map(A=>A[1]);this.matcherRe=t(ZA(b,{joinWith:"|"}),!0),this.lastIndex=0}exec(b){this.matcherRe.lastIndex=this.lastIndex;const A=this.matcherRe.exec(b);if(!A)return null;const u=A.findIndex((T,v)=>v>0&&T!==void 0),R=this.matchIndexes[u];return A.splice(0,u),Object.assign(A,R)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(b){if(this.multiRegexes[b])return this.multiRegexes[b];const A=new n;return this.rules.slice(b).forEach(([u,R])=>A.addRule(u,R)),A.compile(),this.multiRegexes[b]=A,A}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(b,A){this.rules.push([b,A]),A.type==="begin"&&this.count++}exec(b){const A=this.getMatcher(this.regexIndex);A.lastIndex=this.lastIndex;let u=A.exec(b);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const R=this.getMatcher(0);R.lastIndex=this.lastIndex+1,u=R.exec(b)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function M(a){const b=new r;return a.contains.forEach(A=>b.addRule(A.begin,{rule:A,type:"begin"})),a.terminatorEnd&&b.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&b.addRule(a.illegal,{type:"illegal"}),b}function O(a,b){const A=a;if(a.isCompiled)return A;[jy,eB,pB,nB].forEach(R=>R(a,b)),e.compilerExtensions.forEach(R=>R(a,b)),a.__beforeBegin=null,[Qy,Zy,tB].forEach(R=>R(a,b)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=eT(a.keywords,e.case_insensitive)),A.keywordPatternRe=t(u,!0),b&&(a.begin||(a.begin=/\B|\b/),A.beginRe=t(A.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(A.endRe=t(A.end)),A.terminatorEnd=si(A.end)||"",a.endsWithParent&&b.terminatorEnd&&(A.terminatorEnd+=(a.end?"|":"")+b.terminatorEnd)),a.illegal&&(A.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(R){return sB(R==="self"?a:R)})),a.contains.forEach(function(R){O(R,A)}),a.starts&&O(a.starts,b),A.matcher=M(A),A}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=qr(e.classNameAliases||{}),O(e)}function nT(e){return e?e.endsWithParent||nT(e.starts):!1}function sB(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return qr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:nT(e)?qr(e,{starts:e.starts?qr(e.starts):null}):Object.isFrozen(e)?qr(e):e}var AB="11.11.1";class zB extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Tb=kR,ku=qr,$u=Symbol("nomatch"),EB=7,rT=function(e){const t=Object.create(null),n=Object.create(null),r=[];let M=!0;const O="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let b={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:hy};function A(F){return b.noHighlightRe.test(F)}function u(F){let O0=F.className+" ";O0+=F.parentNode?F.parentNode.className:"";const N0=b.languageDetectRe.exec(O0);if(N0){const l0=w0(N0[1]);return l0||(Vu(O.replace("{}",N0[1])),Vu("Falling back to no-highlight mode for this block.",F)),l0?N0[1]:"no-highlight"}return O0.split(/\s+/).find(l0=>A(l0)||w0(l0))}function R(F,O0,N0){let l0="",m0="";typeof O0=="object"?(l0=F,N0=O0.ignoreIllegals,m0=O0.language):(vM("10.7.0","highlight(lang, code, ...args) has been deprecated."),vM("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),m0=F,l0=O0),N0===void 0&&(N0=!0);const L0={code:l0,language:m0};G("before:highlight",L0);const R0=L0.result?L0.result:T(L0.language,L0.code,N0);return R0.code=L0.code,G("after:highlight",R0),R0}function T(F,O0,N0,l0){const m0=Object.create(null);function L0(P0,e1){return P0.keywords[e1]}function R0(){if(!s0.keywords){n1.addText(V0);return}let P0=0;s0.keywordPatternRe.lastIndex=0;let e1=s0.keywordPatternRe.exec(V0),l1="";for(;e1;){l1+=V0.substring(P0,e1.index);const h1=f0.case_insensitive?e1[0].toLowerCase():e1[0],j1=L0(s0,h1);if(j1){const[Be,yt]=j1;if(n1.addText(l1),l1="",m0[h1]=(m0[h1]||0)+1,m0[h1]<=EB&&(R1+=yt),Be.startsWith("_"))l1+=e1[0];else{const xe=f0.classNameAliases[Be]||Be;a1(e1[0],xe)}}else l1+=e1[0];P0=s0.keywordPatternRe.lastIndex,e1=s0.keywordPatternRe.exec(V0)}l1+=V0.substring(P0),n1.addText(l1)}function M1(){if(V0==="")return;let P0=null;if(typeof s0.subLanguage=="string"){if(!t[s0.subLanguage]){n1.addText(V0);return}P0=T(s0.subLanguage,V0,!0,p1[s0.subLanguage]),p1[s0.subLanguage]=P0._top}else P0=g(V0,s0.subLanguage.length?s0.subLanguage:null);s0.relevance>0&&(R1+=P0.relevance),n1.__addSublanguage(P0._emitter,P0.language)}function Z0(){s0.subLanguage!=null?M1():R0(),V0=""}function a1(P0,e1){P0!==""&&(n1.startScope(e1),n1.addText(P0),n1.endScope())}function U1(P0,e1){let l1=1;const h1=e1.length-1;for(;l1<=h1;){if(!P0._emit[l1]){l1++;continue}const j1=f0.classNameAliases[P0[l1]]||P0[l1],Be=e1[l1];j1?a1(Be,j1):(V0=Be,R0(),V0=""),l1++}}function H0(P0,e1){return P0.scope&&typeof P0.scope=="string"&&n1.openNode(f0.classNameAliases[P0.scope]||P0.scope),P0.beginScope&&(P0.beginScope._wrap?(a1(V0,f0.classNameAliases[P0.beginScope._wrap]||P0.beginScope._wrap),V0=""):P0.beginScope._multi&&(U1(P0.beginScope,e1),V0="")),s0=Object.create(P0,{parent:{value:s0}}),s0}function S1(P0,e1,l1){let h1=my(P0.endRe,l1);if(h1){if(P0["on:end"]){const j1=new Gu(P0);P0["on:end"](e1,j1),j1.isMatchIgnored&&(h1=!1)}if(h1){for(;P0.endsParent&&P0.parent;)P0=P0.parent;return P0}}if(P0.endsWithParent)return S1(P0.parent,e1,l1)}function Y1(P0){return s0.matcher.regexIndex===0?(V0+=P0[0],1):(j0=!0,0)}function V1(P0){const e1=P0[0],l1=P0.rule,h1=new Gu(l1),j1=[l1.__beforeBegin,l1["on:begin"]];for(const Be of j1)if(Be&&(Be(P0,h1),h1.isMatchIgnored))return Y1(e1);return l1.skip?V0+=e1:(l1.excludeBegin&&(V0+=e1),Z0(),!l1.returnBegin&&!l1.excludeBegin&&(V0=e1)),H0(l1,P0),l1.returnBegin?0:e1.length}function Ke(P0){const e1=P0[0],l1=O0.substring(P0.index),h1=S1(s0,P0,l1);if(!h1)return $u;const j1=s0;s0.endScope&&s0.endScope._wrap?(Z0(),a1(e1,s0.endScope._wrap)):s0.endScope&&s0.endScope._multi?(Z0(),U1(s0.endScope,P0)):j1.skip?V0+=e1:(j1.returnEnd||j1.excludeEnd||(V0+=e1),Z0(),j1.excludeEnd&&(V0=e1));do s0.scope&&n1.closeNode(),!s0.skip&&!s0.subLanguage&&(R1+=s0.relevance),s0=s0.parent;while(s0!==h1.parent);return h1.starts&&H0(h1.starts,P0),j1.returnEnd?0:e1.length}function G1(){const P0=[];for(let e1=s0;e1!==f0;e1=e1.parent)e1.scope&&P0.unshift(e1.scope);P0.forEach(e1=>n1.openNode(e1))}let Y={};function S0(P0,e1){const l1=e1&&e1[0];if(V0+=P0,l1==null)return Z0(),0;if(Y.type==="begin"&&e1.type==="end"&&Y.index===e1.index&&l1===""){if(V0+=O0.slice(e1.index,e1.index+1),!M){const h1=new Error(`0 width match regex (${F})`);throw h1.languageName=F,h1.badRule=Y.rule,h1}return 1}if(Y=e1,e1.type==="begin")return V1(e1);if(e1.type==="illegal"&&!N0){const h1=new Error('Illegal lexeme "'+l1+'" for mode "'+(s0.scope||"")+'"');throw h1.mode=s0,h1}else if(e1.type==="end"){const h1=Ke(e1);if(h1!==$u)return h1}if(e1.type==="illegal"&&l1==="")return V0+=` `,1;if(fe>1e5&&fe>e1.index*3)throw new Error("potential infinite loop, way more iterations than matches");return V0+=l1,l1.length}const f0=w0(F);if(!f0)throw Co(O.replace("{}",F)),new Error('Unknown language: "'+F+'"');const y0=bB(f0);let $0="",s0=l0||y0;const p1={},n1=new b.__emitter(b);G1();let V0="",R1=0,pe=0,fe=0,j0=!1;try{if(f0.__emitTokens)f0.__emitTokens(O0,n1);else{for(s0.matcher.considerAll();;){fe++,j0?j0=!1:s0.matcher.considerAll(),s0.matcher.lastIndex=pe;const P0=s0.matcher.exec(O0);if(!P0)break;const e1=O0.substring(pe,P0.index),l1=S0(e1,P0);pe=P0.index+l1}S0(O0.substring(pe))}return n1.finalize(),$0=n1.toHTML(),{language:F,value:$0,relevance:R1,illegal:!1,_emitter:n1,_top:s0}}catch(P0){if(P0.message&&P0.message.includes("Illegal"))return{language:F,value:Tb(O0),illegal:!0,relevance:0,_illegalBy:{message:P0.message,index:pe,context:O0.slice(pe-100,pe+100),mode:P0.mode,resultSoFar:$0},_emitter:n1};if(M)return{language:F,value:Tb(O0),illegal:!1,relevance:0,errorRaised:P0,_emitter:n1,_top:s0};throw P0}}function v(F){const O0={value:Tb(F),illegal:!1,relevance:0,_top:a,_emitter:new b.__emitter(b)};return O0._emitter.addText(F),O0}function g(F,O0){O0=O0||b.languages||Object.keys(t);const N0=v(F),l0=O0.filter(w0).filter(O1).map(Z0=>T(Z0,F,!1));l0.unshift(N0);const m0=l0.sort((Z0,a1)=>{if(Z0.relevance!==a1.relevance)return a1.relevance-Z0.relevance;if(Z0.language&&a1.language){if(w0(Z0.language).supersetOf===a1.language)return 1;if(w0(a1.language).supersetOf===Z0.language)return-1}return 0}),[L0,R0]=m0,M1=L0;return M1.secondBest=R0,M1}function m(F,O0,N0){const l0=O0&&n[O0]||N0;F.classList.add("hljs"),F.classList.add(`language-${l0}`)}function P(F){let O0=null;const N0=u(F);if(A(N0))return;if(G("before:highlightElement",{el:F,language:N0}),F.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",F);return}if(F.children.length>0&&(b.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(F)),b.throwUnescapedHTML))throw new zB("One of your code blocks includes unescaped HTML.",F.innerHTML);O0=F;const l0=O0.textContent,m0=N0?R(l0,{language:N0,ignoreIllegals:!0}):g(l0);F.innerHTML=m0.value,F.dataset.highlighted="yes",m(F,N0,m0.language),F.result={language:m0.language,re:m0.relevance,relevance:m0.relevance},m0.secondBest&&(F.secondBest={language:m0.secondBest.language,relevance:m0.secondBest.relevance}),G("after:highlightElement",{el:F,result:m0,text:l0})}function k(F){b=ku(b,F)}const W=()=>{j(),vM("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function K(){j(),vM("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let c0=!1;function j(){function F(){j()}if(document.readyState==="loading"){c0||window.addEventListener("DOMContentLoaded",F,!1),c0=!0;return}document.querySelectorAll(b.cssSelector).forEach(P)}function W0(F,O0){let N0=null;try{N0=O0(e)}catch(l0){if(Co("Language definition for '{}' could not be registered.".replace("{}",F)),M)Co(l0);else throw l0;N0=a}N0.name||(N0.name=F),t[F]=N0,N0.rawDefinition=O0.bind(null,e),N0.aliases&&F0(N0.aliases,{languageName:F})}function g0(F){delete t[F];for(const O0 of Object.keys(n))n[O0]===F&&delete n[O0]}function E(){return Object.keys(t)}function w0(F){return F=(F||"").toLowerCase(),t[F]||t[n[F]]}function F0(F,{languageName:O0}){typeof F=="string"&&(F=[F]),F.forEach(N0=>{n[N0.toLowerCase()]=O0})}function O1(F){const O0=w0(F);return O0&&!O0.disableAutodetect}function g1(F){F["before:highlightBlock"]&&!F["before:highlightElement"]&&(F["before:highlightElement"]=O0=>{F["before:highlightBlock"](Object.assign({block:O0.el},O0))}),F["after:highlightBlock"]&&!F["after:highlightElement"]&&(F["after:highlightElement"]=O0=>{F["after:highlightBlock"](Object.assign({block:O0.el},O0))})}function n0(F){g1(F),r.push(F)}function S(F){const O0=r.indexOf(F);O0!==-1&&r.splice(O0,1)}function G(F,O0){const N0=F;r.forEach(function(l0){l0[N0]&&l0[N0](O0)})}function t0(F){return vM("10.7.0","highlightBlock will be removed entirely in v12.0"),vM("10.7.0","Please use highlightElement now."),P(F)}Object.assign(e,{highlight:R,highlightAuto:g,highlightAll:j,highlightElement:P,highlightBlock:t0,configure:k,initHighlighting:W,initHighlightingOnLoad:K,registerLanguage:W0,unregisterLanguage:g0,listLanguages:E,getLanguage:w0,registerAliases:F0,autoDetection:O1,inherit:ku,addPlugin:n0,removePlugin:S}),e.debugMode=function(){M=!1},e.safeMode=function(){M=!0},e.versionString=AB,e.regex={concat:Go,lookahead:$R,either:QA,optional:Wy,anyNumberOfTimes:Iy};for(const F in RO)typeof RO[F]=="object"&&VR(RO[F]);return Object.assign(e,RO),e},JM=rT({});JM.newInstance=()=>rT({});var uB=JM;JM.HighlightJS=JM;JM.default=JM;const Gc=Ma(uB);function lB(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),M=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),O=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+r},b={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},A={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),R=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(A)}),T={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(A),"on:begin":(G,t0)=>{t0.data._beginMatch=G[1]||G[2]},"on:end":(G,t0)=>{t0.data._beginMatch!==G[1]&&t0.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[ ]`,m={scope:"string",variants:[R,u,T,v]},P={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],W=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],K=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:W,literal:(G=>{const t0=[];return G.forEach(F=>{t0.push(F),F.toLowerCase()===F?t0.push(F.toUpperCase()):t0.push(F.toLowerCase())}),t0})(k),built_in:K},W0=G=>G.map(t0=>t0.replace(/\|\d+$/,"")),g0={variants:[{match:[/new/,t.concat(g,"+"),t.concat("(?!",W0(K).join("\\b|"),"\\b)"),M],scope:{1:"keyword",4:"title.class"}}]},E=t.concat(r,"\\b(?!\\()"),w0={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[M,t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{1:"title.class",3:"variable.constant"}},{match:[M,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[M,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},F0={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},O1={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[F0,a,w0,e.C_BLOCK_COMMENT_MODE,m,P,g0]},g1={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",W0(W).join("\\b|"),"|",W0(K).join("\\b|"),"\\b)"),r,t.concat(g,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O1]};O1.contains.push(g1);const n0=[F0,w0,e.C_BLOCK_COMMENT_MODE,m,P,g0],S={begin:t.concat(/#\[\s*\\?/,t.either(M,O)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...n0]},...n0,{scope:"meta",variants:[{match:M},{match:O}]}]};return{case_insensitive:!1,keywords:j,contains:[S,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},b,{scope:"variable.language",match:/\$this\b/},a,g1,w0,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g0,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",S,a,w0,e.C_BLOCK_COMMENT_MODE,m,P]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},m,P]}}Gc.registerLanguage("php",lB);const fB={props:["lines","highlightedLine"],methods:{highlight(e,t){return t==this.highlightedLine?e:Gc.highlight(e,{language:"php"}).value}}};var dB=function(){var t=this,n=t._self._c;return n("pre",{staticClass:"code-bg px-4 mb-0 text-white"},[t._v(" "),t._l(t.lines,function(r,M){return n("p",{key:M,staticClass:"mb-0",class:{highlight:M==t.highlightedLine}},[n("span",{staticClass:"mr-4"},[t._v(t._s(M))]),t._v(" "),n("span",{domProps:{innerHTML:t._s(t.highlight(r,M))}})])}),t._v(` @@ -87,7 +87,7 @@ If possible, please select a more specific dialect (like sqlite, postgresql, etc `)},a.prototype.displayStateStack=function(u,R){for(var T,v=0,g=0;g0&&R.push(" ^ "+v+" more lines identical to this"),v=0,R.push(" "+P)),T=P}},a.prototype.getSymbolDisplay=function(u){return b(u)},a.prototype.buildFirstStateStack=function(u,R){if(R.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var T=u.wantedBy[0],v=[u].concat(R),g=this.buildFirstStateStack(T,v);return g===null?null:[u].concat(g)},a.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},a.prototype.restore=function(u){var R=u.index;this.current=R,this.table[R]=u,this.table.splice(R+1),this.lexerState=u.lexerState,this.results=this.finish()},a.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},a.prototype.finish=function(){var u=[],R=this.grammar.start,T=this.table[this.table.length-1];return T.states.forEach(function(v){v.rule.name===R&&v.dot===v.rule.symbols.length&&v.reference===0&&v.data!==a.fail&&u.push(v)}),u.map(function(v){return v.data})};function b(u){var R=typeof u;if(R==="string")return u;if(R==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function A(u){var R=typeof u;if(R==="string")return u;if(R==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:a,Grammar:M,Rule:t}})})(bT);var AH=bT.exports;const zH=Ma(AH);function EH(e){return e.map(uH).map(lH).map(fH).map(dH).map(RH)}const uH=(e,t,n)=>{if(MT(e.type)){const r=TH(n,t);if(r&&r.type===_0.PROPERTY_ACCESS_OPERATOR)return Object.assign(Object.assign({},e),{type:_0.IDENTIFIER,text:e.raw});const M=sa(n,t);if(M&&M.type===_0.PROPERTY_ACCESS_OPERATOR)return Object.assign(Object.assign({},e),{type:_0.IDENTIFIER,text:e.raw})}return e},lH=(e,t,n)=>{if(e.type===_0.RESERVED_FUNCTION_NAME){const r=sa(n,t);if(!r||!sT(r))return Object.assign(Object.assign({},e),{type:_0.IDENTIFIER,text:e.raw})}return e},fH=(e,t,n)=>{if(e.type===_0.RESERVED_DATA_TYPE){const r=sa(n,t);if(r&&sT(r))return Object.assign(Object.assign({},e),{type:_0.RESERVED_PARAMETERIZED_DATA_TYPE})}return e},dH=(e,t,n)=>{if(e.type===_0.IDENTIFIER){const r=sa(n,t);if(r&&AT(r))return Object.assign(Object.assign({},e),{type:_0.ARRAY_IDENTIFIER})}return e},RH=(e,t,n)=>{if(e.type===_0.RESERVED_DATA_TYPE){const r=sa(n,t);if(r&&AT(r))return Object.assign(Object.assign({},e),{type:_0.ARRAY_KEYWORD})}return e},TH=(e,t)=>sa(e,t,-1),sa=(e,t,n=1)=>{let r=1;for(;e[t+r*n]&&NH(e[t+r*n]);)r++;return e[t+r*n]},sT=e=>e.type===_0.OPEN_PAREN&&e.text==="(",AT=e=>e.type===_0.OPEN_PAREN&&e.text==="[",NH=e=>e.type===_0.BLOCK_COMMENT||e.type===_0.LINE_COMMENT;class zT{constructor(t){this.tokenize=t,this.index=0,this.tokens=[],this.input=""}reset(t,n){this.input=t,this.index=0,this.tokens=this.tokenize(t)}next(){return this.tokens[this.index++]}save(){}formatError(t){const{line:n,col:r}=pT(this.input,t.start);return`Parse error at token: ${t.text} at line ${n} column ${r}`}has(t){return t in _0}}var r1;(function(e){e.statement="statement",e.clause="clause",e.set_operation="set_operation",e.function_call="function_call",e.parameterized_data_type="parameterized_data_type",e.array_subscript="array_subscript",e.property_access="property_access",e.parenthesis="parenthesis",e.between_predicate="between_predicate",e.case_expression="case_expression",e.case_when="case_when",e.case_else="case_else",e.limit_clause="limit_clause",e.all_columns_asterisk="all_columns_asterisk",e.literal="literal",e.identifier="identifier",e.keyword="keyword",e.data_type="data_type",e.parameter="parameter",e.operator="operator",e.comma="comma",e.line_comment="line_comment",e.block_comment="block_comment",e.disable_comment="disable_comment"})(r1=r1||(r1={}));function Fb(e){return e[0]}const u1=new zT(e=>[]),No=([[e]])=>e,He=e=>({type:r1.keyword,tokenType:e.type,text:e.text,raw:e.raw}),ql=e=>({type:r1.data_type,text:e.text,raw:e.raw}),Ge=(e,{leading:t,trailing:n})=>(t!=null&&t.length&&(e=Object.assign(Object.assign({},e),{leadingComments:t})),n!=null&&n.length&&(e=Object.assign(Object.assign({},e),{trailingComments:n})),e),qH=(e,{leading:t,trailing:n})=>{if(t!=null&&t.length){const[r,...M]=e;e=[Ge(r,{leading:t}),...M]}if(n!=null&&n.length){const r=e.slice(0,-1),M=e[e.length-1];e=[...r,Ge(M,{trailing:n})]}return e},SH={Lexer:u1,ParserRules:[{name:"main$ebnf$1",symbols:[]},{name:"main$ebnf$1",symbols:["main$ebnf$1","statement"],postprocess:e=>e[0].concat([e[1]])},{name:"main",symbols:["main$ebnf$1"],postprocess:([e])=>{const t=e[e.length-1];return t&&!t.hasSemicolon?t.children.length>0?e:e.slice(0,-1):e}},{name:"statement$subexpression$1",symbols:[u1.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[u1.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([e,[t]])=>({type:r1.statement,children:e,hasSemicolon:t.type===_0.DELIMITER})},{name:"expressions_or_clauses$ebnf$1",symbols:[]},{name:"expressions_or_clauses$ebnf$1",symbols:["expressions_or_clauses$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses$ebnf$2",symbols:[]},{name:"expressions_or_clauses$ebnf$2",symbols:["expressions_or_clauses$ebnf$2","clause"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses",symbols:["expressions_or_clauses$ebnf$1","expressions_or_clauses$ebnf$2"],postprocess:([e,t])=>[...e,...t]},{name:"clause$subexpression$1",symbols:["limit_clause"]},{name:"clause$subexpression$1",symbols:["select_clause"]},{name:"clause$subexpression$1",symbols:["other_clause"]},{name:"clause$subexpression$1",symbols:["set_operation"]},{name:"clause",symbols:["clause$subexpression$1"],postprocess:No},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["free_form_sql"]},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"limit_clause$ebnf$1$subexpression$1",symbols:[u1.has("COMMA")?{type:"COMMA"}:COMMA,"limit_clause$ebnf$1$subexpression$1$ebnf$1"]},{name:"limit_clause$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1"],postprocess:Fb},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[u1.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([e,t,n,r])=>{if(r){const[M,O]=r;return{type:r1.limit_clause,limitKw:Ge(He(e),{trailing:t}),offset:n,count:O}}else return{type:r1.limit_clause,limitKw:Ge(He(e),{trailing:t}),count:n}}},{name:"select_clause$subexpression$1$ebnf$1",symbols:[]},{name:"select_clause$subexpression$1$ebnf$1",symbols:["select_clause$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["all_columns_asterisk","select_clause$subexpression$1$ebnf$1"]},{name:"select_clause$subexpression$1$ebnf$2",symbols:[]},{name:"select_clause$subexpression$1$ebnf$2",symbols:["select_clause$subexpression$1$ebnf$2","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["asteriskless_free_form_sql","select_clause$subexpression$1$ebnf$2"]},{name:"select_clause",symbols:[u1.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([e,[t,n]])=>({type:r1.clause,nameKw:He(e),children:[t,...n]})},{name:"select_clause",symbols:[u1.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([e])=>({type:r1.clause,nameKw:He(e),children:[]})},{name:"all_columns_asterisk",symbols:[u1.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:r1.all_columns_asterisk})},{name:"other_clause$ebnf$1",symbols:[]},{name:"other_clause$ebnf$1",symbols:["other_clause$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"other_clause",symbols:[u1.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([e,t])=>({type:r1.clause,nameKw:He(e),children:t})},{name:"set_operation$ebnf$1",symbols:[]},{name:"set_operation$ebnf$1",symbols:["set_operation$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"set_operation",symbols:[u1.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([e,t])=>({type:r1.set_operation,nameKw:He(e),children:t})},{name:"expression_chain_$ebnf$1",symbols:["expression_with_comments_"]},{name:"expression_chain_$ebnf$1",symbols:["expression_chain_$ebnf$1","expression_with_comments_"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain_",symbols:["expression_chain_$ebnf$1"],postprocess:Fb},{name:"expression_chain$ebnf$1",symbols:[]},{name:"expression_chain$ebnf$1",symbols:["expression_chain$ebnf$1","_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain",symbols:["expression","expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"andless_expression_chain$ebnf$1",symbols:[]},{name:"andless_expression_chain$ebnf$1",symbols:["andless_expression_chain$ebnf$1","_andless_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"andless_expression_chain",symbols:["andless_expression","andless_expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([e,t])=>Ge(e,{trailing:t})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([e,t])=>Ge(t,{leading:e})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([e,t])=>Ge(t,{leading:e})},{name:"free_form_sql$subexpression$1",symbols:["asteriskless_free_form_sql"]},{name:"free_form_sql$subexpression$1",symbols:["asterisk"]},{name:"free_form_sql",symbols:["free_form_sql$subexpression$1"],postprocess:No},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["logic_operator"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comma"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comment"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["other_keyword"]},{name:"asteriskless_free_form_sql",symbols:["asteriskless_free_form_sql$subexpression$1"],postprocess:No},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:No},{name:"andless_expression$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"andless_expression$subexpression$1",symbols:["asterisk"]},{name:"andless_expression",symbols:["andless_expression$subexpression$1"],postprocess:No},{name:"asteriskless_andless_expression$subexpression$1",symbols:["atomic_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:No},{name:"atomic_expression$subexpression$1",symbols:["array_subscript"]},{name:"atomic_expression$subexpression$1",symbols:["function_call"]},{name:"atomic_expression$subexpression$1",symbols:["property_access"]},{name:"atomic_expression$subexpression$1",symbols:["parenthesis"]},{name:"atomic_expression$subexpression$1",symbols:["curly_braces"]},{name:"atomic_expression$subexpression$1",symbols:["square_brackets"]},{name:"atomic_expression$subexpression$1",symbols:["operator"]},{name:"atomic_expression$subexpression$1",symbols:["identifier"]},{name:"atomic_expression$subexpression$1",symbols:["parameter"]},{name:"atomic_expression$subexpression$1",symbols:["literal"]},{name:"atomic_expression$subexpression$1",symbols:["data_type"]},{name:"atomic_expression$subexpression$1",symbols:["keyword"]},{name:"atomic_expression",symbols:["atomic_expression$subexpression$1"],postprocess:No},{name:"array_subscript",symbols:[u1.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([e,t,n])=>({type:r1.array_subscript,array:Ge({type:r1.identifier,quoted:!1,text:e.text},{trailing:t}),parenthesis:n})},{name:"array_subscript",symbols:[u1.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([e,t,n])=>({type:r1.array_subscript,array:Ge(He(e),{trailing:t}),parenthesis:n})},{name:"function_call",symbols:[u1.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([e,t,n])=>({type:r1.function_call,nameKw:Ge(He(e),{trailing:t}),parenthesis:n})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([e,t,n])=>({type:r1.parenthesis,children:t,openParen:"(",closeParen:")"})},{name:"curly_braces$ebnf$1",symbols:[]},{name:"curly_braces$ebnf$1",symbols:["curly_braces$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"curly_braces",symbols:[{literal:"{"},"curly_braces$ebnf$1",{literal:"}"}],postprocess:([e,t,n])=>({type:r1.parenthesis,children:t,openParen:"{",closeParen:"}"})},{name:"square_brackets$ebnf$1",symbols:[]},{name:"square_brackets$ebnf$1",symbols:["square_brackets$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"square_brackets",symbols:[{literal:"["},"square_brackets$ebnf$1",{literal:"]"}],postprocess:([e,t,n])=>({type:r1.parenthesis,children:t,openParen:"[",closeParen:"]"})},{name:"property_access$subexpression$1",symbols:["identifier"]},{name:"property_access$subexpression$1",symbols:["array_subscript"]},{name:"property_access$subexpression$1",symbols:["all_columns_asterisk"]},{name:"property_access$subexpression$1",symbols:["parameter"]},{name:"property_access",symbols:["atomic_expression","_",u1.has("PROPERTY_ACCESS_OPERATOR")?{type:"PROPERTY_ACCESS_OPERATOR"}:PROPERTY_ACCESS_OPERATOR,"_","property_access$subexpression$1"],postprocess:([e,t,n,r,[M]])=>({type:r1.property_access,object:Ge(e,{trailing:t}),operator:n.text,property:Ge(M,{leading:r})})},{name:"between_predicate",symbols:[u1.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",u1.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([e,t,n,r,M,O,a])=>({type:r1.between_predicate,betweenKw:He(e),expr1:qH(n,{leading:t,trailing:r}),andKw:He(M),expr2:[Ge(a,{leading:O})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:Fb},{name:"case_expression$ebnf$1",symbols:[],postprocess:()=>null},{name:"case_expression$ebnf$2",symbols:[]},{name:"case_expression$ebnf$2",symbols:["case_expression$ebnf$2","case_clause"],postprocess:e=>e[0].concat([e[1]])},{name:"case_expression",symbols:[u1.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",u1.has("END")?{type:"END"}:END],postprocess:([e,t,n,r,M])=>({type:r1.case_expression,caseKw:Ge(He(e),{trailing:t}),endKw:He(M),expr:n||[],clauses:r})},{name:"case_clause",symbols:[u1.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",u1.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([e,t,n,r,M,O])=>({type:r1.case_when,whenKw:Ge(He(e),{trailing:t}),thenKw:Ge(He(r),{trailing:M}),condition:n,result:O})},{name:"case_clause",symbols:[u1.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([e,t,n])=>({type:r1.case_else,elseKw:Ge(He(e),{trailing:t}),result:n})},{name:"comma$subexpression$1",symbols:[u1.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[e]])=>({type:r1.comma})},{name:"asterisk$subexpression$1",symbols:[u1.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[e]])=>({type:r1.operator,text:e.text})},{name:"operator$subexpression$1",symbols:[u1.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[e]])=>({type:r1.operator,text:e.text})},{name:"identifier$subexpression$1",symbols:[u1.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[u1.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[u1.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[e]])=>({type:r1.identifier,quoted:e.type!=="IDENTIFIER",text:e.text})},{name:"parameter$subexpression$1",symbols:[u1.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[u1.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[u1.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[u1.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[u1.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[e]])=>({type:r1.parameter,key:e.key,text:e.text})},{name:"literal$subexpression$1",symbols:[u1.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[u1.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[e]])=>({type:r1.literal,text:e.text})},{name:"keyword$subexpression$1",symbols:[u1.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[u1.has("RESERVED_KEYWORD_PHRASE")?{type:"RESERVED_KEYWORD_PHRASE"}:RESERVED_KEYWORD_PHRASE]},{name:"keyword$subexpression$1",symbols:[u1.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[e]])=>He(e)},{name:"data_type$subexpression$1",symbols:[u1.has("RESERVED_DATA_TYPE")?{type:"RESERVED_DATA_TYPE"}:RESERVED_DATA_TYPE]},{name:"data_type$subexpression$1",symbols:[u1.has("RESERVED_DATA_TYPE_PHRASE")?{type:"RESERVED_DATA_TYPE_PHRASE"}:RESERVED_DATA_TYPE_PHRASE]},{name:"data_type",symbols:["data_type$subexpression$1"],postprocess:([[e]])=>ql(e)},{name:"data_type",symbols:[u1.has("RESERVED_PARAMETERIZED_DATA_TYPE")?{type:"RESERVED_PARAMETERIZED_DATA_TYPE"}:RESERVED_PARAMETERIZED_DATA_TYPE,"_","parenthesis"],postprocess:([e,t,n])=>({type:r1.parameterized_data_type,dataType:Ge(ql(e),{trailing:t}),parenthesis:n})},{name:"logic_operator$subexpression$1",symbols:[u1.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[u1.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[u1.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[e]])=>He(e)},{name:"other_keyword$subexpression$1",symbols:[u1.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[u1.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[u1.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[u1.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[e]])=>He(e)},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","comment"],postprocess:e=>e[0].concat([e[1]])},{name:"_",symbols:["_$ebnf$1"],postprocess:([e])=>e},{name:"comment",symbols:[u1.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([e])=>({type:r1.line_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[u1.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([e])=>({type:r1.block_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[u1.has("DISABLE_COMMENT")?{type:"DISABLE_COMMENT"}:DISABLE_COMMENT],postprocess:([e])=>({type:r1.disable_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})}],ParserStart:"main"},{Parser:_H,Grammar:LH}=zH;function hH(e){let t={};const n=new zT(M=>[...EH(e.tokenize(M,t)),oT(M.length)]),r=new _H(LH.fromCompiled(SH),{lexer:n});return{parse:(M,O)=>{t=O;const{results:a}=r.feed(M);if(a.length===1)return a[0];throw a.length===0?new Error("Parse error: Invalid SQL"):new Error(`Parse error: Ambiguous grammar ${JSON.stringify(a,void 0,2)}`)}}}var q0;(function(e){e[e.SPACE=0]="SPACE",e[e.NO_SPACE=1]="NO_SPACE",e[e.NO_NEWLINE=2]="NO_NEWLINE",e[e.NEWLINE=3]="NEWLINE",e[e.MANDATORY_NEWLINE=4]="MANDATORY_NEWLINE",e[e.INDENT=5]="INDENT",e[e.SINGLE_INDENT=6]="SINGLE_INDENT"})(q0=q0||(q0={}));class ET{constructor(t){this.indentation=t,this.items=[]}add(...t){for(const n of t)switch(n){case q0.SPACE:this.items.push(q0.SPACE);break;case q0.NO_SPACE:this.trimHorizontalWhitespace();break;case q0.NO_NEWLINE:this.trimWhitespace();break;case q0.NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(q0.NEWLINE);break;case q0.MANDATORY_NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(q0.MANDATORY_NEWLINE);break;case q0.INDENT:this.addIndentation();break;case q0.SINGLE_INDENT:this.items.push(q0.SINGLE_INDENT);break;default:this.items.push(n)}}trimHorizontalWhitespace(){for(;IH(ti(this.items));)this.items.pop()}trimWhitespace(){for(;WH(ti(this.items));)this.items.pop()}addNewline(t){if(this.items.length>0)switch(ti(this.items)){case q0.NEWLINE:this.items.pop(),this.items.push(t);break;case q0.MANDATORY_NEWLINE:break;default:this.items.push(t);break}}addIndentation(){for(let t=0;tthis.itemToString(t)).join("")}getLayoutItems(){return this.items}isAtStartOfLine(){for(let t=this.items.length-1;t>=0;t--){const n=this.items[t];if(n!==q0.SINGLE_INDENT)return n===q0.NEWLINE||n===q0.MANDATORY_NEWLINE}return!1}itemToString(t){switch(t){case q0.SPACE:return" ";case q0.NEWLINE:case q0.MANDATORY_NEWLINE:return` `;case q0.SINGLE_INDENT:return this.indentation.getSingleIndent();default:return t}}}const IH=e=>e===q0.SPACE||e===q0.SINGLE_INDENT,WH=e=>e===q0.SPACE||e===q0.SINGLE_INDENT||e===q0.NEWLINE;function Sl(e,t){if(t==="standard")return e;let n=[];return e.length>=10&&e.includes(" ")&&([e,...n]=e.split(" ")),t==="tabularLeft"?e=e.padEnd(9," "):e=e.padStart(9," "),e+["",...n].join(" ")}function _l(e){return rU(e)||e===_0.RESERVED_CLAUSE||e===_0.RESERVED_SELECT||e===_0.RESERVED_SET_OPERATION||e===_0.RESERVED_JOIN||e===_0.LIMIT}const xb="top-level",CH="block-level";class uT{constructor(t){this.indent=t,this.indentTypes=[]}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(xb)}increaseBlockLevel(){this.indentTypes.push(CH)}decreaseTopLevel(){this.indentTypes.length>0&&ti(this.indentTypes)===xb&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===xb;);}}class mH extends ET{constructor(t){super(new uT("")),this.expressionWidth=t,this.length=0,this.trailingSpace=!1}add(...t){if(t.forEach(n=>this.addToLength(n)),this.length>this.expressionWidth)throw new Ds;super.add(...t)}addToLength(t){if(typeof t=="string")this.length+=t.length,this.trailingSpace=!1;else{if(t===q0.MANDATORY_NEWLINE||t===q0.NEWLINE)throw new Ds;t===q0.INDENT||t===q0.SINGLE_INDENT||t===q0.SPACE?this.trailingSpace||(this.length++,this.trailingSpace=!0):(t===q0.NO_NEWLINE||t===q0.NO_SPACE)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}}class Ds extends Error{}class lc{constructor({cfg:t,dialectCfg:n,params:r,layout:M,inline:O=!1}){this.inline=!1,this.nodes=[],this.index=-1,this.cfg=t,this.dialectCfg=n,this.inline=O,this.params=r,this.layout=M}format(t){for(this.nodes=t,this.index=0;this.index{this.layout.add(this.showFunctionKw(t.nameKw))}),this.formatNode(t.parenthesis)}formatParameterizedDataType(t){this.withComments(t.dataType,()=>{this.layout.add(this.showDataType(t.dataType))}),this.formatNode(t.parenthesis)}formatArraySubscript(t){let n;switch(t.array.type){case r1.data_type:n=this.showDataType(t.array);break;case r1.keyword:n=this.showKw(t.array);break;default:n=this.showIdentifier(t.array);break}this.withComments(t.array,()=>{this.layout.add(n)}),this.formatNode(t.parenthesis)}formatPropertyAccess(t){this.formatNode(t.object),this.layout.add(q0.NO_SPACE,t.operator),this.formatNode(t.property)}formatParenthesis(t){const n=this.formatInlineExpression(t.children);n?(this.layout.add(t.openParen),this.layout.add(...n.getLayoutItems()),this.layout.add(q0.NO_SPACE,t.closeParen,q0.SPACE)):(this.layout.add(t.openParen,q0.NEWLINE),DM(this.cfg)?(this.layout.add(q0.INDENT),this.layout=this.formatSubExpression(t.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(q0.INDENT),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(q0.NEWLINE,q0.INDENT,t.closeParen,q0.SPACE))}formatBetweenPredicate(t){this.layout.add(this.showKw(t.betweenKw),q0.SPACE),this.layout=this.formatSubExpression(t.expr1),this.layout.add(q0.NO_SPACE,q0.SPACE,this.showNonTabularKw(t.andKw),q0.SPACE),this.layout=this.formatSubExpression(t.expr2),this.layout.add(q0.SPACE)}formatCaseExpression(t){this.formatNode(t.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(t.expr),this.layout=this.formatSubExpression(t.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(q0.NEWLINE,q0.INDENT),this.formatNode(t.endKw)}formatCaseWhen(t){this.layout.add(q0.NEWLINE,q0.INDENT),this.formatNode(t.whenKw),this.layout=this.formatSubExpression(t.condition),this.formatNode(t.thenKw),this.layout=this.formatSubExpression(t.result)}formatCaseElse(t){this.layout.add(q0.NEWLINE,q0.INDENT),this.formatNode(t.elseKw),this.layout=this.formatSubExpression(t.result)}formatClause(t){this.isOnelineClause(t)?this.formatClauseInOnelineStyle(t):DM(this.cfg)?this.formatClauseInTabularStyle(t):this.formatClauseInIndentedStyle(t)}isOnelineClause(t){return DM(this.cfg)?this.dialectCfg.tabularOnelineClauses[t.nameKw.text]:this.dialectCfg.onelineClauses[t.nameKw.text]}formatClauseInIndentedStyle(t){this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t.nameKw),q0.NEWLINE),this.layout.indentation.increaseTopLevel(),this.layout.add(q0.INDENT),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(t){this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t.nameKw),q0.SPACE),this.layout=this.formatSubExpression(t.children)}formatClauseInTabularStyle(t){this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t.nameKw),q0.SPACE),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(t){this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t.nameKw),q0.NEWLINE),this.layout.add(q0.INDENT),this.layout=this.formatSubExpression(t.children)}formatLimitClause(t){this.withComments(t.limitKw,()=>{this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t.limitKw))}),this.layout.indentation.increaseTopLevel(),DM(this.cfg)?this.layout.add(q0.SPACE):this.layout.add(q0.NEWLINE,q0.INDENT),t.offset?(this.layout=this.formatSubExpression(t.offset),this.layout.add(q0.NO_SPACE,",",q0.SPACE),this.layout=this.formatSubExpression(t.count)):this.layout=this.formatSubExpression(t.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(t){this.layout.add("*",q0.SPACE)}formatLiteral(t){this.layout.add(t.text,q0.SPACE)}formatIdentifier(t){this.layout.add(this.showIdentifier(t),q0.SPACE)}formatParameter(t){this.layout.add(this.params.get(t),q0.SPACE)}formatOperator({text:t}){t==="-"&&this.dialectCfg.identifierDashes?this.layout.add(t,q0.SPACE):this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(t)?this.layout.add(q0.NO_SPACE,t):t===":"?this.layout.add(q0.NO_SPACE,t,q0.SPACE):this.layout.add(t,q0.SPACE)}formatComma(t){this.inline?this.layout.add(q0.NO_SPACE,",",q0.SPACE):this.layout.add(q0.NO_SPACE,",",q0.NEWLINE,q0.INDENT)}withComments(t,n){this.formatComments(t.leadingComments),n(),this.formatComments(t.trailingComments)}formatComments(t){t&&t.forEach(n=>{n.type===r1.line_comment?this.formatLineComment(n):this.formatBlockComment(n)})}formatLineComment(t){Hb(t.precedingWhitespace||"")?this.layout.add(q0.NEWLINE,q0.INDENT,t.text,q0.MANDATORY_NEWLINE,q0.INDENT):this.layout.getLayoutItems().length>0?this.layout.add(q0.NO_NEWLINE,q0.SPACE,t.text,q0.MANDATORY_NEWLINE,q0.INDENT):this.layout.add(t.text,q0.MANDATORY_NEWLINE,q0.INDENT)}formatBlockComment(t){t.type===r1.block_comment&&this.isStandaloneBlockComment(t)?(this.splitBlockComment(t.text).forEach(n=>{this.layout.add(q0.NEWLINE,q0.INDENT,n)}),this.layout.add(q0.NEWLINE,q0.INDENT)):this.layout.add(t.text,q0.SPACE)}isStandaloneBlockComment(t){return Hb(t.text)||Hb(t.precedingWhitespace||"")||this.layout.isAtStartOfLine()}isDocComment(t){const n=t.split(/\n/);return/^\/\*\*?$/.test(n[0])&&n.slice(1,n.length-1).every(r=>/^\s*\*/.test(r))&&/^\s*\*\/$/.test(ti(n))}splitBlockComment(t){return this.isDocComment(t)?t.split(/\n/).map(n=>/^\s*\*/.test(n)?" "+n.replace(/^\s*/,""):n):t.split(/\n/).map(n=>n.replace(/^\s*/,""))}formatSubExpression(t){return new lc({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(t)}formatInlineExpression(t){const n=this.params.getPositionalParameterIndex();try{return new lc({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new mH(this.cfg.expressionWidth),inline:!0}).format(t)}catch(r){if(r instanceof Ds){this.params.setPositionalParameterIndex(n);return}else throw r}}formatKeywordNode(t){switch(t.tokenType){case _0.RESERVED_JOIN:return this.formatJoin(t);case _0.AND:case _0.OR:case _0.XOR:return this.formatLogicalOperator(t);default:return this.formatKeyword(t)}}formatJoin(t){DM(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t),q0.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t),q0.SPACE)}formatKeyword(t){this.layout.add(this.showKw(t),q0.SPACE)}formatLogicalOperator(t){this.cfg.logicalOperatorNewline==="before"?DM(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t),q0.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(q0.NEWLINE,q0.INDENT,this.showKw(t),q0.SPACE):this.layout.add(this.showKw(t),q0.NEWLINE,q0.INDENT)}formatDataType(t){this.layout.add(this.showDataType(t),q0.SPACE)}showKw(t){return _l(t.tokenType)?Sl(this.showNonTabularKw(t),this.cfg.indentStyle):this.showNonTabularKw(t)}showNonTabularKw(t){switch(this.cfg.keywordCase){case"preserve":return wO(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}showFunctionKw(t){return _l(t.tokenType)?Sl(this.showNonTabularFunctionKw(t),this.cfg.indentStyle):this.showNonTabularFunctionKw(t)}showNonTabularFunctionKw(t){switch(this.cfg.functionCase){case"preserve":return wO(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}showIdentifier(t){if(t.quoted)return t.text;switch(this.cfg.identifierCase){case"preserve":return t.text;case"upper":return t.text.toUpperCase();case"lower":return t.text.toLowerCase()}}showDataType(t){switch(this.cfg.dataTypeCase){case"preserve":return wO(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}}class vH{constructor(t,n){this.dialect=t,this.cfg=n,this.params=new sH(this.cfg.params)}format(t){const n=this.parse(t);return this.formatAst(n).trimEnd()}parse(t){return hH(this.dialect.tokenizer).parse(t,this.cfg.paramTypes||{})}formatAst(t){return t.map(n=>this.formatStatement(n)).join(` -`.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(t){const n=new lc({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new ET(new uT(bH(this.cfg)))}).format(t.children);return t.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?n.add(q0.NEWLINE,";"):n.add(q0.NO_NEWLINE,";")),n.toString()}}class HO extends Error{}function gH(e){const t=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const n of t)if(n in e)throw new HO(`${n} config is no more supported.`);if(e.expressionWidth<=0)throw new HO(`expressionWidth config must be positive number. Received ${e.expressionWidth} instead.`);if(e.params&&!DH(e.params)&&console.warn('WARNING: All "params" option values should be strings.'),e.paramTypes&&!PH(e.paramTypes))throw new HO("Empty regex given in custom paramTypes. That would result in matching infinite amount of parameters.");return e}function DH(e){return(e instanceof Array?e:Object.values(e)).every(n=>typeof n=="string")}function PH(e){return e.custom&&Array.isArray(e.custom)?e.custom.every(t=>t.regex!==""):!0}var yH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,r=Object.getOwnPropertySymbols(e);M{if(typeof t.language=="string"&&!fT.includes(t.language))throw new HO(`Unsupported SQL dialect: ${t.language}`);const n=lT[t.language||"sql"];return XH(e,Object.assign(Object.assign({},t),{dialect:$w[n]}))},XH=(e,t)=>{var{dialect:n}=t,r=yH(t,["dialect"]);if(typeof e!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof e);const M=gH(Object.assign(Object.assign({},BH),r));return new vH(OH(n),M).format(e)};Gc.registerLanguage("sql",$8);const wH={methods:{highlightSQL(){this.$nextTick(()=>{Gc.highlightElement(this.$refs.sqlcode)})},formatSql(e,t){let n={};return t&&(t==="pgsql"&&(t="postgresql"),t==="sqlsrv"&&(t="transactsql"),fT.includes(t)&&(n={language:t})),UH(e,n)}}};var HH=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Query Details",resource:"queries",id:t.$route.params.id},on:{ready:function(r){return t.highlightSQL()}},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Connection")]),n("td",[t._v(" "+t._s(r.entry.content.connection)+" ")])]),r.entry.content.file?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Location")]),n("td",[t._v(t._s(r.entry.content.file)+":"+t._s(r.entry.content.line))])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[r.entry.content.slow?n("span",{staticClass:"badge badge-danger"},[t._v(" "+t._s(r.entry.content.time)+"ms ")]):n("span",[t._v(" "+t._s(r.entry.content.time)+"ms ")])])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Query")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:t.formatSql(r.entry.content.sql,r.entry.content.driver)}},[n("pre",{ref:"sqlcode",staticClass:"code-bg text-white"},[t._v(t._s(t.formatSql(r.entry.content.sql,r.entry.content.driver)))])])],1)])])}}])})},GH=[],FH=N1(wH,HH,GH,!1,null,null);const xH=FH.exports,YH={mixins:[ye]};var VH=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Models",resource:"models"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[t._v(t._s(t.truncate(r.entry.content.model,70)))]),n("td",{staticClass:"table-fit"},[n("span",{staticClass:"badge",class:"badge-"+t.modelActionClass(r.entry.content.action)},[t._v(" "+t._s(r.entry.content.action)+" ")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"model-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Model")]),n("th",{attrs:{scope:"col"}},[t._v("Action")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},kH=[],$H=N1(YH,VH,kH,!1,null,null);const KH=$H.exports,JH={mixins:[ye],data(){return{entry:null,batch:[]}}};var jH=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Model Action",resource:"models",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Model")]),n("td",[t._v(" "+t._s(r.entry.content.model)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Action")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.modelActionClass(r.entry.content.action)},[t._v(" "+t._s(r.entry.content.action)+" ")])])]),r.entry.content.count?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Hydrated")]),n("td",[t._v(" "+t._s(r.entry.content.count)+" ")])]):t._e()]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[r.entry.content.action!="deleted"&&r.entry.content.changes?n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Changes")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content.changes}},[n("vue-json-pretty",{attrs:{data:r.entry.content.changes}})],1)],1)]):t._e()])}}])})},QH=[],ZH=N1(JH,jH,QH,!1,null,null);const eG=ZH.exports,tG={mixins:[ye]};var nG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Requests",resource:"requests"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",{staticClass:"table-fit pr-0"},[n("span",{staticClass:"badge",class:"badge-"+t.requestMethodClass(r.entry.content.method)},[t._v(" "+t._s(r.entry.content.method)+" ")])]),n("td",{attrs:{title:r.entry.content.uri}},[t._v(" "+t._s(t.truncate(r.entry.content.uri,50))+" ")]),n("td",{staticClass:"table-fit text-center"},[n("span",{staticClass:"badge",class:"badge-"+t.requestStatusClass(r.entry.content.response_status)},[t._v(" "+t._s(r.entry.content.response_status)+" ")])]),n("td",{staticClass:"table-fit text-right text-muted"},[r.entry.content.duration?n("span",[t._v(t._s(r.entry.content.duration)+"ms")]):n("span",[t._v("-")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"request-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Verb")]),n("th",{attrs:{scope:"col"}},[t._v("Path")]),n("th",{staticClass:"text-center",attrs:{scope:"col"}},[t._v("Status")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Duration")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},rG=[],oG=N1(tG,nG,rG,!1,null,null);const MG=oG.exports,aG={mixins:[ye],data(){return{entry:null,batch:[],currentRequestTab:"payload",currentResponseTab:"response"}}};var iG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Request Details",resource:"requests",id:t.$route.params.id,"entry-point":"true"},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Method")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.requestMethodClass(r.entry.content.method)},[t._v(" "+t._s(r.entry.content.method)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Controller Action")]),n("td",[t._v(" "+t._s(r.entry.content.controller_action)+" ")])]),r.entry.content.middleware?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Middleware")]),n("td",[t._v(" "+t._s(r.entry.content.middleware.join(", "))+" ")])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Path")]),n("td",[t._v(" "+t._s(r.entry.content.uri)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Status")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.requestStatusClass(r.entry.content.response_status)},[t._v(" "+t._s(r.entry.content.response_status)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[t._v(t._s(r.entry.content.duration||"-")+" ms")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("IP Address")]),n("td",[t._v(" "+t._s(r.entry.content.ip_address||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Worker memory peak")]),n("td",[t._v(t._s(r.entry.content.memory||"-")+" MB")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentRequestTab=="payload"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentRequestTab="payload"}}},[t._v("Payload")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentRequestTab=="headers"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentRequestTab="headers"}}},[t._v("Headers")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentRequestTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentRequestTab]}})],1)],1)]),n("div",{staticClass:"card mt-5"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="response"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="response"}}},[t._v("Response")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="response_headers"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="response_headers"}}},[t._v("Headers")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="session"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="session"}}},[t._v("Session")])]),r.entry.content.context?n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="context"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="context"}}},[t._v("Context")])]):t._e(),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="coroutine_context"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="coroutine_context"}}},[t._v("Coroutine Context")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentResponseTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentResponseTab]}})],1)],1)]),n("related-entries",{attrs:{entry:t.entry,batch:t.batch}})],1)}}])})},OG=[],cG=N1(aG,iG,OG,!1,null,null);const pG=cG.exports,bG={};var sG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Commands",resource:"commands"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",{attrs:{title:r.entry.content.command}},[n("code",[t._v(t._s(t.truncate(r.entry.content.command,90)))])]),n("td",{staticClass:"table-fit text-center text-muted"},[t._v(" "+t._s(r.entry.content.exit_code)+" ")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"command-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{staticClass:"table-fit",attrs:{scope:"col"}},[t._v("Exit Code")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},AG=[],zG=N1(bG,sG,AG,!1,null,null);const EG=zG.exports,uG={data(){return{entry:null,batch:[],currentTab:"arguments"}}};var lG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Command Details",resource:"commands",id:t.$route.params.id,"entry-point":"true"},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Command")]),n("td",[n("code",[t._v(t._s(r.entry.content.command))])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exit Code")]),n("td",[t._v(" "+t._s(r.entry.content.exit_code)+" ")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentTab=="arguments"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentTab="arguments"}}},[t._v("Arguments")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentTab=="options"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentTab="options"}}},[t._v("Options")])])]),n("div",[n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentTab]}})],1)],1)])]),n("related-entries",{attrs:{entry:t.entry,batch:t.batch}})],1)}}])})},fG=[],dG=N1(uG,lG,fG,!1,null,null);const RG=dG.exports,TG={};var NG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Schedule",resource:"schedule"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("code",[t._v(t._s(t.truncate(r.entry.content.description,85)||t.truncate(r.entry.content.command,85)))])]),n("td",{staticClass:"table-fit text-muted"},[t._v(" "+t._s(r.entry.content.expression)+" ")]),n("td",{staticClass:"table-fit"},[n("span",{staticClass:"badge",class:r.entry.content.status==="finished"?"badge-success":"badge-danger"},[t._v(" "+t._s(r.entry.content.status)+" ")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"schedule-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{attrs:{scope:"col"}},[t._v("Expression")]),n("th",{attrs:{scope:"col"}},[t._v("Status")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},qG=[],SG=N1(TG,NG,qG,!1,null,null);const _G=SG.exports,LG={data(){return{entry:null,batch:[]}}};var hG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Scheduled Command Details",resource:"requests",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Description")]),n("td",[t._v(" "+t._s(r.entry.content.description||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Task")]),n("td",[n("code",[t._v(t._s(r.entry.content.command||"-"))])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Expression")]),n("td",[t._v(" "+t._s(r.entry.content.expression)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Timezone")]),n("td",[t._v(" "+t._s(r.entry.content.timezone||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Status")]),n("td",[n("span",{staticClass:"badge",class:r.entry.content.status==="finished"?"badge-success":"badge-danger"},[t._v(" "+t._s(r.entry.content.status)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exit Code")]),n("td",[t._v(" "+t._s(r.entry.content.exit_code===void 0||r.entry.content.exit_code===null?"-":r.entry.content.exit_code)+" ")])]),r.entry.content.exception?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exception")]),n("td",[n("code",[t._v(t._s(r.entry.content.exception.class))])])]):t._e(),r.entry.content.exception?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exception Message")]),n("td",[t._v(" "+t._s(r.entry.content.exception.message)+" ")])]):t._e()]}},{key:"after-attributes-card",fn:function(r){return r.entry.content.output?n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Output")])])]),n("copy-clipboard",{attrs:{data:r.entry.content.output}},[n("pre",{staticClass:"code-bg p-4 mb-0 text-white"},[t._v(t._s(r.entry.content.output))])])],1)]):t._e()}}],null,!0)})},IG=[],WG=N1(LG,hG,IG,!1,null,null);const CG=WG.exports,mG={};var vG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Redis",resource:"redis"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("code",[t._v(t._s(t.truncate(r.entry.content.command,80)))])]),n("td",{staticClass:"table-fit text-right text-muted"},[t._v(t._s(r.entry.content.time)+"ms")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"redis-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Duration")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},gG=[],DG=N1(mG,vG,gG,!1,null,null);const PG=DG.exports,yG={data(){return{entry:null,batch:[]}}};var BG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Redis Command Details",resource:"redis",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Connection")]),n("td",[t._v(" "+t._s(r.entry.content.connection)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[t._v(t._s(r.entry.content.time)+"ms")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Command")])])]),n("pre",{staticClass:"code-bg p-4 mb-0 text-white"},[t._v(t._s(r.entry.content.command))])])])}}])})},UG=[],XG=N1(yG,BG,UG,!1,null,null);const wG=XG.exports;var Yb={exports:{}};/*! +`.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(t){const n=new lc({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new ET(new uT(bH(this.cfg)))}).format(t.children);return t.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?n.add(q0.NEWLINE,";"):n.add(q0.NO_NEWLINE,";")),n.toString()}}class HO extends Error{}function gH(e){const t=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const n of t)if(n in e)throw new HO(`${n} config is no more supported.`);if(e.expressionWidth<=0)throw new HO(`expressionWidth config must be positive number. Received ${e.expressionWidth} instead.`);if(e.params&&!DH(e.params)&&console.warn('WARNING: All "params" option values should be strings.'),e.paramTypes&&!PH(e.paramTypes))throw new HO("Empty regex given in custom paramTypes. That would result in matching infinite amount of parameters.");return e}function DH(e){return(e instanceof Array?e:Object.values(e)).every(n=>typeof n=="string")}function PH(e){return e.custom&&Array.isArray(e.custom)?e.custom.every(t=>t.regex!==""):!0}var yH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,r=Object.getOwnPropertySymbols(e);M{if(typeof t.language=="string"&&!fT.includes(t.language))throw new HO(`Unsupported SQL dialect: ${t.language}`);const n=lT[t.language||"sql"];return XH(e,Object.assign(Object.assign({},t),{dialect:$w[n]}))},XH=(e,t)=>{var{dialect:n}=t,r=yH(t,["dialect"]);if(typeof e!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof e);const M=gH(Object.assign(Object.assign({},BH),r));return new vH(OH(n),M).format(e)};Gc.registerLanguage("sql",$8);const wH={pgsql:"postgresql",sqlsrv:"transactsql"},HH={methods:{highlightQuery(){this.$nextTick(()=>{Gc.highlightElement(this.$refs.querycode)})},formatQuery(e,t){t=wH[t]||t;const n=this.sqlDialect(t);return n?UH(e,{language:n}):e},sqlDialect(e){return e?fT.includes(e)?e:null:"sql"}}};var GH=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Query Details",resource:"queries",id:t.$route.params.id},on:{ready:function(r){return t.highlightQuery()}},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Connection")]),n("td",[t._v(" "+t._s(r.entry.content.connection)+" ")])]),r.entry.content.file?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Location")]),n("td",[t._v(t._s(r.entry.content.file)+":"+t._s(r.entry.content.line))])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[r.entry.content.slow?n("span",{staticClass:"badge badge-danger"},[t._v(" "+t._s(r.entry.content.time)+"ms ")]):n("span",[t._v(" "+t._s(r.entry.content.time)+"ms ")])])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Query")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:t.formatQuery(r.entry.content.sql,r.entry.content.driver)}},[n("pre",{ref:"querycode",staticClass:"code-bg text-white language-sql"},[t._v(t._s(t.formatQuery(r.entry.content.sql,r.entry.content.driver)))])])],1)])])}}])})},FH=[],xH=N1(HH,GH,FH,!1,null,null);const YH=xH.exports,VH={mixins:[ye]};var kH=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Models",resource:"models"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[t._v(t._s(t.truncate(r.entry.content.model,70)))]),n("td",{staticClass:"table-fit"},[n("span",{staticClass:"badge",class:"badge-"+t.modelActionClass(r.entry.content.action)},[t._v(" "+t._s(r.entry.content.action)+" ")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"model-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Model")]),n("th",{attrs:{scope:"col"}},[t._v("Action")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},$H=[],KH=N1(VH,kH,$H,!1,null,null);const JH=KH.exports,jH={mixins:[ye],data(){return{entry:null,batch:[]}}};var QH=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Model Action",resource:"models",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Model")]),n("td",[t._v(" "+t._s(r.entry.content.model)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Action")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.modelActionClass(r.entry.content.action)},[t._v(" "+t._s(r.entry.content.action)+" ")])])]),r.entry.content.count?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Hydrated")]),n("td",[t._v(" "+t._s(r.entry.content.count)+" ")])]):t._e()]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[r.entry.content.action!="deleted"&&r.entry.content.changes?n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Changes")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content.changes}},[n("vue-json-pretty",{attrs:{data:r.entry.content.changes}})],1)],1)]):t._e()])}}])})},ZH=[],eG=N1(jH,QH,ZH,!1,null,null);const tG=eG.exports,nG={mixins:[ye]};var rG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Requests",resource:"requests"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",{staticClass:"table-fit pr-0"},[n("span",{staticClass:"badge",class:"badge-"+t.requestMethodClass(r.entry.content.method)},[t._v(" "+t._s(r.entry.content.method)+" ")])]),n("td",{attrs:{title:r.entry.content.uri}},[t._v(" "+t._s(t.truncate(r.entry.content.uri,50))+" ")]),n("td",{staticClass:"table-fit text-center"},[n("span",{staticClass:"badge",class:"badge-"+t.requestStatusClass(r.entry.content.response_status)},[t._v(" "+t._s(r.entry.content.response_status)+" ")])]),n("td",{staticClass:"table-fit text-right text-muted"},[r.entry.content.duration?n("span",[t._v(t._s(r.entry.content.duration)+"ms")]):n("span",[t._v("-")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"request-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Verb")]),n("th",{attrs:{scope:"col"}},[t._v("Path")]),n("th",{staticClass:"text-center",attrs:{scope:"col"}},[t._v("Status")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Duration")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},oG=[],MG=N1(nG,rG,oG,!1,null,null);const aG=MG.exports,iG={mixins:[ye],data(){return{entry:null,batch:[],currentRequestTab:"payload",currentResponseTab:"response"}}};var OG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Request Details",resource:"requests",id:t.$route.params.id,"entry-point":"true"},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Method")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.requestMethodClass(r.entry.content.method)},[t._v(" "+t._s(r.entry.content.method)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Controller Action")]),n("td",[t._v(" "+t._s(r.entry.content.controller_action)+" ")])]),r.entry.content.middleware?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Middleware")]),n("td",[t._v(" "+t._s(r.entry.content.middleware.join(", "))+" ")])]):t._e(),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Path")]),n("td",[t._v(" "+t._s(r.entry.content.uri)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Status")]),n("td",[n("span",{staticClass:"badge",class:"badge-"+t.requestStatusClass(r.entry.content.response_status)},[t._v(" "+t._s(r.entry.content.response_status)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[t._v(t._s(r.entry.content.duration||"-")+" ms")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("IP Address")]),n("td",[t._v(" "+t._s(r.entry.content.ip_address||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Worker memory peak")]),n("td",[t._v(t._s(r.entry.content.memory||"-")+" MB")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentRequestTab=="payload"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentRequestTab="payload"}}},[t._v("Payload")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentRequestTab=="headers"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentRequestTab="headers"}}},[t._v("Headers")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentRequestTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentRequestTab]}})],1)],1)]),n("div",{staticClass:"card mt-5"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="response"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="response"}}},[t._v("Response")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="response_headers"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="response_headers"}}},[t._v("Headers")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="session"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="session"}}},[t._v("Session")])]),r.entry.content.context?n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="context"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="context"}}},[t._v("Context")])]):t._e(),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentResponseTab=="coroutine_context"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentResponseTab="coroutine_context"}}},[t._v("Coroutine Context")])])]),n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentResponseTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentResponseTab]}})],1)],1)]),n("related-entries",{attrs:{entry:t.entry,batch:t.batch}})],1)}}])})},cG=[],pG=N1(iG,OG,cG,!1,null,null);const bG=pG.exports,sG={};var AG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Commands",resource:"commands"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",{attrs:{title:r.entry.content.command}},[n("code",[t._v(t._s(t.truncate(r.entry.content.command,90)))])]),n("td",{staticClass:"table-fit text-center text-muted"},[t._v(" "+t._s(r.entry.content.exit_code)+" ")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"command-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{staticClass:"table-fit",attrs:{scope:"col"}},[t._v("Exit Code")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},zG=[],EG=N1(sG,AG,zG,!1,null,null);const uG=EG.exports,lG={data(){return{entry:null,batch:[],currentTab:"arguments"}}};var fG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Command Details",resource:"commands",id:t.$route.params.id,"entry-point":"true"},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Command")]),n("td",[n("code",[t._v(t._s(r.entry.content.command))])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exit Code")]),n("td",[t._v(" "+t._s(r.entry.content.exit_code)+" ")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentTab=="arguments"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentTab="arguments"}}},[t._v("Arguments")])]),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link",class:{active:t.currentTab=="options"},attrs:{href:"#"},on:{click:function(M){M.preventDefault(),t.currentTab="options"}}},[t._v("Options")])])]),n("div",[n("div",{staticClass:"code-bg p-4 mb-0 text-white"},[n("copy-clipboard",{attrs:{data:r.entry.content[t.currentTab]}},[n("vue-json-pretty",{attrs:{data:r.entry.content[t.currentTab]}})],1)],1)])]),n("related-entries",{attrs:{entry:t.entry,batch:t.batch}})],1)}}])})},dG=[],RG=N1(lG,fG,dG,!1,null,null);const TG=RG.exports,NG={};var qG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Schedule",resource:"schedule"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("code",[t._v(t._s(t.truncate(r.entry.content.description,85)||t.truncate(r.entry.content.command,85)))])]),n("td",{staticClass:"table-fit text-muted"},[t._v(" "+t._s(r.entry.content.expression)+" ")]),n("td",{staticClass:"table-fit"},[n("span",{staticClass:"badge",class:r.entry.content.status==="finished"?"badge-success":"badge-danger"},[t._v(" "+t._s(r.entry.content.status)+" ")])]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"schedule-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{attrs:{scope:"col"}},[t._v("Expression")]),n("th",{attrs:{scope:"col"}},[t._v("Status")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},SG=[],_G=N1(NG,qG,SG,!1,null,null);const LG=_G.exports,hG={data(){return{entry:null,batch:[]}}};var IG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Scheduled Command Details",resource:"requests",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Description")]),n("td",[t._v(" "+t._s(r.entry.content.description||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Task")]),n("td",[n("code",[t._v(t._s(r.entry.content.command||"-"))])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Expression")]),n("td",[t._v(" "+t._s(r.entry.content.expression)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Timezone")]),n("td",[t._v(" "+t._s(r.entry.content.timezone||"-")+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Status")]),n("td",[n("span",{staticClass:"badge",class:r.entry.content.status==="finished"?"badge-success":"badge-danger"},[t._v(" "+t._s(r.entry.content.status)+" ")])])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exit Code")]),n("td",[t._v(" "+t._s(r.entry.content.exit_code===void 0||r.entry.content.exit_code===null?"-":r.entry.content.exit_code)+" ")])]),r.entry.content.exception?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exception")]),n("td",[n("code",[t._v(t._s(r.entry.content.exception.class))])])]):t._e(),r.entry.content.exception?n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Exception Message")]),n("td",[t._v(" "+t._s(r.entry.content.exception.message)+" ")])]):t._e()]}},{key:"after-attributes-card",fn:function(r){return r.entry.content.output?n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Output")])])]),n("copy-clipboard",{attrs:{data:r.entry.content.output}},[n("pre",{staticClass:"code-bg p-4 mb-0 text-white"},[t._v(t._s(r.entry.content.output))])])],1)]):t._e()}}],null,!0)})},WG=[],CG=N1(hG,IG,WG,!1,null,null);const mG=CG.exports,vG={};var gG=function(){var t=this,n=t._self._c;return n("index-screen",{attrs:{title:"Redis",resource:"redis"},scopedSlots:t._u([{key:"row",fn:function(r){return[n("td",[n("code",[t._v(t._s(t.truncate(r.entry.content.command,80)))])]),n("td",{staticClass:"table-fit text-right text-muted"},[t._v(t._s(r.entry.content.time)+"ms")]),n("td",{staticClass:"table-fit text-muted",attrs:{"data-timeago":r.entry.created_at,title:r.entry.created_at}},[t._v(" "+t._s(t.timeAgo(r.entry.created_at))+" ")]),n("td",{staticClass:"table-fit"},[n("router-link",{staticClass:"control-action",attrs:{to:{name:"redis-preview",params:{id:r.entry.id}}}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z","clip-rule":"evenodd"}})])])],1)]}}])},[n("tr",{attrs:{slot:"table-header"},slot:"table-header"},[n("th",{attrs:{scope:"col"}},[t._v("Command")]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("Duration")]),n("th",{attrs:{scope:"col"}},[t._v("Happened")]),n("th",{attrs:{scope:"col"}})])])},DG=[],PG=N1(vG,gG,DG,!1,null,null);const yG=PG.exports,BG={data(){return{entry:null,batch:[]}}};var UG=function(){var t=this,n=t._self._c;return n("preview-screen",{attrs:{title:"Redis Command Details",resource:"redis",id:t.$route.params.id},scopedSlots:t._u([{key:"table-parameters",fn:function(r){return[n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Connection")]),n("td",[t._v(" "+t._s(r.entry.content.connection)+" ")])]),n("tr",[n("td",{staticClass:"table-fit text-muted"},[t._v("Duration")]),n("td",[t._v(t._s(r.entry.content.time)+"ms")])])]}},{key:"after-attributes-card",fn:function(r){return n("div",{},[n("div",{staticClass:"card mt-5 overflow-hidden"},[n("ul",{staticClass:"nav nav-pills"},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link active"},[t._v("Command")])])]),n("pre",{staticClass:"code-bg p-4 mb-0 text-white"},[t._v(t._s(r.entry.content.command))])])])}}])})},XG=[],wG=N1(BG,UG,XG,!1,null,null);const HG=wG.exports;var Yb={exports:{}};/*! * jQuery JavaScript Library v3.7.1 * https://jquery.com/ * @@ -99,15 +99,15 @@ ${JSON.stringify(a,void 0,2)}`)}}}var q0;(function(e){e[e.SPACE=0]="SPACE",e[e.N */var Ll;function dT(){return Ll||(Ll=1,function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:z2,function(t,n){var r=[],M=Object.getPrototypeOf,O=r.slice,a=r.flat?function(c){return r.flat.call(c)}:function(c){return r.concat.apply([],c)},b=r.push,A=r.indexOf,u={},R=u.toString,T=u.hasOwnProperty,v=T.toString,g=v.call(Object),m={},P=function(s){return typeof s=="function"&&typeof s.nodeType!="number"&&typeof s.item!="function"},k=function(s){return s!=null&&s===s.window},W=t.document,K={type:!0,src:!0,nonce:!0,noModule:!0};function c0(c,s,z){z=z||W;var f,N,q=z.createElement("script");if(q.text=c,s)for(f in K)N=s[f]||s.getAttribute&&s.getAttribute(f),N&&q.setAttribute(f,N);z.head.appendChild(q).parentNode.removeChild(q)}function j(c){return c==null?c+"":typeof c=="object"||typeof c=="function"?u[R.call(c)]||"object":typeof c}var W0="3.7.1",g0=/HTML$/i,E=function(c,s){return new E.fn.init(c,s)};E.fn=E.prototype={jquery:W0,constructor:E,length:0,toArray:function(){return O.call(this)},get:function(c){return c==null?O.call(this):c<0?this[c+this.length]:this[c]},pushStack:function(c){var s=E.merge(this.constructor(),c);return s.prevObject=this,s},each:function(c){return E.each(this,c)},map:function(c){return this.pushStack(E.map(this,function(s,z){return c.call(s,z,s)}))},slice:function(){return this.pushStack(O.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,function(c,s){return(s+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(c,s){return s%2}))},eq:function(c){var s=this.length,z=+c+(c<0?s:0);return this.pushStack(z>=0&&z0&&s-1 in c}function F0(c,s){return c.nodeName&&c.nodeName.toLowerCase()===s.toLowerCase()}var O1=r.pop,g1=r.sort,n0=r.splice,S="[\\x20\\t\\r\\n\\f]",G=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");E.contains=function(c,s){var z=s&&s.parentNode;return c===z||!!(z&&z.nodeType===1&&(c.contains?c.contains(z):c.compareDocumentPosition&&c.compareDocumentPosition(z)&16))};var t0=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function F(c,s){return s?c==="\0"?"�":c.slice(0,-1)+"\\"+c.charCodeAt(c.length-1).toString(16)+" ":"\\"+c}E.escapeSelector=function(c){return(c+"").replace(t0,F)};var O0=W,N0=b;(function(){var c,s,z,f,N,q=N0,L,w,U,Q,z0,T0=E.expando,o0=0,C0=0,c1=W2(),t1=W2(),b1=W2(),Ee=W2(),be=function(D,V){return D===V&&(N=!0),0},Qe="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Nt="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I1="\\["+S+"*("+Nt+")(?:"+S+"*([*^$|!~]?=)"+S+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Nt+"))|)"+S+"*\\]",Un=":("+Nt+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+I1+")*)|.*)\\)|)",D1=new RegExp(S+"+","g"),te=new RegExp("^"+S+"*,"+S+"*"),Ot=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),h2=new RegExp(S+"|>"),ct=new RegExp(Un),qt=new RegExp("^"+Nt+"$"),Ze={ID:new RegExp("^#("+Nt+")"),CLASS:new RegExp("^\\.("+Nt+")"),TAG:new RegExp("^("+Nt+"|[*])"),ATTR:new RegExp("^"+I1),PSEUDO:new RegExp("^"+Un),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+Qe+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},St=/^(?:input|select|textarea|button)$/i,Ft=/^h\d$/i,et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,I2=/[+~]/,pt=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),_t=function(D,V){var M0="0x"+D.slice(1)-65536;return V||(M0<0?String.fromCharCode(M0+65536):String.fromCharCode(M0>>10|55296,M0&1023|56320))},An=function(){zn()},Ye=At(function(D){return D.disabled===!0&&F0(D,"fieldset")},{dir:"parentNode",next:"legend"});function M2(){try{return L.activeElement}catch{}}try{q.apply(r=O.call(O0.childNodes),O0.childNodes),r[O0.childNodes.length].nodeType}catch{q={apply:function(V,M0){N0.apply(V,O.call(M0))},call:function(V){N0.apply(V,O.call(arguments,1))}}}function d1(D,V,M0,p0){var d0,y,e0,J,A0,U0,X0,J0=V&&V.ownerDocument,k0=V?V.nodeType:9;if(M0=M0||[],typeof D!="string"||!D||k0!==1&&k0!==9&&k0!==11)return M0;if(!p0&&(zn(V),V=V||L,U)){if(k0!==11&&(A0=et.exec(D)))if(d0=A0[1]){if(k0===9)if(e0=V.getElementById(d0)){if(e0.id===d0)return q.call(M0,e0),M0}else return M0;else if(J0&&(e0=J0.getElementById(d0))&&d1.contains(V,e0)&&e0.id===d0)return q.call(M0,e0),M0}else{if(A0[2])return q.apply(M0,V.getElementsByTagName(D)),M0;if((d0=A0[3])&&V.getElementsByClassName)return q.apply(M0,V.getElementsByClassName(d0)),M0}if(!Ee[D+" "]&&(!Q||!Q.test(D))){if(X0=D,J0=V,k0===1&&(h2.test(D)||Ot.test(D))){for(J0=I2.test(D)&&Lt(V.parentNode)||V,(J0!=V||!m.scope)&&((J=V.getAttribute("id"))?J=E.escapeSelector(J):V.setAttribute("id",J=T0)),U0=st(D),y=U0.length;y--;)U0[y]=(J?"#"+J:":scope")+" "+Xn(U0[y]);X0=U0.join(",")}try{return q.apply(M0,J0.querySelectorAll(X0)),M0}catch{Ee(D,!0)}finally{J===T0&&V.removeAttribute("id")}}}return uM(D.replace(G,"$1"),V,M0,p0)}function W2(){var D=[];function V(M0,p0){return D.push(M0+" ")>s.cacheLength&&delete V[D.shift()],V[M0+" "]=p0}return V}function Ve(D){return D[T0]=!0,D}function a2(D){var V=L.createElement("fieldset");try{return!!D(V)}catch{return!1}finally{V.parentNode&&V.parentNode.removeChild(V),V=null}}function Sa(D){return function(V){return F0(V,"input")&&V.type===D}}function C2(D){return function(V){return(F0(V,"input")||F0(V,"button"))&&V.type===D}}function i2(D){return function(V){return"form"in V?V.parentNode&&V.disabled===!1?"label"in V?"label"in V.parentNode?V.parentNode.disabled===D:V.disabled===D:V.isDisabled===D||V.isDisabled!==!D&&Ye(V)===D:V.disabled===D:"label"in V?V.disabled===D:!1}}function bt(D){return Ve(function(V){return V=+V,Ve(function(M0,p0){for(var d0,y=D([],M0.length,V),e0=y.length;e0--;)M0[d0=y[e0]]&&(M0[d0]=!(p0[d0]=M0[d0]))})})}function Lt(D){return D&&typeof D.getElementsByTagName<"u"&&D}function zn(D){var V,M0=D?D.ownerDocument||D:O0;return M0==L||M0.nodeType!==9||!M0.documentElement||(L=M0,w=L.documentElement,U=!E.isXMLDoc(L),z0=w.matches||w.webkitMatchesSelector||w.msMatchesSelector,w.msMatchesSelector&&O0!=L&&(V=L.defaultView)&&V.top!==V&&V.addEventListener("unload",An),m.getById=a2(function(p0){return w.appendChild(p0).id=E.expando,!L.getElementsByName||!L.getElementsByName(E.expando).length}),m.disconnectedMatch=a2(function(p0){return z0.call(p0,"*")}),m.scope=a2(function(){return L.querySelectorAll(":scope")}),m.cssHas=a2(function(){try{return L.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),m.getById?(s.filter.ID=function(p0){var d0=p0.replace(pt,_t);return function(y){return y.getAttribute("id")===d0}},s.find.ID=function(p0,d0){if(typeof d0.getElementById<"u"&&U){var y=d0.getElementById(p0);return y?[y]:[]}}):(s.filter.ID=function(p0){var d0=p0.replace(pt,_t);return function(y){var e0=typeof y.getAttributeNode<"u"&&y.getAttributeNode("id");return e0&&e0.value===d0}},s.find.ID=function(p0,d0){if(typeof d0.getElementById<"u"&&U){var y,e0,J,A0=d0.getElementById(p0);if(A0){if(y=A0.getAttributeNode("id"),y&&y.value===p0)return[A0];for(J=d0.getElementsByName(p0),e0=0;A0=J[e0++];)if(y=A0.getAttributeNode("id"),y&&y.value===p0)return[A0]}return[]}}),s.find.TAG=function(p0,d0){return typeof d0.getElementsByTagName<"u"?d0.getElementsByTagName(p0):d0.querySelectorAll(p0)},s.find.CLASS=function(p0,d0){if(typeof d0.getElementsByClassName<"u"&&U)return d0.getElementsByClassName(p0)},Q=[],a2(function(p0){var d0;w.appendChild(p0).innerHTML="",p0.querySelectorAll("[selected]").length||Q.push("\\["+S+"*(?:value|"+Qe+")"),p0.querySelectorAll("[id~="+T0+"-]").length||Q.push("~="),p0.querySelectorAll("a#"+T0+"+*").length||Q.push(".#.+[+~]"),p0.querySelectorAll(":checked").length||Q.push(":checked"),d0=L.createElement("input"),d0.setAttribute("type","hidden"),p0.appendChild(d0).setAttribute("name","D"),w.appendChild(p0).disabled=!0,p0.querySelectorAll(":disabled").length!==2&&Q.push(":enabled",":disabled"),d0=L.createElement("input"),d0.setAttribute("name",""),p0.appendChild(d0),p0.querySelectorAll("[name='']").length||Q.push("\\["+S+"*name"+S+"*="+S+`*(?:''|"")`)}),m.cssHas||Q.push(":has"),Q=Q.length&&new RegExp(Q.join("|")),be=function(p0,d0){if(p0===d0)return N=!0,0;var y=!p0.compareDocumentPosition-!d0.compareDocumentPosition;return y||(y=(p0.ownerDocument||p0)==(d0.ownerDocument||d0)?p0.compareDocumentPosition(d0):1,y&1||!m.sortDetached&&d0.compareDocumentPosition(p0)===y?p0===L||p0.ownerDocument==O0&&d1.contains(O0,p0)?-1:d0===L||d0.ownerDocument==O0&&d1.contains(O0,d0)?1:f?A.call(f,p0)-A.call(f,d0):0:y&4?-1:1)}),L}d1.matches=function(D,V){return d1(D,null,null,V)},d1.matchesSelector=function(D,V){if(zn(D),U&&!Ee[V+" "]&&(!Q||!Q.test(V)))try{var M0=z0.call(D,V);if(M0||m.disconnectedMatch||D.document&&D.document.nodeType!==11)return M0}catch{Ee(V,!0)}return d1(V,L,null,[D]).length>0},d1.contains=function(D,V){return(D.ownerDocument||D)!=L&&zn(D),E.contains(D,V)},d1.attr=function(D,V){(D.ownerDocument||D)!=L&&zn(D);var M0=s.attrHandle[V.toLowerCase()],p0=M0&&T.call(s.attrHandle,V.toLowerCase())?M0(D,V,!U):void 0;return p0!==void 0?p0:D.getAttribute(V)},d1.error=function(D){throw new Error("Syntax error, unrecognized expression: "+D)},E.uniqueSort=function(D){var V,M0=[],p0=0,d0=0;if(N=!m.sortStable,f=!m.sortStable&&O.call(D,0),g1.call(D,be),N){for(;V=D[d0++];)V===D[d0]&&(p0=M0.push(d0));for(;p0--;)n0.call(D,M0[p0],1)}return f=null,D},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(O.apply(this)))},s=E.expr={cacheLength:50,createPseudo:Ve,match:Ze,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(D){return D[1]=D[1].replace(pt,_t),D[3]=(D[3]||D[4]||D[5]||"").replace(pt,_t),D[2]==="~="&&(D[3]=" "+D[3]+" "),D.slice(0,4)},CHILD:function(D){return D[1]=D[1].toLowerCase(),D[1].slice(0,3)==="nth"?(D[3]||d1.error(D[0]),D[4]=+(D[4]?D[5]+(D[6]||1):2*(D[3]==="even"||D[3]==="odd")),D[5]=+(D[7]+D[8]||D[3]==="odd")):D[3]&&d1.error(D[0]),D},PSEUDO:function(D){var V,M0=!D[6]&&D[2];return Ze.CHILD.test(D[0])?null:(D[3]?D[2]=D[4]||D[5]||"":M0&&ct.test(M0)&&(V=st(M0,!0))&&(V=M0.indexOf(")",M0.length-V)-M0.length)&&(D[0]=D[0].slice(0,V),D[2]=M0.slice(0,V)),D.slice(0,3))}},filter:{TAG:function(D){var V=D.replace(pt,_t).toLowerCase();return D==="*"?function(){return!0}:function(M0){return F0(M0,V)}},CLASS:function(D){var V=c1[D+" "];return V||(V=new RegExp("(^|"+S+")"+D+"("+S+"|$)"))&&c1(D,function(M0){return V.test(typeof M0.className=="string"&&M0.className||typeof M0.getAttribute<"u"&&M0.getAttribute("class")||"")})},ATTR:function(D,V,M0){return function(p0){var d0=d1.attr(p0,D);return d0==null?V==="!=":V?(d0+="",V==="="?d0===M0:V==="!="?d0!==M0:V==="^="?M0&&d0.indexOf(M0)===0:V==="*="?M0&&d0.indexOf(M0)>-1:V==="$="?M0&&d0.slice(-M0.length)===M0:V==="~="?(" "+d0.replace(D1," ")+" ").indexOf(M0)>-1:V==="|="?d0===M0||d0.slice(0,M0.length+1)===M0+"-":!1):!0}},CHILD:function(D,V,M0,p0,d0){var y=D.slice(0,3)!=="nth",e0=D.slice(-4)!=="last",J=V==="of-type";return p0===1&&d0===0?function(A0){return!!A0.parentNode}:function(A0,U0,X0){var J0,k0,Q0,ne,k1,ie=y!==e0?"nextSibling":"previousSibling",tt=A0.parentNode,De=J&&A0.nodeName.toLowerCase(),Yt=!X0&&!J,oe=!1;if(tt){if(y){for(;ie;){for(Q0=A0;Q0=Q0[ie];)if(J?F0(Q0,De):Q0.nodeType===1)return!1;k1=ie=D==="only"&&!k1&&"nextSibling"}return!0}if(k1=[e0?tt.firstChild:tt.lastChild],e0&&Yt){for(k0=tt[T0]||(tt[T0]={}),J0=k0[D]||[],ne=J0[0]===o0&&J0[1],oe=ne&&J0[2],Q0=ne&&tt.childNodes[ne];Q0=++ne&&Q0&&Q0[ie]||(oe=ne=0)||k1.pop();)if(Q0.nodeType===1&&++oe&&Q0===A0){k0[D]=[o0,ne,oe];break}}else if(Yt&&(k0=A0[T0]||(A0[T0]={}),J0=k0[D]||[],ne=J0[0]===o0&&J0[1],oe=ne),oe===!1)for(;(Q0=++ne&&Q0&&Q0[ie]||(oe=ne=0)||k1.pop())&&!((J?F0(Q0,De):Q0.nodeType===1)&&++oe&&(Yt&&(k0=Q0[T0]||(Q0[T0]={}),k0[D]=[o0,oe]),Q0===A0)););return oe-=d0,oe===p0||oe%p0===0&&oe/p0>=0}}},PSEUDO:function(D,V){var M0,p0=s.pseudos[D]||s.setFilters[D.toLowerCase()]||d1.error("unsupported pseudo: "+D);return p0[T0]?p0(V):p0.length>1?(M0=[D,D,"",V],s.setFilters.hasOwnProperty(D.toLowerCase())?Ve(function(d0,y){for(var e0,J=p0(d0,V),A0=J.length;A0--;)e0=A.call(d0,J[A0]),d0[e0]=!(y[e0]=J[A0])}):function(d0){return p0(d0,0,M0)}):p0}},pseudos:{not:Ve(function(D){var V=[],M0=[],p0=xt(D.replace(G,"$1"));return p0[T0]?Ve(function(d0,y,e0,J){for(var A0,U0=p0(d0,null,J,[]),X0=d0.length;X0--;)(A0=U0[X0])&&(d0[X0]=!(y[X0]=A0))}):function(d0,y,e0){return V[0]=d0,p0(V,null,e0,M0),V[0]=null,!M0.pop()}}),has:Ve(function(D){return function(V){return d1(D,V).length>0}}),contains:Ve(function(D){return D=D.replace(pt,_t),function(V){return(V.textContent||E.text(V)).indexOf(D)>-1}}),lang:Ve(function(D){return qt.test(D||"")||d1.error("unsupported lang: "+D),D=D.replace(pt,_t).toLowerCase(),function(V){var M0;do if(M0=U?V.lang:V.getAttribute("xml:lang")||V.getAttribute("lang"))return M0=M0.toLowerCase(),M0===D||M0.indexOf(D+"-")===0;while((V=V.parentNode)&&V.nodeType===1);return!1}}),target:function(D){var V=t.location&&t.location.hash;return V&&V.slice(1)===D.id},root:function(D){return D===w},focus:function(D){return D===M2()&&L.hasFocus()&&!!(D.type||D.href||~D.tabIndex)},enabled:i2(!1),disabled:i2(!0),checked:function(D){return F0(D,"input")&&!!D.checked||F0(D,"option")&&!!D.selected},selected:function(D){return D.parentNode&&D.parentNode.selectedIndex,D.selected===!0},empty:function(D){for(D=D.firstChild;D;D=D.nextSibling)if(D.nodeType<6)return!1;return!0},parent:function(D){return!s.pseudos.empty(D)},header:function(D){return Ft.test(D.nodeName)},input:function(D){return St.test(D.nodeName)},button:function(D){return F0(D,"input")&&D.type==="button"||F0(D,"button")},text:function(D){var V;return F0(D,"input")&&D.type==="text"&&((V=D.getAttribute("type"))==null||V.toLowerCase()==="text")},first:bt(function(){return[0]}),last:bt(function(D,V){return[V-1]}),eq:bt(function(D,V,M0){return[M0<0?M0+V:M0]}),even:bt(function(D,V){for(var M0=0;M0V?p0=V:p0=M0;--p0>=0;)D.push(p0);return D}),gt:bt(function(D,V,M0){for(var p0=M0<0?M0+V:M0;++p01?function(V,M0,p0){for(var d0=D.length;d0--;)if(!D[d0](V,M0,p0))return!1;return!0}:D[0]}function _a(D,V,M0){for(var p0=0,d0=V.length;p0-1&&(e0[X0]=!(J[X0]=k0))}}else Q0=ir(Q0===J?Q0.splice(ie,Q0.length):Q0),d0?d0(null,J,Q0,U0):q.apply(J,Q0)})}function En(D){for(var V,M0,p0,d0=D.length,y=s.relative[D[0].type],e0=y||s.relative[" "],J=y?1:0,A0=At(function(J0){return J0===V},e0,!0),U0=At(function(J0){return A.call(V,J0)>-1},e0,!0),X0=[function(J0,k0,Q0){var ne=!y&&(Q0||k0!=z)||((V=k0).nodeType?A0(J0,k0,Q0):U0(J0,k0,Q0));return V=null,ne}];J1&&O2(X0),J>1&&Xn(D.slice(0,J-1).concat({value:D[J-2].type===" "?"*":""})).replace(G,"$1"),M0,J0,p0=D.length>0,d0=function(y,e0,J,A0,U0){var X0,J0,k0,Q0=0,ne="0",k1=y&&[],ie=[],tt=z,De=y||p0&&s.find.TAG("*",U0),Yt=o0+=tt==null?1:Math.random()||.1,oe=De.length;for(U0&&(z=e0==L||e0||U0);ne!==oe&&(X0=De[ne])!=null;ne++){if(p0&&X0){for(J0=0,!e0&&X0.ownerDocument!=L&&(zn(X0),J=!U);k0=D[J0++];)if(k0(X0,e0||L,J)){q.call(A0,X0);break}U0&&(o0=Yt)}M0&&((X0=!k0&&X0)&&Q0--,y&&k1.push(X0))}if(Q0+=ne,M0&&ne!==Q0){for(J0=0;k0=V[J0++];)k0(k1,ie,e0,J);if(y){if(Q0>0)for(;ne--;)k1[ne]||ie[ne]||(ie[ne]=O1.call(A0));ie=ir(ie)}q.apply(A0,ie),U0&&!y&&ie.length>0&&Q0+V.length>1&&E.uniqueSort(A0)}return U0&&(o0=Yt,z=tt),k1};return M0?Ve(d0):d0}function xt(D,V){var M0,p0=[],d0=[],y=b1[D+" "];if(!y){for(V||(V=st(D)),M0=V.length;M0--;)y=En(V[M0]),y[T0]?p0.push(y):d0.push(y);y=b1(D,Ne(d0,p0)),y.selector=D}return y}function uM(D,V,M0,p0){var d0,y,e0,J,A0,U0=typeof D=="function"&&D,X0=!p0&&st(D=U0.selector||D);if(M0=M0||[],X0.length===1){if(y=X0[0]=X0[0].slice(0),y.length>2&&(e0=y[0]).type==="ID"&&V.nodeType===9&&U&&s.relative[y[1].type]){if(V=(s.find.ID(e0.matches[0].replace(pt,_t),V)||[])[0],V)U0&&(V=V.parentNode);else return M0;D=D.slice(y.shift().value.length)}for(d0=Ze.needsContext.test(D)?0:y.length;d0--&&(e0=y[d0],!s.relative[J=e0.type]);)if((A0=s.find[J])&&(p0=A0(e0.matches[0].replace(pt,_t),I2.test(y[0].type)&&Lt(V.parentNode)||V))){if(y.splice(d0,1),D=p0.length&&Xn(y),!D)return q.apply(M0,p0),M0;break}}return(U0||xt(D,X0))(p0,V,!U,M0,!V||I2.test(D)&&Lt(V.parentNode)||V),M0}m.sortStable=T0.split("").sort(be).join("")===T0,zn(),m.sortDetached=a2(function(D){return D.compareDocumentPosition(L.createElement("fieldset"))&1}),E.find=d1,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,d1.compile=xt,d1.select=uM,d1.setDocument=zn,d1.tokenize=st,d1.escape=E.escapeSelector,d1.getText=E.text,d1.isXML=E.isXMLDoc,d1.selectors=E.expr,d1.support=E.support,d1.uniqueSort=E.uniqueSort})();var l0=function(c,s,z){for(var f=[],N=z!==void 0;(c=c[s])&&c.nodeType!==9;)if(c.nodeType===1){if(N&&E(c).is(z))break;f.push(c)}return f},m0=function(c,s){for(var z=[];c;c=c.nextSibling)c.nodeType===1&&c!==s&&z.push(c);return z},L0=E.expr.match.needsContext,R0=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function M1(c,s,z){return P(s)?E.grep(c,function(f,N){return!!s.call(f,N,f)!==z}):s.nodeType?E.grep(c,function(f){return f===s!==z}):typeof s!="string"?E.grep(c,function(f){return A.call(s,f)>-1!==z}):E.filter(s,c,z)}E.filter=function(c,s,z){var f=s[0];return z&&(c=":not("+c+")"),s.length===1&&f.nodeType===1?E.find.matchesSelector(f,c)?[f]:[]:E.find.matches(c,E.grep(s,function(N){return N.nodeType===1}))},E.fn.extend({find:function(c){var s,z,f=this.length,N=this;if(typeof c!="string")return this.pushStack(E(c).filter(function(){for(s=0;s1?E.uniqueSort(z):z},filter:function(c){return this.pushStack(M1(this,c||[],!1))},not:function(c){return this.pushStack(M1(this,c||[],!0))},is:function(c){return!!M1(this,typeof c=="string"&&L0.test(c)?E(c):c||[],!1).length}});var Z0,a1=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,U1=E.fn.init=function(c,s,z){var f,N;if(!c)return this;if(z=z||Z0,typeof c=="string")if(c[0]==="<"&&c[c.length-1]===">"&&c.length>=3?f=[null,c,null]:f=a1.exec(c),f&&(f[1]||!s))if(f[1]){if(s=s instanceof E?s[0]:s,E.merge(this,E.parseHTML(f[1],s&&s.nodeType?s.ownerDocument||s:W,!0)),R0.test(f[1])&&E.isPlainObject(s))for(f in s)P(this[f])?this[f](s[f]):this.attr(f,s[f]);return this}else return N=W.getElementById(f[2]),N&&(this[0]=N,this.length=1),this;else return!s||s.jquery?(s||z).find(c):this.constructor(s).find(c);else{if(c.nodeType)return this[0]=c,this.length=1,this;if(P(c))return z.ready!==void 0?z.ready(c):c(E)}return E.makeArray(c,this)};U1.prototype=E.fn,Z0=E(W);var H0=/^(?:parents|prev(?:Until|All))/,S1={children:!0,contents:!0,next:!0,prev:!0};E.fn.extend({has:function(c){var s=E(c,this),z=s.length;return this.filter(function(){for(var f=0;f-1:z.nodeType===1&&E.find.matchesSelector(z,c))){q.push(z);break}}return this.pushStack(q.length>1?E.uniqueSort(q):q)},index:function(c){return c?typeof c=="string"?A.call(E(c),this[0]):A.call(this,c.jquery?c[0]:c):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(c,s){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(c,s))))},addBack:function(c){return this.add(c==null?this.prevObject:this.prevObject.filter(c))}});function Y1(c,s){for(;(c=c[s])&&c.nodeType!==1;);return c}E.each({parent:function(c){var s=c.parentNode;return s&&s.nodeType!==11?s:null},parents:function(c){return l0(c,"parentNode")},parentsUntil:function(c,s,z){return l0(c,"parentNode",z)},next:function(c){return Y1(c,"nextSibling")},prev:function(c){return Y1(c,"previousSibling")},nextAll:function(c){return l0(c,"nextSibling")},prevAll:function(c){return l0(c,"previousSibling")},nextUntil:function(c,s,z){return l0(c,"nextSibling",z)},prevUntil:function(c,s,z){return l0(c,"previousSibling",z)},siblings:function(c){return m0((c.parentNode||{}).firstChild,c)},children:function(c){return m0(c.firstChild)},contents:function(c){return c.contentDocument!=null&&M(c.contentDocument)?c.contentDocument:(F0(c,"template")&&(c=c.content||c),E.merge([],c.childNodes))}},function(c,s){E.fn[c]=function(z,f){var N=E.map(this,s,z);return c.slice(-5)!=="Until"&&(f=z),f&&typeof f=="string"&&(N=E.filter(f,N)),this.length>1&&(S1[c]||E.uniqueSort(N),H0.test(c)&&N.reverse()),this.pushStack(N)}});var V1=/[^\x20\t\r\n\f]+/g;function Ke(c){var s={};return E.each(c.match(V1)||[],function(z,f){s[f]=!0}),s}E.Callbacks=function(c){c=typeof c=="string"?Ke(c):E.extend({},c);var s,z,f,N,q=[],L=[],w=-1,U=function(){for(N=N||c.once,f=s=!0;L.length;w=-1)for(z=L.shift();++w-1;)q.splice(o0,1),o0<=w&&w--}),this},has:function(z0){return z0?E.inArray(z0,q)>-1:q.length>0},empty:function(){return q&&(q=[]),this},disable:function(){return N=L=[],q=z="",this},disabled:function(){return!q},lock:function(){return N=L=[],!z&&!s&&(q=z=""),this},locked:function(){return!!N},fireWith:function(z0,T0){return N||(T0=T0||[],T0=[z0,T0.slice?T0.slice():T0],L.push(T0),s||U()),this},fire:function(){return Q.fireWith(this,arguments),this},fired:function(){return!!f}};return Q};function G1(c){return c}function Y(c){throw c}function S0(c,s,z,f){var N;try{c&&P(N=c.promise)?N.call(c).done(s).fail(z):c&&P(N=c.then)?N.call(c,s,z):s.apply(void 0,[c].slice(f))}catch(q){z.apply(void 0,[q])}}E.extend({Deferred:function(c){var s=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],z="pending",f={state:function(){return z},always:function(){return N.done(arguments).fail(arguments),this},catch:function(q){return f.then(null,q)},pipe:function(){var q=arguments;return E.Deferred(function(L){E.each(s,function(w,U){var Q=P(q[U[4]])&&q[U[4]];N[U[1]](function(){var z0=Q&&Q.apply(this,arguments);z0&&P(z0.promise)?z0.promise().progress(L.notify).done(L.resolve).fail(L.reject):L[U[0]+"With"](this,Q?[z0]:arguments)})}),q=null}).promise()},then:function(q,L,w){var U=0;function Q(z0,T0,o0,C0){return function(){var c1=this,t1=arguments,b1=function(){var be,Qe;if(!(z0=U&&(o0!==Y&&(c1=void 0,t1=[be]),T0.rejectWith(c1,t1))}};z0?Ee():(E.Deferred.getErrorHook?Ee.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(Ee.error=E.Deferred.getStackHook()),t.setTimeout(Ee))}}return E.Deferred(function(z0){s[0][3].add(Q(0,z0,P(w)?w:G1,z0.notifyWith)),s[1][3].add(Q(0,z0,P(q)?q:G1)),s[2][3].add(Q(0,z0,P(L)?L:Y))}).promise()},promise:function(q){return q!=null?E.extend(q,f):f}},N={};return E.each(s,function(q,L){var w=L[2],U=L[5];f[L[1]]=w.add,U&&w.add(function(){z=U},s[3-q][2].disable,s[3-q][3].disable,s[0][2].lock,s[0][3].lock),w.add(L[3].fire),N[L[0]]=function(){return N[L[0]+"With"](this===N?void 0:this,arguments),this},N[L[0]+"With"]=w.fireWith}),f.promise(N),c&&c.call(N,N),N},when:function(c){var s=arguments.length,z=s,f=Array(z),N=O.call(arguments),q=E.Deferred(),L=function(w){return function(U){f[w]=this,N[w]=arguments.length>1?O.call(arguments):U,--s||q.resolveWith(f,N)}};if(s<=1&&(S0(c,q.done(L(z)).resolve,q.reject,!s),q.state()==="pending"||P(N[z]&&N[z].then)))return q.then();for(;z--;)S0(N[z],L(z),q.reject);return q.promise()}});var f0=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(c,s){t.console&&t.console.warn&&c&&f0.test(c.name)&&t.console.warn("jQuery.Deferred exception: "+c.message,c.stack,s)},E.readyException=function(c){t.setTimeout(function(){throw c})};var y0=E.Deferred();E.fn.ready=function(c){return y0.then(c).catch(function(s){E.readyException(s)}),this},E.extend({isReady:!1,readyWait:1,ready:function(c){(c===!0?--E.readyWait:E.isReady)||(E.isReady=!0,!(c!==!0&&--E.readyWait>0)&&y0.resolveWith(W,[E]))}}),E.ready.then=y0.then;function $0(){W.removeEventListener("DOMContentLoaded",$0),t.removeEventListener("load",$0),E.ready()}W.readyState==="complete"||W.readyState!=="loading"&&!W.documentElement.doScroll?t.setTimeout(E.ready):(W.addEventListener("DOMContentLoaded",$0),t.addEventListener("load",$0));var s0=function(c,s,z,f,N,q,L){var w=0,U=c.length,Q=z==null;if(j(z)==="object"){N=!0;for(w in z)s0(c,s,w,z[w],!0,q,L)}else if(f!==void 0&&(N=!0,P(f)||(L=!0),Q&&(L?(s.call(c,f),s=null):(Q=s,s=function(z0,T0,o0){return Q.call(E(z0),o0)})),s))for(;w1,null,!0)},removeData:function(c){return this.each(function(){P0.remove(this,c)})}}),E.extend({queue:function(c,s,z){var f;if(c)return s=(s||"fx")+"queue",f=j0.get(c,s),z&&(!f||Array.isArray(z)?f=j0.access(c,s,E.makeArray(z)):f.push(z)),f||[]},dequeue:function(c,s){s=s||"fx";var z=E.queue(c,s),f=z.length,N=z.shift(),q=E._queueHooks(c,s),L=function(){E.dequeue(c,s)};N==="inprogress"&&(N=z.shift(),f--),N&&(s==="fx"&&z.unshift("inprogress"),delete q.stop,N.call(c,L,q)),!f&&q&&q.empty.fire()},_queueHooks:function(c,s){var z=s+"queueHooks";return j0.get(c,z)||j0.access(c,z,{empty:E.Callbacks("once memory").add(function(){j0.remove(c,[s+"queue",z])})})}}),E.fn.extend({queue:function(c,s){var z=2;return typeof c!="string"&&(s=c,c="fx",z--),arguments.length\x20\t\r\n\f]*)/i,ko=/^$|^module$|\/(?:java|ecma)script/i;(function(){var c=W.createDocumentFragment(),s=c.appendChild(W.createElement("div")),z=W.createElement("input");z.setAttribute("type","radio"),z.setAttribute("checked","checked"),z.setAttribute("name","t"),s.appendChild(z),m.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,s.innerHTML="",m.noCloneChecked=!!s.cloneNode(!0).lastChild.defaultValue,s.innerHTML="",m.option=!!s.lastChild})();var Je={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Je.tbody=Je.tfoot=Je.colgroup=Je.caption=Je.thead,Je.th=Je.td,m.option||(Je.optgroup=Je.option=[1,""]);function Ue(c,s){var z;return typeof c.getElementsByTagName<"u"?z=c.getElementsByTagName(s||"*"):typeof c.querySelectorAll<"u"?z=c.querySelectorAll(s||"*"):z=[],s===void 0||s&&F0(c,s)?E.merge([c],z):z}function Fr(c,s){for(var z=0,f=c.length;z-1){N&&N.push(q);continue}if(Q=on(q),L=Ue(T0.appendChild(q),"script"),Q&&Fr(L),z)for(z0=0;q=L[z0++];)ko.test(q.type||"")&&z.push(q)}return T0}var Jo=/^([^.]*)(?:\.(.+)|)/;function t2(){return!0}function Mn(){return!1}function xr(c,s,z,f,N,q){var L,w;if(typeof s=="object"){typeof z!="string"&&(f=f||z,z=void 0);for(w in s)xr(c,w,z,f,s[w],q);return c}if(f==null&&N==null?(N=z,f=z=void 0):N==null&&(typeof z=="string"?(N=f,f=void 0):(N=f,f=z,z=void 0)),N===!1)N=Mn;else if(!N)return c;return q===1&&(L=N,N=function(U){return E().off(U),L.apply(this,arguments)},N.guid=L.guid||(L.guid=E.guid++)),c.each(function(){E.event.add(this,s,N,f,z)})}E.event={global:{},add:function(c,s,z,f,N){var q,L,w,U,Q,z0,T0,o0,C0,c1,t1,b1=j0.get(c);if(pe(c))for(z.handler&&(q=z,z=q.handler,N=q.selector),N&&E.find.matchesSelector(Bt,N),z.guid||(z.guid=E.guid++),(U=b1.events)||(U=b1.events=Object.create(null)),(L=b1.handle)||(L=b1.handle=function(Ee){return typeof E<"u"&&E.event.triggered!==Ee.type?E.event.dispatch.apply(c,arguments):void 0}),s=(s||"").match(V1)||[""],Q=s.length;Q--;)w=Jo.exec(s[Q])||[],C0=t1=w[1],c1=(w[2]||"").split(".").sort(),C0&&(T0=E.event.special[C0]||{},C0=(N?T0.delegateType:T0.bindType)||C0,T0=E.event.special[C0]||{},z0=E.extend({type:C0,origType:t1,data:f,handler:z,guid:z.guid,selector:N,needsContext:N&&E.expr.match.needsContext.test(N),namespace:c1.join(".")},q),(o0=U[C0])||(o0=U[C0]=[],o0.delegateCount=0,(!T0.setup||T0.setup.call(c,f,c1,L)===!1)&&c.addEventListener&&c.addEventListener(C0,L)),T0.add&&(T0.add.call(c,z0),z0.handler.guid||(z0.handler.guid=z.guid)),N?o0.splice(o0.delegateCount++,0,z0):o0.push(z0),E.event.global[C0]=!0)},remove:function(c,s,z,f,N){var q,L,w,U,Q,z0,T0,o0,C0,c1,t1,b1=j0.hasData(c)&&j0.get(c);if(!(!b1||!(U=b1.events))){for(s=(s||"").match(V1)||[""],Q=s.length;Q--;){if(w=Jo.exec(s[Q])||[],C0=t1=w[1],c1=(w[2]||"").split(".").sort(),!C0){for(C0 in U)E.event.remove(c,C0+s[Q],z,f,!0);continue}for(T0=E.event.special[C0]||{},C0=(f?T0.delegateType:T0.bindType)||C0,o0=U[C0]||[],w=w[2]&&new RegExp("(^|\\.)"+c1.join("\\.(?:.*\\.|)")+"(\\.|$)"),L=q=o0.length;q--;)z0=o0[q],(N||t1===z0.origType)&&(!z||z.guid===z0.guid)&&(!w||w.test(z0.namespace))&&(!f||f===z0.selector||f==="**"&&z0.selector)&&(o0.splice(q,1),z0.selector&&o0.delegateCount--,T0.remove&&T0.remove.call(c,z0));L&&!o0.length&&((!T0.teardown||T0.teardown.call(c,c1,b1.handle)===!1)&&E.removeEvent(c,C0,b1.handle),delete U[C0])}E.isEmptyObject(U)&&j0.remove(c,"handle events")}},dispatch:function(c){var s,z,f,N,q,L,w=new Array(arguments.length),U=E.event.fix(c),Q=(j0.get(this,"events")||Object.create(null))[U.type]||[],z0=E.event.special[U.type]||{};for(w[0]=U,s=1;s=1)){for(;Q!==this;Q=Q.parentNode||this)if(Q.nodeType===1&&!(c.type==="click"&&Q.disabled===!0)){for(q=[],L={},z=0;z-1:E.find(N,this,null,[Q]).length),L[N]&&q.push(f);q.length&&w.push({elem:Q,handlers:q})}}return Q=this,U\s*$/g;function jo(c,s){return F0(c,"table")&&F0(s.nodeType!==11?s:s.firstChild,"tr")&&E(c).children("tbody")[0]||c}function fa(c){return c.type=(c.getAttribute("type")!==null)+"/"+c.type,c}function Qo(c){return(c.type||"").slice(0,5)==="true/"?c.type=c.type.slice(5):c.removeAttribute("type"),c}function Zo(c,s){var z,f,N,q,L,w,U;if(s.nodeType===1){if(j0.hasData(c)&&(q=j0.get(c),U=q.events,U)){j0.remove(s,"handle events");for(N in U)for(z=0,f=U[N].length;z1&&typeof C0=="string"&&!m.checkClone&&ua.test(C0))return c.each(function(t1){var b1=c.eq(t1);c1&&(s[0]=C0.call(this,t1,b1.html())),Dn(b1,s,z,f)});if(T0&&(N=Ko(s,c[0].ownerDocument,!1,c,f),q=N.firstChild,N.childNodes.length===1&&(N=q),q||f)){for(L=E.map(Ue(N,"script"),fa),w=L.length;z00&&Fr(L,!U&&Ue(c,"script")),w},cleanData:function(c){for(var s,z,f,N=E.event.special,q=0;(z=c[q])!==void 0;q++)if(pe(z)){if(s=z[j0.expando]){if(s.events)for(f in s.events)N[f]?E.event.remove(z,f):E.removeEvent(z,f,s.handle);z[j0.expando]=void 0}z[P0.expando]&&(z[P0.expando]=void 0)}}}),E.fn.extend({detach:function(c){return Vr(this,c,!0)},remove:function(c){return Vr(this,c)},text:function(c){return s0(this,function(s){return s===void 0?E.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=s)})},null,c,arguments.length)},append:function(){return Dn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var s=jo(this,c);s.appendChild(c)}})},prepend:function(){return Dn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var s=jo(this,c);s.insertBefore(c,s.firstChild)}})},before:function(){return Dn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this)})},after:function(){return Dn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this.nextSibling)})},empty:function(){for(var c,s=0;(c=this[s])!=null;s++)c.nodeType===1&&(E.cleanData(Ue(c,!1)),c.textContent="");return this},clone:function(c,s){return c=c??!1,s=s??c,this.map(function(){return E.clone(this,c,s)})},html:function(c){return s0(this,function(s){var z=this[0]||{},f=0,N=this.length;if(s===void 0&&z.nodeType===1)return z.innerHTML;if(typeof s=="string"&&!tr.test(s)&&!Je[(Gr.exec(s)||["",""])[1].toLowerCase()]){s=E.htmlPrefilter(s);try{for(;f=0&&(U+=Math.max(0,Math.ceil(c["offset"+s[0].toUpperCase()+s.slice(1)]-q-U-w-.5))||0),U+Q}function MM(c,s,z){var f=nr(c),N=!m.boxSizingReliable()||z,q=N&&E.css(c,"boxSizing",!1,f)==="border-box",L=q,w=pn(c,s,f),U="offset"+s[0].toUpperCase()+s.slice(1);if(an.test(w)){if(!z)return w;w="auto"}return(!m.boxSizingReliable()&&q||!m.reliableTrDimensions()&&F0(c,"tr")||w==="auto"||!parseFloat(w)&&E.css(c,"display",!1,f)==="inline")&&c.getClientRects().length&&(q=E.css(c,"boxSizing",!1,f)==="border-box",L=U in c,L&&(w=c[U])),w=parseFloat(w)||0,w+$r(c,s,z||(q?"border":"content"),L,f,w)+"px"}E.extend({cssHooks:{opacity:{get:function(c,s){if(s){var z=pn(c,"opacity");return z===""?"1":z}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(c,s,z,f){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var N,q,L,w=R1(s),U=On.test(s),Q=c.style;if(U||(s=N2(w)),L=E.cssHooks[s]||E.cssHooks[w],z!==void 0){if(q=typeof z,q==="string"&&(N=yt.exec(z))&&N[1]&&(z=vn(c,s,N),q="number"),z==null||z!==z)return;q==="number"&&!U&&(z+=N&&N[3]||(E.cssNumber[w]?"":"px")),!m.clearCloneStyle&&z===""&&s.indexOf("background")===0&&(Q[s]="inherit"),(!L||!("set"in L)||(z=L.set(c,z,f))!==void 0)&&(U?Q.setProperty(s,z):Q[s]=z)}else return L&&"get"in L&&(N=L.get(c,!1,f))!==void 0?N:Q[s]}},css:function(c,s,z,f){var N,q,L,w=R1(s),U=On.test(s);return U||(s=N2(w)),L=E.cssHooks[s]||E.cssHooks[w],L&&"get"in L&&(N=L.get(c,!0,z)),N===void 0&&(N=pn(c,s,f)),N==="normal"&&s in rM&&(N=rM[s]),z===""||z?(q=parseFloat(N),z===!0||isFinite(q)?q||0:N):N}}),E.each(["height","width"],function(c,s){E.cssHooks[s]={get:function(z,f,N){if(f)return tM.test(E.css(z,"display"))&&(!z.getClientRects().length||!z.getBoundingClientRect().width)?cn(z,nM,function(){return MM(z,s,N)}):MM(z,s,N)},set:function(z,f,N){var q,L=nr(z),w=!m.scrollboxSize()&&L.position==="absolute",U=w||N,Q=U&&E.css(z,"boxSizing",!1,L)==="border-box",z0=N?$r(z,s,N,Q,L):0;return Q&&w&&(z0-=Math.ceil(z["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(L[s])-$r(z,s,"border",!1,L)-.5)),z0&&(q=yt.exec(f))&&(q[3]||"px")!=="px"&&(z.style[s]=f,f=E.css(z,s)),oM(z,f,z0)}}}),E.cssHooks.marginLeft=eM(m.reliableMarginLeft,function(c,s){if(s)return(parseFloat(pn(c,"marginLeft"))||c.getBoundingClientRect().left-cn(c,{marginLeft:0},function(){return c.getBoundingClientRect().left}))+"px"}),E.each({margin:"",padding:"",border:"Width"},function(c,s){E.cssHooks[c+s]={expand:function(z){for(var f=0,N={},q=typeof z=="string"?z.split(" "):[z];f<4;f++)N[c+xe[f]+s]=q[f]||q[f-2]||q[0];return N}},c!=="margin"&&(E.cssHooks[c+s].set=oM)}),E.fn.extend({css:function(c,s){return s0(this,function(z,f,N){var q,L,w={},U=0;if(Array.isArray(f)){for(q=nr(z),L=f.length;U1)}});function ge(c,s,z,f,N){return new ge.prototype.init(c,s,z,f,N)}E.Tween=ge,ge.prototype={constructor:ge,init:function(c,s,z,f,N,q){this.elem=c,this.prop=z,this.easing=N||E.easing._default,this.options=s,this.start=this.now=this.cur(),this.end=f,this.unit=q||(E.cssNumber[z]?"":"px")},cur:function(){var c=ge.propHooks[this.prop];return c&&c.get?c.get(this):ge.propHooks._default.get(this)},run:function(c){var s,z=ge.propHooks[this.prop];return this.options.duration?this.pos=s=E.easing[this.easing](c,this.options.duration*c,0,1,this.options.duration):this.pos=s=c,this.now=(this.end-this.start)*s+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),z&&z.set?z.set(this):ge.propHooks._default.set(this),this}},ge.prototype.init.prototype=ge.prototype,ge.propHooks={_default:{get:function(c){var s;return c.elem.nodeType!==1||c.elem[c.prop]!=null&&c.elem.style[c.prop]==null?c.elem[c.prop]:(s=E.css(c.elem,c.prop,""),!s||s==="auto"?0:s)},set:function(c){E.fx.step[c.prop]?E.fx.step[c.prop](c):c.elem.nodeType===1&&(E.cssHooks[c.prop]||c.elem.style[N2(c.prop)]!=null)?E.style(c.elem,c.prop,c.now+c.unit):c.elem[c.prop]=c.now}}},ge.propHooks.scrollTop=ge.propHooks.scrollLeft={set:function(c){c.elem.nodeType&&c.elem.parentNode&&(c.elem[c.prop]=c.now)}},E.easing={linear:function(c){return c},swing:function(c){return .5-Math.cos(c*Math.PI)/2},_default:"swing"},E.fx=ge.prototype.init,E.fx.step={};var bn,Pn,Kr=/^(?:toggle|show|hide)$/,q2=/queueHooks$/;function Xt(){Pn&&(W.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Xt):t.setTimeout(Xt,E.fx.interval),E.fx.tick())}function S2(){return t.setTimeout(function(){bn=void 0}),bn=Date.now()}function wt(c,s){var z,f=0,N={height:c};for(s=s?1:0;f<4;f+=2-s)z=xe[f],N["margin"+z]=N["padding"+z]=c;return s&&(N.opacity=N.width=c),N}function Rt(c,s,z){for(var f,N=(Te.tweeners[s]||[]).concat(Te.tweeners["*"]),q=0,L=N.length;q1)},removeAttr:function(c){return this.each(function(){E.removeAttr(this,c)})}}),E.extend({attr:function(c,s,z){var f,N,q=c.nodeType;if(!(q===3||q===8||q===2)){if(typeof c.getAttribute>"u")return E.prop(c,s,z);if((q!==1||!E.isXMLDoc(c))&&(N=E.attrHooks[s.toLowerCase()]||(E.expr.match.bool.test(s)?Jr:void 0)),z!==void 0){if(z===null){E.removeAttr(c,s);return}return N&&"set"in N&&(f=N.set(c,z,s))!==void 0?f:(c.setAttribute(s,z+""),z)}return N&&"get"in N&&(f=N.get(c,s))!==null?f:(f=E.find.attr(c,s),f??void 0)}},attrHooks:{type:{set:function(c,s){if(!m.radioValue&&s==="radio"&&F0(c,"input")){var z=c.value;return c.setAttribute("type",s),z&&(c.value=z),s}}}},removeAttr:function(c,s){var z,f=0,N=s&&s.match(V1);if(N&&c.nodeType===1)for(;z=N[f++];)c.removeAttribute(z)}}),Jr={set:function(c,s,z){return s===!1?E.removeAttr(c,z):c.setAttribute(z,z),z}},E.each(E.expr.match.bool.source.match(/\w+/g),function(c,s){var z=yn[s]||E.find.attr;yn[s]=function(f,N,q){var L,w,U=N.toLowerCase();return q||(w=yn[U],yn[U]=L,L=z(f,N,q)!=null?U:null,yn[U]=w),L}});var _2=/^(?:input|select|textarea|button)$/i,L2=/^(?:a|area)$/i;E.fn.extend({prop:function(c,s){return s0(this,E.prop,c,s,arguments.length>1)},removeProp:function(c){return this.each(function(){delete this[E.propFix[c]||c]})}}),E.extend({prop:function(c,s,z){var f,N,q=c.nodeType;if(!(q===3||q===8||q===2))return(q!==1||!E.isXMLDoc(c))&&(s=E.propFix[s]||s,N=E.propHooks[s]),z!==void 0?N&&"set"in N&&(f=N.set(c,z,s))!==void 0?f:c[s]=z:N&&"get"in N&&(f=N.get(c,s))!==null?f:c[s]},propHooks:{tabIndex:{get:function(c){var s=E.find.attr(c,"tabindex");return s?parseInt(s,10):_2.test(c.nodeName)||L2.test(c.nodeName)&&c.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(E.propHooks.selected={get:function(c){var s=c.parentNode;return s&&s.parentNode&&s.parentNode.selectedIndex,null},set:function(c){var s=c.parentNode;s&&(s.selectedIndex,s.parentNode&&s.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this});function je(c){var s=c.match(V1)||[];return s.join(" ")}function sn(c){return c.getAttribute&&c.getAttribute("class")||""}function Bn(c){return Array.isArray(c)?c:typeof c=="string"?c.match(V1)||[]:[]}E.fn.extend({addClass:function(c){var s,z,f,N,q,L;return P(c)?this.each(function(w){E(this).addClass(c.call(this,w,sn(this)))}):(s=Bn(c),s.length?this.each(function(){if(f=sn(this),z=this.nodeType===1&&" "+je(f)+" ",z){for(q=0;q-1;)z=z.replace(" "+N+" "," ");L=je(z),f!==L&&this.setAttribute("class",L)}}):this):this.attr("class","")},toggleClass:function(c,s){var z,f,N,q,L=typeof c,w=L==="string"||Array.isArray(c);return P(c)?this.each(function(U){E(this).toggleClass(c.call(this,U,sn(this),s),s)}):typeof s=="boolean"&&w?s?this.addClass(c):this.removeClass(c):(z=Bn(c),this.each(function(){if(w)for(q=E(this),N=0;N-1)return!0;return!1}});var it=/\r/g;E.fn.extend({val:function(c){var s,z,f,N=this[0];return arguments.length?(f=P(c),this.each(function(q){var L;this.nodeType===1&&(f?L=c.call(this,q,E(this).val()):L=c,L==null?L="":typeof L=="number"?L+="":Array.isArray(L)&&(L=E.map(L,function(w){return w==null?"":w+""})),s=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()],(!s||!("set"in s)||s.set(this,L,"value")===void 0)&&(this.value=L))})):N?(s=E.valHooks[N.type]||E.valHooks[N.nodeName.toLowerCase()],s&&"get"in s&&(z=s.get(N,"value"))!==void 0?z:(z=N.value,typeof z=="string"?z.replace(it,""):z??"")):void 0}}),E.extend({valHooks:{option:{get:function(c){var s=E.find.attr(c,"value");return s??je(E.text(c))}},select:{get:function(c){var s,z,f,N=c.options,q=c.selectedIndex,L=c.type==="select-one",w=L?null:[],U=L?q+1:N.length;for(q<0?f=U:f=L?q:0;f-1)&&(z=!0);return z||(c.selectedIndex=-1),q}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(c,s){if(Array.isArray(s))return c.checked=E.inArray(E(c).val(),s)>-1}},m.checkOn||(E.valHooks[this].get=function(c){return c.getAttribute("value")===null?"on":c.value})});var o2=t.location,jr={guid:Date.now()},or=/\?/;E.parseXML=function(c){var s,z;if(!c||typeof c!="string")return null;try{s=new t.DOMParser().parseFromString(c,"text/xml")}catch{}return z=s&&s.getElementsByTagName("parsererror")[0],(!s||z)&&E.error("Invalid XML: "+(z?E.map(z.childNodes,function(f){return f.textContent}).join(` `):c)),s};var Mr=/^(?:focusinfocus|focusoutblur)$/,iM=function(c){c.stopPropagation()};E.extend(E.event,{trigger:function(c,s,z,f){var N,q,L,w,U,Q,z0,T0,o0=[z||W],C0=T.call(c,"type")?c.type:c,c1=T.call(c,"namespace")?c.namespace.split("."):[];if(q=T0=L=z=z||W,!(z.nodeType===3||z.nodeType===8)&&!Mr.test(C0+E.event.triggered)&&(C0.indexOf(".")>-1&&(c1=C0.split("."),C0=c1.shift(),c1.sort()),U=C0.indexOf(":")<0&&"on"+C0,c=c[E.expando]?c:new E.Event(C0,typeof c=="object"&&c),c.isTrigger=f?2:3,c.namespace=c1.join("."),c.rnamespace=c.namespace?new RegExp("(^|\\.)"+c1.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=void 0,c.target||(c.target=z),s=s==null?[c]:E.makeArray(s,[c]),z0=E.event.special[C0]||{},!(!f&&z0.trigger&&z0.trigger.apply(z,s)===!1))){if(!f&&!z0.noBubble&&!k(z)){for(w=z0.delegateType||C0,Mr.test(w+C0)||(q=q.parentNode);q;q=q.parentNode)o0.push(q),L=q;L===(z.ownerDocument||W)&&o0.push(L.defaultView||L.parentWindow||t)}for(N=0;(q=o0[N++])&&!c.isPropagationStopped();)T0=q,c.type=N>1?w:z0.bindType||C0,Q=(j0.get(q,"events")||Object.create(null))[c.type]&&j0.get(q,"handle"),Q&&Q.apply(q,s),Q=U&&q[U],Q&&Q.apply&&pe(q)&&(c.result=Q.apply(q,s),c.result===!1&&c.preventDefault());return c.type=C0,!f&&!c.isDefaultPrevented()&&(!z0._default||z0._default.apply(o0.pop(),s)===!1)&&pe(z)&&U&&P(z[C0])&&!k(z)&&(L=z[U],L&&(z[U]=null),E.event.triggered=C0,c.isPropagationStopped()&&T0.addEventListener(C0,iM),z[C0](),c.isPropagationStopped()&&T0.removeEventListener(C0,iM),E.event.triggered=void 0,L&&(z[U]=L)),c.result}},simulate:function(c,s,z){var f=E.extend(new E.Event,z,{type:c,isSimulated:!0});E.event.trigger(f,null,s)}}),E.fn.extend({trigger:function(c,s){return this.each(function(){E.event.trigger(c,s,this)})},triggerHandler:function(c,s){var z=this[0];if(z)return E.event.trigger(c,s,z,!0)}});var OM=/\[\]$/,Qr=/\r?\n/g,cM=/^(?:submit|button|image|reset|file)$/i,da=/^(?:input|select|textarea|keygen)/i;function Zr(c,s,z,f){var N;if(Array.isArray(s))E.each(s,function(q,L){z||OM.test(c)?f(c,L):Zr(c+"["+(typeof L=="object"&&L!=null?q:"")+"]",L,z,f)});else if(!z&&j(s)==="object")for(N in s)Zr(c+"["+N+"]",s[N],z,f);else f(c,s)}E.param=function(c,s){var z,f=[],N=function(q,L){var w=P(L)?L():L;f[f.length]=encodeURIComponent(q)+"="+encodeURIComponent(w??"")};if(c==null)return"";if(Array.isArray(c)||c.jquery&&!E.isPlainObject(c))E.each(c,function(){N(this.name,this.value)});else for(z in c)Zr(z,c[z],s,N);return f.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var c=E.prop(this,"elements");return c?E.makeArray(c):this}).filter(function(){var c=this.type;return this.name&&!E(this).is(":disabled")&&da.test(this.nodeName)&&!cM.test(c)&&(this.checked||!gn.test(c))}).map(function(c,s){var z=E(this).val();return z==null?null:Array.isArray(z)?E.map(z,function(f){return{name:s.name,value:f.replace(Qr,`\r `)}}):{name:s.name,value:z.replace(Qr,`\r -`)}}).get()}});var eo=/%20/g,pM=/#.*$/,to=/([?&])_=[^&]*/,ar=/^(.*?):[ \t]*([^\r\n]*)$/mg,Ra=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,no=/^(?:GET|HEAD)$/,Ta=/^\/\//,bM={},Q1={},Z1="*/".concat("*"),ro=W.createElement("a");ro.href=o2.href;function sM(c){return function(s,z){typeof s!="string"&&(z=s,s="*");var f,N=0,q=s.toLowerCase().match(V1)||[];if(P(z))for(;f=q[N++];)f[0]==="+"?(f=f.slice(1)||"*",(c[f]=c[f]||[]).unshift(z)):(c[f]=c[f]||[]).push(z)}}function AM(c,s,z,f){var N={},q=c===Q1;function L(w){var U;return N[w]=!0,E.each(c[w]||[],function(Q,z0){var T0=z0(s,z,f);if(typeof T0=="string"&&!q&&!N[T0])return s.dataTypes.unshift(T0),L(T0),!1;if(q)return!(U=T0)}),U}return L(s.dataTypes[0])||!N["*"]&&L("*")}function oo(c,s){var z,f,N=E.ajaxSettings.flatOptions||{};for(z in s)s[z]!==void 0&&((N[z]?c:f||(f={}))[z]=s[z]);return f&&E.extend(!0,c,f),c}function Na(c,s,z){for(var f,N,q,L,w=c.contents,U=c.dataTypes;U[0]==="*";)U.shift(),f===void 0&&(f=c.mimeType||s.getResponseHeader("Content-Type"));if(f){for(N in w)if(w[N]&&w[N].test(f)){U.unshift(N);break}}if(U[0]in z)q=U[0];else{for(N in z){if(!U[0]||c.converters[N+" "+U[0]]){q=N;break}L||(L=N)}q=q||L}if(q)return q!==U[0]&&U.unshift(q),z[q]}function qa(c,s,z,f){var N,q,L,w,U,Q={},z0=c.dataTypes.slice();if(z0[1])for(L in c.converters)Q[L.toLowerCase()]=c.converters[L];for(q=z0.shift();q;)if(c.responseFields[q]&&(z[c.responseFields[q]]=s),!U&&f&&c.dataFilter&&(s=c.dataFilter(s,c.dataType)),U=q,q=z0.shift(),q){if(q==="*")q=U;else if(U!=="*"&&U!==q){if(L=Q[U+" "+q]||Q["* "+q],!L){for(N in Q)if(w=N.split(" "),w[1]===q&&(L=Q[U+" "+w[0]]||Q["* "+w[0]],L)){L===!0?L=Q[N]:Q[N]!==!0&&(q=w[0],z0.unshift(w[1]));break}}if(L!==!0)if(L&&c.throws)s=L(s);else try{s=L(s)}catch(T0){return{state:"parsererror",error:L?T0:"No conversion from "+U+" to "+q}}}}return{state:"success",data:s}}E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:o2.href,type:"GET",isLocal:Ra.test(o2.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Z1,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(c,s){return s?oo(oo(c,E.ajaxSettings),s):oo(E.ajaxSettings,c)},ajaxPrefilter:sM(bM),ajaxTransport:sM(Q1),ajax:function(c,s){typeof c=="object"&&(s=c,c=void 0),s=s||{};var z,f,N,q,L,w,U,Q,z0,T0,o0=E.ajaxSetup({},s),C0=o0.context||o0,c1=o0.context&&(C0.nodeType||C0.jquery)?E(C0):E.event,t1=E.Deferred(),b1=E.Callbacks("once memory"),Ee=o0.statusCode||{},be={},Qe={},Nt="canceled",I1={readyState:0,getResponseHeader:function(D1){var te;if(U){if(!q)for(q={};te=ar.exec(N);)q[te[1].toLowerCase()+" "]=(q[te[1].toLowerCase()+" "]||[]).concat(te[2]);te=q[D1.toLowerCase()+" "]}return te==null?null:te.join(", ")},getAllResponseHeaders:function(){return U?N:null},setRequestHeader:function(D1,te){return U==null&&(D1=Qe[D1.toLowerCase()]=Qe[D1.toLowerCase()]||D1,be[D1]=te),this},overrideMimeType:function(D1){return U==null&&(o0.mimeType=D1),this},statusCode:function(D1){var te;if(D1)if(U)I1.always(D1[I1.status]);else for(te in D1)Ee[te]=[Ee[te],D1[te]];return this},abort:function(D1){var te=D1||Nt;return z&&z.abort(te),Un(0,te),this}};if(t1.promise(I1),o0.url=((c||o0.url||o2.href)+"").replace(Ta,o2.protocol+"//"),o0.type=s.method||s.type||o0.method||o0.type,o0.dataTypes=(o0.dataType||"*").toLowerCase().match(V1)||[""],o0.crossDomain==null){w=W.createElement("a");try{w.href=o0.url,w.href=w.href,o0.crossDomain=ro.protocol+"//"+ro.host!=w.protocol+"//"+w.host}catch{o0.crossDomain=!0}}if(o0.data&&o0.processData&&typeof o0.data!="string"&&(o0.data=E.param(o0.data,o0.traditional)),AM(bM,o0,s,I1),U)return I1;Q=E.event&&o0.global,Q&&E.active++===0&&E.event.trigger("ajaxStart"),o0.type=o0.type.toUpperCase(),o0.hasContent=!no.test(o0.type),f=o0.url.replace(pM,""),o0.hasContent?o0.data&&o0.processData&&(o0.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(o0.data=o0.data.replace(eo,"+")):(T0=o0.url.slice(f.length),o0.data&&(o0.processData||typeof o0.data=="string")&&(f+=(or.test(f)?"&":"?")+o0.data,delete o0.data),o0.cache===!1&&(f=f.replace(to,"$1"),T0=(or.test(f)?"&":"?")+"_="+jr.guid+++T0),o0.url=f+T0),o0.ifModified&&(E.lastModified[f]&&I1.setRequestHeader("If-Modified-Since",E.lastModified[f]),E.etag[f]&&I1.setRequestHeader("If-None-Match",E.etag[f])),(o0.data&&o0.hasContent&&o0.contentType!==!1||s.contentType)&&I1.setRequestHeader("Content-Type",o0.contentType),I1.setRequestHeader("Accept",o0.dataTypes[0]&&o0.accepts[o0.dataTypes[0]]?o0.accepts[o0.dataTypes[0]]+(o0.dataTypes[0]!=="*"?", "+Z1+"; q=0.01":""):o0.accepts["*"]);for(z0 in o0.headers)I1.setRequestHeader(z0,o0.headers[z0]);if(o0.beforeSend&&(o0.beforeSend.call(C0,I1,o0)===!1||U))return I1.abort();if(Nt="abort",b1.add(o0.complete),I1.done(o0.success),I1.fail(o0.error),z=AM(Q1,o0,s,I1),!z)Un(-1,"No Transport");else{if(I1.readyState=1,Q&&c1.trigger("ajaxSend",[I1,o0]),U)return I1;o0.async&&o0.timeout>0&&(L=t.setTimeout(function(){I1.abort("timeout")},o0.timeout));try{U=!1,z.send(be,Un)}catch(D1){if(U)throw D1;Un(-1,D1)}}function Un(D1,te,Ot,h2){var ct,qt,Ze,St,Ft,et=te;U||(U=!0,L&&t.clearTimeout(L),z=void 0,N=h2||"",I1.readyState=D1>0?4:0,ct=D1>=200&&D1<300||D1===304,Ot&&(St=Na(o0,I1,Ot)),!ct&&E.inArray("script",o0.dataTypes)>-1&&E.inArray("json",o0.dataTypes)<0&&(o0.converters["text script"]=function(){}),St=qa(o0,St,I1,ct),ct?(o0.ifModified&&(Ft=I1.getResponseHeader("Last-Modified"),Ft&&(E.lastModified[f]=Ft),Ft=I1.getResponseHeader("etag"),Ft&&(E.etag[f]=Ft)),D1===204||o0.type==="HEAD"?et="nocontent":D1===304?et="notmodified":(et=St.state,qt=St.data,Ze=St.error,ct=!Ze)):(Ze=et,(D1||!et)&&(et="error",D1<0&&(D1=0))),I1.status=D1,I1.statusText=(te||et)+"",ct?t1.resolveWith(C0,[qt,et,I1]):t1.rejectWith(C0,[I1,et,Ze]),I1.statusCode(Ee),Ee=void 0,Q&&c1.trigger(ct?"ajaxSuccess":"ajaxError",[I1,o0,ct?qt:Ze]),b1.fireWith(C0,[I1,et]),Q&&(c1.trigger("ajaxComplete",[I1,o0]),--E.active||E.event.trigger("ajaxStop")))}return I1},getJSON:function(c,s,z){return E.get(c,s,z,"json")},getScript:function(c,s){return E.get(c,void 0,s,"script")}}),E.each(["get","post"],function(c,s){E[s]=function(z,f,N,q){return P(f)&&(q=q||N,N=f,f=void 0),E.ajax(E.extend({url:z,type:s,dataType:q,data:f,success:N},E.isPlainObject(z)&&z))}}),E.ajaxPrefilter(function(c){var s;for(s in c.headers)s.toLowerCase()==="content-type"&&(c.contentType=c.headers[s]||"")}),E._evalUrl=function(c,s,z){return E.ajax({url:c,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(f){E.globalEval(f,s,z)}})},E.fn.extend({wrapAll:function(c){var s;return this[0]&&(P(c)&&(c=c.call(this[0])),s=E(c,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&s.insertBefore(this[0]),s.map(function(){for(var z=this;z.firstElementChild;)z=z.firstElementChild;return z}).append(this)),this},wrapInner:function(c){return P(c)?this.each(function(s){E(this).wrapInner(c.call(this,s))}):this.each(function(){var s=E(this),z=s.contents();z.length?z.wrapAll(c):s.append(c)})},wrap:function(c){var s=P(c);return this.each(function(z){E(this).wrapAll(s?c.call(this,z):c)})},unwrap:function(c){return this.parent(c).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}}),E.expr.pseudos.hidden=function(c){return!E.expr.pseudos.visible(c)},E.expr.pseudos.visible=function(c){return!!(c.offsetWidth||c.offsetHeight||c.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Ht={0:200,1223:204},Tt=E.ajaxSettings.xhr();m.cors=!!Tt&&"withCredentials"in Tt,m.ajax=Tt=!!Tt,E.ajaxTransport(function(c){var s,z;if(m.cors||Tt&&!c.crossDomain)return{send:function(f,N){var q,L=c.xhr();if(L.open(c.type,c.url,c.async,c.username,c.password),c.xhrFields)for(q in c.xhrFields)L[q]=c.xhrFields[q];c.mimeType&&L.overrideMimeType&&L.overrideMimeType(c.mimeType),!c.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");for(q in f)L.setRequestHeader(q,f[q]);s=function(w){return function(){s&&(s=z=L.onload=L.onerror=L.onabort=L.ontimeout=L.onreadystatechange=null,w==="abort"?L.abort():w==="error"?typeof L.status!="number"?N(0,"error"):N(L.status,L.statusText):N(Ht[L.status]||L.status,L.statusText,(L.responseType||"text")!=="text"||typeof L.responseText!="string"?{binary:L.response}:{text:L.responseText},L.getAllResponseHeaders()))}},L.onload=s(),z=L.onerror=L.ontimeout=s("error"),L.onabort!==void 0?L.onabort=z:L.onreadystatechange=function(){L.readyState===4&&t.setTimeout(function(){s&&z()})},s=s("abort");try{L.send(c.hasContent&&c.data||null)}catch(w){if(s)throw w}},abort:function(){s&&s()}}}),E.ajaxPrefilter(function(c){c.crossDomain&&(c.contents.script=!1)}),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(c){return E.globalEval(c),c}}}),E.ajaxPrefilter("script",function(c){c.cache===void 0&&(c.cache=!1),c.crossDomain&&(c.type="GET")}),E.ajaxTransport("script",function(c){if(c.crossDomain||c.scriptAttrs){var s,z;return{send:function(f,N){s=E("